mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-15 22:20:13 +01:00
🎨 Support setting status bar message switch https://github.com/siyuan-note/siyuan/issues/16236
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
2f3c9f734a
commit
3f8b08fbd4
17 changed files with 79 additions and 26 deletions
|
|
@ -1119,8 +1119,9 @@
|
|||
"appearance1": "سمات كتلة الكود",
|
||||
"appearance10": "وظيفة زر الإغلاق",
|
||||
"appearance11": "التصغير إلى شريط المهام عند النقر على زر الإغلاق",
|
||||
"appearance16": "إخفاء شريط الحالة السفلي",
|
||||
"appearance17": "عند التمكين، سيتم إخفاء شريط الحالة السفلي في نسخة سطح المكتب",
|
||||
"appearance16": "شريط الحالة السفلي",
|
||||
"appearance17": "عند التمكين، سيتم إخفاء شريط الحالة",
|
||||
"appearance18": "تكوين مفتاح رسائل شريط الحالة",
|
||||
"min": "تصغير",
|
||||
"restore": "استعادة",
|
||||
"max": "تكبير",
|
||||
|
|
|
|||
|
|
@ -1119,8 +1119,9 @@
|
|||
"appearance1": "Codeblock-Thema",
|
||||
"appearance10": "Einstellungen für die Schaltfläche schließen",
|
||||
"appearance11": "Nach dem Klicken auf die Schaltfläche schließen in das Tray minimieren",
|
||||
"appearance16": "Untere Statusleiste ausblenden",
|
||||
"appearance17": "Die Statusleiste am unteren Bildschirmrand ausblenden, wenn aktiviert",
|
||||
"appearance16": "Untere Statusleiste",
|
||||
"appearance17": "Wenn aktiviert, wird die Statusleiste ausgeblendet",
|
||||
"appearance18": "Schalter für Statusleistenmeldungen konfigurieren",
|
||||
"min": "Min",
|
||||
"restore": "Wiederherstellen",
|
||||
"max": "Max",
|
||||
|
|
|
|||
|
|
@ -1119,8 +1119,9 @@
|
|||
"appearance1": "Code Block Theme",
|
||||
"appearance10": "Close button settings",
|
||||
"appearance11": "shrink to the tray after clicking the close button",
|
||||
"appearance16": "Hide bottom status bar",
|
||||
"appearance17": "Hide the status bar at the bottom of the desktop when enabled",
|
||||
"appearance16": "Bottom status bar",
|
||||
"appearance17": "When enabled, the status bar will be hidden",
|
||||
"appearance18": "Configure the status bar message switch",
|
||||
"min": "Min",
|
||||
"restore": "Restore",
|
||||
"max": "Max",
|
||||
|
|
|
|||
|
|
@ -1119,8 +1119,9 @@
|
|||
"appearance1": "Tema del bloque de código",
|
||||
"appearance10": "Configuración del botón de cierre",
|
||||
"appearance11": "encoger a la bandeja después de hacer clic en el botón de cierre",
|
||||
"appearance16": "Ocultar la barra de estado inferior",
|
||||
"appearance17": "Ocultar la barra de estado en la parte inferior del escritorio cuando está activada",
|
||||
"appearance16": "Barra de estado inferior",
|
||||
"appearance17": "Al habilitar, la barra de estado se ocultará",
|
||||
"appearance18": "Configurar el interruptor de mensajes de la barra de estado",
|
||||
"min": "Minimizar",
|
||||
"restore": "Restaurar",
|
||||
"max": "Maximizar",
|
||||
|
|
|
|||
|
|
@ -1119,8 +1119,9 @@
|
|||
"appearance1": "Thème du bloc de codes",
|
||||
"appearance10": "Close button settings",
|
||||
"appearance11": "shrink to the tray after clicking the close button",
|
||||
"appearance16": "Masquer la barre d'état inférieure",
|
||||
"appearance17": "Masquer la barre d'état en bas du bureau lorsqu'elle est activée",
|
||||
"appearance16": "Barre d'état inférieure",
|
||||
"appearance17": "Une fois activé, la barre d'état sera masquée",
|
||||
"appearance18": "Configurer l'interrupteur des messages de la barre d'état",
|
||||
"min": "Min",
|
||||
"restore": "Restaurer",
|
||||
"max": "Max",
|
||||
|
|
|
|||
|
|
@ -1119,8 +1119,9 @@
|
|||
"appearance1": "ערכת נושא לקוד",
|
||||
"appearance10": "הגדרות כפתור סגירה",
|
||||
"appearance11": "נמוך למגש לאחר לחיצה על כפתור הסגירה",
|
||||
"appearance16": "הסתר את שורת המצב התחתונה",
|
||||
"appearance17": "הסתר את שורת המצב בתחתית הדסקטופ כאשר אפשרות זו מופעלת",
|
||||
"appearance16": "שורת המצב התחתונה",
|
||||
"appearance17": "כאשר מופעל, שורת המצב תוסתר",
|
||||
"appearance18": "הגדר את מתג ההודעות של שורת המצב",
|
||||
"min": "מינ",
|
||||
"restore": "שחזר",
|
||||
"max": "מקס",
|
||||
|
|
|
|||
|
|
@ -1119,8 +1119,9 @@
|
|||
"appearance1": "Tema del blocco di codice",
|
||||
"appearance10": "Impostazioni del pulsante di chiusura",
|
||||
"appearance11": "Riduci a icona dopo aver cliccato sul pulsante di chiusura",
|
||||
"appearance16": "Nascondi barra di stato inferiore",
|
||||
"appearance17": "Nascondi la barra di stato in basso sul desktop quando abilitato",
|
||||
"appearance16": "Barra di stato inferiore",
|
||||
"appearance17": "Quando abilitato, la barra di stato verrà nascosta",
|
||||
"appearance18": "Configura l'interruttore dei messaggi della barra di stato",
|
||||
"min": "Min",
|
||||
"restore": "Ripristina",
|
||||
"max": "Max",
|
||||
|
|
|
|||
|
|
@ -1119,8 +1119,9 @@
|
|||
"appearance1": "コードブロックのテーマ",
|
||||
"appearance10": "閉じるボタン",
|
||||
"appearance11": "閉じるボタンをクリックするとタスクトレイに格納する",
|
||||
"appearance16": "ステータスバー",
|
||||
"appearance17": "ステータスバーを表示しない",
|
||||
"appearance16": "下部ステータスバー",
|
||||
"appearance17": "有効にするとステータスバーが非表示になります",
|
||||
"appearance18": "ステータスバーのメッセージスイッチを設定",
|
||||
"min": "最小化",
|
||||
"restore": "元のサイズ",
|
||||
"max": "最大化",
|
||||
|
|
|
|||
|
|
@ -1119,8 +1119,9 @@
|
|||
"appearance1": "Motyw bloku kodu",
|
||||
"appearance10": "Ustawienia przycisku zamykania",
|
||||
"appearance11": "zmniejsz do zasobnika po kliknięciu przycisku zamykania",
|
||||
"appearance16": "Ukryj dolny pasek stanu",
|
||||
"appearance17": "Ukryj pasek stanu u dołu pulpitu, gdy jest włączony",
|
||||
"appearance16": "Dolny pasek stanu",
|
||||
"appearance17": "Po włączeniu pasek stanu zostanie ukryty",
|
||||
"appearance18": "Skonfiguruj przełącznik wiadomości paska stanu",
|
||||
"min": "Min",
|
||||
"restore": "Przywróć",
|
||||
"max": "Max",
|
||||
|
|
|
|||
|
|
@ -1119,8 +1119,9 @@
|
|||
"appearance1": "Tema do Bloco de Código",
|
||||
"appearance10": "Configurações do botão fechar",
|
||||
"appearance11": "minimizar para a bandeja após clicar no botão fechar",
|
||||
"appearance16": "Ocultar barra de status inferior",
|
||||
"appearance17": "Oculta a barra de status na parte inferior da área de trabalho quando ativado",
|
||||
"appearance16": "Barra de status inferior",
|
||||
"appearance17": "Ao ativar, a barra de status será ocultada",
|
||||
"appearance18": "Configurar o interruptor de mensagens da barra de status",
|
||||
"min": "Mín",
|
||||
"restore": "Restaurar",
|
||||
"max": "Máx",
|
||||
|
|
|
|||
|
|
@ -1119,8 +1119,9 @@
|
|||
"appearance1": "Тема блока кода",
|
||||
"appearance10": "Настройки кнопки закрытия",
|
||||
"appearance11": "Свернуть в трей после нажатия на кнопку закрытия",
|
||||
"appearance16": "Скрыть нижнюю строку состояния",
|
||||
"appearance17": "Скрыть строку состояния внизу рабочего стола при включении",
|
||||
"appearance16": "Нижняя панель состояния",
|
||||
"appearance17": "После включения панель состояния будет скрыта",
|
||||
"appearance18": "Настройка переключателя сообщений панели состояния",
|
||||
"min": "Минимум",
|
||||
"restore": "Восстановить",
|
||||
"max": "Максимум",
|
||||
|
|
|
|||
|
|
@ -1119,8 +1119,9 @@
|
|||
"appearance1": "代碼塊主題",
|
||||
"appearance10": "關閉按鈕設置",
|
||||
"appearance11": "點擊關閉按鈕後縮小到託盤中",
|
||||
"appearance16": "隱藏底部狀態欄",
|
||||
"appearance17": "啟用後將隱藏桌面端底部狀態欄",
|
||||
"appearance16": "底部狀態欄",
|
||||
"appearance17": "啟用後將隱藏狀態欄",
|
||||
"appearance18": "配置狀態欄消息開關",
|
||||
"min": "最小化",
|
||||
"restore": "向下還原",
|
||||
"max": "最大化",
|
||||
|
|
|
|||
|
|
@ -1119,8 +1119,9 @@
|
|||
"appearance1": "代码块主题",
|
||||
"appearance10": "关闭按钮设置",
|
||||
"appearance11": "点击关闭按钮后缩小到托盘中",
|
||||
"appearance16": "隐藏底部状态栏",
|
||||
"appearance17": "启用后将隐藏桌面端底部状态栏",
|
||||
"appearance16": "底部状态栏",
|
||||
"appearance17": "启用后将隐藏状态栏",
|
||||
"appearance18": "配置状态栏消息开关",
|
||||
"min": "最小化",
|
||||
"restore": "向下还原",
|
||||
"max": "最大化",
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
package conf
|
||||
|
||||
import "github.com/siyuan-note/siyuan/kernel/util"
|
||||
|
||||
type Appearance struct {
|
||||
Mode int `json:"mode"` // 模式:0:明亮,1:暗黑
|
||||
ModeOS bool `json:"modeOS"` // 模式是否跟随系统
|
||||
|
|
@ -33,6 +35,7 @@ type Appearance struct {
|
|||
ThemeJS bool `json:"themeJS"` // 是否启用了主题 JavaScript
|
||||
CloseButtonBehavior int `json:"closeButtonBehavior"` // 关闭按钮行为,0:退出,1:最小化到托盘
|
||||
HideStatusBar bool `json:"hideStatusBar"` // 是否隐藏底部状态栏
|
||||
StatusBar *util.StatusBar `json:"statusBar"` // 底部状态栏配置
|
||||
}
|
||||
|
||||
func NewAppearance() *Appearance {
|
||||
|
|
@ -47,6 +50,7 @@ func NewAppearance() *Appearance {
|
|||
Lang: "en_US",
|
||||
CloseButtonBehavior: 0,
|
||||
HideStatusBar: false,
|
||||
StatusBar: &util.StatusBar{},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -203,6 +203,10 @@ func InitConf() {
|
|||
if "" == Conf.Appearance.CodeBlockThemeLight {
|
||||
Conf.Appearance.CodeBlockThemeLight = "github"
|
||||
}
|
||||
if nil == Conf.Appearance.StatusBar {
|
||||
Conf.Appearance.StatusBar = &util.StatusBar{}
|
||||
}
|
||||
util.StatusBarCfg = Conf.Appearance.StatusBar
|
||||
if nil == Conf.FileTree {
|
||||
Conf.FileTree = conf.NewFileTree()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -189,6 +189,13 @@ func StatusJob() {
|
|||
}
|
||||
count[action]++
|
||||
|
||||
if action == HistoryDatabaseIndexCommit && util.StatusBarCfg.MsgTaskHistoryDatabaseIndexCommitDisabled {
|
||||
continue
|
||||
}
|
||||
if action == AssetContentDatabaseIndexCommit && util.StatusBarCfg.MsgTaskAssetDatabaseIndexCommitDisabled {
|
||||
continue
|
||||
}
|
||||
|
||||
if nil != actionLangs {
|
||||
if label := actionLangs[task.Action]; nil != label {
|
||||
action = label.(string)
|
||||
|
|
|
|||
25
kernel/util/statusbar.go
Normal file
25
kernel/util/statusbar.go
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
// SiYuan - Refactor your thinking
|
||||
// Copyright (c) 2020-present, b3log.org
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
package util
|
||||
|
||||
// StatusBar 底部状态栏配置。https://github.com/siyuan-note/siyuan/issues/16236
|
||||
type StatusBar struct {
|
||||
MsgTaskHistoryDatabaseIndexCommitDisabled bool `json:"msgTaskHistoryDatabaseIndexCommitDisabled"`
|
||||
MsgTaskAssetDatabaseIndexCommitDisabled bool `json:"msgTaskAssetDatabaseIndexCommitDisabled"`
|
||||
}
|
||||
|
||||
var StatusBarCfg *StatusBar
|
||||
Loading…
Add table
Add a link
Reference in a new issue