merge: Replace confusing "always show ads" setting with "hide ads" (!1134)
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/1134 Approved-by: dakkar <dakkar@thenautilus.net> Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
commit
0100bc68cc
3 changed files with 12 additions and 3 deletions
4
locales/index.d.ts
vendored
4
locales/index.d.ts
vendored
|
|
@ -13451,6 +13451,10 @@ export interface Locale extends ILocale {
|
|||
* Custom font size
|
||||
*/
|
||||
"customFontSize": string;
|
||||
/**
|
||||
* Hide ads
|
||||
*/
|
||||
"hideAds": string;
|
||||
}
|
||||
declare const locales: {
|
||||
[lang: string]: Locale;
|
||||
|
|
|
|||
|
|
@ -913,10 +913,10 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</MkFolder>
|
||||
</SearchMarker>
|
||||
|
||||
<SearchMarker :keywords="['ad', 'show']">
|
||||
<SearchMarker :keywords="['ad', 'show', 'hide']">
|
||||
<MkPreferenceContainer k="forceShowAds">
|
||||
<MkSwitch v-model="forceShowAds">
|
||||
<template #label><SearchLabel>{{ i18n.ts.forceShowAds }}</SearchLabel></template>
|
||||
<MkSwitch v-model="hideAds" :disabled="!$i.policies.canHideAds">
|
||||
<template #label><SearchLabel>{{ i18n.ts.hideAds }}</SearchLabel></template>
|
||||
</MkSwitch>
|
||||
</MkPreferenceContainer>
|
||||
</SearchMarker>
|
||||
|
|
@ -1097,6 +1097,9 @@ const trustedDomains = prefer.model(
|
|||
(domainsString) => domainsString.split('\n').map( d => d.trim() ).filter( x => x.length > 0),
|
||||
);
|
||||
|
||||
// Inverted to map between "hide ads" and "force show ads"
|
||||
const hideAds = prefer.model('forceShowAds', x => !x, x => !x);
|
||||
|
||||
watch([
|
||||
hemisphere,
|
||||
enableInfiniteScroll,
|
||||
|
|
|
|||
|
|
@ -675,3 +675,5 @@ clearCachedFilesOptions:
|
|||
keepFilesInUseDescription: "this option requires more complicated database queries, you may need to increase the value of db.extra.statement_timeout in the configuration file"
|
||||
|
||||
customFontSize: "Custom font size"
|
||||
|
||||
hideAds: "Hide ads"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue