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