mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-17 18:35:19 +02:00
style: replace loading indicators with Spinner component in alert dialogs
This commit is contained in:
parent
2df9708df9
commit
407175ffae
1 changed files with 5 additions and 10 deletions
|
|
@ -775,7 +775,8 @@ export function LayoutDataProvider({ searchSpaceId, children }: LayoutDataProvid
|
||||||
<AlertDialogHeader>
|
<AlertDialogHeader>
|
||||||
<AlertDialogTitle>{t("delete_chat")}</AlertDialogTitle>
|
<AlertDialogTitle>{t("delete_chat")}</AlertDialogTitle>
|
||||||
<AlertDialogDescription>
|
<AlertDialogDescription>
|
||||||
{t("delete_chat_confirm")} <span className="font-medium">{chatToDelete?.name}</span>?{" "}
|
{t("delete_chat_confirm")}{" "}
|
||||||
|
<span className="font-medium break-all">{chatToDelete?.name}</span>?{" "}
|
||||||
{t("action_cannot_undone")}
|
{t("action_cannot_undone")}
|
||||||
</AlertDialogDescription>
|
</AlertDialogDescription>
|
||||||
</AlertDialogHeader>
|
</AlertDialogHeader>
|
||||||
|
|
@ -835,9 +836,7 @@ export function LayoutDataProvider({ searchSpaceId, children }: LayoutDataProvid
|
||||||
<span className={isRenamingChat ? "opacity-0" : ""}>
|
<span className={isRenamingChat ? "opacity-0" : ""}>
|
||||||
{tSidebar("rename") || "Rename"}
|
{tSidebar("rename") || "Rename"}
|
||||||
</span>
|
</span>
|
||||||
{isRenamingChat && (
|
{isRenamingChat && <Spinner size="sm" className="absolute" />}
|
||||||
<span className="absolute h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" />
|
|
||||||
)}
|
|
||||||
</Button>
|
</Button>
|
||||||
</DialogFooter>
|
</DialogFooter>
|
||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|
@ -865,9 +864,7 @@ export function LayoutDataProvider({ searchSpaceId, children }: LayoutDataProvid
|
||||||
className="relative bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
className="relative bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
||||||
>
|
>
|
||||||
<span className={isDeletingSearchSpace ? "opacity-0" : ""}>{tCommon("delete")}</span>
|
<span className={isDeletingSearchSpace ? "opacity-0" : ""}>{tCommon("delete")}</span>
|
||||||
{isDeletingSearchSpace && (
|
{isDeletingSearchSpace && <Spinner size="sm" className="absolute" />}
|
||||||
<span className="absolute h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" />
|
|
||||||
)}
|
|
||||||
</AlertDialogAction>
|
</AlertDialogAction>
|
||||||
</AlertDialogFooter>
|
</AlertDialogFooter>
|
||||||
</AlertDialogContent>
|
</AlertDialogContent>
|
||||||
|
|
@ -895,9 +892,7 @@ export function LayoutDataProvider({ searchSpaceId, children }: LayoutDataProvid
|
||||||
className="relative bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
className="relative bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
||||||
>
|
>
|
||||||
<span className={isLeavingSearchSpace ? "opacity-0" : ""}>{t("leave")}</span>
|
<span className={isLeavingSearchSpace ? "opacity-0" : ""}>{t("leave")}</span>
|
||||||
{isLeavingSearchSpace && (
|
{isLeavingSearchSpace && <Spinner size="sm" className="absolute" />}
|
||||||
<span className="absolute h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" />
|
|
||||||
)}
|
|
||||||
</AlertDialogAction>
|
</AlertDialogAction>
|
||||||
</AlertDialogFooter>
|
</AlertDialogFooter>
|
||||||
</AlertDialogContent>
|
</AlertDialogContent>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue