mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-13 01:20:54 +00:00
4.4.1
* Added: `Current Channel` rule for profiles, to match all pages associated with a certain channel without needing many page rules. * Fixed: Unreadable text in light theme when importing a profile. * Changed: Display a matching page URL in the `Current Page` rule for profiles. * Changed: Do not display an inactive profile warning on the Add-Ons settings page, since those are not affected by profiles. * Changed: Update Vue to a more recent version. * Maintenance: Update the chat types enum based on the latest version of Twitch. * API Added: `TwitchData` module (`site.twitch_data`) for querying Twitch's API for data.
This commit is contained in:
parent
c34b7e30e2
commit
275248ca36
24 changed files with 819 additions and 88 deletions
|
@ -8,7 +8,7 @@
|
|||
<select
|
||||
:id="'page$' + id"
|
||||
v-model="value.data.route"
|
||||
class="tw-flex-grow-1 tw-border-radius-medium tw-font-size-6 tw-pd-x-1 tw-pd-y-05 tw-select"
|
||||
class="tw-flex-grow-1 tw-mg-l-1 tw-border-radius-medium tw-font-size-6 tw-pd-x-1 tw-pd-y-05 tw-select"
|
||||
>
|
||||
<option
|
||||
v-for="(route, key) in routes"
|
||||
|
@ -21,10 +21,18 @@
|
|||
</select>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-if="parts && parts.length"
|
||||
class="tw-border-t tw-mg-t-05"
|
||||
>
|
||||
<div class="tw-border-t tw-mg-t-05">
|
||||
<div class="tw-pd-y-05">
|
||||
<t-list
|
||||
phrase="setting.filter.page.url"
|
||||
default="URL: {url}"
|
||||
>
|
||||
<template #url>
|
||||
<span class="tw-c-text-alt">{{ url }}</span>
|
||||
</template>
|
||||
</t-list>
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-for="part in parts"
|
||||
:key="part.key"
|
||||
|
@ -37,7 +45,7 @@
|
|||
<input
|
||||
:id="'page$' + id + '$part-' + part.key"
|
||||
v-model="value.data.values[part.key]"
|
||||
class="tw-flex-grow-1 tw-border-radius-medium tw-font-size-6 tw-pd-x-1 tw-pd-y-05 tw-input"
|
||||
class="tw-mg-l-1 tw-flex-grow-1 tw-border-radius-medium tw-font-size-6 tw-pd-x-1 tw-pd-y-05 tw-input"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -66,6 +74,25 @@ export default {
|
|||
return this.routes[this.value.data.route];
|
||||
},
|
||||
|
||||
url() {
|
||||
if ( ! this.route )
|
||||
return null;
|
||||
|
||||
const parts = {};
|
||||
|
||||
for(const part of this.parts) {
|
||||
const value = this.value.data.values[part.key];
|
||||
parts[part.key] = value || `<${part.key}${part.optional ? '*' : ''}>`;
|
||||
}
|
||||
|
||||
try {
|
||||
return decodeURI(new URL(this.route.url(parts), location));
|
||||
} catch(err) {
|
||||
console.error(err);
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
parts() {
|
||||
const out = [];
|
||||
if ( ! this.route || ! this.route.parts )
|
||||
|
@ -78,7 +105,8 @@ export default {
|
|||
out.push({
|
||||
key: part.name,
|
||||
i18n: `settings.filter.page.route.${this.route.name}.${part.name}`,
|
||||
title: name[0].toLocaleUpperCase() + name.substr(1)
|
||||
title: name[0].toLocaleUpperCase() + name.substr(1),
|
||||
optional: part.optional
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue