Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

edit-mode: Get snap-to-grid toggle back #1237

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions src/components/EditMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@
<v-icon size="22">mdi-plus</v-icon>
</div>
</v-list-item>
<v-list-item @click="store.snapToGrid = !store.snapToGrid">
<div class="flex w-full justify-between mt-[6px]">
<v-list-item-title>{{ store.snapToGrid ? 'Disable grid' : 'Enable grid' }}</v-list-item-title>
<v-icon size="22">{{ store.snapToGrid ? 'mdi-grid' : 'mdi-grid-off' }}</v-icon>
</div>
</v-list-item>
<v-list-item @click="resetSavedProfiles">
<div class="flex w-full justify-between mt-[6px]">
<v-list-item-title>Reset saved profiles</v-list-item-title>
Expand Down Expand Up @@ -566,15 +572,6 @@
</v-card>
</GlassModal>
</teleport>
<teleport to="body">
<v-dialog v-model="editMenuDialogRevealed" width="20rem">
<v-card class="pa-2">
<v-card-text>
<v-switch v-model="store.snapToGrid" label="Snap to grid" class="m-2 text-slate-800" />
</v-card-text>
</v-card>
</v-dialog>
</teleport>
</template>

<script setup lang="ts">
Expand Down Expand Up @@ -746,9 +743,6 @@ const widgetAddMenuGroupOptions = {

const editMode = toRefs(props).editMode

const editMenuDialogRevealed = ref(false)
useConfirmDialog(editMenuDialogRevealed)

const viewBeingRenamed = ref(store.currentView)
const newViewName = ref('')
const viewRenameDialogRevealed = ref(false)
Expand Down
Loading