File tree Expand file tree Collapse file tree 4 files changed +43
-18
lines changed
src/modules/dashboard/pages Expand file tree Collapse file tree 4 files changed +43
-18
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public function __construct() {
5656
5757 $ this ->plugin_prefix = 'aae_notice_ ' ;
5858 add_action ( 'wp_ajax_ ' . $ this ->plugin_prefix . '_dismiss_notice ' , array ( $ this , 'ajax_dismiss_notice ' ) );
59- add_action ( ' admin_notices ' , array ( $ this , ' admin_notices ' ) );
59+
6060 }
6161
6262 /**
Original file line number Diff line number Diff line change @@ -336,6 +336,7 @@ public function enqueue_scripts($hook)
336336 'st_template_domain ' => WCF_TEMPLATE_STARTER_BASE_URL ,
337337 'home_url ' => add_query_arg (['aae-cache ' => 1 ], home_url ('/ ' )),
338338 'template_menu ' => $ this ->get_template_menu_data (),
339+ 'hero ' => defined ('WCF_ADDONS_PRO_VERSION ' ) ? WCF_ADDONS_URL . 'assets/images/hero-banner.jpg ' : 'no ' ,
339340 'video_link ' => array (
340341 'desktop ' => WCF_ADDONS_URL . 'assets/images/halloween-hero-banner-desktop.mp4 ' ,
341342 'mobile ' => WCF_ADDONS_URL . 'assets/images/halloween-hero-banner-mobile.mp4 ' ,
@@ -503,7 +504,7 @@ function () {
503504 */
504505 public function save_settings ()
505506 {
506-
507+
507508 check_ajax_referer ('wcf_admin_nonce ' , 'nonce ' );
508509
509510 if (! current_user_can ('manage_options ' )) {
@@ -532,7 +533,7 @@ public function save_settings()
532533 } else {
533534 update_option ('wcf_extension_dashboardv2 ' , true );
534535 }
535-
536+
536537 $ return_message = array (
537538 'status ' => $ updated ,
538539 'total ' => is_array ($ actives ) ? count ($ actives ) : 0 ,
Original file line number Diff line number Diff line change @@ -11,21 +11,45 @@ import QuickAccess from "@/components/dashboard/QuickAccess";
1111const Dashboard = ( ) => {
1212 return (
1313 < div className = "flex flex-col gap-6" >
14- < div className = "relative" >
15- < video
16- src = { window . innerWidth < 768 ? WCF_ADDONS_ADMIN . video_link . mobile : WCF_ADDONS_ADMIN . video_link . desktop }
17- className = "w-full h-full rounded-[10px]"
18- poster = { HeroBanner }
19- autoPlay
20- loop
21- muted
22- playsInline
23- controls = { false }
24- />
25- < Badge className = "absolute bottom-[10px] left-[6px]" variant = "version" >
26- Ver. { WCF_ADDONS_ADMIN ?. version }
27- </ Badge >
28- </ div >
14+ { WCF_ADDONS_ADMIN . hero !== "no" ? (
15+ < div className = "relative" >
16+ < img
17+ src = { WCF_ADDONS_ADMIN . hero }
18+ className = "w-full h-full rounded-[10px]"
19+ alt = "Banner"
20+ />
21+ < Badge
22+ className = "absolute bottom-[34px] right-[20px]"
23+ variant = "version"
24+ >
25+ Ver. { WCF_ADDONS_ADMIN ?. version }
26+ </ Badge >
27+ </ div >
28+ ) : (
29+ < div className = "relative" >
30+ < video
31+ src = {
32+ window . innerWidth < 768
33+ ? WCF_ADDONS_ADMIN . video_link . mobile
34+ : WCF_ADDONS_ADMIN . video_link . desktop
35+ }
36+ className = "w-full h-full rounded-[10px]"
37+ poster = { HeroBanner }
38+ autoPlay
39+ loop
40+ muted
41+ playsInline
42+ controls = { false }
43+ />
44+ < Badge
45+ className = "absolute bottom-[10px] left-[6px]"
46+ variant = "version"
47+ >
48+ Ver. { WCF_ADDONS_ADMIN ?. version }
49+ </ Badge >
50+ </ div >
51+ ) }
52+
2953 < div className = "mt-2" >
3054 < QuickAccess />
3155 </ div >
You can’t perform that action at this time.
0 commit comments