- {#if data.status.warning}
-
- {data.status.warning}
-
- {:else}
- {@html data.status.rich_text}
- {/if}
-
- {#if data.status.media && data.status.media.length > 0}
-
- {/if}
+ {@html data.status.html}
{#if data.type === "mention"}
{#if data.status.reactions}
@@ -148,7 +122,6 @@
text-decoration: inherit;
color: inherit;
transition: background-color .1s;
- cursor: pointer;
}
.notification:hover {
@@ -181,7 +154,6 @@
}
header .notif-avatars img:not(:first-child) {
box-shadow: 4px 0 8px -2px rgba(0,0,0,.33);
- z-index: 0;
}
header .notif-avatars img:not(:last-child) {
margin-left: -8px;
@@ -275,52 +247,4 @@
margin-right: 4px;
border-radius: 4px;
}
-
- .notif-content .warning {
- width: calc(100% - 16px);
- margin-bottom: 10px;
- padding: 4px 8px;
- --warn-bg: color-mix(in srgb, var(--bg-700), var(--accent) 1%);
- background: repeating-linear-gradient(-45deg, transparent, transparent 10px, var(--warn-bg) 10px, var(--warn-bg) 20px);
- font-family: inherit;
- font-size: inherit;
- color: inherit;
- text-align: left;
- border: none;
- border-radius: 8px;
- cursor: pointer;
- outline-color: var(--warn-bg);
- transition: outline .05s, box-shadow .05s;
- }
-
- .notif-media-container {
- margin: 16px 0 4px 0;
- display: flex;
- flex-direction: row;
- gap: 8px;
- font-size: 14px;
- line-height: 1.45em;
- }
-
- .notif-media {
- display: inline-block;
- border-radius: 12px;
- background-color: #000;
- overflow: hidden;
- }
-
- .notif-media a {
- width: 5em;
- height: 5em;
- display: block;
- cursor: zoom-in;
- }
-
- .notif-media img,
- .notif-media video {
- width: 100%;
- height: 100%;
- display: block;
- object-fit: cover;
- }
diff --git a/src/lib/ui/post/ActionBar.svelte b/src/lib/ui/post/ActionBar.svelte
index 8d86ba8..2b4c579 100644
--- a/src/lib/ui/post/ActionBar.svelte
+++ b/src/lib/ui/post/ActionBar.svelte
@@ -1,11 +1,7 @@
-
+
-
+
-
+
@@ -95,11 +84,6 @@
- {#if $account && post.account.id === $account.id}
-
-
-
- {/if}
diff --git a/src/lib/ui/post/ReactionButton.svelte b/src/lib/ui/post/ReactionButton.svelte
index 6b933b1..fee3a97 100644
--- a/src/lib/ui/post/ReactionButton.svelte
+++ b/src/lib/ui/post/ReactionButton.svelte
@@ -1,5 +1,5 @@
@@ -49,7 +49,6 @@
border-radius: 8px;
transition: background-color .1s, color .1s;
cursor: pointer;
- border: 1px solid var(--bg-700);
}
button.active {
@@ -73,7 +72,7 @@
}
.icon {
- min-width: 20px;
+ width: 20px;
height: 20px;
display: flex;
justify-content: center;
diff --git a/src/lib/ui/post/ReplyContext.svelte b/src/lib/ui/post/ReplyContext.svelte
index 0474460..20d7ab4 100644
--- a/src/lib/ui/post/ReplyContext.svelte
+++ b/src/lib/ui/post/ReplyContext.svelte
@@ -1,15 +1,18 @@
diff --git a/src/lib/user/user.js b/src/lib/user/user.js
new file mode 100644
index 0000000..050572b
--- /dev/null
+++ b/src/lib/user/user.js
@@ -0,0 +1,29 @@
+import { client } from '../client/client.js';
+import { parseText as parseEmojis } from '../emoji.js';
+import { get } from 'svelte/store';
+
+export default class User {
+ id;
+ nickname;
+ username;
+ host;
+ avatar_url;
+ emojis;
+ url;
+
+ get name() {
+ return this.nickname || this.username;
+ }
+
+ get mention() {
+ let res = "@" + this.username;
+ if (this.host != get(client).instance.host)
+ res += "@" + this.host;
+ return res;
+ }
+
+ get rich_name() {
+ if (!this.nickname) return this.username;
+ return parseEmojis(this.nickname, this.host);
+ }
+}
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index aec6b96..27eab4b 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -1,52 +1,49 @@
+
- show_composer = true} />
+
- {#await init()}
+ {#await ready}
just a moment...
@@ -59,9 +56,6 @@
-
- show_composer = false }/>
-
diff --git a/src/routes/[server]/[account]/+page.js b/src/routes/[server]/[account]/+page.js
deleted file mode 100644
index edbfd18..0000000
--- a/src/routes/[server]/[account]/+page.js
+++ /dev/null
@@ -1,8 +0,0 @@
-import { error } from '@sveltejs/kit';
-
-export async function load({ params }) {
- return error(404, 'Not Found');
- // return {
- // account_name: params.account
- // };
-}
diff --git a/src/routes/[server]/[account]/[post]/+page.js b/src/routes/[server]/[account]/[post]/+page.js
deleted file mode 100644
index 0cd52c3..0000000
--- a/src/routes/[server]/[account]/[post]/+page.js
+++ /dev/null
@@ -1,7 +0,0 @@
-export async function load({ params }) {
- return {
- server_host: params.server,
- account_handle: params.account,
- post_id: params.post
- };
-}
diff --git a/src/routes/[server]/[account]/[post]/+page.svelte b/src/routes/[server]/[account]/[post]/+page.svelte
deleted file mode 100644
index 75daa65..0000000
--- a/src/routes/[server]/[account]/[post]/+page.svelte
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
-{#await post}
-