Most things are working in the template now.

This commit is contained in:
Scott Idem
2024-02-15 11:55:42 -05:00
parent 17d99d080c
commit 19f9983c9a
8 changed files with 1770 additions and 119 deletions

68
src/lib/ae_stores.ts Normal file
View File

@@ -0,0 +1,68 @@
import { readable, writable } from 'svelte/store';
type key_val = {
[key: string]: any; // variable key
// name: string;
};
// *** BEGIN *** Longer-term app data. This should be stored to local storage.
export let ae_app_local_data_struct: key_val = {
'ver': '0.0.1',
'name': 'Aether App Template',
'theme': 'light',
'account_id': '_XY7DXtc9MY', // OSIT Demo _XY7DXtc9MY
'site_domain': 'https://dev-demo.oneskyit.com',
'ds': {},
'hub': {
'ds': {},
},
}
console.log(`Aether Config - App Local Storage Data:`, ae_app_local_data_struct);
export let ae_loc = writable(ae_app_local_data_struct);
// *** BEGIN *** Temporary app data. This should be stored to session storage.
export let ae_app_session_data_struct: key_val = {
'ver': '0.0.1',
// 'name': 'Aether App Template',
// 'theme': 'light',
'account_id': ae_app_local_data_struct.account_id,
// 'obj': {},
}
console.log(`Aether Config - App Session Storage Data:`, ae_app_session_data_struct);
export let ae_sess = writable(ae_app_session_data_struct);
// *** BEGIN *** Temporary API data. This should be stored to session storage.
export let ae_api_data_struct: key_val = {
'ver': '0.0.2',
'base_url': 'https://dev-api.oneskyit.com',
'base_url_bak': 'https://dev-api.oneskyit.com',
'api_secret_key': 'dFP6J9DVj9hUgIMn-fNIqg', // 'YOUR_API_SECRET_KEY',
'api_secret_key_bak': 'dFP6J9DVj9hUgIMn-fNIqg', // 'YOUR_API_SECRET_KEY',
'api_crud_super_key': 'zp5PtX4zUsI', // 'YOUR_SUPER_KEY' 'zp5PtX4zUsI'
'headers': {},
'account_id': ae_app_local_data_struct.account_id,
}
let ae_api_headers: key_val = {};
ae_api_headers['Access-Control-Allow-Origin'] = '*';
ae_api_headers['content-type'] = 'application/json';
ae_api_headers['x-aether-api-key'] = ae_api_data_struct.api_secret_key;
ae_api_headers['x-aether-api-token'] = 'fake-temp-token';
ae_api_headers['x-aether-api-expire-on'] = '';
ae_api_headers['x-account-id'] = ae_app_local_data_struct.account_id;
ae_api_data_struct['headers'] = ae_api_headers;
console.log(`Aether Config - API Data:`, ae_api_data_struct);
export let ae_api = writable(ae_api_data_struct);
/* *** BEGIN *** Initialize slct_trigger and slct variables */
// Updated 2024-02-15
export let slct_trigger: any = writable(null);
console.log(`Aether Config - Selected Trigger:`, slct_trigger);
let slct_obj_template: key_val = { 'sponsorship_id': null, 'sponsorship_obj': {}, 'post_id': null, 'post_obj': {}, 'post_obj_li': [], 'post_comment_id': null, 'post_comment_obj': {}, 'post_comment_obj_li': [] };
console.log(`Aether Config - Selected Objects:`, slct_obj_template);
export let slct = writable(slct_obj_template);

1380
src/lib/api.js Normal file

File diff suppressed because it is too large Load Diff