allow editing trustedDomains and sync across devices
This commit is contained in:
parent
df0f682518
commit
ab7fd2a7b0
3 changed files with 25 additions and 0 deletions
8
locales/index.d.ts
vendored
8
locales/index.d.ts
vendored
|
|
@ -11976,6 +11976,14 @@ export interface Locale extends ILocale {
|
||||||
* Separate with spaces for an AND condition or with line breaks for an OR condition. Using surrounding keywords with slashes will turn them into a regular expression. If you write only the domain name, it will be a backward match.
|
* Separate with spaces for an AND condition or with line breaks for an OR condition. Using surrounding keywords with slashes will turn them into a regular expression. If you write only the domain name, it will be a backward match.
|
||||||
*/
|
*/
|
||||||
"trustedLinkUrlPatternsDescription": string;
|
"trustedLinkUrlPatternsDescription": string;
|
||||||
|
/**
|
||||||
|
* Link to external site warning exclusion list
|
||||||
|
*/
|
||||||
|
"trustedDomainsList": string;
|
||||||
|
/**
|
||||||
|
* Following links to these domains will not show a warning. Write one domain per line.
|
||||||
|
*/
|
||||||
|
"trustedDomainsListDescription": string;
|
||||||
/**
|
/**
|
||||||
* Mutuals
|
* Mutuals
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -829,6 +829,15 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</MkPreferenceContainer>
|
</MkPreferenceContainer>
|
||||||
</SearchMarker>
|
</SearchMarker>
|
||||||
|
|
||||||
|
<SearchMarker :keywords="['warn', 'external', 'url']">
|
||||||
|
<MkPreferenceContainer k="trustedDomains">
|
||||||
|
<MkTextarea v-model="trustedDomains" :debounce="true">
|
||||||
|
<template #label><SearchLabel>{{ i18n.ts.trustedDomainsList }}</SearchLabel></template>
|
||||||
|
<template #caption>{{ i18n.ts.trustedDomainsListDescription }}</template>
|
||||||
|
</MkTextarea>
|
||||||
|
</MkPreferenceContainer>
|
||||||
|
</SearchMarker>
|
||||||
|
|
||||||
<SearchMarker :keywords="['image', 'photo', 'picture', 'media', 'thumbnail', 'new', 'tab']">
|
<SearchMarker :keywords="['image', 'photo', 'picture', 'media', 'thumbnail', 'new', 'tab']">
|
||||||
<MkPreferenceContainer k="imageNewTab">
|
<MkPreferenceContainer k="imageNewTab">
|
||||||
<MkSwitch v-model="imageNewTab">
|
<MkSwitch v-model="imageNewTab">
|
||||||
|
|
@ -967,6 +976,7 @@ import FormLink from '@/components/form/link.vue';
|
||||||
import MkLink from '@/components/MkLink.vue';
|
import MkLink from '@/components/MkLink.vue';
|
||||||
import MkInfo from '@/components/MkInfo.vue';
|
import MkInfo from '@/components/MkInfo.vue';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
|
import MkTextarea from '@/components/MkTextarea.vue';
|
||||||
import { store } from '@/store.js';
|
import { store } from '@/store.js';
|
||||||
import * as os from '@/os.js';
|
import * as os from '@/os.js';
|
||||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||||
|
|
@ -1073,6 +1083,11 @@ const lang = prefer.model('lang');
|
||||||
const fontSize = prefer.model('fontSize');
|
const fontSize = prefer.model('fontSize');
|
||||||
const useSystemFont = prefer.model('useSystemFont');
|
const useSystemFont = prefer.model('useSystemFont');
|
||||||
const cornerRadius = prefer.model('cornerRadius');
|
const cornerRadius = prefer.model('cornerRadius');
|
||||||
|
const trustedDomains = prefer.model(
|
||||||
|
'trustedDomains',
|
||||||
|
(domainsList) => domainsList.join('\n'),
|
||||||
|
(domainsString) => domainsString.split('\n').map( d => d.trim() ).filter( x => x.length > 0),
|
||||||
|
);
|
||||||
|
|
||||||
watch([
|
watch([
|
||||||
hemisphere,
|
hemisphere,
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ deleteAndEditConfirm: "Are you sure you want to redraft this note? This means yo
|
||||||
openRemoteProfile: "Open remote profile"
|
openRemoteProfile: "Open remote profile"
|
||||||
trustedLinkUrlPatterns: "Link to external site warning exclusion list"
|
trustedLinkUrlPatterns: "Link to external site warning exclusion list"
|
||||||
trustedLinkUrlPatternsDescription: "Separate with spaces for an AND condition or with line breaks for an OR condition. Using surrounding keywords with slashes will turn them into a regular expression. If you write only the domain name, it will be a backward match."
|
trustedLinkUrlPatternsDescription: "Separate with spaces for an AND condition or with line breaks for an OR condition. Using surrounding keywords with slashes will turn them into a regular expression. If you write only the domain name, it will be a backward match."
|
||||||
|
trustedDomainsList: "Link to external site warning exclusion list"
|
||||||
|
trustedDomainsListDescription: "Following links to these domains will not show a warning. Write one domain per line."
|
||||||
mutuals: "Mutuals"
|
mutuals: "Mutuals"
|
||||||
isLocked: "Private account"
|
isLocked: "Private account"
|
||||||
isAdmin: "Administrator"
|
isAdmin: "Administrator"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue