Open-source and local-first Slack and Notion alternative that puts you in control of your data
TypeScript chatchat-applicationcrdteditorelectronknowledge-baselocal-firstnotionnotion-alternativerealtime-collaborationself-hostedslacksqliteteam-collaborationwikiyjs
Improve UI for file preview
Hakan Shehu57cdbe4ade35
diff --git a/apps/desktop/src/main/bootstrapper.ts b/apps/desktop/src/main/bootstrapper.tsindex f8a11901..d7565fc5 100644--- a/apps/desktop/src/main/bootstrapper.ts+++ b/apps/desktop/src/main/bootstrapper.ts@@ -50,7 +50,6 @@ class Bootstrapper {await serverService.syncServers();await accountService.syncAccounts();await socketService.checkConnections();- await accountService.syncDeletedTokens();await syncService.syncAllWorkspaces();await fileService.syncFiles();diff --git a/apps/desktop/src/main/services/account-service.ts b/apps/desktop/src/main/services/account-service.tsindex ca16b12d..89eb4e6e 100644--- a/apps/desktop/src/main/services/account-service.ts+++ b/apps/desktop/src/main/services/account-service.ts@@ -230,7 +230,7 @@ class AccountService {.execute();if (deletedTokens.length === 0) {- this.logger.info('No deleted tokens found');+ this.logger.debug('No deleted tokens found');return;}diff --git a/apps/desktop/src/renderer/components/files/file-block.tsx b/apps/desktop/src/renderer/components/files/file-block.tsxindex 6b826b30..9a0550b2 100644--- a/apps/desktop/src/renderer/components/files/file-block.tsx+++ b/apps/desktop/src/renderer/components/files/file-block.tsx@@ -21,7 +21,7 @@ export const FileBlock = ({ id }: FileBlockProps) => {return (<div- className="flex h-72 max-h-72 w-full cursor-pointer overflow-hidden rounded-md p-2 hover:bg-gray-100"+ className="flex h-72 max-h-72 max-w-128 w-full cursor-pointer overflow-hidden rounded-md p-2 hover:bg-gray-100"onClick={() => {workspace.openInModal(id);}}diff --git a/apps/desktop/src/renderer/components/files/file-download.tsx b/apps/desktop/src/renderer/components/files/file-download.tsxindex 4c856021..942f8b1d 100644--- a/apps/desktop/src/renderer/components/files/file-download.tsx+++ b/apps/desktop/src/renderer/components/files/file-download.tsx@@ -13,35 +13,35 @@ export const FileDownload = ({ id, downloadProgress }: FileDownloadProps) => {const { mutate } = useMutation();const isDownloading = typeof downloadProgress === 'number';- if (!isDownloading) {- return (- <div- className="flex cursor-pointer flex-col items-center gap-3 text-muted-foreground hover:text-primary"- onClick={(e) => {- e.stopPropagation();- e.preventDefault();-- mutate({- input: {- type: 'file_download',- userId: workspace.userId,- fileId: id,- },- });- }}- >- <Download className="size-10" />- <p className="text-sm">- File is not downloaded in your device. Click to download.- </p>- </div>- );- }-return (- <div className="flex flex-col items-center gap-3 text-muted-foreground">- <Spinner className="h-10 w-10" />- <p className="text-sm">Downloading file...</p>+ <div className="flex h-full w-full items-center justify-center">+ {isDownloading ? (+ <div className="flex flex-col items-center gap-3 text-muted-foreground">+ <Spinner className="size-8" />+ <p className="text-sm">Downloading file...</p>+ </div>+ ) : (+ <div+ className="flex cursor-pointer flex-col items-center gap-3 text-muted-foreground hover:text-primary"+ onClick={(e) => {+ e.stopPropagation();+ e.preventDefault();++ mutate({+ input: {+ type: 'file_download',+ userId: workspace.userId,+ fileId: id,+ },+ });+ }}+ >+ <Download className="size-8" />+ <p className="text-sm">+ File is not downloaded in your device. Click to download.+ </p>+ </div>+ )}</div>);};diff --git a/apps/desktop/tailwind.config.js b/apps/desktop/tailwind.config.jsindex 24d2499d..20105f95 100644--- a/apps/desktop/tailwind.config.js+++ b/apps/desktop/tailwind.config.js@@ -78,12 +78,15 @@ module.exports = {},spacing: {128: '32rem',+ 256: '64rem',},width: {128: '32rem',+ 256: '64rem',},height: {128: '32rem',+ 256: '64rem',},},},