mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: enable location by default
This commit is contained in:
@@ -96,7 +96,7 @@ message WorkspaceStorageSetting {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message WorkspaceMemoRelatedSetting {
|
message WorkspaceMemoRelatedSetting {
|
||||||
reserved 4;
|
reserved 4, 8;
|
||||||
|
|
||||||
// disallow_public_visibility disallows set memo as public visibility.
|
// disallow_public_visibility disallows set memo as public visibility.
|
||||||
bool disallow_public_visibility = 1;
|
bool disallow_public_visibility = 1;
|
||||||
@@ -110,8 +110,6 @@ message WorkspaceMemoRelatedSetting {
|
|||||||
bool enable_link_preview = 6;
|
bool enable_link_preview = 6;
|
||||||
// enable_comment enables comment.
|
// enable_comment enables comment.
|
||||||
bool enable_comment = 7;
|
bool enable_comment = 7;
|
||||||
// enable_location enables setting location for memo.
|
|
||||||
bool enable_location = 8;
|
|
||||||
// reactions is the list of reactions.
|
// reactions is the list of reactions.
|
||||||
repeated string reactions = 10;
|
repeated string reactions = 10;
|
||||||
// disable_markdown_shortcuts disallow the registration of markdown shortcuts.
|
// disable_markdown_shortcuts disallow the registration of markdown shortcuts.
|
||||||
|
@@ -458,8 +458,6 @@ type WorkspaceMemoRelatedSetting struct {
|
|||||||
EnableLinkPreview bool `protobuf:"varint,6,opt,name=enable_link_preview,json=enableLinkPreview,proto3" json:"enable_link_preview,omitempty"`
|
EnableLinkPreview bool `protobuf:"varint,6,opt,name=enable_link_preview,json=enableLinkPreview,proto3" json:"enable_link_preview,omitempty"`
|
||||||
// enable_comment enables comment.
|
// enable_comment enables comment.
|
||||||
EnableComment bool `protobuf:"varint,7,opt,name=enable_comment,json=enableComment,proto3" json:"enable_comment,omitempty"`
|
EnableComment bool `protobuf:"varint,7,opt,name=enable_comment,json=enableComment,proto3" json:"enable_comment,omitempty"`
|
||||||
// enable_location enables setting location for memo.
|
|
||||||
EnableLocation bool `protobuf:"varint,8,opt,name=enable_location,json=enableLocation,proto3" json:"enable_location,omitempty"`
|
|
||||||
// reactions is the list of reactions.
|
// reactions is the list of reactions.
|
||||||
Reactions []string `protobuf:"bytes,10,rep,name=reactions,proto3" json:"reactions,omitempty"`
|
Reactions []string `protobuf:"bytes,10,rep,name=reactions,proto3" json:"reactions,omitempty"`
|
||||||
// disable_markdown_shortcuts disallow the registration of markdown shortcuts.
|
// disable_markdown_shortcuts disallow the registration of markdown shortcuts.
|
||||||
@@ -544,13 +542,6 @@ func (x *WorkspaceMemoRelatedSetting) GetEnableComment() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *WorkspaceMemoRelatedSetting) GetEnableLocation() bool {
|
|
||||||
if x != nil {
|
|
||||||
return x.EnableLocation
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *WorkspaceMemoRelatedSetting) GetReactions() []string {
|
func (x *WorkspaceMemoRelatedSetting) GetReactions() []string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Reactions
|
return x.Reactions
|
||||||
@@ -799,20 +790,19 @@ const file_api_v1_workspace_setting_service_proto_rawDesc = "" +
|
|||||||
"\x18STORAGE_TYPE_UNSPECIFIED\x10\x00\x12\f\n" +
|
"\x18STORAGE_TYPE_UNSPECIFIED\x10\x00\x12\f\n" +
|
||||||
"\bDATABASE\x10\x01\x12\t\n" +
|
"\bDATABASE\x10\x01\x12\t\n" +
|
||||||
"\x05LOCAL\x10\x02\x12\x06\n" +
|
"\x05LOCAL\x10\x02\x12\x06\n" +
|
||||||
"\x02S3\x10\x03\"\xb7\x04\n" +
|
"\x02S3\x10\x03\"\x94\x04\n" +
|
||||||
"\x1bWorkspaceMemoRelatedSetting\x12<\n" +
|
"\x1bWorkspaceMemoRelatedSetting\x12<\n" +
|
||||||
"\x1adisallow_public_visibility\x18\x01 \x01(\bR\x18disallowPublicVisibility\x127\n" +
|
"\x1adisallow_public_visibility\x18\x01 \x01(\bR\x18disallowPublicVisibility\x127\n" +
|
||||||
"\x18display_with_update_time\x18\x02 \x01(\bR\x15displayWithUpdateTime\x120\n" +
|
"\x18display_with_update_time\x18\x02 \x01(\bR\x15displayWithUpdateTime\x120\n" +
|
||||||
"\x14content_length_limit\x18\x03 \x01(\x05R\x12contentLengthLimit\x127\n" +
|
"\x14content_length_limit\x18\x03 \x01(\x05R\x12contentLengthLimit\x127\n" +
|
||||||
"\x18enable_double_click_edit\x18\x05 \x01(\bR\x15enableDoubleClickEdit\x12.\n" +
|
"\x18enable_double_click_edit\x18\x05 \x01(\bR\x15enableDoubleClickEdit\x12.\n" +
|
||||||
"\x13enable_link_preview\x18\x06 \x01(\bR\x11enableLinkPreview\x12%\n" +
|
"\x13enable_link_preview\x18\x06 \x01(\bR\x11enableLinkPreview\x12%\n" +
|
||||||
"\x0eenable_comment\x18\a \x01(\bR\renableComment\x12'\n" +
|
"\x0eenable_comment\x18\a \x01(\bR\renableComment\x12\x1c\n" +
|
||||||
"\x0fenable_location\x18\b \x01(\bR\x0eenableLocation\x12\x1c\n" +
|
|
||||||
"\treactions\x18\n" +
|
"\treactions\x18\n" +
|
||||||
" \x03(\tR\treactions\x12<\n" +
|
" \x03(\tR\treactions\x12<\n" +
|
||||||
"\x1adisable_markdown_shortcuts\x18\v \x01(\bR\x18disableMarkdownShortcuts\x127\n" +
|
"\x1adisable_markdown_shortcuts\x18\v \x01(\bR\x18disableMarkdownShortcuts\x127\n" +
|
||||||
"\x18enable_blur_nsfw_content\x18\f \x01(\bR\x15enableBlurNsfwContent\x12\x1b\n" +
|
"\x18enable_blur_nsfw_content\x18\f \x01(\bR\x15enableBlurNsfwContent\x12\x1b\n" +
|
||||||
"\tnsfw_tags\x18\r \x03(\tR\bnsfwTagsJ\x04\b\x04\x10\x05\"5\n" +
|
"\tnsfw_tags\x18\r \x03(\tR\bnsfwTagsJ\x04\b\x04\x10\x05J\x04\b\b\x10\t\"5\n" +
|
||||||
"\x1aGetWorkspaceSettingRequest\x12\x17\n" +
|
"\x1aGetWorkspaceSettingRequest\x12\x17\n" +
|
||||||
"\x04name\x18\x01 \x01(\tB\x03\xe0A\x02R\x04name\"V\n" +
|
"\x04name\x18\x01 \x01(\tB\x03\xe0A\x02R\x04name\"V\n" +
|
||||||
"\x1aSetWorkspaceSettingRequest\x128\n" +
|
"\x1aSetWorkspaceSettingRequest\x128\n" +
|
||||||
|
@@ -2308,9 +2308,6 @@ definitions:
|
|||||||
enableComment:
|
enableComment:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: enable_comment enables comment.
|
description: enable_comment enables comment.
|
||||||
enableLocation:
|
|
||||||
type: boolean
|
|
||||||
description: enable_location enables setting location for memo.
|
|
||||||
reactions:
|
reactions:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
|
@@ -669,8 +669,6 @@ type WorkspaceMemoRelatedSetting struct {
|
|||||||
EnableLinkPreview bool `protobuf:"varint,6,opt,name=enable_link_preview,json=enableLinkPreview,proto3" json:"enable_link_preview,omitempty"`
|
EnableLinkPreview bool `protobuf:"varint,6,opt,name=enable_link_preview,json=enableLinkPreview,proto3" json:"enable_link_preview,omitempty"`
|
||||||
// enable_comment enables comment.
|
// enable_comment enables comment.
|
||||||
EnableComment bool `protobuf:"varint,7,opt,name=enable_comment,json=enableComment,proto3" json:"enable_comment,omitempty"`
|
EnableComment bool `protobuf:"varint,7,opt,name=enable_comment,json=enableComment,proto3" json:"enable_comment,omitempty"`
|
||||||
// enable_location enables setting location for memo.
|
|
||||||
EnableLocation bool `protobuf:"varint,8,opt,name=enable_location,json=enableLocation,proto3" json:"enable_location,omitempty"`
|
|
||||||
// reactions is the list of reactions.
|
// reactions is the list of reactions.
|
||||||
Reactions []string `protobuf:"bytes,10,rep,name=reactions,proto3" json:"reactions,omitempty"`
|
Reactions []string `protobuf:"bytes,10,rep,name=reactions,proto3" json:"reactions,omitempty"`
|
||||||
// disable markdown shortcuts
|
// disable markdown shortcuts
|
||||||
@@ -755,13 +753,6 @@ func (x *WorkspaceMemoRelatedSetting) GetEnableComment() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *WorkspaceMemoRelatedSetting) GetEnableLocation() bool {
|
|
||||||
if x != nil {
|
|
||||||
return x.EnableLocation
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *WorkspaceMemoRelatedSetting) GetReactions() []string {
|
func (x *WorkspaceMemoRelatedSetting) GetReactions() []string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Reactions
|
return x.Reactions
|
||||||
@@ -839,20 +830,19 @@ const file_store_workspace_setting_proto_rawDesc = "" +
|
|||||||
"\bendpoint\x18\x03 \x01(\tR\bendpoint\x12\x16\n" +
|
"\bendpoint\x18\x03 \x01(\tR\bendpoint\x12\x16\n" +
|
||||||
"\x06region\x18\x04 \x01(\tR\x06region\x12\x16\n" +
|
"\x06region\x18\x04 \x01(\tR\x06region\x12\x16\n" +
|
||||||
"\x06bucket\x18\x05 \x01(\tR\x06bucket\x12$\n" +
|
"\x06bucket\x18\x05 \x01(\tR\x06bucket\x12$\n" +
|
||||||
"\x0euse_path_style\x18\x06 \x01(\bR\fusePathStyle\"\xb7\x04\n" +
|
"\x0euse_path_style\x18\x06 \x01(\bR\fusePathStyle\"\x94\x04\n" +
|
||||||
"\x1bWorkspaceMemoRelatedSetting\x12<\n" +
|
"\x1bWorkspaceMemoRelatedSetting\x12<\n" +
|
||||||
"\x1adisallow_public_visibility\x18\x01 \x01(\bR\x18disallowPublicVisibility\x127\n" +
|
"\x1adisallow_public_visibility\x18\x01 \x01(\bR\x18disallowPublicVisibility\x127\n" +
|
||||||
"\x18display_with_update_time\x18\x02 \x01(\bR\x15displayWithUpdateTime\x120\n" +
|
"\x18display_with_update_time\x18\x02 \x01(\bR\x15displayWithUpdateTime\x120\n" +
|
||||||
"\x14content_length_limit\x18\x03 \x01(\x05R\x12contentLengthLimit\x127\n" +
|
"\x14content_length_limit\x18\x03 \x01(\x05R\x12contentLengthLimit\x127\n" +
|
||||||
"\x18enable_double_click_edit\x18\x05 \x01(\bR\x15enableDoubleClickEdit\x12.\n" +
|
"\x18enable_double_click_edit\x18\x05 \x01(\bR\x15enableDoubleClickEdit\x12.\n" +
|
||||||
"\x13enable_link_preview\x18\x06 \x01(\bR\x11enableLinkPreview\x12%\n" +
|
"\x13enable_link_preview\x18\x06 \x01(\bR\x11enableLinkPreview\x12%\n" +
|
||||||
"\x0eenable_comment\x18\a \x01(\bR\renableComment\x12'\n" +
|
"\x0eenable_comment\x18\a \x01(\bR\renableComment\x12\x1c\n" +
|
||||||
"\x0fenable_location\x18\b \x01(\bR\x0eenableLocation\x12\x1c\n" +
|
|
||||||
"\treactions\x18\n" +
|
"\treactions\x18\n" +
|
||||||
" \x03(\tR\treactions\x12<\n" +
|
" \x03(\tR\treactions\x12<\n" +
|
||||||
"\x1adisable_markdown_shortcuts\x18\v \x01(\bR\x18disableMarkdownShortcuts\x127\n" +
|
"\x1adisable_markdown_shortcuts\x18\v \x01(\bR\x18disableMarkdownShortcuts\x127\n" +
|
||||||
"\x18enable_blur_nsfw_content\x18\f \x01(\bR\x15enableBlurNsfwContent\x12\x1b\n" +
|
"\x18enable_blur_nsfw_content\x18\f \x01(\bR\x15enableBlurNsfwContent\x12\x1b\n" +
|
||||||
"\tnsfw_tags\x18\r \x03(\tR\bnsfwTagsJ\x04\b\x04\x10\x05*s\n" +
|
"\tnsfw_tags\x18\r \x03(\tR\bnsfwTagsJ\x04\b\x04\x10\x05J\x04\b\b\x10\t*s\n" +
|
||||||
"\x13WorkspaceSettingKey\x12%\n" +
|
"\x13WorkspaceSettingKey\x12%\n" +
|
||||||
"!WORKSPACE_SETTING_KEY_UNSPECIFIED\x10\x00\x12\t\n" +
|
"!WORKSPACE_SETTING_KEY_UNSPECIFIED\x10\x00\x12\t\n" +
|
||||||
"\x05BASIC\x10\x01\x12\v\n" +
|
"\x05BASIC\x10\x01\x12\v\n" +
|
||||||
|
@@ -95,7 +95,7 @@ message StorageS3Config {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message WorkspaceMemoRelatedSetting {
|
message WorkspaceMemoRelatedSetting {
|
||||||
reserved 4;
|
reserved 4, 8;
|
||||||
|
|
||||||
// disallow_public_visibility disallows set memo as public visibility.
|
// disallow_public_visibility disallows set memo as public visibility.
|
||||||
bool disallow_public_visibility = 1;
|
bool disallow_public_visibility = 1;
|
||||||
@@ -109,8 +109,6 @@ message WorkspaceMemoRelatedSetting {
|
|||||||
bool enable_link_preview = 6;
|
bool enable_link_preview = 6;
|
||||||
// enable_comment enables comment.
|
// enable_comment enables comment.
|
||||||
bool enable_comment = 7;
|
bool enable_comment = 7;
|
||||||
// enable_location enables setting location for memo.
|
|
||||||
bool enable_location = 8;
|
|
||||||
// reactions is the list of reactions.
|
// reactions is the list of reactions.
|
||||||
repeated string reactions = 10;
|
repeated string reactions = 10;
|
||||||
// disable markdown shortcuts
|
// disable markdown shortcuts
|
||||||
|
@@ -229,7 +229,6 @@ func convertWorkspaceMemoRelatedSettingFromStore(setting *storepb.WorkspaceMemoR
|
|||||||
EnableDoubleClickEdit: setting.EnableDoubleClickEdit,
|
EnableDoubleClickEdit: setting.EnableDoubleClickEdit,
|
||||||
EnableLinkPreview: setting.EnableLinkPreview,
|
EnableLinkPreview: setting.EnableLinkPreview,
|
||||||
EnableComment: setting.EnableComment,
|
EnableComment: setting.EnableComment,
|
||||||
EnableLocation: setting.EnableLocation,
|
|
||||||
Reactions: setting.Reactions,
|
Reactions: setting.Reactions,
|
||||||
DisableMarkdownShortcuts: setting.DisableMarkdownShortcuts,
|
DisableMarkdownShortcuts: setting.DisableMarkdownShortcuts,
|
||||||
EnableBlurNsfwContent: setting.EnableBlurNsfwContent,
|
EnableBlurNsfwContent: setting.EnableBlurNsfwContent,
|
||||||
@@ -248,7 +247,6 @@ func convertWorkspaceMemoRelatedSettingToStore(setting *v1pb.WorkspaceMemoRelate
|
|||||||
EnableDoubleClickEdit: setting.EnableDoubleClickEdit,
|
EnableDoubleClickEdit: setting.EnableDoubleClickEdit,
|
||||||
EnableLinkPreview: setting.EnableLinkPreview,
|
EnableLinkPreview: setting.EnableLinkPreview,
|
||||||
EnableComment: setting.EnableComment,
|
EnableComment: setting.EnableComment,
|
||||||
EnableLocation: setting.EnableLocation,
|
|
||||||
Reactions: setting.Reactions,
|
Reactions: setting.Reactions,
|
||||||
DisableMarkdownShortcuts: setting.DisableMarkdownShortcuts,
|
DisableMarkdownShortcuts: setting.DisableMarkdownShortcuts,
|
||||||
EnableBlurNsfwContent: setting.EnableBlurNsfwContent,
|
EnableBlurNsfwContent: setting.EnableBlurNsfwContent,
|
||||||
|
@@ -507,7 +507,6 @@ const MemoEditor = observer((props: Props) => {
|
|||||||
<MarkdownMenu editorRef={editorRef} />
|
<MarkdownMenu editorRef={editorRef} />
|
||||||
<UploadResourceButton isUploadingResource={state.isUploadingResource} />
|
<UploadResourceButton isUploadingResource={state.isUploadingResource} />
|
||||||
<AddMemoRelationPopover editorRef={editorRef} />
|
<AddMemoRelationPopover editorRef={editorRef} />
|
||||||
{workspaceMemoRelatedSetting.enableLocation && (
|
|
||||||
<LocationSelector
|
<LocationSelector
|
||||||
location={state.location}
|
location={state.location}
|
||||||
onChange={(location) =>
|
onChange={(location) =>
|
||||||
@@ -517,7 +516,6 @@ const MemoEditor = observer((props: Props) => {
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Divider className="!mt-2 opacity-40" />
|
<Divider className="!mt-2 opacity-40" />
|
||||||
|
@@ -93,13 +93,6 @@ const MemoRelatedSettings = () => {
|
|||||||
onChange={(event) => updatePartialSetting({ enableComment: event.target.checked })}
|
onChange={(event) => updatePartialSetting({ enableComment: event.target.checked })}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-full flex flex-row justify-between items-center">
|
|
||||||
<span>{t("setting.memo-related-settings.enable-memo-location")}</span>
|
|
||||||
<Switch
|
|
||||||
checked={memoRelatedSetting.enableLocation}
|
|
||||||
onChange={(event) => updatePartialSetting({ enableLocation: event.target.checked })}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<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.enable-double-click-to-edit")}</span>
|
<span>{t("setting.system-section.enable-double-click-to-edit")}</span>
|
||||||
<Switch
|
<Switch
|
||||||
|
@@ -138,8 +138,6 @@ export interface WorkspaceMemoRelatedSetting {
|
|||||||
enableLinkPreview: boolean;
|
enableLinkPreview: boolean;
|
||||||
/** enable_comment enables comment. */
|
/** enable_comment enables comment. */
|
||||||
enableComment: boolean;
|
enableComment: boolean;
|
||||||
/** enable_location enables setting location for memo. */
|
|
||||||
enableLocation: boolean;
|
|
||||||
/** reactions is the list of reactions. */
|
/** reactions is the list of reactions. */
|
||||||
reactions: string[];
|
reactions: string[];
|
||||||
/** disable_markdown_shortcuts disallow the registration of markdown shortcuts. */
|
/** disable_markdown_shortcuts disallow the registration of markdown shortcuts. */
|
||||||
@@ -689,7 +687,6 @@ function createBaseWorkspaceMemoRelatedSetting(): WorkspaceMemoRelatedSetting {
|
|||||||
enableDoubleClickEdit: false,
|
enableDoubleClickEdit: false,
|
||||||
enableLinkPreview: false,
|
enableLinkPreview: false,
|
||||||
enableComment: false,
|
enableComment: false,
|
||||||
enableLocation: false,
|
|
||||||
reactions: [],
|
reactions: [],
|
||||||
disableMarkdownShortcuts: false,
|
disableMarkdownShortcuts: false,
|
||||||
enableBlurNsfwContent: false,
|
enableBlurNsfwContent: false,
|
||||||
@@ -717,9 +714,6 @@ export const WorkspaceMemoRelatedSetting: MessageFns<WorkspaceMemoRelatedSetting
|
|||||||
if (message.enableComment !== false) {
|
if (message.enableComment !== false) {
|
||||||
writer.uint32(56).bool(message.enableComment);
|
writer.uint32(56).bool(message.enableComment);
|
||||||
}
|
}
|
||||||
if (message.enableLocation !== false) {
|
|
||||||
writer.uint32(64).bool(message.enableLocation);
|
|
||||||
}
|
|
||||||
for (const v of message.reactions) {
|
for (const v of message.reactions) {
|
||||||
writer.uint32(82).string(v!);
|
writer.uint32(82).string(v!);
|
||||||
}
|
}
|
||||||
@@ -790,14 +784,6 @@ export const WorkspaceMemoRelatedSetting: MessageFns<WorkspaceMemoRelatedSetting
|
|||||||
message.enableComment = reader.bool();
|
message.enableComment = reader.bool();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
case 8: {
|
|
||||||
if (tag !== 64) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
message.enableLocation = reader.bool();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
case 10: {
|
case 10: {
|
||||||
if (tag !== 82) {
|
if (tag !== 82) {
|
||||||
break;
|
break;
|
||||||
@@ -850,7 +836,6 @@ export const WorkspaceMemoRelatedSetting: MessageFns<WorkspaceMemoRelatedSetting
|
|||||||
message.enableDoubleClickEdit = object.enableDoubleClickEdit ?? false;
|
message.enableDoubleClickEdit = object.enableDoubleClickEdit ?? false;
|
||||||
message.enableLinkPreview = object.enableLinkPreview ?? false;
|
message.enableLinkPreview = object.enableLinkPreview ?? false;
|
||||||
message.enableComment = object.enableComment ?? false;
|
message.enableComment = object.enableComment ?? false;
|
||||||
message.enableLocation = object.enableLocation ?? false;
|
|
||||||
message.reactions = object.reactions?.map((e) => e) || [];
|
message.reactions = object.reactions?.map((e) => e) || [];
|
||||||
message.disableMarkdownShortcuts = object.disableMarkdownShortcuts ?? false;
|
message.disableMarkdownShortcuts = object.disableMarkdownShortcuts ?? false;
|
||||||
message.enableBlurNsfwContent = object.enableBlurNsfwContent ?? false;
|
message.enableBlurNsfwContent = object.enableBlurNsfwContent ?? false;
|
||||||
|
Reference in New Issue
Block a user