restored some deleted stuff

This commit is contained in:
vabene1111
2025-07-03 16:29:54 +02:00
parent a5dde3d3c8
commit 7266ff8978
47 changed files with 31381 additions and 49 deletions

View File

@@ -51,6 +51,8 @@ const routes = [
{path: '/ingredient-editor', component: () => import("@/pages/IngredientEditorPage.vue"), name: 'IngredientEditorPage'},
{path: '/property-editor', component: () => import("@/pages/PropertyEditorPage.vue"), name: 'PropertyEditorPage'},
{path: '/space-setup', component: () => import("@/pages/SpaceSetupPage.vue"), name: 'SpaceSetupPage'},
]
const router = createRouter({

View File

@@ -44,7 +44,7 @@ import DeleteConfirmDialog from "@/components/dialogs/DeleteConfirmDialog.vue";
import {GenericModel} from "@/types/Models";
import VClosableCardTitle from "@/components/dialogs/VClosableCardTitle.vue";
import {onBeforeRouteLeave, RouteLocationNormalized} from "vue-router";
import {ref} from "vue";
import {onBeforeUnmount, onMounted, ref} from "vue";
const emit = defineEmits(['save', 'delete', 'close'])
@@ -60,6 +60,14 @@ const props = defineProps({
const leaveConfirmDialog = ref(false)
const leaveGoTo = ref<RouteLocationNormalized | null>(null)
onMounted(() => {
window.addEventListener("keydown", keyEvent)
})
onBeforeUnmount(() => {
window.removeEventListener("keydown", keyEvent)
})
/**
* before navigating to another page check for unsaved changes, if so display confirmation dialog
*/
@@ -84,6 +92,17 @@ function closeDialog() {
}
}
/**
* add hotkey functionality to model editor
* @param e
*/
function keyEvent(e: KeyboardEvent) {
if (e.code === "KeyS" && e.ctrlKey) {
e.preventDefault()
emit('save')
}
}
</script>

View File

@@ -279,7 +279,7 @@
</v-btn-group>
</v-col>
</v-row>
<v-row v-for="(s, stepIndex) in importResponse.recipe.steps" :key="i">
<v-row v-for="(s, stepIndex) in importResponse.recipe.steps" :key="stepIndex">
<v-col cols="12">
<v-chip color="primary">#{{ stepIndex + 1 }}</v-chip>
<v-btn variant="plain" size="small" icon class="float-right">

View File

@@ -0,0 +1,11 @@
<script setup lang="ts">
</script>
<template>
</template>
<style scoped>
</style>