mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 14:23:51 +02:00
More settings, too many settings
This commit is contained in:
@@ -5594,6 +5594,34 @@ import gameLogService from './service/gamelog.js'
|
||||
$app.watch.isStartAtWindowsStartup = saveVRCXWindowOption;
|
||||
$app.watch.isStartAsMinimizedState = saveVRCXWindowOption;
|
||||
$app.watch.isCloseToTray = saveVRCXWindowOption;
|
||||
if (!configRepository.getString('VRCX_notificationTimeout')) {
|
||||
$app.data.notificationTimeout = 3000;
|
||||
configRepository.setString('VRCX_notificationTimeout', $app.data.notificationTimeout);
|
||||
}
|
||||
if (!configRepository.getString('VRCX_notificationJoinLeaveFilter')) {
|
||||
$app.data.notificationJoinLeaveFilter = 'VIP';
|
||||
configRepository.setString('VRCX_notificationJoinLeaveFilter', $app.data.notificationJoinLeaveFilter);
|
||||
}
|
||||
if (!configRepository.getString('VRCX_notificationOnlineOfflineFilter')) {
|
||||
$app.data.notificationOnlineOfflineFilter = 'VIP';
|
||||
configRepository.setString('VRCX_notificationOnlineOfflineFilter', $app.data.notificationOnlineOfflineFilter);
|
||||
}
|
||||
if (!configRepository.getString('VRCX_notificationPosition')) {
|
||||
$app.data.notificationPosition = 'topCenter';
|
||||
configRepository.setString('VRCX_notificationPosition', $app.data.notificationPosition);
|
||||
}
|
||||
$app.data.notificationJoinLeaveFilter = configRepository.getString('VRCX_notificationJoinLeaveFilter');
|
||||
$app.methods.changeNotificationJoinLeaveFilter = function () {
|
||||
configRepository.setString('VRCX_notificationJoinLeaveFilter', this.notificationJoinLeaveFilter);
|
||||
};
|
||||
$app.data.notificationOnlineOfflineFilter = configRepository.getString('VRCX_notificationOnlineOfflineFilter');
|
||||
$app.methods.changeNotificationOnlineOfflineFilter = function () {
|
||||
configRepository.setString('VRCX_notificationOnlineOfflineFilter', this.notificationOnlineOfflineFilter);
|
||||
};
|
||||
$app.data.notificationPosition = configRepository.getString('VRCX_notificationPosition');
|
||||
$app.methods.changeNotificationPosition = function () {
|
||||
configRepository.setString('VRCX_notificationPosition', this.notificationPosition);
|
||||
};
|
||||
|
||||
API.$on('LOGIN', function () {
|
||||
$app.currentUserTreeData = [];
|
||||
|
||||
@@ -514,6 +514,36 @@ html
|
||||
el-switch(v-model="overlayNotifications")
|
||||
div(style="font-size:12px;margin-top:5px")
|
||||
el-button(size="small" icon="el-icon-time" @click="promptNotificationTimeout()") Notification Timeout
|
||||
div(style="margin-top:30px")
|
||||
span Join/Leave Notifications
|
||||
div(style="font-size:12px;margin-top:5px")
|
||||
el-radio-group(v-model="notificationJoinLeaveFilter" size="mini" style="margin-left:30px" @change="changeNotificationJoinLeaveFilter")
|
||||
el-radio(label="VIP" v-model="notificationJoinLeaveFilter") VIP
|
||||
el-radio(label="Friends" v-model="notificationJoinLeaveFilter") Friends
|
||||
el-radio(label="Everyone" v-model="notificationJoinLeaveFilter") Everyone
|
||||
el-radio(label="Off" v-model="notificationJoinLeaveFilter") Off
|
||||
div(style="margin-top:30px")
|
||||
span Online/Offline Notifications
|
||||
div(style="font-size:12px;margin-top:5px")
|
||||
el-radio-group(v-model="notificationOnlineOfflineFilter" size="mini" style="margin-left:30px" @change="changeNotificationOnlineOfflineFilter")
|
||||
el-radio(label="VIP" v-model="notificationOnlineOfflineFilter") VIP
|
||||
el-radio(label="Friends" v-model="notificationOnlineOfflineFilter") Friends
|
||||
el-radio(label="Off" v-model="notificationOnlineOfflineFilter") Off
|
||||
div(style="margin-top:30px")
|
||||
span Notification position
|
||||
div(style="font-size:12px;margin-top:5px")
|
||||
el-radio-group(v-model="notificationPosition" size="mini" style="margin-left:30px" @change="changeNotificationPosition")
|
||||
el-radio(label="top" v-model="notificationPosition") Top
|
||||
el-radio(label="topLeft" v-model="notificationPosition") Top Left
|
||||
el-radio(label="topCenter" v-model="notificationPosition") Top Center
|
||||
el-radio(label="topRight" v-model="notificationPosition") Top Right
|
||||
el-radio(label="center" v-model="notificationPosition") Center
|
||||
el-radio(label="centerLeft" v-model="notificationPosition") Center Left
|
||||
el-radio(label="centerRight" v-model="notificationPosition") Center Right
|
||||
el-radio(label="bottom" v-model="notificationPosition") Bottom
|
||||
el-radio(label="bottomLeft" v-model="notificationPosition") Bottom Left
|
||||
el-radio(label="bottomCenter" v-model="notificationPosition") Bottom Center
|
||||
el-radio(label="bottomRight" v-model="notificationPosition") Bottom Right
|
||||
div(style="margin-top:30px")
|
||||
span(style="font-weight:bold") Window
|
||||
div(style="font-size:12px;margin-top:5px")
|
||||
|
||||
@@ -645,10 +645,8 @@ import webApiService from './service/webapi.js';
|
||||
$app.methods.updateSharedFeed = async function () {
|
||||
// TODO: block mute hideAvatar unfriend
|
||||
this.isMinimalFeed = configRepository.getBool('VRCX_minimalFeed');
|
||||
var notificationPosition = configRepository.getString('VRCX_notificationPosition');
|
||||
var notificationTimeout = configRepository.getString('VRCX_notificationTimeout');
|
||||
if (notificationTimeout == '' || isNaN(notificationTimeout)) {
|
||||
notificationTimeout = 3000;
|
||||
}
|
||||
var theme = 'relax';
|
||||
if (configRepository.getBool('isDarkMode') === true) {
|
||||
theme = 'sunset';
|
||||
@@ -663,21 +661,21 @@ import webApiService from './service/webapi.js';
|
||||
this.feeds = feeds;
|
||||
|
||||
if (this.appType === '2') {
|
||||
var notificationJoinLeaveFilter = configRepository.getString('VRCX_notificationJoinLeaveFilter');
|
||||
var notificationOnlineOfflineFilter = configRepository.getString('VRCX_notificationOnlineOfflineFilter');
|
||||
var map = {};
|
||||
_feeds.forEach((feed) => {
|
||||
if (feed.isFavorite) {
|
||||
if (feed.type === 'OnPlayerJoined' ||
|
||||
feed.type === 'OnPlayerLeft') {
|
||||
if (!map[feed.data] ||
|
||||
map[feed.data] < feed.created_at) {
|
||||
map[feed.data] = feed.created_at;
|
||||
}
|
||||
} else if (feed.type === 'Online' ||
|
||||
feed.type === 'Offline') {
|
||||
if (!map[feed.displayName] ||
|
||||
map[feed.displayName] < feed.created_at) {
|
||||
map[feed.displayName] = feed.created_at;
|
||||
}
|
||||
if (feed.type === 'OnPlayerJoined' ||
|
||||
feed.type === 'OnPlayerLeft') {
|
||||
if (!map[feed.data] ||
|
||||
map[feed.data] < feed.created_at) {
|
||||
map[feed.data] = feed.created_at;
|
||||
}
|
||||
} else if (feed.type === 'Online' ||
|
||||
feed.type === 'Offline') {
|
||||
if (!map[feed.displayName] ||
|
||||
map[feed.displayName] < feed.created_at) {
|
||||
map[feed.displayName] = feed.created_at;
|
||||
}
|
||||
}
|
||||
if (feed.type === 'invite' ||
|
||||
@@ -696,7 +694,8 @@ import webApiService from './service/webapi.js';
|
||||
if (configRepository.getBool('VRCX_overlayNotifications') === true) {
|
||||
var notys = [];
|
||||
this.feeds.forEach((feed) => {
|
||||
if (feed.isFavorite) {
|
||||
if (((notificationOnlineOfflineFilter === "Friends") && (feed.isFriend)) ||
|
||||
((notificationOnlineOfflineFilter === "VIP") && (feed.isFavorite))) {
|
||||
if (feed.type === 'Online' ||
|
||||
feed.type === 'Offline') {
|
||||
if (!map[feed.displayName] ||
|
||||
@@ -704,7 +703,12 @@ import webApiService from './service/webapi.js';
|
||||
map[feed.displayName] = feed.created_at;
|
||||
notys.push(feed);
|
||||
}
|
||||
} else if (feed.type === 'OnPlayerJoined' ||
|
||||
}
|
||||
}
|
||||
if ((notificationJoinLeaveFilter === "Everyone") ||
|
||||
((notificationJoinLeaveFilter === "Friends") && (feed.isFriend)) ||
|
||||
((notificationJoinLeaveFilter === "VIP") && (feed.isFavorite))) {
|
||||
if (feed.type === 'OnPlayerJoined' ||
|
||||
feed.type === 'OnPlayerLeft') {
|
||||
if (!map[feed.data] ||
|
||||
map[feed.data] < feed.created_at) {
|
||||
@@ -736,6 +740,7 @@ import webApiService from './service/webapi.js';
|
||||
type: 'alert',
|
||||
theme: theme,
|
||||
timeout: notificationTimeout,
|
||||
layout: notificationPosition,
|
||||
text: `<strong>${noty.data}</strong> has joined`
|
||||
}).show();
|
||||
break;
|
||||
@@ -744,6 +749,7 @@ import webApiService from './service/webapi.js';
|
||||
type: 'alert',
|
||||
theme: theme,
|
||||
timeout: notificationTimeout,
|
||||
layout: notificationPosition,
|
||||
text: `<strong>${noty.data}</strong> has left`
|
||||
}).show();
|
||||
break;
|
||||
@@ -752,6 +758,7 @@ import webApiService from './service/webapi.js';
|
||||
type: 'alert',
|
||||
theme: theme,
|
||||
timeout: notificationTimeout,
|
||||
layout: notificationPosition,
|
||||
text: `<strong>${noty.displayName}</strong> has logged in`
|
||||
}).show();
|
||||
break;
|
||||
@@ -760,6 +767,7 @@ import webApiService from './service/webapi.js';
|
||||
type: 'alert',
|
||||
theme: theme,
|
||||
timeout: notificationTimeout,
|
||||
layout: notificationPosition,
|
||||
text: `<strong>${noty.displayName}</strong> has logged out`
|
||||
}).show();
|
||||
break;
|
||||
@@ -768,6 +776,7 @@ import webApiService from './service/webapi.js';
|
||||
type: 'alert',
|
||||
theme: theme,
|
||||
timeout: notificationTimeout,
|
||||
layout: notificationPosition,
|
||||
text: `<strong>${noty.senderUsername}</strong> has invited you to ${noty.details.worldName}`
|
||||
}).show();
|
||||
break;
|
||||
@@ -776,6 +785,7 @@ import webApiService from './service/webapi.js';
|
||||
type: 'alert',
|
||||
theme: theme,
|
||||
timeout: notificationTimeout,
|
||||
layout: notificationPosition,
|
||||
text: `<strong>${noty.senderUsername}</strong> has requested an invite`
|
||||
}).show();
|
||||
break;
|
||||
@@ -784,6 +794,7 @@ import webApiService from './service/webapi.js';
|
||||
type: 'alert',
|
||||
theme: theme,
|
||||
timeout: notificationTimeout,
|
||||
layout: notificationPosition,
|
||||
text: `<strong>${noty.senderUsername}</strong> has sent you a friend request`
|
||||
}).show();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user