PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.5
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.5
1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 trunk All 48 releases
← All changes | app/Views/admin/admin_menu.php +49 -10 1.3.26 → 1.6.5 View file →
@@ -1,14 +1,17 @@
1 1 <?php if ( ! defined( 'ABSPATH' ) ) exit; ?>
2 2 <?php
3 3
4 +use FluentCart\App\App;
4 5 use FluentCart\App\Services\Permission\PermissionManager;
5 -use FluentCart\App\Vite;
6 6
7 -$darkLogo = Vite::getAssetUrl('images/logo/logo-full.svg');
8 -$lightLogo = Vite::getAssetUrl('images/logo/logo-full-dark.svg');
7 +// Inline SVGs render immediately with the HTML — no network request, no load blink.
8 +$logoDir = App::isDevMode()
9 + ? FLUENTCART_PLUGIN_PATH . 'resources/images/logo/'
10 + : FLUENTCART_PLUGIN_PATH . 'assets/images/logo/';
11 +$lightLogoSvg = file_get_contents($logoDir . 'logo-full-dark.svg');
12 +$darkLogoSvg = file_get_contents($logoDir . 'logo-full.svg');
9 13
10 -
11 14 ?>
12 15 <div class="fct_admin_menu_wrap fct_global_menu_wrap">
13 16 <div class="fct_admin_menu_row">
14 17 <div class="fct_admin_logo_wrap">
@@ -14,12 +17,10 @@
14 17 <div class="fct_admin_logo_wrap">
15 18 <a aria-label="<?php echo esc_html__('FluentCart Logo', 'fluent-cart'); ?>"
16 19 title="<?php echo esc_html__('FluentCart Logo', 'fluent-cart'); ?>"
17 20 href="<?php echo esc_url(admin_url('admin.php?page=fluent-cart#/')); ?>">
18 - <img class="block dark:hidden" src="<?php echo esc_url($lightLogo); ?>"
19 - alt="<?php echo esc_html__('FluentCart Logo', 'fluent-cart'); ?>"/>
20 - <img class="hidden dark:block" src="<?php echo esc_url($darkLogo); ?>"
21 - alt="<?php echo esc_html__('FluentCart Logo', 'fluent-cart'); ?>"/>
21 + <span class="logo-light"><?php echo $lightLogoSvg; ?></span>
22 + <span class="logo-dark"><?php echo $darkLogoSvg; ?></span>
22 23 </a>
23 24 </div><!-- .fct_admin_logo_wrap -->
24 25
25 26 <div class="fct_admin_menu">
@@ -84,11 +85,49 @@
84 85 </ul>
85 86 </div>
86 87
87 88 <div class="fct_admin_menu_actions">
88 - <div id="fct_admin_menu_search"></div>
89 + <!-- Pre-rendered so the search button is visible from first paint.
90 + Click delegates to window.fluentCart.openSearch() once Vue mounts. -->
91 + <div id="fct_admin_menu_search">
92 + <div class="fct-global-search-input-wrap">
93 + <button type="button" class="fct-setting-search-button" aria-label="<?php echo esc_attr__('Search', 'fluent-cart'); ?>"
94 + onclick="window.fluentCart?.openSearch?.()">
95 + <span class="fct-setting-search-icon">
96 + <div class="icon">
97 + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none">
98 + <path d="M14.5833 14.5833L18.3333 18.3333" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
99 + <path d="M16.6667 9.16666C16.6667 5.02452 13.3089 1.66666 9.16675 1.66666C5.02461 1.66666 1.66675 5.02452 1.66675 9.16666C1.66675 13.3088 5.02461 16.6667 9.16675 16.6667C13.3089 16.6667 16.6667 13.3088 16.6667 9.16666Z" stroke="currentColor" stroke-width="1.5" stroke-linejoin="round"/>
100 + </svg>
101 + </div>
102 + </span>
103 + <span class="fct-global-search-button-keys">
104 + <kbd class="fct-global-search-button-key">/</kbd>
105 + </span>
106 + </button>
107 + </div>
108 + </div>
89 109 <div class="fct_admin_menu_button_wrap">
90 - <div id="theme-button-container"></div>
110 + <!-- Pre-rendered so the correct icon is visible from first paint.
111 + data-fct-theme on <html> (set by the inline head script) drives
112 + which icon span is visible via CSS. Vue teleport or vanilla JS
113 + attach handlers after load without rebuilding the button. -->
114 + <div id="theme-button-container">
115 + <div class="fct-theme-button-container">
116 + <button class="theme-selected-button" type="button" aria-haspopup="true"
117 + aria-label="<?php echo esc_attr__('Toggle color theme', 'fluent-cart'); ?>">
118 + <span class="fct-theme-icon fct-theme-icon--light">
119 + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none"><path d="M10 14.5C8.80653 14.5 7.66193 14.0259 6.81802 13.182C5.97411 12.3381 5.5 11.1935 5.5 10C5.5 8.80653 5.97411 7.66193 6.81802 6.81802C7.66193 5.97411 8.80653 5.5 10 5.5C11.1935 5.5 12.3381 5.97411 13.182 6.81802C14.0259 7.66193 14.5 8.80653 14.5 10C14.5 11.1935 14.0259 12.3381 13.182 13.182C12.3381 14.0259 11.1935 14.5 10 14.5ZM10 13C10.7956 13 11.5587 12.6839 12.1213 12.1213C12.6839 11.5587 13 10.7956 13 10C13 9.20435 12.6839 8.44129 12.1213 7.87868C11.5587 7.31607 10.7956 7 10 7C9.20435 7 8.44129 7.31607 7.87868 7.87868C7.31607 8.44129 7 9.20435 7 10C7 10.7956 7.31607 11.5587 7.87868 12.1213C8.44129 12.6839 9.20435 13 10 13ZM9.25 1.75H10.75V4H9.25V1.75ZM9.25 16H10.75V18.25H9.25V16ZM3.63625 4.69675L4.69675 3.63625L6.2875 5.227L5.227 6.2875L3.63625 4.6975V4.69675ZM13.7125 14.773L14.773 13.7125L16.3638 15.3032L15.3032 16.3638L13.7125 14.773ZM15.3032 3.6355L16.3638 4.69675L14.773 6.2875L13.7125 5.227L15.3032 3.63625V3.6355ZM5.227 13.7125L6.2875 14.773L4.69675 16.3638L3.63625 15.3032L5.227 13.7125ZM18.25 9.25V10.75H16V9.25H18.25ZM4 9.25V10.75H1.75V9.25H4Z" fill="currentColor"/></svg>
120 + </span>
121 + <span class="fct-theme-icon fct-theme-icon--dark">
122 + <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="none"><path d="M8.5 6.25C8.49985 7.29298 8.81035 8.31237 9.39192 9.17816C9.97348 10.0439 10.7997 10.7169 11.7653 11.1112C12.7309 11.5055 13.7921 11.6032 14.8134 11.3919C15.8348 11.1807 16.7701 10.67 17.5 9.925V10C17.5 14.1423 14.1423 17.5 10 17.5C5.85775 17.5 2.5 14.1423 2.5 10C2.5 5.85775 5.85775 2.5 10 2.5H10.075C9.57553 2.98834 9.17886 3.57172 8.90836 4.21576C8.63786 4.8598 8.49902 5.55146 8.5 6.25ZM4 10C3.99945 11.3387 4.44665 12.6392 5.27042 13.6945C6.09419 14.7497 7.24723 15.4992 8.54606 15.8236C9.84489 16.148 11.2149 16.0287 12.4381 15.4847C13.6614 14.9407 14.6675 14.0033 15.2965 12.8215C14.1771 13.0852 13.0088 13.0586 11.9026 12.744C10.7964 12.4295 9.78888 11.8376 8.97566 11.0243C8.16244 10.2111 7.57048 9.20361 7.25596 8.09738C6.94144 6.99116 6.91477 5.82292 7.1785 4.7035C6.21818 5.2151 5.41509 5.97825 4.85519 6.91123C4.2953 7.84422 3.99968 8.91191 4 10Z" fill="currentColor"/></svg>
123 + </span>
124 + <span class="fct-theme-icon fct-theme-icon--system">
125 + <svg viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6.875 4.375V6.25H4.375V7.5H6.875V9.375H8.125V4.375H6.875ZM9.375 7.5H15.625V6.25H9.375V7.5ZM13.125 10.625V12.5H15.625V13.75H13.125V15.625H11.875V10.625H13.125ZM10.625 13.75H4.375V12.5H10.625V13.75Z" fill="currentColor"/></svg>
126 + </span>
127 + </button>
128 + </div>
129 + </div>
91 130 <?php if (PermissionManager::hasPermission(["store/settings", 'store/sensitive'])): ?>
92 131 <div class="fct_admin_settings_btn_wrap">
93 132 <a class="fct_admin_settings_btn"
94 133 href="<?php echo esc_url(admin_url('admin.php?page=fluent-cart#/settings/store-settings/')) ?>">