+ {{ t('home.changelog.about-nonversioned', 'Non-versioned commits are commits to the FrankerFaceZ repository not associated with a release build. They typically represent maintenance or contributions from the community that will be included in a subsequent release.') }}
+
+
+
+
@@ -60,6 +81,7 @@ export default {
data() {
return {
error: false,
+ nonversioned: false,
loading: false,
more: true,
commits: []
@@ -75,14 +97,16 @@ export default {
let message = commit.commit.message,
title = old_commit;
- const match = TITLE_MATCH.exec(message),
- date = new Date(commit.commit.author.date),
- active = commit.sha === window.FrankerFaceZ.version_info.commit;
+ const match = TITLE_MATCH.exec(message);
if ( match ) {
title = match[1];
message = message.slice(match[0].length);
- }
+ } else if ( ! this.nonversioned )
+ continue;
+
+ const date = new Date(commit.commit.author.date),
+ active = commit.sha === window.FrankerFaceZ.version_info.commit;
out.push({
title,
diff --git a/src/modules/metadata.jsx b/src/modules/metadata.jsx
index 5aff9382..abfacb32 100644
--- a/src/modules/metadata.jsx
+++ b/src/modules/metadata.jsx
@@ -126,7 +126,7 @@ export default class Metadata extends Module {
async popup(data, tip) {
const [permission, broadcast_id] = await Promise.all([
- navigator.permissions.query({name: 'clipboard-write'}).then(perm => perm?.state).catch(() => null),
+ navigator?.permissions?.query?.({name: 'clipboard-write'}).then(perm => perm?.state).catch(() => null),
data.getBroadcastID()
]);
if ( ! broadcast_id )
@@ -351,343 +351,8 @@ export default class Metadata extends Module {
for(const inst of legacy_bar.ChannelBar.instances)
legacy_bar.updateMetadata(inst, keys);
}
-
- /*const game_header = this.resolve('site.directory.game');
- if ( game_header ) {
- for(const inst of game_header.GameHeader.instances)
- game_header.updateMetadata(inst, keys);
- }*/
}
-
- /*async render(key, data, container, timers, refresh_fn) {
- if ( timers[key] )
- clearTimeout(timers[key]);
-
- let el = container.querySelector(`.ffz-stat[data-key="${key}"]`);
-
- const def = this.definitions[key],
- destroy = () => {
- if ( el ) {
- if ( el.tooltip )
- el.tooltip.destroy();
-
- if ( el.popper )
- el.popper.destroy();
-
- if ( el._ffz_destroy )
- el._ffz_destroy();
-
- el._ffz_destroy = el.tooltip = el.popper = null;
- el.remove();
- }
- };
-
- if ( ! def || (data._mt || 'channel') !== (def.type || 'channel') )
- return destroy();
-
- try {
- // Process the data if a setup method is defined.
- if ( def.setup )
- data = await def.setup.call(this, data);
-
- // Let's get refresh logic out of the way now.
- let refresh = maybe_call(def.refresh, this, data);
- let fade_in = maybe_call(def.fade_in, this, data);
-
- // Grab the element again in case it changed, somehow.
- el = container.querySelector(`.ffz-sidebar-stat[data-key="${key}"]`);
-
- if ( refresh && typeof refresh !== 'number' )
- refresh = 1000;
-
- if ( fade_in && typeof fade_in !== 'number' )
- fade_in = 1500;
-
- if ( fade_in && el && el._ffz_fading ) {
- // If we have a fade-in and we're still fading in, make sure to
- // update the metadata when that completes, if not sooner.
- const remaining = fade_in - (Date.now() - el._ffz_created);
- if ( remaining <= 0 ) {
- el._ffz_fading = false;
- el.classList.remove('ffz--fade-in');
-
- } else if ( ! refresh || remaining <= refresh )
- refresh = remaining;
- }
-
- if ( refresh )
- timers[key] = setTimeout(
- () => refresh_fn(key),
- typeof refresh === 'number' ? refresh : 1000
- );
-
- let stat, old_color, sub_el;
-
- const label = maybe_call(def.label, this, data);
-
- if ( ! label )
- return destroy();
-
- const tooltip = maybe_call(def.tooltip, this, data),
- subtitle = maybe_call(def.subtitle, this, data),
- order = maybe_call(def.order, this, data),
- color = maybe_call(def.color, this, data) || '';
-
- if ( ! el ) {
- let icon = maybe_call(def.icon, this, data);
- let button = false;
-
- el = ();
-
- if ( def.button !== false && (def.popup || def.click) ) {
- button = true;
-
- let btn, popup;
- let cls = maybe_call(def.button, this, data);
- if ( typeof cls !== 'string' )
- cls = cls ? 'ffz-button--hollow' : 'tw-button--text';
-
- if ( typeof icon === 'string' )
- icon = ();
-
- if ( def.popup && def.click ) {
- el.appendChild(