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
ce322066
Commit
ce322066
authored
Feb 21, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: remove unused system setting
parent
50a3af3b
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
101 additions
and
125 deletions
+101
-125
docs.go
api/v1/docs.go
+9
-37
swagger.md
api/v1/swagger.md
+15
-26
swagger.yaml
api/v1/swagger.yaml
+9
-28
system_setting.go
api/v1/system_setting.go
+1
-5
apidocs.swagger.md
api/v2/apidocs.swagger.md
+63
-14
MemoActionMenu.tsx
web/src/components/MemoActionMenu.tsx
+0
-1
UpdateCustomizedProfileDialog.tsx
web/src/components/UpdateCustomizedProfileDialog.tsx
+2
-6
UserBanner.tsx
web/src/components/UserBanner.tsx
+1
-1
en.json
web/src/locales/en.json
+0
-1
sv.json
web/src/locales/sv.json
+0
-1
MemoDetail.tsx
web/src/pages/MemoDetail.tsx
+1
-1
global.ts
web/src/store/module/global.ts
+0
-2
global.ts
web/src/store/reducer/global.ts
+0
-1
system.d.ts
web/src/types/modules/system.d.ts
+0
-1
No files found.
api/v1/docs.go
View file @
ce322066
...
...
@@ -477,7 +477,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/
github_com_usememos_memos_
api_v1.CreateMemoRequest"
"$ref": "#/definitions/api_v1.CreateMemoRequest"
}
}
],
...
...
@@ -695,7 +695,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/
github_com_usememos_memos_
api_v1.PatchMemoRequest"
"$ref": "#/definitions/api_v1.PatchMemoRequest"
}
}
],
...
...
@@ -992,7 +992,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/api_v1.CreateResourceRequest"
"$ref": "#/definitions/
github_com_usememos_memos_
api_v1.CreateResourceRequest"
}
}
],
...
...
@@ -1116,7 +1116,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/api_v1.UpdateResourceRequest"
"$ref": "#/definitions/
github_com_usememos_memos_
api_v1.UpdateResourceRequest"
}
}
],
...
...
@@ -1155,7 +1155,7 @@ const docTemplate = `{
"200": {
"description": "System GetSystemStatus",
"schema": {
"$ref": "#/definitions/api_v1.SystemStatus"
"$ref": "#/definitions/
github_com_usememos_memos_
api_v1.SystemStatus"
}
},
"401": {
...
...
@@ -1331,7 +1331,7 @@ const docTemplate = `{
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/api_v1.SystemSetting"
"$ref": "#/definitions/
github_com_usememos_memos_
api_v1.SystemSetting"
}
}
},
...
...
@@ -1361,17 +1361,11 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/api_v1.UpsertSystemSettingRequest"
"$ref": "#/definitions/
github_com_usememos_memos_
api_v1.UpsertSystemSettingRequest"
}
}
],
"responses": {
"200": {
"description": "Created system setting",
"schema": {
"$ref": "#/definitions/store.SystemSetting"
}
},
"400": {
"description": "Malformatted post system setting request | invalid system setting"
},
...
...
@@ -1592,7 +1586,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/
github_com_usememos_memos_
api_v1.CreateUserRequest"
"$ref": "#/definitions/api_v1.CreateUserRequest"
}
}
],
...
...
@@ -1773,7 +1767,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/
github_com_usememos_memos_
api_v1.UpdateUserRequest"
"$ref": "#/definitions/api_v1.UpdateUserRequest"
}
}
],
...
...
@@ -1940,10 +1934,6 @@ const docTemplate = `{
"description": "Description is the server description.",
"type": "string"
},
"externalUrl": {
"description": "ExternalURL is the external url of server. e.g. https://usermemos.com",
"type": "string"
},
"locale": {
"description": "Locale is the server default locale.",
"type": "string"
...
...
@@ -2574,10 +2564,6 @@ const docTemplate = `{
"description": "Description is the server description.",
"type": "string"
},
"externalUrl": {
"description": "ExternalURL is the external url of server. e.g. https://usermemos.com",
"type": "string"
},
"locale": {
"description": "Locale is the server default locale.",
"type": "string"
...
...
@@ -3347,20 +3333,6 @@ const docTemplate = `{
}
}
},
"store.SystemSetting": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"store.User": {
"type": "object",
"properties": {
...
...
api/v1/swagger.md
View file @
ce322066
...
...
@@ -242,7 +242,7 @@ Visibility can be PUBLIC, PROTECTED or PRIVATE
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| body | body | Request object. | Yes |
[
github_com_usememos_memos_api_v1.CreateMemoRequest
](
#github_com_usememos_memos_
api_v1creatememorequest
)
|
| body | body | Request object. | Yes |
[
api_v1.CreateMemoRequest
](
#
api_v1creatememorequest
)
|
##### Responses
...
...
@@ -314,7 +314,7 @@ Visibility can be PUBLIC, PROTECTED or PRIVATE
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| memoId | path | ID of memo to update | Yes | integer |
| body | body | Patched object. | Yes |
[
github_com_usememos_memos_api_v1.PatchMemoRequest
](
#github_com_usememos_memos_
api_v1patchmemorequest
)
|
| body | body | Patched object. | Yes |
[
api_v1.PatchMemoRequest
](
#
api_v1patchmemorequest
)
|
##### Responses
...
...
@@ -501,7 +501,7 @@ Get system GetSystemStatus
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | System GetSystemStatus |
[
api_v1.SystemStatus
](
#
api_v1systemstatus
)
|
| 200 | System GetSystemStatus |
[
github_com_usememos_memos_api_v1.SystemStatus
](
#github_com_usememos_memos_
api_v1systemstatus
)
|
| 401 | Missing user in session
\|
Unauthorized | |
| 500 | Failed to find host user
\|
Failed to find system setting list
\|
Failed to unmarshal system setting customized profile value | |
...
...
@@ -552,7 +552,7 @@ Create resource
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| body | body | Request object. | Yes |
[
api_v1.CreateResourceRequest
](
#
api_v1createresourcerequest
)
|
| body | body | Request object. | Yes |
[
github_com_usememos_memos_api_v1.CreateResourceRequest
](
#github_com_usememos_memos_
api_v1createresourcerequest
)
|
##### Responses
...
...
@@ -596,7 +596,7 @@ Update a resource
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| resourceId | path | Resource ID | Yes | integer |
| patch | body | Patch resource request | Yes |
[
api_v1.UpdateResourceRequest
](
#
api_v1updateresourcerequest
)
|
| patch | body | Patch resource request | Yes |
[
github_com_usememos_memos_api_v1.UpdateResourceRequest
](
#github_com_usememos_memos_
api_v1updateresourcerequest
)
|
##### Responses
...
...
@@ -721,7 +721,7 @@ Get a list of system settings
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | System setting list |
[
[
api_v1.SystemSetting
](
#
api_v1systemsetting
)
] |
| 200 | System setting list |
[
[
github_com_usememos_memos_api_v1.SystemSetting
](
#github_com_usememos_memos_
api_v1systemsetting
)
] |
| 401 | Missing user in session
\|
Unauthorized | |
| 500 | Failed to find user
\|
Failed to find system setting list | |
...
...
@@ -734,17 +734,16 @@ Create system setting
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| body | body | Request object. | Yes |
[
api_v1.UpsertSystemSettingRequest
](
#
api_v1upsertsystemsettingrequest
)
|
| body | body | Request object. | Yes |
[
github_com_usememos_memos_api_v1.UpsertSystemSettingRequest
](
#github_com_usememos_memos_
api_v1upsertsystemsettingrequest
)
|
##### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | Created system setting |
[
store.SystemSetting
](
#storesystemsetting
)
|
| 400 | Malformatted post system setting request
\|
invalid system setting | |
| 401 | Missing user in session
\|
Unauthorized | |
| 403 | Cannot disable passwords if no SSO identity provider is configured. | |
| 500 | Failed to find user
\|
Failed to upsert system setting | |
| Code | Description |
| ---- | ----------- |
| 400 | Malformatted post system setting request
\|
invalid system setting |
| 401 | Missing user in session
\|
Unauthorized |
| 403 | Cannot disable passwords if no SSO identity provider is configured. |
| 500 | Failed to find user
\|
Failed to upsert system setting |
---
### /api/v1/tag
...
...
@@ -843,7 +842,7 @@ Create a user
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| body | body | Request object | Yes |
[
github_com_usememos_memos_api_v1.CreateUserRequest
](
#github_com_usememos_memos_
api_v1createuserrequest
)
|
| body | body | Request object | Yes |
[
api_v1.CreateUserRequest
](
#
api_v1createuserrequest
)
|
##### Responses
...
...
@@ -908,7 +907,7 @@ Update a user
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| id | path | User ID | Yes | string |
| patch | body | Patch request | Yes |
[
github_com_usememos_memos_api_v1.UpdateUserRequest
](
#github_com_usememos_memos_
api_v1updateuserrequest
)
|
| patch | body | Patch request | Yes |
[
api_v1.UpdateUserRequest
](
#
api_v1updateuserrequest
)
|
##### Responses
...
...
@@ -1032,7 +1031,6 @@ Get GetImage from URL
| ---- | ---- | ----------- | -------- |
| appearance | string | Appearance is the server default appearance. | No |
| description | string | Description is the server description. | No |
| externalUrl | string | ExternalURL is the external url of server. e.g. https://usermemos.com | No |
| locale | string | Locale is the server default locale. | No |
| logoUrl | string | LogoURL is the url of logo image. | No |
| name | string | Name is the server name, default is
`memos`
| No |
...
...
@@ -1328,7 +1326,6 @@ Get GetImage from URL
| ---- | ---- | ----------- | -------- |
| appearance | string | Appearance is the server default appearance. | No |
| description | string | Description is the server description. | No |
| externalUrl | string | ExternalURL is the external url of server. e.g. https://usermemos.com | No |
| locale | string | Locale is the server default locale. | No |
| logoUrl | string | LogoURL is the url of logo image. | No |
| name | string | Name is the server name, default is
`memos`
| No |
...
...
@@ -1689,14 +1686,6 @@ Get GetImage from URL
| name | string | | No |
| type | string | | No |
#### store.SystemSetting
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| description | string | | No |
| name | string | | No |
| value | string | | No |
#### store.User
| Name | Type | Description | Required |
...
...
api/v1/swagger.yaml
View file @
ce322066
...
...
@@ -70,9 +70,6 @@ definitions:
description
:
description
:
Description is the server description.
type
:
string
externalUrl
:
description
:
ExternalURL is the external url of server. e.g. https://usermemos.com
type
:
string
locale
:
description
:
Locale is the server default locale.
type
:
string
...
...
@@ -502,9 +499,6 @@ definitions:
description
:
description
:
Description is the server description.
type
:
string
externalUrl
:
description
:
ExternalURL is the external url of server. e.g. https://usermemos.com
type
:
string
locale
:
description
:
Locale is the server default locale.
type
:
string
...
...
@@ -1029,15 +1023,6 @@ definitions:
type
:
type
:
string
type
:
object
store.SystemSetting
:
properties
:
description
:
type
:
string
name
:
type
:
string
value
:
type
:
string
type
:
object
store.User
:
properties
:
avatarURL
:
...
...
@@ -1397,7 +1382,7 @@ paths:
name: body
required: true
schema:
$ref: '#/definitions/
github_com_usememos_memos_
api_v1.CreateMemoRequest'
$ref: '#/definitions/api_v1.CreateMemoRequest'
produces:
- application/json
responses:
...
...
@@ -1494,7 +1479,7 @@ paths:
name: body
required: true
schema:
$ref: '#/definitions/
github_com_usememos_memos_
api_v1.PatchMemoRequest'
$ref: '#/definitions/api_v1.PatchMemoRequest'
produces:
- application/json
responses:
...
...
@@ -1753,7 +1738,7 @@ paths:
name
:
body
required
:
true
schema
:
$ref
:
'
#/definitions/api_v1.CreateResourceRequest'
$ref
:
'
#/definitions/
github_com_usememos_memos_
api_v1.CreateResourceRequest'
produces
:
-
application/json
responses
:
...
...
@@ -1811,7 +1796,7 @@ paths:
name
:
patch
required
:
true
schema
:
$ref
:
'
#/definitions/api_v1.UpdateResourceRequest'
$ref
:
'
#/definitions/
github_com_usememos_memos_
api_v1.UpdateResourceRequest'
produces
:
-
application/json
responses
:
...
...
@@ -1866,7 +1851,7 @@ paths:
"
200"
:
description
:
System GetSystemStatus
schema
:
$ref
:
'
#/definitions/api_v1.SystemStatus'
$ref
:
'
#/definitions/
github_com_usememos_memos_
api_v1.SystemStatus'
"
401"
:
description
:
Missing user in session | Unauthorized
"
500"
:
...
...
@@ -1985,7 +1970,7 @@ paths:
description
:
System setting list
schema
:
items
:
$ref
:
'
#/definitions/api_v1.SystemSetting'
$ref
:
'
#/definitions/
github_com_usememos_memos_
api_v1.SystemSetting'
type
:
array
"
401"
:
description
:
Missing user in session | Unauthorized
...
...
@@ -2003,14 +1988,10 @@ paths:
name
:
body
required
:
true
schema
:
$ref
:
'
#/definitions/api_v1.UpsertSystemSettingRequest'
$ref
:
'
#/definitions/
github_com_usememos_memos_
api_v1.UpsertSystemSettingRequest'
produces
:
-
application/json
responses
:
"
200"
:
description
:
Created system setting
schema
:
$ref
:
'
#/definitions/store.SystemSetting'
"
400"
:
description
:
Malformatted post system setting request | invalid system setting
"
401"
:
...
...
@@ -2152,7 +2133,7 @@ paths:
name
:
body
required
:
true
schema
:
$ref
:
'
#/definitions/
github_com_usememos_memos_
api_v1.CreateUserRequest'
$ref
:
'
#/definitions/api_v1.CreateUserRequest'
produces
:
-
application/json
responses
:
...
...
@@ -2234,7 +2215,7 @@ paths:
name
:
patch
required
:
true
schema
:
$ref
:
'
#/definitions/
github_com_usememos_memos_
api_v1.UpdateUserRequest'
$ref
:
'
#/definitions/api_v1.UpdateUserRequest'
produces
:
-
application/json
responses
:
...
...
api/v1/system_setting.go
View file @
ce322066
...
...
@@ -58,8 +58,6 @@ type CustomizedProfile struct {
Locale
string
`json:"locale"`
// Appearance is the server default appearance.
Appearance
string
`json:"appearance"`
// ExternalURL is the external url of server. e.g. https://usermemos.com
ExternalURL
string
`json:"externalUrl"`
}
func
(
key
SystemSettingName
)
String
()
string
{
...
...
@@ -129,7 +127,6 @@ func (s *APIV1Service) GetSystemSettingList(c echo.Context) error {
// @Accept json
// @Produce json
// @Param body body UpsertSystemSettingRequest true "Request object."
// @Success 200 {object} store.SystemSetting "Created system setting"
// @Failure 400 {object} nil "Malformatted post system setting request | invalid system setting"
// @Failure 401 {object} nil "Missing user in session | Unauthorized"
// @Failure 403 {object} nil "Cannot disable passwords if no SSO identity provider is configured."
...
...
@@ -231,12 +228,11 @@ func (upsert UpsertSystemSettingRequest) Validate() error {
}
case
SystemSettingCustomizedProfileName
:
customizedProfile
:=
CustomizedProfile
{
Name
:
"
m
emos"
,
Name
:
"
M
emos"
,
LogoURL
:
""
,
Description
:
""
,
Locale
:
"en"
,
Appearance
:
"system"
,
ExternalURL
:
""
,
}
if
err
:=
json
.
Unmarshal
([]
byte
(
upsert
.
Value
),
&
customizedProfile
);
err
!=
nil
{
return
errors
.
Errorf
(
systemSettingUnmarshalError
,
settingName
)
...
...
api/v2/apidocs.swagger.md
View file @
ce322066
...
...
@@ -1052,22 +1052,48 @@ GetWorkspaceProfile returns the workspace profile.
| 200 | A successful response. |
[
v2GetWorkspaceProfileResponse
](
#v2getworkspaceprofileresponse
)
|
| default | An unexpected error response. |
[
googlerpcStatus
](
#googlerpcstatus
)
|
---
## WorkspaceSettingService
### /api/v2/workspace/{name}
#### GET
##### Summary
GetWorkspaceSetting returns the setting by name.
##### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| name | path | The resource name of the workspace setting. Format: settings/{setting} | Yes | string |
##### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | A successful response. |
[
v2GetWorkspaceSettingResponse
](
#v2getworkspacesettingresponse
)
|
| default | An unexpected error response. |
[
googlerpcStatus
](
#googlerpcstatus
)
|
### /api/v2/workspace/{setting.name}
#### PATCH
##### Summary
UpdateWorkspaceProfile updates the workspace profile
.
SetWorkspaceSetting updates the setting
.
##### Parameters
| Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ |
| workspaceProfile | body | System info is the updated data. | Yes |
[
v2WorkspaceProfile
](
#v2workspaceprofile
)
|
| setting.name | path | name is the name of the setting. Format: settings/{setting} | Yes | string |
| setting | body | setting is the setting to update. | Yes | {
**"generalSetting"**
:
[
apiv2WorkspaceGeneralSetting
](
#apiv2workspacegeneralsetting
)
} |
##### Responses
| Code | Description | Schema |
| ---- | ----------- | ------ |
| 200 | A successful response. |
[
v2
UpdateWorkspaceProfileResponse
](
#v2updateworkspaceprofile
response
)
|
| 200 | A successful response. |
[
v2
SetWorkspaceSettingResponse
](
#v2setworkspacesetting
response
)
|
| default | An unexpected error response. |
[
googlerpcStatus
](
#googlerpcstatus
)
|
---
...
...
@@ -1185,6 +1211,23 @@ GetActivity returns the activity with the given id.
| name | string | | No |
| url | string | | No |
#### apiv2WorkspaceGeneralSetting
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| instanceUrl | string | instance_url is the instance URL. | No |
| disallowSignup | boolean | disallow_signup is the flag to disallow signup. | No |
| disallowPasswordLogin | boolean | disallow_password_login is the flag to disallow password login. | No |
| additionalScript | string | additional_script is the additional script. | No |
| additionalStyle | string | additional_style is the additional style. | No |
#### apiv2WorkspaceSetting
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| name | string | | No |
| generalSetting |
[
apiv2WorkspaceGeneralSetting
](
#apiv2workspacegeneralsetting
)
| general_setting is the general setting of workspace. | No |
#### googlerpcStatus
| Name | Type | Description | Required |
...
...
@@ -1392,6 +1435,12 @@ GetActivity returns the activity with the given id.
| ---- | ---- | ----------- | -------- |
| workspaceProfile |
[
v2WorkspaceProfile
](
#v2workspaceprofile
)
| | No |
#### v2GetWorkspaceSettingResponse
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| setting |
[
apiv2WorkspaceSetting
](
#apiv2workspacesetting
)
| | No |
#### v2Inbox
| Name | Type | Description | Required |
...
...
@@ -1548,6 +1597,12 @@ GetActivity returns the activity with the given id.
| ---- | ---- | ----------- | -------- |
| v2SetMemoResourcesResponse | object | | |
#### v2SetWorkspaceSettingResponse
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| setting |
[
apiv2WorkspaceSetting
](
#apiv2workspacesetting
)
| | No |
#### v2SignInResponse
| Name | Type | Description | Required |
...
...
@@ -1615,12 +1670,6 @@ GetActivity returns the activity with the given id.
| ---- | ---- | ----------- | -------- |
| webhook |
[
apiv2Webhook
](
#apiv2webhook
)
| | No |
#### v2UpdateWorkspaceProfileResponse
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| workspaceProfile |
[
v2WorkspaceProfile
](
#v2workspaceprofile
)
| | No |
#### v2UpsertMemoReactionResponse
| Name | Type | Description | Required |
...
...
@@ -1675,8 +1724,8 @@ GetActivity returns the activity with the given id.
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| version | string | | No |
| mode | string | | No |
| allowRegistration | boolean | | No |
| disablePasswordLogin | boolean | | No |
| additionalScript | string | | No |
| additionalStyle | string | | No |
| mode | string |
mode is the instance mode (e.g. "prod", "dev" or "demo").
| No |
| allowRegistration | boolean |
allow_registration is whether the registration is allowed.
| No |
| disablePasswordLogin | boolean |
allow_password_login is whether the password login is allowed.
| No |
| additionalScript | string |
additional_script is the additional script.
| No |
| additionalStyle | string |
additional_style is the additional style.
| No |
web/src/components/MemoActionMenu.tsx
View file @
ce322066
...
...
@@ -117,7 +117,6 @@ const MemoActionMenu = (props: Props) => {
{
t
(
"common.share"
)
}
</
MenuItem
>
)
}
<
Divider
className=
"!my-1"
/>
<
MenuItem
color=
"warning"
onClick=
{
handleArchiveMemoClick
}
>
<
Icon
.
Archive
className=
"w-4 h-auto"
/>
{
t
(
"common.archive"
)
}
...
...
web/src/components/UpdateCustomizedProfileDialog.tsx
View file @
ce322066
...
...
@@ -62,12 +62,11 @@ const UpdateCustomizedProfileDialog: React.FC<Props> = ({ destroy }: Props) => {
const
handleRestoreButtonClick
=
()
=>
{
setPartialState
({
name
:
"
m
emos"
,
name
:
"
M
emos"
,
logoUrl
:
"/logo.webp"
,
description
:
""
,
locale
:
"en"
,
appearance
:
"system"
,
externalUrl
:
""
,
});
};
...
...
@@ -100,10 +99,7 @@ const UpdateCustomizedProfileDialog: React.FC<Props> = ({ destroy }: Props) => {
</
IconButton
>
</
div
>
<
div
className=
"dialog-content-container min-w-[16rem]"
>
<
p
className=
"text-sm mb-1"
>
{
t
(
"setting.system-section.server-name"
)
}
<
span
className=
"text-sm text-gray-400 ml-1"
>
(
{
t
(
"setting.system-section.customize-server.default"
)
}
)
</
span
>
</
p
>
<
p
className=
"text-sm mb-1"
>
{
t
(
"setting.system-section.server-name"
)
}
</
p
>
<
Input
className=
"w-full"
type=
"text"
value=
{
state
.
name
}
onChange=
{
handleNameChanged
}
/>
<
p
className=
"text-sm mb-1 mt-2"
>
{
t
(
"setting.system-section.customize-server.icon-url"
)
}
</
p
>
<
Input
className=
"w-full"
type=
"text"
value=
{
state
.
logoUrl
}
onChange=
{
handleLogoUrlChanged
}
/>
...
...
web/src/components/UserBanner.tsx
View file @
ce322066
...
...
@@ -39,7 +39,7 @@ const UserBanner = (props: Props) => {
{
!
collapsed
&&
<
span
className=
"ml-2 text-lg font-medium text-slate-800 dark:text-gray-200 shrink truncate"
>
{
title
}
</
span
>
}
</
div
>
</
MenuButton
>
<
Menu
placement=
"bottom-start"
s
ize=
"sm"
s
tyle=
{
{
zIndex
:
"9999"
}
}
>
<
Menu
placement=
"bottom-start"
style=
{
{
zIndex
:
"9999"
}
}
>
<
MenuItem
onClick=
{
handleSignOut
}
>
<
Icon
.
LogOut
className=
"w-4 h-auto opacity-60 shrink-0"
/>
<
span
className=
"truncate"
>
{
t
(
"common.sign-out"
)
}
</
span
>
...
...
web/src/locales/en.json
View file @
ce322066
...
...
@@ -243,7 +243,6 @@
"server-name"
:
"Server Name"
,
"customize-server"
:
{
"title"
:
"Customize Server"
,
"default"
:
"Default is memos"
,
"icon-url"
:
"Icon URL"
,
"description"
:
"Description"
,
"locale"
:
"Server Locale"
,
...
...
web/src/locales/sv.json
View file @
ce322066
...
...
@@ -111,7 +111,6 @@
"server-name"
:
"Server Name"
,
"customize-server"
:
{
"title"
:
"Customize Server"
,
"default"
:
"Default is memos"
,
"icon-url"
:
"Icon URL"
},
"database-file-size"
:
"Databas filstorlek"
,
...
...
web/src/pages/MemoDetail.tsx
View file @
ce322066
...
...
@@ -198,7 +198,7 @@ const MemoDetail = () => {
{
!
readonly
&&
(
<
MemoActionMenu
memo=
{
memo
}
hiddenActions=
{
[
"pin"
,
"share"
]
}
hiddenActions=
{
[
"pin"
,
"
edit"
,
"
share"
]
}
onArchived=
{
handleMemoArchived
}
onDeleted=
{
handleMemoDeleted
}
/>
...
...
web/src/store/module/global.ts
View file @
ce322066
...
...
@@ -23,7 +23,6 @@ export const initialGlobalState = async () => {
description
:
""
,
locale
:
"en"
,
appearance
:
"system"
,
externalUrl
:
""
,
},
}
as
SystemStatus
,
};
...
...
@@ -39,7 +38,6 @@ export const initialGlobalState = async () => {
description
:
customizedProfile
.
description
,
locale
:
customizedProfile
.
locale
||
"en"
,
appearance
:
customizedProfile
.
appearance
||
"system"
,
externalUrl
:
""
,
},
};
// Use storageLocale > userLocale > customizedProfile.locale (server's default locale)
...
...
web/src/store/reducer/global.ts
View file @
ce322066
...
...
@@ -29,7 +29,6 @@ const globalSlice = createSlice({
description
:
""
,
locale
:
"en"
,
appearance
:
"system"
,
externalUrl
:
""
,
},
},
}
as
State
,
...
...
web/src/types/modules/system.d.ts
View file @
ce322066
...
...
@@ -9,7 +9,6 @@ interface CustomizedProfile {
description
:
string
;
locale
:
Locale
;
appearance
:
Appearance
;
externalUrl
:
string
;
}
interface
SystemStatus
{
...
...
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