UPD: Rename app context
This commit is contained in:
@@ -61,18 +61,18 @@
|
|||||||
<button
|
<button
|
||||||
v-if="resizeable"
|
v-if="resizeable"
|
||||||
class="grow flex justify-center items-center app-titlebar-button hover:text-white px-2"
|
class="grow flex justify-center items-center app-titlebar-button hover:text-white px-2"
|
||||||
@click="window.window.minimize">
|
@click="window.app.minimize">
|
||||||
<Minus class="h-5 w-5" />
|
<Minus class="h-5 w-5" />
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
v-if="resizeable"
|
v-if="resizeable"
|
||||||
class="grow flex justify-center items-center app-titlebar-button hover:text-white px-2"
|
class="grow flex justify-center items-center app-titlebar-button hover:text-white px-2"
|
||||||
@click="window.window.maximize">
|
@click="window.app.maximize">
|
||||||
<Square class="h-3.5 w-3.5 mr-0.5" />
|
<Square class="h-3.5 w-3.5 mr-0.5" />
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="grow flex justify-center items-center app-titlebar-button hover:text-white px-2"
|
class="grow flex justify-center items-center app-titlebar-button hover:text-white px-2"
|
||||||
@click="window.window.close">
|
@click="window.app.close">
|
||||||
<X class="h-5 w-5 mr-0.5" />
|
<X class="h-5 w-5 mr-0.5" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ contextBridge.exposeInMainWorld('nanodevice', {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// expose an API to close the app
|
// expose an API to close the app
|
||||||
contextBridge.exposeInMainWorld('window', {
|
contextBridge.exposeInMainWorld('app', {
|
||||||
minimize() {
|
minimize() {
|
||||||
BrowserWindow.getFocusedWindow()?.minimize()
|
BrowserWindow.getFocusedWindow()?.minimize()
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user