Files
OSIT-AE-App-Native-Electron/app/index.html
2022-10-14 17:22:14 -04:00

275 lines
14 KiB
HTML

<!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" />
<!-- One Sky IT default custom Cascading Style Sheets (CSS) -->
<!-- One Sky IT site custom Cascading Style Sheets (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/svelte/build/aether_elements.css"> -->
<link rel="stylesheet" href="http://demo.oneskyit.local:5000/static/svelte/build/aether_elements.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 rel="stylesheet" href="https://lci.oneskyit.com/static/svelte/build/aether_layout_v5_root.css"> -->
<link rel="stylesheet" href="http://demo.oneskyit.local:5000/static/svelte/build/aether_layout_v5_root.css">
<!-- <link rel="stylesheet" href="https://lci.oneskyit.com/static/svelte/build/aether_layout_v5_system.css"> -->
<link rel="stylesheet" href="http://demo.oneskyit.local:5000/static/svelte/build/aether_layout_v5_system.css">
<!-- <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="http://demo.oneskyit.local:5000/static/svelte/build/event.css" rel="stylesheet">
<link href="http://demo.oneskyit.local:5000/static/svelte/build/event_launcher.css" rel="stylesheet">
<link rel="stylesheet" href="css/aether_app_native_v3.css">
<style>
</style>
<!-- Cascading Style Sheets (CSS) end -->
<!-- JavaScript (JS) start -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/1.1.2/axios.min.js" integrity="sha512-bHeT+z+n8rh9CKrSrbyfbINxu7gsBmSHlDCb3gUF1BjmjDzKhoKspyB71k0CIRBSjE5IVQiMMVBgCWjF60qsvA==" 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>
<!-- <script src="https://static.oneskyit.com/js/utilities.js"></script> -->
<!-- <script src="js/app_idb.js"></script> -->
<script>
const native_app = require('./js/aether_app_native_v4');
let native_app_config = native_app.load_config();
console.log('Native App Config:', native_app_config);
// 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": 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
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
let page = {}
page['page_for'] = { '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['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": 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"};
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};
// 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 = native_app_config.event_id;
// let event_device_id = native_app_config.event_device_id;
// let event_location_id = native_app_config.event_location_id;
// const local_file_cache_path = native_app_config.local_file_cache_path; // 'file_cache/'
// console.log(local_file_cache_path);
// const host_file_temp_path = native_app_config.host_file_temp_path; // 'temp/'
// console.log(host_file_temp_path);
// let idb_name = native_app_config.idb_name;
// BEGIN: API section
// const access_control_allow_origin = native_app_config.access_control_allow_origin;
// const api_secret_key = native_app_config.api_secret_key;
// console.log(api_secret_key);
// let api_temporary_token = null;
// let api_base_url = native_app_config.api_base_url; // null;
// let api_base_url_bak = native_app_config.api_base_url_bak;
// let app_server_base_url = native_app_config.app_server_base_url;
// let file_base_url = native_app_config.file_server_base_url;
// if (native_app_config.use_local_api) {
// api_base_url = native_app_config.api_local_base_url; // 'http://api.localhost:5001'
// } else {
// api_base_url = native_app_config.api_remote_base_url; // 'https://api.oneskyit.com'
// }
/* ***** **** *** ** * ### * ** *** **** ***** */
let app_online = false;
//let app_use_cached_data = true;
window.addEventListener('online', native_app.currently_online);
window.addEventListener('offline', native_app.currently_offline);
/* ***** **** *** ** * ### * ** *** **** ***** */
</script>
<!-- <script defer src="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>
<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 -->
<!-- One Sky IT default custom JavaScript (JS) -->
<!-- One Sky IT site custom JavaScript (JS) -->
<!-- <script>const app = require('./js/app_v3');</script> -->
<!-- <script src="js/app_v3.js"></script> -->
<script>
/* ***** **** *** ** * ### * ** *** **** ***** */
// BEGIN: Load IDB section
// let idb_name = native_app_config.idb_name;
// let tbl_event = null;
// let tbl_event_location = null;
// let tbl_event_session = null;
// let tbl_event_presentation = null;
// let tbl_event_presenter = null;
// let tbl_event_file = null;
// let tbl_hosted_file = null;
// let tbl_event_key_count = null;
// let tbl_event_location_key_count = null;
// let tbl_event_session_key_count = null;
// let tbl_event_presentation_key_count = null;
// let tbl_event_presenter_key_count = null;
// let tbl_event_file_key_count = null;
// let tbl_hosted_file_key_count = null;
// let load_idb_tables_result = load_idb_tables()
// .then(async function (result) {
// console.log('IDB tables have been opened');
// idb_tables_opened = load_idb_tables_result;
// console.log('Attempting to use cached IDB data...');
// if (tbl_event_key_count
// && tbl_event_location_key_count
// && tbl_event_session_key_count
// && tbl_event_presentation_key_count
// && tbl_event_presenter_key_count
// && tbl_event_file_key_count) {
// console.log('********* Not yet sure how this works... ');
// } else {
// console.log('One or more of the IDB tables has 0 records. The IDB probably needs to be updated.');
// return true;
// }
// console.log(tbl_event);
// console.log(tbl_event_location);
// console.log(tbl_event_session);
// console.log(tbl_event_presentation);
// console.log(tbl_event_presenter);
// console.log(tbl_event_file);
// console.log(tbl_hosted_file);
// })
// .catch(function (error) {
// console.log('Something went wrong opening the IDB tables.');
// console.log(error);
// return false;
// });
/* ***** **** *** ** * ### * ** *** **** ***** */
</script>
</html>