diff --git a/client/src/components/TicketAttachments.tsx b/client/src/components/TicketAttachments.tsx index ce31022..e022983 100644 --- a/client/src/components/TicketAttachments.tsx +++ b/client/src/components/TicketAttachments.tsx @@ -114,6 +114,27 @@ export function TicketAttachments({ const isVideo = (type: string) => type.startsWith('video/'); const isPdf = (type: string) => type === 'application/pdf'; + const normalizedCdnHost = config?.cdnDomain + ? (() => { + const raw = config.cdnDomain.trim(); + try { + const parsed = new URL(raw.startsWith('http') ? raw : `https://${raw}`); + return parsed.hostname.toLowerCase(); + } catch { + return raw.replace(/^https?:\/\//i, '').split('/')[0].toLowerCase(); + } + })() + : null; + + const isTrustedCdnUrl = (url: string) => { + if (!normalizedCdnHost) return false; + try { + return new URL(url).hostname.toLowerCase() === normalizedCdnHost; + } catch { + return false; + } + }; + if (!config?.backblazeConfigured) { return (
- {permission.description} -
+ ++ {!canGrantPermission(permission.id) ? "You don't have this permission" : permission.description} +
++ {cantGrant ? "You don't have this permission" : parentChecked ? 'Granted by parent' : child.description} +
+- {category.ticketTypes.join(', ')} • {category.actions.length} actions + {category.ticketTypes.join(', ')} - {category.actions.length} actions
- {category.ticketTypes.join(', ')} • {category.actions.length} actions + {category.ticketTypes.join(', ')} - {category.actions.length} actions
@@ -2881,4 +2874,4 @@ const DraggableQuickResponseAction = ({
);
};
-export default TicketSettings;
\ No newline at end of file
+export default TicketSettings;
diff --git a/client/src/components/settings/UsageSettings.tsx b/client/src/components/settings/UsageSettings.tsx
index a3be5d0..e462a77 100644
--- a/client/src/components/settings/UsageSettings.tsx
+++ b/client/src/components/settings/UsageSettings.tsx
@@ -1,5 +1,5 @@
import React, { useState, useEffect } from 'react';
-import { HardDrive, Search, Filter, Trash2, Download, FolderOpen, Calendar, AlertCircle, Settings, CreditCard, Brain, Zap } from 'lucide-react';
+import { HardDrive, Search, Trash2, Download, FolderOpen, Calendar, AlertCircle, Settings, CreditCard, Brain } from 'lucide-react';
import { getApiUrl, getCurrentDomain, apiFetch } from '@/lib/api';
import { Button } from '@modl-gg/shared-web/components/ui/button';
import { Input } from '@modl-gg/shared-web/components/ui/input';
@@ -26,6 +26,7 @@ interface StorageFile {
}
interface StorageUsage {
+ isPremium: boolean;
totalUsed: number;
totalQuota: number;
byType: {
@@ -110,6 +111,7 @@ const UsageSettings = () => {
const [newOverageLimit, setNewOverageLimit] = useState{article.title}
{ticket.subject || ticket.title || 'No subject'}
-
diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx
index 8332e90..51bc018 100644
--- a/client/src/pages/home.tsx
+++ b/client/src/pages/home.tsx
@@ -13,7 +13,7 @@ import {
useRecentTickets,
useRecentPunishments,
useAssignedTicketUpdates,
- useMarkSubscriptionUpdateAsRead
+ useMarkTicketAsRead
} from '@/hooks/use-data';
import { useToast } from '@modl-gg/shared-web/hooks/use-toast';
import PageContainer from '@/components/layout/PageContainer';
@@ -34,7 +34,7 @@ const Home = () => {
const { data: assignedUpdatesData, isLoading: isLoadingUpdates, refetch: refetchUpdates } = useAssignedTicketUpdates(10);
// Mutations for updates management
- const markAsReadMutation = useMarkSubscriptionUpdateAsRead();
+ const markTicketAsReadMutation = useMarkTicketAsRead();
const handleRefreshData = async () => {
setIsSpinning(true);
@@ -63,8 +63,8 @@ const Home = () => {
}
};
- const handleMarkAsRead = async (updateId: string) => {
- return markAsReadMutation.mutateAsync(updateId);
+ const handleDismissTicket = async (ticketId: string) => {
+ return markTicketAsReadMutation.mutateAsync(ticketId);
};
return (
@@ -98,7 +98,7 @@ const Home = () => {