Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
nekobato committed Nov 25, 2023
1 parent 9805b70 commit ff46ec5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
9 changes: 7 additions & 2 deletions components/common/HazyButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ defineProps({

<template>
<button class="nn-button type-primary" :class="{ loading: loading }" :disabled="disabled">
<slot class="slot"></slot>
<div class="button-content">
<slot />
</div>
<HazyLoading class="loading-icon" size="small" />
</button>
</template>
Expand All @@ -27,8 +29,11 @@ defineProps({
position: absolute;
visibility: hidden;
}
.button-content {
display: contents;
}
.loading {
.slot {
.button-content {
visibility: hidden;
}
.loading-icon {
Expand Down
11 changes: 5 additions & 6 deletions electron/windows/mainWindow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,11 @@ export function createMainWindow() {
win.show();
});

// win.webContents?.on("will-navigate", (e, url) => {
// if (url.startsWith("http://localhost")) return;
// e.preventDefault();
// console.log("will-navigate", url);
// electron.shell.openExternal(url);
// });
win.webContents?.on("will-navigate", (e, url) => {
e.preventDefault();
console.log("will-navigate", url);
electron.shell.openExternal(url);
});

return win;
}
7 changes: 5 additions & 2 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: false },
ssr: false,
devtools: { enabled: true },
experimental: {
// https://github.com/caoxiemeihao/nuxt-electron/issues/53
appManifest: false,
},
modules: ["nuxt-electron", "@pinia/nuxt"],
electron: {
build: [
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ff46ec5

Please sign in to comment.