Add dialog showing diff of changes to save

Add a save dialog at the bottom of the screen that is present whenever
there are unsaved changes.  This dialog provides a diff between the
client and server state so that the user can easily confirm the changes
they are about to make are the correct changes before applying them to
the server.
This commit is contained in:
Hornwitser 2025-06-30 15:43:15 +02:00
parent 60f898e986
commit 1d2edf7535
12 changed files with 630 additions and 7 deletions

View file

@ -0,0 +1,28 @@
<template>
<div>
<h4>{{ state }} {{ role.name }}</h4>
<DiffFieldString
title="Name"
:before="role.serverName"
:after="role.name"
:state
/>
<DiffFieldString
title="Description"
:before="role.serverDescription"
:after="role.description"
:state
/>
</div>
</template>
<script lang="ts" setup>
const props = defineProps<{
role: ClientScheduleRole,
}>();
const state = computed(() => {
if (props.role.deleted) return "deleted";
if (props.role.isNew()) return "created";
return "modified";
});
</script>