replies timeline only, appview-less bluesky client

feat: when quoting a post make the post look 'embedded' inside the text area

ptr.pet cadf8f49 c0026839

verified
+4 -1
src/app.css
···
}
@utility single-line-input {
-
@apply w-full rounded-sm border-2 px-3 py-2 font-medium transition-all focus:scale-[1.02] focus:shadow-lg focus:outline-none;
+
@apply w-full rounded-sm border-2 border-(--nucleus-accent)/40 bg-(--nucleus-accent)/3 px-3 py-2 font-medium transition-all;
+
&:focus {
+
@apply scale-[1.02] border-(--nucleus-accent)/80 bg-(--nucleus-accent)/10 [box-shadow:none] outline-none;
+
}
}
@utility action-button {
+1 -1
src/components/BskyPost.svelte
···
{@render dropdownItem('heroicons:link-20-solid', 'copy at uri', () =>
navigator.clipboard.writeText(post.uri)
)}
-
{@render dropdownItem('heroicons:clipboard', 'copy post text', () =>
+
{@render dropdownItem('heroicons:clipboard-20-solid', 'copy post text', () =>
navigator.clipboard.writeText(post.record.text)
)}
{#if actionClient}
+33 -18
src/components/PostComposer.svelte
···
{#if replying}
{@render renderPost(replying)}
{/if}
-
<textarea
-
bind:this={textareaEl}
-
bind:value={postText}
-
onfocus={() => (isFocused = true)}
-
onblur={unfocus}
-
onkeydown={(event) => {
-
if (event.key === 'Escape') unfocus();
-
if (event.key === 'Enter' && (event.metaKey || event.ctrlKey)) doPost();
-
}}
-
placeholder="what's on your mind?"
-
rows="4"
-
class="field-sizing-content resize-none"
-
></textarea>
-
{#if quoting}
-
{@render renderPost(quoting)}
-
{/if}
+
<div class="composer space-y-2">
+
<textarea
+
bind:this={textareaEl}
+
bind:value={postText}
+
onfocus={() => (isFocused = true)}
+
onblur={unfocus}
+
onkeydown={(event) => {
+
if (event.key === 'Escape') unfocus();
+
if (event.key === 'Enter' && (event.metaKey || event.ctrlKey)) doPost();
+
}}
+
placeholder="what's on your mind?"
+
rows="4"
+
class="field-sizing-content resize-none"
+
></textarea>
+
{#if quoting}
+
{@render renderPost(quoting)}
+
{/if}
+
</div>
{/snippet}
<div class="relative min-h-13">
···
</div>
</div>
+
<!-- TODO: this fucking blows -->
<style>
@reference "../app.css";
input,
-
textarea {
+
.composer {
@apply single-line-input bg-(--nucleus-bg)/35;
border-color: color-mix(in srgb, var(--acc-color) 30%, transparent);
}
+
.composer {
+
@apply p-2;
+
}
+
+
textarea {
+
@apply w-full bg-transparent p-0;
+
}
+
input {
@apply p-1 px-2;
}
-
textarea {
+
.composer {
@apply focus:scale-100;
}
input::placeholder,
textarea::placeholder {
color: color-mix(in srgb, var(--acc-color) 45%, var(--nucleus-bg));
+
}
+
+
textarea:focus {
+
@apply border-none! [box-shadow:none]! outline-none!;
}
</style>
+2 -2
src/components/SettingsPopup.svelte
···
type="url"
bind:value={localSettings.endpoints[name]}
placeholder={defaultSettings.endpoints[name]}
-
class="single-line-input border-(--nucleus-accent)/40 bg-(--nucleus-accent)/3"
+
class="single-line-input"
/>
</div>
{/snippet}
···
type="url"
bind:value={localSettings.socialAppUrl}
placeholder={defaultSettings.socialAppUrl}
-
class="single-line-input border-(--nucleus-accent)/40 bg-(--nucleus-accent)/3"
+
class="single-line-input"
/>
</div>