Misc fixes

This commit is contained in:
Natsumi
2025-01-30 18:02:53 +13:00
parent 3fda9b771c
commit 6b2d402b8b
8 changed files with 236 additions and 180 deletions

View File

@@ -22,24 +22,31 @@ namespace VRCX
public override string GetVRChatCacheLocation() public override string GetVRChatCacheLocation()
{ {
var defaultPath = Path.Join(GetVRChatAppDataLocation(), "Cache-WindowsPlayer"); var defaultPath = Path.Join(GetVRChatAppDataLocation(), "Cache-WindowsPlayer");
try
var json = ReadConfigFile(); {
if (string.IsNullOrEmpty(json)) var json = ReadConfigFile();
if (string.IsNullOrEmpty(json))
return defaultPath;
var obj = JsonConvert.DeserializeObject<JObject>(json);
if (obj["cache_directory"] == null)
return defaultPath;
var cacheDir = (string)obj["cache_directory"];
if (string.IsNullOrEmpty(cacheDir))
return defaultPath;
var cachePath = Path.Join(cacheDir, "Cache-WindowsPlayer");
if (!Directory.Exists(cacheDir))
return defaultPath;
return cachePath;
}
catch (Exception e)
{
logger.Error(e);
return defaultPath; return defaultPath;
}
var obj = JsonConvert.DeserializeObject<JObject>(json);
if (obj["cache_directory"] == null)
return defaultPath;
var cacheDir = (string)obj["cache_directory"];
if (string.IsNullOrEmpty(cacheDir))
return defaultPath;
var cachePath = Path.Join(cacheDir, "Cache-WindowsPlayer");
if (!Directory.Exists(cacheDir))
return defaultPath;
return cachePath;
} }
public override string GetVRChatPhotosLocation() public override string GetVRChatPhotosLocation()

View File

