Wolfgang Huß b8141c2e6e
🧘🏼 [Simulation] Brand reformer network first step – v2 (#8384)
* Refine locals of some internal pages headlines

* Create page 'legacy information'

* Move filter button into menu

* Refine page 'legacy information'

* Create internal page 'code-of-conduct.html'

* Refine internal page 'code-of-conduct.html'

* Refine page 'legacy information'

* Create internal page 'imprint.html'

* Create internal page 'faq.html'

* Create internal page 'support.html'

* Refine internal page 'faq.html'

* Refine internal page 'imprint.html'

* Move parts of internal page 'data-privacy.html' to 'terms-and-conditions.html'

* Refine internal page 'data-privacy.html'

* Fix tool tip text

* Fix 'email' -> 'e-mail'

* Rename title of organization footer item

- Remove donation page from footer

* Change 'Reformer.Network' to 'Reformer.network'

* Create internal page 'organization.html'

* Refine internal pages

* Translate internal pages

* Change brandings $secondary-color from 'rgb(244, 142, 0)' to 'rgb(239, 123, 0)'

* Change branding $color-primary-active from 'rgb(95, 97, 92)' to 'rgb(135, 135, 135)'

* Move commented font commands in '_branding.scss'

* Set $color-tertiary-light and ribbon colors in '_branding.scss'

* Refactor branding of post ribbons

* Refactor Logos

* Change branding $secondary-color from 'rgb(239, 123, 0)' to 'rgb(239, 124, 0)'

* Refactor colors after the designer suggestions - first step

* Change diverse collorings

- Change border color
- Change plus button
- Change hashtag color
- Change footer link hover
- Change number count color
- Change input border color

* Add font Inter

* Use font Inter

* Make font branding work

* Hover effect for user teaser

* Syncronize 'metadata.ts' with webapp

* Refine e-mail notifications

* Adjust notification settings buttons

* Refine third party setting

* Fix post teaser counter icon tooltips translations

* Refine e-mail notifications

* Refine third party setting

* Add link hover to all internal pages

* Set font family to Inter

- Cleanup

* Set background, color, and font weight of user avatar

---------

Co-authored-by: Maximilian Harz <maxharz@gmail.com>
2025-04-29 10:08:38 +02:00

115 lines
2.9 KiB
Vue

<template>
<base-card>
<h2 class="title">{{ $t('settings.embeds.name') }}</h2>
<ds-section>
<ds-text>
{{ $t('settings.embeds.status.description') }}
<ds-text bold>
<template v-if="disabled">
{{ $t(`settings.embeds.status.disabled.on`) }}
</template>
<template v-else>
{{ $t(`settings.embeds.status.disabled.off`) }}
</template>
</ds-text>
.
</ds-text>
<ds-text>
{{ $t('settings.embeds.status.change.question') }}
</ds-text>
<ds-space margin-top="small" margin-bottom="base">
<base-button @click="submit" :filled="!disabled" :disabled="!disabled">
{{ $t('settings.embeds.status.change.deny') }}
</base-button>
<base-button @click="submit" :filled="disabled" :disabled="disabled">
{{ $t('settings.embeds.status.change.allow') }}
</base-button>
</ds-space>
<h3>{{ $t('settings.embeds.info-description') }}</h3>
<ds-space margin="small">
<ul>
<li
v-for="provider in providers"
:key="provider.provider_name"
class="provider-list-item"
>
<ds-text>
{{ provider.provider_name }},
<small>{{ provider.provider_url }}</small>
</ds-text>
</li>
</ul>
</ds-space>
</ds-section>
</base-card>
</template>
<script>
import axios from 'axios'
import { mapGetters, mapMutations } from 'vuex'
import { updateUserMutation } from '~/graphql/User.js'
import scrollToContent from './scroll-to-content.js'
export default {
mixins: [scrollToContent],
head() {
return {
title: this.$t('settings.embeds.name'),
}
},
computed: {
...mapGetters({
currentUser: 'auth/user',
}),
},
data() {
return {
disabled: null,
providers: [],
}
},
mounted() {
axios.get('/api/providers.json').then((response) => {
this.providers = response.data
})
if (this.currentUser.allowEmbedIframes) this.disabled = this.currentUser.allowEmbedIframes
},
methods: {
...mapMutations({
setCurrentUser: 'auth/SET_USER',
}),
async submit() {
try {
await this.$apollo.mutate({
mutation: updateUserMutation(),
variables: {
id: this.currentUser.id,
allowEmbedIframes: !this.disabled,
},
update: (store, { data: { UpdateUser } }) => {
const { allowEmbedIframes } = UpdateUser
this.setCurrentUser({
...this.currentUser,
allowEmbedIframes,
})
},
})
this.disabled = !this.disabled
} catch (err) {
this.$toast.error(err.message)
}
},
},
}
</script>
<style lang="scss" scoped>
button + button {
margin-left: $space-x-small;
}
.provider-list-item {
margin-top: $space-xx-small;
margin-bottom: $space-xx-small;
}
</style>