From 5a329a09c987b3249f97f9d53af67d1bffb09eea Mon Sep 17 00:00:00 2001 From: taiy <53635909+taiyme@users.noreply.github.com> Date: Wed, 1 May 2024 18:23:11 +0900 Subject: [PATCH] Revert "enhance(frontend): add contact page" (#208) This reverts commit ef630df443bdd24cfe0b086b0e2f94d87c4f53b7. --- locales/index.d.ts | 4 -- locales/ja-JP.yml | 1 - .../src/components/MkVisitorDashboard.vue | 39 ++++++++++++++++++- packages/frontend/src/pages/contact.vue | 24 ------------ packages/frontend/src/router/definition.ts | 3 -- packages/frontend/src/ui/_common_/common.ts | 11 ++---- 6 files changed, 40 insertions(+), 42 deletions(-) delete mode 100644 packages/frontend/src/pages/contact.vue diff --git a/locales/index.d.ts b/locales/index.d.ts index c0dc168573f3..a7018066b827 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -4952,10 +4952,6 @@ export interface Locale extends ILocale { * フォローの際常に確認する */ readonly "alwaysConfirmFollow": string; - /** - * お問い合わせ - */ - readonly "inquiry": string; readonly "_bubbleGame": { /** * 遊び方 diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index da7f3c1efe17..ee400529736b 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1234,7 +1234,6 @@ keepOriginalFilename: "オリジナルのファイル名を保持" keepOriginalFilenameDescription: "この設定をオフにすると、アップロード時にファイル名が自動でランダム文字列に置き換えられます。" noDescription: "説明文はありません" alwaysConfirmFollow: "フォローの際常に確認する" -inquiry: "お問い合わせ" _bubbleGame: howToPlay: "遊び方" diff --git a/packages/frontend/src/components/MkVisitorDashboard.vue b/packages/frontend/src/components/MkVisitorDashboard.vue index 279371557eaf..d5b1eb18baef 100644 --- a/packages/frontend/src/components/MkVisitorDashboard.vue +++ b/packages/frontend/src/components/MkVisitorDashboard.vue @@ -65,7 +65,6 @@ import { i18n } from '@/i18n.js'; import { instance } from '@/instance.js'; import MkNumber from '@/components/MkNumber.vue'; import XActiveUsersChart from '@/components/MkVisitorDashboard.ActiveUsersChart.vue'; -import { openInstanceMenu } from '@/ui/_common_/common.js'; const stats = ref(null); @@ -86,7 +85,43 @@ function signup() { } function showMenu(ev) { - openInstanceMenu(ev); + os.popupMenu([{ + text: i18n.ts.instanceInfo, + icon: 'ti ti-info-circle', + action: () => { + os.pageWindow('/about'); + }, + }, { + text: i18n.ts.aboutMisskey, + icon: 'ti ti-info-circle', + action: () => { + os.pageWindow('/about-misskey'); + }, + }, { type: 'divider' }, (instance.impressumUrl) ? { + text: i18n.ts.impressum, + icon: 'ti ti-file-invoice', + action: () => { + window.open(instance.impressumUrl!, '_blank', 'noopener'); + }, + } : undefined, (instance.tosUrl) ? { + text: i18n.ts.termsOfService, + icon: 'ti ti-notebook', + action: () => { + window.open(instance.tosUrl!, '_blank', 'noopener'); + }, + } : undefined, (instance.privacyPolicyUrl) ? { + text: i18n.ts.privacyPolicy, + icon: 'ti ti-shield-lock', + action: () => { + window.open(instance.privacyPolicyUrl!, '_blank', 'noopener'); + }, + } : undefined, (!instance.impressumUrl && !instance.tosUrl && !instance.privacyPolicyUrl) ? undefined : { type: 'divider' }, { + text: i18n.ts.help, + icon: 'ti ti-help-circle', + action: () => { + window.open('https://misskey-hub.net/docs/for-users/', '_blank', 'noopener'); + }, + }], ev.currentTarget ?? ev.target); } function exploreOtherServers() { diff --git a/packages/frontend/src/pages/contact.vue b/packages/frontend/src/pages/contact.vue deleted file mode 100644 index 3a694a713277..000000000000 --- a/packages/frontend/src/pages/contact.vue +++ /dev/null @@ -1,24 +0,0 @@ - - - - - diff --git a/packages/frontend/src/router/definition.ts b/packages/frontend/src/router/definition.ts index ce34b97848af..afb518e797f7 100644 --- a/packages/frontend/src/router/definition.ts +++ b/packages/frontend/src/router/definition.ts @@ -197,9 +197,6 @@ const routes: RouteDef[] = [{ path: '/about', component: page(() => import('@/pages/about.vue')), hash: 'initialTab', -}, { - path: '/contact', - component: page(() => import('@/pages/contact.vue')), }, { path: '/about-misskey', redirect: '/tms/about', diff --git a/packages/frontend/src/ui/_common_/common.ts b/packages/frontend/src/ui/_common_/common.ts index 5b3cc7636258..c93608217048 100644 --- a/packages/frontend/src/ui/_common_/common.ts +++ b/packages/frontend/src/ui/_common_/common.ts @@ -79,12 +79,7 @@ export function openInstanceMenu(ev: MouseEvent) { text: i18n.ts.tools, icon: 'ti ti-tool', children: toolsMenuItems(), - }, { type: 'divider' }, { - type: 'link', - text: i18n.ts.inquiry, - icon: 'ti ti-help-circle', - to: '/contact', - }, (instance.impressumUrl) ? { + }, { type: 'divider' }, (instance.impressumUrl) ? { text: i18n.ts.impressum, icon: 'ti ti-file-invoice', action: () => { @@ -103,8 +98,8 @@ export function openInstanceMenu(ev: MouseEvent) { window.open(instance.privacyPolicyUrl, '_blank', 'noopener'); }, } : undefined, (!instance.impressumUrl && !instance.tosUrl && !instance.privacyPolicyUrl) ? undefined : { type: 'divider' }, { - text: i18n.ts.document, - icon: 'ti ti-bulb', + text: i18n.ts.help, + icon: 'ti ti-help-circle', action: () => { window.open('https://misskey-hub.net/docs/for-users/', '_blank', 'noopener'); },