From e72758d8cda3db009c5d1bf1f4141682931b91f8 Mon Sep 17 00:00:00 2001 From: taiy <53635909+taiyme@users.noreply.github.com> Date: Tue, 2 Jul 2024 00:04:47 +0900 Subject: [PATCH] =?UTF-8?q?=20improve(frontend):=20=E3=82=B5=E3=83=BC?= =?UTF-8?q?=E3=83=90=E3=83=BC=E6=83=85=E5=A0=B1=E3=83=BB=E3=81=8A=E5=95=8F?= =?UTF-8?q?=E3=81=84=E5=90=88=E3=82=8F=E3=81=9B=E3=83=9A=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=82=92=E6=94=B9=E4=BF=AE=20(#238)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Revert "Revert "enhance(frontend): add contact page" (#208)" (This reverts commit 5a329a09c987b3249f97f9d53af67d1bffb09eea.) * improve(frontend): サーバー情報・お問い合わせページを改修 --- locales/index.d.ts | 8 + locales/ja-JP.yml | 2 + packages/frontend/src/components/MkMenu.vue | 2 +- .../src/components/MkVisitorDashboard.vue | 93 ++++++---- .../frontend/src/pages/about.overview.vue | 169 ++++++++++++++++++ packages/frontend/src/pages/about.vue | 159 +--------------- packages/frontend/src/pages/contact.vue | 26 ++- packages/frontend/src/router/definition.ts | 3 + packages/frontend/src/ui/_common_/common.ts | 35 ++-- 9 files changed, 279 insertions(+), 218 deletions(-) create mode 100644 packages/frontend/src/pages/about.overview.vue diff --git a/locales/index.d.ts b/locales/index.d.ts index 70ff569e8fb5..0cbf89c87493 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -4980,6 +4980,10 @@ export interface Locale extends ILocale { * フォローの際常に確認する */ readonly "alwaysConfirmFollow": string; + /** + * お問い合わせ + */ + readonly "inquiry": string; readonly "_delivery": { /** * 配信状態 @@ -10167,6 +10171,10 @@ export interface Locale extends ILocale { * リモートサーバーに転送済み */ readonly "forwardedReport": string; + /** + * まだ提供されていません + */ + readonly "notYetProvided": string; readonly "_about": { /** * taiymeについて diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index ed3d3636454f..fd2c5fbf726d 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1241,6 +1241,7 @@ keepOriginalFilename: "オリジナルのファイル名を保持" keepOriginalFilenameDescription: "この設定をオフにすると、アップロード時にファイル名が自動でランダム文字列に置き換えられます。" noDescription: "説明文はありません" alwaysConfirmFollow: "フォローの際常に確認する" +inquiry: "お問い合わせ" _delivery: status: "配信状態" @@ -2711,6 +2712,7 @@ _tms: didNumberquote: "数字引用しました" resolvedBy: "{user}によって解決済み" forwardedReport: "リモートサーバーに転送済み" + notYetProvided: "まだ提供されていません" _about: title: "taiymeについて" description: "taiymeは、Misskeyから派生したオープンソースのソフトウェアです。" diff --git a/packages/frontend/src/components/MkMenu.vue b/packages/frontend/src/components/MkMenu.vue index 3edc3e2033a0..0621c5cf7d2b 100644 --- a/packages/frontend/src/components/MkMenu.vue +++ b/packages/frontend/src/components/MkMenu.vue @@ -38,7 +38,7 @@ SPDX-License-Identifier: AGPL-3.0-only - +
{{ item.text }} diff --git a/packages/frontend/src/components/MkVisitorDashboard.vue b/packages/frontend/src/components/MkVisitorDashboard.vue index ca54d0b80c48..09e445458688 100644 --- a/packages/frontend/src/components/MkVisitorDashboard.vue +++ b/packages/frontend/src/components/MkVisitorDashboard.vue @@ -23,7 +23,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.joinThisServer }} - {{ i18n.ts.exploreOtherServers }} + {{ i18n.ts.exploreOtherServers }} {{ i18n.ts.login }}
@@ -65,6 +65,7 @@ import { i18n } from '@/i18n.js'; import { instance } from '@/instance.js'; import MkNumber from '@/components/MkNumber.vue'; import XActiveUsersChart from '@/components/MkVisitorDashboard.ActiveUsersChart.vue'; +import type { MenuItem } from '@/types/menu.js'; const stats = ref(null); @@ -84,48 +85,66 @@ function signup() { }, {}, 'closed'); } -function showMenu(ev) { - os.popupMenu([{ +function showMenu(ev: MouseEvent) { + const menu: MenuItem[] = []; + menu.push({ + type: 'link', text: i18n.ts.instanceInfo, icon: 'ti ti-info-circle', - action: () => { - os.pageWindow('/about'); - }, - }, { + to: '/about', + }); + menu.push({ + type: 'link', text: i18n.ts._tms.aboutTaiyme, icon: 'ti ti-info-circle', - action: () => { - os.pageWindow('/tms/about'); - }, - }, { 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, + to: '/tms/about', + }); + menu.push({ type: 'divider' }); + menu.push({ + type: 'link', + text: i18n.ts.inquiry, icon: 'ti ti-help-circle', - action: () => { - window.open('https://misskey-hub.net/docs/for-users/', '_blank', 'noopener'); - }, - }], ev.currentTarget ?? ev.target); -} + to: '/contact', + }); + if (instance.impressumUrl) { + menu.push({ + type: 'a', + text: i18n.ts.impressum, + icon: 'ti ti-file-invoice', + href: instance.impressumUrl, + target: '_blank', + }); + } + if (instance.tosUrl) { + menu.push({ + type: 'a', + text: i18n.ts.termsOfService, + icon: 'ti ti-notebook', + href: instance.tosUrl, + target: '_blank', + }); + } + if (instance.privacyPolicyUrl) { + menu.push({ + type: 'a', + text: i18n.ts.privacyPolicy, + icon: 'ti ti-shield-lock', + href: instance.privacyPolicyUrl, + target: '_blank', + }); + } + if (instance.impressumUrl || instance.tosUrl || instance.privacyPolicyUrl) { + menu.push({ type: 'divider' }); + } + menu.push({ + type: 'a', + text: i18n.ts.document, + icon: 'ti ti-bulb', + href: 'https://misskey-hub.net/docs/for-users/', + target: '_blank', + }); -function exploreOtherServers() { - window.open('https://misskey-hub.net/servers/', '_blank', 'noopener'); + os.popupMenu(menu, ev.currentTarget ?? ev.target); } diff --git a/packages/frontend/src/pages/about.overview.vue b/packages/frontend/src/pages/about.overview.vue new file mode 100644 index 000000000000..14033ee07e39 --- /dev/null +++ b/packages/frontend/src/pages/about.overview.vue @@ -0,0 +1,169 @@ + + + + + + + diff --git a/packages/frontend/src/pages/about.vue b/packages/frontend/src/pages/about.vue index d43186c7768d..8dfeb6d2a73e 100644 --- a/packages/frontend/src/pages/about.vue +++ b/packages/frontend/src/pages/about.vue @@ -8,103 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-only -
- - - - - - - - -
- -
-
- - - - - -
-
-
- - -
- - - - - - - - - - -
- - - - - - - -
    -
  1. -
    -
  2. -
-
- - - - - - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - -
- host-meta - host-meta.json - nodeinfo - robots.txt - manifest.json -
-
-
+
@@ -121,28 +25,15 @@ SPDX-License-Identifier: AGPL-3.0-only - - diff --git a/packages/frontend/src/pages/contact.vue b/packages/frontend/src/pages/contact.vue index bcdcf4327552..b78c239d3785 100644 --- a/packages/frontend/src/pages/contact.vue +++ b/packages/frontend/src/pages/contact.vue @@ -7,18 +7,26 @@ SPDX-License-Identifier: AGPL-3.0-only -
- - +
+ + - - - + + + + + +
@@ -28,8 +36,8 @@ SPDX-License-Identifier: AGPL-3.0-only