Build desktop app using NeutralinoJS

pull/58/head
nilesh 2022-07-30 07:58:01 +01:00
rodzic 53a6d13b91
commit 20ed034145
6 zmienionych plików z 112 dodań i 0 usunięć

17
.gitignore vendored
Wyświetl plik

@ -1,5 +1,22 @@
.DS_Store
node_modules
static/bundle.css
static/bundle.js
static/bundle.js.map
static/alltopics.json
# Developer tools' files
.lite_workspace.lua
# Neutralinojs binaries and builds
/bin
/dist
# Neutralinojs client (minified)
neutralino.js
# Neutralinojs related files
.storage
*.log

Wyświetl plik

@ -0,0 +1,81 @@
{
"applicationId": "org.learnawesome.learndb",
"version": "1.0.0",
"defaultMode": "window",
"port": 0,
"documentRoot": "/static/",
"url": "/",
"enableServer": true,
"enableNativeAPI": true,
"tokenSecurity": "one-time",
"logging": {
"enabled": true,
"writeToLogFile": true
},
"nativeAllowList": [
"app.*",
"os.*",
"debug.log"
],
"globalVariables": {
"TEST1": "Hello",
"TEST2": [
2,
4,
5
],
"TEST3": {
"value1": 10,
"value2": {}
}
},
"modes": {
"window": {
"title": "LearnDB",
"width": 1200,
"height": 800,
"minWidth": 800,
"minHeight": 500,
"fullScreen": false,
"alwaysOnTop": false,
"icon": "/static/icons/appIcon.png",
"enableInspector": true,
"borderless": false,
"maximize": false,
"hidden": false,
"resizable": true,
"exitProcessOnClose": false
},
"browser": {
"globalVariables": {
"TEST": "Test value browser"
},
"nativeBlockList": [
"filesystem.*"
]
},
"cloud": {
"url": "/resources/#cloud",
"nativeAllowList": [
"app.*"
]
},
"chrome": {
"width": 1200,
"height": 800,
"args": "--user-agent=\"Neutralinojs chrome mode\"",
"nativeBlockList": [
"filesystem.*",
"os.*"
]
}
},
"cli": {
"binaryName": "learndb",
"resourcesPath": "/static/",
"extensionsPath": "/extensions/",
"clientLibrary": "/static/neutralino.js",
"binaryVersion": "4.7.0",
"clientVersion": "3.6.0"
}
}

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 16 KiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 965 B

Wyświetl plik

@ -71,6 +71,14 @@
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Gentium+Plus:ital,wght@0,400;0,700;1,400&display=swap" rel="stylesheet">
<!-- Neutralino.js client. This file is gitignored,
because `neu update` typically downloads it.
Avoid copy-pasting it.
-->
<script src="/neutralino.js"></script>
<!-- Your app's source files -->
<script src="/neutra.js"></script>
</head>
<body class="max-w-none mx-auto h-full bg-gradient-to-r from-gradOne to-gradTwo text-nutral_dark font-serif">
<div class="h-full" id="app"></div>

6
static/neutra.js 100644
Wyświetl plik

@ -0,0 +1,6 @@
function onWindowClose() {
Neutralino.app.exit();
}
Neutralino.init();
Neutralino.events.on("windowClose", onWindowClose);