diff --git a/.dockerignore b/.dockerignore index d465134..24d81c8 100644 --- a/.dockerignore +++ b/.dockerignore @@ -10,4 +10,7 @@ memos .golangci.yaml .dockerignore docs/ -.DS_Store \ No newline at end of file +.DS_Store +memos_prod.db +memos_prod.db-shm +memos_prod.db-wal diff --git a/.gitignore b/.gitignore index 6b0f279..60ba1aa 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,8 @@ dist # Frontend test coverage output (Vitest + @vitest/coverage-v8). web/coverage/ + +# Database +memos_prod.db +memos_prod.db-shm +memos_prod.db-wal diff --git a/README.md b/README.md index deacb94..094d282 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,14 @@ +# anian-memos + +> 基于原作者v0.29.1代码修改 + +#### v0.29.1-1 +1. 修改默认配置 + + + + +

Featured Sponsors

diff --git a/server/notification/email.go b/server/notification/email.go index a353155..cfb3fe9 100644 --- a/server/notification/email.go +++ b/server/notification/email.go @@ -117,8 +117,8 @@ func EmailConfigFromInstanceSetting(setting *storepb.InstanceNotificationSetting func NewTestEmailMessage(recipientEmail, replyTo string) *email.Message { return &email.Message{ To: []string{recipientEmail}, - Subject: "[Memos] Test email", - Body: "This is a test email from your Memos notification settings.", + Subject: "[阿年的备忘录] 测试邮件", + Body: "这是一封测试邮件,说明通知邮件设置已正确配置。", ReplyTo: replyTo, } } @@ -161,19 +161,17 @@ func (d *EmailDispatcher) buildMemoCommentEmailMessage(message *storepb.InboxMes } body := []string{ - fmt.Sprintf("Hi %s,", displayNameForEmail(receiver)), + fmt.Sprintf("%s,你好:", displayNameForEmail(receiver)), "", - fmt.Sprintf("%s commented on your memo.", senderName), + fmt.Sprintf("%s 评论了你的备忘录。", senderName), "", - "Open in Memos:", + "前往查看:", url, - "", - "You are receiving this because you own this memo.", } return &email.Message{ To: []string{receiver.Email}, - Subject: fmt.Sprintf("[Memos] %s commented on your memo", senderName), + Subject: fmt.Sprintf("[阿年的备忘录] %s评论了你的备忘录", senderName), Body: strings.Join(body, "\n"), }, nil } @@ -193,19 +191,17 @@ func (d *EmailDispatcher) buildMemoMentionEmailMessage(message *storepb.InboxMes } body := []string{ - fmt.Sprintf("Hi %s,", displayNameForEmail(receiver)), + fmt.Sprintf("%s,你好:", displayNameForEmail(receiver)), "", - fmt.Sprintf("%s mentioned you in a memo.", senderName), + fmt.Sprintf("%s 在备忘录中提到了你。", senderName), "", - "Open in Memos:", + "前往查看:", url, - "", - "You are receiving this because you were mentioned in this memo.", } return &email.Message{ To: []string{receiver.Email}, - Subject: fmt.Sprintf("[Memos] %s mentioned you in a memo", senderName), + Subject: fmt.Sprintf("[阿年的备忘录] %s在备忘录中提到了你", senderName), Body: strings.Join(body, "\n"), }, nil } diff --git a/server/router/api/v1/user_service.go b/server/router/api/v1/user_service.go index 0d1a040..2516d91 100644 --- a/server/router/api/v1/user_service.go +++ b/server/router/api/v1/user_service.go @@ -431,7 +431,7 @@ func getDeleteUserAttachmentStorageSetting(ctx context.Context, stores *store.St func getDefaultUserGeneralSetting() *v1pb.UserSetting_GeneralSetting { return &v1pb.UserSetting_GeneralSetting{ - Locale: "en", + Locale: "zh-Hans", MemoVisibility: "PRIVATE", Theme: "", } diff --git a/server/router/rss/rss.go b/server/router/rss/rss.go index f30c65c..63448ff 100644 --- a/server/router/rss/rss.go +++ b/server/router/rss/rss.go @@ -329,7 +329,7 @@ func (*RSSService) generateItemTitle(content string) string { // If title is empty, use a default if title == "" { - title = "Memo" + title = "阿年的备忘录" } return title @@ -416,9 +416,9 @@ func getRSSHeading(ctx context.Context, stores *store.Store) (RSSHeading, error) } if settings == nil || settings.CustomProfile == nil { return RSSHeading{ - Title: "Memos", - Description: "An open source, lightweight note-taking service. Easily capture and share your great thoughts.", - Language: "en-us", + Title: "阿年的备忘录", + Description: "一日不见 如隔三秋", + Language: "zh-Hans", }, nil } customProfile := settings.CustomProfile @@ -426,6 +426,6 @@ func getRSSHeading(ctx context.Context, stores *store.Store) (RSSHeading, error) return RSSHeading{ Title: customProfile.Title, Description: customProfile.Description, - Language: "en-us", + Language: "zh-Hans", }, nil } diff --git a/web/index.html b/web/index.html index 606be50..d719336 100644 --- a/web/index.html +++ b/web/index.html @@ -1,5 +1,5 @@ - + @@ -14,7 +14,7 @@ - Memos + 阿年的备忘录
diff --git a/web/public/android-chrome-192x192.png b/web/public/android-chrome-192x192.png index 778cf75..7ac8dd6 100644 Binary files a/web/public/android-chrome-192x192.png and b/web/public/android-chrome-192x192.png differ diff --git a/web/public/android-chrome-512x512.png b/web/public/android-chrome-512x512.png index 5fd83ff..7ac8dd6 100644 Binary files a/web/public/android-chrome-512x512.png and b/web/public/android-chrome-512x512.png differ diff --git a/web/public/apple-touch-icon.png b/web/public/apple-touch-icon.png index e816963..7ac8dd6 100644 Binary files a/web/public/apple-touch-icon.png and b/web/public/apple-touch-icon.png differ diff --git a/web/public/full-logo.webp b/web/public/full-logo.webp index f654aae..b474ba0 100644 Binary files a/web/public/full-logo.webp and b/web/public/full-logo.webp differ diff --git a/web/public/logo.webp b/web/public/logo.webp index 522a5d9..b474ba0 100644 Binary files a/web/public/logo.webp and b/web/public/logo.webp differ diff --git a/web/public/site.webmanifest b/web/public/site.webmanifest index 039d56d..a2e2ee2 100644 --- a/web/public/site.webmanifest +++ b/web/public/site.webmanifest @@ -1,7 +1,7 @@ { - "name": "Memos", - "short_name": "Memos", - "description": "An open-source, self-hosted note-taking tool. Capture thoughts instantly. Own them completely.", + "name": "阿年的备忘录", + "short_name": "阿年的备忘录", + "description": "一日不见 如隔三秋", "icons": [ { "src": "/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" }, { "src": "/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" } diff --git a/web/src/components/ActivityCalendar/CalendarCell.tsx b/web/src/components/ActivityCalendar/CalendarCell.tsx index 9fcc9b0..8d2bb33 100644 --- a/web/src/components/ActivityCalendar/CalendarCell.tsx +++ b/web/src/components/ActivityCalendar/CalendarCell.tsx @@ -45,7 +45,8 @@ export const CalendarCell = memo((props: CalendarCellProps) => { baseClasses, intensityClass, getCalendarCellStateClass(day), - isInteractive ? "cursor-pointer hover:bg-muted/40 hover:border-border/30" : "cursor-default", + day.isToday && "underline decoration-1 underline-offset-4", + isInteractive ? "cursor-pointer hover:bg-muted/40 hover:border-border/30 hover:text-foreground" : "cursor-default", ); const button = ( diff --git a/web/src/components/MemosLogo.tsx b/web/src/components/MemosLogo.tsx index 1552817..457d596 100644 --- a/web/src/components/MemosLogo.tsx +++ b/web/src/components/MemosLogo.tsx @@ -10,7 +10,7 @@ interface Props { function MemosLogo(props: Props) { const { collapsed } = props; const { generalSetting: instanceGeneralSetting } = useInstance(); - const title = instanceGeneralSetting.customProfile?.title || "Memos"; + const title = instanceGeneralSetting.customProfile?.title || "阿年的备忘录"; const avatarUrl = instanceGeneralSetting.customProfile?.logoUrl || "/full-logo.webp"; return ( diff --git a/web/src/components/MobileHeader.tsx b/web/src/components/MobileHeader.tsx index e0556cf..eb978c2 100644 --- a/web/src/components/MobileHeader.tsx +++ b/web/src/components/MobileHeader.tsx @@ -32,7 +32,7 @@ const MobileHeader = (props: Props) => { return (
0 && "shadow-md", className, )} diff --git a/web/src/components/Navigation.tsx b/web/src/components/Navigation.tsx index f826bbe..661f4ea 100644 --- a/web/src/components/Navigation.tsx +++ b/web/src/components/Navigation.tsx @@ -40,12 +40,6 @@ const Navigation = (props: Props) => { title: t("common.explore"), icon: , }; - const aboutNavLink: NavLinkItem = { - id: "header-about", - path: Routes.ABOUT, - title: t("common.about"), - icon: , - }; const attachmentsNavLink: NavLinkItem = { id: "header-attachments", path: Routes.ATTACHMENTS, @@ -77,7 +71,7 @@ const Navigation = (props: Props) => { const primaryNavLinks: NavLinkItem[] = currentUser ? [homeNavLink, exploreNavLink, attachmentsNavLink, inboxNavLink] - : [exploreNavLink, aboutNavLink, signInNavLink]; + : [exploreNavLink, signInNavLink]; const inboxAriaLabel = unreadCount > 0 ? `${t("common.inbox")}, ${unreadCount} unread` : t("common.inbox"); return ( diff --git a/web/src/components/NavigationDrawer.tsx b/web/src/components/NavigationDrawer.tsx index 9d60981..df19c6a 100644 --- a/web/src/components/NavigationDrawer.tsx +++ b/web/src/components/NavigationDrawer.tsx @@ -10,7 +10,7 @@ const NavigationDrawer = () => { const location = useLocation(); const [open, setOpen] = useState(false); const { generalSetting } = useInstance(); - const title = generalSetting.customProfile?.title || "Memos"; + const title = generalSetting.customProfile?.title || "阿年的备忘录"; const avatarUrl = generalSetting.customProfile?.logoUrl || "/full-logo.webp"; useEffect(() => { diff --git a/web/src/components/Settings/InstanceSection.tsx b/web/src/components/Settings/InstanceSection.tsx index ffdd71b..2865459 100644 --- a/web/src/components/Settings/InstanceSection.tsx +++ b/web/src/components/Settings/InstanceSection.tsx @@ -70,7 +70,7 @@ const InstanceSection = () => { - + diff --git a/web/src/components/Settings/PreferencesSection.tsx b/web/src/components/Settings/PreferencesSection.tsx index d813dfc..5402e56 100644 --- a/web/src/components/Settings/PreferencesSection.tsx +++ b/web/src/components/Settings/PreferencesSection.tsx @@ -62,7 +62,7 @@ const PreferencesSection = () => { const setting: UserSetting_GeneralSetting = generalSetting || create(UserSetting_GeneralSettingSchema, { - locale: "en", + locale: "zh-Hans", memoVisibility: "PRIVATE", theme: "system", }); diff --git a/web/src/components/UpdateCustomizedProfileDialog.tsx b/web/src/components/UpdateCustomizedProfileDialog.tsx index 236bf0a..926517a 100644 --- a/web/src/components/UpdateCustomizedProfileDialog.tsx +++ b/web/src/components/UpdateCustomizedProfileDialog.tsx @@ -59,7 +59,7 @@ function UpdateCustomizedProfileDialog({ open, onOpenChange, onSuccess }: Props) const handleRestoreButtonClick = () => { setPartialState({ - title: "Memos", + title: "阿年的备忘录", logoUrl: "/logo.webp", description: "", }); diff --git a/web/src/components/UserMenu.tsx b/web/src/components/UserMenu.tsx index 985f7d1..9177f4c 100644 --- a/web/src/components/UserMenu.tsx +++ b/web/src/components/UserMenu.tsx @@ -142,10 +142,6 @@ const UserMenu = (props: Props) => { {t("common.archived")} - navigateTo(Routes.ABOUT)}> - - {t("common.about")} - diff --git a/web/src/i18n.ts b/web/src/i18n.ts index 9ae10c7..ac82764 100644 --- a/web/src/i18n.ts +++ b/web/src/i18n.ts @@ -78,7 +78,7 @@ i18n }, fallbackLng: { ...fallbacks, - ...{ default: ["en"] }, + ...{ default: ["zh-Hans"] }, } as FallbackLng, }); diff --git a/web/src/pages/AdminSignIn.tsx b/web/src/pages/AdminSignIn.tsx index 377fa56..a5a10a8 100644 --- a/web/src/pages/AdminSignIn.tsx +++ b/web/src/pages/AdminSignIn.tsx @@ -10,7 +10,7 @@ const AdminSignIn = () => {
-

{instanceGeneralSetting.customProfile?.title || "Memos"}

+

{instanceGeneralSetting.customProfile?.title || "阿年的备忘录"}

Sign in with admin accounts

diff --git a/web/src/pages/SignIn.tsx b/web/src/pages/SignIn.tsx index c7af694..1b45649 100644 --- a/web/src/pages/SignIn.tsx +++ b/web/src/pages/SignIn.tsx @@ -75,7 +75,7 @@ const SignIn = () => {
-

{instanceGeneralSetting.customProfile?.title || "Memos"}

+

{instanceGeneralSetting.customProfile?.title || "阿年的备忘录"}

{!instanceGeneralSetting.disallowPasswordAuth ? ( diff --git a/web/src/pages/SignUp.tsx b/web/src/pages/SignUp.tsx index 9b01d57..e89680e 100644 --- a/web/src/pages/SignUp.tsx +++ b/web/src/pages/SignUp.tsx @@ -92,7 +92,7 @@ const SignUp = () => {
-

{instanceGeneralSetting.customProfile?.title || "Memos"}

+

{instanceGeneralSetting.customProfile?.title || "阿年的备忘录"}

{canUsePasswordSignUp ? ( <>