diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fddc5f7..7a836e7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Retour Changelog +## 5.0.0-beta.3 - 2024.02.09 +### Added +* Added a custom Field icon + +### Fixed +* Added the unused `static` to the Tailwind CSS `blocklist` to avoid a name collision with a Craft CSS class ([#1412](https://github.com/nystudio107/craft-seomatic/issues/1412)) + ## 5.0.0-beta.2 - 2024.02.05 ### Added * Add `phpstan` and `ecs` code linting diff --git a/buildchain/tailwind.config.ts b/buildchain/tailwind.config.ts index 68ecac75..e213afb4 100644 --- a/buildchain/tailwind.config.ts +++ b/buildchain/tailwind.config.ts @@ -4,6 +4,9 @@ export default { '../src/templates/**/*.{twig,html}', './src/vue/**/*.{vue,html}', ], + blocklist: [ + 'static', + ], theme: {}, plugins: [], }; diff --git a/composer.json b/composer.json index 4430bd26..1a9a899c 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "nystudio107/craft-retour", "description": "Retour allows you to intelligently redirect legacy URLs, so that you don't lose SEO value when rebuilding & restructuring a website", "type": "craft-plugin", - "version": "5.0.0-beta.1", + "version": "5.0.0-beta.3", "keywords": [ "craftcms", "craft-plugin", @@ -27,7 +27,7 @@ }, "require": { "php": "^8.0.2", - "craftcms/cms": "^5.0.0-alpha.1", + "craftcms/cms": "^5.0.0-beta.1", "nystudio107/craft-plugin-vite": "^5.0.0-beta.1", "league/csv": "^8.2 || ^9.0", "jean85/pretty-package-versions": "^1.5 || ^2.0" @@ -40,7 +40,8 @@ "scripts": { "phpstan": "phpstan --ansi --memory-limit=1G", "check-cs": "ecs check --ansi", - "fix-cs": "ecs check --fix --ansi" + "fix-cs": "ecs check --fix --ansi", + "test": "codecept run unit --coverage-xml" }, "config": { "allow-plugins": { diff --git a/phpstan.neon b/phpstan.neon index 44554e4f..9ad13081 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,5 @@ includes: - - vendor/craftcms/phpstan/phpstan.neon + - %currentWorkingDirectory%/vendor/craftcms/phpstan/phpstan.neon parameters: level: 5 diff --git a/src/fields/ShortLink.php b/src/fields/ShortLink.php index 4d06f3b8..ad0816bb 100644 --- a/src/fields/ShortLink.php +++ b/src/fields/ShortLink.php @@ -10,7 +10,6 @@ namespace nystudio107\retour\fields; use Craft; -use craft\base\Element; use craft\base\ElementInterface; use craft\base\Field; use craft\base\PreviewableFieldInterface; @@ -29,11 +28,10 @@ */ class ShortLink extends Field implements PreviewableFieldInterface { + protected static bool $allowShortLinkUpdates = true; public string $redirectSrcMatch = 'pathonly'; public int $redirectHttpCode = 301; - protected static bool $allowShortLinkUpdates = true; - // Static Methods // ========================================================================= @@ -45,6 +43,14 @@ public static function displayName(): string return Craft::t('retour', 'Short Link'); } + /** + * @inheritdoc + */ + public static function icon(): string + { + return '@nystudio107/retour/icon-mask.svg'; + } + /** * Prevent element updates from updating the short link redirects. */ diff --git a/src/web/assets/dist/assets/retour-0lLzocvu.css b/src/web/assets/dist/assets/retour-0lLzocvu.css new file mode 100644 index 00000000..bf836949 --- /dev/null +++ b/src/web/assets/dist/assets/retour-0lLzocvu.css @@ -0,0 +1 @@ +div.retour-button-container{display:inline-block;margin-right:10px}table.vuetable{width:100%;table-layout:fixed;overflow:hidden}.retour-menubtn-asc:before{font-weight:700;content:"downangle"}.retour-menubtn-desc:before{font-weight:700;content:"upangle"}table.retour-dashboard th.vuetable-th-checkbox-id{width:3%!important}table.retour-dashboard th.vuetable-th-redirectSrcUrl{width:34%!important}th.vuetable-th-referrerUrl{width:20%!important}th.vuetable-th-remoteIp{width:14%!important}th.vuetable-th-hitCount{width:8%!important;text-align:right!important}th.vuetable-th-hitLastTime{width:16%!important}th.vuetable-th-handledByRetour{width:12%!important}th.vuetable-th-addLink,table.retour-redirects th.vuetable-th-checkbox-id{width:3%!important}table.retour-redirects th.vuetable-th-redirectSrcUrl{width:28%!important}th.vuetable-th-redirectDestUrl{width:22%!important}th.vuetable-th-redirectMatchType{width:10%!important}th.vuetable-th-priority{width:8%!important;text-align:right!important}th.vuetable-th-siteName{width:10%!important}th.vuetable-th-redirectHttpCode{width:7%!important}td.text-center,th.text-center{text-align:center!important}td.text-right,th.text-right{text-align:right!important}.absolute{position:absolute}.relative{position:relative}.float-right{float:right}.mx-2{margin-left:.5rem;margin-right:.5rem}.mb-4{margin-bottom:1rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.hidden{display:none}.w-full{width:100%}.flex-shrink{flex-shrink:1}.flex-grow{flex-grow:1}.items-start{align-items:flex-start}.overflow-hidden{overflow:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.border-solid{border-style:solid}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pl-3{padding-left:.75rem}.pt-3{padding-top:.75rem}.align-bottom{vertical-align:bottom}.leading-tight{line-height:1.25}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.retour-import-list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd;cursor:move}.retour-import-field-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd;cursor:arrow}.retour-import-arrow-item{position:relative;display:block;padding:11px 15px}.retour-import-drag-area{min-height:100px}.retour-empty-item{background:repeating-linear-gradient(-55deg,#ddd,#ddd 10px,#eee 10px,#eee 20px)}.retour-inputfile{width:.1px;height:.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1}.retour-reset:before{padding-bottom:4px} diff --git a/src/web/assets/dist/assets/retour-0lLzocvu.css.gz b/src/web/assets/dist/assets/retour-0lLzocvu.css.gz new file mode 100644 index 00000000..7b0700f8 Binary files /dev/null and b/src/web/assets/dist/assets/retour-0lLzocvu.css.gz differ diff --git a/src/web/assets/dist/assets/retour-GsbkZ0RI.js b/src/web/assets/dist/assets/retour-GsbkZ0RI.js deleted file mode 100644 index 096dc2ef..00000000 --- a/src/web/assets/dist/assets/retour-GsbkZ0RI.js +++ /dev/null @@ -1,2 +0,0 @@ - -//# sourceMappingURL=retour-GsbkZ0RI.js.map diff --git a/src/web/assets/dist/assets/retour-GsbkZ0RI.js.map b/src/web/assets/dist/assets/retour-GsbkZ0RI.js.map deleted file mode 100644 index 9e8c1030..00000000 --- a/src/web/assets/dist/assets/retour-GsbkZ0RI.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"retour-GsbkZ0RI.js","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/src/web/assets/dist/assets/retour-axBeLE34.css b/src/web/assets/dist/assets/retour-axBeLE34.css deleted file mode 100644 index ae14c752..00000000 --- a/src/web/assets/dist/assets/retour-axBeLE34.css +++ /dev/null @@ -1 +0,0 @@ -div.retour-button-container{display:inline-block;margin-right:10px}table.vuetable{width:100%;table-layout:fixed;overflow:hidden}.retour-menubtn-asc:before{font-weight:700;content:"downangle"}.retour-menubtn-desc:before{font-weight:700;content:"upangle"}table.retour-dashboard th.vuetable-th-checkbox-id{width:3%!important}table.retour-dashboard th.vuetable-th-redirectSrcUrl{width:34%!important}th.vuetable-th-referrerUrl{width:20%!important}th.vuetable-th-remoteIp{width:14%!important}th.vuetable-th-hitCount{width:8%!important;text-align:right!important}th.vuetable-th-hitLastTime{width:16%!important}th.vuetable-th-handledByRetour{width:12%!important}th.vuetable-th-addLink,table.retour-redirects th.vuetable-th-checkbox-id{width:3%!important}table.retour-redirects th.vuetable-th-redirectSrcUrl{width:28%!important}th.vuetable-th-redirectDestUrl{width:22%!important}th.vuetable-th-redirectMatchType{width:10%!important}th.vuetable-th-priority{width:8%!important;text-align:right!important}th.vuetable-th-siteName{width:10%!important}th.vuetable-th-redirectHttpCode{width:7%!important}td.text-center,th.text-center{text-align:center!important}td.text-right,th.text-right{text-align:right!important}.static{position:static}.absolute{position:absolute}.relative{position:relative}.float-right{float:right}.mx-2{margin-left:.5rem;margin-right:.5rem}.mb-4{margin-bottom:1rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.hidden{display:none}.w-full{width:100%}.flex-shrink{flex-shrink:1}.flex-grow{flex-grow:1}.items-start{align-items:flex-start}.overflow-hidden{overflow:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.border-solid{border-style:solid}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pl-3{padding-left:.75rem}.pt-3{padding-top:.75rem}.align-bottom{vertical-align:bottom}.leading-tight{line-height:1.25}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.retour-import-list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd;cursor:move}.retour-import-field-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd;cursor:arrow}.retour-import-arrow-item{position:relative;display:block;padding:11px 15px}.retour-import-drag-area{min-height:100px}.retour-empty-item{background:repeating-linear-gradient(-55deg,#ddd,#ddd 10px,#eee 10px,#eee 20px)}.retour-inputfile{width:.1px;height:.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1}.retour-reset:before{padding-bottom:4px} diff --git a/src/web/assets/dist/assets/retour-axBeLE34.css.gz b/src/web/assets/dist/assets/retour-axBeLE34.css.gz deleted file mode 100644 index 5fe2ebc5..00000000 Binary files a/src/web/assets/dist/assets/retour-axBeLE34.css.gz and /dev/null differ diff --git a/src/web/assets/dist/assets/retour-mao8V0mm.js b/src/web/assets/dist/assets/retour-mao8V0mm.js new file mode 100644 index 00000000..9133f301 --- /dev/null +++ b/src/web/assets/dist/assets/retour-mao8V0mm.js @@ -0,0 +1,2 @@ + +//# sourceMappingURL=retour-mao8V0mm.js.map diff --git a/src/web/assets/dist/assets/retour-mao8V0mm.js.map b/src/web/assets/dist/assets/retour-mao8V0mm.js.map new file mode 100644 index 00000000..5812f918 --- /dev/null +++ b/src/web/assets/dist/assets/retour-mao8V0mm.js.map @@ -0,0 +1 @@ +{"version":3,"file":"retour-mao8V0mm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""} \ No newline at end of file diff --git a/src/web/assets/dist/manifest.json b/src/web/assets/dist/manifest.json index f0f91d6c..256ceb45 100644 --- a/src/web/assets/dist/manifest.json +++ b/src/web/assets/dist/manifest.json @@ -57,9 +57,9 @@ }, "src/js/Retour.js": { "css": [ - "assets/retour-axBeLE34.css" + "assets/retour-0lLzocvu.css" ], - "file": "assets/retour-GsbkZ0RI.js", + "file": "assets/retour-mao8V0mm.js", "isEntry": true, "src": "src/js/Retour.js" }, diff --git a/src/web/assets/dist/manifest.json.gz b/src/web/assets/dist/manifest.json.gz index 326bcf10..28ee182f 100644 Binary files a/src/web/assets/dist/manifest.json.gz and b/src/web/assets/dist/manifest.json.gz differ diff --git a/src/web/assets/dist/stats.html b/src/web/assets/dist/stats.html index d4dcb3be..d9a5d20c 100644 --- a/src/web/assets/dist/stats.html +++ b/src/web/assets/dist/stats.html @@ -4822,7 +4822,7 @@