diff --git a/src/app/App.vue b/src/app/App.vue index 4198cd4181ae5bd1eb4cef0c59a73d9b2b190713..c5176eec4e889513f0ff6f910bf98dba5ce89ae8 100644 --- a/src/app/App.vue +++ b/src/app/App.vue @@ -5,21 +5,27 @@ const visible = ref(false); diff --git a/src/app/assets/main.css b/src/app/assets/main.css index ee3f498f9554ad856ce59d89bb4a298257ef5d0e..47d862b137378901a236f2fa9f8c818a9ef0adff 100644 --- a/src/app/assets/main.css +++ b/src/app/assets/main.css @@ -199,3 +199,23 @@ label { legend { display: block; } +::-webkit-scrollbar { + width: 10px; +} + +/* Track */ +::-webkit-scrollbar-track { + background: #484848; +} + +/* Handle */ +::-webkit-scrollbar-thumb { + border-radius: 5px; + background: #0055ff; + transition: all 0.5s ease; +} + +/* Handle on hover */ +::-webkit-scrollbar-thumb:hover { + background: #0033ff; +} diff --git a/src/app/interfaces/entities.ts b/src/app/interfaces/entities.ts index 956d3fbc7e354521e40a6886eb255e16f393376b..0767db1ca62f04565c4d7a52b3faa31126f43f12 100644 --- a/src/app/interfaces/entities.ts +++ b/src/app/interfaces/entities.ts @@ -3,18 +3,18 @@ import type { IEntity } from '@/app/interfaces/environment'; export interface ITable extends IEntity { entity_type: 'table'; entity_uuid: string; - title?: string; - text?: string; + title?: string | null; + text?: string | null; table_columns: ITableColumn[]; table_data: { - [key: string]: any; + [key: string]: never; }[]; } -interface ITableColumn { +export interface ITableColumn { column_uuid: string; name: string; type: ITableColumnTypes; - data: any; + data: never; } type ITableColumnTypes = | 'text' @@ -29,7 +29,7 @@ type ITableColumnTypes = export interface IText extends IEntity { entity_type: 'text'; entity_uuid: string; - title?: string; + title?: string | null; text: string; font_size?: '16' | '20' | '24' | '40' | '64'; paragraph_size?: 'full' | 'half'; @@ -40,12 +40,12 @@ export interface IText extends IEntity { export interface IImage extends IEntity { entity_type: 'image'; entity_uuid: string; - title?: string; - text?: string; - font_size?: '16' | '20' | '24' | '40' | '64'; - paragraph_size?: 'full' | 'half'; - text_position?: 'left' | 'right'; - image_url: string; + title?: string | null; + text?: string | null; + font_size?: '16' | '20' | '24' | '40' | '64' | null; + paragraph_size?: 'full' | 'half' | null; + text_position?: 'left' | 'right' | null; + imageUrl: string; image_width: number; image_height: number; image_scale: string; diff --git a/src/app/interfaces/environment.ts b/src/app/interfaces/environment.ts index e1159fed91ddc9cd8f6104cd084dec107e747612..c0a1f38281b1cc78fa79cc99d0c2b8a439f3b171 100644 --- a/src/app/interfaces/environment.ts +++ b/src/app/interfaces/environment.ts @@ -1,3 +1,5 @@ +import type { ITableColumn } from '@/app/interfaces/entities'; + export interface ISheet { sheet_uuid: string; title: string; @@ -11,20 +13,22 @@ export interface IEntity { user_nick_name?: string; entity_order?: number; entity_type: string; - title?: string; - text?: string; - font_size?: string; - paragraph_size?: string; - text_position?: string; - image_blob?: string; - image_url?: string; + title?: string | null; + text?: string | null; + font_size?: string | null; + paragraph_size?: string | null; + text_position?: string | null; + image_buffer?: string; + imageUrl?: string; image_width?: number; image_height?: number; entity_position?: string; entity_title_position?: string; image_scale?: string; - table_columns?: string; - table_data?: string; + table_columns?: ITableColumn[]; + table_data?: { + [key: string]: never; + }[]; } export type TThemes = diff --git a/src/components/CreateEntityMenu.vue b/src/components/CreateEntityMenu.vue index bd8d27bb868de6e460a288fed71f159927c9609b..60176cdcaf8502f6414418daa2d8b610c54376be 100644 --- a/src/components/CreateEntityMenu.vue +++ b/src/components/CreateEntityMenu.vue @@ -1,40 +1,40 @@ @@ -126,8 +70,8 @@ const speedDialSizeBigger = computed(() => { :style="`width: ${props.entityData.image_width}px; height: ${props.entityData.image_height}px`" > -import { deleteEntity } from '@/app/helpers'; import type { IImage } from '@/app/interfaces/entities'; +import { deleteEntity } from '@/app/helpers'; interface Props { entityData: IImage; @@ -12,7 +12,7 @@ const emit = defineEmits([ 'removeTitle', 'addText', 'removeText', - 'openUploadFileModal' + 'openCropImageModal' ]); const speedDialState = computed(() => { @@ -51,7 +51,7 @@ const speedDialState = computed(() => { state.push({ label: 'Crop', icon: 'pi pi-expand', - command: () => emit('openUploadFileModal') + command: () => emit('openCropImageModal') }); } state.push({ @@ -82,7 +82,8 @@ const speedDialState = computed(() => {