mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
refactor: reduce code on settings/embeds
This commit is contained in:
parent
c3b2b4fcac
commit
465a46c8d4
@ -228,16 +228,19 @@
|
|||||||
},
|
},
|
||||||
"embeds": {
|
"embeds": {
|
||||||
"name": "Drittanbieter",
|
"name": "Drittanbieter",
|
||||||
"info-description": "Wenn du zustimmst werden in den Beiträgen aus der folgenden Liste an Providern Fremdcode von anderen Anbietern (Drittanbietern) in Form von eingebundenen Videos, Bilder oder Text automatisch eingebunden werden.",
|
"info-description": "Hier ist die Liste an Drittanbietern, deren Inhalte als Fremdcode z.B. in Form von eingebetteten Videos angezeigt werden kann:",
|
||||||
"description": "Du hast zugestimmt das in den Beiträgen aus der folgenden Liste an Providern Fremdcode von anderen Anbietern (Drittanbietern) in Form von eingebundenen Videos, Bilder oder Text automatisch eingebunden werden.",
|
"status": {
|
||||||
"statustext": "Momentan ist das automatische einbinden:",
|
"description": "Als Grundeinstellung für dich wird eingebetter Fremdcode von Drittanbietern",
|
||||||
"statuschange": "Einstellung ändern",
|
"disabled": {
|
||||||
"false": "Abgestellt",
|
"false": "zunächst nicht angezeigt",
|
||||||
"true": "Zugelassen",
|
"true": "sofort angezeigt"
|
||||||
"button-tofalse": "Abstellen",
|
},
|
||||||
"button-totrue": "dauerhaft zulassen",
|
"change": {
|
||||||
"third-party-false": "Es wird <b style='color:red'>kein</b> Service von Drittanbietern automatisch eingebunden.",
|
"question": "Soll eingebetter Fremdcode von Dritten für dich immer angezeigt werden?",
|
||||||
"third-party-true": "Das einbinden der Services von Drittanbietern ist <b style='color:red'>dauerhaft zugelassen</b> und gespeichert für komende Sitzungen."
|
"allow": "Na klar",
|
||||||
|
"deny": "Lieber nicht"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"organizations": {
|
"organizations": {
|
||||||
"name": "Meine Organisationen"
|
"name": "Meine Organisationen"
|
||||||
|
|||||||
@ -229,16 +229,19 @@
|
|||||||
},
|
},
|
||||||
"embeds": {
|
"embeds": {
|
||||||
"name": "Third party providers",
|
"name": "Third party providers",
|
||||||
"info-description": "If you agree, the posts from the following list of providers will automatically include third-party code from other providers (third parties) in the form of embedded videos, images, or text.",
|
"info-description": "Here is the list of third-party providers whose content can be displayed as third-party code, e.g. in the form of embedded videos.",
|
||||||
"description": "You have agreed that in the contributions from the following list of providers, foreign code from other providers (third parties) in the form of embedded videos, images or text automatically are embedded.",
|
"status": {
|
||||||
"statustext": "At the moment this is automatic embedding:",
|
"description": "As a default for you, embedded code of third-party providers is",
|
||||||
"statuschange": "Change setting",
|
"disabled": {
|
||||||
"false": "Turned off",
|
"false": "initially not displayed",
|
||||||
"true": "Admitted",
|
"true": "displayed immediately"
|
||||||
"button-tofalse": "turn-off",
|
},
|
||||||
"button-totrue": "allow permanently",
|
"change": {
|
||||||
"third-party-false": "It automatically integrates <b style='color:red'>no </b> third-party providers' service.",
|
"question": "Should embedded source code from third parties always be displayed to you?",
|
||||||
"third-party-true": "The inclusion of third-party services is <b style='color:red'>permanently allowed</b> and stored for future sessions."
|
"allow": "Sure",
|
||||||
|
"deny": "No thanks"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"organizations": {
|
"organizations": {
|
||||||
"name": "My Organizations"
|
"name": "My Organizations"
|
||||||
|
|||||||
@ -1,48 +1,31 @@
|
|||||||
<template>
|
<template>
|
||||||
<ds-card :header="$t('settings.embeds.name')">
|
<ds-card :header="$t('settings.embeds.name')">
|
||||||
<p>{{ $t('settings.embeds.statustext') }}</p>
|
<ds-section>
|
||||||
<ds-container width="large">
|
<ds-text>
|
||||||
<h3 v-html="allowEmbeds_h3" />
|
{{ $t('settings.embeds.status.description') }}
|
||||||
<div v-html="allowEmbeds_desc" />
|
<ds-text bold>
|
||||||
</ds-container>
|
{{ $t(`settings.embeds.status.disabled.${disabled}`) }}
|
||||||
<div>
|
</ds-text>
|
||||||
<ds-space />
|
.
|
||||||
<ds-space />
|
</ds-text>
|
||||||
<p>{{ $t('settings.embeds.statuschange') }}</p>
|
<ds-text>
|
||||||
<ds-container width="large">
|
{{ $t('settings.embeds.status.change.question') }}
|
||||||
<ds-flex>
|
</ds-text>
|
||||||
<ds-flex-item>
|
<ds-button @click="toFalse" :primary="!disabled" :disabled="!disabled">
|
||||||
<ds-button @click="toFalse" :disabled="!disabled">
|
{{ $t('settings.embeds.status.change.deny') }}
|
||||||
{{ $t('settings.embeds.button-tofalse') }}
|
</ds-button>
|
||||||
</ds-button>
|
<ds-button @click="toTrue" :primary="disabled" :disabled="disabled">
|
||||||
</ds-flex-item>
|
{{ $t('settings.embeds.status.change.allow') }}
|
||||||
<ds-flex-item>
|
</ds-button>
|
||||||
<ds-button @click="toTrue" secondary :disabled="disabled">
|
|
||||||
{{ $t('settings.embeds.button-totrue') }}
|
|
||||||
</ds-button>
|
|
||||||
</ds-flex-item>
|
|
||||||
</ds-flex>
|
|
||||||
</ds-container>
|
|
||||||
</div>
|
|
||||||
<ds-space />
|
|
||||||
<ds-space />
|
|
||||||
|
|
||||||
<div>
|
<p>{{ $t('settings.embeds.info-description') }}</p>
|
||||||
<p v-if="disabled">
|
<ul>
|
||||||
<b>{{ $t('settings.embeds.description') }}</b>
|
<li v-for="provider in providers" :key="provider.provider_name">
|
||||||
</p>
|
{{ provider.provider_name }},
|
||||||
<p v-else>{{ $t('settings.embeds.info-description') }}</p>
|
<small>{{ provider.provider_url }}</small>
|
||||||
<ds-container>
|
</li>
|
||||||
<ds-placeholder>
|
</ul>
|
||||||
<ul>
|
</ds-section>
|
||||||
<li v-for="provider in providers" :key="provider.provider_name">
|
|
||||||
{{ provider.provider_name }},
|
|
||||||
<small>{{ provider.provider_url }}</small>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</ds-placeholder>
|
|
||||||
</ds-container>
|
|
||||||
</div>
|
|
||||||
</ds-card>
|
</ds-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -106,7 +89,6 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
this.$toast.success(this.$t('site.thanks') + ' ' + this.allowEmbeds_h3)
|
|
||||||
this.disabled = !this.disabled
|
this.disabled = !this.disabled
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.$toast.error(err.message)
|
this.$toast.error(err.message)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user