Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
Support adding and removing videos from spaces and org dialog (#661)
Ameer Al Ashhaba6de8df54d6a
diff --git a/apps/web/actions/organizations/remove-videos.ts b/apps/web/actions/organizations/remove-videos.tsnew file mode 100644index 000000000..7e50076e3--- /dev/null+++ b/apps/web/actions/organizations/remove-videos.ts@@ -0,0 +1,91 @@+"use server";++import { getCurrentUser } from "@cap/database/auth/session";+import { sharedVideos, organizations, organizationMembers } from "@cap/database/schema";+import { db } from "@cap/database";+import { eq, and, inArray } from "drizzle-orm";+import { revalidatePath } from "next/cache";++export async function removeVideosFromOrganization(organizationId: string, videoIds: string[]) {+ try {+ const user = await getCurrentUser();++ if (!user || !user.id) {+ throw new Error("Unauthorized");+ }++ if (!organizationId || !videoIds || videoIds.length === 0) {+ throw new Error("Missing required data");+ }++ const [organization] = await db()+ .select()+ .from(organizations)+ .where(eq(organizations.id, organizationId));++ if (!organization) {+ throw new Error("Organization not found");+ }++ const isOrgOwner = organization.ownerId === user.id;+ let hasAccess = isOrgOwner;++ if (!isOrgOwner) {+ const orgMembership = await db()+ .select({ id: organizationMembers.id })+ .from(organizationMembers)+ .where(+ and(+ eq(organizationMembers.userId, user.id),+ eq(organizationMembers.organizationId, organizationId)+ )+ )+ .limit(1);+ hasAccess = orgMembership.length > 0;+ }++ if (!hasAccess) {+ throw new Error("You don't have permission to remove videos from this organization");+ }++ // Only allow removing videos that are currently shared with the organization+ const existingSharedVideos = await db()+ .select({ videoId: sharedVideos.videoId })+ .from(sharedVideos)+ .where(+ and(+ eq(sharedVideos.organizationId, organizationId),+ inArray(sharedVideos.videoId, videoIds)+ )+ );++ const existingVideoIds = existingSharedVideos.map(sv => sv.videoId);++ if (existingVideoIds.length === 0) {+ return { success: true, message: "No matching shared videos found in organization" };+ }++ await db()+ .delete(sharedVideos)+ .where(+ and(+ eq(sharedVideos.organizationId, organizationId),+ inArray(sharedVideos.videoId, existingVideoIds)+ )+ );++ revalidatePath(`/dashboard/spaces/${organizationId}`);+ revalidatePath("/dashboard/caps");++ return {+ success: true,+ message: `${existingVideoIds.length} video${existingVideoIds.length === 1 ? '' : 's'} removed from organization`+ };+ } catch (error) {+ console.error("Error removing videos from organization:", error);+ return {+ success: false,+ error: error instanceof Error ? error.message : "Failed to remove videos from organization"+ };+ }+}diff --git a/apps/web/actions/spaces/remove-videos.ts b/apps/web/actions/spaces/remove-videos.tsnew file mode 100644index 000000000..3d46b8f65--- /dev/null+++ b/apps/web/actions/spaces/remove-videos.ts@@ -0,0 +1,55 @@+"use server";++import { getCurrentUser } from "@cap/database/auth/session";+import { spaceVideos, videos } from "@cap/database/schema";+import { db } from "@cap/database";+import { eq, and, inArray } from "drizzle-orm";+import { revalidatePath } from "next/cache";++export async function removeVideosFromSpace(spaceId: string, videoIds: string[]) {+ try {+ const user = await getCurrentUser();++ if (!user || !user.id) {+ throw new Error("Unauthorized");+ }++ if (!spaceId || !videoIds || videoIds.length === 0) {+ throw new Error("Missing required data");+ }++ // Only allow removing videos the user owns+ const userVideos = await db()+ .select({ id: videos.id })+ .from(videos)+ .where(and(eq(videos.ownerId, user.id), inArray(videos.id, videoIds)));++ const validVideoIds = userVideos.map(v => v.id);++ if (validVideoIds.length === 0) {+ throw new Error("No valid videos found");+ }++ // Remove from spaceVideos+ const deleted = await db()+ .delete(spaceVideos)+ .where(and(+ eq(spaceVideos.spaceId, spaceId),+ inArray(spaceVideos.videoId, validVideoIds)+ ));++ revalidatePath(`/dashboard/spaces/${spaceId}`);++ return {+ success: true,+ message: `Removed ${validVideoIds.length} video(s) from space`,+ deletedCount: validVideoIds.length,+ };++ } catch (error: any) {+ return {+ success: false,+ message: error.message || "Failed to remove videos from space",+ };+ }+}diff --git a/apps/web/app/dashboard/caps/components/SharingDialog.tsx b/apps/web/app/dashboard/caps/components/SharingDialog.tsxindex 290299238..c91d50aff 100644--- a/apps/web/app/dashboard/caps/components/SharingDialog.tsx+++ b/apps/web/app/dashboard/caps/components/SharingDialog.tsx@@ -138,11 +138,10 @@ export const SharingDialog: React.FC<SharingDialogProps> = ({};const handleCopyEmbedCode = async () => {- const embedCode = `<div style="position: relative; padding-bottom: 56.25%; height: 0;"><iframe src="${- process.env.NODE_ENV === "development"- ? "http://localhost:3000"- : "https://cap.so"- }/embed/${capId}" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe></div>`;+ const embedCode = `<div style="position: relative; padding-bottom: 56.25%; height: 0;"><iframe src="${process.env.NODE_ENV === "development"+ ? "http://localhost:3000"+ : "https://cap.so"+ }/embed/${capId}" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe></div>`;try {await navigator.clipboard.writeText(embedCode);@@ -154,8 +153,8 @@ export const SharingDialog: React.FC<SharingDialogProps> = ({const filteredSpaces = searchTerm? spacesData?.filter((space) =>- space.name.toLowerCase().includes(searchTerm.toLowerCase())- )+ space.name.toLowerCase().includes(searchTerm.toLowerCase())+ ): spacesData;return (@@ -176,7 +175,7 @@ export const SharingDialog: React.FC<SharingDialogProps> = ({</DialogTitle></DialogHeader>- <div className="flex w-full h-12 border-b border-gray-4">+ <div className="flex w-full h-12 border-b bg-gray-1 border-gray-4">{tabs.map((tab) => (<divkey={tab}@@ -246,11 +245,10 @@ export const SharingDialog: React.FC<SharingDialogProps> = ({<div className="space-y-4"><div className="p-3 rounded-lg border bg-gray-3 border-gray-4"><code className="font-mono text-xs break-all text-gray-11">- {`<div style="position: relative; padding-bottom: 56.25%; height: 0;"><iframe src="${- process.env.NODE_ENV === "development"- ? "http://localhost:3000"- : "https://cap.so"- }/embed/${capId}" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe></div>`}+ {`<div style="position: relative; padding-bottom: 56.25%; height: 0;"><iframe src="${process.env.NODE_ENV === "development"+ ? "http://localhost:3000"+ : "https://cap.so"+ }/embed/${capId}" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe></div>`}</code></div><Buttondiff --git a/apps/web/app/dashboard/spaces/[spaceId]/components/AddVideosDialog.tsx b/apps/web/app/dashboard/spaces/[spaceId]/components/AddVideosDialog.tsxindex c9fe282b2..d595c6c11 100644--- a/apps/web/app/dashboard/spaces/[spaceId]/components/AddVideosDialog.tsx+++ b/apps/web/app/dashboard/spaces/[spaceId]/components/AddVideosDialog.tsx@@ -3,6 +3,7 @@import React from "react";import { getUserVideos } from "@/actions/videos/get-user-videos";import { addVideosToSpace } from "@/actions/spaces/add-videos";+import { removeVideosFromSpace } from "@/actions/spaces/remove-videos";import { getSpaceVideoIds } from "@/actions/spaces/get-space-videos";import AddVideosDialogBase from "./AddVideosDialogBase";@@ -29,6 +30,7 @@ export const AddVideosDialog: React.FC<AddVideosDialogProps> = ({entityName={spaceName}onVideosAdded={onVideosAdded}addVideos={addVideosToSpace}+ removeVideos={removeVideosFromSpace}getVideos={getUserVideos}getEntityVideoIds={getSpaceVideoIds}/>diff --git a/apps/web/app/dashboard/spaces/[spaceId]/components/AddVideosDialogBase.tsx b/apps/web/app/dashboard/spaces/[spaceId]/components/AddVideosDialogBase.tsxindex 249b9ea08..f9e987c35 100644--- a/apps/web/app/dashboard/spaces/[spaceId]/components/AddVideosDialogBase.tsx+++ b/apps/web/app/dashboard/spaces/[spaceId]/components/AddVideosDialogBase.tsx@@ -18,7 +18,7 @@ import { faVideo } from "@fortawesome/free-solid-svg-icons";import { VideoThumbnail } from "@/components/VideoThumbnail";import { useMutation, useQuery } from "@tanstack/react-query";import { Search } from "lucide-react";-import { Check } from "lucide-react";+import { Check, Minus, Plus } from "lucide-react";import moment from "moment";import clsx from "clsx";import { motion } from "framer-motion";@@ -31,6 +31,7 @@ interface AddVideosDialogBaseProps {entityName: string;onVideosAdded?: () => void;addVideos: (entityId: string, videoIds: string[]) => Promise<any>;+ removeVideos: (entityId: string, videoIds: string[]) => Promise<any>;getVideos: (limit: number) => Promise<any>;getEntityVideoIds: (entityId: string) => Promise<any>;}@@ -59,11 +60,13 @@ const AddVideosDialogBase: React.FC<AddVideosDialogBaseProps> = ({entityName,onVideosAdded,addVideos,+ removeVideos,getVideos,getEntityVideoIds,}) => {const [selectedVideos, setSelectedVideos] = useState<string[]>([]);const [searchTerm, setSearchTerm] = useState("");+ const filterTabs = ['all', 'added', 'notAdded'];const form = useForm<z.infer<typeof formSchema>>({resolver: zodResolver(formSchema),@@ -96,28 +99,50 @@ const AddVideosDialogBase: React.FC<AddVideosDialogBaseProps> = ({enabled: open,});- const addVideosMutation = useMutation({- mutationFn: (videoIds: string[]) => addVideos(entityId, videoIds),+ const updateVideosMutation = useMutation({+ mutationFn: async ({ toAdd, toRemove }: { toAdd: string[]; toRemove: string[] }) => {+ let addResult = { success: true, message: "", error: "" };+ let removeResult = { success: true, message: "", error: "" };+ if (toAdd.length > 0) {+ addResult = await addVideos(entityId, toAdd);+ }+ if (toRemove.length > 0) {+ removeResult = await removeVideos(entityId, toRemove);+ }+ return { addResult, removeResult };+ },onSuccess: (result) => {- if (result?.success) {- toast.success(result.message || "Videos added successfully");+ const { addResult, removeResult } = result || {};+ if ((addResult?.success ?? true) && (removeResult?.success ?? true)) {+ toast.success("Videos updated successfully");setSelectedVideos([]);onVideosAdded?.();onClose();} else {- toast.error(result?.error || "Failed to add videos");+ toast.error(addResult.error || removeResult.error || "Failed to update videos");}},onError: (error) => {- toast.error("Failed to add videos");- console.error("Error adding videos:", error);+ toast.error("Failed to update videos");+ console.error("Error updating videos:", error);},});- const filteredVideos: Video[] =- videosData?.filter((video: Video) =>- video.name.toLowerCase().includes(searchTerm.toLowerCase())- ) || [];+ // Tab state: 'all', 'added', or 'notAdded'+ const [videoTab, setVideoTab] = useState<typeof filterTabs[number]>('all');++ // Filter videos by search+ let filteredVideos: Video[] = videosData?.filter((video: Video) =>+ video.name.toLowerCase().includes(searchTerm.toLowerCase())+ ) || [];++ // Further filter by tab+ if (videoTab === 'added') {+ filteredVideos = filteredVideos.filter(video => entityVideoIds?.includes(video.id));+ } else if (videoTab === 'notAdded') {+ filteredVideos = filteredVideos.filter(video => !entityVideoIds?.includes(video.id));+ }+const handleVideoToggle = (videoId: string) => {setSelectedVideos((prev) =>@@ -127,9 +152,13 @@ const AddVideosDialogBase: React.FC<AddVideosDialogBaseProps> = ({);};- const handleAddVideos = () => {- if (selectedVideos.length === 0) return;- addVideosMutation.mutate(selectedVideos);+ const handleUpdateVideos = () => {+ if (!entityVideoIds) return;+ // To add: selected and not already in entity+ const toAdd = selectedVideos.filter(id => !entityVideoIds.includes(id));+ // To remove: selected and already in entity+ const toRemove = selectedVideos.filter(id => entityVideoIds.includes(id));+ updateVideosMutation.mutate({ toAdd, toRemove });};useEffect(() => {@@ -152,9 +181,35 @@ const AddVideosDialogBase: React.FC<AddVideosDialogBaseProps> = ({}><DialogTitle className="text-lg text-gray-12">- Add videos to {entityName}+ Add Videos</DialogTitle></DialogHeader>+ {/* Tabs for filtering */}+ <div className="flex w-full h-12 border-b bg-gray-1 border-gray-4">+ {filterTabs.map((tab) => (+ <div+ key={tab}+ className={clsx(+ "flex relative flex-1 justify-center items-center w-full min-w-0 text-sm font-medium transition-colors",+ videoTab === tab+ ? "cursor-not-allowed bg-gray-3"+ : "cursor-pointer"+ )}+ onClick={() => setVideoTab(tab as 'all' | 'added' | 'notAdded')}+ >+ <p+ className={clsx(+ videoTab === tab+ ? "text-gray-12 font-medium"+ : "text-gray-10",+ "text-sm"+ )}+ >+ {tab === "all" ? "All" : tab === "added" ? "Added" : "Not Added"}+ </p>+ </div>+ ))}+ </div><div className="flex overflow-hidden flex-col flex-1 px-4 py-4 min-h-0 sm:px-8 sm:py-6"><div className="flex-shrink-0 px-2 mb-3">@@ -179,17 +234,30 @@ const AddVideosDialogBase: React.FC<AddVideosDialogBaseProps> = ({) : filteredVideos.length === 0 ? (<div className="flex flex-col justify-center items-center h-24 text-center"><h3 className="text-lg font-medium text-gray-12">- {searchTerm ? "No videos found" : "No videos to add"}+ {searchTerm+ ? videoTab === 'added'+ ? 'No added videos found'+ : videoTab === 'notAdded'+ ? 'No not added videos found'+ : 'No videos found'+ : videoTab === 'added'+ ? 'No added videos'+ : videoTab === 'notAdded'+ ? 'No videos to add'+ : 'No videos'}</h3><p className="max-w-sm text-sm text-gray-11">{searchTerm- ? "Try adjusting your search terms"- : "Record some videos first to add them to this " +- entityName}+ ? 'Try adjusting your search terms.'+ : videoTab === 'added'+ ? `You haven't added any videos to this ${entityName} yet.`+ : videoTab === 'notAdded'+ ? `Record or upload videos to add them to this ${entityName}.`+ : `Record or upload videos to see them here.`}</p></div>) : (- <div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-3 max-h-[400px] overflow-y-auto custom-scroll p-1">+ <div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-3 max-h-[400px] overflow-y-auto custom-scroll pt-2">{filteredVideos.map((video) => (<VideoCardkey={video.id}@@ -224,23 +292,18 @@ const AddVideosDialogBase: React.FC<AddVideosDialogBaseProps> = ({>Cancel</Button>+<Buttonvariant="dark"size="sm"- disabled={- selectedVideos.length === 0 || addVideosMutation.isPending- }- spinner={addVideosMutation.isPending}- onClick={handleAddVideos}+ disabled={updateVideosMutation.isPending}+ spinner={updateVideosMutation.isPending}+ onClick={handleUpdateVideos}className="px-3 py-2 text-sm sm:px-4">- {addVideosMutation.isPending- ? "Adding..."- : selectedVideos.length === 0- ? "Add videos"- : `Add ${selectedVideos.length} video${- selectedVideos.length === 1 ? "" : "s"- }`}+ {updateVideosMutation.isPending+ ? "Updating..."+ : "Update videos"}</Button></div></div>@@ -268,64 +331,64 @@ const VideoCard: React.FC<VideoCardProps> = ({return (<div- onClick={isAlreadyInEntity ? undefined : onToggle}+ onClick={onToggle}className={clsx(- "flex flex-col p-3 h-full rounded-xl border transition-all duration-200 group",- isAlreadyInEntity- ? "cursor-not-allowed bg-gray-3 border-gray-6"- : isSelected- ? "border-green-500 cursor-pointer bg-gray-3"- : "bg-transparent cursor-pointer hover:bg-gray-3 hover:border-gray-5 border-gray-4"+ "flex relative flex-col p-3 h-full rounded-xl border transition-all duration-200 group",+ isAlreadyInEntity && isSelected && "border-red-500",+ isAlreadyInEntity && !isSelected && "border-blue-500",+ !isAlreadyInEntity && isSelected && "border-green-500",+ !isAlreadyInEntity && !isSelected && "border-gray-4",+ isAlreadyInEntity ? "bg-gray-3" : isSelected ? "bg-gray-3" : "bg-transparent cursor-pointer hover:bg-gray-3 hover:border-gray-5")}>- {/* Thumbnail First */}- <div className="relative mb-2 w-full">- {!isAlreadyInEntity && (- <motion.div- key={video.id}- animate={{- scale: isSelected ? 1 : 0,- }}- initial={{- scale: isSelected ? 1 : 0,- }}- transition={{- type: isSelected ? "spring" : "tween",- stiffness: isSelected ? 300 : undefined,- damping: isSelected ? 20 : undefined,- duration: !isSelected ? 0.2 : undefined,- }}- className="flex absolute -top-2 -right-2 z-10 justify-center items-center bg-green-500 rounded-full bg-gray-4 size-5"- >- <Check className="text-white" size={12} />- </motion.div>- )}-- <div+ {(isSelected || isAlreadyInEntity) && (+ <motion.div+ key={video.id + (isAlreadyInEntity ? '-added' : '-selected')}+ animate={{+ scale: isSelected || isAlreadyInEntity ? 1 : 0,+ }}+ initial={{+ scale: isSelected || isAlreadyInEntity ? 1 : 0,+ }}+ transition={{+ type: "spring",+ stiffness: 300,+ damping: 20,+ }}className={clsx(- "overflow-visible relative w-full h-32 rounded-lg border transition-colors bg-gray-3",- isSelected || isAlreadyInEntity- ? "border-green-500"- : "border-transparent"+ "flex absolute -top-2 -right-2 z-10 justify-center items-center rounded-full size-5",+ isSelected && !isAlreadyInEntity && "bg-green-500",+ isSelected && isAlreadyInEntity && "bg-red-500",+ !isSelected && isAlreadyInEntity && "bg-blue-500")}>- <VideoThumbnail- imageClass="w-full h-full transition-all duration-200 group-hover:scale-105"- userId={video.ownerId}- videoId={video.id}- alt={`${video.name} Thumbnail`}- objectFit="cover"- containerClass="min-h-full !rounded-lg !border-b-0"- />- {isAlreadyInEntity && (- <span className="absolute right-0 left-0 -bottom-2 z-10 flex-shrink-0 px-2 py-1 mx-auto text-xs font-medium text-white bg-green-600 rounded-full w-fit">- Added- </span>+ {isSelected && isAlreadyInEntity ? (+ <Minus className="text-white" size={14} />+ ) : isSelected && !isAlreadyInEntity ? (+ <Check className="text-white" size={14} />+ ) : (+ <Plus className="text-white" size={14} />)}- </div>+ </motion.div>+ )}++ <div+ className={clsx(+ "overflow-visible relative mb-2 w-full h-32 rounded-lg border transition-colors bg-gray-3 border-gray-5"+ )}+ >+ <VideoThumbnail+ imageClass="w-full h-full transition-all duration-200 group-hover:scale-105"+ userId={video.ownerId}+ videoId={video.id}+ alt={`${video.name} Thumbnail`}+ objectFit="cover"+ containerClass="min-h-full !rounded-lg !border-b-0"+ />+</div>- <div className={clsx("space-y-1", isAlreadyInEntity && "mt-3")}>+ <div className="space-y-1">{/* Title Second */}<Tooltip content={video.name}><h3diff --git a/apps/web/app/dashboard/spaces/[spaceId]/components/AddVideosToOrganizationDialog.tsx b/apps/web/app/dashboard/spaces/[spaceId]/components/AddVideosToOrganizationDialog.tsxindex 7c274ba7a..7ce2600bd 100644--- a/apps/web/app/dashboard/spaces/[spaceId]/components/AddVideosToOrganizationDialog.tsx+++ b/apps/web/app/dashboard/spaces/[spaceId]/components/AddVideosToOrganizationDialog.tsx@@ -3,6 +3,7 @@import React from "react";import { getUserVideos } from "@/actions/videos/get-user-videos";import { addVideosToOrganization } from "@/actions/organizations/add-videos";+import { removeVideosFromOrganization } from "@/actions/organizations/remove-videos";import { getOrganizationVideoIds } from "@/actions/organizations/get-organization-videos";import AddVideosDialogBase from "./AddVideosDialogBase";@@ -24,6 +25,7 @@ export const AddVideosToOrganizationDialog: React.FC<entityId={organizationId}entityName={organizationName}onVideosAdded={onVideosAdded}+ removeVideos={removeVideosFromOrganization}addVideos={addVideosToOrganization}getVideos={getUserVideos}getEntityVideoIds={getOrganizationVideoIds}diff --git a/apps/web/app/dashboard/spaces/[spaceId]/components/OrganizationIndicator.tsx b/apps/web/app/dashboard/spaces/[spaceId]/components/OrganizationIndicator.tsxindex bd0075205..fa020ada0 100644--- a/apps/web/app/dashboard/spaces/[spaceId]/components/OrganizationIndicator.tsx+++ b/apps/web/app/dashboard/spaces/[spaceId]/components/OrganizationIndicator.tsx@@ -85,7 +85,7 @@ export const OrganizationIndicator = ({<AvatarletterClass="text-md"name={member.name || member.email}- className="mr-3 size-9 text-gray-12"+ className="size-9 text-gray-12"/>)}<div className="flex-1 min-w-0">@@ -113,7 +113,7 @@ export const OrganizationIndicator = ({</div><DialogFooter>- <div className="flex justify-between w-full">+ <div className={clsx("flex w-full", canManageMembers ? "justify-between" : "justify-end")}>{canManageMembers && (<Buttonvariant="dark"diff --git a/apps/web/app/globals.css b/apps/web/app/globals.cssindex df58ec236..1123a4373 100644--- a/apps/web/app/globals.css+++ b/apps/web/app/globals.css@@ -357,34 +357,50 @@ label {/* View Transitions for theme switching *//* Icon animations */@keyframes rotate-sun {- from { transform: rotate(0deg); }- to { transform: rotate(360deg); }+ from {+ transform: rotate(0deg);+ }+ to {+ transform: rotate(360deg);+ }}@keyframes rotate-moon {- from { transform: rotate(-360deg); }- to { transform: rotate(0deg); }+ from {+ transform: rotate(-360deg);+ }+ to {+ transform: rotate(0deg);+ }}::view-transition-old(theme-icon) {animation: 0.5s cubic-bezier(0.4, 0, 0.2, 1) both fade-out,- 0.5s cubic-bezier(0.4, 0, 0.2, 1) both rotate-sun;+ 0.5s cubic-bezier(0.4, 0, 0.2, 1) both rotate-sun;}::view-transition-new(theme-icon) {animation: 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both fade-in,- 0.5s cubic-bezier(0.4, 0, 0.2, 1) both rotate-moon;+ 0.5s cubic-bezier(0.4, 0, 0.2, 1) both rotate-moon;}/* Wipe effect for the entire theme change */@keyframes wipe-in-right {- from { clip-path: inset(0 100% 0 0); }- to { clip-path: inset(0 0 0 0); }+ from {+ clip-path: inset(0 100% 0 0);+ }+ to {+ clip-path: inset(0 0 0 0);+ }}@keyframes wipe-out-left {- from { clip-path: inset(0 0 0 0); }- to { clip-path: inset(0 0 0 100%); }+ from {+ clip-path: inset(0 0 0 0);+ }+ to {+ clip-path: inset(0 0 0 100%);+ }}::view-transition-old(root) {@@ -396,13 +412,21 @@ label {}@keyframes fade-in {- from { opacity: 0; }- to { opacity: 1; }+ from {+ opacity: 0;+ }+ to {+ opacity: 1;+ }}@keyframes fade-out {- from { opacity: 1; }- to { opacity: 0; }+ from {+ opacity: 1;+ }+ to {+ opacity: 0;+ }}.view-transition-theme-icon {@@ -538,6 +562,7 @@ slot:not(.dashboard-layout slot) {/* Custom scrollbar */.custom-scroll {overflow-y: scroll;+ padding-right: 3px;}.custom-scroll::-webkit-scrollbar {