mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-06 21:00:16 +01:00
🚨
This commit is contained in:
parent
182886a996
commit
17067c4d49
7 changed files with 15 additions and 15 deletions
|
|
@ -126,7 +126,7 @@ export const initAssets = () => {
|
|||
}
|
||||
updateMobileTheme(window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light");
|
||||
window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", event => {
|
||||
const OSTheme = event.matches ? "dark" : "light"
|
||||
const OSTheme = event.matches ? "dark" : "light";
|
||||
updateMobileTheme(OSTheme);
|
||||
if (!window.siyuan.config.appearance.modeOS) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -493,31 +493,31 @@ export const globalShortcut = () => {
|
|||
if (matchHotKey("⌘=", event)) {
|
||||
Constants.SIZE_ZOOM.find((item, index) => {
|
||||
if (item === window.siyuan.storage[Constants.LOCAL_ZOOM]) {
|
||||
window.siyuan.storage[Constants.LOCAL_ZOOM] = Constants.SIZE_ZOOM[index + 1] || 3
|
||||
window.siyuan.storage[Constants.LOCAL_ZOOM] = Constants.SIZE_ZOOM[index + 1] || 3;
|
||||
webFrame.setZoomFactor(window.siyuan.storage[Constants.LOCAL_ZOOM]);
|
||||
setStorageVal(Constants.LOCAL_ZOOM, window.siyuan.storage[Constants.LOCAL_ZOOM]);
|
||||
return true;
|
||||
}
|
||||
})
|
||||
});
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
if (matchHotKey("⌘0", event)) {
|
||||
webFrame.setZoomFactor(1);
|
||||
window.siyuan.storage[Constants.LOCAL_ZOOM] = 1
|
||||
setStorageVal(Constants.LOCAL_ZOOM, 1)
|
||||
window.siyuan.storage[Constants.LOCAL_ZOOM] = 1;
|
||||
setStorageVal(Constants.LOCAL_ZOOM, 1);
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
if (matchHotKey("⌘-", event)) {
|
||||
Constants.SIZE_ZOOM.find((item, index) => {
|
||||
if (item === window.siyuan.storage[Constants.LOCAL_ZOOM]) {
|
||||
window.siyuan.storage[Constants.LOCAL_ZOOM] = Constants.SIZE_ZOOM[index - 1] || 0.25
|
||||
window.siyuan.storage[Constants.LOCAL_ZOOM] = Constants.SIZE_ZOOM[index - 1] || 0.25;
|
||||
webFrame.setZoomFactor(window.siyuan.storage[Constants.LOCAL_ZOOM]);
|
||||
setStorageVal(Constants.LOCAL_ZOOM, window.siyuan.storage[Constants.LOCAL_ZOOM]);
|
||||
return true;
|
||||
}
|
||||
})
|
||||
});
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@ const initWindow = () => {
|
|||
document.body.classList.add("body--blur");
|
||||
});
|
||||
ipcRenderer.on(Constants.SIYUAN_OPENURL, (event, url) => {
|
||||
console.log(event, url)
|
||||
console.log(event, url);
|
||||
if (!/^siyuan:\/\/blocks\/\d{14}-\w{7}/.test(url)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue