Added exit btn
- Updated credits - Updated version - Removed log file - Updated app key
This commit is contained in:
parent
620c8114ac
commit
829ffa18a6
@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/neutralinojs/neutralinojs/main/schemas/neutralino.config.schema.json",
|
||||
"applicationId": "js.neutralino.sample",
|
||||
"version": "1.0.0",
|
||||
"applicationId": "de.walzen665.clearapp",
|
||||
"version": "1.0.1",
|
||||
"defaultMode": "window",
|
||||
"port": 0,
|
||||
"documentRoot": "/src/",
|
||||
@ -10,8 +10,8 @@
|
||||
"enableNativeAPI": true,
|
||||
"tokenSecurity": "one-time",
|
||||
"logging": {
|
||||
"enabled": true,
|
||||
"writeToLogFile": true
|
||||
"enabled": false,
|
||||
"writeToLogFile": false
|
||||
},
|
||||
"nativeAllowList": [
|
||||
"app.*",
|
||||
@ -34,18 +34,18 @@
|
||||
},
|
||||
"modes": {
|
||||
"window": {
|
||||
"title": "clearapp",
|
||||
"width": 800,
|
||||
"height": 500,
|
||||
"title": "Cooperate Cleaner",
|
||||
"width": 1920,
|
||||
"height": 1080,
|
||||
"minWidth": 400,
|
||||
"minHeight": 200,
|
||||
"center": true,
|
||||
"fullScreen": false,
|
||||
"alwaysOnTop": false,
|
||||
"icon": "/src/icons/appIcon.png",
|
||||
"enableInspector": true,
|
||||
"enableInspector": false,
|
||||
"borderless": false,
|
||||
"maximize": false,
|
||||
"maximize": true,
|
||||
"hidden": false,
|
||||
"resizable": true,
|
||||
"exitProcessOnClose": false
|
||||
|
12
src/index.js
12
src/index.js
@ -20,15 +20,19 @@ $(document).ready(async function() {
|
||||
|
||||
// Enable window close event
|
||||
await Neutralino.events.on('windowClose', async () => {
|
||||
console.log('Window close event received.')
|
||||
let data = window.localStorage.getItem('config');
|
||||
await Neutralino.storage.setData('config', data);
|
||||
Neutralino.app.exit();
|
||||
quit();
|
||||
});
|
||||
|
||||
await initStorage();
|
||||
});
|
||||
|
||||
async function quit() {
|
||||
console.log('Window close event received.')
|
||||
let data = window.localStorage.getItem('config');
|
||||
await Neutralino.storage.setData('config', data);
|
||||
Neutralino.app.exit();
|
||||
}
|
||||
|
||||
function loadView(view) {
|
||||
$("#content").fadeOut(200, function() {
|
||||
const viewPath = `views/${view}/${view}`;
|
||||
|
@ -15,6 +15,8 @@
|
||||
<p>Using jQuery</p>
|
||||
<p>Using animate.css</p>
|
||||
<p>Build with NeutralinoJS</p>
|
||||
<p>Using Bootstrap icons</p>
|
||||
<p>All visible images/graphics are generated using DALL-E3 by OpenAI</p>
|
||||
|
||||
<h4 class="mt-5">MIT License</h4>
|
||||
<p>
|
||||
|
@ -34,6 +34,11 @@
|
||||
</div>
|
||||
<!-- Add more apps here as needed -->
|
||||
</div>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-auto">
|
||||
<button type="button" class="btn btn-light mt-5" id="exit-btn">Exit App</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div class="background-container">
|
||||
|
@ -16,4 +16,8 @@ function init(){
|
||||
console.log("About button clicked");
|
||||
loadView("about");
|
||||
});
|
||||
$("#exit-btn").click(function(){
|
||||
console.log("Quit button clicked");
|
||||
quit();
|
||||
});
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user