feat: change feedback to forum (#27862)

This commit is contained in:
crazywoola
2025-11-05 14:51:57 +08:00
committed by GitHub
parent 775d2e14fc
commit 22f858152f
24 changed files with 23 additions and 42 deletions

View File

@ -4,27 +4,27 @@ import { RiFeedbackLine } from '@remixicon/react'
import i18n from '@/i18n-config/i18next-config' import i18n from '@/i18n-config/i18next-config'
import { registerCommands, unregisterCommands } from './command-bus' import { registerCommands, unregisterCommands } from './command-bus'
// Feedback command dependency types // Forum command dependency types
type FeedbackDeps = Record<string, never> type ForumDeps = Record<string, never>
/** /**
* Feedback command - Opens GitHub feedback discussions * Forum command - Opens Dify community forum
*/ */
export const feedbackCommand: SlashCommandHandler<FeedbackDeps> = { export const forumCommand: SlashCommandHandler<ForumDeps> = {
name: 'feedback', name: 'forum',
description: 'Open feedback discussions', description: 'Open Dify community forum',
mode: 'direct', mode: 'direct',
// Direct execution function // Direct execution function
execute: () => { execute: () => {
const url = 'https://github.com/langgenius/dify/discussions/categories/feedbacks' const url = 'https://forum.dify.ai'
window.open(url, '_blank', 'noopener,noreferrer') window.open(url, '_blank', 'noopener,noreferrer')
}, },
async search(args: string, locale: string = 'en') { async search(args: string, locale: string = 'en') {
return [{ return [{
id: 'feedback', id: 'forum',
title: i18n.t('common.userProfile.communityFeedback', { lng: locale }), title: i18n.t('common.userProfile.forum', { lng: locale }),
description: i18n.t('app.gotoAnything.actions.feedbackDesc', { lng: locale }) || 'Open community feedback discussions', description: i18n.t('app.gotoAnything.actions.feedbackDesc', { lng: locale }) || 'Open community feedback discussions',
type: 'command' as const, type: 'command' as const,
icon: ( icon: (
@ -32,20 +32,20 @@ export const feedbackCommand: SlashCommandHandler<FeedbackDeps> = {
<RiFeedbackLine className='h-4 w-4 text-text-tertiary' /> <RiFeedbackLine className='h-4 w-4 text-text-tertiary' />
</div> </div>
), ),
data: { command: 'navigation.feedback', args: { url: 'https://github.com/langgenius/dify/discussions/categories/feedbacks' } }, data: { command: 'navigation.forum', args: { url: 'https://forum.dify.ai' } },
}] }]
}, },
register(_deps: FeedbackDeps) { register(_deps: ForumDeps) {
registerCommands({ registerCommands({
'navigation.feedback': async (args) => { 'navigation.forum': async (args) => {
const url = args?.url || 'https://github.com/langgenius/dify/discussions/categories/feedbacks' const url = args?.url || 'https://forum.dify.ai'
window.open(url, '_blank', 'noopener,noreferrer') window.open(url, '_blank', 'noopener,noreferrer')
}, },
}) })
}, },
unregister() { unregister() {
unregisterCommands(['navigation.feedback']) unregisterCommands(['navigation.forum'])
}, },
} }

View File

@ -7,7 +7,7 @@ import { useTheme } from 'next-themes'
import { setLocaleOnClient } from '@/i18n-config' import { setLocaleOnClient } from '@/i18n-config'
import { themeCommand } from './theme' import { themeCommand } from './theme'
import { languageCommand } from './language' import { languageCommand } from './language'
import { feedbackCommand } from './feedback' import { forumCommand } from './forum'
import { docsCommand } from './docs' import { docsCommand } from './docs'
import { communityCommand } from './community' import { communityCommand } from './community'
import { accountCommand } from './account' import { accountCommand } from './account'
@ -34,7 +34,7 @@ export const registerSlashCommands = (deps: Record<string, any>) => {
// Register command handlers to the registry system with their respective dependencies // Register command handlers to the registry system with their respective dependencies
slashCommandRegistry.register(themeCommand, { setTheme: deps.setTheme }) slashCommandRegistry.register(themeCommand, { setTheme: deps.setTheme })
slashCommandRegistry.register(languageCommand, { setLocale: deps.setLocale }) slashCommandRegistry.register(languageCommand, { setLocale: deps.setLocale })
slashCommandRegistry.register(feedbackCommand, {}) slashCommandRegistry.register(forumCommand, {})
slashCommandRegistry.register(docsCommand, {}) slashCommandRegistry.register(docsCommand, {})
slashCommandRegistry.register(communityCommand, {}) slashCommandRegistry.register(communityCommand, {})
slashCommandRegistry.register(accountCommand, {}) slashCommandRegistry.register(accountCommand, {})
@ -44,7 +44,7 @@ export const unregisterSlashCommands = () => {
// Remove command handlers from registry system (automatically calls each command's unregister method) // Remove command handlers from registry system (automatically calls each command's unregister method)
slashCommandRegistry.unregister('theme') slashCommandRegistry.unregister('theme')
slashCommandRegistry.unregister('language') slashCommandRegistry.unregister('language')
slashCommandRegistry.unregister('feedback') slashCommandRegistry.unregister('forum')
slashCommandRegistry.unregister('docs') slashCommandRegistry.unregister('docs')
slashCommandRegistry.unregister('community') slashCommandRegistry.unregister('community')
slashCommandRegistry.unregister('account') slashCommandRegistry.unregister('account')

View File

@ -1,5 +1,5 @@
import { Menu, MenuButton, MenuItem, MenuItems, Transition } from '@headlessui/react' import { Menu, MenuButton, MenuItem, MenuItems, Transition } from '@headlessui/react'
import { RiArrowRightSLine, RiArrowRightUpLine, RiChatSmile2Line, RiDiscordLine, RiFeedbackLine, RiMailSendLine, RiQuestionLine } from '@remixicon/react' import { RiArrowRightSLine, RiArrowRightUpLine, RiChatSmile2Line, RiDiscordLine, RiDiscussLine, RiMailSendLine, RiQuestionLine } from '@remixicon/react'
import { Fragment } from 'react' import { Fragment } from 'react'
import Link from 'next/link' import Link from 'next/link'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
@ -86,10 +86,10 @@ export default function Support({ closeAccountDropdown }: SupportProps) {
className={cn(itemClassName, 'group justify-between', className={cn(itemClassName, 'group justify-between',
'data-[active]:bg-state-base-hover', 'data-[active]:bg-state-base-hover',
)} )}
href='https://github.com/langgenius/dify/discussions/categories/feedbacks' href='https://forum.dify.ai/'
target='_blank' rel='noopener noreferrer'> target='_blank' rel='noopener noreferrer'>
<RiFeedbackLine className='size-4 shrink-0 text-text-tertiary' /> <RiDiscussLine className='size-4 shrink-0 text-text-tertiary' />
<div className='system-md-regular grow px-1 text-text-secondary'>{t('common.userProfile.communityFeedback')}</div> <div className='system-md-regular grow px-1 text-text-secondary'>{t('common.userProfile.forum')}</div>
<RiArrowRightUpLine className='size-[14px] shrink-0 text-text-tertiary' /> <RiArrowRightUpLine className='size-[14px] shrink-0 text-text-tertiary' />
</Link> </Link>
</MenuItem> </MenuItem>

View File

@ -161,7 +161,6 @@ const translation = {
workspace: 'Arbeitsbereich', workspace: 'Arbeitsbereich',
createWorkspace: 'Arbeitsbereich erstellen', createWorkspace: 'Arbeitsbereich erstellen',
helpCenter: 'Hilfe', helpCenter: 'Hilfe',
communityFeedback: 'Rückmeldung',
roadmap: 'Fahrplan', roadmap: 'Fahrplan',
community: 'Gemeinschaft', community: 'Gemeinschaft',
about: 'Über', about: 'Über',

View File

@ -177,7 +177,7 @@ const translation = {
helpCenter: 'Docs', helpCenter: 'Docs',
support: 'Support', support: 'Support',
compliance: 'Compliance', compliance: 'Compliance',
communityFeedback: 'Feedback', forum: 'Forum',
roadmap: 'Roadmap', roadmap: 'Roadmap',
github: 'GitHub', github: 'GitHub',
community: 'Community', community: 'Community',

View File

@ -165,7 +165,6 @@ const translation = {
workspace: 'Espacio de trabajo', workspace: 'Espacio de trabajo',
createWorkspace: 'Crear espacio de trabajo', createWorkspace: 'Crear espacio de trabajo',
helpCenter: 'Ayuda', helpCenter: 'Ayuda',
communityFeedback: 'Comentarios',
roadmap: 'Hoja de ruta', roadmap: 'Hoja de ruta',
community: 'Comunidad', community: 'Comunidad',
about: 'Acerca de', about: 'Acerca de',

View File

@ -165,7 +165,6 @@ const translation = {
workspace: 'فضای کاری', workspace: 'فضای کاری',
createWorkspace: 'ایجاد فضای کاری', createWorkspace: 'ایجاد فضای کاری',
helpCenter: 'راهنما', helpCenter: 'راهنما',
communityFeedback: 'بازخورد',
roadmap: 'نقشه راه', roadmap: 'نقشه راه',
community: 'انجمن', community: 'انجمن',
about: 'درباره', about: 'درباره',

View File

@ -161,7 +161,6 @@ const translation = {
workspace: 'Espace de travail', workspace: 'Espace de travail',
createWorkspace: 'Créer un Espace de Travail', createWorkspace: 'Créer un Espace de Travail',
helpCenter: 'Aide', helpCenter: 'Aide',
communityFeedback: 'Retour d\'information',
roadmap: 'Feuille de route', roadmap: 'Feuille de route',
community: 'Communauté', community: 'Communauté',
about: 'À propos', about: 'À propos',

View File

@ -170,7 +170,6 @@ const translation = {
workspace: 'वर्कस्पेस', workspace: 'वर्कस्पेस',
createWorkspace: 'वर्कस्पेस बनाएं', createWorkspace: 'वर्कस्पेस बनाएं',
helpCenter: 'सहायता', helpCenter: 'सहायता',
communityFeedback: 'प्रतिक्रिया',
roadmap: 'रोडमैप', roadmap: 'रोडमैप',
community: 'समुदाय', community: 'समुदाय',
about: 'के बारे में', about: 'के बारे में',

View File

@ -163,7 +163,6 @@ const translation = {
helpCenter: 'Docs', helpCenter: 'Docs',
compliance: 'Kepatuhan', compliance: 'Kepatuhan',
community: 'Masyarakat', community: 'Masyarakat',
communityFeedback: 'Umpan balik',
roadmap: 'Peta jalan', roadmap: 'Peta jalan',
logout: 'Keluar', logout: 'Keluar',
settings: 'Pengaturan', settings: 'Pengaturan',

View File

@ -170,7 +170,6 @@ const translation = {
workspace: 'Workspace', workspace: 'Workspace',
createWorkspace: 'Crea Workspace', createWorkspace: 'Crea Workspace',
helpCenter: 'Aiuto', helpCenter: 'Aiuto',
communityFeedback: 'Feedback',
roadmap: 'Tabella di marcia', roadmap: 'Tabella di marcia',
community: 'Comunità', community: 'Comunità',
about: 'Informazioni', about: 'Informazioni',

View File

@ -173,7 +173,6 @@ const translation = {
helpCenter: 'ヘルプ', helpCenter: 'ヘルプ',
support: 'サポート', support: 'サポート',
compliance: 'コンプライアンス', compliance: 'コンプライアンス',
communityFeedback: 'フィードバック',
roadmap: 'ロードマップ', roadmap: 'ロードマップ',
community: 'コミュニティ', community: 'コミュニティ',
about: 'Dify について', about: 'Dify について',

View File

@ -157,7 +157,6 @@ const translation = {
workspace: '작업 공간', workspace: '작업 공간',
createWorkspace: '작업 공간 만들기', createWorkspace: '작업 공간 만들기',
helpCenter: '도움말 센터', helpCenter: '도움말 센터',
communityFeedback: '로드맵 및 피드백',
roadmap: '로드맵', roadmap: '로드맵',
community: '커뮤니티', community: '커뮤니티',
about: 'Dify 소개', about: 'Dify 소개',

View File

@ -166,7 +166,6 @@ const translation = {
workspace: 'Przestrzeń robocza', workspace: 'Przestrzeń robocza',
createWorkspace: 'Utwórz przestrzeń roboczą', createWorkspace: 'Utwórz przestrzeń roboczą',
helpCenter: 'Pomoc', helpCenter: 'Pomoc',
communityFeedback: 'Opinie',
roadmap: 'Plan działania', roadmap: 'Plan działania',
community: 'Społeczność', community: 'Społeczność',
about: 'O', about: 'O',

View File

@ -161,7 +161,6 @@ const translation = {
workspace: 'Espaço de trabalho', workspace: 'Espaço de trabalho',
createWorkspace: 'Criar Espaço de Trabalho', createWorkspace: 'Criar Espaço de Trabalho',
helpCenter: 'Ajuda', helpCenter: 'Ajuda',
communityFeedback: 'Feedback',
roadmap: 'Roteiro', roadmap: 'Roteiro',
community: 'Comunidade', community: 'Comunidade',
about: 'Sobre', about: 'Sobre',

View File

@ -161,7 +161,6 @@ const translation = {
workspace: 'Spațiu de lucru', workspace: 'Spațiu de lucru',
createWorkspace: 'Creează Spațiu de lucru', createWorkspace: 'Creează Spațiu de lucru',
helpCenter: 'Ajutor', helpCenter: 'Ajutor',
communityFeedback: 'Feedback',
roadmap: 'Plan de acțiune', roadmap: 'Plan de acțiune',
community: 'Comunitate', community: 'Comunitate',
about: 'Despre', about: 'Despre',

View File

@ -165,7 +165,6 @@ const translation = {
workspace: 'Рабочее пространство', workspace: 'Рабочее пространство',
createWorkspace: 'Создать рабочее пространство', createWorkspace: 'Создать рабочее пространство',
helpCenter: 'Помощь', helpCenter: 'Помощь',
communityFeedback: 'Обратная связь',
roadmap: 'План развития', roadmap: 'План развития',
community: 'Сообщество', community: 'Сообщество',
about: 'О нас', about: 'О нас',

View File

@ -165,7 +165,6 @@ const translation = {
workspace: 'Delovni prostor', workspace: 'Delovni prostor',
createWorkspace: 'Ustvari delovni prostor', createWorkspace: 'Ustvari delovni prostor',
helpCenter: 'Pomoč', helpCenter: 'Pomoč',
communityFeedback: 'Povratne informacije',
roadmap: 'Načrt razvoja', roadmap: 'Načrt razvoja',
community: 'Skupnost', community: 'Skupnost',
about: 'O nas', about: 'O nas',

View File

@ -160,7 +160,6 @@ const translation = {
workspace: 'พื้นที่', workspace: 'พื้นที่',
createWorkspace: 'สร้างพื้นที่ทํางาน', createWorkspace: 'สร้างพื้นที่ทํางาน',
helpCenter: 'วิธีใช้', helpCenter: 'วิธีใช้',
communityFeedback: 'การตอบสนอง',
roadmap: 'แผนงาน', roadmap: 'แผนงาน',
community: 'ชุมชน', community: 'ชุมชน',
about: 'ประมาณ', about: 'ประมาณ',

View File

@ -165,7 +165,6 @@ const translation = {
workspace: 'Çalışma Alanı', workspace: 'Çalışma Alanı',
createWorkspace: 'Çalışma Alanı Oluştur', createWorkspace: 'Çalışma Alanı Oluştur',
helpCenter: 'Yardım', helpCenter: 'Yardım',
communityFeedback: 'Geri Bildirim',
roadmap: 'Yol haritası', roadmap: 'Yol haritası',
community: 'Topluluk', community: 'Topluluk',
about: 'Hakkında', about: 'Hakkında',

View File

@ -161,7 +161,6 @@ const translation = {
workspace: 'Робочий простір', workspace: 'Робочий простір',
createWorkspace: 'Створити робочий простір', createWorkspace: 'Створити робочий простір',
helpCenter: 'Довідковий центр', helpCenter: 'Довідковий центр',
communityFeedback: 'відгуки',
roadmap: 'Дорожня карта', roadmap: 'Дорожня карта',
community: 'Спільнота', community: 'Спільнота',
about: 'Про нас', about: 'Про нас',

View File

@ -161,7 +161,6 @@ const translation = {
workspace: 'Không gian làm việc', workspace: 'Không gian làm việc',
createWorkspace: 'Tạo Không gian làm việc', createWorkspace: 'Tạo Không gian làm việc',
helpCenter: 'Trung tâm trợ giúp', helpCenter: 'Trung tâm trợ giúp',
communityFeedback: 'Phản hồi',
roadmap: 'Lộ trình', roadmap: 'Lộ trình',
community: 'Cộng đồng', community: 'Cộng đồng',
about: 'Về chúng tôi', about: 'Về chúng tôi',

View File

@ -176,7 +176,7 @@ const translation = {
helpCenter: '帮助文档', helpCenter: '帮助文档',
support: '支持', support: '支持',
compliance: '合规', compliance: '合规',
communityFeedback: '用户反馈', forum: '论坛',
roadmap: '路线图', roadmap: '路线图',
github: 'GitHub', github: 'GitHub',
community: '社区', community: '社区',

View File

@ -161,7 +161,6 @@ const translation = {
workspace: '工作空間', workspace: '工作空間',
createWorkspace: '建立工作空間', createWorkspace: '建立工作空間',
helpCenter: '幫助文件', helpCenter: '幫助文件',
communityFeedback: '使用者反饋',
roadmap: '路線圖', roadmap: '路線圖',
community: '社群', community: '社群',
about: '關於', about: '關於',