style: FA→Lucide migration in remaining core admin files
- person_view.svelte: converted all FA spans including complex {#if} refactor
of {@html} ternary string patterns (hide/enable/priority/auth_key buttons)
- people/[person_id]/+page.svelte: ArrowLeft, HelpCircle, LoaderCircle
- ae_comp__person_obj_tbl.svelte: Building2, ListOrdered, Mail, Unlink, User, UserCheck
- migrate script: added fa-archive, fa-link-slash, fa-question-circle mappings
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -107,6 +107,9 @@ FA_TO_LUCIDE = {
|
||||
'fa-user-ninja': 'UserRound',
|
||||
'fa-user-tie': 'UserRound',
|
||||
'fa-video': 'Video',
|
||||
'fa-archive': 'Archive',
|
||||
'fa-link-slash': 'Unlink',
|
||||
'fa-question-circle': 'HelpCircle',
|
||||
}
|
||||
|
||||
# Skip modifiers — not real icon names
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
slct,
|
||||
slct_trigger
|
||||
} from '$lib/stores/ae_stores';
|
||||
import { Building2, ListOrdered, Mail, Unlink, User, UserCheck } from 'lucide-svelte';
|
||||
// import { core_func } from '$lib/ae_core_functions';
|
||||
// import { events_loc, events_sess, events_slct, events_trigger, events_trig_kv } from '$lib/stores/ae_events_stores';
|
||||
// import { events_func } from '$lib/ae_events_functions';
|
||||
@@ -54,7 +55,7 @@
|
||||
class="text-3xl font-bold bg-success-100 px-4 border rounded-lg border-success-200"
|
||||
title="Count {$lq_kv__person_obj_li.length ?? 'None'}"
|
||||
>
|
||||
<span class="fas fa-list-ol mx-4"></span>
|
||||
<ListOrdered size="1em" class="mx-4" />
|
||||
{$lq_kv__person_obj_li.length ?? 'None'}
|
||||
</span>
|
||||
{/if}
|
||||
@@ -77,7 +78,7 @@
|
||||
{#each $lq_kv__person_obj_li as person_obj (person_obj?.person_id_random)}
|
||||
<tr class:dim={person_obj?.hide}>
|
||||
<td class="px-4 py-2">
|
||||
<span class="fas fa-user"></span>
|
||||
<User size="1em" />
|
||||
<a
|
||||
href="/core/people/{person_obj?.person_id_random}"
|
||||
class="text-blue-500 underline hover:text-blue-800"
|
||||
@@ -91,7 +92,7 @@
|
||||
</a>
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<span class="fas fa-envelope"></span>
|
||||
<Mail size="1em" />
|
||||
{#if person_obj?.primary_email}
|
||||
<a
|
||||
href="mailto:{person_obj?.primary_email}"
|
||||
@@ -104,7 +105,7 @@
|
||||
{/if}
|
||||
</td>
|
||||
<td class="px-4 py-2">
|
||||
<span class="fas fa-building"></span>
|
||||
<Building2 size="1em" />
|
||||
{@html person_obj?.affiliations ?? ae_snip.html__not_set}
|
||||
</td>
|
||||
|
||||
@@ -113,7 +114,7 @@
|
||||
{#if person_obj?.user_id_random}
|
||||
<div class="flex flex-col gap-1">
|
||||
<span class="font-bold flex items-center gap-1">
|
||||
<span class="fas fa-user-check text-success-500"></span>
|
||||
<UserCheck size="1em" class="text-success-500" />
|
||||
<a
|
||||
href="/core/users/{person_obj?.user_id_random}"
|
||||
class="text-blue-500 underline hover:text-blue-800"
|
||||
@@ -125,7 +126,7 @@
|
||||
</div>
|
||||
{:else}
|
||||
<span class="badge preset-tonal-warning">
|
||||
<span class="fas fa-link-slash mr-1"></span>
|
||||
<Unlink size="1em" class="mr-1" />
|
||||
Not Linked
|
||||
</span>
|
||||
{/if}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
import { qry_ae_obj_li__event } from '$lib/ae_events/ae_events__event';
|
||||
import { qry__post } from '$lib/ae_posts/ae_posts__post';
|
||||
import { qry__activity_log } from '$lib/ae_core/ae_core__activity_log';
|
||||
import { Users, Link, Unlink, UserPlus, ShieldCheck, User, Calendar, MessageSquare, History, Activity, Edit, Eye } from 'lucide-svelte';
|
||||
import { Activity, ArrowLeft, Calendar, Edit, Eye, HelpCircle, History, Link, LoaderCircle, MessageSquare, ShieldCheck, Unlink, User, UserPlus, Users } from 'lucide-svelte';
|
||||
|
||||
interface Props {
|
||||
data: any;
|
||||
@@ -177,7 +177,7 @@
|
||||
>
|
||||
<div>
|
||||
<a href="/core/people" class={ae_snip.classes__core_menu__button}>
|
||||
<span class="fas fa-arrow-left mx-1"></span>
|
||||
<ArrowLeft size="1em" class="mx-1" />
|
||||
Back to People
|
||||
</a>
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
class={ae_snip.classes__core_menu__button}
|
||||
title="Help and information about the person page"
|
||||
>
|
||||
<span class="fas fa-question-circle mx-1"></span>
|
||||
<HelpCircle size="1em" class="mx-1" />
|
||||
{#if $ae_loc.person.show_content__person_page_help}
|
||||
Hide
|
||||
{:else}
|
||||
@@ -237,7 +237,7 @@
|
||||
class:hidden={!$ae_loc.person.show_content__person_page_help}
|
||||
title="Help and information about the session search"
|
||||
>
|
||||
<span class="fas fa-question-circle mx-1"></span>
|
||||
<HelpCircle size="1em" class="mx-1" />
|
||||
{#if $ae_loc.person.show_content__person_page_help}
|
||||
Hide
|
||||
{:else}
|
||||
@@ -403,7 +403,7 @@
|
||||
|
||||
{#if !$lq__person_obj}
|
||||
<div class="flex flex-row items-center justify-center p-8">
|
||||
<span class="fas fa-spinner fa-spin mx-1"></span>
|
||||
<LoaderCircle size="1em" class="mx-1 animate-spin" />
|
||||
<span>Loading Person...</span>
|
||||
</div>
|
||||
{:else if is_editing}
|
||||
|
||||
@@ -27,6 +27,11 @@
|
||||
slct_trigger
|
||||
} from '$lib/stores/ae_stores';
|
||||
import { db_core } from '$lib/ae_core/db_core';
|
||||
import {
|
||||
Archive, BookOpen, Building2, Check, Eye, EyeOff, Fingerprint,
|
||||
IdCard, Key, LoaderCircle, Mail, Save, Star, Tag, ToggleLeft,
|
||||
ToggleRight, TriangleAlert, User, UserRound
|
||||
} from 'lucide-svelte';
|
||||
// import { db_events } from "$lib/db_events";
|
||||
// import { events_loc, events_sess, events_slct, events_trigger } from '$lib/stores/ae_events_stores';
|
||||
// import { events_func } from '$lib/ae_events_functions';
|
||||
@@ -101,7 +106,7 @@
|
||||
allow_null={true}
|
||||
on_success={() => core_func.load_ae_obj_id__person({ api_cfg: $ae_api, person_id: $lq__person_obj?.person_id_random, log_lvl: 1 })}
|
||||
>
|
||||
<span class="fas fa-id-card"></span>
|
||||
<IdCard size="1em" />
|
||||
External ID:
|
||||
<span class="font-bold">
|
||||
{@html $lq__person_obj.external_id ?? ae_snip.html__not_set}
|
||||
@@ -118,7 +123,7 @@
|
||||
allow_null={true}
|
||||
on_success={() => core_func.load_ae_obj_id__person({ api_cfg: $ae_api, person_id: $lq__person_obj?.person_id_random, log_lvl: 1 })}
|
||||
>
|
||||
<span class="fas fa-fingerprint"></span>
|
||||
<Fingerprint size="1em" />
|
||||
External System ID:
|
||||
<span class="font-bold">
|
||||
{@html $lq__person_obj.external_sys_id ?? ae_snip.html__not_set}
|
||||
@@ -127,7 +132,7 @@
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class="fas fa-user"></span>
|
||||
<User size="1em" />
|
||||
|
||||
<Element_ae_obj_field_editor_v3
|
||||
object_type={'person'}
|
||||
@@ -164,7 +169,7 @@
|
||||
allow_null={true}
|
||||
on_success={() => core_func.load_ae_obj_id__person({ api_cfg: $ae_api, person_id: $lq__person_obj?.person_id_random, log_lvl: 1 })}
|
||||
>
|
||||
<span class="fas fa-envelope"></span>
|
||||
<Mail size="1em" />
|
||||
<span class="font-bold">
|
||||
{#if $lq__person_obj.primary_email}
|
||||
<a
|
||||
@@ -190,7 +195,7 @@
|
||||
allow_null={true}
|
||||
on_success={() => core_func.load_ae_obj_id__person({ api_cfg: $ae_api, person_id: $lq__person_obj?.person_id_random, log_lvl: 1 })}
|
||||
>
|
||||
<span class="fas fa-building"></span>
|
||||
<Building2 size="1em" />
|
||||
<span class="font-bold">
|
||||
{@html $lq__person_obj.affiliations ?? 'affiliations' + ae_snip.html__not_set}
|
||||
</span>
|
||||
@@ -206,7 +211,7 @@
|
||||
allow_null={true}
|
||||
on_success={() => core_func.load_ae_obj_id__person({ api_cfg: $ae_api, person_id: $lq__person_obj?.person_id_random, log_lvl: 1 })}
|
||||
>
|
||||
<span class="fas fa-user-tag"></span>
|
||||
<Tag size="1em" />
|
||||
<span class="font-bold">
|
||||
{@html $lq__person_obj.professional_title &&
|
||||
$lq__person_obj.professional_title.length
|
||||
@@ -225,7 +230,7 @@
|
||||
allow_null={true}
|
||||
on_success={() => core_func.load_ae_obj_id__person({ api_cfg: $ae_api, person_id: $lq__person_obj?.person_id_random, log_lvl: 1 })}
|
||||
>
|
||||
<span class="fas fa-user-secret"></span>
|
||||
<UserRound size="1em" />
|
||||
Passcode:
|
||||
<span class="font-bold">
|
||||
{@html $lq__person_obj.passcode ?? 'passcode' + ae_snip.html__not_set}
|
||||
@@ -247,13 +252,14 @@
|
||||
class="btn btn-sm preset-tonal-warning"
|
||||
>
|
||||
{#if $ae_loc.trusted_access}
|
||||
{@html $lq__person_obj?.hide
|
||||
? '<span class="fas fa-eye m-1"></span> Unhide?'
|
||||
: '<span class="fas fa-eye-slash m-1"></span> Hide?'}
|
||||
{#if $lq__person_obj?.hide}
|
||||
<Eye size="1em" class="m-1" /> Unhide?
|
||||
{:else}
|
||||
<EyeOff size="1em" class="m-1" /> Hide?
|
||||
{/if}
|
||||
{:else}
|
||||
{@html $lq__person_obj?.hide
|
||||
? '<span class="fas fa-archive m-1"></span> Unarchive'
|
||||
: '<span class="fas fa-archive m-1"></span> Archive'}
|
||||
<Archive size="1em" class="m-1" />
|
||||
{$lq__person_obj?.hide ? 'Unarchive' : 'Archive'}
|
||||
{/if}
|
||||
</button>
|
||||
|
||||
@@ -270,13 +276,17 @@
|
||||
class="btn btn-sm preset-tonal-warning"
|
||||
>
|
||||
{#if $ae_loc.trusted_access}
|
||||
{@html $lq__person_obj?.enable
|
||||
? '<span class="fas fa-toggle-on m-1"></span> Disable?'
|
||||
: '<span class="fas fa-toggle-off m-1"></span> Enable?'}
|
||||
{#if $lq__person_obj?.enable}
|
||||
<ToggleRight size="1em" class="m-1" /> Disable?
|
||||
{:else}
|
||||
<ToggleLeft size="1em" class="m-1" /> Enable?
|
||||
{/if}
|
||||
{:else}
|
||||
{@html $lq__person_obj?.enable
|
||||
? '<span class="fas fa-toggle-on m-1"></span> Disable'
|
||||
: '<span class="fas fa-toggle-off m-1"></span> Enable'}
|
||||
{#if $lq__person_obj?.enable}
|
||||
<ToggleRight size="1em" class="m-1" /> Disable
|
||||
{:else}
|
||||
<ToggleLeft size="1em" class="m-1" /> Enable
|
||||
{/if}
|
||||
{/if}
|
||||
</button>
|
||||
|
||||
@@ -292,14 +302,11 @@
|
||||
}}
|
||||
class="btn btn-sm preset-tonal-warning"
|
||||
>
|
||||
<Star size="1em" class="m-1" />
|
||||
{#if $ae_loc.trusted_access}
|
||||
{@html $lq__person_obj?.priority
|
||||
? '<span class="fas fa-star m-1"></span> Not Priority?'
|
||||
: '<span class="fas fa-star m-1"></span> Priority?'}
|
||||
{$lq__person_obj?.priority ? 'Not Priority?' : 'Priority?'}
|
||||
{:else}
|
||||
{@html $lq__person_obj?.priority
|
||||
? '<span class="fas fa-star m-1"></span> Not Priority'
|
||||
: '<span class="fas fa-star m-1"></span> Priority'}
|
||||
{$lq__person_obj?.priority ? 'Not Priority' : 'Priority'}
|
||||
{/if}
|
||||
</button>
|
||||
|
||||
@@ -315,14 +322,11 @@
|
||||
}}
|
||||
class="btn btn-sm preset-tonal-warning"
|
||||
>
|
||||
<Key size="1em" class="m-1" />
|
||||
{#if $ae_loc.trusted_access}
|
||||
{@html $lq__person_obj?.allow_auth_key
|
||||
? '<span class="fas fa-key m-1"></span> Not Allow Auth Key?'
|
||||
: '<span class="fas fa-key m-1"></span> Allow Auth Key?'}
|
||||
{$lq__person_obj?.allow_auth_key ? 'Not Allow Auth Key?' : 'Allow Auth Key?'}
|
||||
{:else}
|
||||
{@html $lq__person_obj?.allow_auth_key
|
||||
? '<span class="fas fa-key m-1"></span> Not Allow Auth Key'
|
||||
: '<span class="fas fa-key m-1"></span> Allow Auth Key'}
|
||||
{$lq__person_obj?.allow_auth_key ? 'Not Allow Auth Key' : 'Allow Auth Key'}
|
||||
{/if}
|
||||
</button>
|
||||
</li>
|
||||
@@ -330,7 +334,7 @@
|
||||
<li>
|
||||
<div class="label person__data_json space-y-4">
|
||||
<label for="person__data_json" class="label">
|
||||
<span class="fas fa-book"></span>
|
||||
<BookOpen size="1em" />
|
||||
Person JSON Data
|
||||
<span class="text-sm text-gray-500"> (no character limit) </span>
|
||||
</label>
|
||||
@@ -359,9 +363,9 @@
|
||||
: 0} characters
|
||||
|
||||
{#if ae_tmp.valid__data_json}
|
||||
<span class="fas fa-check text-green-500"></span>
|
||||
<Check size="1em" class="text-green-500" />
|
||||
{:else}
|
||||
<span class="fas fa-exclamation-triangle text-red-500"></span>
|
||||
<TriangleAlert size="1em" class="text-red-500" />
|
||||
Invalid JSON
|
||||
{/if}
|
||||
</p>
|
||||
@@ -396,12 +400,12 @@
|
||||
}}
|
||||
>
|
||||
{#await ae_promises.update__person_obj}
|
||||
<span class="fas fa-spinner fa-spin mx-1"></span>
|
||||
<LoaderCircle size="1em" class="animate-spin mx-1" />
|
||||
{:then}
|
||||
{#if ae_tmp.value__data_json == $lq__person_obj.data_json}
|
||||
<span class="fas fa-check mx-1"></span>
|
||||
<Check size="1em" class="mx-1" />
|
||||
{:else}
|
||||
<span class="fas fa-save mx-1"></span>
|
||||
<Save size="1em" class="mx-1" />
|
||||
{/if}
|
||||
{/await}
|
||||
Save JSON
|
||||
|
||||
Reference in New Issue
Block a user