mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-28 03:03:47 +02:00
Overlay notification opacity
This commit is contained in:
20
src/vr.js
20
src/vr.js
@@ -166,7 +166,8 @@ Vue.component('marquee-text', MarqueeText);
|
||||
onlineForTimer: '',
|
||||
wristFeed: [],
|
||||
devices: [],
|
||||
deviceCount: 0
|
||||
deviceCount: 0,
|
||||
notificationOpacity: 100
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
@@ -203,6 +204,10 @@ Vue.component('marquee-text', MarqueeText);
|
||||
this.cpuUsageEnabled || this.pcUptimeEnabled
|
||||
);
|
||||
}
|
||||
if (this.config.notificationOpacity !== this.notificationOpacity) {
|
||||
this.notificationOpacity = this.config.notificationOpacity;
|
||||
this.setNotyOpacity(this.notificationOpacity);
|
||||
}
|
||||
};
|
||||
|
||||
$app.methods.updateOnlineFriendCount = function (count) {
|
||||
@@ -272,6 +277,19 @@ Vue.component('marquee-text', MarqueeText);
|
||||
});
|
||||
};
|
||||
|
||||
$app.methods.setNotyOpacity = function (value) {
|
||||
var opacity = parseFloat(value / 100).toFixed(2);
|
||||
let element = document.getElementById('noty-opacity');
|
||||
if (!element) {
|
||||
document.body.insertAdjacentHTML(
|
||||
'beforeend',
|
||||
`<style id="noty-opacity">.noty_layout { opacity: ${opacity}; }</style>`
|
||||
);
|
||||
element = document.getElementById('noty-opacity');
|
||||
}
|
||||
element.innerHTML = `.noty_layout { opacity: ${opacity}; }`;
|
||||
};
|
||||
|
||||
$app.methods.updateStatsLoop = async function () {
|
||||
try {
|
||||
this.currentTime = new Date()
|
||||
|
||||
Reference in New Issue
Block a user