mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-20 19:10:49 +08:00
🎨 Support minimize the main window after auto launch on Windows/macOS https://github.com/siyuan-note/siyuan/issues/11145
This commit is contained in:
parent
9c1ebe6e6d
commit
e9914ff875
@ -23,9 +23,9 @@ export const about = {
|
|||||||
</div>
|
</div>
|
||||||
<span class="fn__space"></span>
|
<span class="fn__space"></span>
|
||||||
<select class="b3-select fn__flex-center fn__size200" id="autoLaunch">
|
<select class="b3-select fn__flex-center fn__size200" id="autoLaunch">
|
||||||
<option value="0" ${window.siyuan.config.system.autoLaunch === 0 ? "selected" : ""}>${window.siyuan.languages.autoLaunchMode0}</option>
|
<option value="0" ${window.siyuan.config.system.autoLaunch2 === 0 ? "selected" : ""}>${window.siyuan.languages.autoLaunchMode0}</option>
|
||||||
<option value="1" ${window.siyuan.config.system.autoLaunch === 1 ? "selected" : ""}>${window.siyuan.languages.autoLaunchMode1}</option>
|
<option value="1" ${window.siyuan.config.system.autoLaunch2 === 1 ? "selected" : ""}>${window.siyuan.languages.autoLaunchMode1}</option>
|
||||||
<option value="2" ${window.siyuan.config.system.autoLaunch === 2 ? "selected" : ""}>${window.siyuan.languages.autoLaunchMode2}</option>
|
<option value="2" ${window.siyuan.config.system.autoLaunch2 === 2 ? "selected" : ""}>${window.siyuan.languages.autoLaunchMode2}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<label class="fn__flex b3-label${isBrowser() || window.siyuan.config.system.isMicrosoftStore || window.siyuan.config.system.container !== "std" ? " fn__none" : ""}">
|
<label class="fn__flex b3-label${isBrowser() || window.siyuan.config.system.isMicrosoftStore || window.siyuan.config.system.container !== "std" ? " fn__none" : ""}">
|
||||||
@ -354,7 +354,7 @@ export const about = {
|
|||||||
autoLaunchElement.addEventListener("change", () => {
|
autoLaunchElement.addEventListener("change", () => {
|
||||||
const autoLaunchMode = parseInt(autoLaunchElement.value)
|
const autoLaunchMode = parseInt(autoLaunchElement.value)
|
||||||
fetchPost("/api/system/setAutoLaunch", {autoLaunch: autoLaunchMode}, () => {
|
fetchPost("/api/system/setAutoLaunch", {autoLaunch: autoLaunchMode}, () => {
|
||||||
window.siyuan.config.system.autoLaunch = autoLaunchMode;
|
window.siyuan.config.system.autoLaunch2 = autoLaunchMode;
|
||||||
ipcRenderer.send(Constants.SIYUAN_AUTO_LAUNCH, {openAtLogin: 0 != autoLaunchMode});
|
ipcRenderer.send(Constants.SIYUAN_AUTO_LAUNCH, {openAtLogin: 0 != autoLaunchMode});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
2
app/src/types/config.d.ts
vendored
2
app/src/types/config.d.ts
vendored
@ -1360,7 +1360,7 @@ declare namespace Config {
|
|||||||
* - `1`: Boot automatically
|
* - `1`: Boot automatically
|
||||||
* - `2`: Boot automatically + Minimize UI
|
* - `2`: Boot automatically + Minimize UI
|
||||||
*/
|
*/
|
||||||
autoLaunch: number;
|
autoLaunch2: number;
|
||||||
/**
|
/**
|
||||||
* The absolute path of the `conf` directory of the current workspace
|
* The absolute path of the `conf` directory of the current workspace
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user