From ca1a375f2d756b2a6c1eb649a95071bf3f5bde9e Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Tue, 17 Dec 2024 02:02:49 +0100 Subject: [PATCH] Limit when in-player UI shows. Add self-expiring menu options that takes you to the proposed, not-yet-implemented UI settings screen --- package-lock.json | 2 +- package.json | 2 +- src/common/interfaces/SettingsInterface.ts | 11 ++- src/csui/PlayerOverlay.vue | 88 +++++++++++++++++-- src/csui/src/PlayerUiPanels/AboutPanel.vue | 20 +---- .../src/PlayerUiPanels/ChangelogPanel.vue | 22 +---- src/csui/src/components/GhettoContextMenu.vue | 4 +- .../components/GhettoContextMenuOption.vue | 7 +- src/csui/src/utils/UIProbeMixin.js | 66 ++++++++++---- src/ext/conf/ExtConfPatches.ts | 15 +++- src/ext/conf/ExtensionConf.ts | 11 +++ src/ext/lib/uwui/UI.js | 57 +++++++++++- src/ext/lib/video-data/PlayerData.ts | 4 +- src/manifest.json | 2 +- 14 files changed, 236 insertions(+), 75 deletions(-) diff --git a/package-lock.json b/package-lock.json index 453ff6c..ad4c220 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ultrawidify", - "version": "6.0.1", + "version": "6.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 8b4745b..b52808f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ultrawidify", - "version": "6.0.1", + "version": "6.0.2", "description": "Aspect ratio fixer for youtube and other sites, with automatic aspect ratio detection. Supports ultrawide and other ratios.", "author": "Tamius Han ", "scripts": { diff --git a/src/common/interfaces/SettingsInterface.ts b/src/common/interfaces/SettingsInterface.ts index c136b60..8b1762b 100644 --- a/src/common/interfaces/SettingsInterface.ts +++ b/src/common/interfaces/SettingsInterface.ts @@ -213,7 +213,15 @@ interface SettingsInterface { ui: { inPlayer: { - enabled: boolean + enabled: boolean, + minEnabledWidth: number, // don't show UI if player is narrower than % of screen width + activation: 'trigger-zone' | 'player', // what needs to be hovered in order for UI to be visible + triggerZoneDimensions: { // how large the trigger zone is (relative to player size) + width: number + height: number, + offsetX: number, // fed to translateX(offsetX + '%'). Valid range [-100, 0] + offsetY: number // fed to translateY(offsetY + '%'). Valid range [-100, 100] + }, } } @@ -311,6 +319,7 @@ interface SettingsInterface { internal?: CommandInterface[], }, whatsNewChecked: boolean, + newFeatureTracker: any, // ----------------------------------------- // ::: SITE CONFIGURATION ::: // ----------------------------------------- diff --git a/src/csui/PlayerOverlay.vue b/src/csui/PlayerOverlay.vue index da09990..13459f5 100644 --- a/src/csui/PlayerOverlay.vue +++ b/src/csui/PlayerOverlay.vue @@ -1,12 +1,29 @@