Skip to content

Commit 4ccb67a

Browse files
authored
feat: new setting fade fold widget (#1195)
1 parent 3aec315 commit 4ccb67a

33 files changed

+71
-30
lines changed

src/lang/ar-ye.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "Change Log",
392392
"notifications": "Notifications",
393393
"no_unread_notifications": "No unread notifications",
394-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
394+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/be-by.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -392,5 +392,6 @@
392392
"changelog": "Журнал змен",
393393
"notifications": "Апавяшчэнні",
394394
"no_unread_notifications": "Няма непрачытаных апавяшчэнняў",
395-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
395+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
396+
"fade fold widgets": "Fade Fold Widgets"
396397
}

src/lang/bn-bd.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "Change Log",
392392
"notifications": "Notifications",
393393
"no_unread_notifications": "No unread notifications",
394-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
394+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/cs-cz.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "Change Log",
392392
"notifications": "Notifications",
393393
"no_unread_notifications": "No unread notifications",
394-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
394+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/de-de.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "Änderungsbericht",
392392
"notifications": "Benachrichtigungen",
393393
"no_unread_notifications": "Keine ungelesenen Benachrichtigungen",
394-
"should_use_current_file_for_preview": "Sollte die aktuelle Datei für die Vorschau verwenden, anstatt dem Standard (index.html)"
394+
"should_use_current_file_for_preview": "Sollte die aktuelle Datei für die Vorschau verwenden, anstatt dem Standard (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/en-us.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -392,5 +392,6 @@
392392
"changelog": "Change Log",
393393
"notifications": "Notifications",
394394
"no_unread_notifications": "No unread notifications",
395-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
395+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
396+
"fade fold widgets": "Fade Fold Widgets"
396397
}

src/lang/es-sv.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "Change Log",
392392
"notifications": "Notifications",
393393
"no_unread_notifications": "No unread notifications",
394-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
394+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/fr-fr.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "Change Log",
392392
"notifications": "Notifications",
393393
"no_unread_notifications": "No unread notifications",
394-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
394+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/hi-in.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -392,5 +392,6 @@
392392
"changelog": "Change Log",
393393
"notifications": "Notifications",
394394
"no_unread_notifications": "No unread notifications",
395-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
395+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
396+
"fade fold widgets": "Fade Fold Widgets"
396397
}

src/lang/hu-hu.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "Változáslista",
392392
"notifications": "Értesítések",
393393
"no_unread_notifications": "Nincsenek olvasatlan értesítések",
394-
"should_use_current_file_for_preview": "A jelenlegi fájl használata az előnézethez az alapértelmezett (index.html) helyett"
394+
"should_use_current_file_for_preview": "A jelenlegi fájl használata az előnézethez az alapértelmezett (index.html) helyett",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/id-id.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -393,5 +393,6 @@
393393
"changelog": "Change Log",
394394
"notifications": "Notifications",
395395
"no_unread_notifications": "No unread notifications",
396-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
396+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
397+
"fade fold widgets": "Fade Fold Widgets"
397398
}

src/lang/ir-fa.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -392,5 +392,6 @@
392392
"changelog": "Change Log",
393393
"notifications": "Notifications",
394394
"no_unread_notifications": "No unread notifications",
395-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
395+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
396+
"fade fold widgets": "Fade Fold Widgets"
396397
}

src/lang/it-it.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "Change Log",
392392
"notifications": "Notifications",
393393
"no_unread_notifications": "No unread notifications",
394-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
394+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/ja-jp.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "Change Log",
392392
"notifications": "Notifications",
393393
"no_unread_notifications": "No unread notifications",
394-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
394+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/ko-kr.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "Change Log",
392392
"notifications": "Notifications",
393393
"no_unread_notifications": "No unread notifications",
394-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
394+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/ml-in.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "Change Log",
392392
"notifications": "Notifications",
393393
"no_unread_notifications": "No unread notifications",
394-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
394+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/mm-unicode.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "Change Log",
392392
"notifications": "Notifications",
393393
"no_unread_notifications": "No unread notifications",
394-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
394+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/mm-zawgyi.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "Change Log",
392392
"notifications": "Notifications",
393393
"no_unread_notifications": "No unread notifications",
394-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
394+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/pl-pl.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "Dziennik zmian",
392392
"notifications": "Powiadomienia",
393393
"no_unread_notifications": "Brak nieodczytanych powiadomień",
394-
"should_use_current_file_for_preview": "Należy użyć bieżącego pliku do podglądu zamiast domyślnego (index.html)"
394+
"should_use_current_file_for_preview": "Należy użyć bieżącego pliku do podglądu zamiast domyślnego (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/pt-br.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "Registro de Alterações",
392392
"notifications": "Notificações",
393393
"no_unread_notifications": "Sem notificações não lidas",
394-
"should_use_current_file_for_preview": "Deve usar o arquivo atual para pré-visualização em vez do padrão (index.html)"
394+
"should_use_current_file_for_preview": "Deve usar o arquivo atual para pré-visualização em vez do padrão (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/pu-in.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "Change Log",
392392
"notifications": "Notifications",
393393
"no_unread_notifications": "No unread notifications",
394-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
394+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/ru-ru.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -392,5 +392,6 @@
392392
"changelog": "Change Log",
393393
"notifications": "Notifications",
394394
"no_unread_notifications": "No unread notifications",
395-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
395+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
396+
"fade fold widgets": "Fade Fold Widgets"
396397
}

