Compare commits

...

8 Commits

Author SHA1 Message Date
398aa99fe4 Changed HTML font 2026-01-13 08:51:17 +01:00
8ee9c6bc2e Disabled window resizing 2026-01-12 13:10:01 +01:00
c5965387a5 Added idle status message 2026-01-12 13:05:26 +01:00
7f1406eeb9 Changed binary name 2026-01-12 12:55:37 +01:00
a6789b017f Removed useless comments from index 2026-01-12 12:54:12 +01:00
2a50ba2e80 Changed index to handle idle background 2026-01-12 12:53:00 +01:00
94cd652ac3 Neutralino config changes 2026-01-12 12:47:35 +01:00
954df4b47a Added .tmp to gitignore 2026-01-12 12:47:25 +01:00
5 changed files with 39 additions and 58 deletions

2
.gitignore vendored
View File

@@ -11,3 +11,5 @@ neutralino.js
# Neutralinojs related files # Neutralinojs related files
.storage .storage
*.log *.log
.tmp/

View File

@@ -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": "moe.andrestork.foddesktopplayer",
"version": "1.0.0", "version": "0.0.1",
"defaultMode": "window", "defaultMode": "window",
"port": 0, "port": 0,
"documentRoot": "/resources/", "documentRoot": "/resources/",
@@ -32,20 +32,20 @@
}, },
"modes": { "modes": {
"window": { "window": {
"title": "desktop-player", "title": "FOpen Drive Player",
"width": 800, "width": 1280,
"height": 500, "height": 720,
"minWidth": 400, "minWidth": 1280,
"minHeight": 200, "minHeight": 720,
"center": true, "center": true,
"fullScreen": false, "fullScreen": false,
"alwaysOnTop": false, "alwaysOnTop": false,
"icon": "/resources/icons/appIcon.png", "icon": "/resources/icons/appIcon.png",
"enableInspector": true, "enableInspector": false,
"borderless": false, "borderless": false,
"maximize": false, "maximize": false,
"hidden": false, "hidden": false,
"resizable": true, "resizable": false,
"exitProcessOnClose": false "exitProcessOnClose": false
}, },
"browser": { "browser": {
@@ -73,7 +73,7 @@
} }
}, },
"cli": { "cli": {
"binaryName": "desktop-player", "binaryName": "fod-desktop-player",
"resourcesPath": "/resources/", "resourcesPath": "/resources/",
"extensionsPath": "/extensions/", "extensionsPath": "/extensions/",
"clientLibrary": "/resources/js/neutralino.js", "clientLibrary": "/resources/js/neutralino.js",

BIN
resources/img/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1020 KiB

View File

@@ -4,24 +4,28 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>NeutralinoJs sample app</title> <title>NeutralinoJs sample app</title>
<link rel="stylesheet" href="/styles.css"> <link rel="stylesheet" href="/styles.css">
<style>
body{
font-family: 'Comic Sans MS','Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-image: url('./img/bg.png');
background-size: cover;
background-position: center;
}
#message{
margin: 20px;
padding: 5px;
width: fit-content;
background-color: gainsboro;
font-size: 16pt;
}
</style>
</head> </head>
<body> <body>
<div id="neutralinoapp"> <div id="message">
<h1>NeutralinoJs</h1> No Image
<div id="info"></div>
<br/>
<img src="/icons/logo.gif" alt="Neutralinojs" />
<div>
<a href="#" onclick="openDocs();">Docs</a> &middot;
<a href="#" onclick="openTutorial();">Video tutorial</a>
</div> </div>
</div>
<!-- Neutralino.js client. This file is gitignored,
because `neu update` typically downloads it.
Avoid copy-pasting it.
-->
<script src="/js/neutralino.js"></script> <script src="/js/neutralino.js"></script>
<!-- Your app's source files -->
<script src="/js/main.js"></script> <script src="/js/main.js"></script>
</body> </body>
</html> </html>

View File

@@ -1,41 +1,12 @@
// This is just a sample app. You can structure your Neutralinojs app code as you wish. function setIdleMessage(message){
// This example app is written with vanilla JavaScript and HTML. document.getElementById('message').innerHTML = message;
// Feel free to use any frontend framework you like :)
// See more details: https://neutralino.js.org/docs/how-to/use-a-frontend-library
/*
Function to display information about the Neutralino app.
This function updates the content of the 'info' element in the HTML
with details regarding the running Neutralino application, including
its ID, port, operating system, and version information.
*/
function showInfo() {
document.getElementById('info').innerHTML = `
${NL_APPID} is running on port ${NL_PORT} inside ${NL_OS}
<br/><br/>
<span>server: v${NL_VERSION} . client: v${NL_CVERSION}</span>
`;
}
/*
Function to open the official Neutralino documentation in the default web browser.
*/
function openDocs() {
Neutralino.os.open("https://neutralino.js.org/docs");
}
/*
Function to open a tutorial video on Neutralino's official YouTube channel in the default web browser.
*/
function openTutorial() {
Neutralino.os.open("https://www.youtube.com/c/CodeZri");
} }
/* /*
Function to set up a system tray menu with options specific to the window mode. Function to set up a system tray menu with options specific to the window mode.
This function checks if the application is running in window mode, and if so, This function checks if the application is running in window mode, and if so,
it defines the tray menu items and sets up the tray accordingly. it defines the tray menu items and sets up the tray accordingly.
*/
function setTray() { function setTray() {
// Tray menu is only available in window mode // Tray menu is only available in window mode
if(NL_MODE != "window") { if(NL_MODE != "window") {
@@ -56,12 +27,13 @@ function setTray() {
// Set the tray menu // Set the tray menu
Neutralino.os.setTray(tray); Neutralino.os.setTray(tray);
} }
*/
/* /*
Function to handle click events on the tray menu items. Function to handle click events on the tray menu items.
This function performs different actions based on the clicked item's ID, This function performs different actions based on the clicked item's ID,
such as displaying version information or exiting the application. such as displaying version information or exiting the application.
*/
function onTrayMenuItemClicked(event) { function onTrayMenuItemClicked(event) {
switch(event.detail.id) { switch(event.detail.id) {
case "VERSION": case "VERSION":
@@ -75,6 +47,7 @@ function onTrayMenuItemClicked(event) {
break; break;
} }
} }
*/
/* /*
Function to handle the window close event by gracefully exiting the Neutralino application. Function to handle the window close event by gracefully exiting the Neutralino application.
@@ -87,13 +60,15 @@ function onWindowClose() {
Neutralino.init(); Neutralino.init();
// Register event listeners // Register event listeners
Neutralino.events.on("trayMenuItemClicked", onTrayMenuItemClicked); //Neutralino.events.on("trayMenuItemClicked", onTrayMenuItemClicked);
Neutralino.events.on("windowClose", onWindowClose); Neutralino.events.on("windowClose", onWindowClose);
/*
// Conditional initialization: Set up system tray if not running on macOS // Conditional initialization: Set up system tray if not running on macOS
if(NL_OS != "Darwin") { // TODO: Fix https://github.com/neutralinojs/neutralinojs/issues/615 if(NL_OS != "Darwin") { // TODO: Fix https://github.com/neutralinojs/neutralinojs/issues/615
setTray(); setTray();
} }
*/
// Display app information // Display app information
showInfo(); showInfo();