Added world edit subscription
And also toast lifetimes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { PhCircleNotch } from "@phosphor-icons/vue";
|
||||
import { useToast } from "~/components/ui/toast";
|
||||
import { ToastLifetime } from "~/components/ui/toast/use-toast";
|
||||
import type { World } from "~/models/World";
|
||||
|
||||
const { toast } = useToast()
|
||||
@@ -28,7 +29,7 @@ async function handleAction(): Promise<void> {
|
||||
toast({
|
||||
title: t("entity.world.deletedToast.title", { world: props.world.name }),
|
||||
variant: "success",
|
||||
duration: 3000
|
||||
duration: ToastLifetime.SHORT
|
||||
})
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { PhCircleNotch } from "@phosphor-icons/vue";
|
||||
import { useToast } from "~/components/ui/toast";
|
||||
import { ToastLifetime } from "~/components/ui/toast/use-toast";
|
||||
import type { World } from "~/models/World";
|
||||
|
||||
const { toast } = useToast()
|
||||
@@ -36,7 +37,7 @@ async function handleSubmit() {
|
||||
toast({
|
||||
title: t("entity.world.updatedToast.title", { world: worldSkeleton.value.name }),
|
||||
variant: "success",
|
||||
duration: 3000
|
||||
duration: ToastLifetime.SHORT
|
||||
})
|
||||
|
||||
emit("on-close")
|
||||
|
||||
Reference in New Issue
Block a user