Files
OSIT-AE-App-Native-Electron/app/index.html
2022-04-16 18:02:25 -04:00

210 lines
8.9 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="http://dev.oneskyit.local:5000/static/css/aether_variables.css">
<link rel="stylesheet" href="http://dev.oneskyit.local:5000/static/svelte/build/aether_utilities.css">
<link rel="stylesheet" href="http://dev.oneskyit.local:5000/static/css/aether_system.css">
<!-- <link rel="stylesheet" href="svelte/build/aether_layout.css"> -->
<!-- <link rel="stylesheet" href="css/aether_layout_flow.css"> -->
<!-- <link rel="stylesheet" href="css/aether_layout_grid.css"> -->
<link rel="stylesheet" href="http://dev.oneskyit.local:5000/static/svelte/build/aether_modules_core.css">
<!-- <link rel="stylesheet" href="http://dev.oneskyit.local:5000/static/svelte/build/aether_modules_other.css"> -->
<link href="http://dev.oneskyit.local:5000/static/svelte/build/bundle.css" rel="stylesheet">
<link href="http://dev.oneskyit.local:5000/static/svelte/build/reloading.css" rel="stylesheet">
<link href="http://dev.oneskyit.local:5000/static/css/base_style_grid_layout_v3.css" rel="stylesheet">
<link href="http://dev.oneskyit.local:5000/static/css/base_style_grid_theme_v3.css" rel="stylesheet">
<link href="http://dev.oneskyit.local:5000/static/svelte/build/event_launcher.css" rel="stylesheet">
<link rel="stylesheet" href="css/aether_native_app_v3.css">
<style>
</style>
<!-- Cascading Style Sheets (CSS) end -->
<!-- JavaScript (JS) start -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.22.0/axios.min.js" integrity="sha512-m2ssMAtdCEYGWXQ8hXVG4Q39uKYtbfaJL5QMTbhl2kc6vYyubrKHhr6aLLXW4ITeXSywQLn1AhsAaqrJl8Acfg==" 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 app = require('./js/aether_native_app_v3');
let app_config = app.load_config();
console.log(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 = 'app'; // null, 'default', 'onsite', 'app'
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);
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/'
// console.log(host_file_temp_path);
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;
let api_base_url = null;
if (app_config.use_local_api) {
api_base_url = app_config.api_local_base_url; // 'http://api.localhost:5001'
} else {
api_base_url = app_config.api_remote_base_url; // 'https://api.oneskyit.com'
}
/* ***** **** *** ** * ### * ** *** **** ***** */
let app_online = false;
//let app_use_cached_data = true;
window.addEventListener('online', app.currently_online);
window.addEventListener('offline', app.currently_offline);
/* ***** **** *** ** * ### * ** *** **** ***** */
</script>
<!-- <script defer src="svelte/build/bundle.js" crossorigin></script> -->
<script defer src="http://dev.oneskyit.local:5000/static/svelte/build/bundle.js" crossorigin></script>
<!-- JavaScript (JS) end -->
</head>
<body class="body_container">
<section id="System-Nav-Menu">Site-Nav-Menu</section>
<section id="Site-Header">Site-Header</section>
<section id="Site-Nav-Menu">Site-Nav-Menu</section>
<section id="System-Notifications">System-Notifications (and Site-Notifications)</section><!-- and what would be Site-Notifications-->
<section id="Main-Body" class="main_template_content svelte_target event_launcher_main">
</section>
<section id="Site-Footer">Site-Footer</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 = 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>