mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-03 21:36:06 +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.isStartAtWindowsStartup = saveVRCXWindowOption;
|
||||||
$app.watch.isStartAsMinimizedState = saveVRCXWindowOption;
|
$app.watch.isStartAsMinimizedState = saveVRCXWindowOption;
|
||||||
$app.watch.isCloseToTray = 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 () {
|
API.$on('LOGIN', function () {
|
||||||
$app.currentUserTreeData = [];
|
$app.currentUserTreeData = [];
|
||||||
|
|||||||
@@ -514,6 +514,36 @@ html
|
|||||||
el-switch(v-model="overlayNotifications")
|
el-switch(v-model="overlayNotifications")
|
||||||
div(style="font-size:12px;margin-top:5px")
|
div(style="font-size:12px;margin-top:5px")
|
||||||
el-button(size="small" icon="el-icon-time" @click="promptNotificationTimeout()") Notification Timeout
|
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")
|
div(style="margin-top:30px")
|
||||||
span(style="font-weight:bold") Window
|
span(style="font-weight:bold") Window
|
||||||
div(style="font-size:12px;margin-top:5px")
|
div(style="font-size:12px;margin-top:5px")
|
||||||
|
|||||||
+18
-7
@@ -645,10 +645,8 @@ import webApiService from './service/webapi.js';
|
|||||||
$app.methods.updateSharedFeed = async function () {
|
$app.methods.updateSharedFeed = async function () {
|
||||||
// TODO: block mute hideAvatar unfriend
|
// TODO: block mute hideAvatar unfriend
|
||||||
this.isMinimalFeed = configRepository.getBool('VRCX_minimalFeed');
|
this.isMinimalFeed = configRepository.getBool('VRCX_minimalFeed');
|
||||||
|
var notificationPosition = configRepository.getString('VRCX_notificationPosition');
|
||||||
var notificationTimeout = configRepository.getString('VRCX_notificationTimeout');
|
var notificationTimeout = configRepository.getString('VRCX_notificationTimeout');
|
||||||
if (notificationTimeout == '' || isNaN(notificationTimeout)) {
|
|
||||||
notificationTimeout = 3000;
|
|
||||||
}
|
|
||||||
var theme = 'relax';
|
var theme = 'relax';
|
||||||
if (configRepository.getBool('isDarkMode') === true) {
|
if (configRepository.getBool('isDarkMode') === true) {
|
||||||
theme = 'sunset';
|
theme = 'sunset';
|
||||||
@@ -663,9 +661,10 @@ import webApiService from './service/webapi.js';
|
|||||||
this.feeds = feeds;
|
this.feeds = feeds;
|
||||||
|
|
||||||
if (this.appType === '2') {
|
if (this.appType === '2') {
|
||||||
|
var notificationJoinLeaveFilter = configRepository.getString('VRCX_notificationJoinLeaveFilter');
|
||||||
|
var notificationOnlineOfflineFilter = configRepository.getString('VRCX_notificationOnlineOfflineFilter');
|
||||||
var map = {};
|
var map = {};
|
||||||
_feeds.forEach((feed) => {
|
_feeds.forEach((feed) => {
|
||||||
if (feed.isFavorite) {
|
|
||||||
if (feed.type === 'OnPlayerJoined' ||
|
if (feed.type === 'OnPlayerJoined' ||
|
||||||
feed.type === 'OnPlayerLeft') {
|
feed.type === 'OnPlayerLeft') {
|
||||||
if (!map[feed.data] ||
|
if (!map[feed.data] ||
|
||||||
@@ -679,7 +678,6 @@ import webApiService from './service/webapi.js';
|
|||||||
map[feed.displayName] = feed.created_at;
|
map[feed.displayName] = feed.created_at;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (feed.type === 'invite' ||
|
if (feed.type === 'invite' ||
|
||||||
feed.type === 'requestInvite' ||
|
feed.type === 'requestInvite' ||
|
||||||
feed.type === 'friendRequest') {
|
feed.type === 'friendRequest') {
|
||||||
@@ -696,7 +694,8 @@ import webApiService from './service/webapi.js';
|
|||||||
if (configRepository.getBool('VRCX_overlayNotifications') === true) {
|
if (configRepository.getBool('VRCX_overlayNotifications') === true) {
|
||||||
var notys = [];
|
var notys = [];
|
||||||
this.feeds.forEach((feed) => {
|
this.feeds.forEach((feed) => {
|
||||||
if (feed.isFavorite) {
|
if (((notificationOnlineOfflineFilter === "Friends") && (feed.isFriend)) ||
|
||||||
|
((notificationOnlineOfflineFilter === "VIP") && (feed.isFavorite))) {
|
||||||
if (feed.type === 'Online' ||
|
if (feed.type === 'Online' ||
|
||||||
feed.type === 'Offline') {
|
feed.type === 'Offline') {
|
||||||
if (!map[feed.displayName] ||
|
if (!map[feed.displayName] ||
|
||||||
@@ -704,7 +703,12 @@ import webApiService from './service/webapi.js';
|
|||||||
map[feed.displayName] = feed.created_at;
|
map[feed.displayName] = feed.created_at;
|
||||||
notys.push(feed);
|
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') {
|
feed.type === 'OnPlayerLeft') {
|
||||||
if (!map[feed.data] ||
|
if (!map[feed.data] ||
|
||||||
map[feed.data] < feed.created_at) {
|
map[feed.data] < feed.created_at) {
|
||||||
@@ -736,6 +740,7 @@ import webApiService from './service/webapi.js';
|
|||||||
type: 'alert',
|
type: 'alert',
|
||||||
theme: theme,
|
theme: theme,
|
||||||
timeout: notificationTimeout,
|
timeout: notificationTimeout,
|
||||||
|
layout: notificationPosition,
|
||||||
text: `<strong>${noty.data}</strong> has joined`
|
text: `<strong>${noty.data}</strong> has joined`
|
||||||
}).show();
|
}).show();
|
||||||
break;
|
break;
|
||||||
@@ -744,6 +749,7 @@ import webApiService from './service/webapi.js';
|
|||||||
type: 'alert',
|
type: 'alert',
|
||||||
theme: theme,
|
theme: theme,
|
||||||
timeout: notificationTimeout,
|
timeout: notificationTimeout,
|
||||||
|
layout: notificationPosition,
|
||||||
text: `<strong>${noty.data}</strong> has left`
|
text: `<strong>${noty.data}</strong> has left`
|
||||||
}).show();
|
}).show();
|
||||||
break;
|
break;
|
||||||
@@ -752,6 +758,7 @@ import webApiService from './service/webapi.js';
|
|||||||
type: 'alert',
|
type: 'alert',
|
||||||
theme: theme,
|
theme: theme,
|
||||||
timeout: notificationTimeout,
|
timeout: notificationTimeout,
|
||||||
|
layout: notificationPosition,
|
||||||
text: `<strong>${noty.displayName}</strong> has logged in`
|
text: `<strong>${noty.displayName}</strong> has logged in`
|
||||||
}).show();
|
}).show();
|
||||||
break;
|
break;
|
||||||
@@ -760,6 +767,7 @@ import webApiService from './service/webapi.js';
|
|||||||
type: 'alert',
|
type: 'alert',
|
||||||
theme: theme,
|
theme: theme,
|
||||||
timeout: notificationTimeout,
|
timeout: notificationTimeout,
|
||||||
|
layout: notificationPosition,
|
||||||
text: `<strong>${noty.displayName}</strong> has logged out`
|
text: `<strong>${noty.displayName}</strong> has logged out`
|
||||||
}).show();
|
}).show();
|
||||||
break;
|
break;
|
||||||
@@ -768,6 +776,7 @@ import webApiService from './service/webapi.js';
|
|||||||
type: 'alert',
|
type: 'alert',
|
||||||
theme: theme,
|
theme: theme,
|
||||||
timeout: notificationTimeout,
|
timeout: notificationTimeout,
|
||||||
|
layout: notificationPosition,
|
||||||
text: `<strong>${noty.senderUsername}</strong> has invited you to ${noty.details.worldName}`
|
text: `<strong>${noty.senderUsername}</strong> has invited you to ${noty.details.worldName}`
|
||||||
}).show();
|
}).show();
|
||||||
break;
|
break;
|
||||||
@@ -776,6 +785,7 @@ import webApiService from './service/webapi.js';
|
|||||||
type: 'alert',
|
type: 'alert',
|
||||||
theme: theme,
|
theme: theme,
|
||||||
timeout: notificationTimeout,
|
timeout: notificationTimeout,
|
||||||
|
layout: notificationPosition,
|
||||||
text: `<strong>${noty.senderUsername}</strong> has requested an invite`
|
text: `<strong>${noty.senderUsername}</strong> has requested an invite`
|
||||||
}).show();
|
}).show();
|
||||||
break;
|
break;
|
||||||
@@ -784,6 +794,7 @@ import webApiService from './service/webapi.js';
|
|||||||
type: 'alert',
|
type: 'alert',
|
||||||
theme: theme,
|
theme: theme,
|
||||||
timeout: notificationTimeout,
|
timeout: notificationTimeout,
|
||||||
|
layout: notificationPosition,
|
||||||
text: `<strong>${noty.senderUsername}</strong> has sent you a friend request`
|
text: `<strong>${noty.senderUsername}</strong> has sent you a friend request`
|
||||||
}).show();
|
}).show();
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user