From eeeef4e901396e34c7a96e2062135a07fb1fb68d Mon Sep 17 00:00:00 2001 From: Seph Date: Sat, 2 Nov 2024 20:53:15 +0100 Subject: [PATCH] SKS-Order fix --- package-lock.json | 28 +++++++++++++++++----------- tailwind/tailwind.config.js | 6 ++++-- theme/pages/sks.php | 4 ++-- theme/wowpress/Models/SKSHistory.php | 4 ++-- 4 files changed, 25 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index a3d7c11..09d10c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,7 @@ "requires": true, "packages": { "": { + "name": "WowPress-Tailwind", "dependencies": { "alpinejs": "^3.13.8" }, @@ -1054,12 +1055,13 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, + "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -1873,10 +1875,11 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, + "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" }, @@ -2444,6 +2447,7 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.12.0" } @@ -2811,12 +2815,13 @@ } }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, + "license": "MIT", "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -4446,6 +4451,7 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, + "license": "MIT", "dependencies": { "is-number": "^7.0.0" }, diff --git a/tailwind/tailwind.config.js b/tailwind/tailwind.config.js index 3f11032..e23ef99 100644 --- a/tailwind/tailwind.config.js +++ b/tailwind/tailwind.config.js @@ -1,7 +1,9 @@ // Set the Preflight flag based on the build target. const includePreflight = 'editor' === process.env._TW_TARGET ? false : true; -import themejson from '@_tw/themejson'; import plugin from 'tailwindcss/plugin'; +import themejson from '@_tw/themejson'; + +const themecolors = themejson().config.theme.extend.colors; module.exports = { presets: [ @@ -36,7 +38,7 @@ module.exports = { plugin(function ({ theme, addUtilities }) { const colorUtilities = {}; const colors = theme('colors'); - const themecolors = themejson().config.theme.extend.colors; + // const themecolors = themejson.config.theme.extend.colors; for (const color in themecolors) { colorUtilities[`.btn-${color}`] = { '--btn-color': themecolors[color] diff --git a/theme/pages/sks.php b/theme/pages/sks.php index 24dcac2..2cea5b4 100644 --- a/theme/pages/sks.php +++ b/theme/pages/sks.php @@ -45,7 +45,7 @@ if (empty($GLOBALS['wowpress']['liste'])): getNextList()): @@ -56,7 +56,7 @@ if (empty($GLOBALS['wowpress']['liste'])): diff --git a/theme/wowpress/Models/SKSHistory.php b/theme/wowpress/Models/SKSHistory.php index 628ba0d..ea66e04 100644 --- a/theme/wowpress/Models/SKSHistory.php +++ b/theme/wowpress/Models/SKSHistory.php @@ -205,12 +205,12 @@ class SKSHistory extends Model public function getPreviousList() { - return SKSHistory::where('list_name', $this->list_name)->whereNot('active')->where('created_at', '<', $this->created_at)->latest()->first(); + return SKSHistory::where('list_name', $this->list_name)->whereNot('active')->where('created_at', '<', $this->created_at)->orderBy('updated_at','DESC')->first(); } public function getNextList() { - return SKSHistory::where('list_name', $this->list_name)->whereNot('active')->where('created_at', '>', $this->created_at)->first(); + return SKSHistory::where('list_name', $this->list_name)->whereNot('active')->where('created_at', '>', $this->created_at)->orderBy('updated_at','DESC')->first(); } public function undo()