Skip to content

Commit 48a95af

Browse files
committed
5.5.0
1 parent 68fb474 commit 48a95af

File tree

19 files changed

+132
-132
lines changed

19 files changed

+132
-132
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,5 +170,5 @@
170170
},
171171
"minimum-stability": "dev",
172172
"prefer-stable": true,
173-
"version": "5.4.4"
173+
"version": "5.5.0"
174174
}

config/nova.php

+14-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
11
<?php
22

3-
use Laravel\Nova\Actions\ActionResource;
4-
53
return [
64

5+
/*
6+
|--------------------------------------------------------------------------
7+
| Nova License Key
8+
|--------------------------------------------------------------------------
9+
|
10+
| The following configuration option contains your Nova license key. On
11+
| non-local domains, Nova will verify that the Nova installation has
12+
| a valid license associated with the application's active domain.
13+
|
14+
*/
15+
16+
'license_key' => env('NOVA_LICENSE_KEY'),
17+
718
/*
819
|--------------------------------------------------------------------------
920
| Nova App Name
@@ -172,7 +183,7 @@
172183
*/
173184

174185
'actions' => [
175-
'resource' => ActionResource::class,
186+
'resource' => \Laravel\Nova\Actions\ActionResource::class,
176187
],
177188

178189
/*

package-lock.json

+35-39
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@
4141
"@floating-ui/vue": "^1.1.6",
4242
"@headlessui/vue": "^1.7.23",
4343
"@heroicons/vue": "^2.2.0",
44-
"@inertiajs/vue3": "^2.0.6",
44+
"@inertiajs/vue3": "^2.0.7",
4545
"@popperjs/core": "^2.11.8",
4646
"@vue/compat": "^3.5.13",
4747
"@vueuse/core": "^10.11.1",
4848
"@vueuse/integrations": "^10.11.1",
4949
"autosize": "^4.0.4",
5050
"axios": "^1.8.1",
51-
"chartist": "^1.3.0",
51+
"chartist": "^1.3.1",
5252
"chartist-plugin-tooltips-updated": "^1.0.0",
5353
"codemirror": "^5.65.19",
5454
"colortranslator": "^1.10.2",

public/app.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/mix-manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"/app.js": "/app.js?id=439d8fd311fe1c02920bc95f6015d07d",
2+
"/app.js": "/app.js?id=b683c7f17bf61009ff003bf3f85bb388",
33
"/ui.js": "/ui.js?id=592866a715b1c20b43fff6ca7980b279",
44
"/manifest.js": "/manifest.js?id=3267e5c99fd7b729e2f38ec55b50397d",
55
"/app.css": "/app.css?id=4ac240e9b4c482451bf95d4161751414",

resources/js/components/DefaultField.vue

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
:label-for="fieldLabelFor"
1313
class="space-x-1"
1414
:class="{ 'mb-2': shouldShowHelpText }"
15+
@click.prevent.stop="$emit('focus-form-input')"
1516
>
1617
<span>
1718
{{ fieldLabel }}
@@ -45,6 +46,8 @@ import { HandlesValidationErrors, mapProps } from '@/mixins'
4546
export default {
4647
mixins: [HandlesValidationErrors],
4748
49+
emits: ['focus-form-input'],
50+
4851
props: {
4952
field: { type: Object, required: true },
5053
fieldName: { type: String },

resources/js/components/FilterMenu.vue

-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ export default {
134134
Nova.$emit('clear-filter-values')
135135
136136
setTimeout(() => {
137-
this.$emit('trashed-changed', '')
138137
this.$emit('clear-selected-filters')
139138
}, 500)
140139
},

resources/js/components/Modals/PreviewResourceModal.vue

+8-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<Modal
3-
:show="show"
3+
:show="show && canBePreviewed"
44
@close-via-escape="$emit('close')"
55
role="alertdialog"
66
size="2xl"
@@ -90,6 +90,7 @@ export default {
9090
loading: true,
9191
title: null,
9292
resource: null,
93+
canBePreviewed: false,
9394
}),
9495
9596
async created() {
@@ -113,20 +114,14 @@ export default {
113114
this.title = title
114115
this.resource = resource
115116
this.loading = false
117+
this.canBePreviewed = true
116118
})
117119
.catch(error => {
118-
if (error.response.status >= 500) {
119-
Nova.$emit('error', error.response.data.message)
120-
return
121-
}
122-
123-
if (error.response.status === 404) {
124-
Nova.visit('/404')
125-
return
126-
}
127-
128-
if (error.response.status === 403) {
129-
Nova.visit('/403')
120+
if (
121+
error.response.status >= 500 ||
122+
[403, 404].includes(error.response.status)
123+
) {
124+
Nova.debug(error.response.data.message)
130125
return
131126
}
132127

resources/js/fields/Filter/TextField.vue

-2
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,10 @@ export default {
5151
},
5252
5353
mounted() {
54-
Nova.debug(`Mounting <FilterMenu>`)
5554
Nova.$on('filter-reset', this.setCurrentFilterValue)
5655
},
5756
5857
beforeUnmount() {
59-
Nova.debug(`Unmounting <FilterMenu>`)
6058
Nova.$off('filter-reset', this.setCurrentFilterValue)
6159
},
6260

resources/js/fields/Form/BooleanField.vue

+1-14
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,8 @@
44
:errors="errors"
55
:show-help-text="showHelpText"
66
:full-width-content="fullWidthContent"
7+
@focus-form-input="toggle"
78
>
8-
<template #default="defaultSlotProps">
9-
<FormLabel
10-
class="space-x-1"
11-
:class="{ 'mb-2': defaultSlotProps.hasHelpText }"
12-
@click.prevent.stop="toggle"
13-
>
14-
<span>
15-
{{ defaultSlotProps.label }}
16-
</span>
17-
<span v-if="defaultSlotProps.required" class="text-red-500 text-sm">
18-
{{ __('*') }}
19-
</span>
20-
</FormLabel>
21-
</template>
229
<template #field>
2310
<Checkbox
2411
:disabled="currentlyIsReadonly"

resources/js/mixins/Filterable.js

+30-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export default {
66
filterHasLoaded: false,
77
filterIsActive: false,
88
filtersAreApplied: false,
9+
trashed: '',
910
}),
1011

1112
watch: {
@@ -54,9 +55,12 @@ export default {
5455
})
5556
}
5657

58+
this.trashed = ''
59+
5760
this.pushAfterUpdatingQueryString({
5861
[this.pageParameter]: 1,
5962
[this.filterParameter]: '',
63+
[this.trashedParameter]: '',
6064
})
6165

6266
Nova.$emit('filter-reset')
@@ -74,6 +78,18 @@ export default {
7478
}
7579
},
7680

81+
/**
82+
* Update the trashed constraint for the resource listing.
83+
*
84+
* @param {string} trashedStatus
85+
*/
86+
trashedChanged(trashedStatus) {
87+
this.trashed = trashedStatus
88+
this.pushAfterUpdatingQueryString({
89+
[this.trashedParameter]: this.trashed,
90+
})
91+
},
92+
7793
/**
7894
* Set up filters for the current view.
7995
*
@@ -132,7 +148,20 @@ export default {
132148
* @param {string}
133149
*/
134150
filterParameter() {
135-
return `${this.resourceName}_filter`
151+
return this.viaRelationship
152+
? `${this.viaRelationship}_filter`
153+
: `${this.resourceName}_filter`
154+
},
155+
156+
/**
157+
* Get the name of the trashed constraint query string variable.
158+
*
159+
* @param {string}
160+
*/
161+
trashedParameter() {
162+
return this.viaRelationship
163+
? `${this.viaRelationship}_trashed`
164+
: `${this.resourceName}_trashed`
136165
},
137166

138167
/**

0 commit comments

Comments
 (0)