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