Skip to content

Commit 590421c

Browse files
committed
Add feedback questionnaires (#100)
1 parent 9198713 commit 590421c

File tree

3 files changed

+21
-10
lines changed

3 files changed

+21
-10
lines changed

src/app/layout/menu.ts

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import { ElIcon, ElMenu, ElMenuItem, ElMenuItemGroup, MenuItemRegistered } from
1010
import { RouteLocationNormalizedLoaded, Router, useRoute, useRouter } from "vue-router"
1111
import { I18nKey, t } from "@app/locale"
1212
import { MenuMessage } from "@app/locale/components/menu"
13-
import { HOME_PAGE, MEAT_URL, TU_CAO_PAGE, TRANSLATION_ISSUE_PAGE } from "@util/constant/url"
14-
import { Aim, Calendar, ChatSquare, Folder, Food, HotWater, Rank, SetUp, Stopwatch, Sugar, Tickets, Timer } from "@element-plus/icons-vue"
13+
import { HOME_PAGE, MEAT_URL, TRANSLATION_ISSUE_PAGE, FEEDBACK_QUESTIONNAIRE } from "@util/constant/url"
14+
import { Aim, Calendar, ChatSquare, Folder, Food, HotWater, MagicStick, Rank, SetUp, Stopwatch, Sugar, Tickets, Timer } from "@element-plus/icons-vue"
1515
import ElementIcon from "../element-ui/icon"
1616
import { locale } from "@util/i18n"
1717

@@ -51,13 +51,15 @@ function generateMenus(): _MenuGroup[] {
5151
icon: Sugar,
5252
index: '_rate'
5353
})
54+
const questionnairePage = FEEDBACK_QUESTIONNAIRE[locale]
55+
questionnairePage && otherMenuItems.push({
56+
title: 'feedback',
57+
href: questionnairePage,
58+
icon: ChatSquare,
59+
index: '_feedback'
60+
})
5461
if (isZhCn) {
5562
otherMenuItems.push({
56-
title: 'feedback',
57-
href: TU_CAO_PAGE,
58-
icon: ChatSquare,
59-
index: '_feedback'
60-
}, {
6163
title: 'meat',
6264
href: MEAT_URL,
6365
icon: Food,
@@ -67,7 +69,7 @@ function generateMenus(): _MenuGroup[] {
6769
otherMenuItems.push({
6870
title: 'translationMistake',
6971
href: TRANSLATION_ISSUE_PAGE,
70-
icon: ChatSquare,
72+
icon: MagicStick,
7173
index: '_i18n'
7274
})
7375
}

src/app/locale/components/menu.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const _default: Messages<MenuMessage> = {
7979
mergeRule: 'Merge-site Rules',
8080
other: 'Other Features',
8181
option: 'Options',
82-
feedback: 'Feedback',
82+
feedback: 'Feedback Questionnaire',
8383
rate: 'Rate It',
8484
meat: 'Invite the author to dinner',
8585
translationMistake: 'Improve translation'
@@ -98,7 +98,7 @@ const _default: Messages<MenuMessage> = {
9898
mergeRule: 'ドメイン合併',
9999
other: 'その他の機能',
100100
option: '拡張設定',
101-
feedback: 'フィードバック',
101+
feedback: 'フィードバックアンケート',
102102
rate: 'それを評価',
103103
meat: '著者を夕食に招待する',
104104
translationMistake: '翻訳を改善する'

src/util/constant/url.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,15 @@ export const ZH_FEEDBACK_PAGE = 'https://www.wjx.cn/vj/YFWwHUy.aspx'
4646
*/
4747
export const TU_CAO_PAGE = 'https://support.qq.com/products/402895'
4848

49+
/**
50+
* @since 0.9.6
51+
*/
52+
export const FEEDBACK_QUESTIONNAIRE: Partial<{ [locale in Timer.Locale]: string }> = {
53+
zh_CN: TU_CAO_PAGE,
54+
zh_TW: 'https://docs.google.com/forms/d/e/1FAIpQLSdfvG6ExLj331YOLZIKO3x98k3kMxpkkLW1RgFuRGmUnZCGRQ/viewform?usp=sf_link',
55+
en: 'https://docs.google.com/forms/d/e/1FAIpQLSdNq4gnSY7uxYkyqOPqyYF3Bqlc3ZnWCLDi5DI5xGjPeVCNiw/viewform?usp=sf_link',
56+
}
57+
4958
/**
5059
* The page of extension detail
5160
* @since 0.1.8

0 commit comments

Comments
 (0)