Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e48779e8e0 |
@@ -273,7 +273,7 @@ class NotesAPI {
|
|||||||
const preloadPath = join(__dirname, "../preload/index.mjs");
|
const preloadPath = join(__dirname, "../preload/index.mjs");
|
||||||
const rendererPath = join(__dirname, "../renderer/index.html");
|
const rendererPath = join(__dirname, "../renderer/index.html");
|
||||||
function createWindow() {
|
function createWindow() {
|
||||||
const mainWindow2 = new BrowserWindow({
|
const mainWindow = new BrowserWindow({
|
||||||
width: 354,
|
width: 354,
|
||||||
height: 549,
|
height: 549,
|
||||||
show: false,
|
show: false,
|
||||||
@@ -283,17 +283,17 @@ function createWindow() {
|
|||||||
sandbox: false
|
sandbox: false
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
mainWindow2.on("ready-to-show", () => {
|
mainWindow.on("ready-to-show", () => {
|
||||||
mainWindow2.show();
|
mainWindow.show();
|
||||||
});
|
});
|
||||||
mainWindow2.webContents.setWindowOpenHandler((details) => {
|
mainWindow.webContents.setWindowOpenHandler((details) => {
|
||||||
shell.openExternal(details.url);
|
shell.openExternal(details.url);
|
||||||
return { action: "deny" };
|
return { action: "deny" };
|
||||||
});
|
});
|
||||||
if (is.dev && process.env["ELECTRON_RENDERER_URL"]) {
|
if (is.dev && process.env["ELECTRON_RENDERER_URL"]) {
|
||||||
mainWindow2.loadURL(process.env["ELECTRON_RENDERER_URL"]);
|
mainWindow.loadURL(process.env["ELECTRON_RENDERER_URL"]);
|
||||||
} else {
|
} else {
|
||||||
mainWindow2.loadFile(rendererPath);
|
mainWindow.loadFile(rendererPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function createNoteWindow(noteId) {
|
function createNoteWindow(noteId) {
|
||||||
@@ -310,11 +310,11 @@ function createNoteWindow(noteId) {
|
|||||||
});
|
});
|
||||||
if (is.dev && process.env["ELECTRON_RENDERER_URL"]) {
|
if (is.dev && process.env["ELECTRON_RENDERER_URL"]) {
|
||||||
noteWindow.loadURL(
|
noteWindow.loadURL(
|
||||||
`${process.env["ELECTRON_RENDERER_URL"]}/note/${noteId}`
|
`${process.env["ELECTRON_RENDERER_URL"]}/#/note/${noteId}`
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
mainWindow.loadFile(rendererPath, {
|
noteWindow.loadFile(rendererPath, {
|
||||||
path: `/notes/${noteId}`
|
hash: `/note/${noteId}`
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9253,6 +9253,11 @@ function createWebHistory(base2) {
|
|||||||
});
|
});
|
||||||
return routerHistory;
|
return routerHistory;
|
||||||
}
|
}
|
||||||
|
function createWebHashHistory(base2) {
|
||||||
|
base2 = location.host ? base2 || location.pathname + location.search : "";
|
||||||
|
if (!base2.includes("#")) base2 += "#";
|
||||||
|
return createWebHistory(base2);
|
||||||
|
}
|
||||||
let TokenType = /* @__PURE__ */ (function(TokenType2) {
|
let TokenType = /* @__PURE__ */ (function(TokenType2) {
|
||||||
TokenType2[TokenType2["Static"] = 0] = "Static";
|
TokenType2[TokenType2["Static"] = 0] = "Static";
|
||||||
TokenType2[TokenType2["Param"] = 1] = "Param";
|
TokenType2[TokenType2["Param"] = 1] = "Param";
|
||||||
@@ -10704,7 +10709,6 @@ const _sfc_main$9 = {
|
|||||||
createBaseVNode("div", _hoisted_1$8, [
|
createBaseVNode("div", _hoisted_1$8, [
|
||||||
createVNode(_sfc_main$b, {
|
createVNode(_sfc_main$b, {
|
||||||
class: "menu-item",
|
class: "menu-item",
|
||||||
category: "Special Delivery",
|
|
||||||
onNoteOpened: unref(closeMenu)
|
onNoteOpened: unref(closeMenu)
|
||||||
}, null, 8, ["onNoteOpened"]),
|
}, null, 8, ["onNoteOpened"]),
|
||||||
createVNode(_component_router_link, {
|
createVNode(_component_router_link, {
|
||||||
@@ -87785,7 +87789,7 @@ const routes = [
|
|||||||
{ path: "/instructions", name: "instructions", component: Instructions }
|
{ path: "/instructions", name: "instructions", component: Instructions }
|
||||||
];
|
];
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory(),
|
history: createWebHashHistory(),
|
||||||
routes
|
routes
|
||||||
});
|
});
|
||||||
const app = createApp(_sfc_main$7);
|
const app = createApp(_sfc_main$7);
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
http-equiv="Content-Security-Policy"
|
http-equiv="Content-Security-Policy"
|
||||||
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:"
|
content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:"
|
||||||
/>
|
/>
|
||||||
<script type="module" crossorigin src="./assets/index-GKstRZpo.js"></script>
|
<script type="module" crossorigin src="./assets/index-DdUrngdf.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="./assets/index-D9ZUihqb.css">
|
<link rel="stylesheet" crossorigin href="./assets/index-D9ZUihqb.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|||||||
@@ -56,11 +56,11 @@ function createNoteWindow(noteId) {
|
|||||||
|
|
||||||
if (is.dev && process.env['ELECTRON_RENDERER_URL']) {
|
if (is.dev && process.env['ELECTRON_RENDERER_URL']) {
|
||||||
noteWindow.loadURL(
|
noteWindow.loadURL(
|
||||||
`${process.env['ELECTRON_RENDERER_URL']}/note/${noteId}`,
|
`${process.env['ELECTRON_RENDERER_URL']}/#/note/${noteId}`,
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
mainWindow.loadFile(rendererPath, {
|
noteWindow.loadFile(rendererPath, {
|
||||||
path: `/notes/${noteId}`,
|
hash: `/note/${noteId}`,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { createRouter, createWebHistory } from 'vue-router'
|
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||||
|
|
||||||
import Directory from '@/views/Directory.vue'
|
import Directory from '@/views/Directory.vue'
|
||||||
import Editor from '@/views/Editor.vue'
|
import Editor from '@/views/Editor.vue'
|
||||||
@@ -15,6 +15,6 @@ const routes = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
export const router = createRouter({
|
export const router = createRouter({
|
||||||
history: createWebHistory(),
|
history: createWebHashHistory(),
|
||||||
routes,
|
routes,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user