Skip to content

Commit

Permalink
Fix null path bug
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobFitzp committed Sep 19, 2024
1 parent 08782b6 commit 74b0362
Show file tree
Hide file tree
Showing 6 changed files with 142,434 additions and 10 deletions.
2 changes: 2 additions & 0 deletions config/nova-canvas.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@
'images' => [
// The endpoint used for handling image uploads.
'endpoint' => '/nova-vendor/jacobfitzp/nova-canvas/upload',
// The default storage path to use.
'path' => 'nova-canvas',
],
];
20 changes: 19 additions & 1 deletion dist/css/field.css
Original file line number Diff line number Diff line change
@@ -1 +1,19 @@
.form-input.form-input--top{border-bottom:0!important;border-bottom-left-radius:0;border-bottom-right-radius:0}.form-input.form-input--bottom{border-top-left-radius:0;border-top-right-radius:0}.nova-canvas--disabled{cursor:not-allowed}.nova-canvas .format-dropdown:disabled{opacity:50%}.nova-canvas .format-dropdown:focus{outline-color:rgba(var(--colors-primary-600))}
.form-input.form-input--top {
border-bottom: 0 !important;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
.form-input.form-input--bottom {
border-top-left-radius: 0;
border-top-right-radius: 0;
}

.nova-canvas--disabled {
cursor: not-allowed;
}
.nova-canvas .format-dropdown:disabled {
opacity: 50%;
}
.nova-canvas .format-dropdown:focus {
outline-color: rgba(var(--colors-primary-600));
}
142,409 changes: 142,407 additions & 2 deletions dist/js/field.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"@vue/compiler-sfc": "^3.2.22",
"form-backend-validation": "^2.3.3",
"laravel-mix": "^6.0.41",
"lodash": "^4.17.21",
"postcss": "^8.3.11",
"resolve-url-loader": "^5.0.0",
"sass": "^1.77.8",
Expand All @@ -38,7 +37,9 @@
"@tiptap/pm": "^2.4.0",
"@tiptap/starter-kit": "^2.4.0",
"@tiptap/vue-3": "^2.4.0",
"buffer": "^6.0.3",
"laravel-nova-ui": "^0.4.12",
"lodash": "^4.17.21",
"lowlight": "^3.1.0",
"tippy.js": "^6.3.7",
"tiptap-extension-upload-image": "^1.0.1"
Expand Down
1 change: 0 additions & 1 deletion resources/js/components/Modals/InsertLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
state="danger"
class="mr-3"
>

Remove
</Button>

Expand Down
9 changes: 4 additions & 5 deletions src/Canvas.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public function __construct($name, $attribute = null, callable $resolveCallback
'toolbar' => config('nova-canvas.toolbars.default'),
'disk' => config('nova.storage_disk'),
'endpoint' => config('nova-canvas.images.endpoint'),
'path' => config('nova-canvas.images.path')
]);

parent::__construct($name, $attribute, $resolveCallback);
Expand Down Expand Up @@ -52,12 +53,10 @@ public function toolbar(array|string $options): self
* @param string $path
* @return self
*/
public function disk(string $disk, string $path = '/'): self
public function disk(string $disk, ?string $path = null): self
{
return $this->withMeta([
'disk' => $disk,
'path' => $path,
]);
$path ??= config('nova-canvas.images.path');
return $this->withMeta(['disk' => $disk, 'path' => $path]);
}

/**
Expand Down

0 comments on commit 74b0362

Please sign in to comment.