Skip to content

Commit

Permalink
Merge branch 'master' into vue3
Browse files Browse the repository at this point in the history
# Conflicts:
#	package-lock.json
#	package.json
#	resources/js/components/AddonDetails.vue
#	resources/js/components/SessionExpiry.vue
#	resources/js/components/ToastBus.js
#	resources/js/components/assets/Uploader.vue
#	resources/js/components/collections/Listing.vue
#	resources/js/components/entries/Listing.vue
#	resources/js/components/fieldtypes/assets/AssetsFieldtype.vue
  • Loading branch information
jasonvarga committed Oct 14, 2024
2 parents 133c49a + 741db25 commit ff709ce
Show file tree
Hide file tree
Showing 171 changed files with 2,491 additions and 781 deletions.
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ body:
attributes:
label: Environment
description: |
Details about your environment. Versions of Statamic, PHP, Laravel, any addons that are installed, etc.
(Go ahead and just paste the output of the `php please support:details` command.)
Please paste the *full* output of the `php please support:details` command. It gives us some context about your project.
render: yaml # the format of the command is close to yaml and gets highlighted nicely
validations:
required: true
Expand Down
127 changes: 127 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,132 @@
# Release Notes

## 5.31.0 (2024-10-14)

### What's new
- Dictionary tag [#10885](https://github.com/statamic/cms/issues/10885) by @ryanmitchell
- Make data of password-protected available in the view [#10946](https://github.com/statamic/cms/issues/10946) by @aerni
- Prompt for license when installing starter kit [#10951](https://github.com/statamic/cms/issues/10951) by @duncanmcclean
- Add `taxonomy:count` tag [#10923](https://github.com/statamic/cms/issues/10923) by @aerni

### What's fixed
- Improve UX of rename asset action [#10941](https://github.com/statamic/cms/issues/10941) by @jasonvarga
- Improve UX of rename asset folder action [#10950](https://github.com/statamic/cms/issues/10950) by @duncanmcclean
- Addon `make` commands no longer add to service providers since they are autoloaded [#10942](https://github.com/statamic/cms/issues/10942) by @duncanmcclean
- Tweak `make` command descriptions [#10952](https://github.com/statamic/cms/issues/10952) by @duncanmcclean
- Fix error if submitted password is null [#10945](https://github.com/statamic/cms/issues/10945) by @aerni
- Prevent timeout during `install:eloquent-driver` command [#10955](https://github.com/statamic/cms/issues/10955) by @duncanmcclean
- Fix asset browser history navigation [#10948](https://github.com/statamic/cms/issues/10948) by @daun
- Fix errors in upload queue [#10944](https://github.com/statamic/cms/issues/10944) by @jasonvarga
- Fix error when deleting collections [#10908](https://github.com/statamic/cms/issues/10908) by @duncanmcclean
- Fix ordering search results by date [#10939](https://github.com/statamic/cms/issues/10939) by @duncanmcclean
- Only show the sync/de-synced state for syncable nav fields [#10933](https://github.com/statamic/cms/issues/10933) by @duncanmcclean
- Ensure default values for globals are available in templates [#10909](https://github.com/statamic/cms/issues/10909) by @duncanmcclean
- Handle empty nodes in `bard_text` modifier [#10913](https://github.com/statamic/cms/issues/10913) by @ryanmitchell
- Use directory paths from stache config instead of static paths [#10914](https://github.com/statamic/cms/issues/10914) by @Alpenverein
- Improvements to the `install:eloquent-driver` command [#10910](https://github.com/statamic/cms/issues/10910) by @duncanmcclean
- Check site requested when using global route binding on api routes [#10894](https://github.com/statamic/cms/issues/10894) by @ryanmitchell
- Update "Bug Report" issue template [#10918](https://github.com/statamic/cms/issues/10918) by @duncanmcclean



## 5.30.0 (2024-10-03)

### What's new
- Support scopes as query methods [#5927](https://github.com/statamic/cms/issues/5927) by @aerni

### What's fixed
- Move nocache js back to end of body but make configurable [#10898](https://github.com/statamic/cms/issues/10898) by @jasonvarga
- Fix static cache locking [#10887](https://github.com/statamic/cms/issues/10887) by @duncanmcclean
- Prevent autoloading non-PHP files [#10886](https://github.com/statamic/cms/issues/10886) by @duncanmcclean
- Don't show updates badge count for local/dev installations [#10884](https://github.com/statamic/cms/issues/10884) by @jesseleite
- Update tiptap npm dependencies [#10883](https://github.com/statamic/cms/issues/10883) by @jasonvarga



## 5.29.0 (2024-10-01)

### What's new
- Add reorder() query builder method [#10871](https://github.com/statamic/cms/issues/10871) by @ryanmitchell
- Show toggle UI in conditions builder for revealer fields [#10867](https://github.com/statamic/cms/issues/10867) by @jesseleite
- Autoload addon routes [#10880](https://github.com/statamic/cms/issues/10880) by @duncanmcclean
- Autoload addon dictionaries [#10878](https://github.com/statamic/cms/issues/10878) by @duncanmcclean
- Allow searching by labels in Dictionary fieldtype [#10877](https://github.com/statamic/cms/issues/10877) by @duncanmcclean

### What's fixed
- Improve `AssetFolderPolicy` performance [#10868](https://github.com/statamic/cms/issues/10868) by @jesseleite
- Prevent autoloading addon files causing exception when called early [#10875](https://github.com/statamic/cms/issues/10875) by @ryanmitchell
- Prevent autoloading of abstract classes and interfaces [#10882](https://github.com/statamic/cms/issues/10882) by @duncanmcclean
- Run query scopes after all other query methods so the query can be changed [#10872](https://github.com/statamic/cms/issues/10872) by @ryanmitchell
- Only get relationship createables if can create [#10870](https://github.com/statamic/cms/issues/10870) by @ryanmitchell
- Blink cache Algolia search API calls [#10879](https://github.com/statamic/cms/issues/10879) by @jacksleight
- Increase `trackDirtyStateTimeout` [#10876](https://github.com/statamic/cms/issues/10876) by @jacksleight
- Better timezone dictionary test [#10881](https://github.com/statamic/cms/issues/10881) by @jasonvarga
- Fix duplicate IDs icon [#10864](https://github.com/statamic/cms/issues/10864) by @jesseleite
- French translations [#10861](https://github.com/statamic/cms/issues/10861) by @ebeauchamps
- Dutch translations [#10874](https://github.com/statamic/cms/issues/10874) by @ceesvanegmond
- Dutch translations [#10866](https://github.com/statamic/cms/issues/10866) by @ceesvanegmond



## 5.28.0 (2024-09-30)

### What's new
- Autoload add-on tags, widgets, modifiers etc from folder [#9270](https://github.com/statamic/cms/issues/9270) by @ryanmitchell
- Allow filtering/sorting/paginating with the `form:submissions` tag [#10826](https://github.com/statamic/cms/issues/10826) by @duncanmcclean

### What's fixed
- Fix assets not being uploadable when not using dynamic folders [#10865](https://github.com/statamic/cms/issues/10865) by @jasonvarga
- Fix "Undefined variable $key" error with Marketplace API Client [#10854](https://github.com/statamic/cms/issues/10854) by @duncanmcclean
- Fix false-positive on publish form Action exceptions [#10855](https://github.com/statamic/cms/issues/10855) by @caseydwyer
- Allow make:addon to work for any minimum-stability [#10814](https://github.com/statamic/cms/issues/10814) by @duncanmcclean



## 5.27.0 (2024-09-26)

### What's new
- Dynamic asset folders [#10808](https://github.com/statamic/cms/issues/10808) by @jasonvarga
- Add Nav & Collection Tree Saving events [#10625](https://github.com/statamic/cms/issues/10625) by @ryanmitchell

### What's fixed
- Fix User Accessor in Password Reset [#10848](https://github.com/statamic/cms/issues/10848) by @samharvey44
- Allow for large field configs in filters [#10822](https://github.com/statamic/cms/issues/10822) by @duncanmcclean
- Fix textarea UI bug [#10850](https://github.com/statamic/cms/issues/10850) by @aerni
- Use existing getUrlsCacheKey method instead of duplicating the creation logic [#10836](https://github.com/statamic/cms/issues/10836) by @dadaxr
- Fix issue when using Livewire with full measure static caching [#10306](https://github.com/statamic/cms/issues/10306) by @aerni
- German translations [#10849](https://github.com/statamic/cms/issues/10849) by @helloDanuk
- French translations [#10839](https://github.com/statamic/cms/issues/10839) by @ebeauchamps
- Bump rollup from 3.29.4 to 3.29.5 [#10851](https://github.com/statamic/cms/issues/10851) by @dependabot



## 5.26.0 (2024-09-24)

### What's new
- Improve feedback when action fails [#10264](https://github.com/statamic/cms/issues/10264) by @simonerd
- Add option to exclude flag emojis from countries dictionary [#10817](https://github.com/statamic/cms/issues/10817) by @jasonvarga
- Add entry password protection [#10800](https://github.com/statamic/cms/issues/10800) by @aerni
- Add submitting state for confirmation modal to better visualise a running action [#10699](https://github.com/statamic/cms/issues/10699) by @morhi

### What's fixed
- Fix CP nav ordering for when preferences are stored in JSON SQL columns [#10809](https://github.com/statamic/cms/issues/10809) by @jesseleite
- Fix toasts in actions not being shown [#10828](https://github.com/statamic/cms/issues/10828) by @jasonvarga
- Fix small typo [#10824](https://github.com/statamic/cms/issues/10824) by @1stevengrant
- Improve addons listing [#10812](https://github.com/statamic/cms/issues/10812) by @duncanmcclean
- Prevent concurrent requests to the Marketplace API [#10815](https://github.com/statamic/cms/issues/10815) by @duncanmcclean
- Make limit modifier work with query builders [#10818](https://github.com/statamic/cms/issues/10818) by @aerni
- Hide Visit URL and Live Preview if term has no template [#10789](https://github.com/statamic/cms/issues/10789) by @edalzell
- Set path on asset folder when moving [#10813](https://github.com/statamic/cms/issues/10813) by @jasonvarga
- Reset previous filters when you finish reordering [#10797](https://github.com/statamic/cms/issues/10797) by @duncanmcclean
- Update CSRF token when session expiry login modal is closed [#10794](https://github.com/statamic/cms/issues/10794) by @jasonvarga
- Fix broken state of "Parent" field when saving Home entry with Revisions [#10726](https://github.com/statamic/cms/issues/10726) by @duncanmcclean
- Improve ImageGenerator Exception handling [#10786](https://github.com/statamic/cms/issues/10786) by @indykoning
- When augmenting terms, `entries_count` should only consider published entries [#10727](https://github.com/statamic/cms/issues/10727) by @duncanmcclean
- Prevent saving value of `parent` field to entry data [#10725](https://github.com/statamic/cms/issues/10725) by @duncanmcclean
- Bump vite from 4.5.3 to 4.5.5 [#10810](https://github.com/statamic/cms/issues/10810) by @dependabot



## 5.25.0 (2024-09-10)

### What's new
Expand Down
1 change: 1 addition & 0 deletions config/protect.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
'password' => [
'driver' => 'password',
'allowed' => ['secret'],
'field' => null,
'form_url' => null,
],

Expand Down
2 changes: 2 additions & 0 deletions config/static_caching.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@

'nocache' => 'cache',

'nocache_js_position' => 'body',

/*
|--------------------------------------------------------------------------
| Replacers
Expand Down
2 changes: 1 addition & 1 deletion config/system.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
|--------------------------------------------------------------------------
|
| The license key for the corresponding domain from your Statamic account.
| Without a key entered, your app will considered to be in Trial Mode.
| Without a key entered, your app will be considered to be in Trial Mode.
|
| https://statamic.dev/licensing#trial-mode
|
Expand Down
2 changes: 1 addition & 1 deletion resources/css/components/fieldtypes/assets.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}

.assets-fieldtype .assets-fieldtype-picker {
@apply flex flex-col @sm:flex-row items-start @sm:items-center px-4 py-2 bg-gray-200 dark:bg-dark-650 border dark:border-dark-900 rounded;
@apply flex items-center px-4 py-2 bg-gray-200 dark:bg-dark-650 border dark:border-dark-900 rounded;

&.is-expanded {
@apply border-b-0 rounded-b-none;
Expand Down
2 changes: 1 addition & 1 deletion resources/css/elements/forms.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ select {
========================================================================== */

.input-text {
@apply appearance-none bg-gray-100 text-gray-800 border max-w-full w-full p-2 rounded shadow-inner placeholder:text-gray-600 text-md @lg:text-base;
@apply block appearance-none bg-gray-100 text-gray-800 border max-w-full w-full p-2 rounded shadow-inner placeholder:text-gray-600 text-md @lg:text-base;
@apply dark:bg-dark-650 dark:text-dark-150 dark:border-dark-900 dark:placeholder:text-dark-175 dark:shadow-inner-dark;
transition: border-color .15s ease-in-out,
box-shadow .15s ease-in-out;
Expand Down
78 changes: 37 additions & 41 deletions resources/js/components/AddonDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,48 @@
<div>
<div class="flex items-center mb-6">
<h1 class="flex-1" v-text="addon.name" />
<a :href="addon.url" target="_blank" class="btn rtl:ml-4 ltr:mr-4" v-text="__('View on Marketplace')" />
<button v-if="addon.installed" class="btn" @click="showComposerInstructions" v-text="__('Uninstall')" />
<button v-else class="btn btn-primary" @click="showComposerInstructions" v-text="__('Install')" />
<a :href="addon.url" target="_blank" class="btn">
<svg-icon name="light/external-link" class="w-3 h-3 rtl:ml-2 ltr:mr-2 shrink-0" />
{{ __('View on Marketplace') }}
</a>
</div>
<confirmation-modal
v-model="modalOpen"
:cancellable="false"
:button-text="__('OK')"
@confirm="modalOpen = false"
>
<div class="prose">
<template v-if="addon.installed">
<p v-text="`${__('messages.addon_uninstall_command')}:`" />
<code-block copyable :text="`composer remove ${package}`" />
</template>
<template v-else>
<p v-text="`${__('messages.addon_install_command')}:`" />
<code-block copyable :text="installCommand" />
</template>
<p v-html="link"></p>
<div class="flex flex-col-reverse xl:grid xl:grid-cols-3 space-y-6 xl:space-y-0 gap-6">
<div class="lg:col-span-2">
<div class="card prose max-w-full p-6" v-html="description" />
</div>
</confirmation-modal>
<div>
<div class="card mb-6 flex items-center">
<div class="flex-1 text-lg">
<div class="little-heading p-0 mb-2 text-gray-700" v-text="__('Price')" />
<div class="font-bold" v-text="priceRange" />
<div class="xl:col-span-1 flex flex-col space-y-6">
<div class="card flex flex-col space-y-6 p-6">
<div class="flex-1 text-lg">
<div class="little-heading p-0 mb-2 text-gray-700" v-text="__('Seller')" />
<a :href="addon.seller.website" target="_blank" class="relative flex items-center">
<img :src="addon.seller.avatar" :alt="addon.seller.name" class="rounded-full w-6 rtl:ml-2 ltr:mr-2">
<span class="font-bold">{{ addon.seller.name }}</span>
</a>
</div>
<div class="flex-1 text-lg">
<div class="little-heading p-0 mb-2 text-gray-700" v-text="__('Price')" />
<div class="font-bold" v-text="priceRange" />
</div>
<div class="flex-1 text-lg" v-if="downloads">
<div class="little-heading p-0 mb-2 text-gray-700" v-text="__('Downloads')" />
<div class="font-bold">{{ downloads }}</div>
</div>
</div>
<div class="flex-1 text-lg">
<div class="little-heading p-0 mb-2 text-gray-700" v-text="__('Seller')" />
<a :href="addon.seller.website" class="relative flex items-center">
<img :src="addon.seller.avatar" :alt="addon.seller.name" class="rounded-full w-6 rtl:ml-2 ltr:mr-2">
<span class="font-bold">{{ addon.seller.name }}</span>
</a>
</div>
<div class="flex-1 text-lg" v-if="downloads">
<div class="little-heading p-0 mb-2 text-gray-700" v-text="__('Downloads')" />
<div class="font-bold">{{ downloads }}</div>
<div class="card p-6">
<div class="prose">
<template v-if="addon.installed">
<p class="leading-snug" v-text="`${__('messages.addon_uninstall_command')}:`" />
<code-block class="text-xs" copyable :text="`composer remove ${package}`" />
</template>
<template v-else>
<p v-text="`${__('messages.addon_install_command')}:`" />
<code-block copyable :text="installCommand" />
</template>
<p v-html="link"></p>
</div>
</div>
<addon-editions v-if="addon.editions.length" :addon="addon" />
</div>
<addon-editions v-if="addon.editions.length" :addon="addon" />
<div class="card content p-8" v-html="description" />
</div>
</div>
</template>
Expand Down Expand Up @@ -121,10 +121,6 @@ import AddonEditions from './addons/Editions.vue';
this.downloads = response.data.package.downloads.total;
});
},
showComposerInstructions() {
this.modalOpen = true;
},
}
}
</script>
4 changes: 4 additions & 0 deletions resources/js/components/SessionExpiry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ export default {
}
this.lastCount = moment();
},
isShowingLogin(showing, wasShowing) {
if (showing && !wasShowing) this.updateCsrfToken();
}
},
Expand Down
13 changes: 11 additions & 2 deletions resources/js/components/ToastBus.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,18 @@ class ToastBus {

intercept() {
this.instance.$axios.interceptors.response.use(response => {
const toasts = response?.data?._toasts ?? []
const data = response?.data;

toasts.forEach(toast => this.instance.$toast[toast.type](toast.message, { timeout: toast.duration }))
if (!data) return response;

const promise = data instanceof Blob
? data.text().then(text => JSON.parse(text))
: new Promise(resolve => resolve(data));

promise.then(json => {
const toasts = json._toasts ?? [];
toasts.forEach(toast => this.instance.$toast[toast.type](toast.message, {timeout: toast.duration}))
});

return response;
});
Expand Down
4 changes: 4 additions & 0 deletions resources/js/components/assets/Browser/Browser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,10 @@ export default {
this.loadAssets();
},
selectedPath(selectedPath) {
this.path = selectedPath;
},
parameters(after, before) {
if (this.initializing || JSON.stringify(before) === JSON.stringify(after)) return;
this.loadAssets();
Expand Down
7 changes: 6 additions & 1 deletion resources/js/components/assets/Browser/CreateFolder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<confirmation-modal
name="folder-editor"
:title="modalTitle"
:busy="submitting"
@cancel="cancel"
@confirm="submit"
>
Expand Down Expand Up @@ -42,6 +43,7 @@ export default {
buttonText: __('Create'),
directory: this.initialDirectory,
errors: {},
submitting: false,
}
},
Expand All @@ -59,12 +61,16 @@ export default {
title: this.title
};
this.submitting = true;
this.$axios.post(url, payload).then(response => {
this.$toast.success(__('Folder created'));
this.$emit('created', response.data);
this.directory = this.initialDirectory
}).catch(e => {
this.handleErrors(e);
}).finally(() => {
this.submitting = false;
});
},
Expand All @@ -82,7 +88,6 @@ export default {
},
created() {
this.$keys.bindGlobal('enter', this.submit)
this.$keys.bindGlobal('esc', this.cancel)
},
Expand Down
Loading

0 comments on commit ff709ce

Please sign in to comment.