mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 22:33:50 +02:00
Change colour picker
This commit is contained in:
139
html/src/app.js
139
html/src/app.js
@@ -8,8 +8,6 @@ import Noty from 'noty';
|
||||
import Vue from 'vue';
|
||||
import VueLazyload from 'vue-lazyload';
|
||||
import {DataTables} from 'vue-data-tables';
|
||||
import VSwatches from 'vue-swatches';
|
||||
Vue.component('v-swatches', VSwatches);
|
||||
import ElementUI from 'element-ui';
|
||||
import locale from 'element-ui/lib/locale/lang/en';
|
||||
import {v4 as uuidv4} from 'uuid';
|
||||
@@ -8190,58 +8188,58 @@ speechSynthesis.getVoices();
|
||||
var timeSinceLastEvent = dtNow - Date.parse(dt);
|
||||
if (timeSinceLastEvent > this.photonLobbyTimeoutThreshold) {
|
||||
if (this.photonLobbyJointime.has(id)) {
|
||||
var {joinTime} = this.photonLobbyJointime.get(id);
|
||||
}
|
||||
if (!joinTime || joinTime + 120000 < dtNow) {
|
||||
// wait 2mins for user to load in
|
||||
hudTimeout.unshift({
|
||||
userId: this.getUserIdFromPhotonId(id),
|
||||
displayName: this.getDisplayNameFromPhotonId(id),
|
||||
time: Math.round(timeSinceLastEvent / 1000)
|
||||
});
|
||||
}
|
||||
var {joinTime} = this.photonLobbyJointime.get(id);
|
||||
}
|
||||
});
|
||||
if (this.photonLobbyTimeout.length > 0 || hudTimeout.length > 0) {
|
||||
hudTimeout.sort(function (a, b) {
|
||||
if (a.time > b.time) {
|
||||
return 1;
|
||||
}
|
||||
if (a.time < b.time) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
if (this.timeoutHudOverlay) {
|
||||
if (
|
||||
this.timeoutHudOverlayFilter === 'VIP' ||
|
||||
this.timeoutHudOverlayFilter === 'Friends'
|
||||
) {
|
||||
var filteredHudTimeout = [];
|
||||
hudTimeout.forEach((item) => {
|
||||
if (
|
||||
this.timeoutHudOverlayFilter === 'VIP' &&
|
||||
API.cachedFavoritesByObjectId.has(item.userId)
|
||||
) {
|
||||
filteredHudTimeout.push(item);
|
||||
} else if (
|
||||
this.timeoutHudOverlayFilter === 'Friends' &&
|
||||
this.friends.has(item.userId)
|
||||
) {
|
||||
filteredHudTimeout.push(item);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
var filteredHudTimeout = hudTimeout;
|
||||
}
|
||||
AppApi.ExecuteVrOverlayFunction(
|
||||
'updateHudTimeout',
|
||||
JSON.stringify(filteredHudTimeout)
|
||||
);
|
||||
if (!joinTime || joinTime + 120000 < dtNow) {
|
||||
// wait 2mins for user to load in
|
||||
hudTimeout.unshift({
|
||||
userId: this.getUserIdFromPhotonId(id),
|
||||
displayName: this.getDisplayNameFromPhotonId(id),
|
||||
time: Math.round(timeSinceLastEvent / 1000)
|
||||
});
|
||||
}
|
||||
this.photonLobbyTimeout = hudTimeout;
|
||||
this.getCurrentInstanceUserList();
|
||||
}
|
||||
});
|
||||
if (this.photonLobbyTimeout.length > 0 || hudTimeout.length > 0) {
|
||||
hudTimeout.sort(function (a, b) {
|
||||
if (a.time > b.time) {
|
||||
return 1;
|
||||
}
|
||||
if (a.time < b.time) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
if (this.timeoutHudOverlay) {
|
||||
if (
|
||||
this.timeoutHudOverlayFilter === 'VIP' ||
|
||||
this.timeoutHudOverlayFilter === 'Friends'
|
||||
) {
|
||||
var filteredHudTimeout = [];
|
||||
hudTimeout.forEach((item) => {
|
||||
if (
|
||||
this.timeoutHudOverlayFilter === 'VIP' &&
|
||||
API.cachedFavoritesByObjectId.has(item.userId)
|
||||
) {
|
||||
filteredHudTimeout.push(item);
|
||||
} else if (
|
||||
this.timeoutHudOverlayFilter === 'Friends' &&
|
||||
this.friends.has(item.userId)
|
||||
) {
|
||||
filteredHudTimeout.push(item);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
var filteredHudTimeout = hudTimeout;
|
||||
}
|
||||
AppApi.ExecuteVrOverlayFunction(
|
||||
'updateHudTimeout',
|
||||
JSON.stringify(filteredHudTimeout)
|
||||
);
|
||||
}
|
||||
this.photonLobbyTimeout = hudTimeout;
|
||||
this.getCurrentInstanceUserList();
|
||||
}
|
||||
this.photonBotCheck(dtNow);
|
||||
workerTimers.setTimeout(() => this.photonLobbyWatcher(), 500);
|
||||
};
|
||||
@@ -8617,8 +8615,8 @@ speechSynthesis.getVoices();
|
||||
var date = this.lastPortalList.get(portalId);
|
||||
var time = timeToText(Date.parse(gameLogDate) - date);
|
||||
this.addEntryPhotonEvent({
|
||||
photonId: senderId,
|
||||
text: `DeletedPortal ${time}`,
|
||||
photonId: senderId,
|
||||
text: `DeletedPortal ${time}`,
|
||||
created_at: gameLogDate
|
||||
});
|
||||
return;
|
||||
@@ -8627,14 +8625,14 @@ speechSynthesis.getVoices();
|
||||
if (this.lastPortalId) {
|
||||
this.lastPortalList.set(
|
||||
this.lastPortalId,
|
||||
Date.parse(gameLogDate)
|
||||
);
|
||||
this.lastPortalId = '';
|
||||
}
|
||||
var displayName = this.getDisplayNameFromPhotonId(senderId);
|
||||
if (displayName) {
|
||||
var ref1 = {
|
||||
id: this.getUserIdFromPhotonId(senderId),
|
||||
Date.parse(gameLogDate)
|
||||
);
|
||||
this.lastPortalId = '';
|
||||
}
|
||||
var displayName = this.getDisplayNameFromPhotonId(senderId);
|
||||
if (displayName) {
|
||||
var ref1 = {
|
||||
id: this.getUserIdFromPhotonId(senderId),
|
||||
displayName
|
||||
};
|
||||
this.portalQueue = 'skip';
|
||||
@@ -8691,8 +8689,8 @@ speechSynthesis.getVoices();
|
||||
}
|
||||
this.addEntryPhotonEvent({
|
||||
photonId: senderId,
|
||||
text,
|
||||
created_at: gameLogDate
|
||||
text,
|
||||
created_at: gameLogDate
|
||||
});
|
||||
} else {
|
||||
var eventType = '';
|
||||
@@ -11201,21 +11199,6 @@ speechSynthesis.getVoices();
|
||||
configRepository.getString('VRCX_trustColor')
|
||||
);
|
||||
|
||||
$app.data.trustColorSwatches = [
|
||||
'#CCCCCC',
|
||||
'#1778FF',
|
||||
'#2BCF5C',
|
||||
'#FF7B42',
|
||||
'#B18FFF',
|
||||
'#FFD000',
|
||||
'#FF69B4',
|
||||
'#ABCDEF',
|
||||
'#8143E6',
|
||||
'#B52626',
|
||||
'#FF2626',
|
||||
'#782F2F'
|
||||
];
|
||||
|
||||
$app.methods.updatetrustColor = function () {
|
||||
var trustColor = $app.trustColor;
|
||||
if (trustColor) {
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
@import '~noty/lib/noty.css';
|
||||
@import '~element-ui/lib/theme-chalk/index.css';
|
||||
@import '~famfamfam-flags/dist/sprite/famfamfam-flags.min.css';
|
||||
@import '~vue-swatches/dist/vue-swatches.css';
|
||||
|
||||
.color-palettes {
|
||||
background: #409eff;
|
||||
@@ -580,6 +579,15 @@ i.x-user-status.busy {
|
||||
|
||||
.color-picker {
|
||||
font-size: 18px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.el-color-picker__trigger {
|
||||
border: unset;
|
||||
}
|
||||
|
||||
.el-color-picker__color {
|
||||
border: 0.5px solid #999;
|
||||
}
|
||||
|
||||
.disableToggleSwitch ul li label {
|
||||
|
||||
@@ -899,33 +899,33 @@ html
|
||||
span.header User Colors
|
||||
div.options-container-item
|
||||
div
|
||||
v-swatches(v-model="trustColor.untrusted" show-fallback fallback-input-type="color" popover-x="right" :swatches="trustColorSwatches" class="x-tag-untrusted")
|
||||
span.color-picker(slot="trigger") #[i.el-icon-s-open] Visitor
|
||||
div
|
||||
v-swatches(v-model="trustColor.basic" show-fallback fallback-input-type="color" popover-x="right" :swatches="trustColorSwatches" class="x-tag-basic")
|
||||
span.color-picker(slot="trigger") #[i.el-icon-s-open] New User
|
||||
div
|
||||
v-swatches(v-model="trustColor.known" show-fallback fallback-input-type="color" popover-x="right" :swatches="trustColorSwatches" class="x-tag-known")
|
||||
span.color-picker(slot="trigger") #[i.el-icon-s-open] User
|
||||
div
|
||||
v-swatches(v-model="trustColor.trusted" show-fallback fallback-input-type="color" popover-x="right" :swatches="trustColorSwatches" class="x-tag-trusted")
|
||||
span.color-picker(slot="trigger") #[i.el-icon-s-open] Known User
|
||||
div
|
||||
v-swatches(v-model="trustColor.veteran" show-fallback fallback-input-type="color" popover-x="right" :swatches="trustColorSwatches" class="x-tag-veteran")
|
||||
span.color-picker(slot="trigger") #[i.el-icon-s-open] Trusted User
|
||||
div
|
||||
v-swatches(v-model="trustColor.legend" show-fallback fallback-input-type="color" popover-x="right" :swatches="trustColorSwatches" class="x-tag-legend")
|
||||
span.color-picker(slot="trigger") #[i.el-icon-s-open] Veteran User
|
||||
el-color-picker(v-model="trustColor.untrusted" size="mini" :predefine="['#CCCCCC']")
|
||||
span.color-picker(slot="trigger" class="x-tag-untrusted") Visitor
|
||||
div
|
||||
v-swatches(v-model="trustColor.vip" show-fallback fallback-input-type="color" popover-x="right" :swatches="trustColorSwatches" class="x-tag-vip")
|
||||
span.color-picker(slot="trigger") #[i.el-icon-s-open] VRChat Team
|
||||
el-color-picker(v-model="trustColor.basic" size="mini" :predefine="['#1778ff']")
|
||||
span.color-picker(slot="trigger" class="x-tag-basic") New User
|
||||
div
|
||||
v-swatches(v-model="trustColor.troll" show-fallback fallback-input-type="color" popover-x="right" :swatches="trustColorSwatches" class="x-tag-troll")
|
||||
span.color-picker(slot="trigger") #[i.el-icon-s-open] Nuisance
|
||||
el-color-picker(v-model="trustColor.known" size="mini" :predefine="['#2bcf5c']")
|
||||
span.color-picker(slot="trigger" class="x-tag-known") User
|
||||
div
|
||||
v-swatches(v-model="trustColor.legendary" show-fallback fallback-input-type="color" popover-x="right" :swatches="trustColorSwatches" class="x-tag-legendary")
|
||||
span.color-picker(slot="trigger") #[i.el-icon-s-open] Legend
|
||||
el-switch(v-model="legendColorOverride" style="padding-bottom:5px;padding-left:3px" @change="saveLegendColorOverride")
|
||||
el-color-picker(v-model="trustColor.trusted" size="mini" :predefine="['#ff7b42']")
|
||||
span.color-picker(slot="trigger" class="x-tag-trusted") Known User
|
||||
div
|
||||
el-color-picker(v-model="trustColor.veteran" size="mini" :predefine="['#b18fff', '#8143e6']")
|
||||
span.color-picker(slot="trigger" class="x-tag-veteran") Trusted User
|
||||
div
|
||||
el-color-picker(v-model="trustColor.legend" size="mini" :predefine="['#ffd000', '#abcdef']")
|
||||
span.color-picker(slot="trigger" class="x-tag-legend") Veteran User
|
||||
div
|
||||
el-color-picker(v-model="trustColor.vip" size="mini" :predefine="['#ff2626']")
|
||||
span.color-picker(slot="trigger" class="x-tag-vip") VRChat Team
|
||||
div
|
||||
el-color-picker(v-model="trustColor.troll" size="mini" :predefine="['#782f2f']")
|
||||
span.color-picker(slot="trigger" class="x-tag-troll") Nuisance
|
||||
div
|
||||
el-color-picker(v-model="trustColor.legendary" size="mini" :predefine="['#ff69b4', '#b52626']")
|
||||
span.color-picker(slot="trigger" class="x-tag-legendary") Legend
|
||||
el-switch(v-model="legendColorOverride" style="padding-bottom:21px;padding-left:6px" @change="saveLegendColorOverride")
|
||||
div.options-container
|
||||
span.header Discord Presence
|
||||
div.options-container-item
|
||||
@@ -2940,30 +2940,6 @@ html
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
div(style="margin-top:15px")
|
||||
p(style="font-weight:bold") vue-swatches
|
||||
pre(style="font-size:12px;white-space:pre-line").
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 - Present Diego Jara
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
|
||||
Reference in New Issue
Block a user