src/lang/tl-ph.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "Change Log",
392392
"notifications": "Notifications",
393393
"no_unread_notifications": "No unread notifications",
394-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
394+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/tr-tr.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "Change Log",
392392
"notifications": "Notifications",
393393
"no_unread_notifications": "No unread notifications",
394-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
394+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/uk-ua.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "Change Log",
392392
"notifications": "Notifications",
393393
"no_unread_notifications": "No unread notifications",
394-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
394+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/uz-uz.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "Change Log",
392392
"notifications": "Notifications",
393393
"no_unread_notifications": "No unread notifications",
394-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
394+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/vi-vn.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -392,5 +392,6 @@
392392
"changelog": "Nhật Ký Thay Đổi",
393393
"notifications": "Notifications",
394394
"no_unread_notifications": "No unread notifications",
395-
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)"
395+
"should_use_current_file_for_preview": "Should use Current File For preview instead of default (index.html)",
396+
"fade fold widgets": "Fade Fold Widgets"
396397
}

src/lang/zh-cn.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "更新日志",
392392
"notifications": "消息通知",
393393
"no_unread_notifications": "没有未读消息",
394-
"should_use_current_file_for_preview": "应使当前文件用于预览页面而非使用默认文件 (index.html)"
394+
"should_use_current_file_for_preview": "应使当前文件用于预览页面而非使用默认文件 (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/zh-hant.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "更新日誌",
392392
"notifications": "消息通知",
393393
"no_unread_notifications": "沒有未讀消息",
394-
"should_use_current_file_for_preview": "應使當前文件用於預覽頁面而非使用默認文件 (index.html)"
394+
"should_use_current_file_for_preview": "應使當前文件用於預覽頁面而非使用默認文件 (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lang/zh-tw.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -391,5 +391,6 @@
391391
"changelog": "更新日誌",
392392
"notifications": "通知",
393393
"no_unread_notifications": "沒有未讀的通知",
394-
"should_use_current_file_for_preview": "應使用目前的檔案作為預覽頁面,而不是預設檔案 (index.html)"
394+
"should_use_current_file_for_preview": "應使用目前的檔案作為預覽頁面,而不是預設檔案 (index.html)",
395+
"fade fold widgets": "Fade Fold Widgets"
395396
}

src/lib/editorManager.js

+5
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ async function EditorManager($header, $body) {
233233
updateMargin(true);
234234
});
235235

236+
appSettings.on("update:fadeFoldWidgets", function (value) {
237+
editor.setOption("fadeFoldWidgets", value);
238+
});
239+
236240
return manager;
237241

238242
/**
@@ -387,6 +391,7 @@ async function EditorManager($header, $body) {
387391
editor.setOption("enableBasicAutocompletion", true);
388392
editor.setOption("enableLiveAutocompletion", settings.liveAutoCompletion);
389393
editor.setOption("copyWithEmptySelection", true);
394+
editor.setOption("fadeFoldWidgets", settings.fadeFoldWidgets);
390395
// editor.setOption('enableInlineAutocompletion', settings.inlineAutoCompletion);
391396

392397
updateMargin(true);

src/lib/settings.js

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ class Settings {
129129
retryRemoteFsAfterFail: true,
130130
linenumbers: true,
131131
formatOnSave: false,
132+
fadeFoldWidgets: false,
132133
autoCorrect: true,
133134
openFileListPos: this.OPEN_FILE_LIST_POS_HEADER,
134135
quickTools: this.#IS_TABLET ? 0 : 1,

src/settings/editorSettings.js

+5
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ export default function editorSettings() {
148148
text: strings["use textarea for ime"],
149149
checkbox: values.useTextareaForIME,
150150
},
151+
{
152+
key: "fadeFoldWidgets",
153+
text: strings["fade fold widgets"],
154+
checkbox: values.fadeFoldWidgets,
155+
},
151156
{
152157
index: 0,
153158
key: "scroll-settings",

0 commit comments

Comments
 (0)