🎨 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:
Daniel 2025-11-12 22:22:12 +08:00
parent 2f3c9f734a
commit 3f8b08fbd4
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
17 changed files with 79 additions and 26 deletions

View file

@ -1119,8 +1119,9 @@
"appearance1": "سمات كتلة الكود",
"appearance10": "وظيفة زر الإغلاق",
"appearance11": "التصغير إلى شريط المهام عند النقر على زر الإغلاق",
"appearance16": "إخفاء شريط الحالة السفلي",
"appearance17": "عند التمكين، سيتم إخفاء شريط الحالة السفلي في نسخة سطح المكتب",
"appearance16": "شريط الحالة السفلي",
"appearance17": "عند التمكين، سيتم إخفاء شريط الحالة",
"appearance18": "تكوين مفتاح رسائل شريط الحالة",
"min": "تصغير",
"restore": "استعادة",
"max": "تكبير",

View file

@ -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",

View file

@ -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",

View file

@ -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",

View file

@ -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",

View file

@ -1119,8 +1119,9 @@
"appearance1": "ערכת נושא לקוד",
"appearance10": "הגדרות כפתור סגירה",
"appearance11": "נמוך למגש לאחר לחיצה על כפתור הסגירה",
"appearance16": "הסתר את שורת המצב התחתונה",
"appearance17": "הסתר את שורת המצב בתחתית הדסקטופ כאשר אפשרות זו מופעלת",
"appearance16": "שורת המצב התחתונה",
"appearance17": "כאשר מופעל, שורת המצב תוסתר",
"appearance18": "הגדר את מתג ההודעות של שורת המצב",
"min": "מינ",
"restore": "שחזר",
"max": "מקס",

View file

@ -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",

View file

@ -1119,8 +1119,9 @@
"appearance1": "コードブロックのテーマ",
"appearance10": "閉じるボタン",
"appearance11": "閉じるボタンをクリックするとタスクトレイに格納する",
"appearance16": "ステータスバー",
"appearance17": "ステータスバーを表示しない",
"appearance16": "下部ステータスバー",
"appearance17": "有効にするとステータスバーが非表示になります",
"appearance18": "ステータスバーのメッセージスイッチを設定",
"min": "最小化",
"restore": "元のサイズ",
"max": "最大化",

View file

@ -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",

View file

@ -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",

View file

@ -1119,8 +1119,9 @@
"appearance1": "Тема блока кода",
"appearance10": "Настройки кнопки закрытия",
"appearance11": "Свернуть в трей после нажатия на кнопку закрытия",
"appearance16": "Скрыть нижнюю строку состояния",
"appearance17": "Скрыть строку состояния внизу рабочего стола при включении",
"appearance16": "Нижняя панель состояния",
"appearance17": "После включения панель состояния будет скрыта",
"appearance18": "Настройка переключателя сообщений панели состояния",
"min": "Минимум",
"restore": "Восстановить",
"max": "Максимум",

View file

@ -1119,8 +1119,9 @@
"appearance1": "代碼塊主題",
"appearance10": "關閉按鈕設置",
"appearance11": "點擊關閉按鈕後縮小到託盤中",
"appearance16": "隱藏底部狀態欄",
"appearance17": "啟用後將隱藏桌面端底部狀態欄",
"appearance16": "底部狀態欄",
"appearance17": "啟用後將隱藏狀態欄",
"appearance18": "配置狀態欄消息開關",
"min": "最小化",
"restore": "向下還原",
"max": "最大化",

View file

@ -1119,8 +1119,9 @@
"appearance1": "代码块主题",
"appearance10": "关闭按钮设置",
"appearance11": "点击关闭按钮后缩小到托盘中",
"appearance16": "隐藏底部状态栏",
"appearance17": "启用后将隐藏桌面端底部状态栏",
"appearance16": "底部状态栏",
"appearance17": "启用后将隐藏状态栏",
"appearance18": "配置状态栏消息开关",
"min": "最小化",
"restore": "向下还原",
"max": "最大化",

View file

@ -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{},
}
}

View file

@ -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()
}

View file

@ -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
View 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