enhance(frontend): フォローするかどうかの確認ダイアログを出せるように (#13723)

* feat(frontend): フォローするかどうかの確認ダイアログを出せるように

* Update Changelog
This commit is contained in:
かっこかり 2024-04-17 10:53:16 +09:00 committed by GitHub
parent 6f489b58a1
commit 977e2d2c09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 25 additions and 0 deletions

View File

@ -27,6 +27,7 @@
- Enhance: ノートについているリアクションの「もっと!」から、リアクションの一覧を表示できるように - Enhance: ノートについているリアクションの「もっと!」から、リアクションの一覧を表示できるように
- Enhance: リプライにて引用がある場合テキストが空でもノートできるように - Enhance: リプライにて引用がある場合テキストが空でもノートできるように
- 引用したいートのURLをコピーしリプライ投稿画面にペーストして添付することで達成できます - 引用したいートのURLをコピーしリプライ投稿画面にペーストして添付することで達成できます
- Enhance: フォローするかどうかの確認ダイアログを出せるように
- Fix: 一部のページ内リンクが正しく動作しない問題を修正 - Fix: 一部のページ内リンクが正しく動作しない問題を修正
- Fix: 周年の実績が閏年を考慮しない問題を修正 - Fix: 周年の実績が閏年を考慮しない問題を修正
- Fix: ローカルURLのプレビューポップアップが左上に表示される - Fix: ローカルURLのプレビューポップアップが左上に表示される

4
locales/index.d.ts vendored
View File

@ -4948,6 +4948,10 @@ export interface Locale extends ILocale {
* *
*/ */
"noDescription": string; "noDescription": string;
/**
*
*/
"alwaysConfirmFollow": string;
"_bubbleGame": { "_bubbleGame": {
/** /**
* *

View File

@ -1233,6 +1233,7 @@ useNativeUIForVideoAudioPlayer: "動画・音声の再生にブラウザのUIを
keepOriginalFilename: "オリジナルのファイル名を保持" keepOriginalFilename: "オリジナルのファイル名を保持"
keepOriginalFilenameDescription: "この設定をオフにすると、アップロード時にファイル名が自動でランダム文字列に置き換えられます。" keepOriginalFilenameDescription: "この設定をオフにすると、アップロード時にファイル名が自動でランダム文字列に置き換えられます。"
noDescription: "説明文はありません" noDescription: "説明文はありません"
alwaysConfirmFollow: "フォローの際常に確認する"
_bubbleGame: _bubbleGame:
howToPlay: "遊び方" howToPlay: "遊び方"

View File

@ -93,6 +93,18 @@ async function onClick() {
userId: props.user.id, userId: props.user.id,
}); });
} else { } else {
if (defaultStore.state.alwaysConfirmFollow) {
const { canceled } = await os.confirm({
type: 'question',
text: i18n.tsx.followConfirm({ name: props.user.name || props.user.username }),
});
if (canceled) {
wait.value = false;
return;
}
}
if (hasPendingFollowRequestFromYou.value) { if (hasPendingFollowRequestFromYou.value) {
await misskeyApi('following/requests/cancel', { await misskeyApi('following/requests/cancel', {
userId: props.user.id, userId: props.user.id,

View File

@ -165,6 +165,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkSwitch v-model="keepScreenOn">{{ i18n.ts.keepScreenOn }}</MkSwitch> <MkSwitch v-model="keepScreenOn">{{ i18n.ts.keepScreenOn }}</MkSwitch>
<MkSwitch v-model="disableStreamingTimeline">{{ i18n.ts.disableStreamingTimeline }}</MkSwitch> <MkSwitch v-model="disableStreamingTimeline">{{ i18n.ts.disableStreamingTimeline }}</MkSwitch>
<MkSwitch v-model="enableHorizontalSwipe">{{ i18n.ts.enableHorizontalSwipe }}</MkSwitch> <MkSwitch v-model="enableHorizontalSwipe">{{ i18n.ts.enableHorizontalSwipe }}</MkSwitch>
<MkSwitch v-model="alwaysConfirmFollow">{{ i18n.ts.alwaysConfirmFollow }}</MkSwitch>
</div> </div>
<MkSelect v-model="serverDisconnectedBehavior"> <MkSelect v-model="serverDisconnectedBehavior">
<template #label>{{ i18n.ts.whenServerDisconnected }}</template> <template #label>{{ i18n.ts.whenServerDisconnected }}</template>
@ -310,6 +311,7 @@ const useGroupedNotifications = computed(defaultStore.makeGetterSetter('useGroup
const enableSeasonalScreenEffect = computed(defaultStore.makeGetterSetter('enableSeasonalScreenEffect')); const enableSeasonalScreenEffect = computed(defaultStore.makeGetterSetter('enableSeasonalScreenEffect'));
const enableHorizontalSwipe = computed(defaultStore.makeGetterSetter('enableHorizontalSwipe')); const enableHorizontalSwipe = computed(defaultStore.makeGetterSetter('enableHorizontalSwipe'));
const useNativeUIForVideoAudioPlayer = computed(defaultStore.makeGetterSetter('useNativeUIForVideoAudioPlayer')); const useNativeUIForVideoAudioPlayer = computed(defaultStore.makeGetterSetter('useNativeUIForVideoAudioPlayer'));
const alwaysConfirmFollow = computed(defaultStore.makeGetterSetter('alwaysConfirmFollow'));
watch(lang, () => { watch(lang, () => {
miLocalStorage.setItem('lang', lang.value as string); miLocalStorage.setItem('lang', lang.value as string);
@ -351,6 +353,7 @@ watch([
keepScreenOn, keepScreenOn,
disableStreamingTimeline, disableStreamingTimeline,
enableSeasonalScreenEffect, enableSeasonalScreenEffect,
alwaysConfirmFollow,
], async () => { ], async () => {
await reloadAsk(); await reloadAsk();
}); });

View File

@ -450,6 +450,10 @@ export const defaultStore = markRaw(new Storage('base', {
where: 'device', where: 'device',
default: true, default: true,
}, },
alwaysConfirmFollow: {
where: 'device',
default: true,
},
sound_masterVolume: { sound_masterVolume: {
where: 'device', where: 'device',