Skip to content

Commit

Permalink
Import recent sheet spinner
Browse files Browse the repository at this point in the history
  • Loading branch information
Francia Csaba committed Oct 11, 2023
1 parent f5733f1 commit 0c0430f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export default Vue.extend({
},
destroyed() {
ipcRenderer.removeAllListeners("export-query")
ipcRenderer.removeAllListeners("import-query")
},
methods: {
toggleDevtools() {
Expand Down
11 changes: 10 additions & 1 deletion src/views/SheetSetup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default defineComponent({
const recentSheets = useState(store, ["sheets"]).sheets.value.recentSheets
const { employees } = useStaffState(["employees"]);
const newSheetDialog = ref(false)
const loading = ref(false)
const selection = ref(employees.value)
const datePicker = ref(new Date().toISOString().substring(0, 10))
Expand All @@ -29,6 +30,7 @@ export default defineComponent({
entry.path]))
function importRecentSheet(path: string) {
loading.value = true
ipcRenderer.send("import", path)
}
Expand All @@ -38,6 +40,7 @@ export default defineComponent({
return {
newSheetDialog,
loading,
datePicker,
selection,
employees,
Expand All @@ -57,7 +60,7 @@ export default defineComponent({
</script>

<template>
<div class="wrapper">
<div class="wrapper" v-if="!loading">
<v-dialog v-model="newSheetDialog" width="unset" height="80%">
<template v-slot:activator="{ on, attrs }">
<div class="sheet new-sheet-button" v-bind="attrs" v-on="on">
Expand Down Expand Up @@ -124,6 +127,12 @@ export default defineComponent({

</button>
</div>
<div class="pt-10 text-center" v-else>
<v-progress-circular
indeterminate
color="grey"
:size="50"></v-progress-circular>
</div>
</template>

<style scoped lang="scss">
Expand Down

0 comments on commit 0c0430f

Please sign in to comment.