Merge pull request #10847 from yupix/feat/client-dev-mode
feat: 開発者モードを追加
This commit is contained in:
@@ -145,7 +145,10 @@
|
||||
</FormSection>
|
||||
|
||||
<FormSection>
|
||||
<MkSwitch v-model="aiChanMode">{{ i18n.ts.aiChanMode }}</MkSwitch>
|
||||
<div class="_gaps_s">
|
||||
<MkSwitch v-model="aiChanMode">{{ i18n.ts.aiChanMode }}</MkSwitch>
|
||||
<MkSwitch v-model="devMode">{{ i18n.ts.devMode }}</MkSwitch>
|
||||
</div>
|
||||
</FormSection>
|
||||
|
||||
<FormLink to="/settings/deck">{{ i18n.ts.deck }}</FormLink>
|
||||
@@ -213,6 +216,7 @@ const enableInfiniteScroll = computed(defaultStore.makeGetterSetter('enableInfin
|
||||
const useReactionPickerForContextMenu = computed(defaultStore.makeGetterSetter('useReactionPickerForContextMenu'));
|
||||
const squareAvatars = computed(defaultStore.makeGetterSetter('squareAvatars'));
|
||||
const aiChanMode = computed(defaultStore.makeGetterSetter('aiChanMode'));
|
||||
const devMode = computed(defaultStore.makeGetterSetter('devMode'));
|
||||
const mediaListWithOneImageAppearance = computed(defaultStore.makeGetterSetter('mediaListWithOneImageAppearance'));
|
||||
const notificationPosition = computed(defaultStore.makeGetterSetter('notificationPosition'));
|
||||
const notificationStackAxis = computed(defaultStore.makeGetterSetter('notificationStackAxis'));
|
||||
|
@@ -7,7 +7,7 @@ import { instance } from '@/instance';
|
||||
import * as os from '@/os';
|
||||
import copyToClipboard from '@/scripts/copy-to-clipboard';
|
||||
import { url } from '@/config';
|
||||
import { noteActions } from '@/store';
|
||||
import { defaultStore, noteActions } from '@/store';
|
||||
import { miLocalStorage } from '@/local-storage';
|
||||
import { getUserMenu } from '@/scripts/get-user-menu';
|
||||
import { clipsCache } from '@/cache';
|
||||
@@ -396,5 +396,15 @@ export function getNoteMenu(props: {
|
||||
}))]);
|
||||
}
|
||||
|
||||
if (defaultStore.state.devMode) {
|
||||
menu = menu.concat([null, {
|
||||
icon: 'ti ti-id',
|
||||
text: i18n.ts.copyNoteId,
|
||||
action: () => {
|
||||
copyToClipboard(appearNote.id);
|
||||
},
|
||||
}]);
|
||||
}
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@ import { i18n } from '@/i18n';
|
||||
import copyToClipboard from '@/scripts/copy-to-clipboard';
|
||||
import { host } from '@/config';
|
||||
import * as os from '@/os';
|
||||
import { userActions } from '@/store';
|
||||
import { defaultStore, userActions } from '@/store';
|
||||
import { $i, iAmModerator } from '@/account';
|
||||
import { mainRouter } from '@/router';
|
||||
import { Router } from '@/nirax';
|
||||
@@ -240,6 +240,16 @@ export function getUserMenu(user: misskey.entities.UserDetailed, router: Router
|
||||
}]);
|
||||
}
|
||||
|
||||
if (defaultStore.state.devMode) {
|
||||
menu = menu.concat([null, {
|
||||
icon: 'ti ti-id',
|
||||
text: i18n.ts.copyUserId,
|
||||
action: () => {
|
||||
copyToClipboard(user.id);
|
||||
},
|
||||
}]);
|
||||
}
|
||||
|
||||
if ($i && meId === user.id) {
|
||||
menu = menu.concat([null, {
|
||||
icon: 'ti ti-pencil',
|
||||
|
@@ -314,6 +314,10 @@ export const defaultStore = markRaw(new Storage('base', {
|
||||
where: 'device',
|
||||
default: false,
|
||||
},
|
||||
devMode: {
|
||||
where: 'device',
|
||||
default: false,
|
||||
},
|
||||
mediaListWithOneImageAppearance: {
|
||||
where: 'device',
|
||||
default: 'expand' as 'expand' | '16_9' | '1_1' | '2_3',
|
||||
|
Reference in New Issue
Block a user