From 953af8d5426b41148b51b19aa7f58dcf40938b14 Mon Sep 17 00:00:00 2001 From: Tormak <63308171+Tormak9970@users.noreply.github.com> Date: Sun, 23 Apr 2023 15:03:09 -0500 Subject: [PATCH] feat: added notes indicator to grids --- src/components/core/grids/Grid.svelte | 10 ++++++ .../toast-modals/GridPreviewModal.svelte | 31 +++++++++++++++---- src/lib/models/SGDB.ts | 2 ++ 3 files changed, 37 insertions(+), 6 deletions(-) diff --git a/src/components/core/grids/Grid.svelte b/src/components/core/grids/Grid.svelte index 8aace332..948c10ab 100644 --- a/src/components/core/grids/Grid.svelte +++ b/src/components/core/grids/Grid.svelte @@ -27,6 +27,14 @@ + {#if grid?.notes} +
+ + + + +
+ {/if}
{grid.author}'s {$gridType} image @@ -130,5 +138,7 @@ } .show-view { top: 2px; } + .show-notes { cursor: default; top: 30px; } + .show-notes:hover { cursor: default; opacity: 0.8; } .grid:hover > .image-control { display: flex; } \ No newline at end of file diff --git a/src/components/toast-modals/GridPreviewModal.svelte b/src/components/toast-modals/GridPreviewModal.svelte index eb123afc..246cf565 100644 --- a/src/components/toast-modals/GridPreviewModal.svelte +++ b/src/components/toast-modals/GridPreviewModal.svelte @@ -31,7 +31,7 @@ "Capsule": 300, "Wide Capsule": 600, "Hero": 956, - "Logo": 200, + "Logo": 600, "Icon": 60, }; @@ -39,7 +39,7 @@ "Capsule": 450, "Wide Capsule": 291, "Hero": 342, - "Logo": 134, + "Logo": 402, "Icon": 60, }; @@ -55,7 +55,7 @@
-
+
{$gridModalInfo?.author}'s {$gridType} image @@ -73,12 +73,12 @@
Style: {$gridModalInfo?.style}
Dimensions: {$gridModalInfo?.width}x{$gridModalInfo?.height}
- - {#if $gridType == GridTypes.CAPSULE} + {#if $gridModalInfo?.notes} +
Notes:
-
{$gridModalInfo}
+
{$gridModalInfo?.notes}
{:else}
{/if} @@ -172,6 +172,18 @@ justify-content: space-between; } + .logo .info { + margin-bottom: 10px; + margin-left: 14px; + margin-right: 10px; + min-width: 200px; + min-height: calc(100% - 20px); + + display: flex; + flex-direction: column; + justify-content: space-between; + } + .img-cont { padding: 10px; } .img-cont > .img { @@ -179,6 +191,13 @@ overflow: hidden; } + .img-background { + border-radius: 8px; + background-color: #a3a3a3; + background-image: linear-gradient(140deg, #adadad 0%, #727272 50%, #535353 75%); + padding: 5px; + } + .author { display: flex; align-items: center; diff --git a/src/lib/models/SGDB.ts b/src/lib/models/SGDB.ts index 548cd345..63760c35 100644 --- a/src/lib/models/SGDB.ts +++ b/src/lib/models/SGDB.ts @@ -42,6 +42,8 @@ export interface SGDBImage { height: number; epilepsy: boolean; nsfw: boolean; + language: string; + notes: string|null; } export interface SGDBOptions {