Compare commits
2 Commits
1d78dcc6ca
...
1ac8009173
| Author | SHA1 | Date | |
|---|---|---|---|
| 1ac8009173 | |||
| 1230bda4fe |
@ -1,12 +1,8 @@
|
||||
{
|
||||
"name": "Fotobox",
|
||||
"build": {
|
||||
"dockerfile": "../Dockerfile",
|
||||
"context": ".."
|
||||
},
|
||||
"workspaceFolder": "/workspace/fotobox",
|
||||
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace/fotobox,type=bind",
|
||||
"postCreateCommand": "sh docker/init.sh",
|
||||
"image": "mcr.microsoft.com/devcontainers/base:trixie",
|
||||
|
||||
"postCreateCommand": "sudo sh docker/init.sh",
|
||||
"forwardPorts": [8000],
|
||||
"portsAttributes": {
|
||||
"8000": {
|
||||
|
||||
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Photoprofiles\Pages;
|
||||
|
||||
use App\Filament\Resources\Photoprofiles\PhotoprofileResource;
|
||||
use Filament\Resources\Pages\CreateRecord;
|
||||
|
||||
class CreatePhotoprofile extends CreateRecord
|
||||
{
|
||||
protected static string $resource = PhotoprofileResource::class;
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Photoprofiles\Pages;
|
||||
|
||||
use App\Filament\Resources\Photoprofiles\PhotoprofileResource;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
|
||||
class EditPhotoprofile extends EditRecord
|
||||
{
|
||||
protected static string $resource = PhotoprofileResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
DeleteAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Photoprofiles\Pages;
|
||||
|
||||
use App\Filament\Resources\Photoprofiles\PhotoprofileResource;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
|
||||
class ListPhotoprofiles extends ListRecords
|
||||
{
|
||||
protected static string $resource = PhotoprofileResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
CreateAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Photoprofiles;
|
||||
|
||||
use App\Filament\Resources\Photoprofiles\Pages\CreatePhotoprofile;
|
||||
use App\Filament\Resources\Photoprofiles\Pages\EditPhotoprofile;
|
||||
use App\Filament\Resources\Photoprofiles\Pages\ListPhotoprofiles;
|
||||
use App\Filament\Resources\Photoprofiles\Schemas\PhotoprofileForm;
|
||||
use App\Filament\Resources\Photoprofiles\Tables\PhotoprofilesTable;
|
||||
use App\Models\Photoprofile;
|
||||
use BackedEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class PhotoprofileResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Photoprofile::class;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedRectangleStack;
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'name';
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return PhotoprofileForm::configure($schema);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return PhotoprofilesTable::configure($table);
|
||||
}
|
||||
|
||||
public static function getRelations(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListPhotoprofiles::route('/'),
|
||||
'create' => CreatePhotoprofile::route('/create'),
|
||||
'edit' => EditPhotoprofile::route('/{record}/edit'),
|
||||
];
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Photoprofiles\Schemas;
|
||||
|
||||
use Filament\Forms\Components\Checkbox;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class PhotoprofileForm
|
||||
{
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
TextInput::make('name')
|
||||
->label('Name')
|
||||
->required(),
|
||||
Checkbox::make('active')
|
||||
->label('Aktiv'),
|
||||
Textarea::make('commands')
|
||||
->label('Befehle')
|
||||
->required(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Photoprofiles\Tables;
|
||||
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Tables\Columns\IconColumn;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class PhotoprofilesTable
|
||||
{
|
||||
public static function configure(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('created_at')
|
||||
->dateTime()
|
||||
->sortable()
|
||||
->toggleable(isToggledHiddenByDefault: true),
|
||||
TextColumn::make('updated_at')
|
||||
->dateTime()
|
||||
->sortable()
|
||||
->toggleable(isToggledHiddenByDefault: true),
|
||||
TextColumn::make('name')
|
||||
->label('Name')
|
||||
->searchable(),
|
||||
IconColumn::make('active')
|
||||
->label('Aktiv')
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
])
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@ -1,10 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Photocommand extends Model
|
||||
{
|
||||
//
|
||||
}
|
||||
@ -2,11 +2,11 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Attributes\Fillable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
#[Fillable('name', 'commands')]
|
||||
class Photoprofile extends Model
|
||||
{
|
||||
protected $casts = [
|
||||
'commands' => 'array',
|
||||
];
|
||||
//
|
||||
}
|
||||
|
||||
@ -14,6 +14,7 @@ return new class extends Migration
|
||||
Schema::create('photoprofiles', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->boolean('active')->default(1);
|
||||
$table->string("name");
|
||||
$table->string("commands");
|
||||
});
|
||||
|
||||
@ -13,7 +13,7 @@ ${SUDO} sh -c 'echo "deb [signed-by=/usr/share/keyrings/debsuryorg-archive-keyri
|
||||
${SUDO} apt-get update
|
||||
|
||||
apt-get update
|
||||
apt-get -y install php8.5 php8.5-cli php8.5-zip php8.5-sqlite3 php8.5-xml php8.5-pgsql php8.5-bcmath php8.5-intl php8.5-mbstring sqlite3
|
||||
apt-get -y install php8.5 php8.5-cli php8.5-zip php8.5-sqlite3 php8.5-xml php8.5-pgsql php8.5-bcmath php8.5-intl php8.5-mbstring sqlite3 composer npm
|
||||
curl -fsSL -o gmic.deb "https://gmic.eu/get_file.php?file=linux/gmic_3.7.6_debian13_trixie_amd64.deb"
|
||||
apt-get -y install ./gmic.deb
|
||||
rm gmic.deb
|
||||
|
||||
Loading…
Reference in New Issue
Block a user