More general code clean up. More removing of the _random bits.

This commit is contained in:
Scott Idem
2026-02-11 13:00:42 -05:00
parent 87d74e5b4b
commit 3ca041383f
9 changed files with 15 additions and 641 deletions

View File

@@ -325,20 +325,6 @@
</title>
</svelte:head>
<!-- <section
class="
ae_idaa__archives
h-full mx-auto
flex flex-col gap-1
py-1 px-2 pb-16
items-center
justify-center
min-w-full
max-w-max
text-center
outline
"
> -->
<!-- <h1>Archives {$lq__archive_obj?.name} - {$lq__archive_content_obj_li?.length}</h1> -->
@@ -436,7 +422,6 @@
<Archive_content_obj_li {lq__archive_content_obj_li} />
<!-- </section> -->
<!-- Modal: Archive edit ID -->
<Modal
@@ -456,7 +441,7 @@
type="button"
onclick={() => {
// const url = new URL(location);
// url.searchParams.set('event_id', $lq__archive_obj?.event_id_random);
// url.searchParams.set('event_id', $lq__archive_obj?.event_id);
// history.pushState({}, '', url);
$idaa_sess.archives.show__modal_view__archive_id =
@@ -494,9 +479,7 @@
{/snippet}
</Modal>
<!-- Modal: Archive Content edit ID -->
<!-- title="{$lq__archive_content_obj?.name ?? 'New Archive Content'} - {$lq__archive_content_obj?.id ?? 'Not Saved Yet'}" -->
<!-- {#if $idaa_sess.archives.show__modal_edit__archive_content_id} -->
<Modal
bind:open={$idaa_sess.archives.show__modal_edit__archive_content_id}
autoclose={false}
@@ -512,10 +495,6 @@
<button
type="button"
onclick={() => {
// const url = new URL(location);
// url.searchParams.set('event_id', $lq__archive_content_obj?.event_id_random);
// history.pushState({}, '', url);
// $idaa_sess.archives.show__modal_view__archive_content_id = $idaa_slct.archive_content_id;
$idaa_slct.archive_content_id = null;
$idaa_slct.archive_content_obj = {};
@@ -552,12 +531,7 @@
</button>
{/snippet}
</Modal>
<!-- {/if} -->
<!-- Showing and hiding a modal like this seems to cause an issue with where it is rendered on the page. The <Modal> should be moved back here and the actual "player" left mostly separate. 2025-07-10 -->
<!-- {#if $idaa_slct.archive_content_id} -->
<Modal_media_player {lq__archive_content_obj} />
<!-- {/if} -->
<!-- </Modal> -->
<!-- {/if} -->

View File

@@ -1,586 +0,0 @@
/* Write your global styles here, in PostCSS syntax */
/* @tailwind base; */
:root {
font-family: system-ui, Helvetica, Arial, sans-serif;
/* line-height: 1.5; */
/* font-weight: 400; */
color-scheme: light dark;
/* color: rgba(255, 255, 255, 0.87); */
/* background-color: #242424; */
/* font-synthesis: none; */
/* text-rendering: optimizeLegibility; */
/* -webkit-font-smoothing: antialiased; */
/* -moz-osx-font-smoothing: grayscale; */
/* -webkit-text-size-adjust: 100%; */
}
body {
/* margin: 0; */
/* display: flex;
place-items: center; */
/* min-width: 320px; */
min-height: 100vh;
/* min-height: fit-content; */
/* height: 100%; */
min-width: 100vw;
/* width: 100%; */
/* contain: layout; */
/* contain: size; */
}
address {
margin-bottom: 0.25em;
padding-left: 0.5em;
font-style: italic;
}
pre {
white-space: pre-wrap;
word-break: normal;
word-wrap: normal;
border: none;
}
textarea {
/* width: calc(fit-content - 1em); */
width: 100%;
max-width: calc(fit-content - 0.5em);
}
button.ae_normal,
.btn.ae_normal {
/* font: normal 1em sans-serif; */
font-size: 1rem;
}
button.ae_smaller,
.btn.ae_smaller {
font-size: 0.8rem;
}
button.ae_smallest,
.btn.ae_smallest {
font-size: 0.65rem;
}
/* h1 {
font-size: 3.2em;
line-height: 1.1;
} */
/* .card {
padding: 2em;
} */
/* #app {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
} */
/* button {
border-radius: 8px;
border: 1px solid transparent;
padding: 0.6em 1.2em;
font-size: 1em;
font-weight: 500;
font-family: inherit;
background-color: #1a1a1a;
cursor: pointer;
transition: border-color 0.25s;
}
button:hover {
border-color: #646cff;
}
button:focus,
button:focus-visible {
outline: 4px auto -webkit-focus-ring-color;
} */
/* @media (prefers-color-scheme: light) {
:root {
color: #213547;
background-color: #ffffff;
}
a:hover {
color: #747bff;
}
button {
background-color: #f9f9f9;
}
} */
/* BEGIN: Novi and Bootstrap specific fixes */
/* .ae_btn .btn_xs, .btn .btn-xs {
font-size: .65rem;
} */
.ae_btn.btn-danger,
.ae_btn.btn-info,
.ae_btn.btn-warning {
border-radius: 60px;
}
/* END: Novi and Bootstrap specific fixes */
.ae_main {
/* min-height: fit-content; */
/* min-height: 100vh; */
/* height: 100%; */
/* min-width: 100vw; */
/* width: 100%; */
/* contain: layout; */
/* contain: content; */
/* contain: size; */
}
.ae_dev_in_progress {
background-color: hsla(300, 80%, 50%, 1);
}
.c_idaa_bb,
.c_idaa_recovery_meetings {
display: flex;
flex-direction: column;
/* align-items: center; */
/* justify-content: center; */
/* min-height: 100vh; */
gap: 1em;
}
.c_idaa_archives > .ae_meta,
.c_idaa_bb > .ae_meta,
.c_idaa_recovery_meetings > .ae_meta {
background-color: lightgray;
}
.ae_list.archive_obj_li {
/* border: solid thin gray; */
display: flex;
flex-direction: column;
/* align-items: stretch; */
/* justify-content: stretch; */
gap: 0.5em;
}
.ae_list.archive_obj_li .ae_object.archive_obj,
.ae_list.archive_content_obj_li .ae_object.archive_content_obj {
border-top: solid medium hsla(0, 0%, 90%, 1);
/* border-bottom: solid thin hsla(0,0%,90%,1); */
/* margin: 1em .5em; */
padding: 0.5em 0.5em;
width: 100%;
/* grow: 1; */
}
.c_idaa_recovery_meetings section.ae_options fieldset {
display: flex;
flex-direction: row;
}
.c_idaa_recovery_meetings section.ae_options fieldset legend {
display: inline;
/* border: none; */
margin: 0;
width: auto;
}
.ae_list.event_obj_li {
/* border: solid thin gray; */
display: flex;
flex-direction: column;
/* align-items: stretch; */
/* justify-content: stretch; */
gap: 0.5em;
}
.ae_list.event_obj_li .ae_object.event_obj {
border-top: solid medium hsla(0, 0%, 90%, 1);
/* border-bottom: solid thin hsla(0,0%,90%,1); */
/* margin: 1em .5em; */
padding: 0.5em 0.5em;
width: 100%;
/* grow: 1; */
}
/* For now this only affects the IDAA Recovery Meetings when viewing a specific meeting. */
.view__event_obj a,
.view__event_obj a.ae_link {
/* color: #007bff; */
color: #82b6e1;
/* text-decoration: underline; */
/* background-color: transparent; */
}
.view__event_obj a:hover,
.view__event_obj a:focus,
.view__event_obj a.ae_link:hover,
.view__event_obj a.ae_link:focus {
color: #0056b3;
text-decoration: underline;
/* background-color: transparent; */
/* scale: 1.1; */
}
.svelte_component {
margin: 0em;
padding: 0em;
}
.ae_section {
display: flex;
flex-direction: column;
}
.ae_warning {
color: red;
}
.ae_highlight {
background-color: hsla(60, 100%, 50%, 1);
}
.ae_d_none,
.d-none {
display: none;
}
.ae_group {
/* display: flex; */
/* flex-direction: row; */
/* align-items: center; */
/* justify-content: space-between; */
/* justify-content: space-evenly; */
}
.ae_column {
display: flex;
flex-direction: column;
/* align-items: center; */
/* justify-content: space-between; */
justify-content: space-evenly;
}
.ae_row {
display: flex;
flex-direction: row;
align-items: center;
/* justify-content: space-between; */
justify-content: space-evenly;
}
.ae_flex_justify_around {
justify-content: space-around;
}
.ae_flex_justify_center {
justify-content: center;
}
.ae_width_25 {
width: 25%;
/* max-width: 25%; */
}
.ae_width_30 {
width: 30%;
/* max-width: 30%; */
}
.ae_width_50 {
width: 50%;
/* max-width: 50%; */
}
.ae_width_100 {
width: 100%;
/* max-width: 100%; */
}
.ae_width_md {
min-width: 16em;
width: 16em;
max-width: 16em;
}
.ae_width_lg {
min-width: 20em;
width: 22em;
max-width: 24em;
}
.ae_margin_xs {
margin: 0.25em;
}
.ae_margin_sm {
margin: 0.5em;
}
.ae_margin_md {
margin: 0.75em;
}
.ae_margin_lg {
margin: 1em;
}
.ae_margin_lg {
margin: 1.25em;
}
.ae_padding_md {
padding: 0.75em;
}
.ae_float_right {
float: right;
align-self: flex-end;
}
.ae_options {
padding: 1em;
}
.ae_fade_in {
/* animation: fadein 1s; */
opacity: 1;
/* height: initial; */
/* max-height: 100%; */
/* width: initial; */
/* max-width: 100%; */
transition:
opacity,
height,
width,
0.25s ease-in;
/* transition: height 1s ease-in; */
/* width: initial; */
/* transition: opacity, height, width 1s ease-in 1s; */
}
.ae_fade_out {
/* animation: fadeout 1s; */
opacity: 0;
height: 0;
max-height: 0;
width: 0;
max-width: 0;
transition:
opacity,
height,
width,
0.25s ease-out;
}
/* .ae_section.ae_options {
border: solid thin hsla(0,0%,90%,.75); */
/* Display options using flex (row, wrap, space elements equally) */
/* display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: center; */
/* justify-content: space-evenly; */
/* align-content: center;
align-items: center;
} */
.ae_section.ae_meta {
font-size: smaller;
color: hsla(0, 0%, 50%, 1);
}
.svelte_component.ae_edit {
/* outline: dashed thin pink; */
border: solid medium hsla(220, 100%, 50%, 0.1);
}
.svelte_component.ae_create {
border: solid medium hsla(0, 100%, 50%, 0.1);
}
/* element_ae_modal ae_modal_showing_container ae_modal modal_cover_body */
.ae_modal {
position: fixed;
top: 0;
left: 0;
z-index: 1000;
min-height: 100vh;
height: 100%;
/* max-height: 100vh; */
min-width: 100vw;
width: 100%;
max-width: 100vw;
/* background-color: hsla(180,75%,90%,.75); */
background-color: hsla(180, 0%, 90%, 0.75);
display: flex;
flex-direction: column;
align-items: center;
/* align-items: flex-start; */
/* justify-content: center; */
/* justify-content: flex-start; */
/* contain: layout; */
contain: strict;
/* contain: size; */
/* Margin should stay 0 and padding can be used to create space within the modal for the actual content. */
margin: 0;
padding: 1em;
/* pointer-events: auto; */
}
.ae_modal .modal_content {
z-index: 1001;
position: relative;
box-sizing: content-box;
background-color: white;
/* margin: 1em;
padding: .25em .5em; */
margin: 0em;
padding: 0em;
border: solid thin lightgray;
border-radius: 0.5em;
/* box-shadow: .5em .5em 1.5em .5em hsla(0, 0%, 0%, .9); */
box-shadow: 0em 0em 1.5em 0.5em hsla(0, 0%, 0%, 0.9);
/* min-height: 50vh; */
max-height: calc(100vh - 2em);
/* max-height: fit-content; */
/* min-width: 50vw; */
max-width: calc(100vw - 2em);
/* max-width: 100vw; */
/* scroll-behavior: auto; */
/* overflow: scroll; */
/* overflow: auto; */
/* contain: content; */
/* contain: strict; */
/* overflow: auto; */
display: flex;
flex-direction: column;
align-items: stretch;
}
.ae_modal .modal_header {
background-color: hsla(0, 0%, 90%, 0.5);
border-bottom: solid thin lightgray;
margin: 0em;
padding: 0.25em 0.25em;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.ae_modal .modal_body {
/* outline: dashed medium pink; */
margin: 0em;
padding: 0.25em 0.25em;
/* height: 100vh; */
/* contain: content; */
/* pointer-events: auto; */
overflow: scroll;
/* overflow-x: auto; */
/* overflow-y: scroll; */
}
.ae_modal .modal_footer {
background-color: hsla(0, 0%, 90%, 0.5);
border-top: solid thin lightgray;
margin: 0em;
padding: 0.25em 0.25em;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
/* body.modal_cover_body {
pointer-events: none;
overflow-y: hidden;
height: fit-content;
contain: size;
} */
body.modal_cover_body .ae_modal {
margin: 0em;
padding: 0em;
/* max-width: 100vw; */
align-items: stretch;
}
body.modal_cover_body .ae_modal .modal_content {
/* outline: dashed thin pink; */
border: none;
border-radius: 0;
box-shadow: none;
max-height: calc(100vh - 0.5em);
max-width: calc(100vw);
}
body.modal_cover_body .ae_modal .modal_body {
/* outline: dashed medium pink; */
}
form {
display: flex;
flex-direction: column;
/* justify-content: flex-start; */
/* align-items: center; */
padding: 0.75em;
}
form fieldset {
display: flex;
flex-direction: column;
/* justify-content: flex-start; */
/* align-items: center; */
}
/* Make readonly input fields grayed out and hide border*/
form input:read-only {
/* background-color: hsla(0,0%,90%,1); */
border: none;
}
/* @tailwind components; */
@tailwind utilities;

View File

@@ -51,7 +51,7 @@
name: `IDAA: ${$idaa_loc.novi_full_name ?? 'none'} ${$idaa_loc.novi_email ?? ''}`,
description: activity_description ?? null,
object_type: 'idaa', // archive, post, event
// object_id_random: data?.route,
// object_id: data?.route,
url_root: data?.url.origin,
// url_full_path: data?.url.href,
url_full_path: data?.url.pathname,

View File

@@ -69,7 +69,7 @@
api_cfg: $ae_api,
account_id: $slct.account_id,
data_kv: {
person_id_random: $ae_loc.person_id,
person_id: $ae_loc.person_id,
name,
type_code: type,
cfg_json: {
@@ -77,9 +77,9 @@
}
}
});
if (results?.journal_id_random) {
if (results?.journal_id) {
$journals_sess.show__modal_new__journal_obj = false;
goto(`/journals/${results.journal_id_random}`);
goto(`/journals/${results.journal_id}`);
}
} catch (error) {
alert('Failed to create journal.');

View File

@@ -198,7 +198,7 @@
});
local_ids = local_results
.map((e) => e.id || e.journal_entry_id_random)
.map((e) => e.id || e.journal_entry_id)
.filter(Boolean);
if (current_search_id === last_search_id) {
@@ -235,7 +235,7 @@
if (current_search_id === last_search_id) {
const api_results = results || [];
const api_ids = api_results
.map((e: any) => e.id || e.journal_entry_id_random)
.map((e: any) => e.id || e.journal_entry_id)
.filter(Boolean);
// Protect UI cache if API returns empty during revalidation

View File

@@ -4,11 +4,6 @@ console.log(`ae_p_journals [journal_entry_id] +page.ts start`);
import { browser } from '$app/environment';
import { journals_func } from '$lib/ae_journals/ae_journals_functions';
import {
db_journals,
journal_entry_field_li
} from '$lib/ae_journals/db_journals';
import { load_ae_obj_id } from '$lib/ae_core/core__crud_generic';
export async function load({ params, parent }) {
// route
@@ -68,15 +63,6 @@ export async function load({ params, parent }) {
log_lvl: log_lvl
});
// const load_journal_entry_obj = await load_ae_obj_id({
// api_cfg: ae_acct.api,
// obj_type: 'journal_entry',
// obj_id: journal_entry_id,
// db_instance: db_journals,
// db_field_li: journal_entry_field_li,
// log_lvl: 2
// });
if (!load_journal_entry_obj) {
console.warn(
`ae Journals [journal_entry_id] +page.ts: Entry ${journal_entry_id} not found via API or Cache.`

View File

@@ -382,14 +382,14 @@
})
.then((result) => {
if (
result?.journal_id_random &&
result?.journal_entry_id_random
result?.journal_id &&
result?.journal_entry_id
) {
alert(
'Journal entry cloned successfully!'
);
goto(
`/journals/${result.journal_id_random}/entry/${result.journal_entry_id_random}`
`/journals/${result.journal_id}/entry/${result.journal_entry_id}`
);
}
})

View File

@@ -156,13 +156,13 @@
log_lvl: log_lvl
});
if (results?.journal_entry_id_random) {
if (results?.journal_entry_id) {
$journals_slct.journal_entry_id =
results.journal_entry_id_random;
results.journal_entry_id;
$journals_loc.entry.edit_kv[$journals_slct.journal_entry_id] =
'current';
goto(
`/journals/${$lq__journal_obj?.journal_id}/entry/${results.journal_entry_id_random}`
`/journals/${$lq__journal_obj?.journal_id}/entry/${results.journal_entry_id}`
);
}
} catch (error) {