feat: 1-to-1 message render + web data-lake backend
This commit is contained in:
1 parent
f0afb7ec5b
commit
75425d1bee
110 files changed
+10199
-54
No files matched your search
@@ -0,0 +1,55 @@
|
||||
<script lang="ts">
|
||||
import type { MessageView } from "$lib/api/types";
|
||||
import { formatTime } from "$lib/format/datetime";
|
||||
|
||||
interface Props {
|
||||
message: MessageView;
|
||||
onversions?: () => void;
|
||||
}
|
||||
|
||||
let { message, onversions }: Props = $props();
|
||||
</script>
|
||||
|
||||
<span class="MessageMeta">
|
||||
{#if message.edited_at}
|
||||
<button
|
||||
type="button"
|
||||
class="edited"
|
||||
title="View edit history"
|
||||
onclick={onversions}
|
||||
>
|
||||
edited
|
||||
</button>
|
||||
{/if}
|
||||
<span class="time">{formatTime(message.date)}</span>
|
||||
</span>
|
||||
|
||||
<style lang="scss">
|
||||
.MessageMeta {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
|
||||
float: right;
|
||||
margin-top: 0.125rem;
|
||||
margin-inline-start: 0.5rem;
|
||||
|
||||
font-size: 0.75rem;
|
||||
color: var(--meta-color, var(--color-text-meta));
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.time {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.edited {
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
font-size: 0.75rem;
|
||||
font-style: italic;
|
||||
color: inherit;
|
||||
background: transparent;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user