Remove code no longer needed
This commit is contained in:
parent
e766d6da69
commit
799c953b30
@ -2,20 +2,7 @@
|
|||||||
@import 'colors.scss';
|
@import 'colors.scss';
|
||||||
@import 'common.scss';
|
@import 'common.scss';
|
||||||
|
|
||||||
* {
|
|
||||||
font-family: 'Overpass';
|
|
||||||
}
|
|
||||||
|
|
||||||
.uw-ultrawidify-container-root {
|
.uw-ultrawidify-container-root {
|
||||||
// here's the defaults:
|
|
||||||
// all: initial;
|
|
||||||
// * {
|
|
||||||
// all: unset;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// here's things that we don't want as defaults
|
|
||||||
// (must come after the all: declaration, otherwise
|
|
||||||
// all: declaration overrides everything.)
|
|
||||||
|
|
||||||
// we put our UI _over_ site's player:
|
// we put our UI _over_ site's player:
|
||||||
z-index: 999999;
|
z-index: 999999;
|
||||||
|
@ -1,125 +0,0 @@
|
|||||||
import UI from './UI';
|
|
||||||
import VuexWebExtensions from 'vuex-webextensions';
|
|
||||||
import PlayerUiComponent from '../../../csui/PlayerUiBase.vue';
|
|
||||||
|
|
||||||
if (process.env.CHANNEL !== 'stable'){
|
|
||||||
console.info("Loading: PlayerUi");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class that handles in-player UI
|
|
||||||
*/
|
|
||||||
class PlayerUi extends UI {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates new in-player UI for ultrawidify
|
|
||||||
* @param {*} playerElement PlayerUI will be created as a child of this element
|
|
||||||
* @param {*} settings Extension settings (instanceof Settings)
|
|
||||||
*/
|
|
||||||
constructor (
|
|
||||||
playerElement,
|
|
||||||
settings,
|
|
||||||
eventBus,
|
|
||||||
videoData
|
|
||||||
) {
|
|
||||||
super(
|
|
||||||
'ultrawidifyUi',
|
|
||||||
PlayerUi.getStoreConfig(),
|
|
||||||
PlayerUi.getUiConfig(playerElement),
|
|
||||||
PlayerUi.getCommsConfig(),
|
|
||||||
{ eventBus, videoData }
|
|
||||||
);
|
|
||||||
|
|
||||||
this.settings = settings;
|
|
||||||
}
|
|
||||||
|
|
||||||
//#region constructor helpers
|
|
||||||
// we will move some things out of the constructor in order to keep things clean
|
|
||||||
static getStoreConfig() {
|
|
||||||
// NOTE: these are sample values and can be deleted. Currently, they're commented out
|
|
||||||
// so we won't have to look up the documentation in order to get them working
|
|
||||||
return {
|
|
||||||
plugins: [
|
|
||||||
VuexWebExtensions({
|
|
||||||
persistentStates: [
|
|
||||||
'showUi',
|
|
||||||
'resizerDebugData',
|
|
||||||
'playerDebugData',
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
state: {
|
|
||||||
showUi: true,
|
|
||||||
},
|
|
||||||
mutations: {
|
|
||||||
'uw-toggle-ui'(state) {
|
|
||||||
state['showUi'] = !state['showUi'];
|
|
||||||
},
|
|
||||||
'uw-set-ui-visible'(state, payload) {
|
|
||||||
state['showUi'] = payload;
|
|
||||||
},
|
|
||||||
'uw-set-player-debug-data'(state, payload) {
|
|
||||||
state['playerDebugData'] = payload;
|
|
||||||
},
|
|
||||||
'uw-set-resizer-debug-data'(state, payload) {
|
|
||||||
state['resizerDebugData'] = payload;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
actions: {
|
|
||||||
'uw-set-ui-visible'({commit}, payload) {
|
|
||||||
console.log('action!', commit, payload);
|
|
||||||
commit('uw-set-ui-visible', payload);
|
|
||||||
},
|
|
||||||
'uw-toggle-ui'({commit}) {
|
|
||||||
commit('uw-toggle-ui');
|
|
||||||
},
|
|
||||||
'uw-set-player-debug-data'({commit}, payload) {
|
|
||||||
commit('uw-set-player-debug-data', payload);
|
|
||||||
},
|
|
||||||
'uw-set-resizer-debug-data'({commit}, payload) {
|
|
||||||
commit('uw-set-resizer-debug-data', payload);
|
|
||||||
},
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
static getUiConfig(playerElement) {
|
|
||||||
return {
|
|
||||||
parentElement: playerElement,
|
|
||||||
component: PlayerUiComponent
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static getCommsConfig() {
|
|
||||||
// NOTE: these are sample values and can be deleted. Currently, they're commented out
|
|
||||||
// so we won't have to look up the documentation in order to get them working
|
|
||||||
return {
|
|
||||||
handlers: {
|
|
||||||
// 'show-notification': [(message) => this.showNotification(message)],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//#endregion
|
|
||||||
|
|
||||||
//#region lifecycle
|
|
||||||
replace(playerElement) {
|
|
||||||
try {
|
|
||||||
super.replace(PlayerUi.getUiConfig(playerElement));
|
|
||||||
} catch (e) {
|
|
||||||
this.logger.log('error', 'Couldn\'t replace player element for ui. Error:', e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//#endregion
|
|
||||||
|
|
||||||
//#region debug methods
|
|
||||||
updateDebugInfo(component, data) {
|
|
||||||
this.vuexStore?.dispatch(`uw-set-${component}-debug-data`, data);
|
|
||||||
}
|
|
||||||
//#endregion
|
|
||||||
}
|
|
||||||
|
|
||||||
if (process.env.CHANNEL !== 'stable'){
|
|
||||||
console.info("PlayerUi loaded");
|
|
||||||
}
|
|
||||||
|
|
||||||
export default PlayerUi;
|
|
@ -29,6 +29,13 @@ class UI {
|
|||||||
}
|
}
|
||||||
rootDiv.setAttribute('id', uwid);
|
rootDiv.setAttribute('id', uwid);
|
||||||
rootDiv.classList.add('uw-ultrawidify-container-root');
|
rootDiv.classList.add('uw-ultrawidify-container-root');
|
||||||
|
rootDiv.style.width = "100%";
|
||||||
|
rootDiv.style.height = "100%";
|
||||||
|
rootDiv.style.position = "absolute";
|
||||||
|
rootDiv.style.zIndex = "1000";
|
||||||
|
rootDiv.style.border = 0;
|
||||||
|
rootDiv.style.top = 0;
|
||||||
|
// rootDiv.style.pointerEvents = 'none';
|
||||||
|
|
||||||
if (this.uiConfig?.parentElement) {
|
if (this.uiConfig?.parentElement) {
|
||||||
this.uiConfig.parentElement.appendChild(rootDiv);
|
this.uiConfig.parentElement.appendChild(rootDiv);
|
||||||
|
@ -654,15 +654,6 @@ class PlayerData {
|
|||||||
showNotification(notificationId) {
|
showNotification(notificationId) {
|
||||||
// this.notificationService?.showNotification(notificationId);
|
// this.notificationService?.showNotification(notificationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* NOTE: this method needs to be deleted once Edge gets its shit together.
|
|
||||||
*/
|
|
||||||
showEdgeNotification() {
|
|
||||||
// if (BrowserDetect.isEdgeUA && !this.settings.active.mutedNotifications?.browserSpecific?.edge?.brokenDrm?.[window.hostname]) {
|
|
||||||
// this.ui = new PlayerUi(this.element, this.settings);
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (process.env.CHANNEL !== 'stable'){
|
if (process.env.CHANNEL !== 'stable'){
|
||||||
|
@ -1,15 +1,8 @@
|
|||||||
.uw-ultrawidify-container-root {
|
.uw-ultrawidify-container-root {
|
||||||
|
|
||||||
// here's the defaults:
|
|
||||||
all: initial;
|
|
||||||
* {
|
|
||||||
all: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
// here's things that we don't want as defaults
|
// here's things that we don't want as defaults
|
||||||
// (must come after the all: declaration, otherwise
|
// (must come after the all: declaration, otherwise
|
||||||
// all: declaration overrides everything.)
|
// all: declaration overrides everything.)
|
||||||
|
|
||||||
// we put our UI _over_ site's player:
|
// we put our UI _over_ site's player:
|
||||||
z-index: 999999;
|
z-index: 999999;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -23,46 +16,4 @@
|
|||||||
|
|
||||||
// we are click-through by default:
|
// we are click-through by default:
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
}
|
||||||
// defaults for some common elements:
|
|
||||||
p,h1,h2,h3,h4,h5,h6,div {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
h1,h2,h3,h4,h5,h6,b {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
h1 {
|
|
||||||
font-size: 2rem;
|
|
||||||
margin: .5rem 0;
|
|
||||||
}
|
|
||||||
h2 {
|
|
||||||
font-size: 1.69em;
|
|
||||||
margin: .42rem 0;
|
|
||||||
}
|
|
||||||
h3 {
|
|
||||||
font-size: 1.42rem;
|
|
||||||
margin: .25rem 0;
|
|
||||||
}
|
|
||||||
ul, ol {
|
|
||||||
display: block;
|
|
||||||
list-style: disc outside none;
|
|
||||||
margin: 1em 0;
|
|
||||||
padding: 0 0 0 40px;
|
|
||||||
}
|
|
||||||
ol {
|
|
||||||
list-style-type: decimal;
|
|
||||||
}
|
|
||||||
ul ul, ol ul {
|
|
||||||
list-style-type: circle;
|
|
||||||
// list-style-position: inside;
|
|
||||||
margin-left: 15px;
|
|
||||||
}
|
|
||||||
ol ol, ul ol {
|
|
||||||
list-style-type: lower-latin;
|
|
||||||
// list-style-position: inside;
|
|
||||||
margin-left: 15px;
|
|
||||||
}
|
|
||||||
li {
|
|
||||||
display: list-item;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user