Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
chore: update resource dashboard
Stevene32a585bbf79
diff --git a/web/src/components/MemoEditor/ActionButton/UploadResourceButton.tsx b/web/src/components/MemoEditor/ActionButton/UploadResourceButton.tsxindex 378cbcbc5..3e608c5ea 100644--- a/web/src/components/MemoEditor/ActionButton/UploadResourceButton.tsx+++ b/web/src/components/MemoEditor/ActionButton/UploadResourceButton.tsx@@ -66,7 +66,7 @@ const UploadResourceButton = () => {return (<IconButton size="sm">- <Icon.Image className="w-5 h-5 mx-auto" />+ <Icon.Paperclip className="w-5 h-5 mx-auto" /><inputclassName="absolute inset-0 w-full h-full opacity-0 cursor-pointer"ref={fileInputRef}diff --git a/web/src/components/ResourceIcon.tsx b/web/src/components/ResourceIcon.tsxindex 311b56928..4ac9e537b 100644--- a/web/src/components/ResourceIcon.tsx+++ b/web/src/components/ResourceIcon.tsx@@ -27,7 +27,7 @@ const ResourceIcon = (props: Props) => {return (<SquareDiv className={clsx(className, "flex items-center justify-center overflow-clip")}><img- className="min-w-full min-h-full object-cover border rounded dark:border-none"+ className="min-w-full min-h-full object-cover"src={resource.externalLink ? resourceUrl : resourceUrl + "?thumbnail=1"}onClick={() => showPreviewImageDialog(resourceUrl)}decoding="async"diff --git a/web/src/pages/Resources.tsx b/web/src/pages/Resources.tsxindex ce8b47734..15397e933 100644--- a/web/src/pages/Resources.tsx+++ b/web/src/pages/Resources.tsx@@ -1,7 +1,6 @@import { Divider, IconButton, Input, Tooltip } from "@mui/joy";import { includes } from "lodash-es";import { useEffect, useState } from "react";-import { Link } from "react-router-dom";import { showCommonDialog } from "@/components/Dialog/CommonDialog";import Empty from "@/components/Empty";import Icon from "@/components/Icon";@@ -10,7 +9,7 @@ import ResourceIcon from "@/components/ResourceIcon";import { resourceServiceClient } from "@/grpcweb";import useLoading from "@/hooks/useLoading";import i18n from "@/i18n";-import { extractMemoIdFromName, useMemoStore } from "@/store/v1";+import { useMemoStore } from "@/store/v1";import { Resource } from "@/types/proto/api/v1/resource_service";import { useTranslate } from "@/utils/i18n";@@ -118,7 +117,6 @@ const Resources = () => {</div><div className="w-full max-w-[calc(100%-4rem)] sm:max-w-[calc(100%-6rem)] flex flex-row justify-start items-start gap-4 flex-wrap">{resources.map((resource) => {- const relatedMemo = resource.memo ? memoStore.getMemoByName(resource.memo) : null;return (<div key={resource.name} className="w-24 sm:w-32 h-auto flex flex-col justify-start items-start"><div className="w-24 h-24 flex justify-center items-center sm:w-32 sm:h-32 border dark:border-zinc-900 overflow-clip rounded-xl cursor-pointer hover:shadow hover:opacity-80">@@ -126,14 +124,6 @@ const Resources = () => {</div><div className="w-full max-w-full flex flex-row justify-between items-center mt-1 px-1"><p className="text-xs shrink text-gray-400 truncate">{resource.filename}</p>- {relatedMemo && (- <Link- className="shrink-0 text-xs ml-1 text-gray-400 hover:underline hover:text-blue-600"- to={`/m/${relatedMemo.uid}`}- >- #{extractMemoIdFromName(relatedMemo.name)}- </Link>- )}</div></div>);