mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 00:12:11 +08:00
show confirm dialog before switching to desktop version
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
<f7-toggle :checked="isEnableAnimate" @toggle:change="isEnableAnimate = $event"></f7-toggle>
|
||||
</f7-list-item>
|
||||
|
||||
<f7-list-item external :title="$t('Switch to Desktop Version')" :link="desktopVersionPath"></f7-list-item>
|
||||
<f7-list-item :title="$t('Switch to Desktop Version')" @click="switchToDesktopVersion"></f7-list-item>
|
||||
|
||||
<f7-list-item :title="$t('About')" link="/about" :after="version"></f7-list-item>
|
||||
</f7-list>
|
||||
@@ -101,9 +101,6 @@ export default {
|
||||
version() {
|
||||
return 'v' + this.$version;
|
||||
},
|
||||
desktopVersionPath() {
|
||||
return getDesktopVersionPath();
|
||||
},
|
||||
allTimezones() {
|
||||
return this.$locale.getAllTimezones(true);
|
||||
},
|
||||
@@ -204,6 +201,11 @@ export default {
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
switchToDesktopVersion() {
|
||||
this.$confirm('Are you sure you want to switch to desktop version?', () => {
|
||||
window.location.replace(getDesktopVersionPath());
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user