fix docker

This commit is contained in:
Saeed Vaziry
2025-06-19 14:49:01 +02:00
parent 798542673f
commit 69939f8aad
2 changed files with 38 additions and 29 deletions

View File

@ -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

View File

@ -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() {
</div>
</CardHeader>
<CardContent>
{Object.entries(page.props.features).map(([key, feature], index) => (
<div key={`feature-${key}`}>
<div className="flex items-center justify-between p-4">
<div className="space-y-1">
<p>{feature.label}</p>
<p className="text-muted-foreground text-sm">{feature.description}</p>
{Object.entries(page.props.features).length > 0 ? (
Object.entries(page.props.features).map(([key, feature], index) => (
<div key={`feature-${key}`}>
<div className="flex items-center justify-between p-4">
<div className="space-y-1">
<p>{feature.label}</p>
<p className="text-muted-foreground text-sm">{feature.description}</p>
</div>
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild>
<Button variant="outline">
Actions
<MoreVerticalIcon />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
{Object.entries(feature.actions || {}).map(([actionKey, action]) => (
<FeatureAction key={`action-${actionKey}`} site={page.props.site} featureId={key} actionId={actionKey} action={action}>
<DropdownMenuItem onSelect={(e) => e.preventDefault()} disabled={!action.active}>
{action.label}
</DropdownMenuItem>
</FeatureAction>
))}
</DropdownMenuContent>
</DropdownMenu>
</div>
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild>
<Button variant="outline">
Actions
<MoreVerticalIcon />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
{Object.entries(feature.actions || {}).map(([actionKey, action]) => (
<FeatureAction key={`action-${actionKey}`} site={page.props.site} featureId={key} actionId={actionKey} action={action}>
<DropdownMenuItem onSelect={(e) => e.preventDefault()} disabled={!action.active}>
{action.label}
</DropdownMenuItem>
</FeatureAction>
))}
</DropdownMenuContent>
</DropdownMenu>
{index < Object.entries(page.props.features).length - 1 && <Separator />}
</div>
{index < Object.keys(page.props.features).length - 1 && <Separator />}
</div>
))}
))
) : (
<CardRow className="flex-col items-center justify-center space-y-2">
<span className="text-muted-foreground">No available features</span>
<Link href={route('plugins')} prefetch>
<Button variant="outline">Explore Plugins</Button>
</Link>
</CardRow>
)}
</CardContent>
</Card>
</Container>