Skip to content

Commit

Permalink
refactor: explicitly define acceptable values for saving
Browse files Browse the repository at this point in the history
  • Loading branch information
annehaley committed Oct 3, 2024
1 parent d2ad119 commit 38d2cc9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web/src/components/MainDrawerContents.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { ref, Ref, computed } from "vue";
import { ref, computed } from "vue";
import { availableProjects, currentProject, projectConfigMode } from "@/store";
import ProjectContents from "./ProjectContents.vue";
import { getCurrentMapPosition, setMapCenter } from "@/storeFunctions";
Expand All @@ -10,7 +10,7 @@ export default {
components: { ProjectContents },
setup() {
const searchText = ref();
const saving: Ref<string | boolean> = ref(false);
const saving = ref<"waiting" | "done">();
const filteredProjects = computed(() => {
return availableProjects.value.filter((proj) => {
return (
Expand All @@ -26,7 +26,7 @@ export default {
function saveProjectMapLocation(project: Project) {
const { center, zoom } = getCurrentMapPosition();
saving.value = true;
saving.value = "waiting";
patchProject(project.id, {
default_map_center: center,
default_map_zoom: zoom,
Expand Down Expand Up @@ -143,7 +143,7 @@ export default {
open-on-hover
open-delay="150"
:close-on-content-click="false"
@update:model-value="saving = false"
@update:model-value="saving = undefined"
>
<v-card width="250">
<v-list selectable>
Expand Down

0 comments on commit 38d2cc9

Please sign in to comment.