improve ui

This commit is contained in:
marlon-erler
2024-07-11 16:00:38 +02:00
parent 7a23025e42
commit a824ad97d5
2 changed files with 23 additions and 24 deletions
+3 -4
View File
@@ -624,7 +624,6 @@
return { return {
id: UUID(), id: UUID(),
title, title,
isoDateLastEdited: (/* @__PURE__ */ new Date()).toISOString(),
contentVersions: [this.createObjectContent()] contentVersions: [this.createObjectContent()]
}; };
}; };
@@ -1255,20 +1254,20 @@
chat.deleteObject(messageObject); chat.deleteObject(messageObject);
closeModal(); closeModal();
} }
return /* @__PURE__ */ createElement("div", { class: "modal", "toggle:open": isPresented, "on:keydown": handleKeyDown }, /* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("main", null, /* @__PURE__ */ createElement("h2", null, messageObject.title), /* @__PURE__ */ createElement("span", { class: "secondary" }, messageObject.id), /* @__PURE__ */ createElement("hr", null), /* @__PURE__ */ createElement("label", { class: "tile" }, /* @__PURE__ */ createElement("span", { class: "icon" }, "label"), /* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("span", null, translation.objectTitle), /* @__PURE__ */ createElement( return /* @__PURE__ */ createElement("div", { class: "modal", "toggle:open": isPresented, "on:keydown": handleKeyDown }, /* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("main", null, /* @__PURE__ */ createElement("h2", null, messageObject.title), /* @__PURE__ */ createElement("span", { class: "secondary" }, messageObject.id), /* @__PURE__ */ createElement("hr", null), /* @__PURE__ */ createElement("div", { class: "flex-column gap" }, /* @__PURE__ */ createElement("label", { class: "tile" }, /* @__PURE__ */ createElement("span", { class: "icon" }, "label"), /* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("span", null, translation.objectTitle), /* @__PURE__ */ createElement(
"input", "input",
{ {
"bind:value": editingTitle, "bind:value": editingTitle,
placeholder: translation.objectTitlePlaceholder placeholder: translation.objectTitlePlaceholder
} }
))), /* @__PURE__ */ createElement("hr", null), /* @__PURE__ */ createElement("div", { class: "flex-column gap" }, /* @__PURE__ */ createElement("label", { class: "tile" }, /* @__PURE__ */ createElement("span", { class: "icon" }, "history"), /* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("span", null, translation.objectVersion), /* @__PURE__ */ createElement("select", { "bind:value": selectedMessageObjectIndex }, ...messageObject.contentVersions.map((content, index) => /* @__PURE__ */ createElement("option", { value: index }, new Date(content.isoDateVersionCreated).toLocaleString()))), /* @__PURE__ */ createElement("span", { class: "icon" }, "arrow_drop_down"))), /* @__PURE__ */ createElement("label", { class: "tile" }, /* @__PURE__ */ createElement("span", { class: "icon" }, "sticky_note_2"), /* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("span", null, translation.noteContent), /* @__PURE__ */ createElement( ))), /* @__PURE__ */ createElement("hr", null), /* @__PURE__ */ createElement("label", { class: "tile" }, /* @__PURE__ */ createElement("span", { class: "icon" }, "history"), /* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("span", null, translation.objectVersion), /* @__PURE__ */ createElement("select", { "bind:value": selectedMessageObjectIndex }, ...messageObject.contentVersions.map((content, index) => /* @__PURE__ */ createElement("option", { value: index }, new Date(content.isoDateVersionCreated).toLocaleString()))), /* @__PURE__ */ createElement("span", { class: "icon" }, "arrow_drop_down"))), /* @__PURE__ */ createElement("label", { class: "tile" }, /* @__PURE__ */ createElement("span", { class: "icon" }, "sticky_note_2"), /* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("span", null, translation.noteContent), /* @__PURE__ */ createElement(
"textarea", "textarea",
{ {
rows: "5", rows: "5",
"bind:value": editingNoteContent, "bind:value": editingNoteContent,
placeholder: translation.noteContentPlaceholder placeholder: translation.noteContentPlaceholder
} }
)))), /* @__PURE__ */ createElement("hr", null), /* @__PURE__ */ createElement("button", { class: "danger width-input", "on:click": deleteAndClose }, translation.deleteObject, /* @__PURE__ */ createElement("span", { class: "icon" }, "delete"))), /* @__PURE__ */ createElement("div", { class: "flex-row" }, /* @__PURE__ */ createElement("button", { class: "flex-1 width-100 danger", "on:click": closeModal }, translation.discard), /* @__PURE__ */ createElement("button", { class: "flex-1 width-100 primary", "on:click": saveAndClose }, translation.save, /* @__PURE__ */ createElement("span", { class: "icon" }, "save"))))); ))), /* @__PURE__ */ createElement("hr", null), /* @__PURE__ */ createElement("button", { class: "danger width-input", "on:click": deleteAndClose }, translation.deleteObject, /* @__PURE__ */ createElement("span", { class: "icon" }, "delete")))), /* @__PURE__ */ createElement("div", { class: "flex-row" }, /* @__PURE__ */ createElement("button", { class: "flex-1 width-100 danger", "on:click": closeModal }, translation.discard), /* @__PURE__ */ createElement("button", { class: "flex-1 width-100 primary", "on:click": saveAndClose }, translation.save, /* @__PURE__ */ createElement("span", { class: "icon" }, "save")))));
} }
// src/Views/Objects/objectListEntry.tsx // src/Views/Objects/objectListEntry.tsx
+2 -2
View File
@@ -80,6 +80,7 @@ export function ObjectDetailModal(
<hr></hr> <hr></hr>
<div class="flex-column gap">
<label class="tile"> <label class="tile">
<span class="icon">label</span> <span class="icon">label</span>
<div> <div>
@@ -93,7 +94,6 @@ export function ObjectDetailModal(
<hr></hr> <hr></hr>
<div class="flex-column gap">
<label class="tile"> <label class="tile">
<span class="icon">history</span> <span class="icon">history</span>
<div> <div>
@@ -120,7 +120,6 @@ export function ObjectDetailModal(
></textarea> ></textarea>
</div> </div>
</label> </label>
</div>
<hr></hr> <hr></hr>
@@ -128,6 +127,7 @@ export function ObjectDetailModal(
{translation.deleteObject} {translation.deleteObject}
<span class="icon">delete</span> <span class="icon">delete</span>
</button> </button>
</div>
</main> </main>
<div class="flex-row"> <div class="flex-row">