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
3c5aa41a
Commit
3c5aa41a
authored
Aug 18, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: implement week start day setting
parent
06c460b4
Changes
15
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
346 additions
and
289 deletions
+346
-289
main.go
bin/memos/main.go
+2
-2
apidocs.swagger.yaml
docs/apidocs.swagger.yaml
+7
-0
workspace_setting_service.proto
proto/api/v1/workspace_setting_service.proto
+4
-0
workspace_setting_service.pb.go
proto/gen/api/v1/workspace_setting_service.pb.go
+122
-108
workspace_setting.pb.go
proto/gen/store/workspace_setting.pb.go
+105
-91
workspace_setting.proto
proto/store/workspace_setting.proto
+7
-3
workspace_service.go
server/router/api/v1/workspace_service.go
+1
-0
workspace_setting_service.go
server/router/api/v1/workspace_setting_service.go
+6
-4
ActivityCalendar.tsx
web/src/components/ActivityCalendar.tsx
+19
-9
ChangePasswordDialog.tsx
web/src/components/ChangePasswordDialog.tsx
+1
-1
CreateAccessTokenDialog.tsx
web/src/components/CreateAccessTokenDialog.tsx
+1
-1
CreateIdentityProviderDialog.tsx
web/src/components/CreateIdentityProviderDialog.tsx
+1
-1
MemoActionMenu.tsx
web/src/components/MemoActionMenu.tsx
+1
-1
AddMemoRelationPopover.tsx
...onents/MemoEditor/ActionButton/AddMemoRelationPopover.tsx
+1
-1
WorkspaceSection.tsx
web/src/components/Settings/WorkspaceSection.tsx
+68
-67
No files found.
bin/memos/main.go
View file @
3c5aa41a
...
@@ -101,12 +101,12 @@ var (
...
@@ -101,12 +101,12 @@ var (
)
)
func
init
()
{
func
init
()
{
viper
.
SetDefault
(
"mode"
,
"de
mo
"
)
viper
.
SetDefault
(
"mode"
,
"de
v
"
)
viper
.
SetDefault
(
"driver"
,
"sqlite"
)
viper
.
SetDefault
(
"driver"
,
"sqlite"
)
viper
.
SetDefault
(
"port"
,
8081
)
viper
.
SetDefault
(
"port"
,
8081
)
viper
.
SetDefault
(
"password-auth"
,
true
)
viper
.
SetDefault
(
"password-auth"
,
true
)
rootCmd
.
PersistentFlags
()
.
String
(
"mode"
,
"de
mo
"
,
`mode of server, can be "prod" or "dev" or "demo"`
)
rootCmd
.
PersistentFlags
()
.
String
(
"mode"
,
"de
v
"
,
`mode of server, can be "prod" or "dev" or "demo"`
)
rootCmd
.
PersistentFlags
()
.
String
(
"addr"
,
""
,
"address of server"
)
rootCmd
.
PersistentFlags
()
.
String
(
"addr"
,
""
,
"address of server"
)
rootCmd
.
PersistentFlags
()
.
Int
(
"port"
,
8081
,
"port of server"
)
rootCmd
.
PersistentFlags
()
.
Int
(
"port"
,
8081
,
"port of server"
)
rootCmd
.
PersistentFlags
()
.
String
(
"data"
,
""
,
"data directory"
)
rootCmd
.
PersistentFlags
()
.
String
(
"data"
,
""
,
"data directory"
)
...
...
docs/apidocs.swagger.yaml
View file @
3c5aa41a
...
@@ -2075,6 +2075,13 @@ definitions:
...
@@ -2075,6 +2075,13 @@ definitions:
customProfile
:
customProfile
:
$ref
:
'
#/definitions/apiv1WorkspaceCustomProfile'
$ref
:
'
#/definitions/apiv1WorkspaceCustomProfile'
description
:
custom_profile is the custom profile.
description
:
custom_profile is the custom profile.
weekStartDayOffset
:
type
:
integer
format
:
int32
description
:
|-
week_start_day_offset is the week start day offset from Sunday.
0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday
Default is Sunday.
apiv1WorkspaceMemoRelatedSetting
:
apiv1WorkspaceMemoRelatedSetting
:
type
:
object
type
:
object
properties
:
properties
:
...
...
proto/api/v1/workspace_setting_service.proto
View file @
3c5aa41a
...
@@ -42,6 +42,10 @@ message WorkspaceGeneralSetting {
...
@@ -42,6 +42,10 @@ message WorkspaceGeneralSetting {
string
additional_style
=
4
;
string
additional_style
=
4
;
// custom_profile is the custom profile.
// custom_profile is the custom profile.
WorkspaceCustomProfile
custom_profile
=
5
;
WorkspaceCustomProfile
custom_profile
=
5
;
// week_start_day_offset is the week start day offset from Sunday.
// 0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday
// Default is Sunday.
int32
week_start_day_offset
=
6
;
}
}
message
WorkspaceCustomProfile
{
message
WorkspaceCustomProfile
{
...
...
proto/gen/api/v1/workspace_setting_service.pb.go
View file @
3c5aa41a
This diff is collapsed.
Click to expand it.
proto/gen/store/workspace_setting.pb.go
View file @
3c5aa41a
This diff is collapsed.
Click to expand it.
proto/store/workspace_setting.proto
View file @
3c5aa41a
...
@@ -32,11 +32,15 @@ message WorkspaceBasicSetting {
...
@@ -32,11 +32,15 @@ message WorkspaceBasicSetting {
message
WorkspaceGeneralSetting
{
message
WorkspaceGeneralSetting
{
// additional_script is the additional script.
// additional_script is the additional script.
string
additional_script
=
3
;
string
additional_script
=
1
;
// additional_style is the additional style.
// additional_style is the additional style.
string
additional_style
=
4
;
string
additional_style
=
2
;
// custom_profile is the custom profile.
// custom_profile is the custom profile.
WorkspaceCustomProfile
custom_profile
=
5
;
WorkspaceCustomProfile
custom_profile
=
3
;
// week_start_day_offset is the week start day offset from Sunday.
// 0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday
// Default is Sunday.
int32
week_start_day_offset
=
4
;
}
}
message
WorkspaceCustomProfile
{
message
WorkspaceCustomProfile
{
...
...
server/router/api/v1/workspace_service.go
View file @
3c5aa41a
...
@@ -19,6 +19,7 @@ func (s *APIV1Service) GetWorkspaceProfile(ctx context.Context, _ *v1pb.GetWorks
...
@@ -19,6 +19,7 @@ func (s *APIV1Service) GetWorkspaceProfile(ctx context.Context, _ *v1pb.GetWorks
PasswordAuth
:
s
.
Profile
.
PasswordAuth
,
PasswordAuth
:
s
.
Profile
.
PasswordAuth
,
InstanceUrl
:
s
.
Profile
.
InstanceURL
,
InstanceUrl
:
s
.
Profile
.
InstanceURL
,
}
}
println
(
"workspaceProfile: "
,
workspaceProfile
.
Mode
)
owner
,
err
:=
s
.
GetInstanceOwner
(
ctx
)
owner
,
err
:=
s
.
GetInstanceOwner
(
ctx
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
status
.
Errorf
(
codes
.
Internal
,
"failed to get instance owner: %v"
,
err
)
return
nil
,
status
.
Errorf
(
codes
.
Internal
,
"failed to get instance owner: %v"
,
err
)
...
...
server/router/api/v1/workspace_setting_service.go
View file @
3c5aa41a
...
@@ -134,6 +134,7 @@ func convertWorkspaceGeneralSettingFromStore(setting *storepb.WorkspaceGeneralSe
...
@@ -134,6 +134,7 @@ func convertWorkspaceGeneralSettingFromStore(setting *storepb.WorkspaceGeneralSe
generalSetting
:=
&
v1pb
.
WorkspaceGeneralSetting
{
generalSetting
:=
&
v1pb
.
WorkspaceGeneralSetting
{
AdditionalScript
:
setting
.
AdditionalScript
,
AdditionalScript
:
setting
.
AdditionalScript
,
AdditionalStyle
:
setting
.
AdditionalStyle
,
AdditionalStyle
:
setting
.
AdditionalStyle
,
WeekStartDayOffset
:
setting
.
WeekStartDayOffset
,
}
}
if
setting
.
CustomProfile
!=
nil
{
if
setting
.
CustomProfile
!=
nil
{
generalSetting
.
CustomProfile
=
&
v1pb
.
WorkspaceCustomProfile
{
generalSetting
.
CustomProfile
=
&
v1pb
.
WorkspaceCustomProfile
{
...
@@ -154,6 +155,7 @@ func convertWorkspaceGeneralSettingToStore(setting *v1pb.WorkspaceGeneralSetting
...
@@ -154,6 +155,7 @@ func convertWorkspaceGeneralSettingToStore(setting *v1pb.WorkspaceGeneralSetting
generalSetting
:=
&
storepb
.
WorkspaceGeneralSetting
{
generalSetting
:=
&
storepb
.
WorkspaceGeneralSetting
{
AdditionalScript
:
setting
.
AdditionalScript
,
AdditionalScript
:
setting
.
AdditionalScript
,
AdditionalStyle
:
setting
.
AdditionalStyle
,
AdditionalStyle
:
setting
.
AdditionalStyle
,
WeekStartDayOffset
:
setting
.
WeekStartDayOffset
,
}
}
if
setting
.
CustomProfile
!=
nil
{
if
setting
.
CustomProfile
!=
nil
{
generalSetting
.
CustomProfile
=
&
storepb
.
WorkspaceCustomProfile
{
generalSetting
.
CustomProfile
=
&
storepb
.
WorkspaceCustomProfile
{
...
...
web/src/components/ActivityCalendar.tsx
View file @
3c5aa41a
import
{
Tooltip
}
from
"@mui/joy"
;
import
{
Tooltip
}
from
"@mui/joy"
;
import
clsx
from
"clsx"
;
import
clsx
from
"clsx"
;
import
dayjs
from
"dayjs"
;
import
dayjs
from
"dayjs"
;
import
{
useWorkspaceSettingStore
}
from
"@/store/v1"
;
import
{
WorkspaceGeneralSetting
}
from
"@/types/proto/api/v1/workspace_setting_service"
;
import
{
WorkspaceSettingKey
}
from
"@/types/proto/store/workspace_setting"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
import
{
useTranslate
}
from
"@/utils/i18n"
;
const
WEEK_DAYS
=
[
"Su"
,
"Mo"
,
"Tu"
,
"We"
,
"Th"
,
"Fr"
,
"Sa"
];
interface
Props
{
interface
Props
{
// Format: 2021-1
// Format: 2021-1
month
:
string
;
month
:
string
;
...
@@ -29,11 +34,16 @@ const getCellAdditionalStyles = (count: number, maxCount: number) => {
...
@@ -29,11 +34,16 @@ const getCellAdditionalStyles = (count: number, maxCount: number) => {
const
ActivityCalendar
=
(
props
:
Props
)
=>
{
const
ActivityCalendar
=
(
props
:
Props
)
=>
{
const
t
=
useTranslate
();
const
t
=
useTranslate
();
const
{
month
:
monthStr
,
data
,
onClick
}
=
props
;
const
{
month
:
monthStr
,
data
,
onClick
}
=
props
;
const
workspaceSettingStore
=
useWorkspaceSettingStore
();
const
weekStartDayOffset
=
(
workspaceSettingStore
.
getWorkspaceSettingByKey
(
WorkspaceSettingKey
.
GENERAL
).
generalSetting
||
WorkspaceGeneralSetting
.
fromPartial
({})
).
weekStartDayOffset
;
const
year
=
dayjs
(
monthStr
).
toDate
().
getFullYear
();
const
year
=
dayjs
(
monthStr
).
toDate
().
getFullYear
();
const
month
=
dayjs
(
monthStr
).
toDate
().
getMonth
()
+
1
;
const
month
=
dayjs
(
monthStr
).
toDate
().
getMonth
()
+
1
;
const
dayInMonth
=
new
Date
(
year
,
month
,
0
).
getDate
();
const
dayInMonth
=
new
Date
(
year
,
month
,
0
).
getDate
();
const
firstDay
=
new
Date
(
year
,
month
-
1
,
1
).
getDay
();
const
firstDay
=
new
Date
(
year
,
month
-
1
,
1
).
getDay
()
-
weekStartDayOffset
;
const
lastDay
=
new
Date
(
year
,
month
-
1
,
dayInMonth
).
getDay
();
const
lastDay
=
new
Date
(
year
,
month
-
1
,
dayInMonth
).
getDay
()
-
weekStartDayOffset
;
const
weekDays
=
WEEK_DAYS
.
slice
(
weekStartDayOffset
).
concat
(
WEEK_DAYS
.
slice
(
0
,
weekStartDayOffset
));
const
maxCount
=
Math
.
max
(...
Object
.
values
(
data
));
const
maxCount
=
Math
.
max
(...
Object
.
values
(
data
));
const
days
=
[];
const
days
=
[];
...
@@ -49,13 +59,13 @@ const ActivityCalendar = (props: Props) => {
...
@@ -49,13 +59,13 @@ const ActivityCalendar = (props: Props) => {
return
(
return
(
<
div
className=
{
clsx
(
"w-full h-auto shrink-0 grid grid-cols-7 grid-flow-row gap-1"
)
}
>
<
div
className=
{
clsx
(
"w-full h-auto shrink-0 grid grid-cols-7 grid-flow-row gap-1"
)
}
>
<
div
className=
{
clsx
(
"w-6 h-5 text-xs flex justify-center items-center cursor-default opacity-60"
)
}
>
Su
</
div
>
{
weekDays
.
map
((
day
,
index
)
=>
{
<
div
className=
{
clsx
(
"w-6 h-5 text-xs flex justify-center items-center cursor-default opacity-60"
)
}
>
Mo
</
div
>
return
(
<
div
className=
{
clsx
(
"w-6 h-5 text-xs flex justify-center items-center cursor-default opacity-60"
)
}
>
Tu
</
div
>
<
div
key=
{
index
}
className=
{
clsx
(
"w-6 h-5 text-xs flex justify-center items-center cursor-default opacity-60"
)
}
>
<
div
className=
{
clsx
(
"w-6 h-5 text-xs flex justify-center items-center cursor-default opacity-60"
)
}
>
We
</
div
>
{
day
}
<
div
className=
{
clsx
(
"w-6 h-5 text-xs flex justify-center items-center cursor-default opacity-60"
)
}
>
Th
</
div
>
</
div
>
<
div
className=
{
clsx
(
"w-6 h-5 text-xs flex justify-center items-center cursor-default opacity-60"
)
}
>
Fr
</
div
>
);
<
div
className=
{
clsx
(
"w-6 h-5 text-xs flex justify-center items-center cursor-default opacity-60"
)
}
>
Sa
</
div
>
})
}
{
days
.
map
((
day
,
index
)
=>
{
{
days
.
map
((
day
,
index
)
=>
{
const
date
=
dayjs
(
`${year}-${month}-${day}`
).
format
(
"YYYY-MM-DD"
);
const
date
=
dayjs
(
`${year}-${month}-${day}`
).
format
(
"YYYY-MM-DD"
);
const
count
=
data
[
date
]
||
0
;
const
count
=
data
[
date
]
||
0
;
...
...
web/src/components/ChangePasswordDialog.tsx
View file @
3c5aa41a
...
@@ -60,8 +60,8 @@ const ChangePasswordDialog: React.FC<Props> = ({ destroy }: Props) => {
...
@@ -60,8 +60,8 @@ const ChangePasswordDialog: React.FC<Props> = ({ destroy }: Props) => {
toast
.
success
(
t
(
"message.password-changed"
));
toast
.
success
(
t
(
"message.password-changed"
));
handleCloseBtnClick
();
handleCloseBtnClick
();
}
catch
(
error
:
any
)
{
}
catch
(
error
:
any
)
{
toast
.
error
(
error
.
details
);
console
.
error
(
error
);
console
.
error
(
error
);
toast
.
error
(
error
.
response
.
data
.
message
);
}
}
};
};
...
...
web/src/components/CreateAccessTokenDialog.tsx
View file @
3c5aa41a
...
@@ -77,8 +77,8 @@ const CreateAccessTokenDialog: React.FC<Props> = (props: Props) => {
...
@@ -77,8 +77,8 @@ const CreateAccessTokenDialog: React.FC<Props> = (props: Props) => {
onConfirm
();
onConfirm
();
destroy
();
destroy
();
}
catch
(
error
:
any
)
{
}
catch
(
error
:
any
)
{
toast
.
error
(
error
.
details
);
console
.
error
(
error
);
console
.
error
(
error
);
toast
.
error
(
error
.
response
.
data
.
message
);
}
}
};
};
...
...
web/src/components/CreateIdentityProviderDialog.tsx
View file @
3c5aa41a
...
@@ -224,8 +224,8 @@ const CreateIdentityProviderDialog: React.FC<Props> = (props: Props) => {
...
@@ -224,8 +224,8 @@ const CreateIdentityProviderDialog: React.FC<Props> = (props: Props) => {
toast
.
success
(
t
(
"setting.sso-section.sso-updated"
,
{
name
:
basicInfo
.
title
}));
toast
.
success
(
t
(
"setting.sso-section.sso-updated"
,
{
name
:
basicInfo
.
title
}));
}
}
}
catch
(
error
:
any
)
{
}
catch
(
error
:
any
)
{
toast
.
error
(
error
.
details
);
console
.
error
(
error
);
console
.
error
(
error
);
toast
.
error
(
error
.
response
.
data
.
message
);
}
}
if
(
confirmCallback
)
{
if
(
confirmCallback
)
{
confirmCallback
();
confirmCallback
();
...
...
web/src/components/MemoActionMenu.tsx
View file @
3c5aa41a
...
@@ -78,8 +78,8 @@ const MemoActionMenu = (props: Props) => {
...
@@ -78,8 +78,8 @@ const MemoActionMenu = (props: Props) => {
toast
.
success
(
t
(
"message.archived-successfully"
));
toast
.
success
(
t
(
"message.archived-successfully"
));
}
}
}
catch
(
error
:
any
)
{
}
catch
(
error
:
any
)
{
toast
.
error
(
error
.
details
);
console
.
error
(
error
);
console
.
error
(
error
);
toast
.
error
(
error
.
response
.
data
.
message
);
return
;
return
;
}
}
...
...
web/src/components/MemoEditor/ActionButton/AddMemoRelationPopover.tsx
View file @
3c5aa41a
...
@@ -51,8 +51,8 @@ const AddMemoRelationPopover = (props: Props) => {
...
@@ -51,8 +51,8 @@ const AddMemoRelationPopover = (props: Props) => {
});
});
setFetchedMemos
(
memos
);
setFetchedMemos
(
memos
);
}
catch
(
error
:
any
)
{
}
catch
(
error
:
any
)
{
toast
.
error
(
error
.
details
);
console
.
error
(
error
);
console
.
error
(
error
);
toast
.
error
(
error
.
response
.
data
.
message
);
}
}
setIsFetching
(
false
);
setIsFetching
(
false
);
},
},
...
...
web/src/components/Settings/WorkspaceSection.tsx
View file @
3c5aa41a
import
{
Button
,
Textarea
}
from
"@mui/joy"
;
import
{
Button
,
Select
,
Textarea
,
Option
,
Divider
}
from
"@mui/joy"
;
import
{
useState
}
from
"react"
;
import
{
useState
}
from
"react"
;
import
{
toast
}
from
"react-hot-toast"
;
import
{
toast
}
from
"react-hot-toast"
;
import
{
Link
}
from
"react-router-dom"
;
import
{
Link
}
from
"react-router-dom"
;
...
@@ -25,27 +25,15 @@ const WorkspaceSection = () => {
...
@@ -25,27 +25,15 @@ const WorkspaceSection = () => {
setWorkspaceGeneralSetting
({
...
workspaceGeneralSetting
,
additionalStyle
:
value
});
setWorkspaceGeneralSetting
({
...
workspaceGeneralSetting
,
additionalStyle
:
value
});
};
};
const
handleSaveAdditionalStyle
=
async
()
=>
{
try
{
await
workspaceSettingServiceClient
.
setWorkspaceSetting
({
setting
:
{
name
:
`
${
workspaceSettingNamePrefix
}${
WorkspaceSettingKey
.
GENERAL
}
`
,
generalSetting
:
workspaceGeneralSetting
,
},
});
}
catch
(
error
:
any
)
{
toast
.
error
(
error
.
response
.
data
.
message
);
console
.
error
(
error
);
return
;
}
toast
.
success
(
t
(
"message.update-succeed"
));
};
const
handleAdditionalScriptChanged
=
(
value
:
string
)
=>
{
const
handleAdditionalScriptChanged
=
(
value
:
string
)
=>
{
setWorkspaceGeneralSetting
({
...
workspaceGeneralSetting
,
additionalScript
:
value
});
setWorkspaceGeneralSetting
({
...
workspaceGeneralSetting
,
additionalScript
:
value
});
};
};
const
handleSaveAdditionalScript
=
async
()
=>
{
const
handleWeekStartDayOffsetChanged
=
(
value
:
number
)
=>
{
setWorkspaceGeneralSetting
({
...
workspaceGeneralSetting
,
weekStartDayOffset
:
value
});
};
const
handleSaveGeneralSetting
=
async
()
=>
{
try
{
try
{
await
workspaceSettingServiceClient
.
setWorkspaceSetting
({
await
workspaceSettingServiceClient
.
setWorkspaceSetting
({
setting
:
{
setting
:
{
...
@@ -54,7 +42,7 @@ const WorkspaceSection = () => {
...
@@ -54,7 +42,7 @@ const WorkspaceSection = () => {
},
},
});
});
}
catch
(
error
:
any
)
{
}
catch
(
error
:
any
)
{
toast
.
error
(
error
.
response
.
data
.
message
);
toast
.
error
(
error
.
details
);
console
.
error
(
error
);
console
.
error
(
error
);
return
;
return
;
}
}
...
@@ -69,15 +57,14 @@ const WorkspaceSection = () => {
...
@@ -69,15 +57,14 @@ const WorkspaceSection = () => {
{
t
(
"setting.system-section.server-name"
)
}
:
{
" "
}
{
t
(
"setting.system-section.server-name"
)
}
:
{
" "
}
<
span
className=
"font-mono font-bold"
>
{
workspaceGeneralSetting
.
customProfile
?.
title
||
"Memos"
}
</
span
>
<
span
className=
"font-mono font-bold"
>
{
workspaceGeneralSetting
.
customProfile
?.
title
||
"Memos"
}
</
span
>
</
div
>
</
div
>
<
Button
onClick=
{
handleUpdateCustomizedProfileButtonClick
}
>
{
t
(
"common.edit"
)
}
</
Button
>
<
Button
variant=
"outlined"
color=
"neutral"
onClick=
{
handleUpdateCustomizedProfileButtonClick
}
>
{
t
(
"common.edit"
)
}
</
Button
>
</
div
>
</
div
>
<
Divider
/>
<
p
className=
"font-medium text-gray-700 dark:text-gray-500"
>
General
</
p
>
<
p
className=
"font-medium text-gray-700 dark:text-gray-500"
>
General
</
p
>
<
div
className=
"space-y-2 border rounded-md py-2 px-3 dark:border-zinc-700"
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
span
>
{
t
(
"setting.system-section.additional-style"
)
}
</
span
>
<
span
>
{
t
(
"setting.system-section.additional-style"
)
}
</
span
>
<
Button
variant=
"outlined"
color=
"neutral"
onClick=
{
handleSaveAdditionalStyle
}
>
{
t
(
"common.save"
)
}
</
Button
>
</
div
>
</
div
>
<
Textarea
<
Textarea
className=
"w-full"
className=
"w-full"
...
@@ -93,9 +80,6 @@ const WorkspaceSection = () => {
...
@@ -93,9 +80,6 @@ const WorkspaceSection = () => {
/>
/>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
span
>
{
t
(
"setting.system-section.additional-script"
)
}
</
span
>
<
span
>
{
t
(
"setting.system-section.additional-script"
)
}
</
span
>
<
Button
variant=
"outlined"
color=
"neutral"
onClick=
{
handleSaveAdditionalScript
}
>
{
t
(
"common.save"
)
}
</
Button
>
</
div
>
</
div
>
<
Textarea
<
Textarea
className=
"w-full"
className=
"w-full"
...
@@ -120,6 +104,23 @@ const WorkspaceSection = () => {
...
@@ -120,6 +104,23 @@ const WorkspaceSection = () => {
<
Icon
.
ExternalLink
className=
"inline w-4 h-auto ml-1"
/>
<
Icon
.
ExternalLink
className=
"inline w-4 h-auto ml-1"
/>
</
Link
>
</
Link
>
</
div
>
</
div
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
span
className=
"truncate"
>
{
t
(
"setting.preference-section.default-memo-visibility"
)
}
</
span
>
<
Select
className=
"!min-w-fit"
value=
{
workspaceGeneralSetting
.
weekStartDayOffset
}
onChange=
{
(
_
,
weekStartDayOffset
)
=>
{
handleWeekStartDayOffsetChanged
(
weekStartDayOffset
||
0
);
}
}
>
<
Option
value=
{
0
}
>
Sunday
</
Option
>
<
Option
value=
{
1
}
>
Monday
</
Option
>
</
Select
>
</
div
>
<
div
>
<
Button
variant=
"outlined"
color=
"neutral"
onClick=
{
handleSaveGeneralSetting
}
>
{
t
(
"common.save"
)
}
</
Button
>
</
div
>
</
div
>
</
div
>
</
div
>
);
);
...
...
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