mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-03 02:22:36 +08:00
🎨 桌面端支持隐藏底部状态栏 https://github.com/siyuan-note/siyuan/issues/5292
This commit is contained in:
parent
aa691726e0
commit
fa9115a081
@ -522,6 +522,8 @@
|
||||
"appearance11": "shrink to the tray after clicking the close button",
|
||||
"appearance14": "Doc icon uses the system native Emoji",
|
||||
"appearance15": "The desktop uses Twitter Emoji by default, and the native Emoji font in the system will be used after it is turned on",
|
||||
"appearance16": "Hide bottom status bar",
|
||||
"appearance17": "Hide the status bar at the bottom of the desktop when enabled",
|
||||
"min": "Min",
|
||||
"restore": "Restore",
|
||||
"max": "Max",
|
||||
|
@ -522,6 +522,8 @@
|
||||
"appearance11": "shrink to the tray after clicking the close button",
|
||||
"appearance14": "L'icône Doc utilise l'Emoji natif du système",
|
||||
"appearance15": "Le bureau utilise Twitter Emoji par défaut, et la police Emoji native du système sera utilisée après son activation",
|
||||
"appearance16": "Masquer la barre d'état inférieure",
|
||||
"appearance17": "Masquer la barre d'état en bas du bureau lorsqu'elle est activée",
|
||||
"min": "Min",
|
||||
"restore": "Restaurer",
|
||||
"max": "Max",
|
||||
|
@ -522,6 +522,8 @@
|
||||
"appearance11": "點擊關閉按鈕後縮小到託盤中",
|
||||
"appearance14": "文檔圖示使用系統原生 Emoji",
|
||||
"appearance15": "桌面端預設使用 Twitter Emoji,開啟後將使用系統原生的 Emoji",
|
||||
"appearance16": "隱藏底部狀態欄",
|
||||
"appearance17": "開啟後將隱藏桌面端底部狀態欄",
|
||||
"min": "最小化",
|
||||
"restore": "向下還原",
|
||||
"max": "最大化",
|
||||
|
@ -523,6 +523,8 @@
|
||||
"appearance11": "点击关闭按钮后缩小到托盘中",
|
||||
"appearance14": "文档图标使用系统原生 Emoji",
|
||||
"appearance15": "桌面端默认使用 Twitter Emoji,开启后将使用系统原生的 Emoji",
|
||||
"appearance16": "隐藏底部状态栏",
|
||||
"appearance17": "开启后将隐藏桌面端底部状态栏",
|
||||
"min": "最小化",
|
||||
"restore": "向下还原",
|
||||
"max": "最大化",
|
||||
|
@ -147,6 +147,14 @@ export const appearance = {
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch fn__flex-center" id="nativeEmoji" type="checkbox"${window.siyuan.config.appearance.nativeEmoji ? " checked" : ""}>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.appearance16}
|
||||
<div class="b3-label__text">${window.siyuan.languages.appearance17}</div>
|
||||
</div>
|
||||
<span class="fn__space"></span>
|
||||
<input class="b3-switch fn__flex-center" id="hideStatusBar" type="checkbox"${window.siyuan.config.appearance.hideStatusBar ? " checked" : ""}>
|
||||
</label>
|
||||
<label class="fn__flex b3-label">
|
||||
<div class="fn__flex-1">
|
||||
${window.siyuan.languages.appearance10}
|
||||
@ -231,6 +239,7 @@ export const appearance = {
|
||||
customCSS: window.siyuan.config.appearance.customCSS,
|
||||
closeButtonBehavior: (appearance.element.querySelector("#closeButtonBehavior") as HTMLInputElement).checked ? 1 : 0,
|
||||
nativeEmoji: (appearance.element.querySelector("#nativeEmoji") as HTMLInputElement).checked,
|
||||
hideStatusBar: (appearance.element.querySelector("#hideStatusBar") as HTMLInputElement).checked,
|
||||
}, response => {
|
||||
let needTip = false;
|
||||
if (modeNumber !== window.siyuan.config.appearance.mode || themeLight !== window.siyuan.config.appearance.themeLight ||
|
||||
@ -344,7 +353,7 @@ export const appearance = {
|
||||
ipcRenderer.send(Constants.SIYUAN_CONFIG_CLOSE, data.closeButtonBehavior);
|
||||
/// #endif
|
||||
loadAssets(data);
|
||||
const modeElement = document.getElementById("barThemeMode");
|
||||
const modeElement = document.getElementById("barThemeMode");
|
||||
if (modeElement) {
|
||||
if (data.mode === 1) {
|
||||
modeElement.classList.add("toolbar__item--active");
|
||||
|
1
app/src/types/index.d.ts
vendored
1
app/src/types/index.d.ts
vendored
@ -205,6 +205,7 @@ declare interface IWebSocketData {
|
||||
}
|
||||
|
||||
declare interface IAppearance {
|
||||
hideStatusBar: boolean,
|
||||
nativeEmoji: boolean,
|
||||
customCSS: boolean,
|
||||
themeJS: boolean,
|
||||
|
@ -33,6 +33,7 @@ type Appearance struct {
|
||||
CustomCSS bool `json:"customCSS"` // 是否启用自定义主题
|
||||
ThemeJS bool `json:"themeJS"` // 是否启用了主题 JavaScript
|
||||
CloseButtonBehavior int `json:"closeButtonBehavior"` // 关闭按钮行为,0:退出,1:最小化到托盘
|
||||
HideStatusBar bool `json:"hideStatusBar"` // 是否隐藏底部状态栏
|
||||
}
|
||||
|
||||
func NewAppearance() *Appearance {
|
||||
@ -47,5 +48,6 @@ func NewAppearance() *Appearance {
|
||||
Lang: "en_US",
|
||||
CustomCSS: false,
|
||||
CloseButtonBehavior: 0,
|
||||
HideStatusBar: false,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user