From ab3707d45bf813a1d51a70c817ea1b9c57c14c40 Mon Sep 17 00:00:00 2001 From: abaicus Date: Fri, 8 Nov 2024 12:41:05 +0200 Subject: [PATCH 1/3] fix: dashboard layout on different screen sizes --- assets/src/dashboard/parts/connected/Sidebar.js | 4 +--- assets/src/dashboard/parts/connected/index.js | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/assets/src/dashboard/parts/connected/Sidebar.js b/assets/src/dashboard/parts/connected/Sidebar.js index 489b1afe..bf28ee6d 100644 --- a/assets/src/dashboard/parts/connected/Sidebar.js +++ b/assets/src/dashboard/parts/connected/Sidebar.js @@ -41,9 +41,7 @@ const Sidebar = () => { }); return ( -
+
-
+
+
{ 'dashboard' === tab && } @@ -171,7 +171,7 @@ const ConnectedLayout = ({
- +
); }; From c74b9f6d53ec556cd76a26cbd26e9907516061d3 Mon Sep 17 00:00:00 2001 From: abaicus Date: Fri, 8 Nov 2024 12:42:53 +0200 Subject: [PATCH 2/3] chore: enable hot-reloading on dashboard JS watch --- package.json | 2 +- wp-scripts.config.js | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 wp-scripts.config.js diff --git a/package.json b/package.json index 14d368da..da089b23 100755 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ }, "scripts": { "build:dashboard": "wp-scripts build assets/src/dashboard/index.js --output-path=assets/build/dashboard", - "dev:dashboard": "wp-scripts start assets/src/dashboard/index.js --output-path=assets/build/dashboard", + "dev:dashboard": "wp-scripts start assets/src/dashboard/index.js --output-path=assets/build/dashboard --hot --allowed-hosts all", "build-dev:dashboard": "NODE_ENV=development wp-scripts build assets/src/dashboard/index.js --output-path=assets/build/dashboard", "build:media": "wp-scripts build assets/src/media/*.js --output-path=assets/build/media", "dev:media": "wp-scripts start assets/src/media/*.js --output-path=assets/build/media", diff --git a/wp-scripts.config.js b/wp-scripts.config.js new file mode 100644 index 00000000..20bbd33c --- /dev/null +++ b/wp-scripts.config.js @@ -0,0 +1,40 @@ +// wp-scripts.config.js +const defaultConfig = require( '@wordpress/scripts/config/webpack.config' ); + +module.exports = { + ...defaultConfig, + devServer: { + ...defaultConfig.devServer, + allowedHosts: [ 'all', '.test' ], + headers: { + 'Access-Control-Allow-Origin': '*', + 'Access-Control-Allow-Methods': 'GET, POST, PUT, DELETE, PATCH, OPTIONS', + 'Access-Control-Allow-Headers': 'X-Requested-With, content-type, Authorization' + }, + host: '0.0.0.0', + port: 8887, + hot: true, + https: true, + client: { + webSocketURL: 'wss://localhost:8887/ws', + overlay: true + }, + setupMiddlewares: ( middlewares, devServer ) => { + if ( ! devServer ) { + throw new Error( 'webpack-dev-server is not defined' ); + } + + // Add CORS headers to all responses + devServer.app.use( ( req, res, next ) => { + res.header( 'Access-Control-Allow-Origin', '*' ); + next(); + }); + + return middlewares; + } + }, + watchOptions: { + ignored: /node_modules/, + aggregateTimeout: 300 + } +}; From 43b63e956d224e0b3ace32865749912948ea5274 Mon Sep 17 00:00:00 2001 From: abaicus Date: Fri, 8 Nov 2024 13:22:29 +0200 Subject: [PATCH 3/3] feat: adds black friday banners --- assets/img/bf-bg.jpg | Bin 0 -> 13111 bytes .../parts/components/BlackFridayBanner.js | 62 ++++++++++++++++++ .../src/dashboard/parts/connected/Sidebar.js | 54 ++++++++------- assets/src/dashboard/parts/connected/index.js | 3 + assets/src/dashboard/utils/api.js | 22 +++++++ inc/admin.php | 59 +++++++++++++++++ inc/rest.php | 46 +++++++++++++ tailwind.config.js | 4 +- 8 files changed, 226 insertions(+), 24 deletions(-) create mode 100644 assets/img/bf-bg.jpg create mode 100644 assets/src/dashboard/parts/components/BlackFridayBanner.js diff --git a/assets/img/bf-bg.jpg b/assets/img/bf-bg.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6f273bebb65854d1fa56ffce247d6f7ae1beb066 GIT binary patch literal 13111 zcmbt)2{@E-+wUNIkt`uhMfN?igh_=ElRfK1#E?W}%S;=}nk`w!+K^?CC5e%JZL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oV!U8!UnWH z?aw5HC{PFO-ZcU^D{nco9dqOSWzR1KO%p#kBGI~;|R-ujV0ut z+Y{Z%(Mk&gYsEFT)78dQ#jlW%K&?4cL%rc$D_e@9VStg}D96gyK@#&pC!lDxiw46R zJhe1{@!3T51&)~wAn%AppEv2gk&&pO=->)L*8_$Xnqgj-Y?s|NNE?uqgcZFb##C5y z=`JwzLv80x)BaG-5)ZP2=Z`@=K;TtXD>IHL+?W^#=`SXv9;BWRnDmUrK4l@;@jMdi zN5JPWf~_wPVO)0MRzi3cD@6ev%6iNBpG{omDQsoxhOzIqMO(?At+S5(YOP@Ind^0@WJ`Ph zP@Mv~P9aA5-+g^Zx;a*s1Xt`7$!CFYh}AVx<6BT%_?8cg$q#DWEh0a&4VYRKk^C}m zFZL39Je^isE&YtonW#@F#a%p`rO{H?>npA&)DzwAocCVywSBeqmvlJnm(j%6gt|@p zrl$EJ!&Wk=vcB%y%X1ml+6-8u3fYf2T9D z|4Kai=e&1|Pohuwv3z>HXlnHMk+SIuW^K#y=1?NM1pQUhSYYDr_w)4X^CP|}TAk{F zhQ54Ilu~k{>83nRe}1foT26(Yr-teC#R*E_UOBzbM7)o>SMOc{;SEP<_&m*Lk#fZkDi7>9`IcGx=h zoRAeCP<)mA&EJ5nS+S9(t+qe^$XzAWKot3;N_MshLK9&iG>GOFVgT61lYCNZViEZ> z9e{oHk2M~HZ{E$ob}&!nS3-mm74+MHLu#QG5&_Fj*3v;aUXJWhZ81j!GUI7?chZ@? zO4g0|K_eEvA+ghYvZ#%LGiWYZ>Fub5{DMZh^%#U zRsV6Ls$(@Q&Z_B?3|T^ { + const { urgency, title, subtitle, cta_link, cta_text, dismiss_key } = optimoleDashboardApp.bf_notices.banner; + const [ isVisible, setIsVisible ] = useState( true ); + const [ shouldRender, setShouldRender ] = useState( true ); + + const onClose = () => { + dismissNotice( dismiss_key, () => { + setIsVisible( false ); + }); + }; + + useEffect( () => { + if ( ! isVisible ) { + const timer = setTimeout( () => { + setShouldRender( false ); + }, 300 ); + return () => clearTimeout( timer ); + } + }, [ isVisible ]); + + const wrapClasses = classNames( + 'relative flex flex-col items-center text-center xl:flex-row gap-5 justify-between xl:items-center bg-black text-white p-5 py-4 pr-7 box-border rounded-lg mt-5 bg-no-repeat transition-all duration-300', + { + 'opacity-0': ! isVisible, + 'opacity-100': isVisible + } + ); + + if ( ! shouldRender ) { + return null; + } + + return ( +
+ + {optimoleDashboardApp?.bf_notices?.sidebar && ( + + + + + )} + +
+

{ optimoleDashboardApp.strings.upgrade.title_long }

+
    + { reasons.map( ( reason, index ) => ( +
  • + + { reason } +
  • + ) ) } +
+ + +
) : (