diff --git a/locales/en-US.yml b/locales/en-US.yml index bbb9ecc10..2c1c267d0 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1279,7 +1279,10 @@ noteOfThisUser: "Notes by this user" clipNoteLimitExceeded: "No more notes can be added to this clip." timeTravel: "Time Travel" timeTravelDescription: "Show posts before this date." +pariPlusNoteSettings: "Pari Plus! note settings" autoTranslateButton: "Display translation function on posts in different languages" +showDetailTimeWhenHover: "Hover/long press the timestamp of the post to expand the detailed time" +noteClickToOpen: "Click to open note details" performance: "Performance" modified: "Modified" discard: "Discard" diff --git a/locales/zh-CN.yml b/locales/zh-CN.yml index ab3b092e8..2c3fd92d2 100644 --- a/locales/zh-CN.yml +++ b/locales/zh-CN.yml @@ -1288,7 +1288,10 @@ passkeyVerificationFailed: "验证通行密钥失败。" passkeyVerificationSucceededButPasswordlessLoginDisabled: "通行密钥验证成功,但账户未开启无密码登录。" timeTravel: "时光机" timeTravelDescription: "显示该日期以前的帖子" +pariPlusNoteSettings: "Pari Plus! 的帖文设置" autoTranslateButton: "在不同语言的帖文上显示翻译功能" +showDetailTimeWhenHover: "悬浮/长按帖文时间戳时,展开详细时间" +noteClickToOpen: "点击展开帖文详情" messageToFollower: "给关注者的消息" target: "对象" testCaptchaWarning: "此功能为测试 CAPTCHA 用。请勿在正式环境中使用。" diff --git a/locales/zh-TW.yml b/locales/zh-TW.yml index ca0ee987f..3396a7b6d 100644 --- a/locales/zh-TW.yml +++ b/locales/zh-TW.yml @@ -1288,7 +1288,10 @@ passkeyVerificationFailed: "驗證金鑰失敗。" passkeyVerificationSucceededButPasswordlessLoginDisabled: "雖然驗證金鑰成功,但是無密碼登入的方式是停用的。" timeTravel: "時光機" timeTravelDescription: "回到指定的日期" +pariPlusNoteSettings: "Pari Plus! 的貼文設定" autoTranslateButton: "在不同語言的帖文上顯示翻譯功能" +showDetailTimeWhenHover: "長按帖文時間戳記時展開詳細時間" +noteClickToOpen: "點擊展開帖文詳情" messageToFollower: "給追隨者的訊息" target: "目標 " testCaptchaWarning: "此功能用於 CAPTCHA 的測試。請勿在正式環境中使用。" diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index fa92346da..1930cf277 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -45,14 +45,14 @@ SPDX-License-Identifier: AGPL-3.0-only -
+
-
- -
- - -
+
+ +
+ + +

@@ -219,6 +219,7 @@ import { isEnabledUrlPreview } from '@/instance.js'; import { type Keymap } from '@/scripts/hotkey.js'; import { focusPrev, focusNext } from '@/scripts/focus.js'; import { getAppearNote } from '@/scripts/get-appear-note.js'; +import { useRouter } from '@/router/supplier.js'; import { miLocalStorage } from '@/local-storage.js'; import detectLanguage from '@/scripts/detect-language.js'; @@ -238,6 +239,8 @@ const emit = defineEmits<{ (ev: 'removeReaction', emoji: string): void; }>(); +const router = useRouter(); + const inTimeline = inject('inTimeline', false); const inChannel = inject('inChannel', null); const currentClip = inject | null>('currentClip', null); @@ -431,6 +434,13 @@ if (!props.mock) { } } +function noteClickToOpen(id: string) { + const selection = document.getSelection(); + if (selection?.toString().length === 0) { + router.push(`/notes/${id}`); + } +} + function renote(viaKeyboard = false) { pleaseLogin(undefined, pleaseLoginContext.value); showMovedDialog(); diff --git a/packages/frontend/src/components/MkNoteHeader.vue b/packages/frontend/src/components/MkNoteHeader.vue index 311673e14..a0fe23e5a 100644 --- a/packages/frontend/src/components/MkNoteHeader.vue +++ b/packages/frontend/src/components/MkNoteHeader.vue @@ -28,8 +28,8 @@ SPDX-License-Identifier: AGPL-3.0-only

diff --git a/packages/frontend/src/pages/settings/index.vue b/packages/frontend/src/pages/settings/index.vue index f7ca651db..61cc73340 100644 --- a/packages/frontend/src/pages/settings/index.vue +++ b/packages/frontend/src/pages/settings/index.vue @@ -110,6 +110,11 @@ const menuDef = computed(() => [{ text: i18n.ts.theme, to: '/settings/theme', active: currentPage.value?.route.name === 'theme', + }, { + icon: 'ti ti-plus', + text: 'Pari Plus!', + to: '/settings/pari', + active: currentPage.value?.route.name === 'pari', }, { icon: 'ti ti-menu-2', text: i18n.ts.navbar, @@ -130,11 +135,6 @@ const menuDef = computed(() => [{ text: i18n.ts.plugins, to: '/settings/plugin', active: currentPage.value?.route.name === 'plugin', - }, { - icon: 'ti ti-plus', - text: 'Pari Plus', - to: '/settings/pari', - active: currentPage.value?.route.name === 'pari', }], }, { title: i18n.ts.otherSettings, diff --git a/packages/frontend/src/pages/settings/pari.vue b/packages/frontend/src/pages/settings/pari.vue index cf47fe60b..a33ec6e0d 100644 --- a/packages/frontend/src/pages/settings/pari.vue +++ b/packages/frontend/src/pages/settings/pari.vue @@ -5,7 +5,10 @@ SPDX-License-Identifier: AGPL-3.0-only @@ -17,9 +20,11 @@ import { defaultStore } from '@/store.js'; import MkSwitch from '@/components/MkSwitch.vue'; const autoTranslateButton = computed(defaultStore.makeGetterSetter('autoTranslateButton')); +const showDetailTimeWhenHover = computed(defaultStore.makeGetterSetter('showDetailTimeWhenHover')); +const noteClickToOpen = computed(defaultStore.makeGetterSetter('noteClickToOpen')); definePageMetadata(() => ({ - title: 'Pari Plus', + title: 'Pari Plus!', icon: 'ti ti-plus', })); diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index c35884975..78c8f6c79 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -507,6 +507,14 @@ export const defaultStore = markRaw(new Storage('base', { where: 'device', default: true, }, + showDetailTimeWhenHover: { + where: 'device', + default: true, + }, + noteClickToOpen: { + where: 'device', + default: false, + }, })); // TODO: 他のタブと永続化されたstateを同期