-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70222d1
commit 343765a
Showing
8 changed files
with
231 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<template> | ||
<div class="flex flex-row gap-1 border-white/20"> | ||
<Button title="Mention someone" @click="content = content + '@'"> | ||
<iconify-icon height="1.5rem" width="1.5rem" icon="tabler:at" aria-hidden="true" /> | ||
</Button> | ||
<Button title="Toggle Markdown" @click="markdown = !markdown" :toggled="markdown"> | ||
<iconify-icon width="1.25rem" height="1.25rem" | ||
:icon="markdown ? 'tabler:markdown' : 'tabler:markdown-off'" aria-hidden="true" /> | ||
</Button> | ||
<Button title="Use a custom emoji"> | ||
<iconify-icon width="1.25rem" height="1.25rem" icon="tabler:mood-smile" aria-hidden="true" /> | ||
</Button> | ||
<Button title="Add media" @click="emit('filePickerOpen')"> | ||
<iconify-icon width="1.25rem" height="1.25rem" icon="tabler:photo-up" aria-hidden="true" /> | ||
</Button> | ||
<Button title="Add a file" @click="emit('filePickerOpen')"> | ||
<iconify-icon width="1.25rem" height="1.25rem" icon="tabler:file-upload" aria-hidden="true" /> | ||
</Button> | ||
<Button title="Add content warning" @click="cw = !cw" :toggled="cw"> | ||
<iconify-icon width="1.25rem" height="1.25rem" icon="tabler:rating-18-plus" aria-hidden="true" /> | ||
</Button> | ||
<ButtonBase theme="primary" :loading="loading" @click="emit('send')" class="ml-auto rounded-full" | ||
:disabled="!canSubmit || loading"> | ||
{{ | ||
respondingType === "edit" ? "Edit!" : "Send!" | ||
}} | ||
</ButtonBase> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import ButtonBase from "~/packages/ui/components/buttons/button.vue"; | ||
import Button from "./button.vue"; | ||
defineProps<{ | ||
loading: boolean; | ||
canSubmit: boolean; | ||
respondingType: string | null; | ||
}>(); | ||
const emit = defineEmits<{ | ||
send: []; | ||
filePickerOpen: []; | ||
}>(); | ||
const cw = defineModel<boolean>("cw", { | ||
required: true, | ||
}); | ||
const content = defineModel<string>("content", { | ||
required: true, | ||
}); | ||
const markdown = defineModel<boolean>("markdown", { | ||
required: true, | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<template> | ||
<div v-if="cw" class="mb-4"> | ||
<input type="text" v-model="cwContent" placeholder="Add a content warning" | ||
class="w-full p-2 mt-1 text-sm prose prose-invert bg-dark-900 rounded focus:!ring-0 !ring-none !border-none !outline-none placeholder:text-zinc-500 appearance-none focus:!border-none focus:!outline-none" | ||
aria-label="Content warning" /> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
const cw = defineModel<boolean>("cw", { | ||
required: true, | ||
}); | ||
const cwContent = defineModel<string>("cwContent", { | ||
required: true, | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<template> | ||
<div v-if="respondingTo" class="mb-4" role="region" aria-label="Responding to"> | ||
<OverlayScrollbarsComponent :defer="true" class="max-h-72 overflow-y-auto"> | ||
<Note :element="respondingTo" :small="true" :disabled="true" class="!rounded-none !bg-primary-500/10" /> | ||
</OverlayScrollbarsComponent> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import type { Status } from "@versia/client/types"; | ||
import { OverlayScrollbarsComponent } from "#imports"; | ||
import Note from "../social-elements/notes/note.vue"; | ||
const props = defineProps<{ | ||
respondingTo: Status; | ||
}>(); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<template> | ||
<RichTextboxInput v-model:model-content="content" @paste="handlePaste" :disabled="loading" | ||
:placeholder="chosenSplash" :max-characters="characterLimit" class="focus:!ring-0 max-h-[70dvh]" /> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import RichTextboxInput from "../inputs/rich-textbox-input.vue"; | ||
defineProps<{ | ||
loading: boolean; | ||
chosenSplash: string; | ||
characterLimit: number; | ||
handlePaste: (event: ClipboardEvent) => void; | ||
}>(); | ||
const content = defineModel<string>("content", { | ||
required: true, | ||
}); | ||
</script> |
Oops, something went wrong.