Code clean up. Fewer warnings...

This commit is contained in:
Scott Idem
2024-12-03 11:36:24 -05:00
parent 0032d52ff9
commit 971ffbad02
4 changed files with 39 additions and 11 deletions

View File

@@ -459,3 +459,26 @@ img.qr_code:focus {
display: none;
}
}
/* We need to reset many of the styles for the reset_css class. */
.reset_css p {
margin: .75em 0;
}
.reset_css ol {
list-style-type: decimal;
}
.reset_css ul {
list-style-type: disc;
}
.reset_css li {
margin-left: 1.5em;
}
/* Reset anchor tags to the default color and underline. */
.reset_css a {
color: hsla(210, 100%, 50%, 1);
text-decoration: underline;
}
.reset_css a:hover {
color: hsla(210, 100%, 50%, .75);
text-decoration: none;
}

View File

@@ -153,7 +153,7 @@ if (auto_refresh) {
class="text-red-500 bg-red-200 p-1 rounded-md border border-red-200 text-center"
title="{event_device_obj.alert_msg}"
>
<span class="fas fa-exclamation-triangle mx-1" />
<span class="fas fa-exclamation-triangle mx-1"></span>
</span>
{/if}
{#if event_device_obj?.status}
@@ -162,7 +162,7 @@ if (auto_refresh) {
class="text-blue-500 bg-blue-200 p-1 rounded-md border border-blue-200 text-center"
title="{event_device_obj.status_msg}"
>
<span class="fas fa-laptop-code mx-1" />
<span class="fas fa-laptop-code mx-1"></span>
</span>
{/if}
{#if event_device_obj?.record_status}
@@ -171,7 +171,7 @@ if (auto_refresh) {
class="text-orange-500 bg-orange-200 p-1 rounded-md border border-orange-200 text-center"
title="{event_device_obj.record_status_msg}"
>
<span class="fas fa-camera mx-1" />
<span class="fas fa-camera mx-1"></span>
</span>
{/if}
</span>
@@ -241,11 +241,11 @@ if (auto_refresh) {
class:hidden={!event_device_obj?.alert && !event_device_obj?.alert_msg}
>
<div class="flex flex-row items-center justify-between">
<span class="fas fa-exclamation-triangle mx-1" />
<span class="fas fa-exclamation-triangle mx-1"></span>
<strong class="text-bold">
{event_device_obj?.alert ? 'Alert' : 'No Alert'}
</strong>
<span class="fas fa-exclamation-triangle mx-1" />
<span class="fas fa-exclamation-triangle mx-1"></span>
</div>
<div class="font-mono">
<span class="fas fa-comment-dots mx-1"></span>
@@ -263,11 +263,11 @@ if (auto_refresh) {
class:hidden={!event_device_obj?.status && !event_device_obj?.status_msg}
>
<div class="flex flex-row items-center justify-between">
<span class="fas fa-laptop-code mx-1" />
<span class="fas fa-laptop-code mx-1"></span>
<strong class="text-bold">
{event_device_obj?.status ? event_device_obj?.status : 'No Status'}
</strong>
<span class="fas fa-laptop-code mx-1" />
<span class="fas fa-laptop-code mx-1"></span>
</div>
<div class="font-mono">
<span class="fas fa-comment-dots mx-1"></span>
@@ -285,7 +285,7 @@ if (auto_refresh) {
class:hidden={!event_device_obj?.record_status && !event_device_obj?.record_status_msg}
>
<div class="flex flex-row items-center justify-between">
<span class="fas fa-camera mx-1" />
<span class="fas fa-camera mx-1"></span>
<!-- The recording status should be an ISO timestamp if it is recording. We need to check if it is a datetime string first. -->
{#if event_device_obj?.record_status && event_device_obj?.record_status.length > 10}
{ae_util.iso_datetime_formatter(event_device_obj?.record_status, 'time_iso_12_tz')}
@@ -296,7 +296,7 @@ if (auto_refresh) {
{:else}
No Recording Status
{/if}
<span class="fas fa-camera mx-1" />
<span class="fas fa-camera mx-1"></span>
</div>
<div class="font-mono text-black">
<span class="fas fa-comment-dots mx-1"></span>

View File

@@ -107,7 +107,10 @@ onDestroy(() => {
</div> -->
<div class="post__content space-y-2">
<pre class="post__content p-2 bg-white shadow-md rounded-lg text-wrap text-sm font-normal whitespace-pre-wrap">{@html $lq__post_obj?.content}</pre>
<!-- <pre class="post__content p-2 bg-white shadow-md rounded-lg text-wrap text-sm font-normal whitespace-pre-wrap">{@html $lq__post_obj?.content}</pre> -->
<div class="post__content p-2 bg-white shadow-md rounded-lg text-wrap text-sm font-normal reset_css">{@html $lq__post_obj?.content}</div>
{#if $lq__post_obj?.linked_li_json && $lq__post_obj?.linked_li_json.length}
<div class="ae_section flex flex-row flex-wrap gap-1 items-center justify-center">
@@ -336,4 +339,5 @@ onDestroy(() => {
<style lang="scss">
</style>

View File

@@ -39,7 +39,8 @@ onMount(() => {
</h3>
</header>
{#if idaa_post_obj.content}<pre class="post__content p-2 bg-white shadow-md rounded-lg text-wrap text-sm font-normal whitespace-pre-wrap">{@html idaa_post_obj.content}</pre>{/if}
<!-- {#if idaa_post_obj.content}<pre class="post__content p-2 bg-white shadow-md rounded-lg text-wrap text-sm font-normal whitespace-pre-wrap reset_css">{@html idaa_post_obj.content}</pre>{/if} -->
{#if idaa_post_obj.content}<div class="post__content w-full p-2 bg-white shadow-md rounded-lg text-wrap text-sm font-normal reset_css">{@html idaa_post_obj.content}</div>{/if}
<div class="ae_options flex flex-row gap-2 items-center justify-center">
<button