mirror of
https://github.com/versia-pub/frontend.git
synced 2026-03-13 03:29:16 +01:00
feat: ✨ Add more preferences
This commit is contained in:
parent
5203f47409
commit
bb5de77bb1
6 changed files with 123 additions and 19 deletions
|
|
@ -110,6 +110,7 @@ import { SelectTrigger } from "radix-vue";
|
|||
import { toast } from "vue-sonner";
|
||||
import Note from "~/components/notes/note.vue";
|
||||
import { Select, SelectContent, SelectItem } from "~/components/ui/select";
|
||||
import { SettingIds } from "~/settings";
|
||||
import { Button } from "../ui/button";
|
||||
import { Input } from "../ui/input";
|
||||
import { Textarea } from "../ui/textarea";
|
||||
|
|
@ -117,10 +118,11 @@ import { Toggle } from "../ui/toggle";
|
|||
import Files from "./files.vue";
|
||||
|
||||
const { Control_Enter, Command_Enter } = useMagicKeys();
|
||||
const ctrlEnterSend = useSetting(SettingIds.CtrlEnterToSend);
|
||||
const fileInput = ref<HTMLInputElement | null>(null);
|
||||
|
||||
watch([Control_Enter, Command_Enter], () => {
|
||||
if (sending.value) {
|
||||
if (sending.value || !ctrlEnterSend.value.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { Dialog, DialogContent } from "@/components/ui/dialog";
|
||||
import { Dialog, DialogContent, DialogTitle } from "@/components/ui/dialog";
|
||||
import type { Status, StatusSource } from "@versia/client/types";
|
||||
import { toast } from "vue-sonner";
|
||||
import Composer from "./composer.vue";
|
||||
|
|
@ -58,6 +58,12 @@ const relation = ref(
|
|||
<template>
|
||||
<Dialog v-model:open="open" @update:open="o => {if (!o) { relation = null}}">
|
||||
<DialogContent :hide-close="true" class="sm:max-w-xl max-w-full w-full grid-rows-[minmax(0,1fr)_auto] max-h-[90dvh] p-5 pt-6 top-0 sm:top-1/2 translate-y-0 sm:-translate-y-1/2">
|
||||
<DialogTitle class="sr-only">
|
||||
{{ relation?.type === "reply" ? "Reply" : relation?.type === "quote" ? "Quote" : "Compose" }}
|
||||
</DialogTitle>
|
||||
<DialogDescription class="sr-only">
|
||||
{{ relation?.type === "reply" ? "Reply to this status" : relation?.type === "quote" ? "Quote this status" : "Compose a new status" }}
|
||||
</DialogDescription>
|
||||
<Composer :relation="relation ?? undefined" />
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue