- {@html data.status.html}
+ {#if data.status.warning}
+
+ {data.status.warning}
+
+ {:else}
+ {@html data.status.rich_text}
+ {/if}
+
+ {#if data.status.media && data.status.media.length > 0}
+
+ {/if}
{#if data.type === "mention"}
{#if data.status.reactions}
@@ -122,6 +148,7 @@
text-decoration: inherit;
color: inherit;
transition: background-color .1s;
+ cursor: pointer;
}
.notification:hover {
@@ -154,6 +181,7 @@
}
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;
@@ -247,4 +275,52 @@
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 2b4c579..8d86ba8 100644
--- a/src/lib/ui/post/ActionBar.svelte
+++ b/src/lib/ui/post/ActionBar.svelte
@@ -1,7 +1,11 @@
-
+
-
+
-
+
@@ -84,6 +95,11 @@
+ {#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 fee3a97..6b933b1 100644
--- a/src/lib/ui/post/ReactionButton.svelte
+++ b/src/lib/ui/post/ReactionButton.svelte
@@ -1,5 +1,5 @@
@@ -49,6 +49,7 @@
border-radius: 8px;
transition: background-color .1s, color .1s;
cursor: pointer;
+ border: 1px solid var(--bg-700);
}
button.active {
@@ -72,7 +73,7 @@
}
.icon {
- width: 20px;
+ min-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 20d7ab4..0474460 100644
--- a/src/lib/ui/post/ReplyContext.svelte
+++ b/src/lib/ui/post/ReplyContext.svelte
@@ -1,18 +1,15 @@
diff --git a/src/lib/user/user.js b/src/lib/user/user.js
deleted file mode 100644
index 050572b..0000000
--- a/src/lib/user/user.js
+++ /dev/null
@@ -1,29 +0,0 @@
-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 27eab4b..aec6b96 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -1,49 +1,52 @@
-
-
+ show_composer = true} />
- {#await ready}
+ {#await init()}
just a moment...
@@ -56,6 +59,9 @@
+
+ show_composer = false }/>
+
diff --git a/src/routes/post/[id]/+page.js b/src/routes/[server]/+page.js
similarity index 63%
rename from src/routes/post/[id]/+page.js
rename to src/routes/[server]/+page.js
index 9291873..bc936af 100644
--- a/src/routes/post/[id]/+page.js
+++ b/src/routes/[server]/+page.js
@@ -1,5 +1,5 @@
export async function load({ params }) {
return {
- post_id: params.id
+ server_domain: params.server
};
}
diff --git a/src/routes/[server]/[account]/+page.js b/src/routes/[server]/[account]/+page.js
new file mode 100644
index 0000000..edbfd18
--- /dev/null
+++ b/src/routes/[server]/[account]/+page.js
@@ -0,0 +1,8 @@
+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
new file mode 100644
index 0000000..0cd52c3
--- /dev/null
+++ b/src/routes/[server]/[account]/[post]/+page.js
@@ -0,0 +1,7 @@
+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
new file mode 100644
index 0000000..75daa65
--- /dev/null
+++ b/src/routes/[server]/[account]/[post]/+page.svelte
@@ -0,0 +1,146 @@
+
+
+{#await post}
+