Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
a467a7c1
Unverified
Commit
a467a7c1
authored
Dec 02, 2022
by
boojack
Committed by
GitHub
Dec 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: upgrade dev version to `0.8.1` (#656)
* feat: upgrade version to `0.8.1` * chore: update
parent
14f9f293
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
28 additions
and
68 deletions
+28
-68
server.go
server/server.go
+3
-0
version.go
server/version/version.go
+2
-2
MemberSection.tsx
web/src/components/Settings/MemberSection.tsx
+2
-4
consts.ts
web/src/helpers/consts.ts
+3
-3
memo-detail.less
web/src/less/memo-detail.less
+2
-2
memo-editor.less
web/src/less/memo-editor.less
+2
-2
resources-selector-dialog.less
web/src/less/resources-selector-dialog.less
+2
-26
search-bar.less
web/src/less/search-bar.less
+3
-3
shortcut-list.less
web/src/less/shortcut-list.less
+1
-1
tag-list.less
web/src/less/tag-list.less
+1
-1
en.json
web/src/locales/en.json
+1
-1
Auth.tsx
web/src/pages/Auth.tsx
+1
-1
MemoDetail.tsx
web/src/pages/MemoDetail.tsx
+0
-22
index.ts
web/src/theme/index.ts
+5
-0
No files found.
server/server.go
View file @
a467a7c1
...
@@ -61,6 +61,9 @@ func NewServer(profile *profile.Profile) *Server {
...
@@ -61,6 +61,9 @@ func NewServer(profile *profile.Profile) *Server {
rootGroup
:=
e
.
Group
(
""
)
rootGroup
:=
e
.
Group
(
""
)
s
.
registerRSSRoutes
(
rootGroup
)
s
.
registerRSSRoutes
(
rootGroup
)
webhookGroup
:=
e
.
Group
(
"/h"
)
s
.
registerResourcePublicRoutes
(
webhookGroup
)
publicGroup
:=
e
.
Group
(
"/o"
)
publicGroup
:=
e
.
Group
(
"/o"
)
s
.
registerResourcePublicRoutes
(
publicGroup
)
s
.
registerResourcePublicRoutes
(
publicGroup
)
s
.
registerGetterPublicRoutes
(
publicGroup
)
s
.
registerGetterPublicRoutes
(
publicGroup
)
...
...
server/version/version.go
View file @
a467a7c1
...
@@ -7,10 +7,10 @@ import (
...
@@ -7,10 +7,10 @@ import (
// Version is the service current released version.
// Version is the service current released version.
// Semantic versioning: https://semver.org/
// Semantic versioning: https://semver.org/
var
Version
=
"0.8.
0
"
var
Version
=
"0.8.
1
"
// DevVersion is the service current development version.
// DevVersion is the service current development version.
var
DevVersion
=
"0.8.
0
"
var
DevVersion
=
"0.8.
1
"
func
GetCurrentVersion
(
mode
string
)
string
{
func
GetCurrentVersion
(
mode
string
)
string
{
if
mode
==
"dev"
{
if
mode
==
"dev"
{
...
...
web/src/components/Settings/MemberSection.tsx
View file @
a467a7c1
...
@@ -158,12 +158,10 @@ const PreferencesSection = () => {
...
@@ -158,12 +158,10 @@ const PreferencesSection = () => {
<
span
className=
"tip-text"
>
{
t
(
"common.yourself"
)
}
</
span
>
<
span
className=
"tip-text"
>
{
t
(
"common.yourself"
)
}
</
span
>
)
:
(
)
:
(
<
Dropdown
<
Dropdown
actionsClassName=
"!w-24"
positionClassName=
"bottom-full right-0 mb-1"
actions=
{
actions=
{
<>
<>
<
button
<
button
className=
"w-full text-left text-sm leading-6 py-1 px-3 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-zinc-600"
className=
"w-full text-left text-sm
whitespace-nowrap
leading-6 py-1 px-3 cursor-pointer rounded hover:bg-gray-100 dark:hover:bg-zinc-600"
onClick=
{
()
=>
handleChangePasswordClick
(
user
)
}
onClick=
{
()
=>
handleChangePasswordClick
(
user
)
}
>
>
{
t
(
"setting.account-section.change-password"
)
}
{
t
(
"setting.account-section.change-password"
)
}
...
@@ -184,7 +182,7 @@ const PreferencesSection = () => {
...
@@ -184,7 +182,7 @@ const PreferencesSection = () => {
{
t
(
"common.restore"
)
}
{
t
(
"common.restore"
)
}
</
button
>
</
button
>
<
button
<
button
className=
"w-full text-left text-sm leading-6 py-1 px-3 cursor-pointer rounded text-red-600 hover:bg-gray-100"
className=
"w-full text-left text-sm leading-6 py-1 px-3 cursor-pointer rounded text-red-600 hover:bg-gray-100
dark:hover:bg-zinc-600
"
onClick=
{
()
=>
handleDeleteUserClick
(
user
)
}
onClick=
{
()
=>
handleDeleteUserClick
(
user
)
}
>
>
{
t
(
"common.delete"
)
}
{
t
(
"common.delete"
)
}
...
...
web/src/helpers/consts.ts
View file @
a467a7c1
...
@@ -8,14 +8,14 @@ export const ANIMATION_DURATION = 200;
...
@@ -8,14 +8,14 @@ export const ANIMATION_DURATION = 200;
export
const
DAILY_TIMESTAMP
=
3600
*
24
*
1000
;
export
const
DAILY_TIMESTAMP
=
3600
*
24
*
1000
;
export
const
VISIBILITY_SELECTOR_ITEMS
=
[
export
const
VISIBILITY_SELECTOR_ITEMS
=
[
{
text
:
"PUBLIC"
,
value
:
"PUBLIC"
},
{
text
:
"PROTECTED"
,
value
:
"PROTECTED"
},
{
text
:
"PRIVATE"
,
value
:
"PRIVATE"
},
{
text
:
"PRIVATE"
,
value
:
"PRIVATE"
},
{
text
:
"PROTECTED"
,
value
:
"PROTECTED"
},
{
text
:
"PUBLIC"
,
value
:
"PUBLIC"
},
];
];
export
const
MEMO_DISPLAY_TS_OPTION_SELECTOR_ITEMS
=
[
export
const
MEMO_DISPLAY_TS_OPTION_SELECTOR_ITEMS
=
[
{
text
:
"created_ts"
,
value
:
"created_ts"
},
{
text
:
"created_ts"
,
value
:
"created_ts"
},
{
text
:
"
cre
ated_ts"
,
value
:
"updated_ts"
},
{
text
:
"
upd
ated_ts"
,
value
:
"updated_ts"
},
];
];
export
const
TAB_SPACE_WIDTH
=
2
;
export
const
TAB_SPACE_WIDTH
=
2
;
web/src/less/memo-detail.less
View file @
a467a7c1
...
@@ -40,7 +40,7 @@
...
@@ -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;
@apply relative flex-grow max-w-2xl w-full min-h-full flex flex-col justify-start items-start px-4;
> .memo-container {
> .memo-container {
@apply flex flex-col justify-start items-start w-full p-4 mt-2 bg-white dark:bg-zinc-
8
00 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-
7
00 rounded-lg border border-white dark:border-zinc-800 hover:border-gray-200 dark:hover:border-zinc-700;
> .memo-header {
> .memo-header {
@apply mb-2 w-full flex flex-row justify-between items-center;
@apply mb-2 w-full flex flex-row justify-between items-center;
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
}
}
> .memo-content {
> .memo-content {
@apply cursor-default
dark:text-zinc-50
;
@apply cursor-default;
> * {
> * {
@apply cursor-default;
@apply cursor-default;
...
...
web/src/less/memo-editor.less
View file @
a467a7c1
...
@@ -2,7 +2,7 @@
...
@@ -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;
@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 {
&.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 {
> .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;
@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 @@
...
@@ -146,7 +146,7 @@
@apply grow-0 shrink-0 flex flex-row justify-end items-center;
@apply grow-0 shrink-0 flex flex-row justify-end items-center;
> .cancel-btn {
> .cancel-btn {
@apply mr-4 text-sm text-gray-
600 hover:opacity-8
0;
@apply mr-4 text-sm text-gray-
500 hover:opacity-80 dark:text-gray-30
0;
}
}
> .confirm-btn {
> .confirm-btn {
...
...
web/src/less/resources-selector-dialog.less
View file @
a467a7c1
...
@@ -7,30 +7,6 @@
...
@@ -7,30 +7,6 @@
> .dialog-content-container {
> .dialog-content-container {
@apply flex flex-col justify-start items-start w-full;
@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 {
> .loading-text-container {
@apply flex flex-col justify-center items-center w-full h-32;
@apply flex flex-col justify-center items-center w-full h-32;
}
}
...
@@ -39,7 +15,7 @@
...
@@ -39,7 +15,7 @@
@apply flex flex-col justify-start items-start w-full;
@apply flex flex-col justify-start items-start w-full;
> .fields-container {
> .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 {
> .field-text {
@apply font-mono text-gray-400;
@apply font-mono text-gray-400;
...
@@ -51,7 +27,7 @@
...
@@ -51,7 +27,7 @@
}
}
> .resource-container {
> .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 {
> .buttons-container {
@apply w-full flex flex-row justify-end items-center;
@apply w-full flex flex-row justify-end items-center;
...
...
web/src/less/search-bar.less
View file @
a467a7c1
...
@@ -21,11 +21,11 @@
...
@@ -21,11 +21,11 @@
}
}
> .quickly-action-wrapper {
> .quickly-action-wrapper {
@apply hidden absolute top-9 -right-2 p-2 w-
8
0 z-10;
@apply hidden absolute top-9 -right-2 p-2 w-
6
0 z-10;
> .quickly-action-container {
> .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;
@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 /
2
0%);
box-shadow: 0 0 8px 0 rgb(0 0 0 /
4
0%);
> .title-text {
> .title-text {
@apply text-gray-600 dark:text-gray-400 text-xs;
@apply text-gray-600 dark:text-gray-400 text-xs;
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
@apply flex flex-row justify-start items-center leading-6;
@apply flex flex-row justify-start items-center leading-6;
.type-item {
.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 {
&.selected {
@apply !bg-green-600 text-white;
@apply !bg-green-600 text-white;
...
...
web/src/less/shortcut-list.less
View file @
a467a7c1
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
&.active {
&.active {
> .shortcut-text-container {
> .shortcut-text-container {
@apply text-green-600;
@apply
!
text-green-600;
}
}
}
}
...
...
web/src/less/tag-list.less
View file @
a467a7c1
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
&.active {
&.active {
> .tag-text-container {
> .tag-text-container {
@apply text-green-600;
@apply
!
text-green-600;
}
}
}
}
...
...
web/src/locales/en.json
View file @
a467a7c1
...
@@ -96,7 +96,7 @@
...
@@ -96,7 +96,7 @@
"view-detail"
:
"View Detail"
,
"view-detail"
:
"View Detail"
,
"copy"
:
"Copy"
,
"copy"
:
"Copy"
,
"visibility"
:
{
"visibility"
:
{
"private"
:
"
Private
"
,
"private"
:
"
Only visible to you
"
,
"protected"
:
"Visible to members"
,
"protected"
:
"Visible to members"
,
"public"
:
"Everyone can see"
"public"
:
"Everyone can see"
}
}
...
...
web/src/pages/Auth.tsx
View file @
a467a7c1
...
@@ -136,7 +136,7 @@ const Auth = () => {
...
@@ -136,7 +136,7 @@ const Auth = () => {
<
div
className=
"action-btns-container"
>
<
div
className=
"action-btns-container"
>
{
systemStatus
?.
host
?
(
{
systemStatus
?.
host
?
(
<>
<>
{
actionBtnLoadingState
.
isLoading
&&
<
Icon
.
Loader
className=
"w-4 h-auto mr-2 animate-spin"
/>
}
{
actionBtnLoadingState
.
isLoading
&&
<
Icon
.
Loader
className=
"w-4 h-auto mr-2 animate-spin
dark:text-gray-300
"
/>
}
{
systemStatus
?.
allowSignUp
&&
(
{
systemStatus
?.
allowSignUp
&&
(
<>
<>
<
button
<
button
...
...
web/src/pages/MemoDetail.tsx
View file @
a467a7c1
import
copy
from
"copy-to-clipboard"
;
import
dayjs
from
"dayjs"
;
import
dayjs
from
"dayjs"
;
import
{
useEffect
,
useState
}
from
"react"
;
import
{
useEffect
,
useState
}
from
"react"
;
import
{
useTranslation
}
from
"react-i18next"
;
import
{
useTranslation
}
from
"react-i18next"
;
...
@@ -7,9 +6,7 @@ import { memoService } from "../services";
...
@@ -7,9 +6,7 @@ import { memoService } from "../services";
import
{
UNKNOWN_ID
}
from
"../helpers/consts"
;
import
{
UNKNOWN_ID
}
from
"../helpers/consts"
;
import
{
useAppSelector
}
from
"../store"
;
import
{
useAppSelector
}
from
"../store"
;
import
useLoading
from
"../hooks/useLoading"
;
import
useLoading
from
"../hooks/useLoading"
;
import
Icon
from
"../components/Icon"
;
import
toastHelper
from
"../components/Toast"
;
import
toastHelper
from
"../components/Toast"
;
import
Dropdown
from
"../components/common/Dropdown"
;
import
MemoContent
from
"../components/MemoContent"
;
import
MemoContent
from
"../components/MemoContent"
;
import
MemoResources
from
"../components/MemoResources"
;
import
MemoResources
from
"../components/MemoResources"
;
import
"../less/memo-detail.less"
;
import
"../less/memo-detail.less"
;
...
@@ -48,11 +45,6 @@ const MemoDetail = () => {
...
@@ -48,11 +45,6 @@ const MemoDetail = () => {
}
}
},
[
location
]);
},
[
location
]);
const
handleCopyContent
=
()
=>
{
copy
(
state
.
memo
.
content
);
toastHelper
.
success
(
t
(
"message.succeed-copy-content"
));
};
return
(
return
(
<
section
className=
"page-wrapper memo-detail"
>
<
section
className=
"page-wrapper memo-detail"
>
<
div
className=
"page-container"
>
<
div
className=
"page-container"
>
...
@@ -87,20 +79,6 @@ const MemoDetail = () => {
...
@@ -87,20 +79,6 @@ const MemoDetail = () => {
@
{
state
.
memo
.
creator
.
nickname
||
state
.
memo
.
creator
.
username
}
@
{
state
.
memo
.
creator
.
nickname
||
state
.
memo
.
creator
.
username
}
</
a
>
</
a
>
</
div
>
</
div
>
<
Dropdown
trigger=
{
<
Icon
.
MoreHorizontal
className=
"ml-2 w-4 h-auto cursor-pointer text-gray-500"
/>
}
actionsClassName=
"!w-32"
actions=
{
<>
<
button
className=
"w-full flex flex-row justify-start items-center px-3 whitespace-nowrap text-sm text-left leading-8 cursor-pointer rounded hover:bg-gray-100"
onClick=
{
handleCopyContent
}
>
{
t
(
"memo.copy"
)
}
</
button
>
</>
}
/>
</
div
>
</
div
>
<
MemoContent
className=
"memo-content"
content=
{
state
.
memo
.
content
}
onMemoContentClick=
{
()
=>
undefined
}
/>
<
MemoContent
className=
"memo-content"
content=
{
state
.
memo
.
content
}
onMemoContentClick=
{
()
=>
undefined
}
/>
<
MemoResources
resourceList=
{
state
.
memo
.
resourceList
}
/>
<
MemoResources
resourceList=
{
state
.
memo
.
resourceList
}
/>
...
...
web/src/theme/index.ts
View file @
a467a7c1
...
@@ -2,6 +2,11 @@ import { extendTheme } from "@mui/joy";
...
@@ -2,6 +2,11 @@ import { extendTheme } from "@mui/joy";
const
theme
=
extendTheme
({
const
theme
=
extendTheme
({
components
:
{
components
:
{
JoyButton
:
{
defaultProps
:
{
size
:
"sm"
,
},
},
JoySelect
:
{
JoySelect
:
{
defaultProps
:
{
defaultProps
:
{
size
:
"sm"
,
size
:
"sm"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment