mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 22:46:06 +02:00
feat: add ramdon user colours custom function
This commit is contained in:
@@ -363,10 +363,19 @@ export const useAppearanceSettingsStore = defineStore(
|
|||||||
updateTrustColorClasses(trustColor.value);
|
updateTrustColorClasses(trustColor.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function userColourInit() {
|
async function userColourInit(customFunc) {
|
||||||
let dictObject = await AppApi.GetColourBulk(
|
let dictObject = null;
|
||||||
Array.from(userStore.cachedUsers.keys())
|
if (typeof customFunc === 'function') {
|
||||||
);
|
dictObject = customFunc(userStore.cachedUsers.keys());
|
||||||
|
} else {
|
||||||
|
dictObject = await AppApi.GetColourBulk(
|
||||||
|
Array.from(userStore.cachedUsers.keys())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (!dictObject) {
|
||||||
|
console.warn('No user colour data found');
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (LINUX) {
|
if (LINUX) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
dictObject = Object.fromEntries(dictObject);
|
dictObject = Object.fromEntries(dictObject);
|
||||||
|
|||||||
Reference in New Issue
Block a user