Remove hidden link list input

This commit is contained in:
silverpill 2022-11-30 22:22:22 +00:00
parent accc6fffbe
commit 9ca9aa233e
2 changed files with 0 additions and 33 deletions

View file

@ -161,7 +161,6 @@ export interface PostData {
in_reply_to_id: string | null;
visibility: string;
mentions: string[];
links: string[];
attachments: Attachment[];
}
@ -178,7 +177,6 @@ export async function createPost(
in_reply_to_id: postData.in_reply_to_id,
visibility: postData.visibility,
mentions: postData.mentions,
links: postData.links,
}
const response = await http(url, {
method: "POST",

View file

@ -32,12 +32,6 @@
<img :src="attachment.url">
</div>
</div>
<input
v-if="linkListInputVisible"
id="link-list"
v-model="linkList"
placeholder="Enter post IDs (separated by commas)"
>
<div class="toolbar">
<button
type="button"
@ -45,7 +39,6 @@
title="Attach image"
:disabled="!canAttachFile()"
@click="selectAttachment()"
@click.middle="canAddLink() ? linkListInputVisible = !linkListInputVisible : null"
>
<img :src="require('@/assets/feather/paperclip.svg')">
<input
@ -56,15 +49,6 @@
@change="onAttachmentUpload($event)"
>
</button>
<button
v-if="canAddLink() && false"
type="button"
class="icon"
title="Add link"
@click="linkListInputVisible = !linkListInputVisible"
>
<img :src="require('@/assets/tabler/quote.svg')">
</button>
<div
class="dropdown-menu-wrapper"
v-click-away="hideVisibilityMenu"
@ -159,10 +143,8 @@ const attachmentUploadInputRef = $ref<HTMLInputElement | null>(null)
let content = $ref("")
let attachments = $ref<Attachment[]>([])
let linkList = $ref<string | null>(null)
let visibility = $ref(Visibility.Public)
let linkListInputVisible = $ref(false)
let visibilityMenuVisible = $ref(false)
let isLoading = $ref(false)
let errorMessage = $ref<string | null>(null)
@ -221,10 +203,6 @@ function removeAttachment(index: number) {
attachments.splice(index, 1)
}
function canAddLink(): boolean {
return props.inReplyTo === null && visibility === Visibility.Public
}
function toggleVisibilityMenu() {
visibilityMenuVisible = !visibilityMenuVisible
}
@ -251,7 +229,6 @@ async function publish(contentType = "text/markdown") {
in_reply_to_id: props.inReplyTo ? props.inReplyTo.id : null,
visibility: visibility,
mentions: [],
links: linkList ? linkList.split(",") : [],
attachments: attachments,
}
isLoading = true
@ -271,8 +248,6 @@ async function publish(contentType = "text/markdown") {
isLoading = false
content = ""
attachments = []
linkList = null
linkListInputVisible = false
if (postFormContentRef) {
await nextTick()
triggerResize(postFormContentRef)
@ -345,12 +320,6 @@ $line-height: 1.5;
}
}
#link-list {
border-top: 1px solid $separator-color;
line-height: $line-height;
padding: calc($block-inner-padding / 1.5) $block-inner-padding;
}
.toolbar {
@include post-icon;