Skip to content

armgit / memos

Public Imported from GitHub
0

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.

chore: update about dialog

Stevenf5c1e7919558
diff --git a/web/src/components/AboutSiteDialog.tsx b/web/src/components/AboutSiteDialog.tsx
index ae6062361..bff26dbf7 100644
--- a/web/src/components/AboutSiteDialog.tsx
+++ b/web/src/components/AboutSiteDialog.tsx
@@ -1,7 +1,7 @@
+import { Divider } from "@mui/joy";
import { useGlobalStore } from "@/store/module";
import { useTranslate } from "@/utils/i18n";
import { generateDialog } from "./Dialog";
-import GitHubBadge from "./GitHubBadge";
import Icon from "./Icon";
type Props = DialogProps;
@@ -28,36 +28,14 @@ const AboutSiteDialog: React.FC<Props> = ({ destroy }: Props) => {
</div>
<div className="flex flex-col justify-start items-start max-w-full w-96">
<p className="text-xs">{t("about.memos-description")}</p>
- <p className="text-sm mt-2 ">{customizedProfile.description || t("about.no-server-description")}</p>
- <div className="mt-4 w-full flex flex-row text-sm justify-start items-center">
- <div className="flex flex-row justify-start items-center mr-2">
- {t("about.powered-by")}
- <a href="https://usememos.com" target="_blank" className="flex flex-row justify-start items-center mx-1 hover:underline">
- <img className="w-6 h-auto rounded-full mr-1" src="/logo.png" alt="" />
- memos
- </a>
- <span>v{profile.version}</span>
- </div>
- <GitHubBadge />
- </div>
- <div className="border-t w-full mt-3 pt-2 text-sm flex flex-row justify-start items-center space-x-2">
- <span className="text-gray-500">{t("about.other-projects")}:</span>
- <a href="https://github.com/boojack/slash" target="_blank" className="flex items-center underline text-blue-600 hover:opacity-80">
- <img className="w-5 h-auto mr-1 rounded-full" src="https://github.com/boojack/slash/raw/main/resources/logo.png" alt="" />
- <span>Slash</span>
- </a>
- <a
- href="https://github.com/boojack/sticky-notes"
- target="_blank"
- className="flex items-center underline text-blue-600 hover:opacity-80"
- >
- <img
- className="w-5 h-auto mr-1"
- src="https://raw.githubusercontent.com/boojack/sticky-notes/main/public/sticky-notes.ico"
- alt=""
- />
- <span>Sticky notes</span>
+ <p className="text-sm mt-2">{customizedProfile.description || t("about.no-server-description")}</p>
+ <Divider className="!my-3" />
+ <div className="w-full flex flex-row justify-start items-center text-sm italic">
+ {t("about.powered-by")}
+ <a className="shrink-0 flex flex-row justify-start items-center mx-1 hover:underline" href="https://usememos.com" target="_blank">
+ <img className="w-auto h-7" src="https://www.usememos.com/full-logo-landscape.png" alt="" />
</a>
+ <span>v{profile.version}</span>
</div>
</div>
</>
diff --git a/web/src/components/CreateMemoRelationDialog.tsx b/web/src/components/CreateMemoRelationDialog.tsx
index 83d3958ef..cc78d4a17 100644
--- a/web/src/components/CreateMemoRelationDialog.tsx
+++ b/web/src/components/CreateMemoRelationDialog.tsx
@@ -89,7 +89,7 @@ const CreateMemoRelationDialog: React.FC<Props> = (props: Props) => {
onChange={handleMemoIdChanged}
onKeyDown={handleMemoIdInputKeyDown}
fullWidth
- endDecorator={<Icon.PlusCircle onClick={handleSaveBtnClick} className="w-4 h-auto cursor-pointer hover:opacity-80" />}
+ endDecorator={<Icon.Check onClick={handleSaveBtnClick} className="w-4 h-auto cursor-pointer hover:opacity-80" />}
/>
{memoList.length > 0 && (
<>
diff --git a/web/src/components/GitHubBadge.tsx b/web/src/components/GitHubBadge.tsx
deleted file mode 100644
index c184c67a3..000000000
--- a/web/src/components/GitHubBadge.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-import { useEffect, useState } from "react";
-import * as api from "@/helpers/api";
-import Icon from "./Icon";
-
-const GitHubBadge = () => {
- const [starCount, setStarCount] = useState(0);
-
- useEffect(() => {
- api.getRepoStarCount().then((data) => {
- setStarCount(data);
- });
- }, []);
-
- return (
- <a
- className="h-7 flex flex-row justify-start items-center border dark:border-zinc-600 rounded cursor-pointer hover:opacity-80"
- href="https://github.com/usememos/memos"
- target="_blank"
- >
- <div className="apply w-auto h-full px-2 flex flex-row justify-center items-center text-xs bg-gray-100 dark:bg-zinc-700">
- <Icon.Github className="mr-1 w-4 h-4" />
- Star
- </div>
- <div className="w-auto h-full flex flex-row justify-center items-center px-3 text-xs font-bold">{starCount || ""}</div>
- </a>
- );
-};
-
-export default GitHubBadge;
diff --git a/web/src/helpers/api.ts b/web/src/helpers/api.ts
index 6d31ac0ff..9d44194d5 100644
--- a/web/src/helpers/api.ts
+++ b/web/src/helpers/api.ts
@@ -180,16 +180,6 @@ export function deleteIdentityProvider(id: IdentityProviderId) {
return axios.delete(`/api/v1/idp/${id}`);
}
-export async function getRepoStarCount() {
- const { data } = await axios.get(`https://api.github.com/repos/usememos/memos`, {
- headers: {
- Accept: "application/vnd.github.v3.star+json",
- Authorization: "",
- },
- });
- return data.stargazers_count as number;
-}
-
export async function getRepoLatestTag() {
const { data } = await axios.get(`https://api.github.com/repos/usememos/memos/tags`, {
headers: {