Skip to content

Commit

Permalink
fix: 外部サイトへの警告が正常に動作しない
Browse files Browse the repository at this point in the history
  • Loading branch information
yupix committed Dec 29, 2024
1 parent dcb62dc commit 0c5e946
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/frontend/src/components/MkUrlWarningDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ function done(canceled: boolean, result?: Result): void { // eslint-disable-line

async function ok() {
const result = true;
if (!defaultStore.state.trustedDomains.includes(domain.value) && trustThisDomain.value) {
await defaultStore.set('trustedDomains', defaultStore.state.trustedDomains.concat(domain.value));
if (!defaultStore.state.trustedExternalWebsites.includes(domain.value) && trustThisDomain.value) {
await defaultStore.set('trustedExternalWebsites', defaultStore.state.trustedExternalWebsites.concat(domain.value));
}
done(false, result);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ const defaultStoreSaveKeys: (keyof typeof defaultStore['state'])[] = [
'defaultWithReplies',
'disableStreamingTimeline',
'useGroupedNotifications',
'trustedExternalWebsites',
'sound_masterVolume',
'sound_note',
'sound_noteMy',
Expand Down
4 changes: 4 additions & 0 deletions packages/frontend/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,10 @@ export const defaultStore = markRaw(new Storage('base', {
where: 'device',
default: true,
},
trustedExternalWebsites: {
where: 'device',
default: [] as string[],
},
useNativeUIForVideoAudioPlayer: {
where: 'device',
default: false,
Expand Down

0 comments on commit 0c5e946

Please sign in to comment.