mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-01 16:48:32 +00:00
4.65.0
* Added: Two settings to improve the FFZ experience for users using their operating system's High Contrast mode. One setting allows you to opt Twitch out of high contrast mode, and the other (which is selectively enabled by default) loads a few more styles to make page elements appear more correctly. * Added: When using link cards to view a link to a Twitch clip, allow the clip to be played with an embedded player. * Changed: When displaying a tool-tip for a link, use the link's accent color along the side of the tool-tip for slightly more branding. * Changed: Make the prompt to accept the YouTube Terms of Service more subtle, and add an option to decline to the settings so it'll stop showing the link to settings altogether. * Changed: Update the icon for Discord in the icon font, and add an icon for TikTok.
This commit is contained in:
parent
6e78fd7cab
commit
5bafc824b1
25 changed files with 419 additions and 103 deletions
|
@ -2,24 +2,31 @@
|
|||
<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>
|
||||
<div v-if="hasAccepted">
|
||||
{{ t('tooltip.has-accepted', 'You have accepted the Terms of Service.') }}
|
||||
</div>
|
||||
<template v-else>
|
||||
<button
|
||||
@click="accept"
|
||||
class="tw-button tw-mg-b-05"
|
||||
>
|
||||
<span class="tw-button__text">
|
||||
{{ acceptText }}
|
||||
</span>
|
||||
</button>
|
||||
<button
|
||||
v-if="! declined"
|
||||
@click="reject"
|
||||
class="tw-button tw-button--text tw-block"
|
||||
>
|
||||
<span class="tw-button__text">
|
||||
{{ t('tooltip.decline-tos', 'I do not accept.') }}
|
||||
</span>
|
||||
</button>
|
||||
<div v-else>
|
||||
{{ t('tooltip.has-declined-tos', 'We won\'t ask you to accept the terms again, but you can still change your mind on this page.') }}
|
||||
</div>
|
||||
</template>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
|
@ -35,14 +42,27 @@ export default {
|
|||
props: ['item', 'context'],
|
||||
|
||||
data() {
|
||||
const chat = this.item.getChat();
|
||||
|
||||
return {
|
||||
id: last_id++,
|
||||
|
||||
declined: chat ? chat.hasDeclinedTerms(this.item.item) : false,
|
||||
|
||||
key: this.item.item
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
acceptText() {
|
||||
if ( this.data.i18n_accept )
|
||||
return this.t(this.data.i18n_accept, this.data.accept);
|
||||
else if ( this.data.accept )
|
||||
return this.data.accept;
|
||||
|
||||
return this.t('tooltip.accept-tos', 'Yes, I accept the Terms of Service.');
|
||||
},
|
||||
|
||||
linkText() {
|
||||
if ( this.data.i18n_links )
|
||||
return this.t(this.data.i18n_links, this.data.links);
|
||||
|
@ -59,6 +79,18 @@ export default {
|
|||
const val = Array.isArray(this.value) ? [...this.value] : [];
|
||||
val.push(this.key);
|
||||
this.set(val);
|
||||
},
|
||||
|
||||
reject() {
|
||||
if ( this.declined )
|
||||
return;
|
||||
|
||||
const chat = this.item.getChat();
|
||||
if ( ! chat )
|
||||
return;
|
||||
|
||||
this.declined = true;
|
||||
chat.declineTerms(this.key);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue