chore: remove unused system setting

pull/2998/head
Steven 1 year ago
parent 50a3af3b29
commit ce32206677

@ -477,7 +477,7 @@ const docTemplate = `{
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "schema": {
"$ref": "#/definitions/github_com_usememos_memos_api_v1.CreateMemoRequest" "$ref": "#/definitions/api_v1.CreateMemoRequest"
} }
} }
], ],
@ -695,7 +695,7 @@ const docTemplate = `{
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "schema": {
"$ref": "#/definitions/github_com_usememos_memos_api_v1.PatchMemoRequest" "$ref": "#/definitions/api_v1.PatchMemoRequest"
} }
} }
], ],
@ -992,7 +992,7 @@ const docTemplate = `{
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "schema": {
"$ref": "#/definitions/api_v1.CreateResourceRequest" "$ref": "#/definitions/github_com_usememos_memos_api_v1.CreateResourceRequest"
} }
} }
], ],
@ -1116,7 +1116,7 @@ const docTemplate = `{
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "schema": {
"$ref": "#/definitions/api_v1.UpdateResourceRequest" "$ref": "#/definitions/github_com_usememos_memos_api_v1.UpdateResourceRequest"
} }
} }
], ],
@ -1155,7 +1155,7 @@ const docTemplate = `{
"200": { "200": {
"description": "System GetSystemStatus", "description": "System GetSystemStatus",
"schema": { "schema": {
"$ref": "#/definitions/api_v1.SystemStatus" "$ref": "#/definitions/github_com_usememos_memos_api_v1.SystemStatus"
} }
}, },
"401": { "401": {
@ -1331,7 +1331,7 @@ const docTemplate = `{
"schema": { "schema": {
"type": "array", "type": "array",
"items": { "items": {
"$ref": "#/definitions/api_v1.SystemSetting" "$ref": "#/definitions/github_com_usememos_memos_api_v1.SystemSetting"
} }
} }
}, },
@ -1361,17 +1361,11 @@ const docTemplate = `{
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "schema": {
"$ref": "#/definitions/api_v1.UpsertSystemSettingRequest" "$ref": "#/definitions/github_com_usememos_memos_api_v1.UpsertSystemSettingRequest"
} }
} }
], ],
"responses": { "responses": {
"200": {
"description": "Created system setting",
"schema": {
"$ref": "#/definitions/store.SystemSetting"
}
},
"400": { "400": {
"description": "Malformatted post system setting request | invalid system setting" "description": "Malformatted post system setting request | invalid system setting"
}, },
@ -1592,7 +1586,7 @@ const docTemplate = `{
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "schema": {
"$ref": "#/definitions/github_com_usememos_memos_api_v1.CreateUserRequest" "$ref": "#/definitions/api_v1.CreateUserRequest"
} }
} }
], ],
@ -1773,7 +1767,7 @@ const docTemplate = `{
"in": "body", "in": "body",
"required": true, "required": true,
"schema": { "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.", "description": "Description is the server description.",
"type": "string" "type": "string"
}, },
"externalUrl": {
"description": "ExternalURL is the external url of server. e.g. https://usermemos.com",
"type": "string"
},
"locale": { "locale": {
"description": "Locale is the server default locale.", "description": "Locale is the server default locale.",
"type": "string" "type": "string"
@ -2574,10 +2564,6 @@ const docTemplate = `{
"description": "Description is the server description.", "description": "Description is the server description.",
"type": "string" "type": "string"
}, },
"externalUrl": {
"description": "ExternalURL is the external url of server. e.g. https://usermemos.com",
"type": "string"
},
"locale": { "locale": {
"description": "Locale is the server default locale.", "description": "Locale is the server default locale.",
"type": "string" "type": "string"
@ -3347,20 +3333,6 @@ const docTemplate = `{
} }
} }
}, },
"store.SystemSetting": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"store.User": { "store.User": {
"type": "object", "type": "object",
"properties": { "properties": {

@ -242,7 +242,7 @@ Visibility can be PUBLIC, PROTECTED or PRIVATE
| Name | Located in | Description | Required | Schema | | 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 ##### Responses
@ -314,7 +314,7 @@ Visibility can be PUBLIC, PROTECTED or PRIVATE
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ | | ---- | ---------- | ----------- | -------- | ------ |
| memoId | path | ID of memo to update | Yes | integer | | 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 ##### Responses
@ -501,7 +501,7 @@ Get system GetSystemStatus
| Code | Description | Schema | | 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 | | | 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 | | | 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 | | 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 ##### Responses
@ -596,7 +596,7 @@ Update a resource
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ | | ---- | ---------- | ----------- | -------- | ------ |
| resourceId | path | Resource ID | Yes | integer | | 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 ##### Responses
@ -721,7 +721,7 @@ Get a list of system settings
| Code | Description | Schema | | 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 | | | 401 | Missing user in session \| Unauthorized | |
| 500 | Failed to find user \| Failed to find system setting list | | | 500 | Failed to find user \| Failed to find system setting list | |
@ -734,17 +734,16 @@ Create system setting
| Name | Located in | Description | Required | Schema | | 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 ##### Responses
| Code | Description | Schema | | Code | Description |
| ---- | ----------- | ------ | | ---- | ----------- |
| 200 | Created system setting | [store.SystemSetting](#storesystemsetting) | | 400 | Malformatted post system setting request \| invalid system setting |
| 400 | Malformatted post system setting request \| invalid system setting | | | 401 | Missing user in session \| Unauthorized |
| 401 | Missing user in session \| Unauthorized | | | 403 | Cannot disable passwords if no SSO identity provider is configured. |
| 403 | Cannot disable passwords if no SSO identity provider is configured. | | | 500 | Failed to find user \| Failed to upsert system setting |
| 500 | Failed to find user \| Failed to upsert system setting | |
--- ---
### /api/v1/tag ### /api/v1/tag
@ -843,7 +842,7 @@ Create a user
| Name | Located in | Description | Required | Schema | | 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 ##### Responses
@ -908,7 +907,7 @@ Update a user
| Name | Located in | Description | Required | Schema | | Name | Located in | Description | Required | Schema |
| ---- | ---------- | ----------- | -------- | ------ | | ---- | ---------- | ----------- | -------- | ------ |
| id | path | User ID | Yes | string | | 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 ##### Responses
@ -1032,7 +1031,6 @@ Get GetImage from URL
| ---- | ---- | ----------- | -------- | | ---- | ---- | ----------- | -------- |
| appearance | string | Appearance is the server default appearance. | No | | appearance | string | Appearance is the server default appearance. | No |
| description | string | Description is the server description. | 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 | | locale | string | Locale is the server default locale. | No |
| logoUrl | string | LogoURL is the url of logo image. | No | | logoUrl | string | LogoURL is the url of logo image. | No |
| name | string | Name is the server name, default is `memos` | 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 | | appearance | string | Appearance is the server default appearance. | No |
| description | string | Description is the server description. | 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 | | locale | string | Locale is the server default locale. | No |
| logoUrl | string | LogoURL is the url of logo image. | No | | logoUrl | string | LogoURL is the url of logo image. | No |
| name | string | Name is the server name, default is `memos` | No | | name | string | Name is the server name, default is `memos` | No |
@ -1689,14 +1686,6 @@ Get GetImage from URL
| name | string | | No | | name | string | | No |
| type | string | | No | | type | string | | No |
#### store.SystemSetting
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| description | string | | No |
| name | string | | No |
| value | string | | No |
#### store.User #### store.User
| Name | Type | Description | Required | | Name | Type | Description | Required |

@ -70,9 +70,6 @@ definitions:
description: description:
description: Description is the server description. description: Description is the server description.
type: string type: string
externalUrl:
description: ExternalURL is the external url of server. e.g. https://usermemos.com
type: string
locale: locale:
description: Locale is the server default locale. description: Locale is the server default locale.
type: string type: string
@ -502,9 +499,6 @@ definitions:
description: description:
description: Description is the server description. description: Description is the server description.
type: string type: string
externalUrl:
description: ExternalURL is the external url of server. e.g. https://usermemos.com
type: string
locale: locale:
description: Locale is the server default locale. description: Locale is the server default locale.
type: string type: string
@ -1029,15 +1023,6 @@ definitions:
type: type:
type: string type: string
type: object type: object
store.SystemSetting:
properties:
description:
type: string
name:
type: string
value:
type: string
type: object
store.User: store.User:
properties: properties:
avatarURL: avatarURL:
@ -1397,7 +1382,7 @@ paths:
name: body name: body
required: true required: true
schema: schema:
$ref: '#/definitions/github_com_usememos_memos_api_v1.CreateMemoRequest' $ref: '#/definitions/api_v1.CreateMemoRequest'
produces: produces:
- application/json - application/json
responses: responses:
@ -1494,7 +1479,7 @@ paths:
name: body name: body
required: true required: true
schema: schema:
$ref: '#/definitions/github_com_usememos_memos_api_v1.PatchMemoRequest' $ref: '#/definitions/api_v1.PatchMemoRequest'
produces: produces:
- application/json - application/json
responses: responses:
@ -1753,7 +1738,7 @@ paths:
name: body name: body
required: true required: true
schema: schema:
$ref: '#/definitions/api_v1.CreateResourceRequest' $ref: '#/definitions/github_com_usememos_memos_api_v1.CreateResourceRequest'
produces: produces:
- application/json - application/json
responses: responses:
@ -1811,7 +1796,7 @@ paths:
name: patch name: patch
required: true required: true
schema: schema:
$ref: '#/definitions/api_v1.UpdateResourceRequest' $ref: '#/definitions/github_com_usememos_memos_api_v1.UpdateResourceRequest'
produces: produces:
- application/json - application/json
responses: responses:
@ -1866,7 +1851,7 @@ paths:
"200": "200":
description: System GetSystemStatus description: System GetSystemStatus
schema: schema:
$ref: '#/definitions/api_v1.SystemStatus' $ref: '#/definitions/github_com_usememos_memos_api_v1.SystemStatus'
"401": "401":
description: Missing user in session | Unauthorized description: Missing user in session | Unauthorized
"500": "500":
@ -1985,7 +1970,7 @@ paths:
description: System setting list description: System setting list
schema: schema:
items: items:
$ref: '#/definitions/api_v1.SystemSetting' $ref: '#/definitions/github_com_usememos_memos_api_v1.SystemSetting'
type: array type: array
"401": "401":
description: Missing user in session | Unauthorized description: Missing user in session | Unauthorized
@ -2003,14 +1988,10 @@ paths:
name: body name: body
required: true required: true
schema: schema:
$ref: '#/definitions/api_v1.UpsertSystemSettingRequest' $ref: '#/definitions/github_com_usememos_memos_api_v1.UpsertSystemSettingRequest'
produces: produces:
- application/json - application/json
responses: responses:
"200":
description: Created system setting
schema:
$ref: '#/definitions/store.SystemSetting'
"400": "400":
description: Malformatted post system setting request | invalid system setting description: Malformatted post system setting request | invalid system setting
"401": "401":
@ -2152,7 +2133,7 @@ paths:
name: body name: body
required: true required: true
schema: schema:
$ref: '#/definitions/github_com_usememos_memos_api_v1.CreateUserRequest' $ref: '#/definitions/api_v1.CreateUserRequest'
produces: produces:
- application/json - application/json
responses: responses:
@ -2234,7 +2215,7 @@ paths:
name: patch name: patch
required: true required: true
schema: schema:
$ref: '#/definitions/github_com_usememos_memos_api_v1.UpdateUserRequest' $ref: '#/definitions/api_v1.UpdateUserRequest'
produces: produces:
- application/json - application/json
responses: responses:

@ -58,8 +58,6 @@ type CustomizedProfile struct {
Locale string `json:"locale"` Locale string `json:"locale"`
// Appearance is the server default appearance. // Appearance is the server default appearance.
Appearance string `json:"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 { func (key SystemSettingName) String() string {
@ -129,7 +127,6 @@ func (s *APIV1Service) GetSystemSettingList(c echo.Context) error {
// @Accept json // @Accept json
// @Produce json // @Produce json
// @Param body body UpsertSystemSettingRequest true "Request object." // @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 400 {object} nil "Malformatted post system setting request | invalid system setting"
// @Failure 401 {object} nil "Missing user in session | Unauthorized" // @Failure 401 {object} nil "Missing user in session | Unauthorized"
// @Failure 403 {object} nil "Cannot disable passwords if no SSO identity provider is configured." // @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: case SystemSettingCustomizedProfileName:
customizedProfile := CustomizedProfile{ customizedProfile := CustomizedProfile{
Name: "memos", Name: "Memos",
LogoURL: "", LogoURL: "",
Description: "", Description: "",
Locale: "en", Locale: "en",
Appearance: "system", Appearance: "system",
ExternalURL: "",
} }
if err := json.Unmarshal([]byte(upsert.Value), &customizedProfile); err != nil { if err := json.Unmarshal([]byte(upsert.Value), &customizedProfile); err != nil {
return errors.Errorf(systemSettingUnmarshalError, settingName) return errors.Errorf(systemSettingUnmarshalError, settingName)

@ -1052,22 +1052,48 @@ GetWorkspaceProfile returns the workspace profile.
| 200 | A successful response. | [v2GetWorkspaceProfileResponse](#v2getworkspaceprofileresponse) | | 200 | A successful response. | [v2GetWorkspaceProfileResponse](#v2getworkspaceprofileresponse) |
| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | | 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 #### PATCH
##### Summary ##### Summary
UpdateWorkspaceProfile updates the workspace profile. SetWorkspaceSetting updates the setting.
##### Parameters ##### Parameters
| Name | Located in | Description | Required | Schema | | 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 ##### Responses
| Code | Description | Schema | | Code | Description | Schema |
| ---- | ----------- | ------ | | ---- | ----------- | ------ |
| 200 | A successful response. | [v2UpdateWorkspaceProfileResponse](#v2updateworkspaceprofileresponse) | | 200 | A successful response. | [v2SetWorkspaceSettingResponse](#v2setworkspacesettingresponse) |
| default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) | | default | An unexpected error response. | [googlerpcStatus](#googlerpcstatus) |
--- ---
@ -1185,6 +1211,23 @@ GetActivity returns the activity with the given id.
| name | string | | No | | name | string | | No |
| url | 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 #### googlerpcStatus
| Name | Type | Description | Required | | Name | Type | Description | Required |
@ -1392,6 +1435,12 @@ GetActivity returns the activity with the given id.
| ---- | ---- | ----------- | -------- | | ---- | ---- | ----------- | -------- |
| workspaceProfile | [v2WorkspaceProfile](#v2workspaceprofile) | | No | | workspaceProfile | [v2WorkspaceProfile](#v2workspaceprofile) | | No |
#### v2GetWorkspaceSettingResponse
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| setting | [apiv2WorkspaceSetting](#apiv2workspacesetting) | | No |
#### v2Inbox #### v2Inbox
| Name | Type | Description | Required | | Name | Type | Description | Required |
@ -1548,6 +1597,12 @@ GetActivity returns the activity with the given id.
| ---- | ---- | ----------- | -------- | | ---- | ---- | ----------- | -------- |
| v2SetMemoResourcesResponse | object | | | | v2SetMemoResourcesResponse | object | | |
#### v2SetWorkspaceSettingResponse
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| setting | [apiv2WorkspaceSetting](#apiv2workspacesetting) | | No |
#### v2SignInResponse #### v2SignInResponse
| Name | Type | Description | Required | | Name | Type | Description | Required |
@ -1615,12 +1670,6 @@ GetActivity returns the activity with the given id.
| ---- | ---- | ----------- | -------- | | ---- | ---- | ----------- | -------- |
| webhook | [apiv2Webhook](#apiv2webhook) | | No | | webhook | [apiv2Webhook](#apiv2webhook) | | No |
#### v2UpdateWorkspaceProfileResponse
| Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- |
| workspaceProfile | [v2WorkspaceProfile](#v2workspaceprofile) | | No |
#### v2UpsertMemoReactionResponse #### v2UpsertMemoReactionResponse
| Name | Type | Description | Required | | Name | Type | Description | Required |
@ -1675,8 +1724,8 @@ GetActivity returns the activity with the given id.
| Name | Type | Description | Required | | Name | Type | Description | Required |
| ---- | ---- | ----------- | -------- | | ---- | ---- | ----------- | -------- |
| version | string | | No | | version | string | | No |
| mode | string | | No | | mode | string | mode is the instance mode (e.g. "prod", "dev" or "demo"). | No |
| allowRegistration | boolean | | No | | allowRegistration | boolean | allow_registration is whether the registration is allowed. | No |
| disablePasswordLogin | boolean | | No | | disablePasswordLogin | boolean | allow_password_login is whether the password login is allowed. | No |
| additionalScript | string | | No | | additionalScript | string | additional_script is the additional script. | No |
| additionalStyle | string | | No | | additionalStyle | string | additional_style is the additional style. | No |

@ -117,7 +117,6 @@ const MemoActionMenu = (props: Props) => {
{t("common.share")} {t("common.share")}
</MenuItem> </MenuItem>
)} )}
<Divider className="!my-1" />
<MenuItem color="warning" onClick={handleArchiveMemoClick}> <MenuItem color="warning" onClick={handleArchiveMemoClick}>
<Icon.Archive className="w-4 h-auto" /> <Icon.Archive className="w-4 h-auto" />
{t("common.archive")} {t("common.archive")}

@ -62,12 +62,11 @@ const UpdateCustomizedProfileDialog: React.FC<Props> = ({ destroy }: Props) => {
const handleRestoreButtonClick = () => { const handleRestoreButtonClick = () => {
setPartialState({ setPartialState({
name: "memos", name: "Memos",
logoUrl: "/logo.webp", logoUrl: "/logo.webp",
description: "", description: "",
locale: "en", locale: "en",
appearance: "system", appearance: "system",
externalUrl: "",
}); });
}; };
@ -100,10 +99,7 @@ const UpdateCustomizedProfileDialog: React.FC<Props> = ({ destroy }: Props) => {
</IconButton> </IconButton>
</div> </div>
<div className="dialog-content-container min-w-[16rem]"> <div className="dialog-content-container min-w-[16rem]">
<p className="text-sm mb-1"> <p className="text-sm mb-1">{t("setting.system-section.server-name")}</p>
{t("setting.system-section.server-name")}
<span className="text-sm text-gray-400 ml-1">({t("setting.system-section.customize-server.default")})</span>
</p>
<Input className="w-full" type="text" value={state.name} onChange={handleNameChanged} /> <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> <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} /> <Input className="w-full" type="text" value={state.logoUrl} onChange={handleLogoUrlChanged} />

@ -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>} {!collapsed && <span className="ml-2 text-lg font-medium text-slate-800 dark:text-gray-200 shrink truncate">{title}</span>}
</div> </div>
</MenuButton> </MenuButton>
<Menu placement="bottom-start" size="sm" style={{ zIndex: "9999" }}> <Menu placement="bottom-start" style={{ zIndex: "9999" }}>
<MenuItem onClick={handleSignOut}> <MenuItem onClick={handleSignOut}>
<Icon.LogOut className="w-4 h-auto opacity-60 shrink-0" /> <Icon.LogOut className="w-4 h-auto opacity-60 shrink-0" />
<span className="truncate">{t("common.sign-out")}</span> <span className="truncate">{t("common.sign-out")}</span>

@ -243,7 +243,6 @@
"server-name": "Server Name", "server-name": "Server Name",
"customize-server": { "customize-server": {
"title": "Customize Server", "title": "Customize Server",
"default": "Default is memos",
"icon-url": "Icon URL", "icon-url": "Icon URL",
"description": "Description", "description": "Description",
"locale": "Server Locale", "locale": "Server Locale",

@ -111,7 +111,6 @@
"server-name": "Server Name", "server-name": "Server Name",
"customize-server": { "customize-server": {
"title": "Customize Server", "title": "Customize Server",
"default": "Default is memos",
"icon-url": "Icon URL" "icon-url": "Icon URL"
}, },
"database-file-size": "Databas filstorlek", "database-file-size": "Databas filstorlek",

@ -198,7 +198,7 @@ const MemoDetail = () => {
{!readonly && ( {!readonly && (
<MemoActionMenu <MemoActionMenu
memo={memo} memo={memo}
hiddenActions={["pin", "share"]} hiddenActions={["pin", "edit", "share"]}
onArchived={handleMemoArchived} onArchived={handleMemoArchived}
onDeleted={handleMemoDeleted} onDeleted={handleMemoDeleted}
/> />

@ -23,7 +23,6 @@ export const initialGlobalState = async () => {
description: "", description: "",
locale: "en", locale: "en",
appearance: "system", appearance: "system",
externalUrl: "",
}, },
} as SystemStatus, } as SystemStatus,
}; };
@ -39,7 +38,6 @@ export const initialGlobalState = async () => {
description: customizedProfile.description, description: customizedProfile.description,
locale: customizedProfile.locale || "en", locale: customizedProfile.locale || "en",
appearance: customizedProfile.appearance || "system", appearance: customizedProfile.appearance || "system",
externalUrl: "",
}, },
}; };
// Use storageLocale > userLocale > customizedProfile.locale (server's default locale) // Use storageLocale > userLocale > customizedProfile.locale (server's default locale)

@ -29,7 +29,6 @@ const globalSlice = createSlice({
description: "", description: "",
locale: "en", locale: "en",
appearance: "system", appearance: "system",
externalUrl: "",
}, },
}, },
} as State, } as State,

@ -9,7 +9,6 @@ interface CustomizedProfile {
description: string; description: string;
locale: Locale; locale: Locale;
appearance: Appearance; appearance: Appearance;
externalUrl: string;
} }
interface SystemStatus { interface SystemStatus {

Loading…
Cancel
Save