improve objectEntry layout

This commit is contained in:
marlon-erler
2024-07-12 15:45:26 +02:00
parent 4a6b86220e
commit bb5550a8fe
6 changed files with 30 additions and 10 deletions
+2 -2
View File
@@ -8,8 +8,8 @@
--footer-top-line: calc(var(--control-height) + var(--safe-area-bottom)); --footer-top-line: calc(var(--control-height) + var(--safe-area-bottom));
} }
.object-entry-wide { .object-entry-wide {
width: 280px; width: 320px;
min-width: 280px; min-width: 320px;
} }
#message-tab { #message-tab {
flex-direction: column; flex-direction: column;
+11 -3
View File
@@ -1428,6 +1428,7 @@
const fields = { const fields = {
[icons.noteContent]: "---", [icons.noteContent]: "---",
[icons.priority]: "---", [icons.priority]: "---",
[icons.categoryName]: "---",
[icons.status]: "---", [icons.status]: "---",
[icons.date]: "---", [icons.date]: "---",
[icons.time]: "---" [icons.time]: "---"
@@ -1442,7 +1443,7 @@
}); });
const fieldElements = Object.entries(fields).map((field) => { const fieldElements = Object.entries(fields).map((field) => {
const [icon, value] = field; const [icon, value] = field;
return /* @__PURE__ */ createElement("span", { class: "flex-row control-gap align-center" }, /* @__PURE__ */ createElement("span", { class: "icon" }, icon), /* @__PURE__ */ createElement("span", { class: "ellipsis" }, value)); return /* @__PURE__ */ createElement("span", { class: "flex-row control-gap flex align-center padding-right ellipsis" }, /* @__PURE__ */ createElement("span", { class: "icon" }, icon), /* @__PURE__ */ createElement("span", { class: "ellipsis" }, value));
}); });
return /* @__PURE__ */ createElement( return /* @__PURE__ */ createElement(
"button", "button",
@@ -1452,7 +1453,14 @@
draggable: "true", draggable: "true",
"on:dragstart": dragStart "on:dragstart": dragStart
}, },
/* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("b", { class: "ellipsis" }, chat.getObjectTitle(messageObject)), /* @__PURE__ */ createElement("hr", null), /* @__PURE__ */ createElement("span", { class: "flex-column gap height-100 flex secondary ellipsis " }, ...fieldElements)) /* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("b", { class: "ellipsis" }, chat.getObjectTitle(messageObject)), /* @__PURE__ */ createElement("hr", null), /* @__PURE__ */ createElement(
"span",
{
class: "grid height-100 flex secondary",
style: "grid-template-columns: 1fr 1fr"
},
...fieldElements
))
); );
} }
@@ -1475,7 +1483,7 @@
"div", "div",
{ {
class: "width-100 max-height-100 grid gap padding scroll-v", class: "width-100 max-height-100 grid gap padding scroll-v",
style: "grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));", style: "grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));",
"children:prepend": [messageObjects, objectConverter] "children:prepend": [messageObjects, objectConverter]
} }
); );
+8
View File
@@ -616,10 +616,18 @@ label.tile:has(> span.icon) {
padding-left: var(--control-padding); padding-left: var(--control-padding);
} }
.padding-left {
padding-left: var(--control-padding) !important;
}
label.tile:has(> span.icon) :is(input, select, textarea) { label.tile:has(> span.icon) :is(input, select, textarea) {
padding-left: 0px; padding-left: 0px;
} }
.padding-right {
padding-right: var(--control-padding) !important;
}
.padding-bottom { .padding-bottom {
padding-bottom: var(--control-padding) !important; padding-bottom: var(--control-padding) !important;
} }
+6 -2
View File
@@ -28,6 +28,7 @@ export function ObjectEntryView(
const fields = { const fields = {
[icons.noteContent]: "---", [icons.noteContent]: "---",
[icons.priority]: "---", [icons.priority]: "---",
[icons.categoryName]: "---",
[icons.status]: "---", [icons.status]: "---",
[icons.date]: "---", [icons.date]: "---",
[icons.time]: "---", [icons.time]: "---",
@@ -46,7 +47,7 @@ export function ObjectEntryView(
const fieldElements = Object.entries(fields).map((field) => { const fieldElements = Object.entries(fields).map((field) => {
const [icon, value] = field; const [icon, value] = field;
return ( return (
<span class="flex-row control-gap align-center"> <span class="flex-row control-gap flex align-center padding-right ellipsis">
<span class="icon">{icon}</span> <span class="icon">{icon}</span>
<span class="ellipsis">{value}</span> <span class="ellipsis">{value}</span>
</span> </span>
@@ -63,7 +64,10 @@ export function ObjectEntryView(
<div> <div>
<b class="ellipsis">{chat.getObjectTitle(messageObject)}</b> <b class="ellipsis">{chat.getObjectTitle(messageObject)}</b>
<hr></hr> <hr></hr>
<span class="flex-column gap height-100 flex secondary ellipsis "> <span
class="grid height-100 flex secondary"
style="grid-template-columns: 1fr 1fr"
>
{...fieldElements} {...fieldElements}
</span> </span>
</div> </div>
+1 -1
View File
@@ -29,7 +29,7 @@ export function ObjectGridView(
) : ( ) : (
<div <div
class="width-100 max-height-100 grid gap padding scroll-v" class="width-100 max-height-100 grid gap padding scroll-v"
style="grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));" style="grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));"
children:prepend={[messageObjects, objectConverter]} children:prepend={[messageObjects, objectConverter]}
></div> ></div>
); );
+2 -2
View File
@@ -10,8 +10,8 @@
} }
.object-entry-wide { .object-entry-wide {
width: 280px; width: 320px;
min-width: 280px; min-width: 320px;
} }
#message-tab { #message-tab {