A lot of work on the launcher. Moving things from Electron node.js to Svelte.

This commit is contained in:
Scott Idem
2022-10-11 20:06:13 -04:00
parent 31203648b4
commit 3a4812de4c
6 changed files with 812 additions and 454 deletions

View File

@@ -20,27 +20,27 @@
<!-- One Sky IT default custom Cascading Style Sheets (CSS) -->
<!-- One Sky IT site custom Cascading Style Sheets (CSS) -->
<link rel="stylesheet" href="https://cmsc.oneskyit.com/static/css/aether_variables.css">
<!-- <link rel="stylesheet" href="http://dev.oneskyit.local:5000/static/css/aether_variables.css"> -->
<link rel="stylesheet" href="https://cmsc.oneskyit.com/static/svelte/build/aether_utilities.css">
<!-- <link rel="stylesheet" href="http://dev.oneskyit.local:5000/static/svelte/build/aether_utilities.css"> -->
<link rel="stylesheet" href="https://cmsc.oneskyit.com/static/css/aether_system.css">
<!-- <link rel="stylesheet" href="http://dev.oneskyit.local:5000/static/css/aether_system.css"> -->
<link rel="stylesheet" href="https://cmsc.oneskyit.com/static/svelte/build/aether_modules_core.css">
<!-- <link rel="stylesheet" href="http://dev.oneskyit.local:5000/static/svelte/build/aether_modules_core.css"> -->
<!-- <link rel="stylesheet" href="https://lci.oneskyit.com/static/svelte/build/aether_css_variables.css"> -->
<link rel="stylesheet" href="http://demo.oneskyit.local:5000/static/svelte/build/aether_css_variables.css">
<!-- <link rel="stylesheet" href="https://lci.oneskyit.com/static/svelte/build/aether_utilities.css"> -->
<link rel="stylesheet" href="http://demo.oneskyit.local:5000/static/svelte/build/aether_utilities.css">
<!-- <link rel="stylesheet" href="https://lci.oneskyit.com/static/css/aether_system.css"> -->
<link rel="stylesheet" href="http://demo.oneskyit.local:5000/static/css/aether_system.css">
<!-- <link rel="stylesheet" href="https://lci.oneskyit.com/static/svelte/build/aether_modules_core.css"> -->
<link rel="stylesheet" href="http://demo.oneskyit.local:5000/static/svelte/build/aether_modules_core.css">
<link href="https://cmsc.oneskyit.com/static/svelte/build/bundle.css" rel="stylesheet">
<!-- <link href="http://dev.oneskyit.local:5000/static/svelte/build/bundle.css" rel="stylesheet"> -->
<link href="https://cmsc.oneskyit.com/static/svelte/build/reloading.css" rel="stylesheet">
<!-- <link href="http://dev.oneskyit.local:5000/static/svelte/build/reloading.css" rel="stylesheet"> -->
<!-- <link href="https://lci.oneskyit.com/static/svelte/build/bundle.css" rel="stylesheet"> -->
<link href="http://demo.oneskyit.local:5000/static/svelte/build/bundle.css" rel="stylesheet">
<!-- <link href="https://lci.oneskyit.com/static/svelte/build/reloading.css" rel="stylesheet"> -->
<link href="http://demo.oneskyit.local:5000/static/svelte/build/reloading.css" rel="stylesheet">
<link href="https://cmsc.oneskyit.com/static/svelte/build/base_style_grid_layout_v3.css" rel="stylesheet">
<!-- <link href="http://dev.oneskyit.local:5000/static/svelte/build/base_style_grid_layout_v3.css" rel="stylesheet"> -->
<link href="https://cmsc.oneskyit.com/static/svelte/build/base_style_grid_theme_v3.css" rel="stylesheet">
<!-- <link href="http://dev.oneskyit.local:5000/static/svelte/build/base_style_grid_theme_v3.css" rel="stylesheet"> -->
<!-- <link href="https://lci.oneskyit.com/static/svelte/build/base_style_grid_layout_v3.css" rel="stylesheet"> -->
<link href="http://demo.oneskyit.local:5000/static/svelte/build/base_style_grid_layout_v3.css" rel="stylesheet">
<!-- <link href="https://lci.oneskyit.com/static/svelte/build/base_style_grid_theme_v3.css" rel="stylesheet"> -->
<link href="http://demo.oneskyit.local:5000/static/svelte/build/base_style_grid_theme_v3.css" rel="stylesheet">
<link href="https://cmsc.oneskyit.com/static/svelte/build/event_launcher.css" rel="stylesheet">
<!-- <link href="http://dev.oneskyit.local:5000/static/svelte/build/event_launcher.css" rel="stylesheet"> -->
<!-- <link href="https://lci.oneskyit.com/static/svelte/build/event_launcher.css" rel="stylesheet"> -->
<link href="http://demo.oneskyit.local:5000/static/svelte/build/event_launcher.css" rel="stylesheet">
<link rel="stylesheet" href="css/aether_native_app_v3.css">
@@ -65,46 +65,88 @@
<script>
const app = require('./js/aether_native_app_v3');
let app_config = app.load_config();
console.log(app_config);
console.log('Native App Config:', app_config);
const flask_env = 'development'; // 'development', 'production'
const env = 'development'; // 'development', 'production'
const app_env = 'development_local'; // 'development_local', 'development_remote'
const api_env = 'development_local'; // 'development_local', 'development_remote'
const app_mode = 'native'; // null, 'default', 'onsite', 'native'
// BEGIN: Environment constants set by server when rendering HTML
document.aether = {
name: 'Aether Native App (Electron and Svelte)'
};
// Environment options: development_local, development_remote, production_local, production_remote,
// const api_base_url = 'http://dev-fastapi.oneskyit.local:5005';
// const fastapi_base_url = 'http://dev-fastapi.oneskyit.local:5005';
// const api_temporary_token = 'viOhiwXybrM';
// const fastapi_temporary_token = 'viOhiwXybrM';
// END: Environment constants set by server when rendering HTML
// BEGIN: Content constants set by server when rendering HTML
const page_for = {"event": app_config.event_id, "event_device": app_config.event_device_id, "event_location": app_config.event_location_id, "event_session": app_config.event_session_id}; // Simple key value like object
console.log('Page For:', page_for);
// END: Content constants set by server when rendering HTML
// BEGIN: Client constants set by server when rendering HTML
const client_account_jwt = {}; // Future use
const client_person_jwt = {}; // Future use
const client_user_jwt = {}; // Future use
let client_account_id = app_config.account_id;
console.log(client_account_id);
let event_id = app_config.event_id;
let event_device_id = app_config.event_device_id;
let event_location_id = app_config.event_location_id;
const page_for = { 'event': event_id, 'event_device': event_device_id, 'event_location': event_location_id }; // Simple key value like object
console.log(page_for);
// END: Client constants set by server when rendering HTML
const host_file_cache_path = app_config.host_file_cache_path; // 'file_cache/'
// BEGIN: Other constants set by server when rendering HTML
// END: Other constants set by server when rendering HTML
let page = {}
page['page_for'] = { 'event': app_config.event_id, 'event_device': app_config.event_device_id, 'event_location': app_config.event_location_id, "event_session": app_config.event_session_id }; // Simple key value like object;
// page['current_url_root'] = 'http://demo.oneskyit.local:5000/';
// page['current_url_full_path'] = '/event/pjrcghqwert/launcher/x7uFNCMEdOI?';
document.aether.page = page;
document.aether.client = {"account_id": app_config.account_id, "site_id": app_config.site_id, "site_domain_id": app_config.site_domain_id, "person_id": null, "user_id": null, "order_cart_id_random": null, "super_check": false, "manager_check": false, "administrator_check": false, "support_check": false, "assistant_check": false, "trusted_check": false, "verified_check": false, "provisional_check": false, "public_check": false, "user_check": false, "logged_in_check": false, "person_check": false, "authenticated_check": false, "anonymous_check": true, "person_group": null, "user_group": null, "orders_closed_count": 0, "order_count": 0, "app_mode": "native"};
document.aether.cfg = {};
document.aether.cfg.app = {"name": "One Sky IT's Aether Native App DEV", "version": "3.5 DEV", "email": null, "env": null, "mode": "native", "host_file_cache_path": app_config.host_file_cache_path, "host_file_temp_path": app_config.host_file_temp_path};
document.aether.cfg.api = {"protocol": app_config.api_protocol, "server": app_config.api_server, "port": app_config.api_port, "path": app_config.api_path, "secret_key": app_config.api_secret_key, "base_url": null, "temporary_token": {"token": null, "expire_on": null}, "protocol_backup": app_config.api_protocol_backup, "server_backup": app_config.api_server_backup, "port_backup": app_config.api_port_backup, "path_backup": app_config.api_path_backup, "secret_key_backup": app_config.api_secret_key_backup, "base_url_backup": null, "temporary_token_backup": {"token": null, "expire_on": null}};
document.aether.cfg.idb = {"name": app_config.idb_name};
// const flask_env = 'development'; // 'development', 'production'
// const env = 'development'; // 'development', 'production'
// const app_env = 'development_local'; // 'development_local', 'development_remote'
// const api_env = 'development_local'; // 'development_local', 'development_remote'
// const app_mode = 'native'; // null, 'default', 'native', 'onsite'
// let event_id = app_config.event_id;
// let event_device_id = app_config.event_device_id;
// let event_location_id = app_config.event_location_id;
// const host_file_cache_path = app_config.host_file_cache_path; // 'file_cache/'
// console.log(host_file_cache_path);
const host_file_temp_path = app_config.host_file_temp_path; // 'temp/'
// const host_file_temp_path = app_config.host_file_temp_path; // 'temp/'
// console.log(host_file_temp_path);
let idb_name = app_config.idb_name;
// let idb_name = app_config.idb_name;
// BEGIN: API section
const access_control_allow_origin = app_config.access_control_allow_origin;
const api_secret_key = app_config.api_secret_key;
console.log(api_secret_key);
let api_temporary_token = null;
// const access_control_allow_origin = app_config.access_control_allow_origin;
// const api_secret_key = app_config.api_secret_key;
// console.log(api_secret_key);
// let api_temporary_token = null;
let api_server_base_url = app_config.api_server_base_url; // null;
let api_server_base_url_bak = app_config.api_server_base_url_bak;
let app_server_base_url = app_config.app_server_base_url;
// let api_base_url = app_config.api_base_url; // null;
// let api_base_url_bak = app_config.api_base_url_bak;
// let app_server_base_url = app_config.app_server_base_url;
// let file_base_url = app_config.file_server_base_url;
// if (app_config.use_local_api) {
// api_server_base_url = app_config.api_local_base_url; // 'http://api.localhost:5001'
// api_base_url = app_config.api_local_base_url; // 'http://api.localhost:5001'
// } else {
// api_server_base_url = app_config.api_remote_base_url; // 'https://api.oneskyit.com'
// api_base_url = app_config.api_remote_base_url; // 'https://api.oneskyit.com'
// }
/* ***** **** *** ** * ### * ** *** **** ***** */
@@ -119,8 +161,8 @@
</script>
<!-- <script defer src="svelte/build/bundle.js" crossorigin></script> -->
<script defer src="https://cmsc.oneskyit.com/static/svelte/build/bundle.js" crossorigin></script>
<!-- <script defer src="http://dev.oneskyit.local:5000/static/svelte/build/bundle.js" crossorigin></script> -->
<!-- <script defer src="https://lci.oneskyit.com/static/svelte/build/bundle.js" crossorigin></script> -->
<script defer src="http://demo.oneskyit.local:5000/static/svelte/build/bundle.js" crossorigin></script>
<!-- JavaScript (JS) end -->
</head>