1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

fix: settings forms

This commit is contained in:
Ferdinand Mütsch 2022-01-02 20:13:38 +01:00
parent c2d3426bcd
commit f69dce39d8
2 changed files with 3 additions and 8 deletions

View File

@ -13,17 +13,17 @@ PetiteVue.createApp({
},
confirmRegenerate() {
if (confirm('Are you sure?')) {
formRegenerate.submit()
document.querySelector('#form-regenerate-summaries').submit()
}
},
confirmWakatimeImport() {
if (confirm('Are you sure? The import can not be undone.')) {
formImportWakatime.submit()
document.querySelector('#form-import-wakatime').submit()
}
},
confirmDeleteAccount() {
if (confirm('Are you sure? This can not be undone!')) {
formDelete.submit()
document.querySelector('#form-delete-user').submit()
}
},
mounted() {

View File

@ -9,11 +9,6 @@
const userTimeZone = {{ .User.Location }}
const userTzOffset = {{ .User.TZOffset.Hours }} // TODO: fix this!
const defaultTzOption = { value: 'Local', text: `Local server time (UTC+${userTzOffset})` }
// Elements
const formRegenerate = document.querySelector('#form-regenerate-summaries')
const formImportWakatime = document.querySelector('#form-import-wakatime')
const formDelete = document.querySelector('#form-delete-user')
</script>
<script type="module" src="assets/js/components/settings.js"></script>