| @@ -78,20 +78,11 @@ | ||
| 78 | 78 | |
| 79 | 79 | // Inject Vite HMR client in dev mode |
| 80 | 80 | Vite::injectViteClient(); |
| 81 | 81 | |
| 82 | - $isRtl = is_rtl(); | |
| 82 | + $isRtl = fluent_boards_is_rtl(); | |
| 83 | 83 | Vite::enqueueStyle($slug . '_public_board_app', 'scss/admin.scss'); |
| 84 | 84 | |
| 85 | - if ($isRtl && !Vite::underDevelopment()) { | |
| 86 | - wp_enqueue_style( | |
| 87 | - $slug . '_public_board_app_rtl', | |
| 88 | - $assets . 'admin/admin-rtl.css', | |
| 89 | - [$slug . '_public_board_app'], | |
| 90 | - FLUENT_BOARDS_PLUGIN_VERSION | |
| 91 | - ); | |
| 92 | - } | |
| 93 | - | |
| 94 | 85 | // Enqueue merged chunk CSS in production |
| 95 | 86 | if (!Vite::underDevelopment()) { |
| 96 | 87 | $styleCssPath = FLUENT_BOARDS_PLUGIN_PATH . 'assets/admin/style.css'; |
| 97 | 88 | if (file_exists($styleCssPath)) { |
| @@ -103,8 +94,23 @@ | ||
| 103 | 94 | ); |
| 104 | 95 | } |
| 105 | 96 | } |
| 106 | 97 | |
| 98 | + // RTL overrides must load after style.css so rules appended to the | |
| 99 | + // element-plus layer win by source order, not only by specificity. | |
| 100 | + if ($isRtl) { | |
| 101 | + $rtlDeps = [$slug . '_public_board_app']; | |
| 102 | + if (wp_style_is($slug . '_public_vite_style', 'enqueued')) { | |
| 103 | + $rtlDeps[] = $slug . '_public_vite_style'; | |
| 104 | + } | |
| 105 | + Vite::enqueueStyle( | |
| 106 | + $slug . '_public_board_app_rtl', | |
| 107 | + 'scss/admin_rtl.scss', | |
| 108 | + $rtlDeps, | |
| 109 | + FLUENT_BOARDS_PLUGIN_VERSION | |
| 110 | + ); | |
| 111 | + } | |
| 112 | + | |
| 107 | 113 | Vite::enqueueStaticScript( |
| 108 | 114 | $slug . '_public_global_admin', |
| 109 | 115 | 'admin/global_admin.js', |
| 110 | 116 | [], |
| @@ -177,8 +183,9 @@ | ||
| 177 | 183 | 'has_pro' => false, |
| 178 | 184 | 'upgrade_url' => fluent_boards_get_upgrade_url(), |
| 179 | 185 | 'board_solid_colors' => Constant::BOARD_BACKGROUND_DEFAULT_SOLID_COLORS, |
| 180 | 186 | 'board_gradient_colors' => Constant::BOARD_BACKGROUND_DEFAULT_GRADIENT_COLORS, |
| 187 | + 'label_color_presets' => Constant::LABEL_COLOR_PRESETS, | |
| 181 | 188 | 'is_rtl' => $isRtl, |
| 182 | 189 | 'public_mode' => true, |
| 183 | 190 | 'public_token' => $boardToken, |
| 184 | 191 | ]; |