mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-24 17:23:50 +02:00
Small fixes
This commit is contained in:
@@ -40,9 +40,19 @@ export function useDateNavigation(allDateOfActivity, reloadData) {
|
||||
const idx = allDateOfActivityArray.value.findIndex((date) =>
|
||||
date.isSame(selectedDate.value, 'day')
|
||||
);
|
||||
|
||||
// when invalid date is selected, find the next closest date
|
||||
if (idx === -1 && !isNext) {
|
||||
const newIdx = allDateOfActivityArray.value.findIndex((date) =>
|
||||
date.isBefore(selectedDate.value, 'day')
|
||||
);
|
||||
selectedDate.value = allDateOfActivityArray.value[newIdx].toDate();
|
||||
reloadData();
|
||||
return;
|
||||
}
|
||||
|
||||
if (idx !== -1) {
|
||||
const newIdx = isNext ? idx - 1 : idx + 1;
|
||||
|
||||
if (newIdx >= 0 && newIdx < allDateOfActivityArray.value.length) {
|
||||
selectedDate.value =
|
||||
allDateOfActivityArray.value[newIdx].toDate();
|
||||
@@ -50,6 +60,8 @@ export function useDateNavigation(allDateOfActivity, reloadData) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Fallback to the first/last date
|
||||
selectedDate.value = isNext
|
||||
? allDateOfActivityArray.value[0].toDate()
|
||||
: allDateOfActivityArray.value[
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div style="margin-top: 10px">
|
||||
<div style="display: flex; align-items: center; justify-content: space-between; font-size: 12px">
|
||||
<span class="name" style="margin-right: 24px">{{ t('dialog.registry_backup.auto_backup') }}</span>
|
||||
<el-switch v-model="vrcRegistryAutoBackup" @change="setVrcRegistryAutoBackup"></el-switch>
|
||||
<el-switch :model-value="vrcRegistryAutoBackup" @change="setVrcRegistryAutoBackup"></el-switch>
|
||||
</div>
|
||||
<div
|
||||
style="
|
||||
@@ -20,7 +20,7 @@
|
||||
margin-top: 5px;
|
||||
">
|
||||
<span class="name" style="margin-right: 24px">{{ t('dialog.registry_backup.ask_to_restore') }}</span>
|
||||
<el-switch v-model="vrcRegistryAskRestore" @change="setVrcRegistryAskRestore"></el-switch>
|
||||
<el-switch :model-value="vrcRegistryAskRestore" @change="setVrcRegistryAskRestore"></el-switch>
|
||||
</div>
|
||||
<DataTable v-bind="registryBackupTable" style="margin-top: 10px">
|
||||
<el-table-column :label="t('dialog.registry_backup.name')" prop="name"></el-table-column>
|
||||
|
||||
Reference in New Issue
Block a user