mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-21 15:53:50 +02:00
use tailwind class
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="x-container">
|
||||
<div class="options-container" style="margin-top: 0; padding: 5px">
|
||||
<div class="options-container mt-0 p-1.5">
|
||||
<span class="header">{{ t('view.settings.header') }}</span>
|
||||
</div>
|
||||
<TabsUnderline
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
|
||||
const emit = defineEmits(['change']);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param event
|
||||
*/
|
||||
function change(event) {
|
||||
emit('change', event);
|
||||
}
|
||||
@@ -45,7 +49,7 @@
|
||||
align-items: center;
|
||||
}
|
||||
.simple-switch > .switch {
|
||||
margin-left: 10px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
.simple-switch .tooltip {
|
||||
margin-left: 3px;
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
</div>
|
||||
<div class="options-container">
|
||||
<span class="header">{{ t('view.profile.game_info.header') }}</span>
|
||||
<div class="px-2.5 overflow-y-auto overflow-x-hidden" style="margin-top: 10px">
|
||||
<div class="px-2.5 overflow-y-auto overflow-x-hidden mt-2">
|
||||
<div class="box-border flex items-center p-1.5 text-[13px] cursor-pointer">
|
||||
<div class="flex-1 overflow-hidden" @click="getVisits">
|
||||
<span class="block truncate font-medium leading-[18px]">{{
|
||||
@@ -107,7 +107,7 @@
|
||||
<div class="options-container">
|
||||
<span class="header">{{ t('view.settings.advanced.advanced.app_launcher.header') }}</span>
|
||||
<br />
|
||||
<Button size="sm" variant="outline" style="margin-top: 5px" @click="openShortcutFolder()">{{
|
||||
<Button class="mt-1.5" size="sm" variant="outline" @click="openShortcutFolder()">{{
|
||||
t('view.settings.advanced.advanced.app_launcher.folder')
|
||||
}}</Button>
|
||||
<simple-switch
|
||||
@@ -152,7 +152,7 @@
|
||||
@change="changeTranslationAPI('VRCX_translationAPI')" />
|
||||
<div class="options-container-item">
|
||||
<Button size="sm" variant="outline" @click="showTranslationApiDialog">
|
||||
<Languages class="h-4 w-4" style="margin-right: 5px" />
|
||||
<Languages class="h-4 w-4" style="margin-right: 6px" />
|
||||
{{ t('view.settings.advanced.advanced.translation_api.translation_api_key') }}
|
||||
</Button>
|
||||
</div>
|
||||
@@ -505,18 +505,30 @@
|
||||
|
||||
const isLinux = computed(() => LINUX);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function openShortcutFolder() {
|
||||
AppApi.OpenShortcutFolder();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function showYouTubeApiDialog() {
|
||||
isYouTubeApiDialogVisible.value = true;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function showTranslationApiDialog() {
|
||||
isTranslationApiDialogVisible.value = true;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function refreshCacheSize() {
|
||||
cacheSize.cachedUsers = cachedUsers.size;
|
||||
cacheSize.cachedWorlds = cachedWorlds.size;
|
||||
@@ -526,6 +538,10 @@
|
||||
cacheSize.cachedInstances = cachedInstances.size;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param configKey
|
||||
*/
|
||||
async function changeYouTubeApi(configKey = '') {
|
||||
if (configKey === 'VRCX_youtubeAPI') {
|
||||
advancedSettingsStore.setYouTubeApi();
|
||||
@@ -538,17 +554,27 @@
|
||||
updateOpenVR();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param configKey
|
||||
*/
|
||||
async function changeTranslationAPI(configKey = '') {
|
||||
if (configKey === 'VRCX_translationAPI') {
|
||||
advancedSettingsStore.setTranslationApi();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
async function refreshConfigTreeData() {
|
||||
await authRequest.getConfig();
|
||||
configTreeData.value = cachedConfig.value;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function getVisits() {
|
||||
miscRequest.getVisits().then((args) => {
|
||||
visits.value = args.json;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="options-container" style="margin-top: 0">
|
||||
<div class="options-container mt-0">
|
||||
<span class="header">{{ t('view.settings.appearance.appearance.header') }}</span>
|
||||
<div class="options-container-item">
|
||||
<span class="name">{{ t('view.settings.appearance.appearance.language') }}</span>
|
||||
@@ -23,8 +23,8 @@
|
||||
{{ t('view.settings.appearance.appearance.font_family') }}
|
||||
|
||||
<TooltipWrapper
|
||||
class="ml-1.5"
|
||||
side="top"
|
||||
style="margin-left: 5px"
|
||||
:content="t('view.settings.appearance.appearance.font_family_tooltip')">
|
||||
<Info />
|
||||
</TooltipWrapper>
|
||||
@@ -443,6 +443,10 @@
|
||||
|
||||
initGetZoomLevel();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
function handleSortFavoritesRadio(value) {
|
||||
const nextValue = value === 'true';
|
||||
if (nextValue !== sortFavorites.value) {
|
||||
@@ -450,6 +454,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
function handleInstanceUsersSortAlphabeticalRadio(value) {
|
||||
const nextValue = value === 'true';
|
||||
if (nextValue !== instanceUsersSortAlphabetical.value) {
|
||||
@@ -457,6 +465,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
function handleDtHour12Radio(value) {
|
||||
const nextValue = value === 'true';
|
||||
if (nextValue !== dtHour12.value) {
|
||||
@@ -502,6 +514,9 @@
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function addTablePageSizeFromInput() {
|
||||
const raw = String(tablePageSizesSearchTerm.value ?? '').trim();
|
||||
if (!raw) {
|
||||
@@ -515,6 +530,9 @@
|
||||
tablePageSizesSearchTerm.value = '';
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
async function initGetZoomLevel() {
|
||||
const handleWheel = (event) => {
|
||||
if (event.ctrlKey) {
|
||||
@@ -528,10 +546,16 @@
|
||||
getZoomLevel();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
async function getZoomLevel() {
|
||||
zoomLevel.value = ((await AppApi.GetZoom()) + 10) * 10;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function setZoomLevel() {
|
||||
AppApi.SetZoom(zoomLevel.value / 10 - 10);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="options-container" style="margin-top: 0">
|
||||
<div class="options-container mt-0">
|
||||
<span class="header">{{ t('view.settings.discord_presence.discord_presence.header') }}</span>
|
||||
<div class="options-container-item">
|
||||
<span>{{ t('view.settings.discord_presence.discord_presence.description') }}</span>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="options-container" style="margin-top: 0">
|
||||
<div class="options-container mt-0">
|
||||
<span class="header">{{ t('view.settings.general.general.header') }}</span>
|
||||
<div class="px-2.5 overflow-y-auto overflow-x-hidden" style="margin-top: 10px">
|
||||
<div class="px-2.5 overflow-y-auto overflow-x-hidden mt-2">
|
||||
<div class="box-border flex items-center p-1.5 text-[13px] cursor-default">
|
||||
<div class="flex-1 overflow-hidden">
|
||||
<span class="block truncate font-medium leading-[18px]">{{
|
||||
@@ -57,12 +57,12 @@
|
||||
<div v-if="!noUpdater" class="text-sm mt-2 flex flex-col align-baseline">
|
||||
<span class="name">{{ t('view.settings.general.vrcx_updater.update_action') }}</span>
|
||||
<ToggleGroup
|
||||
class="mt-1.5"
|
||||
type="single"
|
||||
required
|
||||
variant="outline"
|
||||
size="sm"
|
||||
:model-value="autoUpdateVRCX"
|
||||
style="margin-top: 5px"
|
||||
@update:model-value="setAutoUpdateVRCX">
|
||||
<ToggleGroupItem value="Off">{{
|
||||
t('view.settings.general.vrcx_updater.auto_update_off')
|
||||
@@ -124,7 +124,7 @@
|
||||
<span class="header inline-flex items-center"
|
||||
>{{ t('view.settings.general.favorites.header') }}
|
||||
<TooltipWrapper side="top" :content="t('view.settings.general.favorites.header_tooltip')">
|
||||
<Info style="width: 12px; height: 12px; margin-left: 4px; vertical-align: middle; cursor: help" />
|
||||
<Info class="ml-1" style="width: 12px; height: 12px; vertical-align: middle; cursor: help" />
|
||||
</TooltipWrapper>
|
||||
</span>
|
||||
<br />
|
||||
@@ -132,7 +132,7 @@
|
||||
:model-value="localFavoriteFriendsGroups"
|
||||
multiple
|
||||
@update:modelValue="setLocalFavoriteFriendsGroups">
|
||||
<SelectTrigger style="margin-top: 8px">
|
||||
<SelectTrigger class="mt-2">
|
||||
<SelectValue :placeholder="t('view.settings.general.favorites.group_placeholder')" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
@@ -253,6 +253,9 @@
|
||||
() => import('../../dialogs/OpenSourceSoftwareNoticeDialog.vue')
|
||||
);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function openOSSDialog() {
|
||||
ossDialog.value = true;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="options-container" style="margin-top: 0">
|
||||
<div class="options-container mt-0">
|
||||
<span class="header">{{ t('view.settings.notifications.notifications.header') }}</span>
|
||||
<div class="options-container-item">
|
||||
<Button size="sm" variant="outline" @click="showNotyFeedFiltersDialog">{{
|
||||
@@ -23,6 +23,7 @@
|
||||
}}</span>
|
||||
<br />
|
||||
<ToggleGroup
|
||||
class="mt-1.5"
|
||||
type="single"
|
||||
required
|
||||
variant="outline"
|
||||
@@ -34,7 +35,6 @@
|
||||
!ovrtHudNotifications &&
|
||||
!ovrtWristNotifications
|
||||
"
|
||||
style="margin-top: 5px"
|
||||
@update:model-value="
|
||||
setOverlayToast($event);
|
||||
saveOpenVROption();
|
||||
@@ -82,7 +82,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<div class="options-container-item">
|
||||
<span class="name" style="vertical-align: top; padding-top: 10px">{{
|
||||
<span class="name" style="vertical-align: top; padding-top: 8px">{{
|
||||
t('view.settings.notifications.notifications.steamvr_notifications.notification_opacity')
|
||||
}}</span>
|
||||
<div style="flex: 0 0 300px; width: 300px; max-width: 100%; padding-top: 16px">
|
||||
@@ -120,9 +120,7 @@
|
||||
</template>
|
||||
<template v-else>
|
||||
<simple-switch
|
||||
:label="
|
||||
t('view.settings.notifications.notifications.steamvr_notifications.wayvr_notifications')
|
||||
"
|
||||
:label="t('view.settings.notifications.notifications.steamvr_notifications.wayvr_notifications')"
|
||||
:value="xsNotifications"
|
||||
@change="
|
||||
setXsNotifications();
|
||||
@@ -169,7 +167,7 @@
|
||||
variant="outline"
|
||||
size="sm"
|
||||
:model-value="desktopToast"
|
||||
style="margin-top: 5px"
|
||||
style="margin-top: 6px"
|
||||
@update:model-value="setDesktopToast(String($event))">
|
||||
<ToggleGroupItem value="Never">{{
|
||||
t('view.settings.notifications.notifications.conditions.never')
|
||||
@@ -214,7 +212,7 @@
|
||||
variant="outline"
|
||||
size="sm"
|
||||
:model-value="notificationTTS"
|
||||
style="margin-top: 5px"
|
||||
style="margin-top: 6px"
|
||||
@update:model-value="saveNotificationTTS">
|
||||
<ToggleGroupItem value="Never">{{
|
||||
t('view.settings.notifications.notifications.conditions.never')
|
||||
@@ -260,7 +258,7 @@
|
||||
:label="t('view.settings.notifications.notifications.text_to_speech.tts_test_placeholder')"
|
||||
:value="isTestTTSVisible"
|
||||
@change="isTestTTSVisible = !isTestTTSVisible" />
|
||||
<div v-if="isTestTTSVisible" style="margin-top: 5px">
|
||||
<div v-if="isTestTTSVisible" style="margin-top: 6px">
|
||||
<InputGroupTextareaField
|
||||
v-model="notificationTTSTest"
|
||||
:placeholder="t('view.settings.notifications.notifications.text_to_speech.tts_test_placeholder')"
|
||||
@@ -372,10 +370,16 @@
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function showNotyFeedFiltersDialog() {
|
||||
feedFiltersDialogMode.value = 'noty';
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function showNotificationPositionDialog() {
|
||||
isNotificationPositionDialogVisible.value = true;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<!--//- Pictures | Screenshot Helper-->
|
||||
<div class="options-container" style="margin-top: 0">
|
||||
<div class="options-container mt-0">
|
||||
<span class="header">{{ t('view.settings.advanced.advanced.screenshot_helper.header') }}</span>
|
||||
<div class="options-container-item">
|
||||
<span class="name">{{ t('view.settings.advanced.advanced.screenshot_helper.description') }}</span>
|
||||
@@ -41,7 +41,7 @@
|
||||
<div class="options-container">
|
||||
<span class="header">{{ t('view.settings.advanced.advanced.user_generated_content.header') }}</span>
|
||||
<br />
|
||||
<div class="options-container-item" style="margin-bottom: 5px">
|
||||
<div class="options-container-item mb-1.5">
|
||||
<span class="name" style="min-width: 300px">{{
|
||||
t('view.settings.advanced.advanced.user_generated_content.description')
|
||||
}}</span>
|
||||
@@ -61,7 +61,7 @@
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<span class="sub-header" style="margin-right: 5px">{{
|
||||
<span class="sub-header mr-1.5">{{
|
||||
t('view.settings.advanced.advanced.save_instance_prints_to_file.header')
|
||||
}}</span>
|
||||
<TooltipWrapper
|
||||
@@ -87,7 +87,7 @@
|
||||
@change="setSaveInstanceStickers()"
|
||||
:long-label="true" />
|
||||
<br />
|
||||
<span class="sub-header" style="margin-right: 5px"
|
||||
<span class="sub-header mr-1.5"
|
||||
>{{ t('view.settings.advanced.advanced.save_instance_emoji_to_file.header') }}
|
||||
</span>
|
||||
<TooltipWrapper
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="options-container" style="margin-top: 0">
|
||||
<div class="options-container mt-0">
|
||||
<span class="header">{{ t('view.settings.wrist_overlay.steamvr_wrist_overlay.header') }}</span>
|
||||
<div class="options-container-item">
|
||||
<Button
|
||||
@@ -46,8 +46,7 @@
|
||||
<RadioGroup
|
||||
:model-value="openVRAlways ? 'true' : 'false'"
|
||||
:disabled="!openVR"
|
||||
class="gap-2 flex"
|
||||
style="margin-top: 8px"
|
||||
class="gap-2 flex mt-2"
|
||||
@update:modelValue="handleOpenVRAlwaysRadio">
|
||||
<div class="flex items-center space-x-2">
|
||||
<RadioGroupItem id="openVRAlways-false" value="false" />
|
||||
@@ -64,8 +63,7 @@
|
||||
<RadioGroup
|
||||
:model-value="overlaybutton ? 'true' : 'false'"
|
||||
:disabled="!openVR || !overlayWrist"
|
||||
class="gap-2 flex"
|
||||
style="margin-top: 8px"
|
||||
class="gap-2 flex mt-2"
|
||||
@update:modelValue="handleOverlayButtonRadio">
|
||||
<div class="flex items-center space-x-2">
|
||||
<RadioGroupItem id="overlaybutton-false" value="false" />
|
||||
@@ -206,6 +204,10 @@
|
||||
|
||||
const { saveOpenVROption } = useVrStore();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
function handleOpenVRAlwaysRadio(value) {
|
||||
const nextValue = value === 'true';
|
||||
if (nextValue !== openVRAlways.value) {
|
||||
@@ -214,6 +216,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
function handleOverlayButtonRadio(value) {
|
||||
const nextValue = value === 'true';
|
||||
if (nextValue !== overlaybutton.value) {
|
||||
|
||||
@@ -6,18 +6,20 @@
|
||||
</DialogHeader>
|
||||
<div>
|
||||
<InputGroupAction
|
||||
class="mt-1.5"
|
||||
v-for="(provider, index) in avatarRemoteDatabaseProviderList"
|
||||
:key="index"
|
||||
v-model="avatarRemoteDatabaseProviderList[index]"
|
||||
size="sm"
|
||||
style="margin-top: 5px"
|
||||
@change="saveAvatarProviderList">
|
||||
<template #actions>
|
||||
<Trash2 class="cursor-pointer opacity-80 hover:opacity-100" @click="removeAvatarProvider(provider)" />
|
||||
<Trash2
|
||||
class="cursor-pointer opacity-80 hover:opacity-100"
|
||||
@click="removeAvatarProvider(provider)" />
|
||||
</template>
|
||||
</InputGroupAction>
|
||||
|
||||
<Button size="sm" style="margin-top: 5px" @click="avatarRemoteDatabaseProviderList.push('')">
|
||||
<Button size="sm" style="margin-top: 6px" @click="avatarRemoteDatabaseProviderList.push('')">
|
||||
{{ t('dialog.avatar_database_provider.add_provider') }}
|
||||
</Button>
|
||||
</div>
|
||||
@@ -51,6 +53,9 @@
|
||||
|
||||
const emit = defineEmits(['update:isAvatarProviderDialogVisible']);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function closeDialog() {
|
||||
emit('update:isAvatarProviderDialogVisible', false);
|
||||
}
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
>.
|
||||
</span>
|
||||
<VueShowdown
|
||||
class="changelog-markdown"
|
||||
class="changelog-markdown mt-2"
|
||||
:markdown="changeLogDialog.changeLog"
|
||||
flavor="github"
|
||||
:options="showdownOptions"
|
||||
@click="handleLinkClick"
|
||||
style="height: 62vh; overflow-y: auto; margin-top: 10px" />
|
||||
style="height: 62vh; overflow-y: auto" />
|
||||
</div>
|
||||
<DialogFooter>
|
||||
<Button
|
||||
|
||||
@@ -8,11 +8,7 @@
|
||||
<div v-for="setting in currentOptions" :key="setting.key" class="mb-[5px] flex items-center">
|
||||
<span class="inline-block min-w-[190px] pr-2.5 text-right"
|
||||
>{{ setting.name
|
||||
}}<TooltipWrapper
|
||||
v-if="setting.tooltip"
|
||||
side="top"
|
||||
style="margin-left: 5px"
|
||||
:content="setting.tooltip">
|
||||
}}<TooltipWrapper class="ml-1.5" v-if="setting.tooltip" side="top" :content="setting.tooltip">
|
||||
<AlertTriangle class="inline-block" v-if="setting.tooltipWarning" />
|
||||
<Info class="inline-block" v-else />
|
||||
</TooltipWrapper>
|
||||
|
||||
@@ -15,9 +15,8 @@
|
||||
x="0px"
|
||||
y="0px"
|
||||
viewBox="80 80 80 100"
|
||||
style="margin-top: 24px"
|
||||
xml:space="preserve"
|
||||
class="absolute inset-0 size-full">
|
||||
class="absolute inset-0 size-full mt-6">
|
||||
<path
|
||||
style="fill: black"
|
||||
d="M291.89,5A3.11,3.11,0,0,1,295,8.11V160.64a3.11,3.11,0,0,1-3.11,3.11H8.11A3.11,3.11,0,0,1,5,160.64V8.11A3.11,3.11,0,0,1,8.11,5H291.89m0-5H8.11A8.11,8.11,0,0,0,0,8.11V160.64a8.11,8.11,0,0,0,8.11,8.11H291.89a8.11,8.11,0,0,0,8.11-8.11V8.11A8.11,8.11,0,0,0,291.89,0Z" />
|
||||
@@ -109,6 +108,9 @@
|
||||
|
||||
const emit = defineEmits(['update:isNotificationPositionDialogVisible']);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function closeDialog() {
|
||||
emit('update:isNotificationPositionDialogVisible', false);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<span>{{ t('dialog.open_source.description') }}</span>
|
||||
</div>
|
||||
|
||||
<div v-for="lib in openSourceSoftwareLicenses" :key="lib.name" style="margin-top: 15px">
|
||||
<div class="mt-4" v-for="lib in openSourceSoftwareLicenses" :key="lib.name">
|
||||
<p style="font-weight: bold">{{ lib.name }}</p>
|
||||
<pre style="font-size: 12px; white-space: pre-line">{{ lib.licenseText }}</pre>
|
||||
</div>
|
||||
@@ -35,6 +35,9 @@
|
||||
|
||||
const emit = defineEmits(['update:ossDialog']);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function closeDialog() {
|
||||
emit('update:ossDialog', false);
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
:maxlength="32"
|
||||
autofocus />
|
||||
<InputGroupField
|
||||
class="mt-1.5"
|
||||
v-model="enablePrimaryPasswordDialog.rePassword"
|
||||
:placeholder="t('dialog.primary_password.re_input_placeholder')"
|
||||
type="password"
|
||||
style="margin-top: 5px"
|
||||
size="sm"
|
||||
:maxlength="32" />
|
||||
<DialogFooter>
|
||||
@@ -47,6 +47,9 @@
|
||||
const { enablePrimaryPasswordDialog } = storeToRefs(authStore);
|
||||
const { setPrimaryPassword } = authStore;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function handleSetPrimaryPassword() {
|
||||
setPrimaryPassword(enablePrimaryPasswordDialog.value.password);
|
||||
enablePrimaryPasswordDialog.value.visible = false;
|
||||
|
||||
@@ -10,46 +10,42 @@
|
||||
{{ t('dialog.config_json.description2') }}
|
||||
</div>
|
||||
<br />
|
||||
<span style="margin-right: 5px">{{ t('dialog.config_json.cache_size') }}</span>
|
||||
<span class="mr-1.5">{{ t('dialog.config_json.cache_size') }}</span>
|
||||
<span v-text="VRChatUsedCacheSize"></span>
|
||||
<span>/</span>
|
||||
<span v-text="totalCacheSize"></span>
|
||||
<span>GB</span>
|
||||
<TooltipWrapper side="top" :content="t('dialog.config_json.refresh')">
|
||||
<Button
|
||||
class="rounded-full"
|
||||
class="rounded-full ml-1.5"
|
||||
variant="outline"
|
||||
size="icon-sm"
|
||||
:disabled="VRChatCacheSizeLoading"
|
||||
style="margin-left: 5px"
|
||||
@click="getVRChatCacheSize">
|
||||
<Spinner v-if="VRChatCacheSizeLoading" />
|
||||
<RefreshCw v-else />
|
||||
</Button>
|
||||
</TooltipWrapper>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<span style="margin-right: 5px">{{ t('dialog.config_json.delete_all_cache') }}</span>
|
||||
<Button
|
||||
size="sm"
|
||||
variant="outline"
|
||||
style="margin-left: 5px"
|
||||
@click="showDeleteAllVRChatCacheConfirm"
|
||||
>{{ t('dialog.config_json.delete_cache') }}</Button
|
||||
>
|
||||
<div class="mt-2">
|
||||
<span class="mr-1.5">{{ t('dialog.config_json.delete_all_cache') }}</span>
|
||||
<Button class="ml-1.5" size="sm" variant="outline" @click="showDeleteAllVRChatCacheConfirm">{{
|
||||
t('dialog.config_json.delete_cache')
|
||||
}}</Button>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<span style="margin-right: 5px">{{ t('dialog.config_json.delete_old_cache') }}</span>
|
||||
<Button size="sm" variant="outline" style="margin-left: 5px" @click="sweepVRChatCache">{{
|
||||
<div class="mt-2">
|
||||
<span class="mr-1.5">{{ t('dialog.config_json.delete_old_cache') }}</span>
|
||||
<Button class="ml-1.5" size="sm" variant="outline" @click="sweepVRChatCache">{{
|
||||
t('dialog.config_json.sweep_cache')
|
||||
}}</Button>
|
||||
</div>
|
||||
|
||||
<div v-for="(item, value) in VRChatConfigList" :key="value" style="display: block; margin-top: 10px">
|
||||
<div class="mt-2" v-for="(item, value) in VRChatConfigList" :key="value" style="display: block">
|
||||
<span style="word-break: keep-all">{{ item.name }}:</span>
|
||||
<div style="display: flex">
|
||||
<InputGroupAction
|
||||
class="mt-1.5"
|
||||
v-model="VRChatConfigFile[value]"
|
||||
:placeholder="item.default"
|
||||
size="sm"
|
||||
@@ -57,7 +53,7 @@
|
||||
:min="item.min"
|
||||
:max="item.max"
|
||||
@input="refreshDialogValues"
|
||||
style="flex: 1; margin-top: 5px">
|
||||
style="flex: 1">
|
||||
<template #actions>
|
||||
<Button
|
||||
size="icon-sm"
|
||||
@@ -71,13 +67,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="display: inline-block; margin-top: 10px">
|
||||
<div style="display: inline-block; margin-top: 8px">
|
||||
<span>{{ t('dialog.config_json.camera_resolution') }}</span>
|
||||
<br />
|
||||
<Select
|
||||
:model-value="vrchatCameraResolutionKey"
|
||||
@update:modelValue="(v) => (vrchatCameraResolutionKey = v)">
|
||||
<SelectTrigger size="sm" style="margin-top: 5px">
|
||||
<SelectTrigger size="sm" style="margin-top: 6px">
|
||||
<SelectValue :placeholder="getVRChatCameraResolution()" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
@@ -94,13 +90,13 @@
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div style="display: inline-block; margin-top: 10px">
|
||||
<div style="display: inline-block; margin-top: 8px">
|
||||
<span>{{ t('dialog.config_json.spout_resolution') }}</span>
|
||||
<br />
|
||||
<Select
|
||||
:model-value="vrchatSpoutResolutionKey"
|
||||
@update:modelValue="(v) => (vrchatSpoutResolutionKey = v)">
|
||||
<SelectTrigger size="sm" style="margin-top: 5px">
|
||||
<SelectTrigger size="sm" style="margin-top: 6px">
|
||||
<SelectValue :placeholder="getVRChatSpoutResolution()" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
@@ -117,13 +113,13 @@
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div style="display: inline-block; margin-top: 10px">
|
||||
<div style="display: inline-block; margin-top: 8px">
|
||||
<span>{{ t('dialog.config_json.screenshot_resolution') }}</span>
|
||||
<br />
|
||||
<Select
|
||||
:model-value="vrchatScreenshotResolutionKey"
|
||||
@update:modelValue="(v) => (vrchatScreenshotResolutionKey = v)">
|
||||
<SelectTrigger size="sm" style="margin-top: 5px">
|
||||
<SelectTrigger size="sm" style="margin-top: 6px">
|
||||
<SelectValue :placeholder="getVRChatScreenshotResolution()" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
@@ -140,13 +136,13 @@
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<label class="inline-flex items-center gap-2" style="margin-top: 5px; display: block">
|
||||
<label class="inline-flex items-center gap-2" style="margin-top: 6px; display: block">
|
||||
<Checkbox
|
||||
v-model="VRChatConfigFile.picture_output_split_by_date"
|
||||
@update:modelValue="refreshDialogValues" />
|
||||
<span>{{ t('dialog.config_json.picture_sort_by_date') }}</span>
|
||||
</label>
|
||||
<label class="inline-flex items-center gap-2" style="margin-top: 5px; display: block">
|
||||
<label class="inline-flex items-center gap-2" style="margin-top: 6px; display: block">
|
||||
<Checkbox v-model="VRChatConfigFile.disableRichPresence" @update:modelValue="refreshDialogValues" />
|
||||
<span>{{ t('dialog.config_json.disable_discord_presence') }}</span>
|
||||
</label>
|
||||
@@ -267,6 +263,10 @@
|
||||
|
||||
const VRCHAT_RESOLUTION_DEFAULT_KEY = '__default__';
|
||||
|
||||
/**
|
||||
*
|
||||
* @param row
|
||||
*/
|
||||
function getVRChatResolutionKey(row) {
|
||||
const width = Number(row?.width);
|
||||
const height = Number(row?.height);
|
||||
@@ -327,6 +327,9 @@
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function showDeleteAllVRChatCacheConfirm() {
|
||||
modalStore
|
||||
.confirm({
|
||||
@@ -341,6 +344,9 @@
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
async function deleteAllVRChatCache() {
|
||||
try {
|
||||
await AssetBundleManager.DeleteAllCache();
|
||||
@@ -351,6 +357,10 @@
|
||||
getVRChatCacheSize();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
async function openConfigFolderBrowser(value) {
|
||||
const oldPath = VRChatConfigFile.value[value];
|
||||
const newPath = await folderSelectorDialog(oldPath);
|
||||
@@ -360,29 +370,47 @@
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function refreshDialogValues() {
|
||||
loading.value = true;
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param res
|
||||
*/
|
||||
function setVRChatSpoutResolution(res) {
|
||||
VRChatConfigFile.value.camera_spout_res_height = res.height;
|
||||
VRChatConfigFile.value.camera_spout_res_width = res.width;
|
||||
refreshDialogValues();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param res
|
||||
*/
|
||||
function setVRChatCameraResolution(res) {
|
||||
VRChatConfigFile.value.camera_res_height = res.height;
|
||||
VRChatConfigFile.value.camera_res_width = res.width;
|
||||
refreshDialogValues();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param res
|
||||
*/
|
||||
function setVRChatScreenshotResolution(res) {
|
||||
VRChatConfigFile.value.screenshot_res_height = res.height;
|
||||
VRChatConfigFile.value.screenshot_res_width = res.width;
|
||||
refreshDialogValues();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function getVRChatCameraResolution() {
|
||||
if (VRChatConfigFile.value.camera_res_height && VRChatConfigFile.value.camera_res_width) {
|
||||
const res = `${VRChatConfigFile.value.camera_res_width}x${VRChatConfigFile.value.camera_res_height}`;
|
||||
@@ -391,6 +419,9 @@
|
||||
return '1920x1080 (1080p)';
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function getVRChatSpoutResolution() {
|
||||
if (VRChatConfigFile.value.camera_spout_res_height && VRChatConfigFile.value.camera_spout_res_width) {
|
||||
const res = `${VRChatConfigFile.value.camera_spout_res_width}x${VRChatConfigFile.value.camera_spout_res_height}`;
|
||||
@@ -399,6 +430,9 @@
|
||||
return '1920x1080 (1080p)';
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function getVRChatScreenshotResolution() {
|
||||
if (VRChatConfigFile.value.screenshot_res_height && VRChatConfigFile.value.screenshot_res_width) {
|
||||
const res = `${VRChatConfigFile.value.screenshot_res_width}x${VRChatConfigFile.value.screenshot_res_height}`;
|
||||
@@ -407,6 +441,9 @@
|
||||
return '1920x1080 (1080p)';
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function saveVRChatConfigFile() {
|
||||
for (const item in VRChatConfigFile.value) {
|
||||
if (item === 'picture_output_split_by_date') {
|
||||
@@ -429,11 +466,17 @@
|
||||
closeDialog();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function WriteVRChatConfigFile() {
|
||||
const json = JSON.stringify(VRChatConfigFile.value, null, '\t');
|
||||
AppApi.WriteConfigFile(json);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
async function readVRChatConfigFile() {
|
||||
const config = await AppApi.ReadConfigFileSafe();
|
||||
if (config) {
|
||||
@@ -450,6 +493,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function closeDialog() {
|
||||
isVRChatConfigDialogVisible.value = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user