Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 57b0727788 | |||
| 58b047edd2 | |||
| a78b699a5e | |||
| e910ae9878 | |||
| 362c649d36 | |||
| 852c4d608d | |||
| aa59e55a41 | |||
| 348bad80e0 | |||
| f0d4686141 | |||
| a482ab3c7e | |||
| c580882ec0 | |||
| 2cf8379cbe | |||
| c39ec469df |
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"$schema": "/phpactor.schema.json",
|
||||||
|
"language_server_phpstan.enabled": false
|
||||||
|
}
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
<div class="form">
|
<div class="form">
|
||||||
<h2 class="mb-5">Enter Lucent</h2>
|
<h2 class="mb-5">Enter Lucent</h2>
|
||||||
|
|
||||||
<form hx-post="/lucent/login" >
|
<form hx-post="{{config("lucent.url")}}/lucent/login" >
|
||||||
@csrf
|
@csrf
|
||||||
<p>Submit your email address and you will receive a <b>login link</b> to your email</p>
|
<p>Submit your email address and you will receive a <b>login link</b> to your email</p>
|
||||||
<p>Don't forget to check your spam folder</p>
|
<p>Don't forget to check your spam folder</p>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<div class="form">
|
<div class="form">
|
||||||
<h2 class="mb-5">Welcome to Lucent</h2>
|
<h2 class="mb-5">Welcome to Lucent</h2>
|
||||||
|
|
||||||
<form hx-post="/lucent/verify" hx-redirect="/lucent" hx-target-error=".form-errors" >
|
<form hx-post="{{config("lucent.url")}}/lucent/verify" hx-redirect="{{config("lucent.url")}}/lucent" hx-target-error=".form-errors" >
|
||||||
<input type="hidden" value="{{$email}}" name="email" />
|
<input type="hidden" value="{{$email}}" name="email" />
|
||||||
<input type="hidden" value="{{$token}}" name="token" />
|
<input type="hidden" value="{{$token}}" name="token" />
|
||||||
@csrf
|
@csrf
|
||||||
|
|||||||
@@ -6,11 +6,11 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
<title>@yield('title') - Lucent Data Platform</title>
|
<title>@yield('title') - Lucent Data Platform</title>
|
||||||
|
<meta name="htmx-config" content='{"selfRequestsOnly": false}' />
|
||||||
@if(config("lucent.env") === "production")
|
@if(config("lucent.env") === "production")
|
||||||
<!-- if production -->
|
<!-- if production -->
|
||||||
<link rel="stylesheet" href="/vendor/lucent/dist/{{ $manifest['main.js']["css"][0] }}"/>
|
<link rel="stylesheet" href="{{url('vendor/lucent/dist/'.$manifest['main.js']["css"][0])}}"/>
|
||||||
<script type="module" src="/vendor/lucent/dist/{{ $manifest['main.js']["file"] }}"></script>
|
<script type="module" src="{{url('vendor/lucent/dist/'.$manifest['main.js']["file"])}}"></script>
|
||||||
@else
|
@else
|
||||||
<!-- if development -->
|
<!-- if development -->
|
||||||
@php
|
@php
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|
||||||
{{-- <link rel="icon" type="image/x-icon" href="/favicon.ico"/>--}}
|
<link rel="icon" type="image/x-icon" href="{{url('favicon.ico')}}">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,8 @@
|
|||||||
<title>@yield('title') - Lucent Data Platform</title>
|
<title>@yield('title') - Lucent Data Platform</title>
|
||||||
@if(config("lucent.env") == "production")
|
@if(config("lucent.env") == "production")
|
||||||
<!-- if production -->
|
<!-- if production -->
|
||||||
<link rel="stylesheet" href="/vendor/lucent/dist/{{ $manifest['main.js']["css"][0] }}"/>
|
<link rel="stylesheet" href="{{url('vendor/lucent/dist/'.$manifest['main.js']["css"][0])}}"/>
|
||||||
<script type="module" src="/vendor/lucent/dist/{{ $manifest['main.js']["file"] }}"></script>
|
<script type="module" src="{{url('vendor/lucent/dist/'.$manifest['main.js']["file"])}}"></script>
|
||||||
@else
|
@else
|
||||||
<!-- if development -->
|
<!-- if development -->
|
||||||
@php
|
@php
|
||||||
@@ -18,16 +18,14 @@
|
|||||||
<script type="module" crossorigin src="http://127.0.0.1:5173/main.js"></script>
|
<script type="module" crossorigin src="http://127.0.0.1:5173/main.js"></script>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
|
||||||
|
<link rel="icon" type="image/x-icon" href="{{url('favicon.ico')}}">
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
||||||
@yield('content')
|
@yield('content')
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -41,11 +41,17 @@ class RebuildThumbnails extends Command
|
|||||||
|
|
||||||
public function rebuildThumbnails(FilesSchema $schema): void
|
public function rebuildThumbnails(FilesSchema $schema): void
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->info("Rebuilding thumbnails for ". $schema->name);
|
$this->info("Rebuilding thumbnails for ". $schema->name);
|
||||||
$records = $this->query->filter(["schema" => $schema->name])->run()->records;
|
$records = $this->query->limit(0)->filter(["schema" => $schema->name])->run()->records;
|
||||||
$disk = $this->fileService->loadDisk($schema->disk);
|
$disk = $this->fileService->loadDisk($schema->disk);
|
||||||
foreach ($records as $record) {
|
foreach ($records as $record) {
|
||||||
|
try{
|
||||||
|
|
||||||
$this->fileService->createTemplates($disk, $record->_file->path);
|
$this->fileService->createTemplates($disk, $record->_file->path);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo "File ". $record->_file->originalName . " could not be rebuilt \n" ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ class FileService
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($this->isImage($mimetype)){
|
if($this->isImage($mimetype)){
|
||||||
$this->createTemplates($disk, $path, $file);
|
$this->createTemplates($disk, $path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -136,7 +136,8 @@ class FileService
|
|||||||
{
|
{
|
||||||
$originalImage = $this->imageManager->make($disk->get($path));
|
$originalImage = $this->imageManager->make($disk->get($path));
|
||||||
foreach (config("lucent.imageFilters") as $preset => $filterClass) {
|
foreach (config("lucent.imageFilters") as $preset => $filterClass) {
|
||||||
$image = $originalImage->filter(new $filterClass);
|
$imageClone = clone $originalImage;
|
||||||
|
$image = $imageClone->filter(new $filterClass);
|
||||||
$templateUri = "/templates/" . $preset . "/" . $path;
|
$templateUri = "/templates/" . $preset . "/" . $path;
|
||||||
$disk->put($templateUri, $image->encode('webp', 75));
|
$disk->put($templateUri, $image->encode('webp', 75));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ readonly class GreaterThan implements IBuilderConverter
|
|||||||
return $builder->orWhere($this->argument->field, ">", $this->formatValue());
|
return $builder->orWhere($this->argument->field, ">", $this->formatValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
private function formatValue(): int|float
|
private function formatValue(): int|float|string
|
||||||
{
|
{
|
||||||
$value = trim($this->argument->value);
|
$value = trim($this->argument->value);
|
||||||
if (is_numeric($value)) {
|
if (is_numeric($value)) {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ readonly class GreaterThanEquals implements IBuilderConverter
|
|||||||
return $builder->orWhere($this->argument->field, ">=", $this->formatValue());
|
return $builder->orWhere($this->argument->field, ">=", $this->formatValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
private function formatValue(): int|float
|
private function formatValue(): int|float|string
|
||||||
{
|
{
|
||||||
$value = trim($this->argument->value);
|
$value = trim($this->argument->value);
|
||||||
if (is_numeric($value)) {
|
if (is_numeric($value)) {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ readonly class LessThan implements IBuilderConverter
|
|||||||
return $builder->orWhere($this->argument->field, "<", $this->formatValue());
|
return $builder->orWhere($this->argument->field, "<", $this->formatValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
private function formatValue(): int|float
|
private function formatValue(): int|float|string
|
||||||
{
|
{
|
||||||
$value = trim($this->argument->value);
|
$value = trim($this->argument->value);
|
||||||
if (is_numeric($value)) {
|
if (is_numeric($value)) {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ readonly class LessThanEquals implements IBuilderConverter
|
|||||||
return $builder->orWhere($this->argument->field, "<=", $this->formatValue());
|
return $builder->orWhere($this->argument->field, "<=", $this->formatValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
private function formatValue(): int|float
|
private function formatValue(): int|float|string
|
||||||
{
|
{
|
||||||
$value = trim($this->argument->value);
|
$value = trim($this->argument->value);
|
||||||
if (is_numeric($value)) {
|
if (is_numeric($value)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user