diff --git a/docker/Dockerfile b/docker/Dockerfile index 5d1d8765..90fe4817 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -35,7 +35,7 @@ RUN npm install --force RUN npm run build RUN composer install --no-dev RUN chown -R www-data:www-data /var/www/html \ - && chmod -R 755 /var/www/html/storage /var/www/html/bootstrap/cache \ + && chmod -R 755 /var/www/html/storage /var/www/html/bootstrap/cache # webserver RUN rm /etc/nginx/sites-available/default diff --git a/resources/js/pages/site-features/index.tsx b/resources/js/pages/site-features/index.tsx index e026cffc..dec9f7d7 100644 --- a/resources/js/pages/site-features/index.tsx +++ b/resources/js/pages/site-features/index.tsx @@ -1,4 +1,4 @@ -import { Head, usePage } from '@inertiajs/react'; +import { Head, Link, usePage } from '@inertiajs/react'; import { Server } from '@/types/server'; import Container from '@/components/container'; import HeaderContainer from '@/components/header-container'; @@ -6,7 +6,7 @@ import Heading from '@/components/heading'; import { Button } from '@/components/ui/button'; import ServerLayout from '@/layouts/server/layout'; import { BookOpenIcon, MoreVerticalIcon } from 'lucide-react'; -import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; +import { Card, CardContent, CardDescription, CardHeader, CardRow, CardTitle } from '@/components/ui/card'; import React from 'react'; import { Site, SiteFeature } from '@/types/site'; import { Separator } from '@/components/ui/separator'; @@ -47,34 +47,43 @@ export default function SiteFeatures() { - {Object.entries(page.props.features).map(([key, feature], index) => ( -
-
-
-

{feature.label}

-

{feature.description}

+ {Object.entries(page.props.features).length > 0 ? ( + Object.entries(page.props.features).map(([key, feature], index) => ( +
+
+
+

{feature.label}

+

{feature.description}

+
+ + + + + + {Object.entries(feature.actions || {}).map(([actionKey, action]) => ( + + e.preventDefault()} disabled={!action.active}> + {action.label} + + + ))} + +
- - - - - - {Object.entries(feature.actions || {}).map(([actionKey, action]) => ( - - e.preventDefault()} disabled={!action.active}> - {action.label} - - - ))} - - + {index < Object.entries(page.props.features).length - 1 && }
- {index < Object.keys(page.props.features).length - 1 && } -
- ))} + )) + ) : ( + + No available features + + + + + )}