diff --git a/front/js/svelte/content/Table.svelte b/front/js/svelte/content/Table.svelte index bb90c62..eb69072 100644 --- a/front/js/svelte/content/Table.svelte +++ b/front/js/svelte/content/Table.svelte @@ -7,6 +7,7 @@ import {selectRecord, toggleAll} from "./functions/recordSelect.js"; import Checkbox from "../common/Checkbox.svelte"; import Preview from "../files/Preview.svelte"; + import {fileurl} from "../files/imageserver.js"; const channel = getContext("channel"); @@ -80,15 +81,38 @@ {/if} {#if record._file?.path} - 0 ? "medium" : "tiny"}/> +
+ 0 ? "medium" : "small"}/> +
+ + {previewTitle(channel.schemas, record, graph)} + + {(record._file.size / 1024).toFixed(1)}kB + + {#if record._file.width > 0} + {record._file.width + "x" + record._file.height} + {/if} + + Download + +
+ +
+ {:else} + + {previewTitle(channel.schemas, record, graph)} + {/if} - - {previewTitle(channel.schemas, record, graph)} - + diff --git a/front/js/svelte/records/FilePreview.svelte b/front/js/svelte/records/FilePreview.svelte index 10a1e33..32166f8 100644 --- a/front/js/svelte/records/FilePreview.svelte +++ b/front/js/svelte/records/FilePreview.svelte @@ -7,49 +7,42 @@ {#if schema.type === "files"} -
-
+
+
-
-
    -
  • - Filename - {record._file.path} -
  • -
  • - Original name - {record._file.originalName} -
  • -
  • - Mime type - {record._file.mime} -
  • - {#if record._file.width} -
  • - Dimensions - {record._file.width}x{record._file.height} -
  • - {/if} -
  • - File size - {(record._file.size / 1024).toFixed(1)}kB -
  • -
  • - Checksum - {record._file.checksum} -
  • -
  • - Download - {record._file.path} -
  • -
+
+ +
+ Filename + {record._file.path} +
+
+ Original name + {record._file.originalName} +
+
+ Mime type + {record._file.mime} +
+ {#if record._file.width} +
+ Dimensions + {record._file.width}x{record._file.height} +
+ {/if} +
+ File size + {(record._file.size / 1024).toFixed(1)}kB +
+
+ Checksum + {record._file.checksum} +
+
+ Download +
{/if} - diff --git a/front/js/svelte/records/Preview.js b/front/js/svelte/records/Preview.js index d78fa5d..694154f 100644 --- a/front/js/svelte/records/Preview.js +++ b/front/js/svelte/records/Preview.js @@ -36,10 +36,7 @@ export function previewTitle(schemas, record, graph) { function noTemplate(schema, record) { if (schema?.type === "files") { - if(record._file.width === 0){ - return record._file.path; - } - return record._file.path + " " + record._file.width+"x"+record._file.height ; + return record._file.path; } let title = stripHtml( diff --git a/front/sass/_dialog.scss b/front/sass/_dialog.scss index c0b50a8..c4b6e26 100644 --- a/front/sass/_dialog.scss +++ b/front/sass/_dialog.scss @@ -21,7 +21,7 @@ dialog { border-radius: 12px; overflow: auto; max-height: 96vh; - box-shadow: none; + box-shadow: none!important; //position: relative; .close { diff --git a/front/sass/_dropdown.scss b/front/sass/_dropdown.scss index 2e0ac0b..4b2faf5 100644 --- a/front/sass/_dropdown.scss +++ b/front/sass/_dropdown.scss @@ -24,6 +24,7 @@ flex-grow: 1; top: 35px; min-width: max-content; + border: 1px solid var(--p30); &.orientation-right { diff --git a/front/sass/_record-edit.scss b/front/sass/_record-edit.scss index f908a2b..f6dd2dc 100644 --- a/front/sass/_record-edit.scss +++ b/front/sass/_record-edit.scss @@ -44,12 +44,25 @@ margin: 6px 0; border-color: transparent; - .button{ + .button { background: var(--p30); - &:hover{ + + &:hover { background: var(--p40); } } + + dialog { + .button { + background: var(--p20); + + &:hover { + background: var(--p30); + } + } + } + + } .field-header { @@ -109,4 +122,24 @@ line-height: 14px; } +} + +.record-edit-file-preview { + display: flex; + gap: 20px; + + .file-details { + width: 50%; + display: flex; + flex-direction: column; + gap: 5px; + + } + + .file-details-item { + .text-muted { + color: var(--grey-dark); + } + + } } \ No newline at end of file diff --git a/front/sass/_table.scss b/front/sass/_table.scss index 1b602b9..2011a75 100644 --- a/front/sass/_table.scss +++ b/front/sass/_table.scss @@ -1,106 +1,128 @@ .table { - min-width: 600px; - overflow: auto; + min-width: 600px; + overflow: auto; + background: var(--p20); + padding: 1px; + font-size: 14px; + border-radius: 12px; + + table { background: var(--p20); - padding: 1px; - font-size: 14px; + width: 100%; + border-collapse: separate; + border: none; + border-spacing: 0; + } + + thead { border-radius: 12px; - table { + + tr { + border-radius: 12px; + } + + } + + th { + font-size: 14px; + font-weight: normal; + white-space: nowrap; + max-width: 400px; + border: none; + background: var(--p20); + text-align: left; + padding: 8px 16px; + + &.is-sort { + font-weight: 700; + } + + &:first-child { + border-radius: 12px 0 0 0; + } + + &:last-child { + border-radius: 0 12px 0 0; + } + } + + td { + font-weight: normal; + white-space: nowrap; + max-width: 400px; + height: 48px; + padding: 4px 16px; + border: none; + overflow: hidden; + + + //img{ + // width: 48px; + //} + + .status { + color: var(--text); + font-size: 80%; + } + + .row-name { + display: flex; + align-items: center; + gap: 6px; + } + + .title-td-contents { + display: flex; + align-items: center; + gap: 6px; + font-size: 14px; + line-height: 14px; + } + } + + tbody { + tr { + border-radius: 12px; + background: var(--p10); + border: none; + + &:has(input:checked) { + background: var(--p30); + } + + &:hover { background: var(--p20); - width: 100%; - border-collapse:separate; - border: none; - border-spacing: 0; + } } - thead{ - border-radius: 12px; - tr{ - border-radius: 12px; - } - - } - - th { - font-size: 14px; - font-weight: normal; - white-space: nowrap; - max-width: 400px; - border: none; - background: var(--p20); - text-align: left; - padding: 8px 16px; - - &.is-sort { - font-weight: 700; - } - &:first-child{ - border-radius: 12px 0 0 0 ; - } - &:last-child{ - border-radius: 0 12px 0 0; - } - } - - td { - font-weight: normal; - white-space: nowrap; - max-width: 400px; - height: 48px; - padding: 4px 16px; - border: none; - overflow: hidden; + } - //img{ - // width: 48px; - //} + tr:nth-child(odd) { + //background-color: #f9f9f9; + } - .status{ - color:var(--text); - font-size: 80%; - } - .row-name{ - display: flex; - align-items: center; - gap: 6px; - } + td:nth-child(odd) { + // border-left: 1px solid #e4e4e4; + // border-right: 1px solid #e4e4e4; + } - .title-td-contents{ - display: flex; - align-items: center; - gap: 6px; - font-size: 14px; - line-height: 14px; - } - } - tbody{ - tr { - border-radius: 12px; - background: var(--p10); - border: none; - &:has(input:checked){ - background: var(--p30); - } - &:hover{ - background: var(--p20); - } - } - } + th:nth-child(odd) { + } - tr:nth-child(odd) { - //background-color: #f9f9f9; - } - - td:nth-child(odd) { - // border-left: 1px solid #e4e4e4; - // border-right: 1px solid #e4e4e4; - } - th:nth-child(odd) { - - } - - .field-ui-number { - text-align: right; - } + .field-ui-number { + text-align: right; + } +} + +.file-table-row { + display: flex; + align-items: center; + gap: 5px; + + & > div { + display: flex; + flex-flow: column; + gap: 5px; + } }