Compare commits
82 Commits
bot/depend
...
8d06374bef
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d06374bef | ||
| 2ba8881f3b | |||
| ce5c97290f | |||
|
|
0c7407c11b | ||
| fe5ab7b0bf | |||
| 954b83ebba | |||
| 9bfe23df9c | |||
| 5f78a9e500 | |||
| d47672dbe3 | |||
| c3b898d99e | |||
| b13b22c359 | |||
| fa505f56ee | |||
| 464c7d5aa1 | |||
| 260b794111 | |||
| e2567c1b97 | |||
| 7302a36067 | |||
| ac7b02f320 | |||
| 0fbeb192c1 | |||
| 5c3788eb6d | |||
|
|
f01051107e | ||
|
|
cf029bc86e | ||
|
|
17ab10c1c5 | ||
|
|
dc5c387f7a | ||
|
|
3b4d2b2784 | ||
|
|
3b3dc276fc | ||
|
|
ee460ec076 | ||
|
|
24e7c6a008 | ||
|
|
1a6a1dab47 | ||
|
|
c85031ab49 | ||
|
|
24efcab8da | ||
|
|
182e4e8de8 | ||
|
|
6b62e45acf | ||
|
|
a37f744caa | ||
|
|
8eca69335f | ||
|
|
87e70704c1 | ||
|
|
db1821bcef | ||
|
|
62583c4869 | ||
|
|
066b7b1790 | ||
|
|
d38422e16c | ||
|
|
ed22521e6f | ||
|
|
3218f55a31 | ||
|
|
be1fa8f432 | ||
|
|
c0c572397a | ||
|
|
049d4849aa | ||
|
|
e89656367f | ||
|
|
e910ef7e84 | ||
|
|
db0e927056 | ||
|
|
cec55028d6 | ||
|
|
0ae09c40ae | ||
|
|
1cf2ec1ce7 | ||
|
|
693df3a05b | ||
|
|
c0d1913660 | ||
|
|
8c387280a6 | ||
|
|
a1ab7b6257 | ||
|
|
36d4f08aaf | ||
|
|
f7de4f49d3 | ||
|
|
06018c405d | ||
|
|
03c17200a0 | ||
| 519c2a0fec | |||
|
|
2b8788f716 | ||
|
|
72be071536 | ||
| 37b923fbda | |||
|
|
292901a02e | ||
|
|
12a6629a4b | ||
| 9d9a8ed9f5 | |||
| 1a03fed3bd | |||
| 43e66b2004 | |||
| 8babb4c836 | |||
| 4eb3dfbb64 | |||
| 33d390a612 | |||
| cad78c30ae | |||
| f8acdae237 | |||
|
|
63582dc306 | ||
|
|
c96fb95f27 | ||
| 1160c8b077 | |||
| a4b3405f8a | |||
| 9d5396ca9a | |||
| de1483d409 | |||
|
|
a37386565a | ||
|
|
ff8b6549ce | ||
|
|
d550bc60e2 | ||
|
|
307573a3a8 |
42
.gitea/workflows/laravel.yml
Normal file
42
.gitea/workflows/laravel.yml
Normal file
@@ -0,0 +1,42 @@
|
||||
name: Laravel
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
|
||||
jobs:
|
||||
laravel-tests:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: "8.2"
|
||||
- uses: actions/checkout@v3
|
||||
- name: Copy .env
|
||||
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
||||
- name: Install Dependencies
|
||||
run: composer install -q --no-interaction --no-progress --prefer-dist
|
||||
- name: Generate key
|
||||
run: php artisan key:generate
|
||||
- name: Directory Permissions
|
||||
run: chmod -R 777 storage bootstrap/cache
|
||||
- name: Create Database
|
||||
run: |
|
||||
mkdir -p database
|
||||
touch database/database.sqlite
|
||||
- name: Execute tests (Unit and Feature tests) via PHPUnit
|
||||
env:
|
||||
DB_CONNECTION: sqlite
|
||||
DB_DATABASE: database/database.sqlite
|
||||
run: vendor/bin/phpunit
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "16.x"
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Run Vue tests
|
||||
env:
|
||||
LARAVEL_BYPASS_ENV_CHECK: "1"
|
||||
run: npm run test
|
||||
24
.gitea/workflows/renovate.yaml
Normal file
24
.gitea/workflows/renovate.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
name: renovate
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "@daily"
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
renovate:
|
||||
runs-on: ubuntu-latest
|
||||
container: ghcr.io/renovatebot/renovate:43.2.1
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- run: renovate
|
||||
working-directory: ${{ gitea.workspace }}
|
||||
env:
|
||||
RENOVATE_CONFIG_FILE: "renovate-config.json"
|
||||
LOG_LEVEL: "info"
|
||||
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
|
||||
|
||||
24
.github/workflows/dependency-update.yml
vendored
24
.github/workflows/dependency-update.yml
vendored
@@ -44,12 +44,20 @@ jobs:
|
||||
echo "changed=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Create PR
|
||||
# - name: Create PR
|
||||
# if: steps.changes.outputs.changed == 'true'
|
||||
# uses: peter-evans/create-pull-request@v6
|
||||
# with:
|
||||
# commit-message: "Dependency update"
|
||||
# title: "Dependency update"
|
||||
# body: "Automated dependency update."
|
||||
# branch: "bot/dependency-update"
|
||||
# delete-branch: true
|
||||
|
||||
- name: Commit and push
|
||||
if: steps.changes.outputs.changed == 'true'
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
with:
|
||||
commit-message: "Dependency update"
|
||||
title: "Dependency update"
|
||||
body: "Automated dependency update."
|
||||
branch: "bot/dependency-update"
|
||||
delete-branch: true
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git commit -am "Dependency update"
|
||||
git push origin HEAD:main
|
||||
|
||||
18
README.md
18
README.md
@@ -49,6 +49,24 @@ We would like to extend our thanks to the following sponsors for funding Laravel
|
||||
- **[byte5](https://byte5.de)**
|
||||
- **[OP.GG](https://op.gg)**
|
||||
|
||||
## Code Style
|
||||
|
||||
This project uses [Laravel Pint](https://laravel.com/docs/pint) for code styling. Pint is an opinionated PHP code style fixer for minimalists, built on top of PHP-CS-Fixer.
|
||||
|
||||
To automatically fix code style issues, run:
|
||||
|
||||
```bash
|
||||
composer pint
|
||||
```
|
||||
|
||||
To check for code style issues without fixing them:
|
||||
|
||||
```bash
|
||||
composer pint-test
|
||||
```
|
||||
|
||||
The code style configuration can be found in `pint.json`.
|
||||
|
||||
## Contributing
|
||||
|
||||
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
|
||||
|
||||
@@ -111,15 +111,17 @@ class MediaController extends Controller
|
||||
public function admin_store(Request $request)
|
||||
{
|
||||
$file = null;
|
||||
$cleanupPath = null;
|
||||
|
||||
// Check if the endpoint received a file...
|
||||
if($request->hasFile('file')) {
|
||||
try {
|
||||
$file = $this->upload($request);
|
||||
|
||||
if($file === true) {
|
||||
if(is_array($file) && !empty($file['chunk'])) {
|
||||
return response()->json([
|
||||
'message' => 'Chunk stored',
|
||||
'upload_token' => $file['token'] ?? null,
|
||||
]);
|
||||
} else if(!$file) {
|
||||
return response()->json([
|
||||
@@ -150,8 +152,20 @@ class MediaController extends Controller
|
||||
}
|
||||
|
||||
// else check if it received a file name of a previous upload...
|
||||
} else if($request->has('file')) {
|
||||
$tempFileName = sys_get_temp_dir() . '/chunk-' . Auth::id() . '-' . $request->file;
|
||||
} else if($request->has('upload_token') || $request->has('file')) {
|
||||
$uploadToken = $request->input('upload_token', $request->input('file'));
|
||||
$chunkUploads = session()->get('chunk_uploads', []);
|
||||
|
||||
if(!is_string($uploadToken) || !isset($chunkUploads[$uploadToken])) {
|
||||
return response()->json([
|
||||
'message' => 'Could not find the referenced file on the server.',
|
||||
'errors' => [
|
||||
'file' => 'Could not find the referenced file on the server.'
|
||||
]
|
||||
], 422);
|
||||
}
|
||||
|
||||
$tempFileName = $chunkUploads[$uploadToken];
|
||||
if(!file_exists($tempFileName)) {
|
||||
return response()->json([
|
||||
'message' => 'Could not find the referenced file on the server.',
|
||||
@@ -165,7 +179,16 @@ class MediaController extends Controller
|
||||
if($fileMime === false) {
|
||||
$fileMime = 'application/octet-stream';
|
||||
}
|
||||
$file = new UploadedFile($tempFileName, $request->file, $fileMime, null, true);
|
||||
$fileName = $request->input('filename', 'upload');
|
||||
$fileName = Helpers::cleanFileName($fileName);
|
||||
if ($fileName === '') {
|
||||
$fileName = 'upload';
|
||||
}
|
||||
|
||||
$file = new UploadedFile($tempFileName, $fileName, $fileMime, null, true);
|
||||
$cleanupPath = $tempFileName;
|
||||
unset($chunkUploads[$uploadToken]);
|
||||
session()->put('chunk_uploads', $chunkUploads);
|
||||
}
|
||||
|
||||
// Check there is an actual file
|
||||
@@ -242,7 +265,13 @@ class MediaController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
unlink($file->getRealPath());
|
||||
if(is_string($cleanupPath)) {
|
||||
$realPath = realpath($cleanupPath);
|
||||
$tempDir = realpath(sys_get_temp_dir());
|
||||
if($realPath !== false && $tempDir !== false && str_starts_with($realPath, $tempDir . DIRECTORY_SEPARATOR)) {
|
||||
@unlink($realPath);
|
||||
}
|
||||
}
|
||||
|
||||
if($request->wantsJson()) {
|
||||
return response()->json([
|
||||
@@ -386,6 +415,10 @@ class MediaController extends Controller
|
||||
|
||||
$fileName = $request->input('filename', $file->getClientOriginalName());
|
||||
$fileName = Helpers::cleanFileName($fileName);
|
||||
if ($fileName === '') {
|
||||
$extension = strtolower($file->getClientOriginalExtension());
|
||||
$fileName = 'upload' . ($extension !== '' ? '.' . $extension : '');
|
||||
}
|
||||
|
||||
if(($request->has('filestart') || $request->has('fileappend')) && $request->has('filesize')) {
|
||||
$fileSize = $request->get('filesize');
|
||||
@@ -394,7 +427,25 @@ class MediaController extends Controller
|
||||
throw new FileTooLargeException('The file is larger than the maximum size allowed of ' . Helpers::bytesToString($max_size));
|
||||
}
|
||||
|
||||
$tempFilePath = sys_get_temp_dir() . '/chunk-' . Auth::id() . '-' . $fileName;
|
||||
$chunkUploads = session()->get('chunk_uploads', []);
|
||||
$uploadToken = $request->input('upload_token');
|
||||
|
||||
if($request->has('filestart')) {
|
||||
$uploadToken = bin2hex(random_bytes(16));
|
||||
$tempFilePath = tempnam(sys_get_temp_dir(), 'chunk-' . Auth::id() . '-');
|
||||
if($tempFilePath === false) {
|
||||
throw new FileInvalidException('Unable to create a temporary upload file.');
|
||||
}
|
||||
|
||||
$chunkUploads[$uploadToken] = $tempFilePath;
|
||||
session()->put('chunk_uploads', $chunkUploads);
|
||||
} else {
|
||||
if(!is_string($uploadToken) || !isset($chunkUploads[$uploadToken])) {
|
||||
throw new FileInvalidException('Invalid upload token.');
|
||||
}
|
||||
|
||||
$tempFilePath = $chunkUploads[$uploadToken];
|
||||
}
|
||||
|
||||
$filemode = 'a';
|
||||
if($request->has('filestart')) {
|
||||
@@ -415,9 +466,17 @@ class MediaController extends Controller
|
||||
$fileMime = 'application/octet-stream';
|
||||
}
|
||||
|
||||
if(is_string($uploadToken) && isset($chunkUploads[$uploadToken])) {
|
||||
unset($chunkUploads[$uploadToken]);
|
||||
session()->put('chunk_uploads', $chunkUploads);
|
||||
}
|
||||
|
||||
return new UploadedFile($tempFilePath, $fileName, $fileMime, null, true);
|
||||
} else {
|
||||
return true;
|
||||
return [
|
||||
'chunk' => true,
|
||||
'token' => $uploadToken,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
"keywords": ["laravel", "framework"],
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^8.2",
|
||||
"php": "^8.4",
|
||||
"ext-imagick": "*",
|
||||
"chillerlan/php-qrcode": "^5.0",
|
||||
"gehrisandro/tailwind-merge-laravel": "^1.2",
|
||||
"intervention/image": "^3.5",
|
||||
"laravel/framework": "^12.0",
|
||||
"laravel/tinker": "^2.9",
|
||||
"livewire/livewire": "^3.4",
|
||||
"livewire/livewire": "^4.1",
|
||||
"php-ffmpeg/php-ffmpeg": "^1.2",
|
||||
"robthree/twofactorauth": "^3.0"
|
||||
},
|
||||
@@ -22,7 +22,7 @@
|
||||
"laravel/pint": "^1.13",
|
||||
"laravel/sail": "^1.26",
|
||||
"mockery/mockery": "^1.6",
|
||||
"phpunit/phpunit": "^10.5",
|
||||
"phpunit/phpunit": "^12.5",
|
||||
"spatie/laravel-ignition": "^2.4"
|
||||
},
|
||||
"autoload": {
|
||||
@@ -52,6 +52,12 @@
|
||||
"@php artisan key:generate --ansi",
|
||||
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
|
||||
"@php artisan migrate --graceful --ansi"
|
||||
],
|
||||
"pint": [
|
||||
"./vendor/bin/pint"
|
||||
],
|
||||
"pint-test": [
|
||||
"./vendor/bin/pint --test"
|
||||
]
|
||||
},
|
||||
"extra": {
|
||||
@@ -60,6 +66,9 @@
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "8.4.17"
|
||||
},
|
||||
"optimize-autoloader": true,
|
||||
"preferred-install": "dist",
|
||||
"sort-packages": true,
|
||||
|
||||
1309
composer.lock
generated
1309
composer.lock
generated
File diff suppressed because it is too large
Load Diff
922
package-lock.json
generated
922
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
33
package.json
33
package.json
@@ -3,28 +3,29 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build"
|
||||
"build": "vite build",
|
||||
"snyk:test": "snyk test --all-projects --exclude=vendor"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/vite": "^4.1.17",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"axios": "^1.6.4",
|
||||
"laravel-vite-plugin": "^1.0",
|
||||
"autoprefixer": "^10.4.24",
|
||||
"axios": "^1.13.4",
|
||||
"laravel-vite-plugin": "^2.0.1",
|
||||
"postcss": "^8.4.38",
|
||||
"vite": "^6.4"
|
||||
"vite": "^7.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tiptap/core": "^2.3.0",
|
||||
"@tiptap/extension-highlight": "^2.3.0",
|
||||
"@tiptap/extension-image": "^2.3.0",
|
||||
"@tiptap/extension-link": "^2.3.0",
|
||||
"@tiptap/extension-subscript": "^2.3.0",
|
||||
"@tiptap/extension-superscript": "^2.3.0",
|
||||
"@tiptap/extension-text-align": "^2.3.0",
|
||||
"@tiptap/extension-typography": "^2.3.0",
|
||||
"@tiptap/extension-underline": "^2.3.0",
|
||||
"@tiptap/pm": "^2.3.0",
|
||||
"@tiptap/starter-kit": "^2.3.0",
|
||||
"@tiptap/core": "^3.10.7",
|
||||
"@tiptap/extension-highlight": "^3.18.0",
|
||||
"@tiptap/extension-image": "^3.18.0",
|
||||
"@tiptap/extension-link": "^3.18.0",
|
||||
"@tiptap/extension-subscript": "^3.18.0",
|
||||
"@tiptap/extension-superscript": "^3.18.0",
|
||||
"@tiptap/extension-text-align": "^3.18.0",
|
||||
"@tiptap/extension-typography": "^3.18.0",
|
||||
"@tiptap/extension-underline": "^3.18.0",
|
||||
"@tiptap/pm": "^3.10.7",
|
||||
"@tiptap/starter-kit": "^3.18.0",
|
||||
"tailwindcss": "^4.1.17"
|
||||
}
|
||||
}
|
||||
|
||||
8
pint.json
Normal file
8
pint.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"preset": "laravel",
|
||||
"rules": {
|
||||
"simplified_null_return": true,
|
||||
"new_with_braces": true,
|
||||
"no_unused_imports": true
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,26 @@
|
||||
let SM = {
|
||||
redirectIfSafe: (target) => {
|
||||
if (typeof target !== 'string' || target === '') {
|
||||
window.location.assign('/');
|
||||
return;
|
||||
}
|
||||
|
||||
let url;
|
||||
try {
|
||||
url = new URL(target, window.location.origin);
|
||||
} catch (error) {
|
||||
window.location.assign('/');
|
||||
return;
|
||||
}
|
||||
|
||||
if (url.origin !== window.location.origin) {
|
||||
window.location.assign('/');
|
||||
return;
|
||||
}
|
||||
|
||||
window.location.assign(url.href);
|
||||
},
|
||||
|
||||
alert: (title, text, type = 'info') =>{
|
||||
const data = {
|
||||
position: 'top-end',
|
||||
@@ -84,7 +106,7 @@ let SM = {
|
||||
axios.delete(url)
|
||||
.then((response) => {
|
||||
if(response.data.success){
|
||||
window.location.href = response.data.redirect;
|
||||
SM.redirectIfSafe(response.data.redirect);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -136,7 +158,7 @@ let SM = {
|
||||
}
|
||||
}
|
||||
|
||||
const uploadFile = (file, start, title, idx, count) => {
|
||||
const uploadFile = (file, start, title, idx, count, uploadToken = null) => {
|
||||
const showPercentDecimals = (file.size > (1024 * 1024 * 40));
|
||||
const chunkSize = 1024 * 1024 * 2;
|
||||
const end = Math.min(file.size, start + chunkSize);
|
||||
@@ -146,6 +168,9 @@ let SM = {
|
||||
formData.append('file', chunk);
|
||||
formData.append('filename', file.name);
|
||||
formData.append('filesize', file.size);
|
||||
if (uploadToken) {
|
||||
formData.append('upload_token', uploadToken);
|
||||
}
|
||||
|
||||
if (start === 0) {
|
||||
formData.append('filestart', 'true');
|
||||
@@ -183,6 +208,10 @@ let SM = {
|
||||
}
|
||||
}).then((response) => {
|
||||
if (response.status === 200) {
|
||||
if (response.data && response.data.upload_token) {
|
||||
uploadToken = response.data.upload_token;
|
||||
}
|
||||
|
||||
if (end >= file.size) {
|
||||
uploadedFiles.push({ file: file, title: title, data: response.data });
|
||||
|
||||
@@ -205,12 +234,13 @@ let SM = {
|
||||
} else {
|
||||
start = 0;
|
||||
idx += 1;
|
||||
uploadToken = null;
|
||||
}
|
||||
} else {
|
||||
start = end;
|
||||
}
|
||||
|
||||
uploadFile(files[idx], start, titles[idx] || '', idx, files.length);
|
||||
uploadFile(files[idx], start, titles[idx] || '', idx, files.length, uploadToken);
|
||||
} else {
|
||||
showError(response.data.message);
|
||||
}
|
||||
|
||||
8
renovate-config.json
Normal file
8
renovate-config.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"endpoint": "https://git.stemmechanics.com.au/api/v1",
|
||||
"gitAuthor": "Renovate Bot <renovate-bot@stemmechanics.com.au>",
|
||||
"platform": "gitea",
|
||||
"onboardingConfigFileName": "renovate.json",
|
||||
"autodiscover": true,
|
||||
"optimizeForDisabled": true
|
||||
}
|
||||
11
renovate.json
Normal file
11
renovate.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"extends": [
|
||||
"config:base"
|
||||
],
|
||||
"packageRules": [
|
||||
{
|
||||
"updateTypes": ["minor", "patch", "pin", "digest"],
|
||||
"automerge": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import Link from "@tiptap/extension-link";
|
||||
import {Editor} from "@tiptap/core";
|
||||
import StarterKit from "@tiptap/starter-kit";
|
||||
import Underline from "@tiptap/extension-underline";
|
||||
import Highlight from "@tiptap/extension-highlight";
|
||||
import TextAlign from "@tiptap/extension-text-align";
|
||||
import Typography from "@tiptap/extension-typography";
|
||||
@@ -49,12 +50,16 @@ document.addEventListener('alpine:init', () => {
|
||||
editor = new Editor({
|
||||
element: this.$refs.element,
|
||||
extensions: [
|
||||
StarterKit,
|
||||
StarterKit.configure({
|
||||
link: false,
|
||||
underline: false,
|
||||
}),
|
||||
Highlight,
|
||||
CustomLink.configure({
|
||||
rel: 'noopener noreferrer',
|
||||
openOnClick: 'whenNotEditable',
|
||||
}),
|
||||
Underline,
|
||||
TextAlign.configure({
|
||||
types: ['heading', 'paragraph', 'small', 'extraSmall'],
|
||||
}),
|
||||
@@ -65,6 +70,11 @@ document.addEventListener('alpine:init', () => {
|
||||
ExtraSmall,
|
||||
Box
|
||||
],
|
||||
editorProps: {
|
||||
attributes: {
|
||||
class: 'tiptap content',
|
||||
},
|
||||
},
|
||||
content: content,
|
||||
onCreate({/* editor */}) {
|
||||
_this.updatedAt = Date.now()
|
||||
@@ -141,6 +151,9 @@ document.addEventListener('alpine:init', () => {
|
||||
unsetAllMarks() {
|
||||
editor.chain().focus().unsetAllMarks().run()
|
||||
},
|
||||
clearNodes() {
|
||||
editor.chain().focus().clearNodes().run()
|
||||
},
|
||||
clearNotes() {
|
||||
editor.chain().focus().clearNodes().run()
|
||||
},
|
||||
|
||||
19
resources/views/components/on-holiday.blade.php
Normal file
19
resources/views/components/on-holiday.blade.php
Normal file
@@ -0,0 +1,19 @@
|
||||
@props(['item' => 'results', 'search', 'message', 'title'])
|
||||
|
||||
@php
|
||||
if(!isset($message)) {
|
||||
if(!isset($search) || $search == '')
|
||||
$message = "We couldn't find any $item";
|
||||
else
|
||||
$message = "We couldn't find any $item matching \"$search\"";
|
||||
}
|
||||
|
||||
if(!isset($title)) {
|
||||
$title = "No results found";
|
||||
}
|
||||
@endphp
|
||||
|
||||
<div class="flex flex-col items-center my-8 w-full">
|
||||
<i class="text-gray-300 mb-6 text-8xl fa-solid fa-cat"></i>
|
||||
<p class="text-gray-500 mt-2">No workshops coming up. We’re on a short break, mostly by playing with the cat.</p>
|
||||
</div>
|
||||
@@ -36,7 +36,7 @@
|
||||
imgElement.src = details.thumbnail;
|
||||
|
||||
imgElement.classList.remove('hidden');
|
||||
placeholderElement.classList.add('hidden');
|
||||
placeholderElement.classList.add('hidden!');
|
||||
|
||||
document.getElementById(name).value = value;
|
||||
});
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<x-container>
|
||||
<h2 class="text-2xl font-bold mb-6">Upcoming workshops</h2>
|
||||
@if($workshops->isEmpty())
|
||||
<x-none-found item="workshops" message="No workshops have been scheduled at this time" title="" />
|
||||
<x-on-holiday />
|
||||
@else
|
||||
<div class="grid md:grid-cols-2 lg:grid-cols-3 gap-8 w-full">
|
||||
@foreach($workshops as $index => $workshop)
|
||||
|
||||
Reference in New Issue
Block a user