Skip to content

Commit ef630df

Browse files
committed
enhance(frontend): add contact page
1 parent 8c5e564 commit ef630df

File tree

6 files changed

+42
-40
lines changed

6 files changed

+42
-40
lines changed

locales/index.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -4952,6 +4952,10 @@ export interface Locale extends ILocale {
49524952
* フォローの際常に確認する
49534953
*/
49544954
"alwaysConfirmFollow": string;
4955+
/**
4956+
* お問い合わせ
4957+
*/
4958+
"inquiry": string;
49554959
"_bubbleGame": {
49564960
/**
49574961
* 遊び方

locales/ja-JP.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1234,6 +1234,7 @@ keepOriginalFilename: "オリジナルのファイル名を保持"
12341234
keepOriginalFilenameDescription: "この設定をオフにすると、アップロード時にファイル名が自動でランダム文字列に置き換えられます。"
12351235
noDescription: "説明文はありません"
12361236
alwaysConfirmFollow: "フォローの際常に確認する"
1237+
inquiry: "お問い合わせ"
12371238

12381239
_bubbleGame:
12391240
howToPlay: "遊び方"

packages/frontend/src/components/MkVisitorDashboard.vue

+2-37
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ import { i18n } from '@/i18n.js';
6565
import { instance } from '@/instance.js';
6666
import MkNumber from '@/components/MkNumber.vue';
6767
import XActiveUsersChart from '@/components/MkVisitorDashboard.ActiveUsersChart.vue';
68+
import { openInstanceMenu } from '@/ui/_common_/common';
6869

6970
const stats = ref<Misskey.entities.StatsResponse | null>(null);
7071

@@ -85,43 +86,7 @@ function signup() {
8586
}
8687

8788
function showMenu(ev) {
88-
os.popupMenu([{
89-
text: i18n.ts.instanceInfo,
90-
icon: 'ti ti-info-circle',
91-
action: () => {
92-
os.pageWindow('/about');
93-
},
94-
}, {
95-
text: i18n.ts.aboutMisskey,
96-
icon: 'ti ti-info-circle',
97-
action: () => {
98-
os.pageWindow('/about-misskey');
99-
},
100-
}, { type: 'divider' }, (instance.impressumUrl) ? {
101-
text: i18n.ts.impressum,
102-
icon: 'ti ti-file-invoice',
103-
action: () => {
104-
window.open(instance.impressumUrl!, '_blank', 'noopener');
105-
},
106-
} : undefined, (instance.tosUrl) ? {
107-
text: i18n.ts.termsOfService,
108-
icon: 'ti ti-notebook',
109-
action: () => {
110-
window.open(instance.tosUrl!, '_blank', 'noopener');
111-
},
112-
} : undefined, (instance.privacyPolicyUrl) ? {
113-
text: i18n.ts.privacyPolicy,
114-
icon: 'ti ti-shield-lock',
115-
action: () => {
116-
window.open(instance.privacyPolicyUrl!, '_blank', 'noopener');
117-
},
118-
} : undefined, (!instance.impressumUrl && !instance.tosUrl && !instance.privacyPolicyUrl) ? undefined : { type: 'divider' }, {
119-
text: i18n.ts.help,
120-
icon: 'ti ti-help-circle',
121-
action: () => {
122-
window.open('https://misskey-hub.net/docs/for-users/', '_blank', 'noopener');
123-
},
124-
}], ev.currentTarget ?? ev.target);
89+
openInstanceMenu(ev);
12590
}
12691

12792
function exploreOtherServers() {
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!--
2+
SPDX-FileCopyrightText: syuilo and misskey-project
3+
SPDX-License-Identifier: AGPL-3.0-only
4+
-->
5+
6+
<template>
7+
<MkStickyContainer>
8+
<template #header><MkPageHeader/></template>
9+
<MkSpacer :contentMax="600" :marginMin="20">
10+
<div>{{ instance.maintainerEmail }}</div>
11+
</MkSpacer>
12+
</MkStickyContainer>
13+
</template>
14+
15+
<script lang="ts" setup>
16+
import { i18n } from '@/i18n.js';
17+
import { definePageMetadata } from '@/scripts/page-metadata.js';
18+
import { instance } from '@/instance.js';
19+
20+
definePageMetadata(() => ({
21+
title: i18n.ts.inquiry,
22+
icon: 'ti ti-help-circle',
23+
}));
24+
</script>

packages/frontend/src/router/definition.ts

+3
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ const routes: RouteDef[] = [{
197197
path: '/about',
198198
component: page(() => import('@/pages/about.vue')),
199199
hash: 'initialTab',
200+
}, {
201+
path: '/contact',
202+
component: page(() => import('@/pages/contact.vue')),
200203
}, {
201204
path: '/about-misskey',
202205
component: page(() => import('@/pages/about-misskey.vue')),

packages/frontend/src/ui/_common_/common.ts

+8-3
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,12 @@ export function openInstanceMenu(ev: MouseEvent) {
7979
text: i18n.ts.tools,
8080
icon: 'ti ti-tool',
8181
children: toolsMenuItems(),
82-
}, { type: 'divider' }, (instance.impressumUrl) ? {
82+
}, { type: 'divider' }, {
83+
type: 'link',
84+
text: i18n.ts.inquiry,
85+
icon: 'ti ti-help-circle',
86+
to: '/contact',
87+
}, (instance.impressumUrl) ? {
8388
text: i18n.ts.impressum,
8489
icon: 'ti ti-file-invoice',
8590
action: () => {
@@ -98,8 +103,8 @@ export function openInstanceMenu(ev: MouseEvent) {
98103
window.open(instance.privacyPolicyUrl, '_blank', 'noopener');
99104
},
100105
} : undefined, (!instance.impressumUrl && !instance.tosUrl && !instance.privacyPolicyUrl) ? undefined : { type: 'divider' }, {
101-
text: i18n.ts.help,
102-
icon: 'ti ti-help-circle',
106+
text: i18n.ts.document,
107+
icon: 'ti ti-bulb',
103108
action: () => {
104109
window.open('https://misskey-hub.net/docs/for-users/', '_blank', 'noopener');
105110
},

0 commit comments

Comments
 (0)