From 74cace3b967c4c088071e205e41f9edc3d628bbc Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Tue, 29 Mar 2022 19:52:35 -0400 Subject: [PATCH] A lot of clean up! --- app/css/aether_modules_core.css | 114 --- app/css/aether_modules_other.css | 150 ---- app/css/aether_native_app_v3.css | 28 + app/css/aether_system.css | 309 ------- app/css/aether_utilities.css | 778 ------------------ app/css/aether_variables.css | 446 ---------- app/css/base_style_event_launcher.css | 774 ----------------- app/css/base_style_grid_event_launcher.css | 555 ------------- app/css/event_launcher.css | 292 ------- app/css/native_app.css | 151 ---- app/index.html | 163 ++-- app/js/{app_v3.js => aether_native_app_v3.js} | 0 app/js/app_api.js | 441 ---------- app/js/app_idb.js | 59 -- app/js/app_ui_files.js | 228 ----- app/js/app_ui_misc.js | 180 ---- app/js/app_ui_presentations.js | 215 ----- app/js/app_ui_presenters.js | 219 ----- app/js/app_ui_sessions.js | 265 ------ app/js/del app_helper.js | 1 - app/js/hold api.js | 589 ------------- app/js/hold launcher.js | 142 ---- app/js/hold testing.js | 50 -- app/js/module_app.js | 160 ---- app/js/module_app_ui.js | 302 ------- module_helper.js.bak | 63 -- 26 files changed, 93 insertions(+), 6581 deletions(-) delete mode 100644 app/css/aether_modules_core.css delete mode 100644 app/css/aether_modules_other.css create mode 100644 app/css/aether_native_app_v3.css delete mode 100644 app/css/aether_system.css delete mode 100644 app/css/aether_utilities.css delete mode 100644 app/css/aether_variables.css delete mode 100644 app/css/base_style_event_launcher.css delete mode 100644 app/css/base_style_grid_event_launcher.css delete mode 100644 app/css/event_launcher.css delete mode 100644 app/css/native_app.css rename app/js/{app_v3.js => aether_native_app_v3.js} (100%) delete mode 100644 app/js/app_api.js delete mode 100644 app/js/app_idb.js delete mode 100644 app/js/app_ui_files.js delete mode 100644 app/js/app_ui_misc.js delete mode 100644 app/js/app_ui_presentations.js delete mode 100644 app/js/app_ui_presenters.js delete mode 100644 app/js/app_ui_sessions.js delete mode 100644 app/js/del app_helper.js delete mode 100644 app/js/hold api.js delete mode 100644 app/js/hold launcher.js delete mode 100644 app/js/hold testing.js delete mode 100644 app/js/module_app.js delete mode 100644 app/js/module_app_ui.js delete mode 100644 module_helper.js.bak diff --git a/app/css/aether_modules_core.css b/app/css/aether_modules_core.css deleted file mode 100644 index 479b8ad..0000000 --- a/app/css/aether_modules_core.css +++ /dev/null @@ -1,114 +0,0 @@ -/* Aether Modules: Core */ - -.mod__order_cart .obj__order_cart_line.purp__li_item.prop__message .purp__label { - font-size: smaller; -} - -.mod__order_cart .obj__order_cart_line.purp__li_item.prop__message .purp__value { - font-size: smaller; - font-style: italic; -} - -.mod__order .obj__order_line.purp__li_item.prop__message .purp__label { - font-size: smaller; -} - -.mod__order .obj__order_line.purp__li_item.prop__message .purp__value { - font-size: smaller; - font-style: italic; -} -/* *** END *** System Objects *** All Objects *** */ - - - -/* Svelte QR code element */ -.qr_scanner { - /* outline: solid thin pink; */ - - display: flex; - flex-direction: column; - /* flex-wrap: wrap; */ - - justify-content: flex-start; - align-items: center; /* center */ - align-content: stretch; - - /* flex-grow: 1; - * flex-shrink: 1; - * flex-basis: 50%; */ - - /* min-width: 100%; - * width: 100%; - * max-width: 100%; */ -} - -.qr_reader { - min-width: 400px; - /* width: 100%; */ - max-width: 100%; - /* outline: solid thin red; */ -} - -.qr_scanner .not_scanning { - /*background: gray;*/ -} - -.qr_scanner .scanning { - background: lightgreen; -} - -.container.qr_scan_result { - display: flex; - flex-direction: column; - /* flex-wrap: wrap; */ - - justify-content: flex-start; - align-items: flex-start; - align-content: stretch; -} - -img.qr_code { - outline: solid thin orange; - width: 1.50in; -} - -img.qr_code:hover { - outline: solid thin green; - width: 2.50in; -} - -img.qr_code:focus { - outline: solid thin red; - width: 2.50in; -} - -@media (max-width: 575px) { - .qr_reader { - min-width: 95vw; - width: 100%; - max-width: 100%; - } -} - -@media (max-width: 767px) { - .qr_reader { - min-width: 90vw; - width: 100%; - max-width: 100%; - } -} - -@media print { - img.qr_code { - outline: none; - } -} - -/* Svelte QR code scanner test page */ -.qr_scanner_main .options { - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; /* center */ - align-content: stretch; -} diff --git a/app/css/aether_modules_other.css b/app/css/aether_modules_other.css deleted file mode 100644 index 5e4c775..0000000 --- a/app/css/aether_modules_other.css +++ /dev/null @@ -1,150 +0,0 @@ -/* Aether Modules: Other */ - -/* *** BEGIN *** System Modules *** Event *** */ -/* *** BEGIN *** System Modules *** Event: Meeting *** */ -/* Event: Meeting */ -.meeting_view { - background: pink; - border: dashed thin deeppink; - height: 5rem; - overflow: hidden; -} - -.meeting_view:hover { - height: 100%; -} - -.meetings_overview { - font-size: smaller; -} -/* *** END *** System Modules *** Event: Meeting *** */ - -/* *** BEGIN *** Other Modules *** Event: Badge search *** */ -.event_badge_main .event_badge_options { - display: flex; - flex-direction: column; - justify-content: flex-start; - align-items: center; - align-content: center; -} - -.event_badge.search_and_results { - display: flex; - flex-direction: column; - /* flex-wrap: wrap; */ - - justify-content: flex-start; - align-items: stretch; - align-content: stretch; - - /* max-width: 100vw; */ -} - -.event_badge .search_options { - display: flex; - flex-direction: row; - flex-wrap: wrap; - - justify-content: stretch; /* space-evenly stretch */ - align-items: flex-start; - align-content: stretch; -} - -.event_badge .search_results { - -} - -.event_badge .qr_scanner_form { - flex-grow: 1; - flex-shrink: 1; - flex-basis: 45%; -} -.event_badge .search_form { - /*outline: solid thin red;*/ - - flex-grow: 1; - flex-shrink: 1; - flex-basis: 45%; -} - -.event_badge .search_form legend { - text-align: center; -} - -.event_badge .search_fields { - display: flex; - flex-direction: row; - flex-wrap: wrap; - - justify-content: space-evenly; - align-items: stretch; - align-content: stretch; -} -/* *** END *** Other Modules *** Event: Badge search *** */ - -/* *** BEGIN *** Other Modules *** Event: Badge view *** */ -.event_badge_wrapper { - /* outline: solid thin pink; */ -} - -.event_badge_options { - /*position: fixed; - top: 1rem; - left: 1rem; - margin: 3rem;*/ -} -/* *** END *** Other Modules *** Event: Badge view *** */ - -/* x-Small devices (portrait phones, less than 576px) */ -@media (max-width: 575px) { - -} - -/* Small devices (landscape phones, less than 768px) */ -@media (max-width: 767px) { - .event_badge .search_results { - font-size: smaller; - } -} - -/* *** END *** System Modules *** Event *** */ - - - -/* Aether System Objects Styles */ - -/* *** BEGIN *** System Objects *** All Objects *** */ -.mod__event_registration .purp__obj_li header { - border-bottom: solid medium hsl(var(--hue-default),var(--saturation-least),var(--lum-light)); -} - -.mod__event_registration .purp__view.obj__product { - margin: 1rem 0rem; - padding: 1rem 0rem; - /*border-top: solid thin hsl(var(--hue-default),var(--saturation-least),var(--lum-darkest));*/ - border-bottom: solid thin hsl(var(--hue-default),var(--saturation-least),var(--lum-light)); -} - - -.mod__fundraising .purp__obj_li header { - border-bottom: solid medium hsl(var(--hue-default),var(--saturation-least),var(--lum-light)); -} - -.mod__fundraising .purp__view.obj__product { - margin: 1rem 0rem; - padding: 1rem 0rem; - /*border-top: solid thin hsl(var(--hue-default),var(--saturation-least),var(--lum-darkest));*/ - border-bottom: solid thin hsl(var(--hue-default),var(--saturation-least),var(--lum-light)); -} - -.mod__membership .purp__obj_li header { - border-bottom: solid medium hsl(var(--hue-default),var(--saturation-least),var(--lum-light)); -} - -.mod__membership .purp__view.obj__product { - margin: 1rem 0rem; - padding: 1rem 0rem; - /*border-top: solid thin hsl(var(--hue-default),var(--saturation-least),var(--lum-darkest));*/ - border-bottom: solid thin hsl(var(--hue-default),var(--saturation-least),var(--lum-light)); -} - diff --git a/app/css/aether_native_app_v3.css b/app/css/aether_native_app_v3.css new file mode 100644 index 0000000..d8aff7e --- /dev/null +++ b/app/css/aether_native_app_v3.css @@ -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%; +} \ No newline at end of file diff --git a/app/css/aether_system.css b/app/css/aether_system.css deleted file mode 100644 index 22864e0..0000000 --- a/app/css/aether_system.css +++ /dev/null @@ -1,309 +0,0 @@ -/* System: Anything that is related to core system functions and should not be changed per client or per user. */ - -/* *** BEGIN *** System *** General *** */ -html { - /* Parent Layout */ - /* Box Model */ - /* Positioning */ - /* Display */ -} - -body { - /* Parent Layout */ - /* Box Model */ - /* Positioning */ - /* Display */ - /* Center and scale the image nicely */ - background-color: steelblue; - background-image: url('../static/images/site_background.svg'); - background-position: center; - background-repeat: no-repeat; - background-attachment: fixed; - background-size: cover; -} - -nav { -} - -pre { - white-space: pre-wrap; - word-break: keep-all; -} - -a { - color: var(--color-d5); -} -a:hover { - color: var(--color-d2); -} - -label { - color: #824240; /*#880000*/ /* Dark red for labels */ - color: var(--info-color-darkest); -} - -fieldset { - /*border: solid thin #eee;*/ - /*border-top: solid thin #eee;*/ - /*border-bottom: solid thin #eee;*/ -} - -input:required, select:required { - /*background-color: red;*/ - background-color: var(--danger-color-lighter); - border-color: var(--danger-color-mid); - /*border-bottom: dashed medium; - * border-bottom: dashed thin;*/ -} - -input:required:valid { - /*color: red;*/ - /*border: solid thin green;*/ -} - -input:required:invalid { - /*color: red;*/ - /*border: solid thin red;*/ -} -/* *** END *** System *** General *** */ - - -/* *** BEGIN *** Global *** Font Family, Size, and Weight *** */ -pre, code, kbd, samp, var { - font-family: 'Roboto Mono', 'Noto Sans Mono', 'Courier New', - monospace; -} -.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 { - font-weight: 500; /* 700 looks too heavy */ -} - -.h1, h1 { - font-size: 1.75rem; -} -.h2, h2 { - font-size: 1.5rem; -} -.h3, h3 { - font-size: 1.4rem; -} -/* *** END *** Global *** Set Font Family *** */ - - -/* *** BEGIN *** Global *** Permission Checks and Roles *** */ -section.administrator_check { - /*color: var(--warning-fg-color);*/ - /*background-color: var(--warning-bg-color);*/ - /*background-image: linear-gradient(to right, rgba(207,179,60,.5) 0%, rgba(207,179,60,.25) 5%, rgba(207,179,60,.25) 95%, rgba(207,179,60,.5) 100%);*/ - border-color: var(--warning-border-color); - box-shadow: 0rem 0rem .5rem 0rem var(--warning-bg-color); -} - -section.manager_check { - border-color: var(--danger-border-color); - box-shadow: 0rem 0rem .5rem 0rem var(--danger-bg-color); -} -/* *** END *** Global *** Permission Checks and Roles *** */ - - - - - - - - -.navbar { - /*color: var(--default-fg-color); - * background-color: var(--default-bg-color); - * border-color: var(--default-border-color);*/ -} - -.navbar-nav { - /*color: var(--default-fg-color); - * background-color: none;*/ - /*background-color: var(--default-bg-color); - * border-color: var(--default-border-color);*/ -} - -.nav-item { - color: var(--default-fg-color); - /*background-color: var(--default-bg-color); - * border-color: var(--default-border-color);*/ -} - -.nav-link { - /*color: var(--default-fg-color);*/ - /*background-color: var(--default-bg-color); - * border-color: var(--default-border-color);*/ -} - -.nav-pills .nav-link.active { - color: var(--default-fg-color); - background-color: var(--default-bg-color); - border-color: var(--default-border-color); -} - - -/* *** BEGIN *** Global *** Group List Menu *** */ -/* Works together with toggle_group_list_item({element_id:'the_id_to_show', class_name:'name_of_group'}) */ -.group_list_item { - display: none; -} - -.group_list_item_show { -} - -.group_list_menu { - position: sticky; - top: 1rem; - right: 1rem; - float: right; - - width: 15rem; - - background-color: hsla(0, 0%, 100%, .8); - - z-index: 99; - border: solid thin hsla(0, 0%, 75%, .8); - - padding: .5rem 0rem; -} - -.group_list_menu ul { - list-style: none; - margin: 0; - padding: 0; -} - -.group_list_menu button { - margin: .1rem 0; - padding: .1rem; - - border: solid thin hsla(0, 0%, 75%, .2); - background-color: unset; - width: 100%; - - font-weight: bold; - - /* border-radius: .4rem; */ -} - -.group_list_menu button:hover { - border: solid thin hsla(0, 0%, 60%, 1); - background-color: hsla(0, 0%, 75%, 1); -} -/* *** END *** Global *** Group List Menu *** */ - - - - -.form-floating>.form-control:focus~label, .form-floating>.form-control:not(:placeholder-shown)~label, .form-floating>.form-select~label { - opacity: .85; - transform: scale(.85) translateY(-.5rem) translateX(.15rem); -} - -/* .btn-link /*, .page-link, .page-item, .paginate_button, .active, .page-item.active*/ { */ - color: var(--link-fg-color); - background-color: var(--link-bg-color); -} - - -/* This is for the datatables. */ -.page-item.active .page-link { - color: var(--link-fg-color); - background-color: var(--link-bg-color); -} - -/* *** END *** Global *** Navigation, Links, and Buttons *** */ - - - -.page_help { - float: right; -} - -.page_links { - float: right; -} - - -.results_message { - font-size: 1.6em; - background-color: yellow; -} - -.results_table td { - background-color: lightyellow; -} - - - - -.obj { - position: relative; -} - -.obj_edit_abs { - /*border: solid thin pink;*/ - position: absolute; - top: 0rem; - right: 0rem; - margin: .1rem .8rem; - padding: .2rem; - color: orange; -} - -.obj_edit_abs:hover { - border: solid thin gray; - border-radius: .25em; - position: absolute; - top: 0em; - right: 0; - margin: .1rem .8rem; - padding: .2rem; - background: rgba(255,255,255,.8); - color: orange; - font-size: 1.3rem; -} - -.obj_edit_abs:hover::after { - content: "edit"; -} - - -#edit_object_field_value { - position: fixed; - top: 0; - right: 0; - background: white; - border: solid thin black; - margin: .25rem; - padding: .5rem; - opacity: .5; -} - - - -/* *** BEGIN *** Global *** Svelte specific that needs to be merged in *** */ -.svelte_target section.obj { - margin: 1rem 0rem; - padding: .5rem .5rem; - /* border: solid thin hsla(0,0%,90%,1); */ -} - -.svelte_target .input_container { - margin: .25rem 0rem; -} - -.svelte_target label { - font-weight: bold; -} - -.svelte_target .label_select_value { - font-size: smaller; - color: hsla(0,0%,50%,1); -} - -.svelte_target .obj_type_main { - border: solid thin hsla(0,0%,90%,1); -} -/* *** BEGIN *** Global *** Svelte specific that needs to be merged in *** */ diff --git a/app/css/aether_utilities.css b/app/css/aether_utilities.css deleted file mode 100644 index 0937b60..0000000 --- a/app/css/aether_utilities.css +++ /dev/null @@ -1,778 +0,0 @@ -/* Aether Utility Styles */ - -/* *** BEGIN *** Utility *** Hide or Visually Elements *** */ -.d_none { - display: none; -} - -.visually_hidden { - clip: rect(0 0 0 0); - clip-path: inset(50%); - height: 1px; - overflow: hidden; - position: absolute; - white-space: nowrap; - width: 1px; -} - -.visually_hidden:not(:focus):not(:active) { - /* ... */ -} -/* *** END *** Utility *** Hide Elements *** */ - - -.bold { - font-weight: bold; -} - -.fs_smaller, .fs-smaller { - font-size: smaller; -} -.fs_larger, .fs-larger { - font-size: larger; -} - -.debug { - background: pink; - border: dashed thin deeppink; - height: 1.75rem; - overflow: hidden; -} - -.debug:hover { - height: 100%; -} - -.highlight { - background: yellow; -} - -.alert { - background: pink; -} - -.warning { - color: var(--warning-color-lighter); - background-color: var(--warning-color-dark); - border-color: var(--warning-color-darker); -} - -.danger { - color: var(--danger-color-lighter); - background-color: var(--danger-color-dark); - border-color: var(--danger-color-darker); -} - -.error { - color: var(--danger-color-lighter); - background-color: var(--danger-color-dark); - border-color: var(--danger-color-darker); -} - -.strike { - color: var(--danger-color-lighter); - background-color: var(--danger-color-dark); - text-decoration: line-through; -} - -.attention_glow { - text-shadow: 0 0 .25rem rgba(100,0,0,1), 0 0 1rem rgba(200,0,0,1), 0 0 2rem rgba(255,0,0,1); -} - -.attention_glow_pulse { - animation-name: text_glowing_blue; - animation-duration: 3.5s; - animation-iteration-count: infinite; - animation-direction: alternate; -} - - -@keyframes text_glowing_red { - from { - text-shadow: 0 0 .25rem transparent, 0 0 1rem transparent, 0 0 2rem transparent; - } - to { - text-shadow: 0 0 .25rem hsla(var(--hue-red), var(--saturation-most), var(--lum-mid),1), 0 0 1rem rgba(200,0,0,1), 0 0 2rem rgba(255,0,0,1); - } -} - -@keyframes text_glowing_blue { - from { - text-shadow: 0 0 .25rem transparent, 0 0 1rem transparent, 0 0 2rem transparent; - } - to { - text-shadow: 0 0 .25rem hsla(var(--hue-blue), var(--saturation-most), var(--lum-mid),1), 0 0 1.5rem hsla(var(--hue-blue), var(--saturation-most), var(--lum-lighter),1); - } -} - -/* *** BEGIN *** Utility *** Countdown Timer *** */ -.countdown_banner { - width: 100%; - /*background-color: rgb(70, 130, 180);*/ /* SteelBlue #4682B4 rgb(70, 130, 180)*/ - background-color: rgba(70, 130, 180,.1); - /*background-image: rgba(70, 130, 180,.1);*/ - - /*text-shadow: 0 0 15px rgba(14, 27, 37,1), 0 0 30px rgba(43, 80, 110,1);*/ - - text-align: center; - font-size: 1.5rem; - - /*animation-name: countdown_animation; - * animation-delay: 2s; - * animation-duration: 5s; - * animation-iteration-count: infinite; - * animation-direction: alternate;*/ -} - -.countdown_number { - font-size: 2.5rem; -} - -@keyframes countdown_animation { - from { - background-color: rgba(70, 130, 180,.1); - /*background: radial-gradient(circle, rgba(218,26,50,.2) 0%, rgba(218,26,50,.2) 50%, rgba(255,255,255,0) 80%);*/ - } - - to { - /*background-color: rgba(218,26,50,.6);*/ - background: rgba(70, 130, 180,.5); - /*background: radial-gradient(circle, rgba(218,26,50,.4) 0%, rgba(218,26,50,.4) 50%, rgba(255,255,255,0) 80%);*/ - } -} -/* *** END *** Utility *** Countdown Timer *** */ - - -/* *** BEGIN *** Utility *** Forms Related *** */ -.append_colon::after { - content: ':'; -} - -.input_required::after { - /*content: '*'; - * color: var(--warning-color-darker);*/ - - /*position: relative; - * top: 5px; - * left: 5px;*/ -} -.input_required::before { - /*content: '*'; - * color: var(--warning-color-darker);*/ - - /*display: block; - * content: 'b*'; - * background-color: yellow; - * color: red; - * font-weight: bold; - * top: 5px; - * left: 5px;*/ -} - -/* *** END *** Utility *** Forms Related *** */ - - -/* *** BEGIN *** Utility *** Tables Related *** */ -/* *** BEGIN *** Utility *** All Tables *** */ -thead>tr { - background-color: #e6e6e6; /* efefef e6e6e6 d9d9d9 */ -} -/* *** END *** Utility *** All Tables *** */ - - -/* *** BEGIN *** Utility *** Table Borders *** */ -table.table_borders { - border: solid thin hsla(0, 0%, 50%, 1); - border-collapse: collapse; - - /*max-width: 100%;*/ -} -table.table_borders th, td { - border: solid thin hsla(0, 0%, 75%, 1); - border-collapse: collapse; - /* margin: 0; */ - -} -/* *** END *** Utility *** Table Borders *** */ - - -/* *** BEGIN *** Utility *** Table Alternating Rows (even/odd) *** */ -table.table_alt_rows tr:nth-child(even) { - background-color: hsla(0, 0%, 95%, 1); -} -table.table_alt_rows tr:nth-child(odd) { - background-color: hsla(0, 0%, 85%, 1); -} -/* *** END *** Utility *** Table Alternating Rows (even/odd) *** */ - - - -/* *** BEGIN *** Utilities *** Modal Container *** */ -.modal_container { - /* outline: solid thin green; */ - - /* display: none; */ - position: fixed; - - top: 0; - bottom: 0; - left: 0; - right: 0; - - - margin: 0; - padding: 3.5rem 0rem; - - /* object-fit: contain; */ - /* height: 100vh; - * m ax-height: 100vh; */ * * - * - * height: 100%; - * max-height: 100%; - * width: 100%; - * max-width: 100%; - * - * /* height: 100vh; - * m ax-height: 100vh; * * - * width: 100vw; - * max-width: 100vw; */ - - /* display: flex; */ - flex-direction: column; - /* justify-content: center; - * a lign-items: center; * * - * align-content: center; */ - - display: flex; - align-items: center; - justify-content: center; - - z-index: 1041; - background-color: hsla(0, 0%, 50%, .9); -} - -.modal_content { - /* outline: dashed thin pink; */ - - /* margin: auto; */ - padding: 0; - - /* border: solid .2rem hsla(0, 0%, 50%, .9); */ - border-radius: 1rem; - box-shadow: .5rem .5rem 1.5rem .5rem hsla(0, 0%, 0%, 1); - - background: #eee; - - width: 100vw; - - max-width: calc(1024px - 2rem); - max-height: calc(100% - 2rem); - - /* text-align: center; */ - - flex-grow: 1; - - display: flex; - flex-direction: column; - justify-content: space-between; - align-items: stretch; - align-content: center; -} - -.modal_header, .modal_footer { - /*outline: solid thin orange;*/ - - flex-grow: 0; - flex-shrink: 1; - - /* width: 100%; - * max-width: 100%; */ - - margin: 0; - padding: 0; - - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center; - align-content: center; -} - -.modal_header_begin, .modal_footer_begin { - margin: .5rem; -} - -.modal_header_end, .modal_footer_end { - margin: .5rem; -} - -.modal_header { - /* outline: solid thin red; */ - /* border-bottom: solid thin hsla(0, 0%, 50%, .5); */ - background-image: linear-gradient(to top, hsla(205,78%,80%,.9) 0%, hsla(205,78%,80%,.1) .2rem, hsla(205,78%,80%,.1) 100%); -} -.modal_body { - /* outline: solid thin green; */ - - flex-grow: 1; - flex-shrink: 1; - - max-width: 100%; - - margin: .5rem; - padding: .5rem .1rem; - - /* display: flex; - * f lex-direction: column; */ * * - * /* justify-content: ; */ - /* align-items: stretch; */ - /* align-content: center; */ - - object-fit: contain; - overflow: auto; -} - -.modal_footer { - /* outline: solid thin orange; */ - /* border-top: solid thin hsla(0, 0%, 50%, .5); */ - background-image: linear-gradient(to bottom, hsla(205,78%,80%,.9) 0%, hsla(205,78%,80%,.1) .2rem, hsla(205,78%,80%,.1) 100%); -} - -.modal_close { - padding: .25rem .5rem; - - font-size: 1.2rem; - /* font-weight: lighter; */ - - background-color: hsla(0, 0%, 90%, 1); - - border: solid thin hsla(0, 0%, 70%, 1); - border-radius: .5rem; - box-shadow: .1rem .1rem .2rem .1rem hsla(0, 0%, 0%, 1); - - color: hsla(0, 0%, 30%, 1); -} -.modal_close:hover { - /* font-weight: bold; */ - background-color: hsla(0, 0%, 80%, 1); - - border: solid thin hsla(0, 0%, 60%, 1); - border-radius: .5rem; - box-shadow: .1rem .1rem .2rem .1rem hsla(0, 0%, 50%, 1); - - color: hsla(0, 0%, 10%, 1); -} - -.modal_title { - /*float: left;*/ - font-size: 1.4rem; - font-weight: bold; - display: inline; - - margin: 0; - padding: 0; -} -/* *** END *** Utilities *** Modal Container *** */ - - -/* *** BEGIN *** Utilities *** Badge *** */ -.badge { - color: var(--default-fg-color); - background-color: var(--default-bg-color); - border-color: var(--default-border-color); -} - - -/* *** BEGIN *** Utilities *** Bootstrap: Buttons, Background, Foreground *** */ - -/* *** BEGIN *** Utility *** Bootstrap Tables Striped *** */ -.table-striped>tbody>tr:nth-child(odd)>td { - /*background-color: white;*/ - /*color: black;*/ -} -.table-striped>tbody>tr:nth-child(even)>td { - /*background-color: #efefef;*/ - /*color: white;*/ -} -/* *** END *** Utility *** Bootstrap Tables Striped *** */ - -/* *** BEGIN *** Utility *** Bootstrap Forms *** */ -.form-horizontal { - background-color: white; - /*margin: .5em;*/ - padding: 1em .5em; -} -/* *** END *** Utility *** Bootstrap Forms *** */ - -a.btn, button.btn { - /* font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif; */ - - -webkit-appearance: button; - -moz-appearance: button; - appearance: button; - - text-decoration: none; - color: initial; - color: black; - background-color: hsl(0, 0%, 95%, 1); - /* background-color: -internal-light-dark(rgb(255, 255, 255), rgb(59, 59, 59)); */ - - border-width: thin; - border-style: outset; - border-color: hsla(0,0%,50%,1); - border-radius: .25em; - - font: inherit; - font-size: 1em; - font-weight: normal; - - line-height: normal; - - margin: .1em; - padding: .1em .2em; - - box-sizing: border-box; - - display: inline-block; - text-align: center; - vertical-align: middle; -} - -.button:hover { - background-color: hsl(0, 0%, 85%, 1); - cursor: pointer; -} - -.btn.btn_sm, .btn.btn-sm { - font-size: .8em; -} - -.btn.btn_lg, .btn.btn-lg { - font-size: 1.1em; -} - -.btn.btn-wrap-text { - white-space: normal; - word-wrap: normal; /* break-word */ - max-width: 50em; /* 55rem */ -} - - -/* ### default ### */ -.btn.bg-default { - color: var(--default-fg-color); - background-color: var(--default-bg-color) !important; - border-color: var(--default-border-color); -} -.btn.btn-default { - color: var(--default-fg-color); - background-color: var(--default-bg-color); - border-color: var(--default-border-color); -} -.btn.btn-default:hover { - color: var(--default-fg-color-highlight); - background-color: var(--default-bg-color-highlight); - border-color: var(--default-border-color-highlight); -} -.btn.btn-outline-default { - color: var(--default-fg-color); - background-color: var(--default-bg-color); - border-color: var(--default-border-color); -} -.btn.btn-outline-default:hover { - color: var(--default-fg-color-highlight); - background-color: var(--default-bg-color-highlight); - border-color: var(--default-border-color-highlight); -} - -/* ### light ### */ -.bg-light { - color: var(--default-color-lightest); - background-color: var(--default-color-mid) !important; - border-color: var(--default-color-dark); -} -.btn.btn-light { - color: var(--default-color-lightest); - background-color: var(--default-color-mid); - border-color: var(--default-color-dark); -} -.btn.btn-light:hover { - color: var(--default-color-lightest); - background-color: var(--default-color-darker); - border-color: var(--default-color-darkest); -} -.btn.btn-outline-light { - color: var(--default-color-darkest); - background-color: var(--default-color-lighter); - border-color: var(--default-color-darker); -} -.btn.btn-outline-light:hover { - color: var(--default-color-lightest); - background-color: var(--default-color-darker); - border-color: var(--default-color-darkest); -} - -/* ### dark ### */ -.bg-dark { - color: var(--default-color-darkest); - background-color: var(--default-color-mid) !important; - border-color: var(--default-color-light); -} -.btn.btn-dark { - color: var(--default-color-darkest); - background-color: var(--default-color-mid); - border-color: var(--default-color-light); -} -.btn.btn-dark:hover { - color: var(--default-color-darkest); - background-color: var(--default-color-lighter); - border-color: var(--default-color-lightest); -} -.btn.btn-outline-dark { - color: var(--default-color-darkest); - background-color: var(--default-color-lighter); - border-color: var(--default-color-lighter); -} -.btn.btn-outline-dark:hover { - color: var(--default-color-darkest); - background-color: var(--default-color-lighter); - border-color: var(--default-color-lightest); -} - -/* ### primary ### */ -.btn.bg-primary { - color: var(--primary-color-lightest); - background-color: var(--primary-color-mid) !important; - border-color: var(--primary-color-dark); -} -.btn.btn-primary { - color: var(--primary-color-lightest); - background-color: var(--primary-color-mid); - border-color: var(--primary-color-dark); -} -.btn.btn-primary:hover { - color: var(--primary-color-lightest); - background-color: var(--primary-color-darker); - border-color: var(--primary-color-darkest); -} -.btn.btn-outline-primary { - color: var(--primary-color-darkest); - background-color: var(--primary-color-lighter); - border-color: var(--primary-color-darker); -} -.btn.btn-outline-primary:hover { - color: var(--primary-color-lightest); - background-color: var(--primary-color-darker); - border-color: var(--primary-color-darkest); -} - -/* ### secondary ### */ -.bg-secondary { - color: var(--secondary-color-lightest); - background-color: var(--secondary-color-mid) !important; - border-color: var(--secondary-color-dark); -} -.btn.btn-secondary { - color: var(--secondary-color-lightest); - background-color: var(--secondary-color-mid); - border-color: var(--secondary-color-dark); -} -.btn.btn-secondary:hover { - color: var(--secondary-color-lightest); - background-color: var(--secondary-color-darker); - border-color: var(--secondary-color-darkest); -} -.btn.btn-outline-secondary { - color: var(--secondary-color-darkest); - background-color: var(--secondary-color-lighter); - border-color: var(--secondary-color-darker); -} -.btn.btn-outline-secondary:hover { - color: var(--secondary-color-lightest); - background-color: var(--secondary-color-darker); - border-color: var(--secondary-color-darkest); -} - -/* ### info ### */ -.bg-info { - color: var(--info-color-lightest); - background-color: var(--info-color-mid) !important; - border-color: var(--info-color-dark); -} -.btn.btn-info { - color: var(--info-color-lightest); - background-color: var(--info-color-mid); - border-color: var(--info-color-dark); -} -.btn.btn-info:hover { - color: var(--info-color-lightest); - background-color: var(--info-color-darker); - border-color: var(--info-color-darkest); -} -.btn.btn-outline-info { - color: var(--info-color-darkest); - background-color: var(--info-color-lighter); - border-color: var(--info-color-darker); -} -.btn.btn-outline-info:hover { - color: var(--info-color-lightest); - background-color: var(--info-color-darker); - border-color: var(--info-color-darkest); -} - -/* ### success ### */ -.bg-success { - color: var(--success-color-lightest); - background-color: var(--success-color-mid) !important; - border-color: var(--success-color-dark); -} -.btn.btn-success { - color: var(--success-color-lightest); - background-color: var(--success-color-mid); - border-color: var(--success-color-dark); -} -.btn.btn-success:hover { - color: var(--success-color-lightest); - background-color: var(--success-color-darker); - border-color: var(--success-color-darkest); -} -.btn.btn-outline-success { - color: var(--success-color-darkest); - background-color: var(--success-color-lighter); - border-color: var(--success-color-darker); -} -.btn.btn-outline-success:hover { - color: var(--success-color-lightest); - background-color: var(--success-color-darker); - border-color: var(--success-color-darkest); -} - -/* ### warning ### */ -.bg-warning { - color: var(--warning-color-lightest); - background-color: var(--warning-color-mid) !important; - border-color: var(--warning-color-dark); -} -.btn.btn-warning { - color: var(--warning-color-lightest); - background-color: var(--warning-color-mid); - border-color: var(--warning-color-dark); -} -.btn.btn-warning:hover { - color: var(--warning-color-lightest); - background-color: var(--warning-color-darker); - border-color: var(--warning-color-darkest); -} -.btn.btn-outline-warning { - color: var(--warning-color-darkest); - background-color: var(--warning-color-lighter); - border-color: var(--warning-color-darker); -} -.btn.btn-outline-warning:hover { - color: var(--warning-color-lightest); - background-color: var(--warning-color-darker); - border-color: var(--warning-color-darkest); -} - -/* ### danger ### */ -.bg-danger { - color: var(--danger-color-lightest); - background-color: var(--danger-color-mid) !important; - border-color: var(--danger-color-dark); -} -.btn.btn-danger { - color: var(--danger-color-lightest); - background-color: var(--danger-color-mid); - border-color: var(--danger-color-dark); -} -.btn.btn-danger:hover { - color: var(--danger-color-lightest); - background-color: var(--danger-color-darker); - border-color: var(--danger-color-darkest); -} -.btn.btn-outline-danger { - color: var(--danger-color-darkest); - background-color: var(--danger-color-lighter); - border-color: var(--danger-color-darker); -} -.btn.btn-outline-danger:hover { - color: var(--danger-color-lightest); - background-color: var(--danger-color-darker); - border-color: var(--danger-color-darkest); -} - -/* *** BEGIN *** Utility *** Bootstrap Overrides *** */ -@media (min-width: 992px) { - .modal-lg { - width: 95%; - } -} - -@media (min-width: 768px) { - .modal-lg { - width: 95%; - } -} -/* *** END *** Utility *** Bootstrap Overrides *** */ - - - -.data_field { - border: solid thin #eee; -} - -.data_field:hover { - border: dashed thin #fbb; -} - - -.list_inline { - float: right; -} - -.list_inline li { - display: inline; - text-decoration: none; - margin-left: .25em; - /*margin-right: .25em;*/ -} - - - -.name_prefix { - -} -.name_informal { - -} -.name_given { - -} -.name_middle { - -} -.name_family { - -} -.name_suffix { - -} - -input.name_prefix { - /*width: 3.5em;*/ -} -input.name_informal { - /*width: 6em;*/ -} -input.name_given { - /*width: 6em;*/ -} -input.name_middle { - /*width: 6em;*/ -} -input.name_family { - /*width: 6em;*/ -} -input.name_suffix { - /*width: 3.5em;*/ -} diff --git a/app/css/aether_variables.css b/app/css/aether_variables.css deleted file mode 100644 index aa5ce37..0000000 --- a/app/css/aether_variables.css +++ /dev/null @@ -1,446 +0,0 @@ -/* Aether Style Variables */ - -:root { - --bs-blue: #0d6efd; - --bs-indigo: #6610f2; - --bs-purple: #6f42c1; - --bs-pink: #d63384; - --bs-red: #dc3545; - --bs-orange: #fd7e14; - --bs-yellow: #ffc107; - --bs-green: #198754; - --bs-teal: #20c997; - --bs-cyan: #0dcaf0; - --bs-white: #fff; - --bs-gray: #6c757d; - --bs-gray-dark: #343a40; - --bs-primary-light: #6c9dc6; - --bs-primary: #0a8dac; /*#0d6efd;*/ - --bs-primary-dark: #325d81; - --bs-secondary: #484b6e; - --bs-success: #32846e; - --bs-info: #46b4b4; /*#0dcaf0;*/ - --bs-warning: #6f7541; - --bs-danger: #7b503b; - --bs-lighter: #d0e0ed; /*#f8f9fa;*/ - --bs-light: #72a1c8; /*#f8f9fa;*/ - --bs-medium: #335f83; /*#212529;*/ - --bs-dark: #294d6a; /*#212529;*/ - --bs-darker: #1f3a4f; /*#212529;*/ - --bs-font-sans-serif: system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; - --bs-font-monospace: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; - --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0)); -} - -:root { - /* - * - * Light navy blue - * #335f83 or #335f84, rgb(51, 96, 132), hsl(207, 44%, 36%), cmyk(61, 27, 0, 49) - * - * hsl(210, 50%, 50%), rgb(64, 128, 191), #4080bf - * - * purple: #8241bf - * green: #41BF7C - * - * red: hsl(0, 50%, 50%), #BF4640 (close "split" complementary 30deg) - * orange: hsl(30, 50%, 50%), #BF8040 (linear by hue 30deg) - * yellow: hsl(60, 50%, 50%), #BFB940 (close "split" complementary 30deg) - * light green: hsl(90, 50%, 50%), #80BF40 (linear by hue 30deg) - * dark green: hsl(150, 50%, 50%), #40BF80 (linear by hue 30deg) - * teal: hsl(180, 50%, 50%), #40BF80 (linear by hue 30deg) - * blue: hsl(210, 50%, 50%), #4080BF - * purple: hsl(270, 50%, 50%), #8040BF (linear by hue 30deg) - * pink (dark): hsl(330, 50%, 50%), #BF4080 (linear by hue 30deg) - * - * primary-hue: 210, #4080BF - * accent-hue: 264, #7340BF - * - * #0080FF - * - */ - - - - --saturation-least: 10%; - --saturation-less: 20%; - --saturation: 50%; - --saturation-more: 80%; - --saturation-most: 90%; - - --lum-lightest: calc(50% + 50%); - --lum-lighter: calc(50% + 40%); - --lum-light: calc(50% + 35%); - --lum-mid: 50%; - --lum: 50%; - --lum-dark: calc(50% - 10%); - --lum-darker: calc(50% - 20%); - --lum-darkest: calc(50% - 30%); - - /* - * https://coolors.co/bfbf40-80bf40-40bf40-40bf80-40bfbf-407fbf-4040bf-7f40bf-bf40bf-bf4080 - */ - --hue-red: 0; /* red bf4141 */ - --hue-orange: calc(0 + 30); /* brown bf8041 */ - --hue-yellow: calc(0 + 60); /* yellow-green bfbf40 */ - --hue-light_green: calc(0 + 90); /* green 80bf40 */ - --hue-green: calc(0 + 120); /* green 40bf40 */ - --hue-dark_green: calc(0 + 150); /* green-cyan 40bf80 */ - --hue-teal: calc(0 + 180); /* cyan 40bfbf */ - --hue-cyan: calc(0 + 180); /* cyan 40bfbf */ - --hue-blue: calc(0 + 210); /* cyan-blue 407fbf */ - --hue-indigo: calc(0 + 240); /* blue-magenta 4040bf */ - --hue-purple: calc(0 + 270); /* blue-magenta 7f40bf */ - --hue-pink: calc(0 + 300); /* magenta bf40bf */ - --hue-dark_pink: calc(0 + 330); /* magenta-pink bf4080 */ - - --hue: 210; - --hue-base: 210; - --hue-complementary: calc(var(--hue) - 180); - /*--hue-accent: 264;*/ - - --hue-default: 210; - --hue-primary: 210; - --hue-secondary: 210; - --hue-info: 180; - --hue-success: 120; - --hue-warning: 60; - --hue-danger: 0; - - --color-l5: hsl(var(--hue), var(--saturation), calc( 50 + 50)%); - --color-l4: hsl(var(--hue), var(--saturation), calc( 50 + 40)%); - --color-l3: hsl(var(--hue), var(--saturation), calc( 50 + 30)%); - --color-l2: hsl(var(--hue), var(--saturation), calc( 50 + 20)%); - --color-l1: hsl(var(--hue), var(--saturation), calc( 50 + 10)%); - --color-default: hsl(var(--hue), var(--saturation), calc( 50 + 0)%); - --color-d1: hsl(var(--hue), var(--saturation), calc( 50 - 10)%); - --color-d2: hsl(var(--hue), var(--saturation), calc( 50 - 20)%); - --color-d3: hsl(var(--hue), var(--saturation), calc( 50 - 30)%); - --color-d4: hsl(var(--hue), var(--saturation), calc( 50 - 40)%); - --color-d5: hsl(var(--hue), var(--saturation), calc( 50 - 50)%); - - --default-fg-color-highlight: hsl(var(--hue-default), var(--saturation-most), var(--lum-darker)); - --default-fg-color: hsl(var(--hue-default), var(--saturation-most), var(--lum-darkest)); - - --default-bg-color-highlight: hsl(var(--hue-default), var(--saturation-least), var(--lum-lighter)); - --default-bg-color: hsl(var(--hue-default), var(--saturation-least), var(--lum-lightest)); - - --default-border-color-highlight: hsl(var(--hue-default), var(--saturation-less), var(--lum-darkest)); - --default-border-color: hsl(var(--hue-default), var(--saturation-less), var(--lum-darker)); - - --default-color-lightest: hsl(var(--hue-blue), var(--saturation-least), var(--lum-lightest)); - --default-color-lighter: hsl(var(--hue-blue), var(--saturation-least), var(--lum-lighter)); - --default-color-light: hsl(var(--hue-blue), var(--saturation-least), var(--lum-light)); - --default-color-mid: hsl(var(--hue-blue), var(--saturation-least), var(--lum-mid)); - --default-color-dark: hsl(var(--hue-blue), var(--saturation-least), var(--lum-dark)); - --default-color-darker: hsl(var(--hue-blue), var(--saturation-least), var(--lum-darker)); - --default-color-darkest: hsl(var(--hue-blue), var(--saturation-least), var(--lum-darkest)); - - --light-fg-color: #1a3042; - --light-bg-color: #d0e0ed; /*#d0e0ed*/ - --light-border-color: #a1c1da; /*#a1c1da*/ - - --medium-fg-color: #f1f6fa; - --medium-bg-color: #335f83; - --medium-border-color: #294d6a; - - --dark-fg-color: #f1f6fa; - --dark-bg-color: #4682b3; - --dark-border-color: #335f83; - - --primary-color-lightest: hsl(var(--hue-primary), var(--saturation), var(--lum-lightest)); - --primary-color-lighter: hsl(var(--hue-primary), var(--saturation), var(--lum-lighter)); - --primary-color-light: hsl(var(--hue-primary), var(--saturation), var(--lum-light)); - --primary-color-mid: hsl(var(--hue-primary), var(--saturation), var(--lum-mid)); - --primary-color-dark: hsl(var(--hue-primary), var(--saturation), var(--lum-dark)); - --primary-color-darker: hsl(var(--hue-primary), var(--saturation), var(--lum-darker)); - --primary-color-darkest: hsl(var(--hue-primary), var(--saturation), var(--lum-darkest)); - - --secondary-color-lightest: hsl(var(--hue-secondary), var(--saturation-least), var(--lum-lightest)); - --secondary-color-lighter: hsl(var(--hue-secondary), var(--saturation-least), var(--lum-lighter)); - --secondary-color-light: hsl(var(--hue-secondary), var(--saturation-least), var(--lum-light)); - --secondary-color-mid: hsl(var(--hue-secondary), var(--saturation-least), var(--lum-mid)); - --secondary-color-dark: hsl(var(--hue-secondary), var(--saturation-least), var(--lum-dark)); - --secondary-color-darker: hsl(var(--hue-secondary), var(--saturation-least), var(--lum-darker)); - --secondary-color-darkest: hsl(var(--hue-secondary), var(--saturation-least), var(--lum-darkest)); - - --info-color-lightest: hsl(var(--hue-info), var(--saturation-less), var(--lum-lightest)); - --info-color-lighter: hsl(var(--hue-info), var(--saturation-less), var(--lum-lighter)); - --info-color-light: hsl(var(--hue-info), var(--saturation-less), var(--lum-light)); - --info-color-mid: hsl(var(--hue-info), var(--saturation-less), var(--lum-mid)); - --info-color-dark: hsl(var(--hue-info), var(--saturation-less), var(--lum-dark)); - --info-color-darker: hsl(var(--hue-info), var(--saturation-less), var(--lum-darker)); - --info-color-darkest: hsl(var(--hue-info), var(--saturation-less), var(--lum-darkest)); - - --success-color-lightest: hsl(var(--hue-success), var(--saturation-less), var(--lum-lightest)); - --success-color-lighter: hsl(var(--hue-success), var(--saturation-less), var(--lum-lighter)); - --success-color-light: hsl(var(--hue-success), var(--saturation-less), var(--lum-light)); - --success-color-mid: hsl(var(--hue-success), var(--saturation-less), var(--lum-mid)); - --success-color-dark: hsl(var(--hue-success), var(--saturation-less), var(--lum-dark)); - --success-color-darker: hsl(var(--hue-success), var(--saturation-less), var(--lum-darker)); - --success-color-darkest: hsl(var(--hue-success), var(--saturation-less), var(--lum-darkest)); - - --warning-color-lightest: hsl(var(--hue-warning), var(--saturation-less), var(--lum-lightest)); - --warning-color-lighter: hsl(var(--hue-warning), var(--saturation-less), var(--lum-lighter)); - --warning-color-light: hsl(var(--hue-warning), var(--saturation-less), var(--lum-light)); - --warning-color-mid: hsl(var(--hue-warning), var(--saturation-less), var(--lum-mid)); - --warning-color-dark: hsl(var(--hue-warning), var(--saturation-less), var(--lum-dark)); - --warning-color-darker: hsl(var(--hue-warning), var(--saturation-less), var(--lum-darker)); - --warning-color-darkest: hsl(var(--hue-warning), var(--saturation-less), var(--lum-darkest)); - - --danger-color-lightest: hsl(var(--hue-danger), var(--saturation-less), var(--lum-lightest)); - --danger-color-lighter: hsl(var(--hue-danger), var(--saturation-less), var(--lum-lighter)); - --danger-color-light: hsl(var(--hue-danger), var(--saturation-less), var(--lum-light)); - --danger-color-mid: hsl(var(--hue-danger), var(--saturation-less), var(--lum-mid)); - --danger-color-dark: hsl(var(--hue-danger), var(--saturation-less), var(--lum-dark)); - --danger-color-darker: hsl(var(--hue-danger), var(--saturation-less), var(--lum-darker)); - --danger-color-darkest: hsl(var(--hue-danger), var(--saturation-less), var(--lum-darkest)); - - --link-fg-color: #f1f6fa; - --link-bg-color: #5196CF; - --link-border-color: #4682b3; - - --btn_trans_in_delay: 0s; - --btn_trans_in_duration: .1s; - --btn_trans_out_delay: .15s; /*.25s*/ - --btn_trans_out_duration: .15s; - - --default_fg_lightness: 5%; /* foreground */ - --default_bg_lightness: 80%; /* background */ - --default_bd_lightness: 70%; /* border */ - - --outline_fg_lightness: calc(var(--default_fg_lightness) + 25%); - --outline_bg_lightness: calc(var(--default_bg_lightness) + 15%); - --outline_bd_lightness: calc(var(--default_bd_lightness) - 50%); - - --disabled_fg_lightness: calc(var(--default_fg_lightness) + 40%); - --disabled_bg_lightness: calc(var(--default_bg_lightness) + 10%); - --disabled_bd_lightness: calc(var(--default_bd_lightness) - 10%); - - --hover_fg_lightness: calc(var(--default_fg_lightness) - 5%); - --hover_bg_lightness: calc(var(--default_bg_lightness) - 20%); - --hover_bd_lightness: calc(var(--default_bd_lightness) - 30%); - - - --site_menu_btn_color: hsla(0,0%,var(--default_fg_lightness),1); - --site_menu_btn_bg_color: hsla(0,0%,var(--default_bg_lightness),1); - --site_menu_btn_border_color: hsla(0,0%,var(--default_bd_lightness),1); - - --site_menu_btn_disabled_color: hsla(0,0%,var(--disabled_fg_lightness),1); - --site_menu_btn_disabled_bg_color: hsla(0,0%,var(--disabled_bg_lightness),1); - --site_menu_btn_disabled_border_color: hsla(0,0%,var(--disabled_bd_lightness),1); - - --site_menu_btn_hover_color: hsla(0,50%,var(--hover_fg_lightness),1); - --site_menu_btn_hover_bg_color: hsla(0,0%,var(--hover_bg_lightness),1); - --site_menu_btn_hover_border_color: hsla(0,0%,var(--hover_bd_lightness),1); - - --site_footer_color: hsla(0,0%,35%,1); - --site_footer_bg_color: hsla(0,0%,100%,1); - --site_footer_border_color: hsla(0,0%,80%,1); - - --site_footer_hover_color: hsla(0,0%,5%,1); - --site_footer_hover_bg_color: hsla(0,0%,100%,1); - --site_footer_hover_border_color: hsla(0,0%,70%,1); - - --system_footer_color: hsla(0,0%,35%,1); - --system_footer_bg_color: hsla(0,0%,90%,1); - --system_footer_border_color: hsla(0,0%,80%,1); - - --system_footer_hover_color: hsla(0,0%,5%,1); - --system_footer_hover_bg_color: hsla(0,0%,80%,1); - --system_footer_hover_border_color: hsla(0,0%,70%,1); - - --btn_font_weight_disabled: 300; - --btn_font_weight_default: 400; - --btn_font_weight_active: 500; - --btn_font_weight_primary: 700; - - /* Default Buttons */ - --default_btn_color: hsla(var(--hue-default),var(--saturation-least),var(--default_fg_lightness),1); - --default_btn_bg_color: hsla(var(--hue-default),var(--saturation-least),var(--default_bg_lightness),1); - --default_btn_border_color: hsla(var(--hue-default),var(--saturation-least),var(--default_bd_lightness),1); - - --default_btn_outline_color: hsla(var(--hue-default),var(--saturation-most),var(--outline_fg_lightness),1); - --default_btn_outline_bg_color: hsla(var(--hue-default),var(--saturation-less),var(--outline_bg_lightness),1); - --default_btn_outline_border_color: hsla(var(--hue-default),var(--saturation-most),var(--outline_bd_lightness),1); - - --default_btn_disabled_color: hsla(var(--hue-default),var(--saturation-least),var(--disabled_fg_lightness),1); - --default_btn_disabled_bg_color: hsla(var(--hue-default),var(--saturation-least),var(--disabled_bg_lightness),1); - --default_btn_disabled_border_color: hsla(var(--hue-default),var(--saturation-least),var(--disabled_bd_lightness),1); - - --default_btn_hover_color: hsla(var(--hue-default),var(--saturation-least),var(--hover_fg_lightness),1); - --default_btn_hover_bg_color: hsla(var(--hue-default),var(--saturation-least),var(--hover_bg_lightness),1); - --default_btn_hover_border_color: hsla(var(--hue-default),var(--saturation-least),var(--hover_bd_lightness),1); - - /* Primary Buttons */ - --primary_btn_color: hsla(var(--hue-primary),var(--saturation-less),var(--default_fg_lightness),1); - --primary_btn_bg_color: hsla(var(--hue-primary),var(--saturation-less),var(--default_bg_lightness),1); - --primary_btn_border_color: hsla(var(--hue-primary),var(--saturation-less),var(--default_bd_lightness),1); - - --primary_btn_outline_color: hsla(var(--hue-primary),var(--saturation-most),var(--outline_fg_lightness),1); - --primary_btn_outline_bg_color: hsla(var(--hue-primary),var(--saturation-less),var(--outline_bg_lightness),1); - --primary_btn_outline_border_color: hsla(var(--hue-primary),var(--saturation-most),var(--outline_bd_lightness),1); - - --primary_btn_disabled_color: hsla(var(--hue-primary),var(--saturation-less),var(--disabled_fg_lightness),1); - --primary_btn_disabled_bg_color: hsla(var(--hue-primary),var(--saturation-less),var(--disabled_bg_lightness),1); - --primary_btn_disabled_border_color: hsla(var(--hue-primary),var(--saturation-less),var(--disabled_bd_lightness),1); - - --primary_btn_hover_color: hsla(var(--hue-primary),var(--saturation-less),var(--hover_fg_lightness),1); - --primary_btn_hover_bg_color: hsla(var(--hue-primary),var(--saturation-less),var(--hover_bg_lightness),1); - --primary_btn_hover_border_color: hsla(var(--hue-primary),var(--saturation-less),var(--hover_bd_lightness),1); - - /* Secondary Buttons */ - --secondary_btn_color: hsla(var(--hue-secondary),var(--saturation-less),var(--default_fg_lightness),1); - --secondary_btn_bg_color: hsla(var(--hue-secondary),var(--saturation-less),var(--default_bg_lightness),1); - --secondary_btn_border_color: hsla(var(--hue-secondary),var(--saturation-less),var(--default_bd_lightness),1); - - --secondary_btn_outline_color: hsla(var(--hue-secondary),var(--saturation-most),var(--outline_fg_lightness),1); - --secondary_btn_outline_bg_color: hsla(var(--hue-secondary),var(--saturation-less),var(--outline_bg_lightness),1); - --secondary_btn_outline_border_color: hsla(var(--hue-secondary),var(--saturation-most),var(--outline_bd_lightness),1); - - --secondary_btn_disabled_color: hsla(var(--hue-secondary),var(--saturation-less),var(--disabled_fg_lightness),1); - --secondary_btn_disabled_bg_color: hsla(var(--hue-secondary),var(--saturation-less),var(--disabled_bg_lightness),1); - --secondary_btn_disabled_border_color: hsla(var(--hue-secondary),var(--saturation-less),var(--disabled_bd_lightness),1); - - --secondary_btn_hover_color: hsla(var(--hue-secondary),var(--saturation-less),var(--hover_fg_lightness),1); - --secondary_btn_hover_bg_color: hsla(var(--hue-secondary),var(--saturation-less),var(--hover_bg_lightness),1); - --secondary_btn_hover_border_color: hsla(var(--hue-secondary),var(--saturation-less),var(--hover_bd_lightness),1); - - /* Info Buttons */ - --info_btn_color: hsla(var(--hue-info),var(--saturation-less),var(--default_fg_lightness),1); - --info_btn_bg_color: hsla(var(--hue-info),var(--saturation-less),var(--default_bg_lightness),1); - --info_btn_border_color: hsla(var(--hue-info),var(--saturation-less),var(--default_bd_lightness),1); - - --info_btn_outline_color: hsla(var(--hue-info),var(--saturation-most),var(--outline_fg_lightness),1); - --info_btn_outline_bg_color: hsla(var(--hue-info),var(--saturation-less),var(--outline_bg_lightness),1); - --info_btn_outline_border_color: hsla(var(--hue-info),var(--saturation-most),var(--outline_bd_lightness),1); - - --info_btn_disabled_color: hsla(var(--hue-info),var(--saturation-less),var(--disabled_fg_lightness),1); - --info_btn_disabled_bg_color: hsla(var(--hue-info),var(--saturation-less),var(--disabled_bg_lightness),1); - --info_btn_disabled_border_color: hsla(var(--hue-info),var(--saturation-less),var(--disabled_bd_lightness),1); - - --info_btn_hover_color: hsla(var(--hue-info),var(--saturation-less),var(--hover_fg_lightness),1); - --info_btn_hover_bg_color: hsla(var(--hue-info),var(--saturation-less),var(--hover_bg_lightness),1); - --info_btn_hover_border_color: hsla(var(--hue-info),var(--saturation-less),var(--hover_bd_lightness),1); - - /* Success Buttons */ - --success_btn_color: hsla(var(--hue-success),var(--saturation-less),var(--default_fg_lightness),1); - --success_btn_bg_color: hsla(var(--hue-success),var(--saturation-less),var(--default_bg_lightness),1); - --success_btn_border_color: hsla(var(--hue-success),var(--saturation-less),var(--default_bd_lightness),1); - - --success_btn_outline_color: hsla(var(--hue-success),var(--saturation-most),var(--outline_fg_lightness),1); - --success_btn_outline_bg_color: hsla(var(--hue-success),var(--saturation-less),var(--outline_bg_lightness),1); - --success_btn_outline_border_color: hsla(var(--hue-success),var(--saturation-most),var(--outline_bd_lightness),1); - - --success_btn_disabled_color: hsla(var(--hue-success),var(--saturation-less),var(--disabled_fg_lightness),1); - --success_btn_disabled_bg_color: hsla(var(--hue-success),var(--saturation-less),var(--disabled_bg_lightness),1); - --success_btn_disabled_border_color: hsla(var(--hue-success),var(--saturation-less),var(--disabled_bd_lightness),1); - - --success_btn_hover_color: hsla(var(--hue-success),var(--saturation-less),var(--hover_fg_lightness),1); - --success_btn_hover_bg_color: hsla(var(--hue-success),var(--saturation-less),var(--hover_bg_lightness),1); - --success_btn_hover_border_color: hsla(var(--hue-success),var(--saturation-less),var(--hover_bd_lightness),1); - - /* Warning Buttons */ - --warning_btn_color: hsla(var(--hue-warning),var(--saturation-less),var(--default_fg_lightness),1); - --warning_btn_bg_color: hsla(var(--hue-warning),var(--saturation-less),var(--default_bg_lightness),1); - --warning_btn_border_color: hsla(var(--hue-warning),var(--saturation-less),var(--default_bd_lightness),1); - - --warning_btn_outline_color: hsla(var(--hue-warning),var(--saturation-most),var(--outline_fg_lightness),1); - --warning_btn_outline_bg_color: hsla(var(--hue-warning),var(--saturation-less),var(--outline_bg_lightness),1); - --warning_btn_outline_border_color: hsla(var(--hue-warning),var(--saturation-most),var(--outline_bd_lightness),1); - - --warning_btn_disabled_color: hsla(var(--hue-warning),var(--saturation-less),var(--disabled_fg_lightness),1); - --warning_btn_disabled_bg_color: hsla(var(--hue-warning),var(--saturation-less),var(--disabled_bg_lightness),1); - --warning_btn_disabled_border_color: hsla(var(--hue-warning),var(--saturation-less),var(--disabled_bd_lightness),1); - - --warning_btn_hover_color: hsla(var(--hue-warning),var(--saturation-less),var(--hover_fg_lightness),1); - --warning_btn_hover_bg_color: hsla(var(--hue-warning),var(--saturation-less),var(--hover_bg_lightness),1); - --warning_btn_hover_border_color: hsla(var(--hue-warning),var(--saturation-less),var(--hover_bd_lightness),1); - - /* Danger Buttons */ - --danger_btn_color: hsla(var(--hue-danger),var(--saturation-less),var(--default_fg_lightness),1); - --danger_btn_bg_color: hsla(var(--hue-danger),var(--saturation-more),var(--default_bg_lightness),1); - --danger_btn_border_color: hsla(var(--hue-danger),var(--saturation-less),var(--default_bd_lightness),1); - - --danger_btn_outline_color: hsla(var(--hue-danger),var(--saturation-most),var(--outline_fg_lightness),1); - --danger_btn_outline_bg_color: hsla(var(--hue-danger),var(--saturation-more),var(--outline_bg_lightness),1); - --danger_btn_outline_border_color: hsla(var(--hue-danger),var(--saturation-most),var(--outline_bd_lightness),1); - - --danger_btn_disabled_color: hsla(var(--hue-danger),var(--saturation-less),var(--disabled_fg_lightness),1); - --danger_btn_disabled_bg_color: hsla(var(--hue-danger),var(--saturation-less),var(--disabled_bg_lightness),1); - --danger_btn_disabled_border_color: hsla(var(--hue-danger),var(--saturation-less),var(--disabled_bd_lightness),1); - - --danger_btn_hover_color: hsla(var(--hue-danger),var(--saturation-less),var(--hover_fg_lightness),1); - --danger_btn_hover_bg_color: hsla(var(--hue-danger),var(--saturation-more),var(--hover_bg_lightness),1); - --danger_btn_hover_border_color: hsla(var(--hue-danger),var(--saturation-less),var(--hover_bd_lightness),1); - -} - - -/* - * https://encycolorpedia.com/035096 - * Medium electric blue / #035096 - * - * https://encycolorpedia.com/32527b - * Metallic blue / #32527b - * - * https://encycolorpedia.com/4682b4 - * Steelblue / Steel blue / #4682b4 - */ - -/* - * Faux-Metallic Blue #335f83 - * http://www.2020colours.com/335f83 - * https://encycolorpedia.com/335f83 - * https://www.w3schools.com/w3css/w3css_color_generator.asp - * - * #335f83 - * rgb(51, 95, 131) - * hsl(147, 112%, 91%) - * cmyk(61, 27, 0, 49) - * - * complementary #825633 - * warning #CFB33C, rgb(207,179,60) - * danger #B55F35, rgb(181,95,53) - */ -.aether__theme--l5 {color:#000 !important; background-color:#f1f6fa !important} -.aether__theme--l4 {color:#000 !important; background-color:#d0e0ed !important} -.aether__theme--l3 {color:#000 !important; background-color:#a1c1da !important} -.aether__theme--l2 {color:#fff !important; background-color:#72a1c8 !important} -.aether__theme--l1 {color:#fff !important; background-color:#4682b3 !important} -.aether__theme--d1 {color:#fff !important; background-color:#2e5677 !important} -.aether__theme--d2 {color:#fff !important; background-color:#294d6a !important} -.aether__theme--d3 {color:#fff !important; background-color:#24435d !important} -.aether__theme--d4 {color:#fff !important; background-color:#1f3a4f !important} -.aether__theme--d5 {color:#fff !important; background-color:#1a3042 !important} - -.aether__theme--light {color:#000 !important; background-color:#f1f6fa !important} -.aether__theme--dark {color:#fff !important; background-color:#1a3042 !important} -.aether__theme--action {color:#fff !important; background-color:#1a3042 !important} - -.aether__theme {color:#fff !important; background-color:#335f83 !important} -.aether__theme--text {color:#335f83 !important} -.aether__theme--border {border-color:#335f83 !important} - -.aether__theme--hover:hover {color:#fff !important; background-color:#335f83 !important} -.aether__theme--text_hover:hover {color:#335f83 !important} -.aether__theme--border_hover:hover {border-color:#335f83 !important} - -/* - * success #66be07 - * info #00beff - * danger #660007 - * - * error #660007 - * - * primary 5196CF - * secondary 688297 - * - * info 8FB2CF (blue) - * success 2C827B (green) - * - * warning 7F8226 (brown yellow) - * danger 824240 (brown orange) - * - * other 393B82 (purple) - */ diff --git a/app/css/base_style_event_launcher.css b/app/css/base_style_event_launcher.css deleted file mode 100644 index db5e4c6..0000000 --- a/app/css/base_style_event_launcher.css +++ /dev/null @@ -1,774 +0,0 @@ -body { - background-color: steelblue; - /* https://app.haikei.app/ */ - background-image: url('../static/images/site_background.svg'); - background-position: center; - background-repeat: no-repeat; - background-attachment: fixed; - background-size: cover; -} - -body>.body_container { -} - -/* #System-Nav-Menu { } */ -#Site-Header { } -#Site-Nav-Menu { } -#System-Notifications { } -#Main-Body { -} -#Main-Notifications { } -#Main-Nav-Menu { } -#Main-Content { } -#Site-Footer { } -/* #System-Footer { } */ -/* #System-Nav-Menu-Float { } */ -/* #System-Debug { } */ - - -/* #System-Nav-Menu { outline: dashed thin red; } */ -/* #Site-Header { outline: dashed thin red; } */ -/* #Site-Nav-Menu { outline: dashed thin pink; } */ -/* #System-Notifications { outline: dashed thin red; } */ -/* #Main-Body { outline: dotted thin green; } */ -/* #Main-Notifications { outline: dotted thin blue; } */ -/* #Main-Nav-Menu { outline: dotted thin blue; } */ -/* #Main-Content { outline: dotted thin blue; } */ -/* #Site-Footer { outline: dotted thin blue; } */ -/* #System-Footer { outline: dashed thin red; } */ -/* #System-Debug { outline: dashed thin red; } */ - - -#System-Nav-Menu { - border: solid thick transparent; - border-top: none; - border-left: solid thick hsl(var(--hue-green),var(--saturation-least),var(--lum-darkest)); - border-right: solid thick hsl(var(--hue-green),var(--saturation-least),var(--lum-darkest)); - border-bottom: solid thin hsl(var(--hue-green),var(--saturation-least),var(--lum-darkest)); - border-image: - linear-gradient( - to bottom, - hsl(var(--hue-green),var(--saturation-least),var(--lum-darkest)), - transparent - ) 1; - - background-color: hsla(0,0%,100%,.98); -} - -#System-Nav-Menu:hover { - border-left: solid thick hsl(var(--hue-green),var(--saturation-most),var(--lum-darkest)); - border-right: solid thick hsl(var(--hue-green),var(--saturation-most),var(--lum-darkest)); - border-bottom: solid thin hsl(var(--hue-green),var(--saturation-most),var(--lum-darkest)); - border-image: - linear-gradient( - to top, - hsl(var(--hue-green),var(--saturation-most),var(--lum-darkest)), - transparent - ) 1; - - /* background-color: hsla(0,0%,80%,1); */ - background-image: linear-gradient(to right, hsla(var(--hue-yellow), var(--saturation-less), var(--lum-lightest).1) 0%, hsla(var(--hue-yellow), var(--saturation-less), var(--lum-lightest),.9) 3%, hsla(var(--hue-yellow), var(--saturation-less), var(--lum-lightest),.9) 97%, hsla(var(--hue-yellow), var(--saturation-less), var(--lum-lightest),.1) 100%); - -} - -#System-Nav-Menu img { -} -#System-Nav-Menu:hover img { -} - -.system_menu_clicked { - border-left: solid thick hsl(var(--hue-green),var(--saturation-most),var(--lum-darkest)); - border-right: solid thick hsl(var(--hue-green),var(--saturation-most),var(--lum-darkest)); - border-bottom: solid thin hsl(var(--hue-green),var(--saturation-most),var(--lum-darkest)); - border-image: - linear-gradient( - to top, - hsl(var(--hue-green),var(--saturation-most),var(--lum-darkest)), - transparent - ) 1; - - background-image: linear-gradient(to right, hsla(var(--hue-yellow), var(--saturation-less), var(--lum-lightest).1) 0%, hsla(var(--hue-yellow), var(--saturation-less), var(--lum-lightest),.9) 3%, hsla(var(--hue-yellow), var(--saturation-less), var(--lum-lightest),.9) 97%, hsla(var(--hue-yellow), var(--saturation-less), var(--lum-lightest),.1) 100%); -} - - -.system_menu_begin { - /*border: solid thin red;*/ - - text-shadow: 0 0 .25rem hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),1), 0 0 .75rem hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),1), 0 0 1rem hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),1); - - color: black; - - /*background-image: linear-gradient(to right, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lighter),0) 0%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lighter),.9) 3%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lighter),.9) 97%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lighter),0) 100%);*/ -} -.system_menu_begin:hover { -} - -.system_menu_center { - /*border: solid thin blue;*/ - - /*background-image: linear-gradient(to right, hsla(var(--hue-blue), var(--saturation-least), var(--lum-mid),.1) 25%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-mid),.8) 50%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-mid),.9) 75%);*/ -} - -.system_menu_end { - /*border: solid thin red;*/ - - text-shadow: 0 0 .25rem white, 0 0 .75rem hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),1), 0 0 1rem hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),1); - - color: black; - - /*background-image: linear-gradient(to right, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),0) 0%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),.6) 20%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),.6) 80%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),0) 100%);*/ -} -.system_menu_end:hover { -} - -.system_menu_hidden { - border-bottom: solid thin gray; - - /*background-image: linear-gradient(to right, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),0) 0%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),.9) 3%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),.9) 97%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),0) 100%);*/ -} -.system_menu_hidden:hover { -} - -.system_menu_visible { - /*border-bottom: solid thin gray;*/ - - /*background-image: linear-gradient(to right, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),0) 0%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),.9) 3%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),.9) 97%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),0) 100%);*/ -} -.system_menu_visible:hover { -} - -.system_menu_name { - /*border: dashed thin blue;*/ - - background-image: linear-gradient(to right, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),0) 0%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),.8) 3%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),.8) 97%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),0) 100%); -} - -.system_menu_name img { -} - -.system_menu_information { - /*border: dashed thin green;*/ - - background-image: linear-gradient(to right, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),0) 0%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),.8) 3%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),.8) 97%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),0) 100%); -} -.system_menu_information:hover { - /*background-color: gray;*/ - - /*background-image: linear-gradient(to right, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lighter),0) 0%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lighter),.9) 3%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lighter),.9) 97%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lighter),0) 100%);*/ - - background-image: linear-gradient(to right, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),.0) 0%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),.97) 3%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),.97) 97%, hsla(var(--hue-blue), var(--saturation-least), var(--lum-lightest),.0) 100%); - -} - -/* Set style based on the user's permissions */ -.system_menu.user_super { - border-left: solid thick hsl(var(--hue-red),var(--saturation-most),var(--lum-darkest)); - border-right: solid thick hsl(var(--hue-red),var(--saturation-most),var(--lum-darkest)); - border-bottom: solid thin hsl(var(--hue-red),var(--saturation-most),var(--lum-darkest)); - border-image: - linear-gradient( - to top, - hsl(var(--hue-red),var(--saturation-most),var(--lum-darkest)), - transparent - ) 1; - - background-image: - linear-gradient( - to bottom, - hsl(var(--hue-red),var(--saturation-most),var(--lum-darkest)), - transparent - ); -} - -.system_menu.user_manager { - border-left: solid thick hsl(var(--hue-red),var(--saturation-most),var(--lum-darkest)); - border-right: solid thick hsl(var(--hue-red),var(--saturation-most),var(--lum-darkest)); - border-bottom: solid thin hsl(var(--hue-red),var(--saturation-most),var(--lum-darkest)); - border-image: - linear-gradient( - to top, - hsl(var(--hue-red),var(--saturation-most),var(--lum-darkest)), - transparent - ) 1; - - background-image: - linear-gradient( - to bottom, - hsl(var(--hue-orange),var(--saturation-most),var(--lum-darkest)), - transparent - ); -} - -.system_menu.user_administrator { - border-left: solid thick hsl(var(--hue-red),var(--saturation-most),var(--lum-darkest)); - border-right: solid thick hsl(var(--hue-red),var(--saturation-most),var(--lum-darkest)); - border-bottom: solid thin hsl(var(--hue-red),var(--saturation-most),var(--lum-darkest)); - border-image: - linear-gradient( - to top, - hsl(var(--hue-red),var(--saturation-most),var(--lum-darkest)), - transparent - ) 1; - - background-image: - linear-gradient( - to bottom, - hsl(var(--hue-yellow),var(--saturation-most),var(--lum-darkest)), - transparent - ); -} - -.system_menu.user_verified { - border-left: solid thick hsl(var(--hue-red),var(--saturation-most),var(--lum-darkest)); - border-right: solid thick hsl(var(--hue-red),var(--saturation-most),var(--lum-darkest)); - border-bottom: solid thin hsl(var(--hue-red),var(--saturation-most),var(--lum-darkest)); - border-image: - linear-gradient( - to top, - hsl(var(--hue-green),var(--saturation-most),var(--lum-darkest)), - transparent - ) 1; - - background-image: - linear-gradient( - to bottom, - hsl(var(--hue-yellow),var(--saturation-most),var(--lum-darkest)), - transparent - ); -} - -.system_menu.user_authenticated { - border-left: solid thick hsl(var(--hue-red),var(--saturation-most),var(--lum-darkest)); - border-right: solid thick hsl(var(--hue-red),var(--saturation-most),var(--lum-darkest)); - border-bottom: solid thin hsl(var(--hue-red),var(--saturation-most),var(--lum-darkest)); - border-image: - linear-gradient( - to top, - hsl(var(--hue-green),var(--saturation-most),var(--lum-darkest)), - transparent - ) 1; - - background-image: - linear-gradient( - to bottom, - hsl(var(--hue-cyan),var(--saturation-most),var(--lum-darkest)), - transparent - ); -} - -.system_menu .user_status_options { - font-size: .8rem; - line-height: 1rem; -} -/* *** END *** System *** System Menu (root menu) *** */ - - -/* *** BEGIN *** System *** System Menu Floating/Fixed (root menu) *** */ -#System-Nav-Menu-Float { - background-color: rgba(220,175,175,.8); -} -/* *** END *** System *** System Menu Floating/Fixed (root menu) *** */ - - -#Site-Header { - background-color: hsla(0,0%,100%,.98); -} - -#Site-Header img { -} - - -/* *** BEGIN *** System *** System Site Nav Menu *** */ -#Site-Nav-Menu { - background-color: hsla(0,0%,100%,.98); - border-bottom: solid thin hsla(0,0%,80%,1); - - font-size: 1.2rem; -} - -#Site-Nav-Menu ul { -} - -#Site-Nav-Menu ul>li { - /* background-color: var(--site_menu_btn_bg_color); */ - /* border: solid thin var(--site_menu_btn_border_color); - * border-radius: .25rem; */ - /* font-weight: var(--btn_font_weight_default); */ - /* color: var(--site_menu_btn_color); */ -} - -#Site-Nav-Menu ul>li:hover { - /* background-color: var(--site_menu_btn_hover_bg_color); */ - /* border: solid thin var(--site_menu_btn_hover_border_color); */ - /* color: var(--site_menu_btn_hover_color); */ -} - -#Site-Nav-Menu ul>li.nav_disabled { - /* background-color: var(--site_menu_btn_disabled_bg_color); - * border: solid thin var(--site_menu_btn_disabled_border_color); - * - * font-weight: var(--btn_font_weight_disabled); - * color: var(--site_menu_btn_disabled_color); - * text-decoration: line-through; */ -} -#Site-Nav-Menu ul>li.nav_active { - /* font-weight: var(--btn_font_weight_active); */ -} -#Site-Nav-Menu ul>li.nav_primary { - font-weight: var(--btn_font_weight_primary); - /* border-right: solid thin hsla(0,0%,50%,.5); */ -} - -#Site-Nav-Menu .btn { - border-color: hsla(0,0%,90%,.1); - background-color: hsla(0,0%,90%,.1); -} -/* *** END *** System *** System Site Nav Menu *** */ - -#System-Notifications { - background-color: hsla(0,0%,100%,.98); -} - - -#Main-Body { - background-color: hsla(0,0%,100%,.98); -} - -#Main-Notifications { - /* background-color: hsla(var(--hue-info),var(--saturation-least),var(--lum-lighter),.1); */ - /* background-color: hsla(0,0%,100%,.98); */ -} - - -/* *** BEGIN *** Main *** Main Nav Menu *** */ -#Main-Nav-Menu { - -} - -#Main-Nav-Menu ul { -} - -#Main-Nav-Menu ul>li { -} - -#Main-Nav-Menu ul>li:hover { -} - -#Main-Nav-Menu ul>li.disabled { - background-color: var(--site_menu_btn_disabled_bg_color); - border: solid thin var(--site_menu_btn_disabled_border_color); - - font-weight: var(--btn_font_weight_disabled); - color: var(--site_menu_btn_disabled_color); - text-decoration: line-through; -} -#Main-Nav-Menu ul>li.active { - font-weight: var(--btn_font_weight_active); -} -#Main-Nav-Menu ul>li.primary { - font-weight: var(--btn_font_weight_primary); -} - - - - -#Main-Nav-Menu .m_btn { - appearance: button; - - cursor: pointer; - - background-color: var(--site_menu_btn_bg_color); - - border: solid thin var(--site_menu_btn_border_color); - border-radius: .25rem; - - /* line-height: 1rem; */ - /* font-size: 1rem; */ - font-weight: var(--btn_font_weight_default); - text-align: center; - - color: var(--site_menu_btn_color); - - /* NOTE: transition when hover ends */ - transition-property: color, background-color, border-color; - transition-delay: var(--btn_trans_out_delay); /* short delay */ - transition-duration: var(--btn_trans_out_duration); - transition-timing-function: linear; -} - -#Main-Nav-Menu .m_btn:hover { - /* background-color: var(--site_menu_btn_hover_bg_color); */ - - /* border: solid thin var(--site_menu_btn_hover_border_color); */ - - /* color: var(--site_menu_btn_hover_color); */ - - /* NOTE: transition when hover starts */ - transition-property: color, background-color, border-color; - transition-delay: var(--btn_trans_in_delay); /* no delay */ - transition-duration: var(--btn_trans_in_duration); - transition-timing-function: linear; -} -/* *** END *** System *** System Main Nav Menu *** */ - -#Main-Content { -} - - -/* *** BEGIN *** System *** Site Footer *** */ -/* site_footer or site_footer or site_status is the global (root) footer or status bar */ -#Site-Footer { - background-color: var(--site_footer_bg_color); - - border-top: solid thin var(--site_footer_border_color); - - color: var(--site_footer_color); -} - -#Site-Footer:hover { - background-color: var(--site_footer_hover_bg_color); - - border-top: solid thin var(--site_footer_hover_border_color); - - color: var(--site_footer_hover_color); -} - -.site_footer .footer_left { -} -.site_footer .footer_right { -} -/* *** END *** System *** Site Footer *** */ - - - -/* *** BEGIN *** System *** System Footer *** */ -/* system_footer or system_footer or system_status is the global (root) footer or status bar */ -#System-Footer { - font-size: .8rem; - - background-color: var(--system_footer_bg_color); - - border-top: solid thin var(--system_footer_border_color); - - color: var(--system_footer_color); - - /* NOTE: transition when hover ends */ - transition-property: color, background-color, border-color; - transition-delay: var(--btn_trans_out_delay); /* short delay */ - transition-duration: var(--btn_trans_out_duration); - transition-timing-function: linear; -} - -#System-Footer:hover { - background-color: var(--system_footer_hover_bg_color); - - border-top: solid thin var(--system_footer_hover_border_color); - - color: var(--system_footer_hover_color); - - /* NOTE: transition when hover starts */ - transition-property: color, background-color, border-color; - transition-delay: var(--btn_trans_in_delay); /* no delay */ - transition-duration: var(--btn_trans_in_duration); - transition-timing-function: linear; -} - -.system_footer .footer_left { -} -.system_footer .footer_right { -} -/* *** END *** System *** System Footer *** */ - - -/* *** BEGIN *** System *** Debug *** */ -#hidden_system_debug { -} - -#System-Debug { - /* background-color: rgba(220,175,175,.95); */ - background-color: rgba(220,175,175,1); - - border: dashed thin pink; - - font-size: .7rem; - - opacity: .75; - transition: opacity .95s linear .5s; -} - -#System-Debug:hover { - border: solid thin pink; - - opacity: .95; - - /* background-color: rgba(220,175,175,1); */ -} - -.view_system_debug { - cursor: help; -} -/* *** END *** System *** Debug *** */ - - -/* *** BEGIN *** System *** Buttons *** */ -a.btn { - /* font-family: inherit; */ - /* font-size: inherit; */ - /* font-style: inherit; */ - /* font-weight: inherit; */ - /* line-height: inherit; */ - text-decoration: none; -} - -button.btn { - /* font-family: inherit; */ - /* font-size: inherit; */ - /* font-style: inherit; */ - /* font-weight: inherit; */ - /* line-height: inherit; */ - /* text-decoration: none; */ -} - -.btn { - appearance: button; - - display: inline-block; - - border: solid thin var(--default_btn_border_color); - border-radius: .25em; - - margin: .0em; - padding: .25em .5em; - - line-height: 1em; - font-size: 1em; - text-align: center; - - cursor: pointer; - - /*display: flex; - flex-direction: column; - flex-wrap: wrap; - justify-content: center; - align-items: center;*/ - - /* NOTE: transition when hover ends */ - transition-property: color, background-color, border-color; - transition-delay: var(--btn_trans_out_delay); /* short delay */ - transition-duration: var(--btn_trans_out_duration); - transition-timing-function: linear; -} -.btn:hover { - /* NOTE: transition when hover starts */ - transition-property: color, background-color, border-color; - transition-delay: var(--btn_trans_in_delay); /* no delay */ - transition-duration: var(--btn_trans_in_duration); - transition-timing-function: linear; -} - -.btn_default { - color: var(--default_btn_color); - background-color: var(--default_btn_bg_color); - border: solid thin var(--default_btn_border_color); -} -.btn_default:hover { - color: var(--default_btn_hover_color); - background-color: var(--default_btn_hover_bg_color); - border: solid thin var(--default_btn_hover_border_color); -} - -.btn_outline_default { - color: var(--default_btn_outline_color); - background-color: var(--default_btn_outline_bg_color); - border: solid thin var(--default_btn_outline_border_color); -} -.btn_outline_default:hover { - color: var(--default_btn_hover_color); - background-color: var(--default_btn_hover_bg_color); - border: solid thin var(--default_btn_hover_border_color); -} - -.btn_primary { - font-weight: var(--btn_font_weight_primary); - color: var(--primary_btn_color); - background-color: var(--primary_btn_bg_color); - border: solid thin var(--primary_btn_border_color); -} -.btn_primary:hover { - color: var(--primary_btn_hover_color); - background-color: var(--primary_btn_hover_bg_color); - border: solid thin var(--primary_btn_hover_border_color); -} - -.btn_outline_primary { - font-weight: var(--btn_font_weight_primary); - color: var(--primary_btn_outline_color); - background-color: var(--primary_btn_outline_bg_color); - border: solid thin var(--primary_btn_outline_border_color); -} -.btn_outline_primary:hover { - color: var(--primary_btn_hover_color); - background-color: var(--primary_btn_hover_bg_color); - border: solid thin var(--primary_btn_hover_border_color); -} - -.btn_secondary { - font-weight: var(--btn_font_weight_default); - color: var(--secondary_btn_color); - background-color: var(--secondary_btn_bg_color); - border: solid thin var(--secondary_btn_border_color); -} -.btn_secondary:hover { - color: var(--secondary_btn_hover_color); - background-color: var(--secondary_btn_hover_bg_color); - border: solid thin var(--secondary_btn_hover_border_color); -} - -.btn_outline_secondary { - font-weight: var(--btn_font_weight_default); - color: var(--secondary_btn_outline_color); - background-color: var(--secondary_btn_outline_bg_color); - border: solid thin var(--secondary_btn_outline_border_color); -} -.btn_outline_secondary:hover { - color: var(--secondary_btn_hover_color); - background-color: var(--secondary_btn_hover_bg_color); - border: solid thin var(--secondary_btn_hover_border_color); -} - -.btn_info { - color: var(--info_btn_color); - background-color: var(--info_btn_bg_color); - border: solid thin var(--info_btn_border_color); -} -.btn_info:hover { - color: var(--info_btn_hover_color); - background-color: var(--info_btn_hover_bg_color); - border: solid thin var(--info_btn_hover_border_color); -} - -.btn_outline_info { - color: var(--info_btn_outline_color); - background-color: var(--info_btn_outline_bg_color); - border: solid thin var(--info_btn_outline_border_color); -} -.btn_outline_info:hover { - color: var(--info_btn_hover_color); - background-color: var(--info_btn_hover_bg_color); - border: solid thin var(--info_btn_hover_border_color); -} - -.btn_success { - color: var(--success_btn_color); - background-color: var(--success_btn_bg_color); - border: solid thin var(--success_btn_border_color); -} -.btn_success:hover { - color: var(--success_btn_hover_color); - background-color: var(--success_btn_hover_bg_color); - border: solid thin var(--success_btn_hover_border_color); -} - -.btn_outline_success { - color: var(--success_btn_outline_color); - background-color: var(--success_btn_outline_bg_color); - border: solid thin var(--success_btn_outline_border_color); -} -.btn_outline_success:hover { - color: var(--success_btn_hover_color); - background-color: var(--success_btn_hover_bg_color); - border: solid thin var(--success_btn_hover_border_color); -} - -.btn_warning { - color: var(--warning_btn_color); - background-color: var(--warning_btn_bg_color); - border: solid thin var(--warning_btn_border_color); -} -.btn_warning:hover { - color: var(--warning_btn_hover_color); - background-color: var(--warning_btn_hover_bg_color); - border: solid thin var(--warning_btn_hover_border_color); -} - -.btn_outline_warning { - color: var(--warning_btn_outline_color); - background-color: var(--warning_btn_outline_bg_color); - border: solid thin var(--warning_btn_outline_border_color); -} -.btn_outline_warning:hover { - color: var(--warning_btn_hover_color); - background-color: var(--warning_btn_hover_bg_color); - border: solid thin var(--warning_btn_hover_border_color); -} - -.btn_danger { - color: var(--danger_btn_color); - background-color: var(--danger_btn_bg_color); - border: solid thin var(--danger_btn_border_color); -} -.btn_danger:hover { - color: var(--danger_btn_hover_color); - background-color: var(--danger_btn_hover_bg_color); - border: solid thin var(--danger_btn_hover_border_color); -} - -.btn_outline_danger { - color: var(--danger_btn_outline_color); - background-color: var(--danger_btn_outline_bg_color); - border: solid thin var(--danger_btn_outline_border_color); -} -.btn_outline_danger:hover { - color: var(--danger_btn_hover_color); - background-color: var(--danger_btn_hover_bg_color); - border: solid thin var(--danger_btn_hover_border_color); -} - -/* Button Modifiers */ -.btn.btn_active { -} -.btn.btn_disabled { - /* background-color: var(--site_menu_btn_disabled_bg_color); */ - /* border: solid thin var(--site_menu_btn_disabled_border_color); */ - - font-weight: var(--btn_font_weight_disabled); - /* color: var(--site_menu_btn_disabled_color); */ - text-decoration: line-through; -} -.btn.btn_sm { - line-height: 1em; - font-size: .9em; -} -.btn.btn_md { - line-height: 1em; - font-size: 1em; -} -.btn.btn_lg { - line-height: 1em; - font-size: 1.1em; -} - -ul.btn_list>li { - display: block; - /* margin: .75rem 0rem; */ - /* padding: 0; */ -} -ul.btn_list>li:hover { - outline: dashed thin pink; -} -/* *** END *** System *** Buttons *** */ - - -/*x-Small devices (portrait phones, less than 576px)*/ -@media (max-width: 575px) { - .btn { - padding: .1em .1em; - } -} - -/*Small devices (landscape phones, 576px and up)*/ -@media (min-width: 576px) and (max-width: 767px) { - .btn { - padding: .1em .25em; - } -} diff --git a/app/css/base_style_grid_event_launcher.css b/app/css/base_style_grid_event_launcher.css deleted file mode 100644 index 7a9b7d7..0000000 --- a/app/css/base_style_grid_event_launcher.css +++ /dev/null @@ -1,555 +0,0 @@ -html { -} -body { - /*padding-top: 2.6rem;*/ - /*padding-top: 1rem; - padding-left: 1rem; - padding-right: 1rem;*/ - /*padding-bottom: 2rem;*/ - padding-bottom: 0rem; - padding: .3rem; -} - -body>.body_container { - display: grid; - grid-template-columns: 100%; - /* grid-template-rows: min-content min-content min-content min-content max-content min-content min-content; */ - /*grid-template-rows: min-content min-content min-content max-content min-content;*/ - grid-template-rows: 100%; - gap: 0px 0px; - grid-auto-flow: row; - grid-template-areas: - /* "System-Nav-Menu" */ - "Site-Header" - "Site-Nav-Menu" - "System-Notifications" - "Main-Body" - "Site-Footer"; - /* "System-Footer"; */ - - max-width: 1440px; - margin: auto; - /*padding: 2.25rem 0rem 2rem;*/ /* top right/left bottom */ - - /*max-height: 100vh;*/ -} - -/* #System-Nav-Menu { grid-area: System-Nav-Menu; } */ -#Site-Header { grid-area: Site-Header; } -#Site-Nav-Menu { grid-area: Site-Nav-Menu; } -#System-Notifications { grid-area: System-Notifications; } -#Main-Body { - display: grid; - /*grid-template-columns: fit-content(15%) fit-content(85%);*/ - grid-template-columns: 15rem 1fr; - grid-template-rows: auto 1fr; - gap: 0px 0px; - grid-auto-flow: row; - grid-template-areas: - /*"Main-Nav-Menu Main-Notifications"*/ - "Main-Nav-Menu Main-Content"; - grid-area: Main-Body; -} -/*#Main-Notifications { grid-area: Main-Notifications; }*/ -#Main-Nav-Menu { grid-area: Main-Nav-Menu; } -#Main-Content { grid-area: Main-Content; } -#Site-Footer { grid-area: Site-Footer; } -/* #System-Footer { grid-area: System-Footer; } */ -/* #System-Nav-Menu-Float { } */ -/* #System-Debug { grid-area: System-Debug; } */ - - - -#System-Nav-Menu { - z-index: 1040; /* Bootstrap's modal background is also z-index: 1040 */ - - position: fixed; - top: 0; - left: 50%; - transform: translateX(-50%); - - width: 100vw; - max-width: 1440px; - - /* margin: auto; */ - padding-top: .03rem; - padding-left: .03rem; - padding-right: .03rem; - padding-bottom: .03rem; - - overflow: hidden; - - display: flex; - flex-direction: row; - justify-content: space-between; - - min-height: 2.25rem; - max-height: 2.25rem; - - /* NOTE: transition when no longer hovering */ - transition-property: height, max-height; - transition-delay: 4s; - transition-duration: .1s; - transition-timing-function: linear; -} - -#System-Nav-Menu:hover { - z-index: 1051; /* Bootstrap's modal background is z-index: 1040 */ - - /* height: auto; */ - max-height: 10rem; - - /* NOTE: transition when hover starts */ - transition-property: height, max-height; - transition-delay: 1.5s; - transition-duration: .15s; - transition-timing-function: linear; -} - -#System-Nav-Menu img { - max-height: 2rem; -} -#System-Nav-Menu:hover img { - max-height: 2.5rem; -} - -.system_menu_clicked { - z-index: 1051; /* Bootstrap's modal background is z-index: 1040 */ - - /* height: 5.5rem; */ - max-height: 10rem; - - /* NOTE: transition when hover starts */ - transition-property: height; - transition-delay: 0s; - transition-duration: .15s; - transition-timing-function: linear; -} - - -.system_menu_begin { - /*border: solid thin red;*/ - align-self: flex-end; - - display: flex; - /*align-content: center;*/ - align-items: center; - /*justify-content: center;*/ - - height: 100%; - padding: 0 .25rem; -} -.system_menu_begin:hover { -} - -.system_menu_center { - align-self: flex-end; - flex: auto; - - display: flex; - flex-direction: column; -} - -.system_menu_end { - align-self: flex-end; - - display: flex; - /*align-content: center;*/ - align-items: center; - /*justify-content: center;*/ - - height: 100%; - padding: 0 .25rem; -} -.system_menu_end:hover { -} - -.system_menu_hidden { - align-self: flex-end; - flex: auto; - width: 100%; - - display: flex; - flex-direction: row; - justify-content: space-between; - - margin: 0; - padding: .1rem .75rem; -} -.system_menu_hidden:hover { -} - -.system_menu_visible { - align-self: flex-end; - flex: auto; - width: 100%; - - display: flex; - flex-direction: row; - justify-content: space-between; - - margin: 0; - padding: .1rem .75rem; -} -.system_menu_visible:hover { -} - -.system_menu_name { - /*flex: auto;*/ - - display: flex; - flex-direction: row; - justify-content: flex-begin; - align-items: center; - - margin: 0; - padding: 0rem .5rem; -} - -.system_menu_name img { - max-height: 1rem; -} - -.system_menu_information { - /*border: dashed thin green;*/ - /*flex: auto;*/ - align-self: flex-end; - - display: flex; - flex-direction: row; - justify-content: flex-end; - align-items: center; - - margin: 0; - padding: 0rem .5rem; -} -.system_menu_information:hover { -} - -/* Set style based on the user's permissions */ -.system_menu.user_super { -} - -.system_menu.user_manager { -} - -.system_menu.user_administrator { -} - -.system_menu.user_verified { -} - -.system_menu.user_authenticated { -} - -.system_menu .user_status_options { -} -/* *** END *** System *** System Menu (root menu) *** */ - - -/* *** BEGIN *** System *** System Menu Floating/Fixed (root menu) *** */ -#System-Nav-Menu-Float { - z-index: 1040; - position: fixed; - top: .1rem; - right: .1rem; - - padding: .1rem .5rem; -} -/* *** END *** System *** System Menu Floating/Fixed (root menu) *** */ - - -#Site-Header { - position: relative; - - max-height: 10vh; - - margin: 0; - padding: .25rem; - - display: flex; - flex-direction: column; - /* flex-wrap: wrap; */ - justify-content: center; - align-items: center; - align-content: center; - - /* overflow: hidden; */ -} - -#Site-Header img { - /* max-height: 4rem; */ -} - - -/* *** BEGIN *** System *** System Site Nav Menu *** */ -#Site-Nav-Menu { - position: sticky; - top: 2.25rem; - - height: 3.0rem; - max-height: 3.0rem; - - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: center; /* flex-start */ - align-items: center; - /* align-content: center; */ -} - -#Site-Nav-Menu ul { - width: 100%; - - list-style-type: none; - - margin: 0; - padding: 0; - - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: center; /* flex-start */ - /* align-items: center; */ - /* align-content: center; */ -} - -#Site-Nav-Menu ul>li { - display: flex; /* inline */ - flex-direction: row; - flex-wrap: wrap; - justify-content: center; - align-items: center; - align-content: center; - - margin: .1rem .5rem; - padding: .2rem .4rem; -} - -#Site-Nav-Menu ul>li:hover { -} - -#Site-Nav-Menu ul>li.nav_disabled { -} -#Site-Nav-Menu ul>li.nav_active { -} -#Site-Nav-Menu ul>li.nav_primary { -} - -#Site-Nav-Menu .btn { -} -/* *** END *** System *** System Site Nav Menu *** */ - -#System-Notifications { -} - - -#Main-Body { - contain: content; - padding: .5rem .1rem; - - min-height: 90vh; - - /*max-height: 100%;*/ -} - -#Main-Notifications { -} - - -/* *** BEGIN *** System *** System Site Nav Menu *** */ -#Main-Nav-Menu { - contain: content; - - margin: 0; - padding: 0; - - display: flex; - flex-direction: column; - /*flex-wrap: wrap;*/ - /*justify-content: flex-start;*/ /* flex-start */ - /*align-items: center;*/ - /*align-content: center;*/ -} - -#Main-Nav-Menu .m_btn { - appearance: button; - - height: auto; - width: auto; - - inline-size: auto; - - margin: .1rem .5rem; - padding: .2rem .4rem; -} - -#Main-Nav-Menu .m_btn:hover { -} -/* *** END *** System *** System Main Nav Menu *** */ - -#Main-Content { - contain: content; - - /*max-height: 100%; - min-height: 100vh; - max-height: 100vh;*/ - - overflow: auto; - - padding: .75rem; -} - - -/* *** BEGIN *** System *** Site Footer *** */ -/* site_footer or site_footer or site_status is the global (root) footer or status bar */ -#Site-Footer { - max-height: 1.75rem; - - /* width: 100%; - max-width: 1440px; */ - - margin: 0 0; - padding: 0 .5rem; -} - -#Site-Footer:hover { -} - -.site_footer .footer_left { - float: left; -} -.site_footer .footer_right { - float: right; -} -/* *** END *** System *** Site Footer *** */ - - - -/* *** BEGIN *** System *** System Footer *** */ -/* system_footer or system_footer or system_status is the global (root) footer or status bar */ -#System-Footer { - z-index: 1040; /* Bootstrap's modal background is also z-index: 1040 */ - - max-height: 1.5rem; - - width: 100%; - max-width: 1440px; - - position: fixed; - bottom: 0; - left: 50%; - transform: translateX(-50%); - - width: 100vw; - max-width: 1440px; - - /* margin: auto; */ - padding: 0 .5rem; -} - -#System-Footer:hover { -} - -.system_footer .footer_left { - float: left; -} -.system_footer .footer_right { - float: right; -} -/* *** END *** System *** System Footer *** */ - - -/* *** BEGIN *** System *** Debug *** */ -#hidden_system_debug { - display: none; -} - -#System-Debug { - z-index: 1050; /* Bootstrap 4 sticky-top class has a z-index of 1020 */ - position: fixed; - /* top: 1rem; */ - right: 0rem; - /* left: 0rem; */ - bottom: 1.5rem; - - margin: 0rem; - padding: .1rem; - - overflow: hidden; - - height: 100%; - max-height: 2rem; - width: 50%; - max-width: 2rem; - - /* NOTE: transition when hover ends */ - transition-property: height, max-height, width, max-width; - transition-delay: 4s; /* short delay */ - transition-duration: .15s; - transition-timing-function: linear; -} - -#System-Debug:hover { - z-index: 1051; - - overflow-y: auto; - - max-height: calc(100vh - 5rem); - max-width: calc(100vh - 2rem); - - /* NOTE: transition when hover starts */ - transition-property: height, max-height, width, max-width, opacity; - transition-delay: .5s; /* min delay */ - transition-duration: .15s; - transition-timing-function: linear; -} - -.view_system_debug { -} -/* *** END *** System *** Debug *** */ - - -/*x-Small devices (portrait phones, less than 576px)*/ -@media (max-width: 575px) { - body { - padding-left: .1rem; - padding-right: .1rem; - } -} - -/*Small devices (landscape phones, 576px and up)*/ -@media (min-width: 576px) and (max-width: 767px) { - body { - padding-left: .5rem; - padding-right: .5rem; - } -} - - - - - -/* #System-Nav-Menu { outline: dashed thin red; } */ -/* #Site-Header { outline: dashed thin red; } */ -/* #Site-Nav-Menu { outline: dashed thin pink; } */ -/* #System-Notifications { outline: dashed thin red; } */ -/*#Main-Body { outline: dotted thin green; }*/ -/*#Main-Notifications { outline: dotted thin blue; }*/ -/*#Main-Nav-Menu { outline: dotted thin blue; }*/ -/*#Main-Content { outline: dotted thin blue; }*/ -/* #Site-Footer { outline: dotted thin blue; } */ -/* #System-Footer { outline: dashed thin red; } */ -/* #System-Debug { outline: dashed thin red; } */ - -#System-Nav-Menu { display: none; } - #Site-Header { display: none; } -#Site-Nav-Menu { display: none; } -#System-Notifications { display: none; } -/* #Main-Body { display: none; } */ -/* #Main-Notifications { display: none; } */ -/* #Main-Nav-Menu { display: none; } */ -/* #Main-Content { display: none; } */ -#Site-Footer { display: none; } -#System-Footer { display: none; } -#System-Debug { display: none; } diff --git a/app/css/event_launcher.css b/app/css/event_launcher.css deleted file mode 100644 index 76cfd41..0000000 --- a/app/css/event_launcher.css +++ /dev/null @@ -1,292 +0,0 @@ -.event_launcher_file_cont { - max-width: 100%; -} -.event_launcher_file_cont .event_file_meta { - color: hsla(0,0%,50%,1); - font-size: smaller; -} -.event_launcher_file_cont .event_file_meta:hover { - color: hsla(0,0%,0%,1); -} -.event_launcher_file_cont .event_file_download { - color: hsla(0,0%,50%,1); - font-size: smaller; -} -.event_launcher_file_cont .event_file_download:hover { - color: hsla(0,0%,0%,1); -} - -.event_launcher_file_cont .download_clicked { - font-size: 1.25em; -} - -.event_launcher_file_cont .download_clicked>strong { - font-size: 1.75em; -} - - - - -.event_launcher_message { - background: yellow; - padding: .5em; -} -.event_launcher_message>header { - margin: .1em; - padding: .1em; - border-bottom: solid thin gray; -} -.event_launcher_message h1 { - font-size: 2em; - margin: 0; - padding: 0; -} -.event_launcher_message>section { - font-size: 1.6em; - margin: .1em; - padding: .1em; -} - - -.event_launcher_main_nav_menu { - contain: content; - - display: flex; - flex-direction: column; - flex-wrap: wrap; - justify-content: flex-start; /* flex-start */ - align-items: center; - /*align-content: center;*/ - - background-color: hsla(0,0%,100%,.98); - font-size: 1.1em; - - padding-right: .1em; - - border-right: solid medium hsla(0,0%,90%,1); -} - -.event_launcher_main_nav_menu section { - margin: 0; - padding: 0; - - min-width: 100%; - max-width: 100%; - - contain: content; - - display: flex; - flex-direction: column; - flex-wrap: wrap; - justify-content: flex-start; - align-items: center; -} - -.event_launcher_main_nav_menu h1,h2 { - margin: 0; - padding: 0; - - font-size: 1em; - font-weight: bold; -} - -.event_launcher_main_nav_menu ul { - margin: 0; - padding: 0; - - min-width: 100%; - max-width: 100%; - - list-style-type: none; - - display: flex; - flex-direction: column; - flex-wrap: wrap; - justify-content: center; /* flex-start */ - /* align-items: center; */ - /* align-content: center; */ -} - -.event_launcher_main_nav_menu ul>li { - margin: 0; - padding: 0; - - min-width: 100%; - max-width: 100%; - - /*display: flex; - flex-direction: column; - flex-wrap: wrap; - justify-content: center; - align-items: center; - align-content: center;*/ -} - -.event_launcher_main_nav_menu .btn { - min-width: 100%; - max-width: 100%; - - border-radius: .25em; - margin: .1em 0em; -} - -.event_launcher_main_nav_menu .event_session_selector_btn { - display: flex; - flex-direction: row; - flex-wrap: no-wrap; - justify-content: space-between; - align-items: center; - /*align-content: center;*/ -} -.event_session_selector_btn .event_session_datetime { - outline: dashed thin green; - transform: rotate(-15deg); - - text-align: center; - font-size: .7em; - min-width: 5em; - - margin: .1em .2em; -} - -.event_launcher_main_nav_menu .event_launcher_event { - font-size: .8em; -} - -.event_launcher_main_nav_menu .event_launcher_location { - font-size: .8em; -} - -.event_launcher_main_nav_menu .event_launcher_options { - margin-top: 1em; -} - -.event_launcher_options_fixed { - margin: .1em .4em; - padding: 0; - - position: fixed; - top: 0; - right: 0; - width: 5em; - - z-index: 500; -} - -.event_launcher_status { - outline: dashed thin red; - margin: .1em .4em; - padding: .0em; - - position: fixed; - bottom: 0; - right: 0; - /* width: 12em; */ - - z-index: 500; - - display: flex; - flex-direction: row; - /* flex-wrap: nowrap; */ - justify-content: center; - align-items: center; - align-content: center; - - font-size: .7em; -} -.event_launcher_status:hover { - font-size: 1.1em; - font-weight: bold; -} - -.event_launcher_status > .network_status { - margin: .2em .2em; -} - -.event_launcher_status > .current_datetime { - margin: .2em .2em; -} - - -.event_launcher_main_content header.event_session_about { - border-bottom: solid thin hsla(0,0%,50%,1); -} -.event_launcher_main_content header.event_session_about>h2 { - margin: .1em 0; - padding: .1em 0; -} -.event_launcher_main_content .event_session_datetimes { - font-size: .8em; -} -.event_launcher_main_content section.event_session_description { - border-bottom: solid thin hsla(0,0%,75%,1); - font-size: .8em; -} -.event_launcher_main_content section.event_session_file_list { - border-bottom: solid thin hsla(0,0%,75%,1); -} - -.event_launcher_main_content .event_session_file_list li { - margin: .5em 0em; -} - -.event_launcher_main_content section.event_presentation_list { - /* border-top: solid thin hsla(0,0%,75%,1); */ -} -.event_launcher_main_content ul.event_presentation_list { - margin: 0; - padding: 0; -} -.event_launcher_main_content .event_presentation_list>li { - margin: 1em 0em; -} -.event_launcher_main_content ul.event_presentation_list>li { - display: block; -} -.event_launcher_main_content ul.event_presentation_list>li:hover { - outline: dashed thin pink; - background-color: hsla(0,0%,95%,1); -} - -.event_launcher_main_content ul.event_presentation_list>li>ul>li { - margin: .5em 0em; -} - -ul.event_presentation_list .btn_list>li { - margin: .25em 0em; -} - -.event_launcher_main_content .event_presentation_datetime_name { - - display: flex; - flex-direction: row; - /*flex-wrap: no-wrap;*/ - /*justify-content: space-between;*/ - justify-content: left; - align-items: center; - align-content: center; - - background-color: hsla(0,0%,90%,1); - - font-size: 1.1em; - font-weight: bold; - -} - -.event_launcher_main_content .event_presentation_datetime_name .event_presentation_datetime { - /*align-self: flex-start;*/ - /*border-right: dashed thin green;*/ - - text-align: center; - font-size: .7em; - min-width: 5em; - - margin: .1em .2em; -} - -.event_launcher_main_content .event_presentation_datetime_name .event_presentation_name { - border-left: solid thin gray; - - margin: .1em .2em; - padding-left: .2em; -} diff --git a/app/css/native_app.css b/app/css/native_app.css deleted file mode 100644 index a5874ab..0000000 --- a/app/css/native_app.css +++ /dev/null @@ -1,151 +0,0 @@ -body { - margin: 0rem; - padding: 0rem; - /*border: solid thin pink;*/ - margin-bottom: 1rem; /* This is for the bottom status bar. */ -} - -body > .container { /* allow the container directly under body to be 100% wide*/ - /*max-width: 100%;*/ - - margin: .1rem; - padding: .1rem; - /*border: solid thin pink;*/ -} - -body > .container > .row { /* allow the container directly under body to be 100% wide*/ - margin-right: 0; - margin-left: 0; - margin: .1rem; - padding: .1rem; -} - -.app_status_bar { - position: fixed; - bottom: 0; - width: 100%; - margin: 0 0; - padding: 0 .5rem; - background: #eee; -} - -.app_status_bar:hover { - font-size: 2.5rem; -} - -.app_network_status { - - background: #eee; -} - -.app_datetime { - float: right; -} - -.app_warning { - background: yellow; -} - -.btn_no_case { - text-transform: none; -} - -/* -.btn-info { - background: green; -} - -.btn-info:hover { - background: darkgreen; -} - - -mynewcolor:#77cccc; - -.btn-info { - @include button-variant($mynewcolor, darken($mynewcolor, 7.5%), darken($mynewcolor, 10%), lighten($mynewcolor,5%), lighten($mynewcolor, 10%), darken($mynewcolor,30%)); -} - -.btn-outline-primary { - @include button-outline-variant($mynewcolor, #222222, lighten($mynewcolor,5%), $mynewcolor); -} -*/ - - -.filename { - /* - margin-left: .1rem; - padding-left: .1rem; - */ -} - - -.menu_session_time { - font-weight: bold; -} - -.menu_session_code, .detail_session_code { - margin-left: .1rem; - padding-left: .1rem; - font-size: .5em; -} - -.session_detail>h2 { - background-color: #F7F7F7; - /*border-bottom: solid .1rem black;*/ -} - -.detail_session_code { - margin-left: .1rem; - padding-left: .1rem; - font-size: .5em; -} - - - -.bd-placeholder-img { - font-size: 1.125rem; - text-anchor: middle; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - -@media (min-width: 768px) { - .bd-placeholder-img-lg { - font-size: 3.5rem; - } -} - -#file_import_drag_area { - font-size: 3rem; - font-weight: 600; - width: 90%; - height: 15rem; -} - -#file_import_drag_area:hover { - font-size: 3.5rem; - font-weight: 1000; -} - -#file_import_drag_area:hover:before { - /*font-weight: 1000; - content: 'Here';*/ -} - -#file_import_drag_area::before { - content: attr(data-value); - - position: relative; - top: 0; - right: 0; - width: 100%; - height: 15rem; - /*border: 1px solid red;*/ - display: flex; - flex-direction: row; - align-items: center; - justify-content: center; -} diff --git a/app/index.html b/app/index.html index fe78584..6b4a5f0 100644 --- a/app/index.html +++ b/app/index.html @@ -4,7 +4,7 @@ - One Sky IT + One Sky IT's Aether App @@ -15,27 +15,29 @@ - - - - - - - + + + - - - - - - + + + + + + + + + + + + @@ -52,12 +54,10 @@ - - - + - + - + diff --git a/app/js/app_v3.js b/app/js/aether_native_app_v3.js similarity index 100% rename from app/js/app_v3.js rename to app/js/aether_native_app_v3.js diff --git a/app/js/app_api.js b/app/js/app_api.js deleted file mode 100644 index de260b6..0000000 --- a/app/js/app_api.js +++ /dev/null @@ -1,441 +0,0 @@ -async function api_token_request_async(axios, secret_key) { - console.log('****************** API Token Request ******************'); - console.log('Requesting API temporary token...'); - - if (waiting_on_api_token) { - console.log('Already waiting on an API token request. Not starting another until finished.'); - return false; - } else { - waiting_on_api_token = true; - - const url = '/api_token_request'; - - let data = { secret_key: secret_key }; - - const result = await axios.post(url, data) - .then(function (response) { - //console.log(response); - const api_temporary_token = response.data.temporary_token; - //console.log('API Temporary Token: '+temporary_token); - return api_temporary_token; - }) - .catch(function (error) { - console.error(error); - return false; - }); - - waiting_on_api_token = false; - return result; - } - - return false; -} - - -async function get_event_details(axios, event_id) { - console.log('Requesting event details...'); - const url = '/event/'+event_id; - - const data = await axios.get(url) - .then(function (response) { - //console.log(response.data); - //data = response.data; - return response.data; - }) - .catch(function (error) { - console.log(error); - return error; - }); - - return data; -} - - -async function get_event_location_details(axios, event_id, event_location_id) { - console.log('Requesting event location details...'); - const url = '/event/'+event_id+'/location/'+event_location_id; - - const data = await axios.get(url) - .then(function (response) { - //console.log(response.data); - //data = response.data; - return response.data; - }) - .catch(function (error) { - console.log(error); - return error; - }); - - return data; -} - - -async function get_event_location_sessions(axios, event_id, event_location_id) { - console.log('Requesting location sessions...'); - const url = '/event/'+event_id+'/location/'+event_location_id+'/session'; - - const data = await axios.get(url) - .then(function (response) { - //console.log(response.data); - //data = response.data; - return response.data; - }) - .catch(function (error) { - console.log(error); - return error; - }); - - return data; -} - - -async function get_session_presentations(axios, event_id, event_session_id) { - console.log('Requesting session presentations...'); - const url = '/event/'+event_id+'/session/'+event_session_id+'/presentation'; - - const data = await axios.get(url) - .then(function (response) { - //console.log(response.data); - //data = response.data; - return response.data; - }) - .catch(function (error) { - console.log(error); - return error; - }); - - return data; -} - - -async function get_presentation_presenters(axios, event_id, event_session_id, event_presentation_id) { - console.log('Requesting presentation presenters...'); - const url = '/event/'+event_id+'/session/'+event_session_id+'/presentation/'+event_presentation_id+'/presenter'; - - const data = await axios.get(url) - .then(function (response) { - //console.log(response.data); - //data = response.data; - return response.data; - }) - .catch(function (error) { - console.log(error); - return error; - }); - - return data; -} - - -async function get_files_for_type_for_id(axios, for_type, for_id) { - console.log('Requesting files for '+for_type+' '+for_id); - const url = '/event/file/'+for_type+'/'+for_id; - - const data = await axios.get(url) - .then(function (response) { - //console.log(response.data); - //data = response.data; - return response.data; - }) - .catch(function (error) { - console.log(error); - return error; - }); - - return data; -} - -/* -async function download_file_id(axios, file_id, filename) { - - ipcRenderer.send('download_file', api_base_url, api_endpoint, api_temporary_token, save_path); // in render thread - - console.log('1: download file id '+file_id); - const url = '/event/file/'+file_id+'/download'; - - //const data = await axios.get(url, responseType: 'stream') - const data = await axios({ - method: "get", - url: url, - responseType: "stream" - }) - .then(function (response) { - console.log('2: downloaded file id '+file_id); - console.log(response); - //console.log(response.data); - - let filename = 'default.txt'; - - if (typeof filename_override === 'undefined' || filename_override == null) { - let headerLine = response.data.headers['content-disposition']; - - console.log(headerLine); - console.log(headerLine.indexOf('="')); - console.log(headerLine.indexOf('=')); - if (headerLine.indexOf('="') != -1) { - let startFileNameIndex = headerLine.indexOf('="') + 2; - let endFileNameIndex = headerLine.lastIndexOf('"'); - filename = headerLine.substring(startFileNameIndex, endFileNameIndex); - } else if (headerLine.indexOf('=') != -1) { - let startFileNameIndex = headerLine.indexOf('=') + 1; - let endFileNameIndex = headerLine.length; - filename = headerLine.substring(startFileNameIndex, endFileNameIndex); - } else { - filename = 'filename_not_found_in_header.txt'; - } - } else { - filename = filename_override; - } - - let directory = 'file_cache/'; - - directory_and_filename = path.join(directory, filename); - - //console.log(directory_and_filename); - - if (fs.existsSync(directory_and_filename)) { - console.log('3a: file already exists: '+directory_and_filename); - } else { - console.log('3b: saving file: '+directory_and_filename); - response.data.pipe(fs.createWriteStream(directory_and_filename)); - } - //data = response.data; - console.log('4: saved file id '+file_id); - return true; - //return response.data; - }) - .catch(function (error) { - console.log(error); - return error; - }); - - //return data; -} -*/ - -/* v2 Section */ - -async function v2_get_account_events(axios, account_id) { - console.log('Requesting account events...'); - const url = '/v2/account/'+account_id+'/events'; - - const data = await axios.get(url) - .then(function (response) { - console.log('v2 account events data: ***'); - console.log(response.data); - console.log('v2 account events data: ^^^'); - return response.data; - }) - .catch(function (error) { - console.log(error); - return error; - }); - - return data; -} - - -async function v2_get_event_locations(axios, event_id) { - console.log('Requesting event locations...'); - const url = '/v2/event/'+event_id+'/event_locations'; - - const data = await axios.get(url) - .then(function (response) { - console.log('v2 event locations data: ***'); - console.log(response.data); - console.log('v2 event locations data: ^^^'); - return response.data; - }) - .catch(function (error) { - console.log(error); - return error; - }); - - return data; -} - - -async function v2_get_event_sessions(axios, event_id) { - console.log('Requesting event sessions...'); - const url = '/v2/event/'+event_id+'/event_sessions'; - - const data = await axios.get(url) - .then(function (response) { - console.log('v2 location sessions data: ***'); - console.log(response.data); - console.log('v2 location sessions data: ^^^'); - return response.data; - }) - .catch(function (error) { - console.log(error); - return error; - }); - - return data; -} - - - -async function v2_get_event_location_sessions(axios, event_location_id) { - console.log('Requesting location sessions...'); - const url = '/v2/event_location/'+event_location_id+'/event_sessions'; - - const data = await axios.get(url) - .then(function (response) { - console.log('v2 location sessions data: ***'); - console.log(response.data); - console.log('v2 location sessions data: ^^^'); - return response.data; - }) - .catch(function (error) { - console.log(error); - return error; - }); - - return data; -} - - -async function v2_get_event_location_presentations(axios, event_location_id) { - console.log('Requesting location presentations...'); - const url = '/v2/event_location/'+event_location_id+'/event_presentations'; - - const data = await axios.get(url) - .then(function (response) { - console.log('v2 location presentations data: ***'); - console.log(response.data); - console.log('v2 location presentations data: ^^^'); - return response.data; - }) - .catch(function (error) { - console.log(error); - return error; - }); - - return data; -} - - -async function v2_get_event_location_presenters(axios, event_location_id) { - console.log('Requesting location presenters...'); - const url = '/v2/event_location/'+event_location_id+'/event_presenters'; - - const data = await axios.get(url) - .then(function (response) { - console.log('v2 location presenters data: ***'); - console.log(response.data); - console.log('v2 location presenters data: ^^^'); - return response.data; - }) - .catch(function (error) { - console.log(error); - return error; - }); - - return data; -} - - -async function v2_get_event_files(axios, event_id) { - console.log('Requesting event files...'); - const url = '/v2/event/'+event_id+'/event_files'; - - const data = await axios.get(url) - .then(function (response) { - console.log('v2 location files data: ***'); - console.log(response.data); - console.log('v2 location files data: ^^^'); - //data = response.data; - return response.data; - }) - .catch(function (error) { - console.log(error); - return error; - }); - - return data; -} - - -async function v2_get_event_location_files(axios, event_location_id) { - console.log('Requesting location files...'); - const url = '/v2/event_location/'+event_location_id+'/event_files'; - - const data = await axios.get(url) - .then(function (response) { - console.log('v2 location files data: ***'); - console.log(response.data); - console.log('v2 location files data: ^^^'); - //data = response.data; - return response.data; - }) - .catch(function (error) { - console.log(error); - return error; - }); - - return data; -} - - -async function v2_get_event_location_files_sessions(axios, event_location_id) { - console.log('Requesting all session files for a location...'); - const url = '/v2/event_location/'+event_location_id+'/event_files/sessions'; - - const data = await axios.get(url) - .then(function (response) { - console.log('v2 location files data: ***'); - console.log(response.data); - console.log('v2 location files data: ^^^'); - //data = response.data; - return response.data; - }) - .catch(function (error) { - console.log(error); - return error; - }); - - return data; -} - - -async function v2_get_event_location_files_presentations(axios, event_location_id) { - console.log('Requesting all presentation files for a location...'); - const url = '/v2/event_location/'+event_location_id+'/event_files/presentations'; - - const data = await axios.get(url) - .then(function (response) { - console.log('v2 location files data: ***'); - console.log(response.data); - console.log('v2 location files data: ^^^'); - //data = response.data; - return response.data; - }) - .catch(function (error) { - console.log(error); - return error; - }); - - return data; -} - - -async function v2_get_event_location_files_presenters(axios, event_location_id) { - console.log('Requesting all presenter files for a location...'); - const url = '/v2/event_location/'+event_location_id+'/event_files/presenters'; - - const data = await axios.get(url) - .then(function (response) { - console.log('v2 location files data: ***'); - console.log(response.data); - console.log('v2 location files data: ^^^'); - //data = response.data; - return response.data; - }) - .catch(function (error) { - console.log(error); - return error; - }); - - return data; -} diff --git a/app/js/app_idb.js b/app/js/app_idb.js deleted file mode 100644 index b4a262a..0000000 --- a/app/js/app_idb.js +++ /dev/null @@ -1,59 +0,0 @@ -console.log('Using app_idb.js'); - -async function load_idb_tables() { - console.log('****************** Load IDB Tables ******************'); - console.log('Loading IDB tables...'); - - localforage.config({ - driver: localforage.INDEXEDDB, - version: 1, - name: idb_name - }); - - tbl_event = await localforage.createInstance({ - name: idb_name, - storeName: 'event', - }); - console.log('tbl_event count: '+ await tbl_event.length()); - tbl_event_key_count = await tbl_event.length(); - - tbl_event_location = await localforage.createInstance({ - name: idb_name, - storeName: 'event_location', - }); - console.log('tbl_event_location count: '+ await tbl_event_location.length()); - tbl_event_location_key_count = await tbl_event_location.length(); - - tbl_event_session = await localforage.createInstance({ - name: idb_name, - storeName: 'event_session', - }); - console.log('tbl_event_session count: '+ await tbl_event_session.length()); - tbl_event_session_key_count = await tbl_event_session.length(); - - tbl_event_presentation = await localforage.createInstance({ - name: idb_name, - storeName: 'event_presentation', - }); - console.log('tbl_event_presentation count: '+ await tbl_event_presentation.length()); - tbl_event_presentation_key_count = await tbl_event_presentation.length(); - - tbl_event_presenter = await localforage.createInstance({ - name: idb_name, - storeName: 'event_presenter', - }); - console.log('tbl_event_presenter count: '+ await tbl_event_presenter.length()); - tbl_event_presenter_key_count = await tbl_event_presenter.length(); - - - tbl_event_file = await localforage.createInstance({ - name: idb_name, - storeName: 'event_file', - }); - console.log('tbl_event_file count: '+ await tbl_event_file.length()); - tbl_event_file_key_count = await tbl_event_file.length(); - - console.log('IDB tables have now been opened.'); - - return true; -} diff --git a/app/js/app_ui_files.js b/app/js/app_ui_files.js deleted file mode 100644 index 8185566..0000000 --- a/app/js/app_ui_files.js +++ /dev/null @@ -1,228 +0,0 @@ -// This function is used to render all event, location, session, presentation, and presenter file records to the UI. -//exports.render_event_file_records = async function () { -async function render_event_file_records() { - console.log('****************** Files ******************'); - console.log('Rendering all event, location, session, presentation, and presenter file records...'); - - if (looping_tbl_event_file) { - console.log('Already looping through the tbl_event_file table. Not starting until finished.'); - return false; - } else { - - } - - looping_tbl_event_file = true; - - console.log('Iterating through the tbl_event_file table...'); - let tbl_event_file_result = await tbl_event_file.iterate(function(value, key, iteration) { - let tbl_file_id = value.id; - let tbl_hosted_file_id = value.hosted_file_id; - let tbl_event_id = value.event_id; - let tbl_location_id = value.event_location_id; - let tbl_session_id = value.event_session_id; - let tbl_presentation_id = value.event_presentation_id; - let tbl_presenter_id = value.event_presenter_id; - let tbl_for_type = value.for_type; - let tbl_for_id = value.for_id; - let tbl_hash_sha256 = value.hosted_file_hash_sha256; - let tbl_filename = value.filename; // This could also be event_file_filename, internal_filename, private_filename, public_filename, or hosted_file_filename - let tbl_size = value.hosted_file_size; - let tbl_created_on = value.created_on; - let tbl_updated_on = value.created_on; - let tbl_internal_os = value.internal_os; - - console.log('tbl_event_file iteration='+iteration+' | tbl_file_id='+tbl_file_id+' for tbl_event_id='+tbl_event_id+' at location tbl_location_id='+tbl_location_id+'.'); - - if (tbl_event_id == event_id && tbl_for_type == 'event') { - console.log('EVENT FILE **************************'); - document.getElementById('event_files_menu').classList.remove('d-none'); - document.getElementById('event_files_menu').classList.add('d-block'); - } - - if (tbl_location_id == event_location_id && tbl_for_type == 'location') { - console.log('LOCATION FILE **************************'); - document.getElementById('location_files_menu').classList.remove('d-none'); - document.getElementById('location_files_menu').classList.add('d-block'); - } - - //add_file_id = false; - remove_file_id = true; - if (tbl_event_id == event_id/* && tbl_location_id == event_location_id*/) { - console.log('Match for event_id='+event_id+' and event_location_id='+event_location_id); - file_li_node = document.getElementById('event_file_'+tbl_file_id); - if (file_li_node) { - console.log('event_file ('+tbl_file_id+') node found... check and remove/update.'); - if (file_li_node.getAttribute('data-for_type') == tbl_for_type && file_li_node.getAttribute('data-for_id') == tbl_for_id) { - console.log('This file is still for_type='+tbl_for_type+' and for_id='+tbl_for_id+'.'); - file_li_node.setAttribute('data-filename', tbl_filename); - - let new_filename = shorten_filename(tbl_filename); - file_li_node.getElementsByClassName('filename')[0].innerHTML = new_filename; - try { - file_li_node.getElementsByClassName('file_meta')[0].innerHTML = format_bytes(tbl_size, 2)+'; '+dateFns.format(tbl_created_on, 'MMM M h:mm A')+'; '+tbl_internal_os; - } catch(err) { - console.log('file_meta span not found. This is ok for event and location specific files.'); - } - - file_li_node.setAttribute('data-size', tbl_size); - - file_li_node.setAttribute('data-created_on', dateFns.format(tbl_created_on, 'YYYY-MM-DD HH:mm:ss A')); - file_li_node.setAttribute('data-updated_on', dateFns.format(tbl_updated_on, 'YYYY-MM-DD HH:mm:ss A')); - - file_li_node.setAttribute('data-internal_os', tbl_internal_os); - - - remove_file_id = false; - } else { - console.log('This file no longer matching for_type='+tbl_for_type+' and for_id='+tbl_for_id+'. Removing...'); - file_li_node.remove(); - remove_file_id = false; - } - } else if (!file_li_node) { - console.log('event_file ('+tbl_file_id+') node NOT found... check and add.'); - - let node_id = tbl_for_type+'_files_list_'+tbl_for_id; - console.log(node_id); - let parent_ul_node = document.getElementById(node_id); - console.log(parent_ul_node); - if (parent_ul_node) { - // Trying to remove old ID in case there is one already rendered - console.log('Trying to remove an old file LI node if it exists...'); - try { - document.getElementById('event_file_'+tbl_file_id).remove(); - } catch(err) { - //console.log('A node with the ID of event_file_'+tbl_file_id+' was not found.'); - console.log('This event file list item node was not found. In most cases this is expected.'); - console.log(err.message); - } - - let file_li_node = document.createElement('LI'); - file_li_node.id = 'event_file_'+tbl_file_id; - if (tbl_for_type != 'event' && tbl_for_type != 'location') { - file_li_node.className = 'list-group-item btn btn-primary d-flex justify-content-between align-items-center open_local_file event_file'; - //file_li_node.className = 'list-group-item btn btn-primary justify-content-between align-items-center open_local_file event_file'; - } else { - file_li_node.className = 'list-group-item btn btn-sm btn-secondary d-flex justify-content-between align-items-center open_local_file event_file'; - //file_li_node.className = 'list-group-item btn btn-sm btn-secondary justify-content-between align-items-center open_local_file event_file'; - } - file_li_node.setAttribute('data-file_id', tbl_file_id); - - - file_li_node.setAttribute('data-event_id', tbl_event_id); - file_li_node.setAttribute('data-location_id', tbl_location_id); - file_li_node.setAttribute('data-session_id', tbl_session_id); - file_li_node.setAttribute('data-presentation_id', tbl_presentation_id); - file_li_node.setAttribute('data-presenter_id', tbl_presenter_id); - - file_li_node.setAttribute('data-for_type', tbl_for_type); - file_li_node.setAttribute('data-for_id', tbl_for_id); - - file_li_node.setAttribute('data-hash_sha256', tbl_hash_sha256+'.file'); - file_li_node.setAttribute('data-filename', tbl_filename); - file_li_node.setAttribute('data-size', tbl_size); - - file_li_node.setAttribute('data-created_on', dateFns.format(tbl_created_on, 'YYYY-MM-DD HH:mm:ss A')); - file_li_node.setAttribute('data-updated_on', dateFns.format(tbl_updated_on, 'YYYY-MM-DD HH:mm:ss A')); - - file_li_node.setAttribute('data-internal_os', tbl_internal_os); - - file_li_node.title = 'Click to open "'+tbl_filename+'" | id='+tbl_file_id+' | for_type='+tbl_for_type+' | for_id='+tbl_for_id+' | updated_on='+dateFns.format(tbl_updated_on, 'YYYY-MM-DD HH:mm:ss A'); - - let file_fa_span_node = document.createElement('SPAN'); - file_fa_span_node.className = 'fas fa-external-link-alt'; - - let file_filename_span_node = document.createElement('SPAN'); - - - file_filename_span_node.className = 'filename'; - - let new_filename = shorten_filename(tbl_filename); - let filename_text_node = document.createTextNode(new_filename); - file_filename_span_node.appendChild(filename_text_node); - - file_li_node.appendChild(file_fa_span_node); - file_li_node.appendChild(file_filename_span_node); - - // We do not want the badge to show in the left menu. Not enough space. - if (tbl_for_type != 'event' && tbl_for_type != 'location') { - let file_badge_span_node = document.createElement('SPAN'); - file_badge_span_node.className = 'badge badge-pill badge-light float-right file_meta'; - - let badge_text_node = document.createTextNode(format_bytes(tbl_size, 2)+'; '+dateFns.format(tbl_created_on, 'MMM M h:mm A')+'; '+tbl_internal_os); - file_badge_span_node.appendChild(badge_text_node); - - file_li_node.appendChild(file_badge_span_node); - } - - - - console.log(file_li_node); - - parent_ul_node.appendChild(file_li_node); - remove_file_id = false; - } - - } - - // NOTE: This is probably not needed? - if (remove_file_id) { - // Trying to remove old ID in case there is one already rendered - console.log('Trying to remove an old file LI node if it exists...'); - try { - document.getElementById('event_file_'+tbl_file_id).remove(); - } catch(err) { - //console.log('A node with the ID of event_file_'+tbl_file_id+' was not found.'); - console.log('This event file list item node was not found. In most cases this is expected.'); - console.log(err.message); - } - } - - console.log('XXXXX ******** STARTING SORT ******** XXXXX'); - let node_id = tbl_for_type+'_files_list_'+tbl_for_id; - console.log(node_id); - try { - var categoryItems = document.getElementById(node_id).childNodes; - console.log(categoryItems); - - var categoryItemsArray = Array.from(categoryItems); - - function sorter(a, b) { - if (a.dataset.updated_on > b.dataset.updated_on) return -1; - if (a.dataset.updated_on < b.dataset.updated_on) return 1; - } - - let sorted = categoryItemsArray.sort(sorter); - - function update_li_order(item, index) { - document.getElementById(node_id).appendChild(item); - } - - sorted.forEach(update_li_order); - } catch(err) { - console.log(err); - } - console.log('******** FINISHED SORT ********'); - - - - } else { - console.log('This file ('+tbl_file_id+') is not part of this event and or location'); - console.log('tbl_event_id='+tbl_event_id+' ?= event_id='+event_id); - console.log('tbl_location_id='+tbl_location_id+' ?= event_location_id='+event_location_id); - } - }).then(function() { - console.log('idb_to_ui: Iterate tbl_event_file looking for files to add is complete'); - looping_tbl_event_file = false; - return true; - }) - .catch(function (error) { - console.log('Something went wrong in function render_event_file_records.'); - console.log(error); - return false; - }); - - - index_open_file_buttons('open_local_file'); - return true; - -} diff --git a/app/js/app_ui_misc.js b/app/js/app_ui_misc.js deleted file mode 100644 index fd412f5..0000000 --- a/app/js/app_ui_misc.js +++ /dev/null @@ -1,180 +0,0 @@ -const path = require('path'); -const { ipcRenderer } = require('electron'); - -//exports.render_event_records = function () { -async function render_event_records() { - console.log('****************** Events ******************'); - console.log('Rendering event records...'); - //console.log(tbl_event); - //console.log(event_id); - - if (looping_tbl_event) { - console.log('Already looping through the tbl_event table. Not starting until finished.'); - return false; - } else { - - } - - looping_tbl_event = true; - - tbl_event.iterate(function(value, key, iteration) { - if (value.id == event_id) { - console.log('*** Event id ('+event_id+') found in table.'); - document.getElementById('event_name').innerHTML = '@'+value.name; - document.getElementById('event_files_menu').getElementsByTagName('ul')[0].id = 'event_files_list_'+value.id; - } else { - console.log('Event not it.'); - } - }).then(function() { - console.log('idb_to_ui: Iterate tbl_event_file complete') - //tbl_event_complete = true; - looping_tbl_event = false; - }); - -} - - -//exports.render_event_location_records = async function () { -async function render_event_location_records() { - console.log('****************** Locations ******************'); - console.log('Rendering event location records...'); - - if (looping_tbl_event_location) { - console.log('Already looping through the tbl_event_location table. Not starting until finished.'); - return false; - } else { - - } - - looping_tbl_event_location = true; - - await tbl_event_location.iterate(function(value, key, iteration) { - if (value.id == event_location_id) { - console.log('*** Event location id ('+event_location_id+') found in table.'); - document.getElementById('location_name').innerHTML = ' '+value.name; - - document.getElementById('location_files_menu').getElementsByTagName('ul')[0].id = 'location_files_list_'+value.id; - /* - let location_files_ul_node = document.createElement('UL'); - location_files_ul_node.id = 'event_presentation_files_list_'+value.id; - location_files_ul_node.className = 'list-group list-group-flush location_files location_files_list event_files_list'; - - document.getElementById('location_files_menu').appendChild(location_files_ul_node); - */ - } else { - console.log('Event location not it.'); - } - }).then(function() { - console.log('idb_to_ui: Iterate tbl_event_file complete') - //tbl_event_location_complete = true; - looping_tbl_event_location = false; - }); - - return true; -} - - -/* Updated 2020-01-31 */ -function index_launcher_sessions(class_name) { - console.log('Indexing launcher sessions with class name: '+class_name); - var class_elements = document.getElementsByClassName(class_name); - - - for (var i = 0; i < class_elements.length; i++) { - class_elements[i].addEventListener( 'click', function() {view_session( this.getAttribute('data-session_id')) } ); - } - console.log(class_elements); - return true; -} - - -/* Updated 2020-01-31 */ -function view_session(session_id) { - var class_elements = document.getElementsByClassName('session_detail'); // This class name should be the class names for each div container - console.log('View session ID: '+session_id); - for (var i = 0; i < class_elements.length; i++) { - //console.log('*** checking: '+class_elements[i].getAttribute('data-session_id')); - if (class_elements[i].getAttribute('data-session_id') == session_id) { - //console.log('show'); - class_elements[i].classList.remove('d-none'); - class_elements[i].classList.add('d-block'); - } else { - //console.log('hide'); - class_elements[i].classList.remove('d-block'); - class_elements[i].classList.add('d-none'); - } - } - - return true; -} - - -/* Updated 2020-02-13 */ -function index_open_file_buttons(class_name) { - console.log('****************** Indexing ******************'); - console.log('Indexing open file buttons...'); - var class_elements = document.getElementsByClassName(class_name); - //console.log(class_elements); - - for (var i = 0; i < class_elements.length; i++) { - // Do not use an anonymous function. If you do then it will keep adding event listeners. - // Adding the exact same event listeners over and over doesn't hurt anything. - // No need to use removeEventListener() - class_elements[i].addEventListener( 'click', open_local_file ); - - /* - let hash = class_elements[i].getAttribute('data-hash_sha256'); - let file_path = path.join(host_file_cache_path, hash); - let filename = class_elements[i].getAttribute('data-filename'); - class_elements[i].addEventListener( 'click', function() { ipcRenderer.send('open_local_file', file_path, filename) } ); - */ - } - - return true; -} - -/* Updated 2020-02-13 */ -function open_local_file() { - //console.log(this); - let hash = this.getAttribute('data-hash_sha256'); - let file_path = path.join(host_file_cache_path, hash); - let filename = this.getAttribute('data-filename'); - console.log(file_path); - console.log(filename); - - ipcRenderer.send('open_local_file', file_path, filename); -} - - -function format_bytes(bytes, decimals = 2) { - if (bytes === 0) return '0 Bytes'; - - const k = 1024; - const dm = decimals < 0 ? 0 : decimals; - const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; - - const i = Math.floor(Math.log(bytes) / Math.log(k)); - - return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; -} - -function shorten_filename(filename, max_length=45) { - let length = filename.length; - let char_over = filename.length-max_length; - let new_filename = null; - let wildcards = char_over; - if (char_over > 0) { - let part1 = filename.slice(0, 20); - if (char_over > 5) { - wildcards = 5; - } else { - } - let part2 = '.'.repeat(wildcards); - let part3 = filename.slice(-20); - - new_filename = part1+part2+part3; - } else { - new_filename = filename; - } - return new_filename; -} diff --git a/app/js/app_ui_presentations.js b/app/js/app_ui_presentations.js deleted file mode 100644 index f9c3f03..0000000 --- a/app/js/app_ui_presentations.js +++ /dev/null @@ -1,215 +0,0 @@ -//exports.render_event_presentation_records = async function (events) { -async function render_event_presentation_records(events) { - console.log('****************** Presentations ******************'); - console.log('Rendering event presentation records...'); - - if (looping_tbl_event_presentation) { - console.log('Already looping through the tbl_event_presentation table. Not starting until finished.'); - return false; - } else { - - } - - - let launcher_sessions = document.getElementById('launcher_sessions').childNodes; //_list_items - //console.log(launcher_sessions); - - for (let i=0, len=launcher_sessions.length; i < len; i++) { - //for (let i in launcher_sessions) { - console.log('Current launcher session_id='+launcher_sessions[i].getAttribute('data-session_id')); - let session_id = launcher_sessions[i].getAttribute('data-session_id'); - - let presentations_list = launcher_sessions[i].getElementsByClassName('session_presentations')[0].getElementsByTagName('ul')[0].childNodes; - //console.log(presentations_list); - - // First: update or delete presentations - if (presentations_list.length) { - console.log('Presentations listed under this session (id='+session_id+'). (launcher sessions loop i = '+i+')'); - //console.log(launcher_sessions[i].getElementsByClassName('session_presentations')[0].getElementsByTagName('ul')); - - for (let j=0, len=presentations_list.length; j < len; j++) { - console.log('Current launcher presentation_id='+presentations_list[j].getAttribute('data-presentation_id')); - let presentation_id = presentations_list[j].getAttribute('data-presentation_id'); - - let tbl_event_presentation_result = await tbl_event_presentation.iterate(function(value, key, iteration) { - //console.log('*** 1: session_id='+session_id+' | presentation.event_session_id='+value.event_session_id+' | presentation_id='+presentation_id+' | presentation.id='+value.id+' (launcher sessions loop i='+i+')'); - looping_tbl_event_presentation = true; - if (session_id == value.event_session_id && presentation_id == value.id) { - // Found presentation in that session. Updating... - console.log('Presentation ('+presentation_id+') was found in the session ('+session_id+'). Updating...'); - document.getElementById('event_presentation_'+value.id).getElementsByTagName('div')[0].getElementsByTagName('strong')[0].innerHTML = value.name; - let presentation_startdatetime = new Date(value.start_datetime); - - let presentation_startdatetime_string = dateFns.format(presentation_startdatetime, 'h:mm A') - - document.getElementById('event_presentation_'+value.id).getElementsByTagName('div')[0].getElementsByTagName('span')[0].innerHTML = presentation_startdatetime_string; - - } else if (session_id != value.event_session_id && presentation_id == value.id) { - // Found presentation in a session that it should not be in. Removing... - console.log('Presentation exists but should not be part of this session. Removing...'); - console.log('*** Presentation id ('+value.id+') is NOT part of this session ('+session_id+'). (launcher sessions loop i='+i+')'); - document.getElementById('event_presentation_'+presentation_id).remove(); // Remove the node from the launcher presentations list - - } else { - //console.log('Not doing anything'); - } - - }).then(function() { - console.log('idb_to_ui: Iterate tbl_event_presentation looking for presentations to update or remove is complete'); - - looping_tbl_event_presentation = false; - }); - } - - - } else { // Close for if presentations_list.length - - } // Close for if presentations_list.length - - - // Now that the updates and removals have been done we need to add presentations. - let tbl_event_presentation_result = await tbl_event_presentation.iterate(function(value, key, iteration) { - //console.log('*** 2: session_id='+session_id+' | presentation.event_session_id='+value.event_session_id+' | presentation.id='+value.id+' (launcher sessions loop i='+i+')'); - looping_tbl_event_presentation = true; - - let add_presentation = true; - - if (session_id == value.event_session_id) { - // This presentation should be part of the session. Adding if not there... - - presentations_list = launcher_sessions[i].getElementsByClassName('session_presentations')[0].getElementsByTagName('ul')[0].childNodes; - //console.log(presentations_list); - - if (presentations_list.length) { - // One more presentations are already in this session. - // Need to check if this one needs to be added. - for (let j=0, len=presentations_list.length; j < len; j++) { - let presentation_id = presentations_list[j].getAttribute('data-presentation_id'); - if (presentation_id == value.id) { - // Nothing here so it for sure needs to be added. - add_presentation = false; - } else { - // Don't reset the add_presentation back to true - } - } - } else { - // Nothing here, so it for sure needs to be added. - //add_presentation = true; - } - } else { - add_presentation = false; - } - - - if (add_presentation) { - // Presentation not found. Adding... - console.log('Presentation was not found in the session but should be. Adding...'); - console.log('Presentation id ('+value.id+') is part of this session ('+session_id+'). (launcher sessions loop i='+i+')'); - - // Add the new presentation to the launcher presentation list - let presentation_li_node = document.createElement('LI'); - presentation_li_node.id = 'event_presentation_'+value.id; - presentation_li_node.className = 'list-group-item event_presentation'; - presentation_li_node.setAttribute('data-session_id', value.event_session_id); - presentation_li_node.setAttribute('data-presentation_id', value.id); - - presentation_li_node.title = 'id='+value.id+' session_id='+value.event_session_id+' presentation_id='+value.id; - - let presentation_li_heading_div_node = document.createElement('DIV'); - presentation_li_heading_div_node.className = 'list-group-item-heading d-flex justify-content-between align-items-center'; - - let presentation_name_strong_node = document.createElement('STRONG'); - - let presentation_name_text_node= document.createTextNode(value.name); - presentation_name_strong_node.appendChild(presentation_name_text_node); - - let presentation_heading_span_node = document.createElement('SPAN'); - - if (display_presentation_badges) { - presentation_heading_span_node.className = 'badge badge-pill badge-info d-inline'; - } else { - presentation_heading_span_node.className = 'badge badge-pill badge-info d-none'; - } - - /* - // Create the session code span - let span_session_code_node = document.createElement('SPAN'); - span_session_code_node.id = 'detail_session_code_'+value.id; - if ( display_session_codes && value.code && value.code.length) { - span_session_code_node.className = 'd-inline detail_session_code'; - } else { - span_session_code_node.className = 'd-none detail_session_code'; - } - - let span_session_code_text_node = document.createTextNode('('+value.code+')'); - span_session_code_node.appendChild(span_session_code_text_node); - */ - - //let presenation_font = ' '; - - let presentation_startdatetime = new Date(value.start_datetime); - let presentation_startdatetime_string = dateFns.format(presentation_startdatetime, 'h:mm A'); - let presentation_heading_span_text_node = document.createTextNode(presentation_startdatetime_string); - presentation_heading_span_node.appendChild(presentation_heading_span_text_node); - - presentation_li_heading_div_node.appendChild(presentation_name_strong_node); - presentation_li_heading_div_node.appendChild(presentation_heading_span_node); - - - let presentation_li_text_div_node = document.createElement('DIV'); - //presentation_li_text_div_node.id = 'event_presentation_files_'+value.id; - presentation_li_text_div_node.className = 'list-group-item-text'; - - let presentation_files_ul_group_node = document.createElement('UL'); - presentation_files_ul_group_node.id = 'presentation_files_list_'+value.id; - presentation_files_ul_group_node.className = 'list-group list-group-flush presentation_files presentation_files_list event_files_list'; - - let presentation_presenters_ul_group_node = document.createElement('UL'); - presentation_presenters_ul_group_node.id = 'event_presentation_presenters_'+value.id; - presentation_presenters_ul_group_node.className = 'list-group list-group-flush presentation_presenters presentation_presenters_list'; - presentation_presenters_ul_group_node.setAttribute('data-session_id', value.event_session_id); - presentation_presenters_ul_group_node.setAttribute('data-presentation_id', value.id); - - presentation_li_text_div_node.appendChild(presentation_files_ul_group_node); - presentation_li_text_div_node.appendChild(presentation_presenters_ul_group_node); - - - presentation_li_node.appendChild(presentation_li_heading_div_node); - presentation_li_node.appendChild(presentation_li_text_div_node); - - - //console.log(launcher_sessions[i].getElementsByClassName('session_presentations')); - let launcher_session_details = document.getElementById('detail_session_'+session_id); - //console.log(launcher_session_details.getElementsByClassName('session_presentations')); - - // Trying to remove old ID in case there is one already rendered - try { - document.getElementById('event_presentation_'+value.id).remove(); - } catch(err) { - console.log('A node with the ID of event_presentation_'+value.id+' was not found. In most cases this is expected.'); - console.log(err.message); - } - - let session = document.getElementById('detail_session_'+session_id).getElementsByClassName('session_presentations')[0].getElementsByTagName('ul')[0].appendChild(presentation_li_node); - presentation_id_found = true; - } else { - // Presentation not part of this session. Moving on... - //console.log('Presentation was not found in the session and should not be. Moving on...'); - //console.log('*** Presentation id ('+value.id+') is not part of this session ('+session_id+'). (launcher sessions loop i='+i+')'); - } - - }).then(function() { - console.log('idb_to_ui: Iterate tbl_event_presentation looking for presentations to add is complete'); - looping_tbl_event_presentation = false; - return true; - }) - .catch(function (error) { - console.log('Something went wrong in function render_event_presentation_records.'); - console.log(error); - return false; - }); - - } - - return result; -} diff --git a/app/js/app_ui_presenters.js b/app/js/app_ui_presenters.js deleted file mode 100644 index 7e7cb23..0000000 --- a/app/js/app_ui_presenters.js +++ /dev/null @@ -1,219 +0,0 @@ -//exports.render_event_presenter_records = async function (events) { -async function render_event_presenter_records(events) { - console.log('****************** Presenters ******************'); - console.log('Rendering event presenter records...'); - - if (looping_tbl_event_presenter) { - console.log('Already looping through the tbl_event_presenter table. Not starting until finished.'); - return false; - } else { - - } - - looping_tbl_event_presenter = true; - - let presentations_presenters_lists = document.getElementsByClassName('presentation_presenters'); // from the UL nodes for presenters - //console.log(presentations_presenters_lists); - - // First: Loop through the presenters table looking for presenters for each presentation list - let tbl_event_presenter_result = await tbl_event_presenter.iterate(function(value, key, iteration) { - let tbl_session_id = value.event_session_id; - let tbl_presentation_id = value.event_presentation_id; - let tbl_presenter_id = value.id; - console.log('tbl_event_presenter iteration='+iteration+' | tbl_presenter_id='+tbl_presenter_id+' for tbl_presentation_id='+tbl_presentation_id); - - // Second: Loop through the presentations presenter UL placeholder (assumes there is a ul for presenters under each presentation) - if (presentations_presenters_lists.length) { - for (var i = 0; i < presentations_presenters_lists.length; i++) { - let ul_session_id = presentations_presenters_lists[i].getAttribute('data-session_id'); - let ul_presentation_id = presentations_presenters_lists[i].getAttribute('data-presentation_id'); - //console.log('presentation i='+i+' | ul_presentation_id='+ul_presentation_id); - - // Check if this presenter is part of this presentation - let add_presenter_id = true; // Set flag to true. Update if found. Add if not found. - let remove_presenter_id = true; // Set flag to true. Update if found. Add if not found. - if (tbl_presentation_id == ul_presentation_id) { - console.log('This tbl_presentation_id '+tbl_presentation_id+' matches this ul_presentation_id '+ul_presentation_id+'. Trying to loop through list of presenters to see if it needs to be updated or added...'); - // Get a list of list items under the UL presenters node for a presentation - let presentation_presenters_list_items = presentations_presenters_lists[i].children; - - // Third: Loop through the presenters (LI) in a specific list under a presentation. - if (presentation_presenters_list_items.length) { - for (let j=0, len=presentation_presenters_list_items.length; j < len; j++) { - console.log('Checking li_presenter_id='+presentation_presenters_list_items[j].getAttribute('data-presenter_id')); - let li_presentation_id = presentation_presenters_list_items[j].getAttribute('data-presentation_id'); - let li_presenter_id = presentation_presenters_list_items[j].getAttribute('data-presenter_id'); - - if ( tbl_presentation_id == li_presentation_id && tbl_presenter_id == li_presenter_id ) { - console.log('Updating presenter ID '+li_presenter_id); - // Update the presenter information - document.getElementById('event_presenter_'+tbl_presenter_id).setAttribute('data-given_name', value.given_name); - document.getElementById('event_presenter_'+tbl_presenter_id).setAttribute('data-family_name', value.family_name); - document.getElementById('event_presenter_'+tbl_presenter_id).getElementsByClassName('presenter_name')[0].innerHTML = value.given_name+' '+value.family_name; - // Could have used getElementsByTagName('strong') instead - - - console.log('XXXXX ******** STARTING SORT ******** XXXXX'); - var categoryItems = document.getElementById('event_presentation_presenters_'+tbl_presentation_id).childNodes; - console.log(categoryItems); - - var categoryItemsArray = Array.from(categoryItems); - - function sorter(a, b) { - if (a.dataset.family_name < b.dataset.family_name) return -1; - if (a.dataset.family_name > b.dataset.family_name) return 1; - } - - let sorted = categoryItemsArray.sort(sorter); - - function update_li_order(item, index) { - document.getElementById('event_presentation_presenters_'+tbl_presentation_id).appendChild(item); - } - - sorted.forEach(update_li_order); - console.log('******** FINISHED SORT ********'); - - - - add_presenter_id = false; - remove_presenter_id = false; - } else if (tbl_presentation_id != li_presentation_id ) { - console.log('Set flag to add presenter ID '+li_presenter_id+' to false. Set flag to remove presenter ID '+li_presenter_id+' to true.'); - add_presenter_id = false; - remove_presenter_id = true; // The default is already set to true. Is this needed? - } else { - // NOTE: This section is not finished??? - } - } - - - } else { - // No need to remove anything if the list is empty. - console.log('Ignoring this presentation\'s list ('+ul_presentation_id+') of presenters because it is empty. Adding this presenter ('+tbl_presenter_id+') to the list...'); - add_presenter_id = true; // Technically this line is not needed since the value was initialized to true. - remove_presenter_id = false; - } - - - - } else { - //NOTE: This probably needs to be reviewed again. - //console.log('This tbl_presentation_id '+tbl_presentation_id+' does not match this ul_presentation_id '+ul_presentation_id+'. Do not add presenter ID. ***But leave remove presenter ID as true???'); - add_presenter_id = false; - remove_presenter_id = false; - } - - - // The presenter ID was not found. Need to add. - if ( add_presenter_id ) { - console.log('Adding this presenter ('+tbl_presenter_id+') to the list of presenters for this presentation ('+ul_presentation_id+').'); - - // Trying to remove old ID in case there is one already rendered - console.log('Trying to remove an old presenter LI node if it exists...'); - try { - document.getElementById('event_presenter_'+tbl_presenter_id).remove(); - } catch(err) { - //console.log('A node with the ID of event_presenter_'+tbl_presenter_id+' was not found.'); - console.log('This presenter list item node was not found. In most cases this is expected.'); - console.log(err.message); - } - - let presenter_li_node = document.createElement('LI'); - presenter_li_node.id = 'event_presenter_'+tbl_presenter_id; - presenter_li_node.className = 'list-group-item event_presenter'; - presenter_li_node.setAttribute('data-session_id', value.event_session_id); - presenter_li_node.setAttribute('data-presentation_id', ul_presentation_id); - presenter_li_node.setAttribute('data-presenter_id', tbl_presenter_id); - - presenter_li_node.setAttribute('data-given_name', value.given_name); - presenter_li_node.setAttribute('data-family_name', value.family_name); - - presenter_li_node.title = 'id='+tbl_presenter_id+' session_id='+value.event_session_id+' presentation_id='+ul_presentation_id+' presenter_id='+tbl_presenter_id; - - let presenter_name_strong_node = document.createElement('STRONG'); - presenter_name_strong_node.className = 'list-group-item-heading presenter_name'; - - let presenter_name_text_node= document.createTextNode(value.given_name+' '+value.family_name); - presenter_name_strong_node.appendChild(presenter_name_text_node); - - presenter_li_node.appendChild(presenter_name_strong_node); - - - let presentation_presenters_ul_group_node = document.createElement('UL'); - presentation_presenters_ul_group_node.id = 'presenter_files_list_'+tbl_presenter_id; - presentation_presenters_ul_group_node.className = 'list-group list-group-flush list-group-item-text presenter_files presenter_files_list event_files_list'; - presentation_presenters_ul_group_node.setAttribute('data-presenter_id', tbl_presenter_id); - - presenter_li_node.appendChild(presentation_presenters_ul_group_node); - - document.getElementById('event_presentation_presenters_'+tbl_presentation_id).appendChild(presenter_li_node); - - remove_presenter_id = false; - - console.log('XXXXX ******** STARTING SORT ******** XXXXX'); - try { - var categoryItems = document.getElementById('event_presentation_presenters_'+tbl_presentation_id).childNodes; - console.log(categoryItems); - - var categoryItemsArray = Array.from(categoryItems); - - function sorter(a, b) { - if (a.dataset.family_name < b.dataset.family_name) return -1; - if (a.dataset.family_name > b.dataset.family_name) return 1; - } - - let sorted = categoryItemsArray.sort(sorter); - - function update_li_order(item, index) { - document.getElementById('event_presentation_presenters_'+tbl_presentation_id).appendChild(item); - } - - sorted.forEach(update_li_order); - } catch(err) { - console.log(err); - } - - console.log('******** FINISHED SORT ********'); - - } else { - //console.log('Not going to add this presenter ('+tbl_presenter_id+') to the list of presenters for this presentation ('+ul_presentation_id+').'); - } - - - // The presenter ID was found, but not part of this presentation. Need to remove. - if ( remove_presenter_id ) { - if ( ul_presentation_id != tbl_presentation_id ) { - console.log('Removing this presenter ('+tbl_presenter_id+') from the list of presenters for this presentation ('+ul_presentation_id+').'); - - // Trying to remove old ID in case there is one already rendered - console.log('Trying to remove a presenter LI node...'); - try { - document.getElementById('event_presenter_'+tbl_presenter_id).remove(); - } catch(err) { - //console.log('A node with the ID of event_presenter_'+tbl_presenter_id+' was not found.'); - console.log('This presenter list item node was not found. In some cases this is expected.'); - console.log(err.message); - } - } - - } else { - //console.log('This presenter ('+tbl_presenter_id+') is already part of the list of presenters for this presentation ('+ul_presentation_id+') and is correct.'); - } - - } - } else { - console.log('No UL placeholder list for presenters found under any presentations. Something might have gone wrong?'); - } - }).then(function() { - console.log('idb_to_ui: Iterate tbl_event_presenter looking for presenters to update, add, or remove is complete'); - looping_tbl_event_presenter = false; - return true; - }) - .catch(function (error) { - console.log('Something went wrong in function render_event_presenter_records.'); - console.log(error); - return false; - }); - - return true; -} diff --git a/app/js/app_ui_sessions.js b/app/js/app_ui_sessions.js deleted file mode 100644 index 8f5ba8c..0000000 --- a/app/js/app_ui_sessions.js +++ /dev/null @@ -1,265 +0,0 @@ -//exports.render_event_session_records = async function () { -async function render_event_session_records() { - console.log('****************** Sessions ******************'); - console.log('Rendering event session records...'); - - if (looping_tbl_event_session) { - console.log('Already looping through the tbl_event_session table. Not starting until finished.'); - return false; - } else { - - } - - - looping_tbl_event_session = true; - - // First: update or add sessions - result = tbl_event_session.iterate(await function(value, key, iteration) { - if (value.event_id == event_id && value.event_location_id == event_location_id) { - console.log('*** Event session id ('+value.id+') is part of this event location.'); - - let session_startdatetime = new Date(value.start_datetime); - - // *** ** * Checking if the session is already in the launcher menu * ** *** - if (document.getElementById('menu_event_session_'+value.id)) { - // Update the session menu list item - document.getElementById('menu_session_name_'+value.id).innerHTML = value.name; - } else { - // Unhide the sessions menu - if (document.getElementById('sessions_menu').classList.contains('d-none') ) { - document.getElementById('sessions_menu').classList.remove('d-none'); - document.getElementById('sessions_menu').classList.add('d-block'); - } - - // Add the new session to the session menu - let li_session_node = document.createElement('LI'); - li_session_node.id = 'menu_event_session_'+value.id; - //li_session_node.className = 'list-group-item btn btn-success d-flex justify-content-between align-items-center btn_view_session'; - li_session_node.className = 'list-group-item btn btn-success justify-content-between align-items-center btn_view_session'; - li_session_node.setAttribute('data-session_id', value.id); - - li_session_node.title = 'id='+value.id+' session_id='+value.id; - - // Create the session name span - let li_span_name_node = document.createElement('SPAN'); - li_span_name_node.id = 'menu_session_name_'+value.id; - li_span_name_node.className = 'd-inline menu_session_name'; - - let li_span_name_text_node = document.createTextNode(value.name); - li_span_name_node.appendChild(li_span_name_text_node); - - // Create the session time span - let span_session_time_string = dateFns.format(session_startdatetime, 'h:mm A'); - let li_span_time_node = document.createElement('SPAN'); - if ( display_menu_session_times && span_session_time_string ) { - li_span_time_node.className = 'd-inline menu_session_time'; - } else { - li_span_time_node.className = 'd-none'; - } - - let li_span_time_text_node = document.createTextNode(span_session_time_string+': '); - li_span_time_node.appendChild(li_span_time_text_node); - - // Create the session code span - let li_span_badge_node = document.createElement('SPAN'); - if ( display_session_codes && value.code && value.code.length ) { - li_span_badge_node.className = 'd-inline menu_session_code'; - } else { - li_span_badge_node.className = 'd-none'; - } - - let li_span_badge_text_node = document.createTextNode('('+value.code+')'); - li_span_badge_node.appendChild(li_span_badge_text_node); - - - li_session_node.appendChild(li_span_time_node); - li_session_node.appendChild(li_span_name_node); - li_session_node.appendChild(li_span_badge_node); - - document.getElementById('sessions_menu').getElementsByTagName('ul')[0].appendChild(li_session_node); - } - - - - // *** ** * Checking if the session is already in the launcher sessions detail * ** *** - if (document.getElementById('detail_session_'+value.id)) { - // Update the launcher sessions list - // NOTE: Updating this text is very awkward? - //document.getElementById('detail_session_'+value.id).getElementsByTagName('h2')[0].firstChild.data = value.name; - document.getElementById('detail_session_name_'+value.id).innerHTML = value.name; - document.getElementById('detail_session_code_'+value.id).innerHTML = '('+value.code+')'; - //console.log(document.getElementById('detail_session_'+value.id).getElementsByTagName('h2')[0]); - document.getElementById('detail_session_badge_'+value.id).innerHTML = dateFns.format(session_startdatetime, 'ddd h:mm A'); - } else { - // Add the new session to the launcher sessions list - let div_session_node = document.createElement('DIV'); - div_session_node.id = 'detail_session_'+value.id; - div_session_node.className = 'container d-none session_detail event_session'; - div_session_node.setAttribute('data-session_id', value.id); - - let h2_session_node = document.createElement('H2'); - h2_session_node.className = 'session_heading d-flex justify-content-between align-items-center border-bottom border-primary'; - //h2_session_node.className = 'detail_session_title justify-content-between align-items-center'; - - // Group the name and code together for the title - let span_session_title_node = document.createElement('SPAN'); - span_session_title_node.className = 'session_title'; - - // Create the session name span - let span_session_name_node = document.createElement('SPAN'); - span_session_name_node.id = 'detail_session_name_'+value.id; - span_session_name_node.className = 'detail_session_name'; - - let span_session_name_text_node = document.createTextNode('('+value.name+')'); - span_session_name_node.appendChild(span_session_name_text_node); - - //h2_session_node.appendChild(span_session_name_node); - span_session_title_node.appendChild(span_session_name_node); - - // Create the session code span - let span_session_code_node = document.createElement('SPAN'); - span_session_code_node.id = 'detail_session_code_'+value.id; - if ( display_session_codes && value.code && value.code.length) { - span_session_code_node.className = 'd-inline detail_session_code'; - } else { - span_session_code_node.className = 'd-none detail_session_code'; - } - - let span_session_code_text_node = document.createTextNode('('+value.code+')'); - span_session_code_node.appendChild(span_session_code_text_node); - - //h2_session_node.appendChild(span_session_code_node); - span_session_title_node.appendChild(span_session_code_node); - h2_session_node.appendChild(span_session_title_node); - - let span_session_badge_node = document.createElement('SPAN'); - span_session_badge_node.id = 'detail_session_badge_'+value.id; - - if (display_session_badges) { - span_session_badge_node.className = 'badge badge-pill badge-info d-inline'; - } else { - span_session_badge_node.className = 'badge badge-pill badge-info d-none'; - } - - let span_session_badge_text_node = document.createTextNode(dateFns.format(session_startdatetime, 'ddd h:mm A')); - span_session_badge_node.appendChild(span_session_badge_text_node); - - h2_session_node.appendChild(span_session_badge_node); - - div_session_node.appendChild(h2_session_node); - - // Add placeholder cards for session files and session presentations - // Files - let files_div_node = document.createElement('DIV'); - files_div_node.id = 'event_session_files_'+value.id; - files_div_node.className = 'card session_files'; - - let files_header_div_node = document.createElement('DIV'); - files_header_div_node.className = 'card-header'; - - let files_header_text_node = document.createTextNode('Session Files:'); - files_header_div_node.appendChild(files_header_text_node); - - let files_body_div_node = document.createElement('DIV'); - files_body_div_node.className = 'card-body'; - - let files_body_ul_node = document.createElement('UL'); - files_body_ul_node.id = 'session_files_list_'+value.id; - files_body_ul_node.className = 'list-group list-group-flush session_files_list event_files_list'; - - files_body_div_node.appendChild(files_body_ul_node); - - files_div_node.appendChild(files_header_div_node); - files_div_node.appendChild(files_body_div_node); - - div_session_node.appendChild(files_div_node); - - // Presentations - let presentations_div_node = document.createElement('DIV'); - presentations_div_node.id = 'session_presentations_'+value.id; - presentations_div_node.className = 'card session_presentations'; - - let presentations_header_div_node = document.createElement('DIV'); - presentations_header_div_node.className = 'card-header'; - - let presentations_header_text_node = document.createTextNode('Presentations:'); - presentations_header_div_node.appendChild(presentations_header_text_node); - - let presentations_body_div_node = document.createElement('DIV'); - presentations_body_div_node.className = 'card-body'; - - let presentations_body_ul_node = document.createElement('UL'); - presentations_body_ul_node.id = 'session_presentations_list_'+value.id; - presentations_body_ul_node.className = 'list-group list-group-flush session_presentations_list'; - presentations_body_ul_node.setAttribute('data-session_id', value.id); - - presentations_body_div_node.appendChild(presentations_body_ul_node); - - presentations_div_node.appendChild(presentations_header_div_node); - presentations_div_node.appendChild(presentations_body_div_node); - - div_session_node.appendChild(presentations_div_node); - - - document.getElementById('launcher_sessions').appendChild(div_session_node); - } - - } else { - //console.log('Event session not it.'); - } - }).then(function() { - console.log('idb_to_ui: Iterate tbl_event_session complete'); - //tbl_event_session_complete = true; - }).then(function() { - // Second: remove sessions from the launcher sessions menu and sessions list - // This is basing the removal of sessions only on the menu list of sessions. - // In theory this should be safe as long as nothing gets out sync... - console.log('Looking for removed sessions...'); - - let session_list_items = document.getElementById('sessions_menu').getElementsByTagName('ul')[0].childNodes; - //console.log(session_list_items); - - let session_list = document.getElementById('sessions_menu').getElementsByTagName('ul')[0].children; - - if (session_list_items.length) { - for (let i=0, len=session_list_items.length; i < len; i++) { - console.log('Checking session_id='+session_list_items[i].getAttribute('data-session_id')); - - looping_tbl_event_session = true; - - let session_id = session_list_items[i].getAttribute('data-session_id'); - let session_valid = false; - - tbl_event_session.iterate(function(value, key, iteration) { - //console.log(value.event_id+' ?= '+event_id+' : '+value.event_location_id+' ?= '+event_location_id+' : '+value.id+' ?= '+session_id); - if (value.event_id == event_id && value.event_location_id == event_location_id && value.id == session_id) { - // The session is still part of the event and the location - session_valid = true; - } else { - // The session is no longer part of the event and or the location - //console.log('Need to remove session id '+session_id); - } - }).then(function() { - console.log('idb_to_ui: Iterate tbl_event_session looking for sessions to remove is complete') - if (session_valid) { - //console.log('Keep session id '+session_id); - } else { - console.log('Remove session id '+session_id); - document.getElementById('menu_event_session_'+session_id).remove(); // Remove the node from the launcher sessions menu list - document.getElementById('detail_session_'+session_id).remove(); // Remove the node from the launcher sessions list - } - - looping_tbl_event_session = false; - }); - } - } - - looping_tbl_event_session = false; - - // Third: re-index view session buttons - index_launcher_sessions('btn_view_session'); - return true - }); - - return result; -} diff --git a/app/js/del app_helper.js b/app/js/del app_helper.js deleted file mode 100644 index 8d1c8b6..0000000 --- a/app/js/del app_helper.js +++ /dev/null @@ -1 +0,0 @@ - diff --git a/app/js/hold api.js b/app/js/hold api.js deleted file mode 100644 index b2185fa..0000000 --- a/app/js/hold api.js +++ /dev/null @@ -1,589 +0,0 @@ -async function api_token_request_async() { - //var api_temporary_token = ''; - axios.defaults.baseURL = 'http://api.localhost:5001'; // 'http://api.localhost:5001' 'https://api.oneskyit.com'; - //axios.defaults.headers.post['Content-Type'] ='application/json;charset=utf-8'; - axios.defaults.headers.post['Access-Control-Allow-Origin'] = '*'; - //axios.defaults.headers.common['Authorization'] = `Token ${api_temporary_token}` - - url = '/api_token_request'; - - let data = { secret_key: 'YWAAk39H2qH0edK6lPH0yg' }; - - //console.log(data); - - try { - const response = await axios.post(url, data); - console.log(response); - api_temporary_token = response.data.temporary_token; - axios.defaults.headers.common['Authorization'] = `Token ${api_temporary_token}`; - return true; - } catch (error) { - console.error(error); - } -} - - -/* -function api_token_request_sync() { - var api_temporary_token = ''; - axios.defaults.baseURL = 'http://api.localhost:5001'; // 'http://api.localhost:5001' 'https://api.oneskyit.com'; - //axios.defaults.headers.post['Content-Type'] ='application/json;charset=utf-8'; - axios.defaults.headers.post['Access-Control-Allow-Origin'] = '*'; - //axios.defaults.headers.common['Authorization'] = `Token ${api_temporary_token}` - - url = '/api_token_request'; - - let data = { secret_key: 'YWAAk39H2qH0edK6lPH0yg' }; - - console.log(data); - - axios.post(url, data) - .then(function (response) { - console.log(response); - api_temporary_token = response.data.temporary_token; - axios.defaults.headers.common['Authorization'] = `Token ${api_temporary_token}`; - return true; - }) - .catch(function (error) { - console.log(error); - return false; - }); - return false; -} -*/ - - -function get_all_events() { - url = '/event'; - - let data = { }; - - //console.log(data); - - axios.get(url) - .then(function (response) { - console.log(response); - - if (response.data != null) { - records = response.data; - - let html = ''; - html += ''; - - /* - role_table = ''; - role_table += ''; - - for (var i in records) { - - role_table += ''; - role_table += ''; - role_table += ''; - role_table += ''; - role_table += ''; - role_table += ''; - role_table += ''; - role_table += ''; - role_table += ''; - role_table += ''; - role_table += ''; - } - - role_table += '
NameFor TypeFor IDDisableEnable OnDisable OnNotesCreated OnUpdated On
'+records[i].name+''+records[i].for_type+''+records[i].for_id+''+records[i].disable+''+records[i].enable_on+''+records[i].disable_on+''+records[i].notes+''+records[i].created_on+''+records[i].updated_on+'
'; - */ - - document.getElementById('events').innerHTML = html; - } else { - document.getElementById('events').innerHTML = 'No events found.'; - } - - return true; - }) - .catch(function (error) { - console.log(error); - return false; - }); - return false; -} - - -function get_event(event_id) { - url = '/event/'+event_id; - - let data = { }; - - //console.log(data); - - axios.get(url) - .then(function (response) { - console.log(response); - - if (response.data != null) { - record = response.data; - - let html = ''; - html += '
'; - html += record.name; - html += '
'; - - document.getElementById('event').innerHTML = html; - } else { - document.getElementById('event').innerHTML = 'Event not found.'; - } - - return true; - }) - .catch(function (error) { - console.log(error); - return false; - }); - return false; -} - - -function get_event_locations(event_id) { - url = '/event/'+event_id+'/location'; - - let data = { }; - - //console.log(data); - - axios.get(url) - .then(function (response) { - console.log(response); - - if (response.data != null) { - records = response.data; - - let html = ''; - html += ''; - - document.getElementById('event_locations').innerHTML = html; - } else { - document.getElementById('event_locations').innerHTML = 'Event locations not found.'; - } - - return true; - }) - .catch(function (error) { - console.log(error); - return false; - }); - return false; -} - - -function get_event_location(event_id, event_location_id) { - url = '/event/'+event_id+'/location/'+event_location_id; - - let data = { }; - - //console.log(data); - - axios.get(url) - .then(function (response) { - console.log(response); - - if (response.data != null) { - record = response.data; - - let html = ''; - html += '
'; - html += record.name; - html += '
'; - - document.getElementById('event_location').innerHTML = html; - } else { - document.getElementById('event_location').innerHTML = 'Event location not found.'; - } - - return true; - }) - .catch(function (error) { - console.log(error); - return false; - }); - return false; -} - - -function get_event_location_sessions(event_id, event_location_id) { - url = '/event/'+event_id+'/location/'+event_location_id+'/session'; - - let data = { }; - - //console.log(data); - - axios.get(url) - .then(function (response) { - console.log(response); - - if (response.data != null) { - record = response.data; - - let html = ''; - html += '
'; - html += record.name; - html += '
'; - - document.getElementById('event_location_sessions').innerHTML = html; - } else { - document.getElementById('event_location_sessions').innerHTML = 'Event location sessions not found.'; - } - - return true; - }) - .catch(function (error) { - console.log(error); - return false; - }); - return false; -} - - - -function get_event_sessions(event_id) { - url = '/event/'+event_id+'/session'; - - let data = { }; - - //console.log(data); - - axios.get(url) - .then(function (response) { - console.log(response); - - if (response.data != null) { - records = response.data; - - let html = ''; - html += ''; - - document.getElementById('event_sessions').innerHTML = html; - } else { - document.getElementById('event_sessions').innerHTML = 'Event sessions not found.'; - } - - return true; - }) - .catch(function (error) { - console.log(error); - return false; - }); - return false; -} - - -function get_event_session(event_id, event_session_id) { - url = '/event/'+event_id+'/session/'+event_session_id; - - let data = { }; - - //console.log(data); - - axios.get(url) - .then(function (response) { - console.log(response); - - if (response.data != null) { - record = response.data; - - let html = ''; - html += '
'; - html += record.name; - html += '
'; - - document.getElementById('event_session').innerHTML = html; - } else { - document.getElementById('event_session').innerHTML = 'Event session not found.'; - } - - return true; - }) - .catch(function (error) { - console.log(error); - return false; - }); - return false; -} - - -function get_event_session_presentations(event_id, event_session_id) { - url = '/event/'+event_id+'/session/'+event_session_id+'/presentation'; - - let data = { }; - - //console.log(data); - - axios.get(url) - .then(function (response) { - console.log(response); - - if (response.data != null) { - records = response.data; - - let html = ''; - html += ''; - - document.getElementById('event_presentations').innerHTML = html; - } else { - document.getElementById('event_presentations').innerHTML = 'Event session presentations not found.'; - } - - return true; - }) - .catch(function (error) { - console.log(error); - return false; - }); - return false; -} - - -function get_event_session_presentation(event_id, event_session_id, event_presentation_id) { - url = '/event/'+event_id+'/session/'+event_session_id+'/presentation/'+event_presentation_id; - - let data = { }; - - //console.log(data); - - axios.get(url) - .then(function (response) { - console.log(response); - - if (response.data != null) { - record = response.data; - - let html = ''; - html += '
'; - html += record.name; - html += '
'; - - document.getElementById('event_presentation').innerHTML = html; - } else { - document.getElementById('event_presentation').innerHTML = 'Event session presentation not found.'; - } - - return true; - }) - .catch(function (error) { - console.log(error); - return false; - }); - return false; -} - - -function get_event_session_presentation_presenters(event_id, event_session_id, event_presentation_id) { - url = '/event/'+event_id+'/session/'+event_session_id+'/presentation/'+event_presentation_id+'/presenter'; - - let data = { }; - - //console.log(data); - - axios.get(url) - .then(function (response) { - console.log(response); - - if (response.data != null) { - records = response.data; - - let html = ''; - html += ''; - - document.getElementById('event_presenters').innerHTML = html; - } else { - document.getElementById('event_presenters').innerHTML = 'Event session presentation presenters not found.'; - } - - return true; - }) - .catch(function (error) { - console.log(error); - return false; - }); - return false; -} - - -function get_event_session_presentation_presenter(event_id, event_session_id, event_presentation_id, event_presenter_id) { - url = '/event/'+event_id+'/session/'+event_session_id+'/presentation/'+event_presentation_id+'/presenter/'+event_presenter_id; - - let data = { }; - - //console.log(data); - - axios.get(url) - .then(function (response) { - console.log(response); - - if (response.data != null) { - record = response.data; - - let html = ''; - html += '
'; - html += record.given_name+' '+record.family_name; - html += '
'; - - document.getElementById('event_presenter').innerHTML = html; - } else { - document.getElementById('event_presenter').innerHTML = 'Event session presentation presenter not found.'; - } - - return true; - }) - .catch(function (error) { - console.log(error); - return false; - }); - return false; -} - - - - -function get_event_files(event_id) { - url = '/event/'+event_id+'/file'; - - let data = { }; - - //console.log(data); - - axios.get(url) - .then(function (response) { - console.log(response); - - if (response.data != null) { - records = response.data; - - let html = ''; - html += ''; - - document.getElementById('event_files').innerHTML = html; - } else { - document.getElementById('event_files').innerHTML = 'Event files not found.'; - } - - return true; - }) - .catch(function (error) { - console.log(error); - return false; - }); - return false; -} - - -function get_event_file(event_id, event_file_id) { - url = '/event/'+event_id+'/file/'+event_file_id; - - let data = { }; - - //console.log(data); - - axios.get(url) - .then(function (response) { - console.log(response); - - if (response.data != null) { - record = response.data; - - let html = ''; - html += '
'; - html += record.filename; - html += '
'; - - document.getElementById('event_file').innerHTML = html; - } else { - document.getElementById('event_file').innerHTML = 'Event file not found.'; - } - - return true; - }) - .catch(function (error) { - console.log(error); - return false; - }); - return false; -} - - -function get_event_file_download(event_id, event_file_id) { - url = '/event/'+event_id+'/file/'+event_file_id+'/download'; - - let data = { }; - - //console.log(data); - - axios.get(url) - .then(function (response) { - console.log(response); - - if (response.data != null) { - record = response.data; - - let html = ''; - html += '
'; - html += 'no idea'; //record.filename; - html += '
'; - - document.getElementById('event_file').innerHTML = html; - } else { - document.getElementById('event_file').innerHTML = 'Event file not found.'; - } - - return true; - }) - .catch(function (error) { - console.log(error); - return false; - }); - return false; -} - - - - - -function api_users() { - url = '/user'; - - let data = { }; - - //console.log(data); - - axios.get(url) - .then(function (response) { - console.log(response); - return true; - }) - .catch(function (error) { - console.log(error); - return false; - }); - return false; -} diff --git a/app/js/hold launcher.js b/app/js/hold launcher.js deleted file mode 100644 index c259a5b..0000000 --- a/app/js/hold launcher.js +++ /dev/null @@ -1,142 +0,0 @@ -const os = require('os'); -const path = require('path'); -const fs = require('fs'); - -let request_waiting = false; - -setInterval(async function() { - if (typeof axios.defaults.headers.common['Authorization'] !== 'undefined' && axios.defaults.headers.common['Authorization'] != null) { - - if (typeof launcher.sessions === 'undefined') { - console.log('Check for location files.'); - let for_id = launcher.event_location_id; - launcher.files = await api.get_files_for_type_for_id(axios, 'location', for_id); - for (var i in launcher.files) { - console.log('f: ('+launcher.files[i].event_file_id+') '+launcher.files[i].event_file_filename+' ***') - file_id = launcher.files[i].event_file_id; // NOTE: the .id is the hosted_file.id! - filename = launcher.files[i].hash_sha256+'.file'; - - save_path = path.join(file_cache_path, filename); - - //console.log(directory_and_filename); - - if (fs.existsSync(save_path)) { - console.log('Local file already exists: '+save_path); - } else { - console.log('File not found locally. Downloading file: '+save_path); - ipcRenderer.send('download_file', api_base_url, api_endpoint, api_temporary_token, save_path); // Must download file using main node.js thread. - //response.data.pipe(fs.createWriteStream(directory_and_filename)); - } - //let results = await api.download_file_id(axios, file_id, hash_sha256); - - } - } else { - console.log('No check for location files.'); - } - - if (typeof launcher.sessions === 'undefined') { - console.log('Check for location sessions.'); - launcher.sessions = await api.get_event_location_sessions(axios, launcher.event_id, launcher.event_location_id); - for (var i in launcher.sessions) { - console.log('*** '+launcher.sessions[i].name+' ***') - - // Check for session files start - if (typeof launcher.sessions[i].files === 'undefined') { - console.log('Check for session files.'); - let for_id = launcher.sessions[i].id; - launcher.sessions[i].files = await api.get_files_for_type_for_id(axios, 'session', for_id); - if (launcher.sessions[i].files) { - console.log('Session files found.'); - for (var j in launcher.sessions[i].files) { - console.log('f: ('+launcher.sessions[i].files[j].event_file_id+') '+launcher.sessions[i].files[j].event_file_filename+' ***'); - file_id = launcher.sessions[i].files[j].event_file_id; // NOTE: the .id is the hosted_file.id! - hash_sha256 = launcher.sessions[i].files[j].hash_sha256+'.file'; - let results = await api.download_file_id(axios, file_id, hash_sha256); - } - } else { - console.log('No session files found.'); - } - } else { - console.log('No check for session files.'); - } - // Check for session files end - - // Get session presentations and associated files - launcher.sessions[i].presentations = await api.get_session_presentations(axios, launcher.event_id, launcher.sessions[i].id); - for (var j in launcher.sessions[i].presentations) { - console.log('* '+launcher.sessions[i].presentations[j].name); - - // Check for presentation files start - if (typeof launcher.sessions[i].presentations[j].files === 'undefined') { - console.log('Check for presentation files.'); - let for_id = launcher.sessions[i].presentations[j].id; - launcher.sessions[i].presentations[j].files = await api.get_files_for_type_for_id(axios, 'presentation', for_id); - if (launcher.sessions[i].presentations[j].files) { - console.log('Presentation files found.'); - for (var k in launcher.sessions[i].presentations[j].files) { - console.log('f: ('+launcher.sessions[i].presentations[j].files[k].event_file_id+') '+launcher.sessions[i].presentations[j].files[k].event_file_filename+' ***'); - file_id = launcher.sessions[i].presentations[j].files[k].event_file_id; // NOTE: the .id is the hosted_file.id! - hash_sha256 = launcher.sessions[i].presentations[j].files[k].hash_sha256+'.file'; - let results = await api.download_file_id(axios, file_id, hash_sha256); - } - } else { - console.log('No presentation files found.'); - } - } else { - console.log('No check for presentation files.'); - } - // Check for presentation files end - - - // Get session presentations presenters and associated files - //let event_presentation_id = launcher.sessions[i].presentations[j].id; - launcher.sessions[i].presentations[j].presenters = await api.get_presentation_presenters(axios, launcher.event_id, launcher.sessions[i].id, launcher.sessions[i].presentations[j].id); - for (var k in launcher.sessions[i].presentations[j].presenters) { - console.log('-- '+launcher.sessions[i].presentations[j].presenters[k].given_name+' '+launcher.sessions[i].presentations[j].presenters[k].family_name) - - // Check for presenter files start - if (typeof launcher.sessions[i].presentations[j].presenters[k].files === 'undefined') { - console.log('Check for presenter files.'); - let for_id = launcher.sessions[i].presentations[j].presenters[k].id; - launcher.sessions[i].presentations[j].presenters[k].files = await api.get_files_for_type_for_id(axios, 'presenter', for_id); - if (launcher.sessions[i].presentations[j].presenters[k].files) { - console.log('Presenter files found.'); - for (var l in launcher.sessions[i].presentations[j].presenters[k].files) { - console.log('f: ('+launcher.sessions[i].presentations[j].presenters[k].files[l].event_file_id+') '+launcher.sessions[i].presentations[j].presenters[k].files[l].event_file_filename+' ***') - file_id = launcher.sessions[i].presentations[j].presenters[k].files[l].event_file_id; // NOTE: the .id is the hosted_file.id! - hash_sha256 = launcher.sessions[i].presentations[j].presenters[k].files[l].hash_sha256+'.file'; - let results = await api.download_file_id(axios, file_id, hash_sha256); - } - } else { - console.log('No presenter files found.'); - } - } else { - console.log('No check for presenter files.'); - } - // Check for presenter files end - - } - } - } - } else { - console.log('No check for location sessions.'); - } - /* - if (launcher.sessions) { - console.log('Check for session files.'); - let for_id = launcher.event_location_id; - launcher.files = await api.get_files_for_type_for_id(axios, 'location', for_id); - for (var i in launcher.sessions) { - console.log('f: ('+launcher.sessions[i].event_file_id+') '+launcher.files[i].event_file_filename+' ***') - file_id = launcher.files[i].event_file_id; // NOTE: the .id is the hosted_file.id! - let results = await api.download_file_id(axios, file_id); - } - } else { - console.log('No check for location files.'); - } - */ - - } else { - console.log('Waiting a few more seconds to see if Authorization header is set.'); - } -}, 5000); diff --git a/app/js/hold testing.js b/app/js/hold testing.js deleted file mode 100644 index 342b8af..0000000 --- a/app/js/hold testing.js +++ /dev/null @@ -1,50 +0,0 @@ -const { shell } = require('electron'); -const fs = require('fs'); -const screen = require('screen'); - -const path = ''; -const filename = 'test.txt'; - -//Check if file exists -if(fs.existsSync(filename)) { -} else { - console.log("File does not exist. Creating new file.") - fs.writeFile(filename, '', (err) => { - if(err) - console.log(err) - }) -} - -//shell.openPath('test.txt'); - -/* -const path = './'; -if (fs.stat.isDirectory(path)) { - console.log('Directory'); -} else { - console.log('File or nothing'); -} -*/ - -/* -function testing() { - console.log(api_temporary_token); -} -*/ - -/* Testing inter-process communication (IPC) */ -/* -var ipc = require('electron').ipcRenderer; -var authButton = document.getElementById('test_button'); -authButton.addEventListener('click', function(){ - ipc.once('action_reply', function(event, response){ - processResponse(response); - }) - //ipc.send('invoke_action', 'Test PowerPoint.pptx'); - ipc.send('invoke_action', api_temporary_token); -}); - -function processResponse(response) { - document.getElementById('response').innerHTML = "Response: "+response; -} -*/ diff --git a/app/js/module_app.js b/app/js/module_app.js deleted file mode 100644 index cc63158..0000000 --- a/app/js/module_app.js +++ /dev/null @@ -1,160 +0,0 @@ -'use strict'; -const os = require('os'); -const path = require('path'); -const fs = require('fs'); -const { ipcRenderer } = require('electron'); - -exports.load_config = function () { - console.log('CWD: '+process.cwd()); - - let home_directory = require('os').homedir(); - console.log('Home: '+home_directory); - - let tmp_directory = require('os').tmpdir(); - console.log('Temporary: '+tmp_directory); - - let config = null; - let config_directory = null; - let default_config_path = path.join(process.cwd(),'config.json.default'); - let config_path = null; - - if (os.platform == 'darwin') { - config_directory = path.join(home_directory, 'Library/Application Support/OSIT'); - console.log('macOS config directory: '+config_directory); - } else if (os.platform == 'linux') { - config_directory = path.join(home_directory, '.config/OSIT'); - console.log('Linux config directory: '+config_directory); - } - - if (fs.existsSync(config_directory)) { - console.log('Config: '+config_directory); - config_path = path.join(config_directory, 'config.json'); - } else { - fs.mkdirSync(config_directory); - console.log('Config directory created: '+config_directory); - - //default_config_path = path.join(process.cwd(),'config.json.default'); - config_path = path.join(config_directory, 'config.json'); - fs.copyFileSync(default_config_path, config_path); - console.log('Default config file copied: '+config_directory); - } - - if (fs.existsSync(config_path)) { - console.log('Config path: '+config_path); - console.log('Config file (config.json) found under '+config_directory+'.'); - - config = JSON.parse(fs.readFileSync(config_path)); - console.log('Config file read.'); - } else if (!fs.existsSync(config_path)) { - fs.copyFileSync(default_config_path, config_path); - console.log('Default config file copied: '+config_directory); - - config = JSON.parse(fs.readFileSync(config_path)); - console.log('Config file read.'); - } else if (fs.existsSync('config.json')) { - //fs.copyFileSync(default_config_path, config_path); - //console.log('Default config file copied: '+config_directory); - - config = JSON.parse(fs.readFileSync('config.json')); - console.log('Config file (config.json) not found under '+config_directory+'. Using config in CWD.'); - console.log('Config file read.'); - - //console.log('Config file (config.json) not found under '+config_directory+'. Using config in CWD.'); - //config = JSON.parse(fs.readFileSync('config.json')); - } else { - //close(); - } - //console.log(config); - return config; -} - - -exports.check_file_cache = async function (host_file_cache_path, event_file_id, hash) { - console.log('**** *** ** * FUNCTION: check_file_cache (v3) * ** *** ****'); - console.log('Checking the local file cache against the remote server.'); - - event_file_id; // NOTE: This is the event_file.id_random or event_file.event_file_id_random - let hash_filename = hash+'.file'; - - let save_path = path.join(host_file_cache_path, hash_filename); - console.log(save_path); - - if (fs.existsSync(save_path)) { - console.log('Hashed file cache already exists: '+save_path); - } else { - console.log('Hashed file not found in local cache. Downloading file: '+save_path); - let endpoint = `/event/file/${event_file_id}/download`; - ipcRenderer.send('download_file', api_base_url, endpoint, save_path); // Must download file using main node.js thread. - } - - return true; -} - - -exports.check_file_cache_v1 = async function () { - console.log('**** *** ** * FUNCTION: check_file_cache * ** *** ****'); - console.log('Checking the local file cache against the remote server.'); - - if (api_base_url && api_temporary_token) { - tbl_event_file.iterate(function(file_value, key, iteration) { - //if (file_value.event_location_id == event_location_id) { - //console.log('f: ('+file_value.event_file_id+') '+file_value.event_file_filename+' ***') - - let file_id = file_value.id; // NOTE: This is the event_file.id or event_file_id. - let filename = file_value.hosted_file_hash_sha256+'.file'; - - let save_path = path.join(host_file_cache_path, filename); - //console.log(save_path); - - if (fs.existsSync(save_path)) { - //console.log('Local file already exists: '+save_path); - } else { - console.log('File not found locally. Downloading file: '+save_path); - let api_endpoint = '/event/file/'+file_id+'/download'; - ipcRenderer.send('download_file', api_base_url, api_endpoint, api_temporary_token, save_path); // Must download file using main node.js thread. - } - }); - } else { - console.log('The api_base_url or api_temporary_token has not been set.'); - console.log(api_base_url); - console.log(api_temporary_token); - return false; - } - - return true; -} - - -exports.currently_online = function() { - //alert('You are currently online'); - console.log('Currently online'); - app_online = true; - //document.getElementById('app_network_status').classList.remove('alert-info'); - //document.getElementById('app_network_status').classList.remove('warning'); - //document.getElementById('app_network_status').classList.remove('alert-warning'); - //document.getElementById('app_network_status').classList.add('success'); - //document.getElementById('app_network_status').classList.add('alert-success'); - document.getElementById('app_network_status').classList.remove('app_warning'); - //document.getElementById('app_network_status').classList.add('d-none'); - document.getElementById('app_network_status').innerHTML = ' Currently Online'; - //document.getElementById('app_network_status').innerHTML('Currently Online'); -} - - -exports.currently_offline = function() { - //alert('You are currently offline'); - console.log('Currently offline'); - app_online = false; - //document.getElementById('app_network_status').classList.remove('alert-info'); - //document.getElementById('app_network_status').classList.remove('success'); - //document.getElementById('app_network_status').classList.remove('alert-success'); - //document.getElementById('app_network_status').classList.add('warning'); - //document.getElementById('app_network_status').classList.add('alert-warning'); - document.getElementById('app_network_status').classList.add('app_warning'); - //document.getElementById('app_network_status').classList.remove('d-none'); - document.getElementById('app_network_status').innerHTML = ' Currently Offline'; - //document.getElementById('app_network_status').innerHTML('Currently Offline'); -} - -//window.addEventListener('online', currently_online); -//window.addEventListener('offline', currently_offline); diff --git a/app/js/module_app_ui.js b/app/js/module_app_ui.js deleted file mode 100644 index f6cb155..0000000 --- a/app/js/module_app_ui.js +++ /dev/null @@ -1,302 +0,0 @@ -const os = require('os'); -const path = require('path'); -const fs = require('fs'); - -const { ipcRenderer } = require('electron'); - - -exports.render_launcher = function (launcher_tmp) { - console.log('Rendering based on launcher_tmp...'); - - console.log('In module_app_ui.js v2 idb to launcher object: ***'); - console.log(launcher_tmp); - console.log('In module_app_ui.js v2 idb to launcher object: ^^^'); - /* - if (launcher_tmp.event) { - for (var i in launcher_tmp.event) { - if (launcher_tmp.event[i].id == event_id) { - console.log('*** Event id ('+event_id+') found in launcher object.'); - for (var j in launcher_tmp.location) { - if (launcher_tmp.location[j].id == event_location_id) { - console.log('*** Location id ('+event_location_id+') found in launcher object.'); - document.title = launcher_tmp.location[j].name+'@'+launcher_tmp.event[i].name; - document.getElementById('location_name').innerHTML = ' '+launcher_tmp.location[j].name+'@'+launcher_tmp.event[i].name; - } else { - console.log('Event location not it.'); - } - } - } else { - console.log('Event not it.'); - } - } - console.log('Data in launcher object'); - console.log(launcher_tmp); - } else { - console.log('Missing data in launcher object'); - return false; - } - */ - document.getElementById('event_files_menu').innerHTML = '

Event Files

'; - document.getElementById('event_files_menu').innerHTML += ''; - - - document.getElementById('location_files_menu').innerHTML = '

Location Files

'; - document.getElementById('location_files_menu').innerHTML += ''; - - //document.getElementById('sessions_menu').innerHTML = '

Sessions

'; - //document.getElementById('sessions_menu').innerHTML += ''; - - index_launcher_sessions('btn_view_session'); - - index_open_file_buttons('open_local_file'); - - - //const btn_session_{{ event_presentation.id }}_name = document.querySelector('button#presentation_{{ event_presentation.id }}_name'); - //btn_presentation_{{ event_presentation.id }}_name.onclick = display_hide_poster_for_type_id.bind(this, true, 'presentation', {{ event_presentation.id }}); - console.log('Rendering launcher finished.'); - - return true; -} - - -/* Updated 2019-12-19 */ -function index_launcher_sessions(class_name) { - console.log('Indexing launcher sessions with class name: '+class_name); - var class_elements = document.getElementsByClassName(class_name); - - for (var i = 0; i < class_elements.length; i++) { - class_elements[i].addEventListener( 'click', function() {view_session( this.getAttribute('data-session_id')) } ); - } - - return true; -} - - -/* Updated 2019-12-19 */ -function view_session(session_id) { - var class_elements = document.getElementsByClassName('launcher_sessions'); - console.log('*** View session ID: '+session_id); - for (var i = 0; i < class_elements.length; i++) { - //console.log('*** checking: '+class_elements[i].getAttribute('data-session_id')); - if (class_elements[i].getAttribute('data-session_id') == session_id) { - //console.log('show'); - class_elements[i].classList.remove('d-none'); - class_elements[i].classList.add('d-block'); - } else { - //console.log('hide'); - class_elements[i].classList.remove('d-block'); - class_elements[i].classList.add('d-none'); - } - } - - return true; -} - - - - - -/* Updated 2019-12-20 */ -function index_open_file_buttons(class_name) { - var class_elements = document.getElementsByClassName(class_name); - - for (var i = 0; i < class_elements.length; i++) { - //class_elements[i].addEventListener( 'click', function() {open_local_file( this.getAttribute('data-filename')) } ); - - //let directory = 'file_cache/'; - - //directory_and_filename = path.join(directory, class_elements[i].getAttribute('data-filename')); - - let file_path = path.join(host_file_cache_path, class_elements[i].getAttribute('data-hash_sha256')); - let filename = class_elements[i].getAttribute('data-filename'); - - class_elements[i].addEventListener( 'click', function() { ipcRenderer.send('open_local_file', file_path, filename) } ); - //ipcRenderer.send('open_local_file', this.getAttribute('data-filename')); // in render thread - } - - return true; -} - - - -function format_bytes(bytes, decimals = 2) { - if (bytes === 0) return '0 Bytes'; - - const k = 1024; - const dm = decimals < 0 ? 0 : decimals; - const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; - - const i = Math.floor(Math.log(bytes) / Math.log(k)); - - return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; -} diff --git a/module_helper.js.bak b/module_helper.js.bak deleted file mode 100644 index dc383b8..0000000 --- a/module_helper.js.bak +++ /dev/null @@ -1,63 +0,0 @@ -const os = require('os'); -const path = require('path'); -const fs = require('fs'); - -exports.download_file_id = async function (axios, file_id, filename_override) { - console.log('Downloading file...'); - const url = '/event/file/'+file_id+'/download'; - - const data = await axios({ - method: "get", - url: url, - responseType: "stream" - }) - .then(function (response) { - //console.log(response); - //console.log(response.data); - - let filename = 'default.txt'; - - if (typeof filename_override === 'undefined' || filename_override == null) { - let headerLine = response.data.headers['content-disposition']; - - console.log(headerLine); - console.log(headerLine.indexOf('="')); - console.log(headerLine.indexOf('=')); - if (headerLine.indexOf('="') != -1) { - let startFileNameIndex = headerLine.indexOf('="') + 2; - let endFileNameIndex = headerLine.lastIndexOf('"'); - filename = headerLine.substring(startFileNameIndex, endFileNameIndex); - } else if (headerLine.indexOf('=') != -1) { - let startFileNameIndex = headerLine.indexOf('=') + 1; - let endFileNameIndex = headerLine.length; - filename = headerLine.substring(startFileNameIndex, endFileNameIndex); - } else { - filename = 'filename_not_found_in_header.txt'; - } - } else { - filename = filename_override; - } - - let directory = 'file_cache/'; - - directory_and_filename = path.join(directory, filename); - - //console.log(directory_and_filename); - - if (fs.existsSync(directory_and_filename)) { - console.log('File already exists: '+directory_and_filename); - } else { - console.log('Starting file download: '+directory_and_filename); - response.data.pipe(fs.createWriteStream(directory_and_filename)); - } - //data = response.data; - return true; - //return response.data; - }) - .catch(function (error) { - console.log(error); - return error; - }); - - return data; -}