Added exit btn
- Updated credits - Updated version - Removed log file - Updated app key
This commit is contained in:
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();
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user