Skip to content

Commit

Permalink
feat: review columns (do not show update) and make space for tools
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpeterparker committed Feb 5, 2025
1 parent 8543d6d commit f754664
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 25 deletions.
24 changes: 21 additions & 3 deletions src/frontend/src/lib/components/auth/User.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
let { user }: Props = $props();
let { owner, created_at, updated_at, data } = $derived(user);
let { owner, created_at, data } = $derived(user);
let { provider } = $derived(data);
</script>

<tr>
<td></td>
<td><Identifier small={false} identifier={owner.toText()} /></td>
<td class="providers">
{#if provider === 'internet_identity'}
Expand All @@ -25,12 +26,29 @@
<IconNFID />
{/if}
</td>
<td>{formatToDate(created_at)}</td>
<td>{formatToDate(updated_at)}</td>
<td class="created">{formatToDate(created_at)}</td>
</tr>

<style lang="scss">
@use '../../styles/mixins/media';
.providers {
vertical-align: middle;
}
.providers {
display: none;
@include media.min-width(small) {
display: table-cell;
}
}
.created {
display: none;
@include media.min-width(medium) {
display: table-cell;
}
}
</style>
37 changes: 15 additions & 22 deletions src/frontend/src/lib/components/auth/Users.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@
<table>
<thead>
<tr>
<th class="tools"></th>
<th class="identifier"> {$i18n.users.identifier} </th>
<th class="providers"> {$i18n.users.provider} </th>
<th class="created"> {$i18n.users.created} </th>
<th class="updated"> {$i18n.users.updated} </th>
</tr>
</thead>

Expand All @@ -92,32 +92,29 @@
<style lang="scss">
@use '../../styles/mixins/media';
.providers,
.created,
.updated {
.tools {
width: 48px;
}
.providers {
display: none;
@include media.min-width(medium) {
display: table-header-group;
@include media.min-width(small) {
display: table-cell;
}
}
.identifier {
width: 100%;
}
.created {
display: none;
@include media.min-width(medium) {
.identifier {
width: 260px;
@include media.min-width(medium) {
display: table-cell;
}
}
@include media.min-width(small) {
.providers {
width: 120px;
}
.providers,
.created {
display: table-cell;
width: 220px;
}
}
Expand All @@ -129,9 +126,5 @@
.providers {
width: inherit;
}
.updated {
display: table-cell;
}
}
</style>

0 comments on commit f754664

Please sign in to comment.