mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-02 09:08:32 +00:00
4.64.0
This update adds a check that forces users to agree to YouTube's Terms of Service before they are able to view rich embeds for YouTube links. I personally do not agree with this, but we were required to implement this in order to maintain access to YouTube's API. Actually, they said "API Clients must state in their own terms of use that, by using those API Clients, users are agreeing to be bound by the YouTube Terms of Service." but that's obviously ridiculous for this use case. This is my compromise. Sorry for the inconvenience, everyone. This also comes with aesthetic tweaks to make YouTube's compliance team happy. Woo... * Added: Setting to display labels on highlighted chat messages giving the reason why the message was highlighted. * Added: System to force users to agree to a service's Terms of Service before displaying rich content from specific providers. So far this is only used by YouTube. * Changed: Made the background of highlighted words in chat messages slightly smaller. * Fixed: A few page elements in mod view not being themed correctly. * Fixed: Timestamps displaying with an hour when they obviously do not need to. * API Added: `main_menu:open` event for a general way to open the main menu. * API Added: Settings UI elements using components using the `provider-mixin` can now override the provider key they use by setting an `override_setting` value on their definition. * API Changed: The `chat.addHighlightReason(key, data, label)` method now takes an optional `label` parameter to set the text that appears on chat messages when the setting to display labels is enabled.
This commit is contained in:
parent
80931479c1
commit
6e78fd7cab
19 changed files with 528 additions and 47 deletions
67
src/modules/main_menu/components/tooltip-tos.vue
Normal file
67
src/modules/main_menu/components/tooltip-tos.vue
Normal file
|
@ -0,0 +1,67 @@
|
|||
<template lang="html">
|
||||
<section class="ffz--widget ffz--service-tos">
|
||||
<h4>{{ key }}</h4>
|
||||
<markdown class="tw-mg-b-05" :source="linkText" />
|
||||
<button
|
||||
v-if="hasAccepted"
|
||||
class="tw-button tw-button--disabled"
|
||||
disabled
|
||||
>
|
||||
<span class="tw-button__text">
|
||||
{{ t('tooltip.has-accepted', 'You have accepted the Terms of Service.') }}
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
v-else
|
||||
@click="accept"
|
||||
class="tw-button"
|
||||
>
|
||||
<span class="tw-button__text">
|
||||
{{ t('tooltip.accept-tos', 'Accept Terms of Service') }}
|
||||
</span>
|
||||
</button>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import ProviderMixin from '../provider-mixin';
|
||||
import { deep_copy } from 'utilities/object';
|
||||
|
||||
let last_id = 0;
|
||||
|
||||
export default {
|
||||
mixins: [ProviderMixin],
|
||||
props: ['item', 'context'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
id: last_id++,
|
||||
|
||||
key: this.item.item
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
linkText() {
|
||||
if ( this.data.i18n_links )
|
||||
return this.t(this.data.i18n_links, this.data.links);
|
||||
return this.data.links;
|
||||
},
|
||||
|
||||
hasAccepted() {
|
||||
return Array.isArray(this.value) && this.value.includes(this.key)
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
accept() {
|
||||
const val = Array.isArray(this.value) ? [...this.value] : [];
|
||||
val.push(this.key);
|
||||
this.set(val);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue