cleanup - froentend pages removed

This commit is contained in:
IGNY8 VPS (Salman)
2025-12-20 09:55:16 +00:00
parent ab0d6469d4
commit eb6cba7920
55 changed files with 4419 additions and 9232 deletions

View File

@@ -23,7 +23,6 @@ import SidebarWidget from "./SidebarWidget";
import { APP_VERSION } from "../config/version";
import { useAuthStore } from "../store/authStore";
import { useSettingsStore } from "../store/settingsStore";
import ApiStatusIndicator from "../components/sidebar/ApiStatusIndicator";
type NavItem = {
name: string;
@@ -43,13 +42,8 @@ const AppSidebar: React.FC = () => {
const { user, isAuthenticated } = useAuthStore();
const { moduleEnableSettings, isModuleEnabled: checkModuleEnabled, loadModuleEnableSettings, loading: settingsLoading } = useSettingsStore();
// Show admin menu only for system account (aws-admin/default) or developer
const isAwsAdminAccount = Boolean(
user?.account?.slug === 'aws-admin' ||
user?.account?.slug === 'default-account' ||
user?.account?.slug === 'default' ||
user?.role === 'developer'
);
// Show admin menu only for aws-admin account users
const isAwsAdminAccount = Boolean(user?.account?.slug === 'aws-admin');
// Helper to check if module is enabled - memoized to prevent infinite loops
const moduleEnabled = useCallback((moduleName: string): boolean => {
@@ -255,7 +249,7 @@ const AppSidebar: React.FC = () => {
];
}, [moduleEnabled]);
// Admin section - only shown for users in aws-admin account
// Admin section - only shown for aws-admin account users
const adminSection: MenuSection = useMemo(() => ({
label: "ADMIN",
items: [
@@ -264,91 +258,6 @@ const AppSidebar: React.FC = () => {
name: "System Dashboard",
path: "/admin/dashboard",
},
{
icon: <UserIcon />,
name: "Account Management",
subItems: [
{ name: "All Accounts", path: "/admin/accounts" },
{ name: "Subscriptions", path: "/admin/subscriptions" },
{ name: "Account Limits", path: "/admin/account-limits" },
],
},
{
icon: <DollarLineIcon />,
name: "Billing Administration",
subItems: [
{ name: "Billing Overview", path: "/admin/billing" },
{ name: "Invoices", path: "/admin/invoices" },
{ name: "Payments", path: "/admin/payments" },
{ name: "Credit Costs Config", path: "/admin/credit-costs" },
{ name: "Credit Packages", path: "/admin/credit-packages" },
],
},
{
icon: <UserCircleIcon />,
name: "User Administration",
subItems: [
{ name: "All Users", path: "/admin/users" },
{ name: "Roles & Permissions", path: "/admin/roles" },
{ name: "Activity Logs", path: "/admin/activity-logs" },
],
},
{
icon: <PlugInIcon />,
name: "System Configuration",
subItems: [
{ name: "System Settings", path: "/admin/system-settings" },
{ name: "AI Settings", path: "/admin/ai-settings" },
{ name: "Module Settings", path: "/settings/modules" },
{ name: "Integration Settings", path: "/admin/integration-settings" },
],
},
{
icon: <PieChartIcon />,
name: "Monitoring",
subItems: [
{ name: "System Health", path: "/settings/status" },
{ name: "API Monitor", path: "/settings/api-monitor" },
{ name: "Debug Status", path: "/settings/debug-status" },
],
},
{
icon: <BoltIcon />,
name: "Developer Tools",
subItems: [
{ name: "Function Testing", path: "/admin/function-testing" },
{ name: "System Testing", path: "/admin/system-testing" },
],
},
{
icon: <BoltIcon />,
name: "UI Elements",
subItems: [
{ name: "Alerts", path: "/ui-elements/alerts" },
{ name: "Avatars", path: "/ui-elements/avatars" },
{ name: "Badges", path: "/ui-elements/badges" },
{ name: "Breadcrumb", path: "/ui-elements/breadcrumb" },
{ name: "Buttons", path: "/ui-elements/buttons" },
{ name: "Buttons Group", path: "/ui-elements/buttons-group" },
{ name: "Cards", path: "/ui-elements/cards" },
{ name: "Carousel", path: "/ui-elements/carousel" },
{ name: "Dropdowns", path: "/ui-elements/dropdowns" },
{ name: "Images", path: "/ui-elements/images" },
{ name: "Links", path: "/ui-elements/links" },
{ name: "List", path: "/ui-elements/list" },
{ name: "Modals", path: "/ui-elements/modals" },
{ name: "Notifications", path: "/ui-elements/notifications" },
{ name: "Pagination", path: "/ui-elements/pagination" },
{ name: "Popovers", path: "/ui-elements/popovers" },
{ name: "Pricing Table", path: "/ui-elements/pricing-table" },
{ name: "Progressbar", path: "/ui-elements/progressbar" },
{ name: "Ribbons", path: "/ui-elements/ribbons" },
{ name: "Spinners", path: "/ui-elements/spinners" },
{ name: "Tabs", path: "/ui-elements/tabs" },
{ name: "Tooltips", path: "/ui-elements/tooltips" },
{ name: "Videos", path: "/ui-elements/videos" },
],
},
],
}), []);
@@ -624,8 +533,6 @@ const AppSidebar: React.FC = () => {
)}
</div>
<div className="flex flex-col overflow-y-auto duration-300 ease-linear no-scrollbar">
{/* API Status Indicator - above OVERVIEW section */}
<ApiStatusIndicator />
<nav className="mb-6">
<div className="flex flex-col gap-2">
{allSections.map((section, sectionIndex) => (