From 43d216dae02012cb4cfffa88103fce4ccfb1f53a Mon Sep 17 00:00:00 2001 From: Natsumi Date: Wed, 28 Dec 2022 20:30:22 +1300 Subject: [PATCH] Move VRChatConfigList --- html/src/app.js | 78 +++++++++++++-------------- html/src/index.pug | 2 +- html/src/localization/strings/en.json | 4 ++ 3 files changed, 44 insertions(+), 40 deletions(-) diff --git a/html/src/app.js b/html/src/app.js index 7fc69ede..d175cecf 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -19578,45 +19578,7 @@ speechSynthesis.getVoices(); // VRChat Config JSON $app.data.VRChatConfigFile = {}; - - $app.data.VRChatConfigList = { - cache_size: { - name: 'Max Cache Size [GB] (min 20)', - default: '20', - type: 'number', - min: 20 - }, - cache_expiry_delay: { - name: 'Cache Expiry [Days] (30 - 150)', - default: '30', - type: 'number', - min: 30, - max: 150 - }, - cache_directory: { - name: 'Custom Cache Folder Location', - default: '%AppData%\\..\\LocalLow\\VRChat\\vrchat' - }, - dynamic_bone_max_affected_transform_count: { - name: 'Dynamic Bones Limit Max Transforms (0 disable all transforms)', - default: '32', - type: 'number', - min: 0 - }, - dynamic_bone_max_collider_check_count: { - name: 'Dynamic Bones Limit Max Collider Collisions (0 disable all colliders)', - default: '8', - type: 'number', - min: 0 - }, - fpv_steadycam_fov: { - name: 'First-Person Steadycam FOV', - default: '50', - type: 'number', - min: 30, - max: 110 - } - }; + $app.data.VRChatConfigList = {}; $app.methods.readVRChatConfigFile = async function () { this.VRChatConfigFile = {}; @@ -19648,6 +19610,44 @@ speechSynthesis.getVoices(); }); $app.methods.showVRChatConfig = async function () { + this.VRChatConfigList = { + cache_size: { + name: i18n.t('dialog.config_json.max_cache_size'), + default: '20', + type: 'number', + min: 20 + }, + cache_expiry_delay: { + name: i18n.t('dialog.config_json.cache_expiry_delay'), + default: '30', + type: 'number', + min: 30, + max: 150 + }, + cache_directory: { + name: i18n.t('dialog.config_json.cache_directory'), + default: '%AppData%\\..\\LocalLow\\VRChat\\vrchat' + }, + // dynamic_bone_max_affected_transform_count: { + // name: 'Dynamic Bones Limit Max Transforms (0 disable all transforms)', + // default: '32', + // type: 'number', + // min: 0 + // }, + // dynamic_bone_max_collider_check_count: { + // name: 'Dynamic Bones Limit Max Collider Collisions (0 disable all colliders)', + // default: '8', + // type: 'number', + // min: 0 + // }, + fpv_steadycam_fov: { + name: i18n.t('dialog.config_json.fpv_steadycam_fov'), + default: '50', + type: 'number', + min: 30, + max: 110 + } + }; await this.readVRChatConfigFile(); this.$nextTick(() => adjustDialogZ(this.$refs.VRChatConfigDialog.$el)); this.VRChatConfigDialog.visible = true; diff --git a/html/src/index.pug b/html/src/index.pug index cad457aa..2cff6bba 100644 --- a/html/src/index.pug +++ b/html/src/index.pug @@ -2587,7 +2587,7 @@ html | {{ $t('dialog.config_json.description1') }} #[br] | {{ $t('dialog.config_json.description2') }} br - span {{ $t('dialog.config_json.cache_size') }} + span(style="margin-right:5px") {{ $t('dialog.config_json.cache_size') }} span(v-text="VRChatUsedCacheSize") span / span(v-text="VRChatTotalCacheSize") diff --git a/html/src/localization/strings/en.json b/html/src/localization/strings/en.json index 857f46ad..ab6bbd66 100644 --- a/html/src/localization/strings/en.json +++ b/html/src/localization/strings/en.json @@ -803,6 +803,10 @@ "delete_cache": "Delete Cache", "delete_old_cache": "Delete old versions from cache", "sweep_cache": "Sweep Cache", + "max_cache_size": "Max Cache Size [GB] (min 20)", + "cache_expiry_delay": "Cache Expiry [Days] (30 - 150)", + "cache_directory": "Custom Cache Folder Location", + "fpv_steadycam_fov": "First-Person Steadycam FOV", "camera_resolution": "Camera Resolution", "screenshot_resolution": "Screenshot Resolution", "disable_discord_presence": "Disable Discord Rich Presence",