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
5455cb31
Unverified
Commit
5455cb31
authored
Feb 13, 2023
by
boojack
Committed by
GitHub
Feb 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: simplify editor (#1087)
parent
1e4a81de
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
3 additions
and
19 deletions
+3
-19
Editor.tsx
web/src/components/Editor/Editor.tsx
+3
-2
MemoEditor.tsx
web/src/components/MemoEditor.tsx
+0
-1
PreferencesSection.tsx
web/src/components/Settings/PreferencesSection.tsx
+0
-8
en.json
web/src/locales/en.json
+0
-1
it.json
web/src/locales/it.json
+0
-1
ru.json
web/src/locales/ru.json
+0
-1
uk.json
web/src/locales/uk.json
+0
-1
zh-Hant.json
web/src/locales/zh-Hant.json
+0
-1
zh.json
web/src/locales/zh.json
+0
-1
user.ts
web/src/store/module/user.ts
+0
-1
setting.d.ts
web/src/types/modules/setting.d.ts
+0
-1
No files found.
web/src/components/Editor/Editor.tsx
View file @
5455cb31
...
...
@@ -54,8 +54,9 @@ const Editor = forwardRef(function Editor(props: Props, ref: React.ForwardedRef<
editorRef
.
current
?.
focus
();
},
scrollToCursor
:
()
=>
{
editorRef
.
current
?.
blur
();
editorRef
.
current
?.
focus
();
if
(
editorRef
.
current
)
{
editorRef
.
current
.
scrollTop
=
editorRef
.
current
.
scrollHeight
;
}
},
insertText
:
(
content
=
""
,
prefix
=
""
,
suffix
=
""
)
=>
{
if
(
!
editorRef
.
current
)
{
...
...
web/src/components/MemoEditor.tsx
View file @
5455cb31
...
...
@@ -160,7 +160,6 @@ const MemoEditor = () => {
}
}
}
editorRef
.
current
?.
scrollToCursor
();
}
}
...
...
web/src/components/Settings/PreferencesSection.tsx
View file @
5455cb31
...
...
@@ -49,10 +49,6 @@ const PreferencesSection = () => {
userStore
.
upsertLocalSetting
({
...
localSetting
,
enableFoldMemo
:
event
.
target
.
checked
});
};
const
handlePowerfulEditorEnabledChanged
=
(
event
:
React
.
ChangeEvent
<
HTMLInputElement
>
)
=>
{
userStore
.
upsertLocalSetting
({
...
localSetting
,
enablePowerfulEditor
:
event
.
target
.
checked
});
};
const
handleDoubleClickEnabledChanged
=
(
event
:
React
.
ChangeEvent
<
HTMLInputElement
>
)
=>
{
userStore
.
upsertLocalSetting
({
...
localSetting
,
enableDoubleClickEditing
:
event
.
target
.
checked
});
};
...
...
@@ -109,10 +105,6 @@ const PreferencesSection = () => {
<
span
className=
"normal-text"
>
{
t
(
"setting.preference-section.enable-folding-memo"
)
}
</
span
>
<
Switch
className=
"ml-2"
checked=
{
localSetting
.
enableFoldMemo
}
onChange=
{
handleIsFoldingEnabledChanged
}
/>
</
label
>
<
label
className=
"form-label selector"
>
<
span
className=
"normal-text"
>
{
t
(
"setting.preference-section.enable-powerful-editor"
)
}
</
span
>
<
Switch
className=
"ml-2"
checked=
{
localSetting
.
enablePowerfulEditor
}
onChange=
{
handlePowerfulEditorEnabledChanged
}
/>
</
label
>
<
label
className=
"form-label selector"
>
<
span
className=
"normal-text"
>
{
t
(
"setting.preference-section.enable-double-click"
)
}
</
span
>
<
Switch
className=
"ml-2"
checked=
{
localSetting
.
enableDoubleClickEditing
}
onChange=
{
handleDoubleClickEnabledChanged
}
/>
...
...
web/src/locales/en.json
View file @
5455cb31
...
...
@@ -161,7 +161,6 @@
"theme"
:
"Theme"
,
"default-memo-visibility"
:
"Default memo visibility"
,
"enable-folding-memo"
:
"Enable folding memo"
,
"enable-powerful-editor"
:
"Enable powerful editor"
,
"enable-double-click"
:
"Enable double-click to edit"
,
"editor-font-style"
:
"Editor font style"
,
"mobile-editor-style"
:
"Mobile editor style"
,
...
...
web/src/locales/it.json
View file @
5455cb31
...
...
@@ -161,7 +161,6 @@
"theme"
:
"Tema"
,
"default-memo-visibility"
:
"Visibilità predefinita memo"
,
"enable-folding-memo"
:
"Enable folding memo"
,
"enable-powerful-editor"
:
"Abilitata editor avanzato"
,
"editor-font-style"
:
"Editor font style"
,
"mobile-editor-style"
:
"Mobile editor style"
,
"default-memo-sort-option"
:
"Ordine visualizzazione memo"
,
...
...
web/src/locales/ru.json
View file @
5455cb31
...
...
@@ -161,7 +161,6 @@
"theme"
:
"Тема"
,
"default-memo-visibility"
:
"Видимость записей по умолчанию"
,
"enable-folding-memo"
:
"Включить сворачивание записей"
,
"enable-powerful-editor"
:
"Включить расширенный редактор"
,
"editor-font-style"
:
"Стиль шрифта"
,
"mobile-editor-style"
:
"Стиль мобильного редактора"
,
"default-memo-sort-option"
:
"Отображаемое время записи"
,
...
...
web/src/locales/uk.json
View file @
5455cb31
...
...
@@ -161,7 +161,6 @@
"theme"
:
"Тема"
,
"default-memo-visibility"
:
"Стандартна видимість нотаток"
,
"enable-folding-memo"
:
"Згортати нотатки"
,
"enable-powerful-editor"
:
"Увімкнути потужний редактор"
,
"editor-font-style"
:
"Стиль шрифта"
,
"mobile-editor-style"
:
"Стиль мобільного редактора"
,
"default-memo-sort-option"
:
"Час відображення закладки"
,
...
...
web/src/locales/zh-Hant.json
View file @
5455cb31
...
...
@@ -161,7 +161,6 @@
"theme"
:
"主題"
,
"default-memo-visibility"
:
"預設 Memo 可見性"
,
"enable-folding-memo"
:
"開啟折疊 Memo"
,
"enable-powerful-editor"
:
"開啟編輯器自動補全"
,
"editor-font-style"
:
"編輯器字體樣式"
,
"mobile-editor-style"
:
"移動端編輯器樣式"
,
"default-memo-sort-option"
:
"Memo 顯示時間"
,
...
...
web/src/locales/zh.json
View file @
5455cb31
...
...
@@ -161,7 +161,6 @@
"theme"
:
"主题"
,
"default-memo-visibility"
:
"默认 Memo 可见性"
,
"enable-folding-memo"
:
"开启折叠 Memo"
,
"enable-powerful-editor"
:
"开启编辑器自动补全"
,
"enable-double-click"
:
"开启双击编辑"
,
"editor-font-style"
:
"编辑器字体样式"
,
"mobile-editor-style"
:
"移动端编辑器样式"
,
...
...
web/src/store/module/user.ts
View file @
5455cb31
...
...
@@ -15,7 +15,6 @@ const defaultSetting: Setting = {
const
defaultLocalSetting
:
LocalSetting
=
{
enableFoldMemo
:
true
,
enablePowerfulEditor
:
true
,
enableDoubleClickEditing
:
true
,
};
...
...
web/src/types/modules/setting.d.ts
View file @
5455cb31
...
...
@@ -9,7 +9,6 @@ interface Setting {
interface
LocalSetting
{
enableFoldMemo
:
boolean
;
enablePowerfulEditor
:
boolean
;
enableDoubleClickEditing
:
boolean
;
}
...
...
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