From 75a7c44f9615c4ac024403011a968f8b3038c500 Mon Sep 17 00:00:00 2001 From: Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> Date: Tue, 18 Jul 2023 01:00:46 -0400 Subject: added number inputs to right hand side --- src/Utils.ts | 16 ++++ src/client/util/SharingManager.scss | 1 + src/client/util/SharingManager.tsx | 16 +++- src/client/views/DashboardView.tsx | 4 +- src/client/views/PropertiesButtons.tsx | 46 ----------- src/client/views/PropertiesView.scss | 2 +- src/client/views/PropertiesView.tsx | 90 +++++++++++++++------- src/client/views/UndoStack.tsx | 6 +- src/client/views/nodes/FontIconBox/FontIconBox.tsx | 5 +- src/client/views/pdf/AnchorMenu.tsx | 52 +++++++------ src/client/views/selectedDoc/SelectedDocView.tsx | 2 +- src/client/views/topbar/TopBar.tsx | 15 +--- 12 files changed, 136 insertions(+), 119 deletions(-) (limited to 'src') diff --git a/src/Utils.ts b/src/Utils.ts index 2e06b5631..e03632c8b 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -6,6 +6,7 @@ import { Socket } from 'socket.io'; import { Colors } from './client/views/global/globalEnums'; import { Message } from './server/Message'; import Color = require('color'); +import { DocumentType } from './client/documents/DocumentTypes'; export namespace Utils { export let CLICK_TIME = 300; @@ -15,6 +16,21 @@ export namespace Utils { return Date.now() - downTime < Utils.CLICK_TIME && Math.abs(x - downX) < Utils.DRAG_THRESHOLD && Math.abs(y - downY) < Utils.DRAG_THRESHOLD; } + export function cleanDocumentType(type: DocumentType) { + switch(type) { + case DocumentType.IMG: + return "Image" + case DocumentType.AUDIO: + return "Audio" + case DocumentType.COL: + return "Collection" + case DocumentType.RTF: + return "Text" + default: + return type.charAt(0).toUpperCase() + type.slice(1) + } + } + export function readUploadedFileAsText(inputFile: File) { const temporaryFileReader = new FileReader(); diff --git a/src/client/util/SharingManager.scss b/src/client/util/SharingManager.scss index 05401e2cd..b11e694ff 100644 --- a/src/client/util/SharingManager.scss +++ b/src/client/util/SharingManager.scss @@ -12,6 +12,7 @@ } .sharing-contents { + padding: 10px; display: flex; flex-direction: column; diff --git a/src/client/util/SharingManager.tsx b/src/client/util/SharingManager.tsx index 8e5ae7bc0..33c9992d0 100644 --- a/src/client/util/SharingManager.tsx +++ b/src/client/util/SharingManager.tsx @@ -551,7 +551,12 @@ export class SharingManager extends React.Component<{}> { return (