diff --git a/server/server.go b/server/server.go index f821ed70..243f26ad 100644 --- a/server/server.go +++ b/server/server.go @@ -61,6 +61,9 @@ func NewServer(profile *profile.Profile) *Server { rootGroup := e.Group("") s.registerRSSRoutes(rootGroup) + webhookGroup := e.Group("/h") + s.registerResourcePublicRoutes(webhookGroup) + publicGroup := e.Group("/o") s.registerResourcePublicRoutes(publicGroup) s.registerGetterPublicRoutes(publicGroup) diff --git a/server/version/version.go b/server/version/version.go index fb57fea9..74248d09 100644 --- a/server/version/version.go +++ b/server/version/version.go @@ -7,10 +7,10 @@ import ( // Version is the service current released version. // Semantic versioning: https://semver.org/ -var Version = "0.8.0" +var Version = "0.8.1" // DevVersion is the service current development version. -var DevVersion = "0.8.0" +var DevVersion = "0.8.1" func GetCurrentVersion(mode string) string { if mode == "dev" { diff --git a/web/src/components/Settings/MemberSection.tsx b/web/src/components/Settings/MemberSection.tsx index 1b2883f6..1d7504a3 100644 --- a/web/src/components/Settings/MemberSection.tsx +++ b/web/src/components/Settings/MemberSection.tsx @@ -158,12 +158,10 @@ const PreferencesSection = () => { {t("common.yourself")} ) : ( handleChangePasswordClick(user)} > {t("setting.account-section.change-password")} @@ -184,7 +182,7 @@ const PreferencesSection = () => { {t("common.restore")} handleDeleteUserClick(user)} > {t("common.delete")} diff --git a/web/src/helpers/consts.ts b/web/src/helpers/consts.ts index 30f05a0d..a305cf9f 100644 --- a/web/src/helpers/consts.ts +++ b/web/src/helpers/consts.ts @@ -8,14 +8,14 @@ export const ANIMATION_DURATION = 200; export const DAILY_TIMESTAMP = 3600 * 24 * 1000; export const VISIBILITY_SELECTOR_ITEMS = [ - { text: "PUBLIC", value: "PUBLIC" }, - { text: "PROTECTED", value: "PROTECTED" }, { text: "PRIVATE", value: "PRIVATE" }, + { text: "PROTECTED", value: "PROTECTED" }, + { text: "PUBLIC", value: "PUBLIC" }, ]; export const MEMO_DISPLAY_TS_OPTION_SELECTOR_ITEMS = [ { text: "created_ts", value: "created_ts" }, - { text: "created_ts", value: "updated_ts" }, + { text: "updated_ts", value: "updated_ts" }, ]; export const TAB_SPACE_WIDTH = 2; diff --git a/web/src/less/memo-detail.less b/web/src/less/memo-detail.less index 6f311db2..a31bc2be 100644 --- a/web/src/less/memo-detail.less +++ b/web/src/less/memo-detail.less @@ -40,7 +40,7 @@ @apply relative flex-grow max-w-2xl w-full min-h-full flex flex-col justify-start items-start px-4; > .memo-container { - @apply flex flex-col justify-start items-start w-full p-4 mt-2 bg-white dark:bg-zinc-800 rounded-lg border border-white dark:border-zinc-800 hover:border-gray-200 dark:hover:border-zinc-700; + @apply flex flex-col justify-start items-start w-full p-4 mt-2 bg-white dark:bg-zinc-700 rounded-lg border border-white dark:border-zinc-800 hover:border-gray-200 dark:hover:border-zinc-700; > .memo-header { @apply mb-2 w-full flex flex-row justify-between items-center; @@ -55,7 +55,7 @@ } > .memo-content { - @apply cursor-default dark:text-zinc-50; + @apply cursor-default; > * { @apply cursor-default; diff --git a/web/src/less/memo-editor.less b/web/src/less/memo-editor.less index fdbbdb9d..45fe0e7f 100644 --- a/web/src/less/memo-editor.less +++ b/web/src/less/memo-editor.less @@ -2,7 +2,7 @@ @apply relative w-full flex flex-col justify-start items-start bg-white dark:bg-zinc-700 px-4 rounded-lg border-2 border-gray-200 dark:border-zinc-600; &.fullscreen { - @apply transition-all fixed w-full h-full top-0 left-0 z-1000 border-none rounded-none sm:p-8; + @apply transition-all fixed w-full h-full top-0 left-0 z-1000 border-none rounded-none sm:p-8 dark:bg-zinc-800; > .memo-editor { @apply p-4 mb-4 rounded-lg border shadow-lg flex flex-col flex-grow justify-start items-start relative w-full h-full bg-white dark:bg-zinc-700 dark:border-zinc-600; @@ -146,7 +146,7 @@ @apply grow-0 shrink-0 flex flex-row justify-end items-center; > .cancel-btn { - @apply mr-4 text-sm text-gray-600 hover:opacity-80; + @apply mr-4 text-sm text-gray-500 hover:opacity-80 dark:text-gray-300; } > .confirm-btn { diff --git a/web/src/less/resources-selector-dialog.less b/web/src/less/resources-selector-dialog.less index afc4b225..2c31c91c 100644 --- a/web/src/less/resources-selector-dialog.less +++ b/web/src/less/resources-selector-dialog.less @@ -7,30 +7,6 @@ > .dialog-content-container { @apply flex flex-col justify-start items-start w-full; - > .action-buttons-container { - @apply w-full flex flex-row justify-between items-center mb-2; - - > .buttons-wrapper { - @apply flex flex-row justify-start items-center; - - > .upload-resource-btn { - @apply text-sm cursor-pointer px-3 py-1 rounded flex flex-row justify-center items-center border border-blue-600 text-blue-600 bg-blue-50 hover:opacity-80; - - > .icon-img { - @apply w-4 h-auto mr-1; - } - } - - > .delete-unused-resource-btn { - @apply text-sm cursor-pointer px-3 py-1 rounded flex flex-row justify-center items-center border border-red-600 text-red-600 bg-red-100 hover:opacity-80; - - > .icon-img { - @apply w-4 h-auto mr-1; - } - } - } - } - > .loading-text-container { @apply flex flex-col justify-center items-center w-full h-32; } @@ -39,7 +15,7 @@ @apply flex flex-col justify-start items-start w-full; > .fields-container { - @apply px-2 py-2 w-full grid grid-cols-7 border-b; + @apply px-2 py-2 w-full grid grid-cols-7 border-b dark:border-b-gray-500; > .field-text { @apply font-mono text-gray-400; @@ -51,7 +27,7 @@ } > .resource-container { - @apply px-2 py-2 w-full grid grid-cols-7; + @apply px-2 py-2 w-full grid grid-cols-7 dark:bg-zinc-700; > .buttons-container { @apply w-full flex flex-row justify-end items-center; diff --git a/web/src/less/search-bar.less b/web/src/less/search-bar.less index 3e7243c7..06a67a64 100644 --- a/web/src/less/search-bar.less +++ b/web/src/less/search-bar.less @@ -21,11 +21,11 @@ } > .quickly-action-wrapper { - @apply hidden absolute top-9 -right-2 p-2 w-80 z-10; + @apply hidden absolute top-9 -right-2 p-2 w-60 z-10; > .quickly-action-container { @apply flex flex-col justify-start items-start w-full bg-white dark:bg-zinc-700 px-4 py-3 rounded-lg; - box-shadow: 0 0 8px 0 rgb(0 0 0 / 20%); + box-shadow: 0 0 8px 0 rgb(0 0 0 / 40%); > .title-text { @apply text-gray-600 dark:text-gray-400 text-xs; @@ -45,7 +45,7 @@ @apply flex flex-row justify-start items-center leading-6; .type-item { - @apply cursor-pointer px-1 rounded dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-zinc-600; + @apply cursor-pointer px-2 rounded dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-zinc-600; &.selected { @apply !bg-green-600 text-white; diff --git a/web/src/less/shortcut-list.less b/web/src/less/shortcut-list.less index 566403a2..db72071b 100644 --- a/web/src/less/shortcut-list.less +++ b/web/src/less/shortcut-list.less @@ -31,7 +31,7 @@ &.active { > .shortcut-text-container { - @apply text-green-600; + @apply !text-green-600; } } diff --git a/web/src/less/tag-list.less b/web/src/less/tag-list.less index 9d957ece..57c8be41 100644 --- a/web/src/less/tag-list.less +++ b/web/src/less/tag-list.less @@ -23,7 +23,7 @@ &.active { > .tag-text-container { - @apply text-green-600; + @apply !text-green-600; } } diff --git a/web/src/locales/en.json b/web/src/locales/en.json index 3b4656b9..3169195e 100644 --- a/web/src/locales/en.json +++ b/web/src/locales/en.json @@ -96,7 +96,7 @@ "view-detail": "View Detail", "copy": "Copy", "visibility": { - "private": "Private", + "private": "Only visible to you", "protected": "Visible to members", "public": "Everyone can see" } diff --git a/web/src/pages/Auth.tsx b/web/src/pages/Auth.tsx index 001cee2a..693380ca 100644 --- a/web/src/pages/Auth.tsx +++ b/web/src/pages/Auth.tsx @@ -136,7 +136,7 @@ const Auth = () => { {systemStatus?.host ? ( <> - {actionBtnLoadingState.isLoading && } + {actionBtnLoadingState.isLoading && } {systemStatus?.allowSignUp && ( <> { } }, [location]); - const handleCopyContent = () => { - copy(state.memo.content); - toastHelper.success(t("message.succeed-copy-content")); - }; - return ( @@ -87,20 +79,6 @@ const MemoDetail = () => { @{state.memo.creator.nickname || state.memo.creator.username} - } - actionsClassName="!w-32" - actions={ - <> - - {t("memo.copy")} - - > - } - /> undefined} /> diff --git a/web/src/theme/index.ts b/web/src/theme/index.ts index 6dac7471..2dae5fd9 100644 --- a/web/src/theme/index.ts +++ b/web/src/theme/index.ts @@ -2,6 +2,11 @@ import { extendTheme } from "@mui/joy"; const theme = extendTheme({ components: { + JoyButton: { + defaultProps: { + size: "sm", + }, + }, JoySelect: { defaultProps: { size: "sm",