@@ -18,7 +18,6 @@ if (!isDotNetInstalled()) {
app.quit(); app.quit();
return; return;
} }
console.log('DOTNET_ROOT:', process.env.DOTNET_ROOT);
// get launch arguments // get launch arguments
const args = process.argv.slice(1); const args = process.argv.slice(1);
@@ -125,33 +124,37 @@ function relaunchWithArgs(args) {
} }
const fullArgs = ['--ozone-platform-hint=auto', ...args]; const fullArgs = ['--ozone-platform-hint=auto', ...args];
let execPath = process.execPath; let execPath = process.execPath;
if (appImagePath) { if (appImagePath) {
execPath = appImagePath; execPath = appImagePath;
fullArgs.unshift('--appimage-extract-and-run'); fullArgs.unshift('--appimage-extract-and-run');
} }
console.log('Relaunching with args:', fullArgs); console.log('Relaunching with args:', fullArgs);
const child = spawn(execPath, fullArgs, { const child = spawn(execPath, fullArgs, {
detached: true, detached: true,
stdio: 'inherit' stdio: 'inherit'
}); });
child.unref(); child.unref();
app.exit(0); app.exit(0);
} }
function createWindow() { function createWindow() {
if (process.platform === 'linux' && !process.argv.includes('--ozone-platform-hint=auto') && !x11) { if (
process.platform === 'linux' &&
!process.argv.includes('--ozone-platform-hint=auto') &&
!x11
) {
relaunchWithArgs(process.argv.slice(1)); relaunchWithArgs(process.argv.slice(1));
} }
app.commandLine.appendSwitch('enable-speech-dispatcher'); app.commandLine.appendSwitch('enable-speech-dispatcher');
const x = parseInt(VRCXStorage.Get('VRCX_LocationX')) || 0; const x = parseInt(VRCXStorage.Get('VRCX_LocationX')) || 0;
const y = parseInt(VRCXStorage.Get('VRCX_LocationY')) || 0; const y = parseInt(VRCXStorage.Get('VRCX_LocationY')) || 0;
const width = parseInt(VRCXStorage.Get('VRCX_SizeWidth')) || 1920; const width = parseInt(VRCXStorage.Get('VRCX_SizeWidth')) || 1920;
@@ -395,6 +398,16 @@ async function installVRCX() {
return; return;
} }
await createDesktopFile();
dialog.showMessageBox({
type: 'info',
title: 'VRCX',
message: 'VRCX has been installed successfully.',
detail: 'You can now find VRCX in your ~/Applications folder.'
});
}
async function createDesktopFile() {
// Download the icon and save it to the target directory // Download the icon and save it to the target directory
const iconUrl = const iconUrl =
'https://raw.githubusercontent.com/vrcx-team/VRCX/master/VRCX.png'; 'https://raw.githubusercontent.com/vrcx-team/VRCX/master/VRCX.png';
@@ -430,12 +443,6 @@ StartupWMClass=VRCX
console.error('Error downloading icon:', err); console.error('Error downloading icon:', err);
dialog.showErrorBox('VRCX', 'Failed to download the icon.'); dialog.showErrorBox('VRCX', 'Failed to download the icon.');
}); });
dialog.showMessageBox({
type: 'info',
title: 'VRCX',
message: 'VRCX has been installed successfully.',
detail: 'You can now find VRCX in your ~/Applications folder.'
});
} }
function downloadIcon(url, targetPath) { function downloadIcon(url, targetPath) {

View File

@@ -7953,10 +7953,12 @@ console.log(`isLinux: ${LINUX}`);
'VRCX_feedTableVIPFilter', 'VRCX_feedTableVIPFilter',
false false
); );
$app.data.gameLogTable.vip = await configRepository.getBool( $app.data.gameLogTable.vip = false;
'VRCX_gameLogTableVIPFilter', // gameLog loads before favorites
false // await configRepository.getBool(
); // 'VRCX_gameLogTableVIPFilter',
// false
// );
$app.data.gameLogTable.filter = JSON.parse( $app.data.gameLogTable.filter = JSON.parse(
await configRepository.getString('VRCX_gameLogTableFilters', '[]') await configRepository.getString('VRCX_gameLogTableFilters', '[]')
); );
@@ -16639,12 +16641,14 @@ console.log(`isLinux: ${LINUX}`);
}, },
cache_directory: { cache_directory: {
name: $t('dialog.config_json.cache_directory'), name: $t('dialog.config_json.cache_directory'),
default: '%AppData%\\..\\LocalLow\\VRChat\\VRChat' default: '%AppData%\\..\\LocalLow\\VRChat\\VRChat',
folderBrowser: true
}, },
picture_output_folder: { picture_output_folder: {
name: $t('dialog.config_json.picture_directory'), name: $t('dialog.config_json.picture_directory'),
// my pictures folder // my pictures folder
default: `%UserProfile%\\Pictures\\VRChat` default: `%UserProfile%\\Pictures\\VRChat`,
folderBrowser: true
}, },
// dynamic_bone_max_affected_transform_count: { // dynamic_bone_max_affected_transform_count: {
// name: 'Dynamic Bones Limit Max Transforms (0 disable all transforms)', // name: 'Dynamic Bones Limit Max Transforms (0 disable all transforms)',
@@ -16676,6 +16680,20 @@ console.log(`isLinux: ${LINUX}`);
} }
}; };
$app.methods.openConfigFolderBrowser = async function (value) {
var oldPath = this.VRChatConfigFile[value];
var newPath = await this.folderSelectorDialog(oldPath);
if (newPath) {
this.VRChatConfigFile[value] = newPath;
}
this.redrawVRChatConfigDialog();
};
$app.methods.redrawVRChatConfigDialog = function () {
this.VRChatConfigDialog.visible = false;
this.VRChatConfigDialog.visible = true;
};
$app.methods.saveVRChatConfigFile = function () { $app.methods.saveVRChatConfigFile = function () {
for (var item in this.VRChatConfigFile) { for (var item in this.VRChatConfigFile) {
if (item === 'picture_output_split_by_date') { if (item === 'picture_output_split_by_date') {
@@ -16760,11 +16778,13 @@ console.log(`isLinux: ${LINUX}`);
$app.methods.setVRChatCameraResolution = function (res) { $app.methods.setVRChatCameraResolution = function (res) {
this.VRChatConfigFile.camera_res_height = res.height; this.VRChatConfigFile.camera_res_height = res.height;
this.VRChatConfigFile.camera_res_width = res.width; this.VRChatConfigFile.camera_res_width = res.width;
this.redrawVRChatConfigDialog();
}; };
$app.methods.setVRChatScreenshotResolution = function (res) { $app.methods.setVRChatScreenshotResolution = function (res) {
this.VRChatConfigFile.screenshot_res_height = res.height; this.VRChatConfigFile.screenshot_res_height = res.height;
this.VRChatConfigFile.screenshot_res_width = res.width; this.VRChatConfigFile.screenshot_res_width = res.width;
this.redrawVRChatConfigDialog();
}; };
$app.methods.getVRChatSpoutResolution = function () { $app.methods.getVRChatSpoutResolution = function () {
@@ -16781,6 +16801,7 @@ console.log(`isLinux: ${LINUX}`);
$app.methods.setVRChatSpoutResolution = function (res) { $app.methods.setVRChatSpoutResolution = function (res) {
this.VRChatConfigFile.camera_spout_res_height = res.height; this.VRChatConfigFile.camera_spout_res_height = res.height;
this.VRChatConfigFile.camera_spout_res_width = res.width; this.VRChatConfigFile.camera_spout_res_width = res.width;
this.redrawVRChatConfigDialog();
}; };
// Auto Launch Shortcuts // Auto Launch Shortcuts
@@ -21055,9 +21076,7 @@ console.log(`isLinux: ${LINUX}`);
'' ''
); );
$app.data.userGeneratedContentDialog = { $app.data.folderSelectorDialogVisible = false;
visible: false
};
$app.methods.setUGCFolderPath = async function (path) { $app.methods.setUGCFolderPath = async function (path) {
await configRepository.setString('VRCX_userGeneratedContentPath', path); await configRepository.setString('VRCX_userGeneratedContentPath', path);
@@ -21075,24 +21094,27 @@ console.log(`isLinux: ${LINUX}`);
await AppApi.OpenUGCPhotosFolder(this.ugcFolderPath); await AppApi.OpenUGCPhotosFolder(this.ugcFolderPath);
}; };
$app.methods.openUGCFolderSelector = async function () { $app.methods.folderSelectorDialog = async function (oldPath) {
var D = this.userGeneratedContentDialog; if (this.folderSelectorDialogVisible) return;
if (!oldPath) {
if (D.visible) return; oldPath = '';
D.visible = true;
var newUGCFolder;
if (LINUX) {
newUGCFolder = await window.electron.openDirectoryDialog();
} else {
newUGCFolder = await AppApi.OpenFolderSelectorDialog(
this.ugcFolderPath
);
} }
D.visible = false; this.folderSelectorDialogVisible = true;
var newFolder = '';
if (LINUX) {
newFolder = await window.electron.openDirectoryDialog();
} else {
newFolder = await AppApi.OpenFolderSelectorDialog(oldPath);
}
await this.setUGCFolderPath(newUGCFolder); this.folderSelectorDialogVisible = false;
return newFolder;
};
$app.methods.openUGCFolderSelector = async function () {
var path = await this.folderSelectorDialog(this.ugcFolderPath);
await this.setUGCFolderPath(path);
}; };
// avatar database provider // avatar database provider

View File

@@ -951,7 +951,7 @@ i.x-status-icon.red {
} }
.x-text-added { .x-text-added {
color: rgb(76, 255, 80); color: rgb(35, 188, 35);
background-color: rgba(76, 255, 80, 0.2); background-color: rgba(76, 255, 80, 0.2);
padding: 2px 2px; padding: 2px 2px;
border-radius: 4px; border-radius: 4px;

View File

@@ -37,18 +37,23 @@ mixin settings
div(style='margin-top: 10px') div(style='margin-top: 10px')
span(style='margin-right: 5px') {{ $t('dialog.config_json.delete_old_cache') }} span(style='margin-right: 5px') {{ $t('dialog.config_json.delete_old_cache') }}
el-button(size='small' style='margin-left: 5px' icon='el-icon-folder-delete' @click='sweepVRChatCache()') {{ $t('dialog.config_json.sweep_cache') }} el-button(size='small' style='margin-left: 5px' icon='el-icon-folder-delete' @click='sweepVRChatCache()') {{ $t('dialog.config_json.sweep_cache') }}
div(style='display: inline-block; margin-top: 10px' v-for='(item, value) in VRChatConfigList' :key='value') div(style='display: block; margin-top: 10px' v-for='(item, value) in VRChatConfigList' :key='value')
span(v-text='item.name' style='word-break: keep-all') span(style='word-break: keep-all') {{ item.name }}:
| : div(style='display: flex')
el-input( el-button(
v-model='VRChatConfigFile[value]' v-if='item.folderBrowser'
:placeholder='item.default' size='mini'
size='mini' icon='el-icon-folder-opened'
:type='item.type ? item.type : "text"' @click='openConfigFolderBrowser(value)')
:min='item.min' el-input(
:max='item.max' v-model='VRChatConfigFile[value]'
style='margin-top: 5px') :placeholder='item.default'
br size='mini'
:type='item.type ? item.type : "text"'
:min='item.min'
:max='item.max'
@change='redrawVRChatConfigDialog'
style='flex: 1; margin-top: 5px')
div(style='display: inline-block; margin-top: 10px') div(style='display: inline-block; margin-top: 10px')
span {{ $t('dialog.config_json.camera_resolution') }} span {{ $t('dialog.config_json.camera_resolution') }}
br br

View File

@@ -27,6 +27,7 @@ mixin favoritesTab
el-radio-group(v-model='sortFavorites' @change='saveSortFavoritesOption') el-radio-group(v-model='sortFavorites' @change='saveSortFavoritesOption')
el-radio(:label='false') {{ $t('view.settings.appearance.appearance.sort_favorite_by_name') }} el-radio(:label='false') {{ $t('view.settings.appearance.appearance.sort_favorite_by_name') }}
el-radio(:label='true') {{ $t('view.settings.appearance.appearance.sort_favorite_by_date') }} el-radio(:label='true') {{ $t('view.settings.appearance.appearance.sort_favorite_by_date') }}
span(style='display: block; margin-top: 30px') {{ $t('view.favorite.avatars.vrchat_favorites') }}
el-collapse(style='border: 0') el-collapse(style='border: 0')
el-collapse-item(v-for='group in API.favoriteFriendGroups' :key='group.name') el-collapse-item(v-for='group in API.favoriteFriendGroups' :key='group.name')
template(slot='title') template(slot='title')
@@ -75,25 +76,25 @@ mixin favoritesTab
:link='false') :link='false')
span(v-else v-text='favorite.ref.statusDescription') span(v-else v-text='favorite.ref.statusDescription')
template(v-if='editFavoritesMode') template(v-if='editFavoritesMode')
el-tooltip( el-dropdown(
placement='left' trigger='click'
:content='$t("view.favorite.move_tooltip")' @click.native.stop
:disabled='hideTooltips') size='mini'
el-dropdown( style='margin-left: 5px')
trigger='click' el-tooltip(
@click.native.stop placement='left'
size='mini' :content='$t("view.favorite.move_tooltip")'
style='margin-left: 5px') :disabled='hideTooltips')
el-button(type='default' icon='el-icon-back' size='mini' circle) el-button(type='default' icon='el-icon-back' size='mini' circle)
el-dropdown-menu(#default='dropdown') el-dropdown-menu(#default='dropdown')
template( template(
v-if='groupAPI.name !== group.name' v-if='groupAPI.name !== group.name'
v-for='groupAPI in API.favoriteFriendGroups' v-for='groupAPI in API.favoriteFriendGroups'
:key='groupAPI.name') :key='groupAPI.name')
el-dropdown-item( el-dropdown-item(
style='display: block; margin: 10px 0' style='display: block; margin: 10px 0'
@click.native='moveFavorite(favorite.ref, groupAPI, "friend")' @click.native='moveFavorite(favorite.ref, groupAPI, "friend")'
:disabled='groupAPI.count >= groupAPI.capacity') {{ groupAPI.displayName }} ({{ groupAPI.count }} / {{ groupAPI.capacity }}) :disabled='groupAPI.count >= groupAPI.capacity') {{ groupAPI.displayName }} ({{ groupAPI.count }} / {{ groupAPI.capacity }})
el-button(type='text' size='mini' @click.stop style='margin-left: 5px') el-button(type='text' size='mini' @click.stop style='margin-left: 5px')
el-checkbox(v-model='favorite.$selected') el-checkbox(v-model='favorite.$selected')
template(v-else) template(v-else)
@@ -168,7 +169,7 @@ mixin favoritesTab
.avatar .avatar
.detail .detail
span(v-text='favorite.id') span(v-text='favorite.id')
span(style='display: block; margin-top: 20px') {{ $t('view.favorite.worlds.vrchat_favorites') }} span(style='display: block; margin-top: 20px') {{ $t('view.favorite.worlds.vrchat_favorites') }}
el-collapse(style='border: 0') el-collapse(style='border: 0')
el-collapse-item(v-for='group in API.favoriteWorldGroups' :key='group.name') el-collapse-item(v-for='group in API.favoriteWorldGroups' :key='group.name')
template(slot='title') template(slot='title')
@@ -182,24 +183,20 @@ mixin favoritesTab
:type='userFavoriteWorldsStatusForFavTab(group.visibility)' :type='userFavoriteWorldsStatusForFavTab(group.visibility)'
effect='plain') {{ group.visibility.charAt(0).toUpperCase() + group.visibility.slice(1) }} effect='plain') {{ group.visibility.charAt(0).toUpperCase() + group.visibility.slice(1) }}
span(style='color: #909399; font-size: 12px; margin-left: 10px') {{ group.count }}/{{ group.capacity }} span(style='color: #909399; font-size: 12px; margin-left: 10px') {{ group.count }}/{{ group.capacity }}
el-tooltip( el-dropdown(trigger='click' @click.native.stop size='mini' style='margin-left: 10px')
placement='top' el-tooltip(
:content='$t("view.favorite.visibility_tooltip")' placement='top'
:disabled='hideTooltips') :content='$t("view.favorite.visibility_tooltip")'
el-dropdown( :disabled='hideTooltips')
trigger='click'
@click.native.stop
size='mini'
style='margin-left: 10px')
el-button(type='default' icon='el-icon-view' size='mini' circle) el-button(type='default' icon='el-icon-view' size='mini' circle)
el-dropdown-menu(#default='dropdown') el-dropdown-menu(#default='dropdown')
el-dropdown-item( el-dropdown-item(
v-if='group.visibility !== visibility' v-if='group.visibility !== visibility'
v-for='visibility in worldGroupVisibilityOptions' v-for='visibility in worldGroupVisibilityOptions'
:key='visibility' :key='visibility'
style='display: block; margin: 10px 0' style='display: block; margin: 10px 0'
v-text='visibility.charAt(0).toUpperCase() + visibility.slice(1)' v-text='visibility.charAt(0).toUpperCase() + visibility.slice(1)'
@click.native='changeWorldGroupVisibility(group.name, visibility)') @click.native='changeWorldGroupVisibility(group.name, visibility)')
el-tooltip( el-tooltip(
placement='top' placement='top'
:content='$t("view.favorite.rename_tooltip")' :content='$t("view.favorite.rename_tooltip")'
@@ -235,25 +232,25 @@ mixin favoritesTab
span.extra(v-if='favorite.ref.occupants') {{ favorite.ref.authorName }} ({{ favorite.ref.occupants }}) span.extra(v-if='favorite.ref.occupants') {{ favorite.ref.authorName }} ({{ favorite.ref.occupants }})
span.extra(v-else v-text='favorite.ref.authorName') span.extra(v-else v-text='favorite.ref.authorName')
template(v-if='editFavoritesMode') template(v-if='editFavoritesMode')
el-tooltip( el-dropdown(
placement='left' trigger='click'
:content='$t("view.favorite.move_tooltip")' @click.native.stop
:disabled='hideTooltips') size='mini'
el-dropdown( style='margin-left: 5px')
trigger='click' el-tooltip(
@click.native.stop placement='left'
size='mini' :content='$t("view.favorite.move_tooltip")'
style='margin-left: 5px') :disabled='hideTooltips')
el-button(type='default' icon='el-icon-back' size='mini' circle) el-button(type='default' icon='el-icon-back' size='mini' circle)
el-dropdown-menu(#default='dropdown') el-dropdown-menu(#default='dropdown')
template( template(
v-if='groupAPI.name !== group.name' v-if='groupAPI.name !== group.name'
v-for='groupAPI in API.favoriteWorldGroups' v-for='groupAPI in API.favoriteWorldGroups'
:key='groupAPI.name') :key='groupAPI.name')
el-dropdown-item( el-dropdown-item(
style='display: block; margin: 10px 0' style='display: block; margin: 10px 0'
@click.native='moveFavorite(favorite.ref, groupAPI, "world")' @click.native='moveFavorite(favorite.ref, groupAPI, "world")'
:disabled='groupAPI.count >= groupAPI.capacity') {{ groupAPI.displayName }} ({{ groupAPI.count }} / {{ groupAPI.capacity }}) :disabled='groupAPI.count >= groupAPI.capacity') {{ groupAPI.displayName }} ({{ groupAPI.count }} / {{ groupAPI.capacity }})
el-button(type='text' size='mini' @click.stop style='margin-left: 5px') el-button(type='text' size='mini' @click.stop style='margin-left: 5px')
el-checkbox(v-model='favorite.$selected') el-checkbox(v-model='favorite.$selected')
template(v-else) template(v-else)
@@ -370,24 +367,24 @@ mixin favoritesTab
span.extra(v-if='favorite.occupants') {{ favorite.authorName }} ({{ favorite.occupants }}) span.extra(v-if='favorite.occupants') {{ favorite.authorName }} ({{ favorite.occupants }})
span.extra(v-else v-text='favorite.authorName') span.extra(v-else v-text='favorite.authorName')
template(v-if='editFavoritesMode') template(v-if='editFavoritesMode')
el-tooltip( el-dropdown(
placement='left' trigger='click'
:content='$t("view.favorite.copy_tooltip")' @click.native.stop
:disabled='hideTooltips') size='mini'
el-dropdown( style='margin-left: 5px')
trigger='click' el-tooltip(
@click.native.stop placement='left'
size='mini' :content='$t("view.favorite.copy_tooltip")'
style='margin-left: 5px') :disabled='hideTooltips')
el-button(type='default' icon='el-icon-s-order' size='mini' circle) el-button(type='default' icon='el-icon-back' size='mini' circle)
el-dropdown-menu(#default='dropdown') el-dropdown-menu(#default='dropdown')
template( template(
v-for='groupAPI in API.favoriteWorldGroups' v-for='groupAPI in API.favoriteWorldGroups'
:key='groupAPI.name') :key='groupAPI.name')
el-dropdown-item( el-dropdown-item(
style='display: block; margin: 10px 0' style='display: block; margin: 10px 0'
@click.native='addFavoriteWorld(favorite, groupAPI, true)' @click.native='addFavoriteWorld(favorite, groupAPI, true)'
:disabled='groupAPI.count >= groupAPI.capacity') {{ groupAPI.displayName }} ({{ groupAPI.count }} / {{ groupAPI.capacity }}) :disabled='groupAPI.count >= groupAPI.capacity') {{ groupAPI.displayName }} ({{ groupAPI.count }} / {{ groupAPI.capacity }})
template(v-else) template(v-else)
el-tooltip( el-tooltip(
placement='left' placement='left'
@@ -511,25 +508,25 @@ mixin favoritesTab
span.name(v-text='favorite.ref.name') span.name(v-text='favorite.ref.name')
span.extra(v-text='favorite.ref.authorName') span.extra(v-text='favorite.ref.authorName')
template(v-if='editFavoritesMode') template(v-if='editFavoritesMode')
el-tooltip( el-dropdown(
placement='top' trigger='click'
:content='$t("view.favorite.move_tooltip")' @click.native.stop
:disabled='hideTooltips') size='mini'
el-dropdown( style='margin-left: 5px')
trigger='click' el-tooltip(
@click.native.stop placement='top'
size='mini' :content='$t("view.favorite.move_tooltip")'
style='margin-left: 5px') :disabled='hideTooltips')
el-button(type='default' icon='el-icon-back' size='mini' circle) el-button(type='default' icon='el-icon-back' size='mini' circle)
el-dropdown-menu(#default='dropdown') el-dropdown-menu(#default='dropdown')
template( template(
v-if='groupAPI.name !== group.name' v-if='groupAPI.name !== group.name'
v-for='groupAPI in API.favoriteAvatarGroups' v-for='groupAPI in API.favoriteAvatarGroups'
:key='groupAPI.name') :key='groupAPI.name')
el-dropdown-item( el-dropdown-item(
style='display: block; margin: 10px 0' style='display: block; margin: 10px 0'
@click.native='moveFavorite(favorite.ref, groupAPI, "avatar")' @click.native='moveFavorite(favorite.ref, groupAPI, "avatar")'
:disabled='groupAPI.count >= groupAPI.capacity') {{ groupAPI.displayName }} ({{ groupAPI.count }} / {{ groupAPI.capacity }}) :disabled='groupAPI.count >= groupAPI.capacity') {{ groupAPI.displayName }} ({{ groupAPI.count }} / {{ groupAPI.capacity }})
el-button(type='text' size='mini' @click.stop style='margin-left: 5px') el-button(type='text' size='mini' @click.stop style='margin-left: 5px')
el-checkbox(v-model='favorite.$selected') el-checkbox(v-model='favorite.$selected')
template(v-else) template(v-else)
@@ -701,24 +698,24 @@ mixin favoritesTab
span.name(v-text='favorite.name') span.name(v-text='favorite.name')
span.extra(v-text='favorite.authorName') span.extra(v-text='favorite.authorName')
template(v-if='editFavoritesMode') template(v-if='editFavoritesMode')
el-tooltip( el-dropdown(
placement='left' trigger='click'
:content='$t("view.favorite.copy_tooltip")' @click.native.stop
:disabled='hideTooltips') size='mini'
el-dropdown( style='margin-left: 5px')
trigger='click' el-tooltip(
@click.native.stop placement='left'
size='mini' :content='$t("view.favorite.copy_tooltip")'
style='margin-left: 5px') :disabled='hideTooltips')
el-button(type='default' icon='el-icon-s-order' size='mini' circle) el-button(type='default' icon='el-icon-back' size='mini' circle)
el-dropdown-menu(#default='dropdown') el-dropdown-menu(#default='dropdown')
template( template(
v-for='groupAPI in API.favoriteAvatarGroups' v-for='groupAPI in API.favoriteAvatarGroups'
:key='groupAPI.name') :key='groupAPI.name')
el-dropdown-item( el-dropdown-item(
style='display: block; margin: 10px 0' style='display: block; margin: 10px 0'
@click.native='addFavoriteAvatar(favorite, groupAPI, true)' @click.native='addFavoriteAvatar(favorite, groupAPI, true)'
:disabled='groupAPI.count >= groupAPI.capacity') {{ groupAPI.displayName }} ({{ groupAPI.count }} / {{ groupAPI.capacity }}) :disabled='groupAPI.count >= groupAPI.capacity') {{ groupAPI.displayName }} ({{ groupAPI.count }} / {{ groupAPI.capacity }})
template(v-else) template(v-else)
el-tooltip( el-tooltip(
placement='left' placement='left'

View File

@@ -1660,10 +1660,13 @@ class Database {
let vipQuery = ''; let vipQuery = '';
if (vipList.length > 0) { if (vipList.length > 0) {
vipQuery = 'AND user_id IN ('; vipQuery = 'AND user_id IN (';
vipList.forEach((vip, i) => { for (var i = 0; i < vipList.length; i++) {
vipQuery += `'${vip.replaceAll("'", "''")}', `; vipQuery += `'${vipList[i].replaceAll("'", "''")}'`;
}); if (i < vipList.length - 1) {
vipQuery += "'')"; vipQuery += ', ';
}
}
vipQuery += ')';
} }
var location = true; var location = true;
var onplayerjoined = true; var onplayerjoined = true;

View File

@@ -417,3 +417,18 @@ button {
.el-color-picker__panel { .el-color-picker__panel {
background-color: #222; background-color: #222;
} }
.x-text-removed {
text-decoration: line-through;
color: #ff4444;
background-color: rgba(255, 0, 0, 0.2);
padding: 2px 2px;
border-radius: 4px;
}
.x-text-added {
color: rgb(76, 255, 80);
background-color: rgba(76, 255, 80, 0.2);
padding: 2px 2px;
border-radius: 4px;
}