Work on the config and setup
This commit is contained in:
47
app/index.bootstrap.html
Normal file
47
app/index.bootstrap.html
Normal file
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<title>One Sky IT's Aether App - External XXX</title>
|
||||
|
||||
<link rel="shortcut icon" type="image/png" href="img/favicon.ico">
|
||||
|
||||
<!-- Cascading Style Sheets (CSS) start -->
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
<!-- Cascading Style Sheets (CSS) end -->
|
||||
|
||||
<!-- JavaScript (JS) start -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/1.1.3/axios.min.js" integrity="sha512-0qU9M9jfqPw6FKkPafM3gy2CBAvUWnYVOfNPDYKVuRTel1PrciTj+a9P3loJB+j0QmN2Y0JYQmkBBS8W+mbezg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://webrtc.github.io/adapter/adapter-latest.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.2.0/socket.io.js" integrity="sha512-WL6WGKMPBiM9PnHRYIn5YEtq0Z8XP4fkVb4qy7PP4vhmYQErJ/dySyXuFIMDf1eEYCXCrQrMJfkNwKc9gsjTjA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/dayjs/1.10.7/dayjs.min.js" integrity="sha512-bwD3VD/j6ypSSnyjuaURidZksoVx3L1RPvTkleC48SbHCZsemT3VKMD39KknPnH728LLXVMTisESIBOAb5/W0Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/localforage/1.10.0/localforage.min.js" integrity="sha512-+BMamP0e7wn39JGL8nKAZ3yAQT2dL5oaXWr4ZYlTGkKOaoXM/Yj7c4oy50Ngz5yoUutAG17flueD4F6QpTlPng==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<!-- JavaScript (JS) end -->
|
||||
|
||||
<script type="module">
|
||||
import {check_and_copy_app_files} from 'https://dev-cmsc.oneskyit.com/srv/assets/js/init_bootstrap_app.js';
|
||||
check_and_copy_app_files({overwrite: true});
|
||||
</script>
|
||||
|
||||
<script src="script.js"></script>
|
||||
|
||||
<link rel="stylesheet" href="style.css">
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body id="Body-Container" class="body_container">
|
||||
|
||||
Loaded HTML
|
||||
|
||||
</body>
|
||||
</html>
|
||||
316
app/index.current.html
Normal file
316
app/index.current.html
Normal file
@@ -0,0 +1,316 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<title>One Sky IT's Aether App - External</title>
|
||||
|
||||
<link rel="shortcut icon" type="image/png" href="img/favicon.ico">
|
||||
|
||||
<!-- Cascading Style Sheets (CSS) start -->
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
<!-- Cascading Style Sheets (CSS) end -->
|
||||
|
||||
<!-- JavaScript (JS) start -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/1.1.3/axios.min.js" integrity="sha512-0qU9M9jfqPw6FKkPafM3gy2CBAvUWnYVOfNPDYKVuRTel1PrciTj+a9P3loJB+j0QmN2Y0JYQmkBBS8W+mbezg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://webrtc.github.io/adapter/adapter-latest.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.2.0/socket.io.js" integrity="sha512-WL6WGKMPBiM9PnHRYIn5YEtq0Z8XP4fkVb4qy7PP4vhmYQErJ/dySyXuFIMDf1eEYCXCrQrMJfkNwKc9gsjTjA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/dayjs/1.10.7/dayjs.min.js" integrity="sha512-bwD3VD/j6ypSSnyjuaURidZksoVx3L1RPvTkleC48SbHCZsemT3VKMD39KknPnH728LLXVMTisESIBOAb5/W0Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/localforage/1.10.0/localforage.min.js" integrity="sha512-+BMamP0e7wn39JGL8nKAZ3yAQT2dL5oaXWr4ZYlTGkKOaoXM/Yj7c4oy50Ngz5yoUutAG17flueD4F6QpTlPng==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<!-- JavaScript (JS) end -->
|
||||
|
||||
<script type="module">
|
||||
import {check_for_native_app_update, check_and_copy_app_files, check_and_get_updated_native_app_config} from 'https://dev-cmsc.oneskyit.com/srv/assets/js/init_bootstrap_app.js';
|
||||
|
||||
check_for_native_app_update({overwrite: false});
|
||||
|
||||
check_and_copy_app_files({overwrite: true});
|
||||
|
||||
check_and_get_updated_native_app_config({overwrite: false})
|
||||
|
||||
|
||||
// let native_app_config = load_init_config();
|
||||
// console.log('Native App Initial Config:', native_app_config);
|
||||
|
||||
// const native_app = require('./script');
|
||||
// let native_app_config = native_app.load_init_config();
|
||||
// console.log('Native App Initial Config:', native_app_config);
|
||||
//
|
||||
// let native_app_js_css_base_url = native_app_config.native_app_js_css_base_url;
|
||||
//
|
||||
// document.aether = {
|
||||
// name: 'Aether Native App (Electron and Svelte)'
|
||||
// };
|
||||
|
||||
// document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/css/ae_css_variables.css" />`);
|
||||
</script>
|
||||
|
||||
<script>
|
||||
const native_app = require('./script');
|
||||
let native_app_config = native_app.load_init_config();
|
||||
console.log('Native App Initial Config:', native_app_config);
|
||||
|
||||
// native_app_config = native_app.load_full_config(native_app_config);
|
||||
// console.log('Native App Full Config:', native_app_config);
|
||||
|
||||
let native_app_js_css_base_url = native_app_config.native_app_js_css_base_url;
|
||||
|
||||
document.aether = {
|
||||
name: 'Aether Native App (Electron and Svelte)'
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<!-- One Sky IT Cascading Style Sheets (CSS) -->
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/css/ae_css_variables.css" />`);</script>
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/css/ae_utilities.css" />`);</script>
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/css/ae_shared_components.css" />`);</script>
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/css/ae_core_modules_components.css" />`);</script>
|
||||
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/css/ae_layout_base.css" />`);</script>
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/css/ae_layout_system.css" />`);</script>
|
||||
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/ae_app_core_bundle.css" />`);</script>
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/ae_app_mods_bundle.css" />`);</script>
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/ae_app_mod_events_bundle.css" />`);</script>
|
||||
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/css/ae_temp.css" />`);</script>
|
||||
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/css/event.css" />`);</script>
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/css/event_launcher.css" />`);</script>
|
||||
|
||||
<link rel="stylesheet" href="style.css">
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
|
||||
<script>
|
||||
// BEGIN: Environment constants set by server when rendering HTML
|
||||
// Environment options: development_local, development_remote, production_local, production_remote,
|
||||
// END: Environment constants set by server when rendering HTML
|
||||
|
||||
// BEGIN: Content constants set by server when rendering HTML
|
||||
// const page_for_id = {"event": native_app_config.event_id, "event_device": native_app_config.event_device_id, "event_location": native_app_config.event_location_id, "event_session": native_app_config.event_session_id}; // Simple key value like object
|
||||
const page_for = {'event_id': native_app_config.event_id, 'event_device_id': native_app_config.event_device_id, 'event_location_id': native_app_config.event_location_id, 'event_session_id': native_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 = native_app_config.account_id;
|
||||
console.log(client_account_id);
|
||||
|
||||
// END: Client constants set by server when rendering HTML
|
||||
|
||||
// BEGIN: Other constants set by server when rendering HTML
|
||||
// END: Other constants set by server when rendering HTML
|
||||
|
||||
|
||||
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", "local_file_cache_path": native_app_config.local_file_cache_path, "host_file_temp_path": native_app_config.host_file_temp_path };
|
||||
document.aether.cfg.api = { "protocol": native_app_config.api_protocol, "server": native_app_config.api_server, "port": native_app_config.api_port, "path": native_app_config.api_path, "secret_key": native_app_config.api_secret_key, "base_url": null, "temporary_token": {"token": null, "expire_on": null}, "protocol_backup": native_app_config.api_protocol_backup, "server_backup": native_app_config.api_server_backup, "port_backup": native_app_config.api_port_backup, "path_backup": native_app_config.api_path_backup, "secret_key_backup": native_app_config.api_secret_key_backup, "base_url_backup": null, "temporary_token_backup": {"token": null, "expire_on": null} };
|
||||
document.aether.cfg.idb = { "name": native_app_config.idb_name };
|
||||
|
||||
|
||||
document.aether.client = { "account_id": native_app_config.account_id, "site_id": native_app_config.site_id, "site_domain_id": native_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" };
|
||||
|
||||
|
||||
let page = {}
|
||||
page['mode'] = null;
|
||||
// page['page_for_id'] = { 'event': native_app_config.event_id, 'event_device': native_app_config.event_device_id, 'event_location': native_app_config.event_location_id, 'event_session': native_app_config.event_session_id }; // Simple key value like object;
|
||||
page['page_for'] = { 'event_id': native_app_config.event_id, 'event_device_id': native_app_config.event_device_id, 'event_location_id': native_app_config.event_location_id, 'event_session_id': native_app_config.event_session_id }; // Simple key value like object;
|
||||
|
||||
page['current_url_root'] = null;
|
||||
page['current_url_full_path'] = null;
|
||||
|
||||
page['data'] = null; // Pre-populate the page data from the rendering server (Electron app).
|
||||
page['mode'] = null; // For future use or in other contexts
|
||||
page['params'] = null; // For future use or in other contexts
|
||||
|
||||
document.aether.page = page;
|
||||
|
||||
|
||||
let aether = JSON.stringify(document.aether);
|
||||
let aether_cfg = JSON.stringify(document.aether.cfg);
|
||||
let aether_client = JSON.stringify(document.aether.client);
|
||||
let aether_page = JSON.stringify(document.aether.page);
|
||||
|
||||
localStorage.setItem('ae_cfg', aether_cfg);
|
||||
sessionStorage.setItem('ae', aether);
|
||||
sessionStorage.setItem('ae_client', aether_client);
|
||||
sessionStorage.setItem('ae_page', aether_page);
|
||||
|
||||
/* ***** **** *** ** * ### * ** *** **** ***** */
|
||||
|
||||
let app_online = false;
|
||||
//let app_use_cached_data = true;
|
||||
window.addEventListener('online', native_app.currently_online);
|
||||
window.addEventListener('offline', native_app.currently_offline);
|
||||
|
||||
/* ***** **** *** ** * ### * ** *** **** ***** */
|
||||
|
||||
const ae_bridge = {
|
||||
example_var: 'Example Default Value',
|
||||
get example() {
|
||||
return this.example_var;
|
||||
},
|
||||
set example(new_value) {
|
||||
this.example_var = new_value;
|
||||
this.example_var_listener(new_value);
|
||||
this.example_var_core_listener(new_value);
|
||||
this.example_var_mods_listener(new_value);
|
||||
},
|
||||
|
||||
example_var_listener: function (new_value) {},
|
||||
registerNewListener: function (external_listener_function) {
|
||||
this.example_var_listener = external_listener_function;
|
||||
},
|
||||
|
||||
example_var_core_listener: function (new_value) {},
|
||||
registerNewCoreListener: function (external_core_listener_function) {
|
||||
this.example_var_core_listener = external_core_listener_function;
|
||||
},
|
||||
|
||||
example_var_mods_listener: function (new_value) {},
|
||||
registerNewModsListener: function (external_mods_listener_function) {
|
||||
this.example_var_mods_listener = external_mods_listener_function;
|
||||
},
|
||||
|
||||
// Monitor change in Access Type
|
||||
access_type_var: 'anonymous',
|
||||
get access_type() {
|
||||
return this.access_type_var;
|
||||
},
|
||||
set access_type(new_value) {
|
||||
this.access_type_var = new_value;
|
||||
this.access_type_var_core_listener(new_value);
|
||||
this.access_type_var_mods_listener(new_value);
|
||||
},
|
||||
|
||||
access_type_var_core_listener: function (new_value) {},
|
||||
register_core_access_type_listener: function (external_core_listener_function) {
|
||||
this.access_type_var_core_listener = external_core_listener_function;
|
||||
},
|
||||
|
||||
access_type_var_mods_listener: function (new_value) {},
|
||||
register_mods_access_type_listener: function (external_mods_listener_function) {
|
||||
this.access_type_var_mods_listener = external_mods_listener_function;
|
||||
},
|
||||
|
||||
|
||||
// Monitor change in AE Common
|
||||
ae_com_var: 'anonymous',
|
||||
get ae_com() {
|
||||
return this.ae_com_var;
|
||||
},
|
||||
set ae_com(new_value) {
|
||||
this.ae_com_var = new_value;
|
||||
this.ae_com_var_core_listener(new_value);
|
||||
this.ae_com_var_mods_listener(new_value);
|
||||
},
|
||||
|
||||
ae_com_var_core_listener: function (new_value) {},
|
||||
register_core_ae_com_listener: function (external_core_listener_function) {
|
||||
this.ae_com_var_core_listener = external_core_listener_function;
|
||||
},
|
||||
|
||||
ae_com_var_mods_listener: function (new_value) {},
|
||||
register_mods_ae_com_listener: function (external_mods_listener_function) {
|
||||
this.ae_com_var_mods_listener = external_mods_listener_function;
|
||||
},
|
||||
|
||||
|
||||
// Monitor change in Client
|
||||
client_var: 'anonymous',
|
||||
get client() {
|
||||
return this.client_var;
|
||||
},
|
||||
set client(new_value) {
|
||||
this.client_var = new_value;
|
||||
this.client_var_core_listener(new_value);
|
||||
this.client_var_mods_listener(new_value);
|
||||
},
|
||||
|
||||
client_var_core_listener: function (new_value) {},
|
||||
register_core_client_listener: function (external_core_listener_function) {
|
||||
this.client_var_core_listener = external_core_listener_function;
|
||||
},
|
||||
|
||||
client_var_mods_listener: function (new_value) {},
|
||||
register_mods_client_listener: function (external_mods_listener_function) {
|
||||
this.client_var_mods_listener = external_mods_listener_function;
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
/* ***** **** *** ** * ### * ** *** **** ***** */
|
||||
|
||||
let svelte_ae_app_core_bundle_js = document.createElement('script');
|
||||
svelte_ae_app_core_bundle_js.setAttribute('src', `${native_app_js_css_base_url}/static/ae_app_core_bundle.js`);
|
||||
document.head.appendChild(svelte_ae_app_core_bundle_js);
|
||||
|
||||
let svelte_ae_app_mods_bundle_js = document.createElement('script');
|
||||
svelte_ae_app_mods_bundle_js.setAttribute('src', `${native_app_js_css_base_url}/static/ae_app_mods_bundle.js`);
|
||||
document.head.appendChild(svelte_ae_app_mods_bundle_js);
|
||||
|
||||
let svelte_ae_app_mod_events_bundle_js = document.createElement('script');
|
||||
svelte_ae_app_mod_events_bundle_js.setAttribute('src', `${native_app_js_css_base_url}/static/ae_app_mod_events_bundle.js`);
|
||||
document.head.appendChild(svelte_ae_app_mod_events_bundle_js);
|
||||
</script>
|
||||
|
||||
<!-- <script>document.write(`<script src="${native_app_js_css_base_url}/static/svelte/build/bundle.js" crossorigin />`);</script> -->
|
||||
|
||||
<!-- JavaScript (JS) end -->
|
||||
</head>
|
||||
|
||||
<body id="Body-Container" class="body_container">
|
||||
|
||||
<section id="System-Nav-Menu">Site-Nav-Menu</section>
|
||||
|
||||
<div id="Site-Container">
|
||||
|
||||
<section id="Site-Header">Site-Header</section>
|
||||
|
||||
<nav id="Site-Nav-Menu">Site-Nav-Menu</nav>
|
||||
|
||||
<section id="Notifications">
|
||||
<section id="System-Notifications">System-Notifications (and Site-Notifications)</section><!-- and what would be Site-Notifications-->
|
||||
|
||||
</section>
|
||||
|
||||
<section id="Main-Body" class="main_template_content svelte_target event_launcher_main Side-Main-Nav-Menu">
|
||||
<section id="Main-Nav-Menu"></section>
|
||||
<main id="Main-Content"></main>
|
||||
</section>
|
||||
|
||||
<section id="Site-Footer">Site-Footer</section>
|
||||
|
||||
</div>
|
||||
|
||||
<section id="Site-Modals"></section>
|
||||
|
||||
<section id="System-Footer">Site-Footer</section>
|
||||
|
||||
<section id="System-Debug">System-Debug</section>
|
||||
|
||||
</body>
|
||||
<!-- JavaScript (JS) start -->
|
||||
<!-- <script>const app = require('./js/app_v3');</script> -->
|
||||
<!-- <script src="js/app_v3.js"></script> -->
|
||||
<script>
|
||||
/* ***** **** *** ** * ### * ** *** **** ***** */
|
||||
/* ***** **** *** ** * ### * ** *** **** ***** */
|
||||
</script>
|
||||
<!-- JavaScript (JS) end -->
|
||||
|
||||
|
||||
</html>
|
||||
1265
app/script.current.js
Normal file
1265
app/script.current.js
Normal file
File diff suppressed because it is too large
Load Diff
0
app/script.js
Normal file
0
app/script.js
Normal file
0
app/style.css
Normal file
0
app/style.css
Normal file
28
app/style.current.css
Normal file
28
app/style.current.css
Normal file
@@ -0,0 +1,28 @@
|
||||
body {
|
||||
/* min-height: 100%;
|
||||
height: 100%;
|
||||
max-height: 100%; */
|
||||
|
||||
/* margin: .1em;
|
||||
padding: .1em; */
|
||||
}
|
||||
|
||||
section#Main-Body {
|
||||
/* outline: solid thin red; */
|
||||
|
||||
/* min-height: 100%;
|
||||
height: 100%;
|
||||
max-height: 100%; */
|
||||
}
|
||||
|
||||
section#Main-Nav-Menu {
|
||||
/* min-height: 100%;
|
||||
height: 100%;
|
||||
max-height: 100%; */
|
||||
}
|
||||
|
||||
section#Main-Content {
|
||||
/* min-height: 100%;
|
||||
height: 100%;
|
||||
max-height: 100%; */
|
||||
}
|
||||
279
app/test.html
Normal file
279
app/test.html
Normal file
@@ -0,0 +1,279 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
<title>One Sky IT's Aether App</title>
|
||||
|
||||
<link rel="shortcut icon" type="image/png" href="img/favicon.ico">
|
||||
|
||||
<!-- Cascading Style Sheets (CSS) start -->
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
<!-- Cascading Style Sheets (CSS) end -->
|
||||
|
||||
<!-- JavaScript (JS) start -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/1.1.3/axios.min.js" integrity="sha512-0qU9M9jfqPw6FKkPafM3gy2CBAvUWnYVOfNPDYKVuRTel1PrciTj+a9P3loJB+j0QmN2Y0JYQmkBBS8W+mbezg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://webrtc.github.io/adapter/adapter-latest.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.2.0/socket.io.js" integrity="sha512-WL6WGKMPBiM9PnHRYIn5YEtq0Z8XP4fkVb4qy7PP4vhmYQErJ/dySyXuFIMDf1eEYCXCrQrMJfkNwKc9gsjTjA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/dayjs/1.10.7/dayjs.min.js" integrity="sha512-bwD3VD/j6ypSSnyjuaURidZksoVx3L1RPvTkleC48SbHCZsemT3VKMD39KknPnH728LLXVMTisESIBOAb5/W0Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/localforage/1.10.0/localforage.min.js" integrity="sha512-+BMamP0e7wn39JGL8nKAZ3yAQT2dL5oaXWr4ZYlTGkKOaoXM/Yj7c4oy50Ngz5yoUutAG17flueD4F6QpTlPng==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||
<!-- JavaScript (JS) end -->
|
||||
|
||||
<script>
|
||||
const native_app = require('./js/aether_app_native_v4');
|
||||
let native_app_config = native_app.load_init_config();
|
||||
console.log('Native App Initial Config:', native_app_config);
|
||||
|
||||
// native_app_config = native_app.load_full_config(native_app_config);
|
||||
// console.log('Native App Full Config:', native_app_config);
|
||||
|
||||
let native_app_js_css_base_url = native_app_config.native_app_js_css_base_url;
|
||||
|
||||
document.aether = {
|
||||
name: 'Aether Native App (Electron and Svelte)'
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<!-- One Sky IT Cascading Style Sheets (CSS) -->
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/css/ae_css_variables.css" />`);</script>
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/css/ae_utilities.css" />`);</script>
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/css/ae_shared_components.css" />`);</script>
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/css/ae_core_modules_components.css" />`);</script>
|
||||
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/css/ae_layout_base.css" />`);</script>
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/css/ae_layout_system.css" />`);</script>
|
||||
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/ae_app_core_bundle.css" />`);</script>
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/ae_app_mods_bundle.css" />`);</script>
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/ae_app_mod_events_bundle.css" />`);</script>
|
||||
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/css/ae_temp.css" />`);</script>
|
||||
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/css/event.css" />`);</script>
|
||||
<script>document.write(`<link rel="stylesheet" href="${native_app_js_css_base_url}/static/css/event_launcher.css" />`);</script>
|
||||
|
||||
<link rel="stylesheet" href="css/aether_app_native_v3.css">
|
||||
|
||||
<style>
|
||||
</style>
|
||||
|
||||
|
||||
<script>
|
||||
// BEGIN: Environment constants set by server when rendering HTML
|
||||
// Environment options: development_local, development_remote, production_local, production_remote,
|
||||
// END: Environment constants set by server when rendering HTML
|
||||
|
||||
// BEGIN: Content constants set by server when rendering HTML
|
||||
// const page_for_id = {"event": native_app_config.event_id, "event_device": native_app_config.event_device_id, "event_location": native_app_config.event_location_id, "event_session": native_app_config.event_session_id}; // Simple key value like object
|
||||
const page_for = {'event_id': native_app_config.event_id, 'event_device_id': native_app_config.event_device_id, 'event_location_id': native_app_config.event_location_id, 'event_session_id': native_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 = native_app_config.account_id;
|
||||
console.log(client_account_id);
|
||||
|
||||
// END: Client constants set by server when rendering HTML
|
||||
|
||||
// BEGIN: Other constants set by server when rendering HTML
|
||||
// END: Other constants set by server when rendering HTML
|
||||
|
||||
|
||||
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", "local_file_cache_path": native_app_config.local_file_cache_path, "host_file_temp_path": native_app_config.host_file_temp_path };
|
||||
document.aether.cfg.api = { "protocol": native_app_config.api_protocol, "server": native_app_config.api_server, "port": native_app_config.api_port, "path": native_app_config.api_path, "secret_key": native_app_config.api_secret_key, "base_url": null, "temporary_token": {"token": null, "expire_on": null}, "protocol_backup": native_app_config.api_protocol_backup, "server_backup": native_app_config.api_server_backup, "port_backup": native_app_config.api_port_backup, "path_backup": native_app_config.api_path_backup, "secret_key_backup": native_app_config.api_secret_key_backup, "base_url_backup": null, "temporary_token_backup": {"token": null, "expire_on": null} };
|
||||
document.aether.cfg.idb = { "name": native_app_config.idb_name };
|
||||
|
||||
|
||||
document.aether.client = { "account_id": native_app_config.account_id, "site_id": native_app_config.site_id, "site_domain_id": native_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" };
|
||||
|
||||
|
||||
let page = {}
|
||||
page['mode'] = null;
|
||||
// page['page_for_id'] = { 'event': native_app_config.event_id, 'event_device': native_app_config.event_device_id, 'event_location': native_app_config.event_location_id, 'event_session': native_app_config.event_session_id }; // Simple key value like object;
|
||||
page['page_for'] = { 'event_id': native_app_config.event_id, 'event_device_id': native_app_config.event_device_id, 'event_location_id': native_app_config.event_location_id, 'event_session_id': native_app_config.event_session_id }; // Simple key value like object;
|
||||
|
||||
page['current_url_root'] = null;
|
||||
page['current_url_full_path'] = null;
|
||||
|
||||
page['data'] = null; // Pre-populate the page data from the rendering server (Electron app).
|
||||
page['mode'] = null; // For future use or in other contexts
|
||||
page['params'] = null; // For future use or in other contexts
|
||||
|
||||
document.aether.page = page;
|
||||
|
||||
/* ***** **** *** ** * ### * ** *** **** ***** */
|
||||
|
||||
let app_online = false;
|
||||
//let app_use_cached_data = true;
|
||||
window.addEventListener('online', native_app.currently_online);
|
||||
window.addEventListener('offline', native_app.currently_offline);
|
||||
|
||||
/* ***** **** *** ** * ### * ** *** **** ***** */
|
||||
|
||||
const ae_bridge = {
|
||||
example_var: 'Example Default Value',
|
||||
get example() {
|
||||
return this.example_var;
|
||||
},
|
||||
set example(new_value) {
|
||||
this.example_var = new_value;
|
||||
this.example_var_listener(new_value);
|
||||
this.example_var_core_listener(new_value);
|
||||
this.example_var_mods_listener(new_value);
|
||||
},
|
||||
|
||||
example_var_listener: function (new_value) {},
|
||||
registerNewListener: function (external_listener_function) {
|
||||
this.example_var_listener = external_listener_function;
|
||||
},
|
||||
|
||||
example_var_core_listener: function (new_value) {},
|
||||
registerNewCoreListener: function (external_core_listener_function) {
|
||||
this.example_var_core_listener = external_core_listener_function;
|
||||
},
|
||||
|
||||
example_var_mods_listener: function (new_value) {},
|
||||
registerNewModsListener: function (external_mods_listener_function) {
|
||||
this.example_var_mods_listener = external_mods_listener_function;
|
||||
},
|
||||
|
||||
// Monitor change in Access Type
|
||||
access_type_var: 'anonymous',
|
||||
get access_type() {
|
||||
return this.access_type_var;
|
||||
},
|
||||
set access_type(new_value) {
|
||||
this.access_type_var = new_value;
|
||||
this.access_type_var_core_listener(new_value);
|
||||
this.access_type_var_mods_listener(new_value);
|
||||
},
|
||||
|
||||
access_type_var_core_listener: function (new_value) {},
|
||||
register_core_access_type_listener: function (external_core_listener_function) {
|
||||
this.access_type_var_core_listener = external_core_listener_function;
|
||||
},
|
||||
|
||||
access_type_var_mods_listener: function (new_value) {},
|
||||
register_mods_access_type_listener: function (external_mods_listener_function) {
|
||||
this.access_type_var_mods_listener = external_mods_listener_function;
|
||||
},
|
||||
|
||||
|
||||
// Monitor change in AE Common
|
||||
ae_com_var: 'anonymous',
|
||||
get ae_com() {
|
||||
return this.ae_com_var;
|
||||
},
|
||||
set ae_com(new_value) {
|
||||
this.ae_com_var = new_value;
|
||||
this.ae_com_var_core_listener(new_value);
|
||||
this.ae_com_var_mods_listener(new_value);
|
||||
},
|
||||
|
||||
ae_com_var_core_listener: function (new_value) {},
|
||||
register_core_ae_com_listener: function (external_core_listener_function) {
|
||||
this.ae_com_var_core_listener = external_core_listener_function;
|
||||
},
|
||||
|
||||
ae_com_var_mods_listener: function (new_value) {},
|
||||
register_mods_ae_com_listener: function (external_mods_listener_function) {
|
||||
this.ae_com_var_mods_listener = external_mods_listener_function;
|
||||
},
|
||||
|
||||
|
||||
// Monitor change in Client
|
||||
client_var: 'anonymous',
|
||||
get client() {
|
||||
return this.client_var;
|
||||
},
|
||||
set client(new_value) {
|
||||
this.client_var = new_value;
|
||||
this.client_var_core_listener(new_value);
|
||||
this.client_var_mods_listener(new_value);
|
||||
},
|
||||
|
||||
client_var_core_listener: function (new_value) {},
|
||||
register_core_client_listener: function (external_core_listener_function) {
|
||||
this.client_var_core_listener = external_core_listener_function;
|
||||
},
|
||||
|
||||
client_var_mods_listener: function (new_value) {},
|
||||
register_mods_client_listener: function (external_mods_listener_function) {
|
||||
this.client_var_mods_listener = external_mods_listener_function;
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
/* ***** **** *** ** * ### * ** *** **** ***** */
|
||||
|
||||
let svelte_ae_app_core_bundle_js = document.createElement('script');
|
||||
svelte_ae_app_core_bundle_js.setAttribute('src', `${native_app_js_css_base_url}/static/ae_app_core_bundle.js`);
|
||||
document.head.appendChild(svelte_ae_app_core_bundle_js);
|
||||
|
||||
let svelte_ae_app_mods_bundle_js = document.createElement('script');
|
||||
svelte_ae_app_mods_bundle_js.setAttribute('src', `${native_app_js_css_base_url}/static/ae_app_mods_bundle.js`);
|
||||
document.head.appendChild(svelte_ae_app_mods_bundle_js);
|
||||
|
||||
let svelte_ae_app_mod_events_bundle_js = document.createElement('script');
|
||||
svelte_ae_app_mod_events_bundle_js.setAttribute('src', `${native_app_js_css_base_url}/static/ae_app_mod_events_bundle.js`);
|
||||
document.head.appendChild(svelte_ae_app_mod_events_bundle_js);
|
||||
</script>
|
||||
|
||||
<!-- <script>document.write(`<script src="${native_app_js_css_base_url}/static/svelte/build/bundle.js" crossorigin />`);</script> -->
|
||||
|
||||
<!-- JavaScript (JS) end -->
|
||||
</head>
|
||||
|
||||
<body id="Body-Container" class="body_container">
|
||||
|
||||
<section id="System-Nav-Menu">Site-Nav-Menu</section>
|
||||
|
||||
<div id="Site-Container">
|
||||
|
||||
<section id="Site-Header">Site-Header</section>
|
||||
|
||||
<nav id="Site-Nav-Menu">Site-Nav-Menu</nav>
|
||||
|
||||
<section id="Notifications">
|
||||
<section id="System-Notifications">System-Notifications (and Site-Notifications)</section><!-- and what would be Site-Notifications-->
|
||||
|
||||
</section>
|
||||
|
||||
<section id="Main-Body" class="main_template_content svelte_target event_launcher_main Side-Main-Nav-Menu">
|
||||
<section id="Main-Nav-Menu"></section>
|
||||
<main id="Main-Content"></main>
|
||||
</section>
|
||||
|
||||
<section id="Site-Footer">Site-Footer</section>
|
||||
|
||||
</div>
|
||||
|
||||
<section id="Site-Modals"></section>
|
||||
|
||||
<section id="System-Footer">Site-Footer</section>
|
||||
|
||||
<section id="System-Debug">System-Debug</section>
|
||||
|
||||
</body>
|
||||
<!-- JavaScript (JS) start -->
|
||||
<!-- <script>const app = require('./js/app_v3');</script> -->
|
||||
<!-- <script src="js/app_v3.js"></script> -->
|
||||
<script>
|
||||
/* ***** **** *** ** * ### * ** *** **** ***** */
|
||||
/* ***** **** *** ** * ### * ** *** **** ***** */
|
||||
</script>
|
||||
<!-- JavaScript (JS) end -->
|
||||
|
||||
|
||||
</html>
|
||||
5
index.js
5
index.js
@@ -145,7 +145,8 @@ function createWindow () {
|
||||
webPreferences: {
|
||||
contextIsolation: false,
|
||||
nodeIntegration: true,
|
||||
nodeIntegrationInWorker: true
|
||||
nodeIntegrationInWorker: true,
|
||||
enableRemoteModule: true
|
||||
}
|
||||
})
|
||||
|
||||
@@ -179,7 +180,7 @@ function createWindow () {
|
||||
let index_url = 'http://localhost/index.html';
|
||||
|
||||
if (config.native_app_index_url) {
|
||||
index_url = native_app_index_url;
|
||||
index_url = config.native_app_index_url;
|
||||
} else {
|
||||
index_url = 'https://app.oneskyit.com/native/index.html';
|
||||
}
|
||||
|
||||
16
package-lock.json
generated
16
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "aether_app_native",
|
||||
"version": "3.6.1",
|
||||
"version": "2023.5.14.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "aether_app_native",
|
||||
"version": "3.6.1",
|
||||
"version": "2023.5.14.2",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"axios": "^1.1.2",
|
||||
@@ -595,9 +595,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/electron": {
|
||||
"version": "22.3.6",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-22.3.6.tgz",
|
||||
"integrity": "sha512-/1/DivFHH5AWa/uOuqpkeg12/jjicjkBU8kYv70oeqRFwXzoyuJhgwlzER4jZXnbGjF5Nxz9900oXq/QzAViAw==",
|
||||
"version": "22.3.10",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-22.3.10.tgz",
|
||||
"integrity": "sha512-gh7PtSh+rfxHfM4dzPiEO+k1NRo07FvaK/jXG3HzuODrpTTEhC9rsE+AJGrTKQU6Nz7GorseMvnvs8PnUQPPTw==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
@@ -2527,9 +2527,9 @@
|
||||
}
|
||||
},
|
||||
"electron": {
|
||||
"version": "22.3.6",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-22.3.6.tgz",
|
||||
"integrity": "sha512-/1/DivFHH5AWa/uOuqpkeg12/jjicjkBU8kYv70oeqRFwXzoyuJhgwlzER4jZXnbGjF5Nxz9900oXq/QzAViAw==",
|
||||
"version": "22.3.10",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-22.3.10.tgz",
|
||||
"integrity": "sha512-gh7PtSh+rfxHfM4dzPiEO+k1NRo07FvaK/jXG3HzuODrpTTEhC9rsE+AJGrTKQU6Nz7GorseMvnvs8PnUQPPTw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@electron/get": "^2.0.0",
|
||||
|
||||
Reference in New Issue
Block a user