mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-14 20:33:52 +02:00
* refactor: dialogs * fix: storeAvatarImage * FriendLog.vue * FriendLog.vue * FriendLog.vue * GameLog.vue * fix: next day button jumping to the wrong date * sync master * fix: launchGame * Notification.vue * Feed.vue * Search.vue * Profile.vue * PlayerList.vue * Login.vue * utils * update dialog * del gameLog.pug * fix * fix: group role cannot be displayed currently * fix: "Hide Friends in Same Instance" hides players in unrelated private instances (#1210) * fix * fix: "Hide Friends in Same Instance" does not work when "Split Favorite Friends" is enabled * fix Notification.vue message * fix: deleteFavoriteNoConfirm * fix: feed status style * fix: infinite loading when deleting note * fix: private players will not be hidden when 'Hide Friends in Same Instance', and 'Hide Friends in Same Instance' will not work when 'Split Favorite Friends'
157 lines
4.7 KiB
Vue
157 lines
4.7 KiB
Vue
<template>
|
|
<safe-dialog
|
|
ref="VRCXUpdateDialogRef"
|
|
class="x-dialog"
|
|
:visible.sync="VRCXUpdateDialog.visible"
|
|
:title="t('dialog.vrcx_updater.header')"
|
|
width="400px">
|
|
<div v-loading="checkingForVRCXUpdate" style="margin-top: 15px">
|
|
<template v-if="updateInProgress">
|
|
<el-progress :percentage="updateProgress" :format="updateProgressText"></el-progress>
|
|
<br />
|
|
</template>
|
|
<template v-else>
|
|
<div v-if="VRCXUpdateDialog.updatePending" style="margin-bottom: 15px">
|
|
<span>{{ pendingVRCXInstall }}</span>
|
|
<br />
|
|
<span>{{ t('dialog.vrcx_updater.ready_for_update') }}</span>
|
|
</div>
|
|
<el-select
|
|
v-model="currentBranch"
|
|
style="display: inline-block; width: 150px; margin-right: 15px"
|
|
@change="loadBranchVersions">
|
|
<el-option v-for="branch in branches" :key="branch.name" :label="branch.name" :value="branch.name">
|
|
</el-option>
|
|
</el-select>
|
|
<el-select v-model="VRCXUpdateDialog.release" style="display: inline-block; width: 150px">
|
|
<el-option
|
|
v-for="item in VRCXUpdateDialog.releases"
|
|
:key="item.name"
|
|
:label="item.tag_name"
|
|
:value="item.name">
|
|
</el-option>
|
|
</el-select>
|
|
<div
|
|
v-if="!VRCXUpdateDialog.updatePending && VRCXUpdateDialog.release === appVersion"
|
|
style="margin-top: 15px">
|
|
<span>{{ t('dialog.vrcx_updater.latest_version') }}</span>
|
|
</div>
|
|
</template>
|
|
</div>
|
|
|
|
<template #footer>
|
|
<el-button v-if="updateInProgress" type="primary" size="small" @click="cancelUpdate">
|
|
{{ t('dialog.vrcx_updater.cancel') }}
|
|
</el-button>
|
|
<el-button
|
|
v-if="VRCXUpdateDialog.release !== pendingVRCXInstall"
|
|
:disabled="updateInProgress"
|
|
type="primary"
|
|
size="small"
|
|
@click="installVRCXUpdate">
|
|
{{ t('dialog.vrcx_updater.download') }}
|
|
</el-button>
|
|
<el-button
|
|
v-if="!updateInProgress && pendingVRCXInstall"
|
|
type="primary"
|
|
size="small"
|
|
@click="restartVRCX(true)">
|
|
{{ t('dialog.vrcx_updater.install') }}
|
|
</el-button>
|
|
</template>
|
|
</safe-dialog>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { ref, computed, inject, watch, nextTick } from 'vue';
|
|
|
|
import { useI18n } from 'vue-i18n-bridge';
|
|
|
|
const { t } = useI18n();
|
|
const adjustDialogZ = inject('adjustDialogZ');
|
|
|
|
const props = defineProps({
|
|
// eslint-disable-next-line vue/prop-name-casing
|
|
VRCXUpdateDialog: {
|
|
type: Object,
|
|
required: true
|
|
},
|
|
appVersion: {
|
|
type: String,
|
|
required: true
|
|
},
|
|
checkingForVRCXUpdate: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
updateInProgress: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
updateProgress: {
|
|
type: Number,
|
|
default: 0
|
|
},
|
|
updateProgressText: {
|
|
type: Function,
|
|
default: () => ''
|
|
},
|
|
pendingVRCXInstall: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
branch: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
branches: {
|
|
type: Object,
|
|
default: () => {}
|
|
}
|
|
});
|
|
|
|
const VRCXUpdateDialogRef = ref(null);
|
|
|
|
const emit = defineEmits([
|
|
'loadBranchVersions',
|
|
'cancelUpdate',
|
|
'installVRCXUpdate',
|
|
'restartVRCX',
|
|
'update:branch'
|
|
]);
|
|
|
|
const currentBranch = computed({
|
|
get: () => props.branch,
|
|
set: (value) => {
|
|
emit('update:branch', value);
|
|
}
|
|
});
|
|
|
|
watch(
|
|
() => props.VRCXUpdateDialog,
|
|
(newVal) => {
|
|
if (newVal.visible) {
|
|
nextTick(() => {
|
|
adjustDialogZ(VRCXUpdateDialogRef.value.$el);
|
|
});
|
|
}
|
|
}
|
|
);
|
|
|
|
function loadBranchVersions(event) {
|
|
emit('loadBranchVersions', event);
|
|
}
|
|
|
|
function cancelUpdate() {
|
|
emit('cancelUpdate');
|
|
}
|
|
|
|
function installVRCXUpdate() {
|
|
emit('installVRCXUpdate');
|
|
}
|
|
|
|
function restartVRCX(isUpgrade) {
|
|
emit('restartVRCX', isUpgrade);
|
|
}
|
|
</script>
|