← All changes
|
admin/modules/setup-wizard/components/Content/Setup.vue
+28
-29
3.12.1
→
3.13.3
View file →
| @@ -1,12 +1,9 @@ | ||
| 1 | 1 | <template> |
| 2 | - <div class="wpfnl-required-installation"> | |
| 2 | + <div class="wpfnl-wz-center wpfnl-wz-install"> | |
| 3 | 3 | |
| 4 | - <!-- Header — matches .wpfnl-mm-setup-header pattern from other steps --> | |
| 5 | - <div class="wpfnl-mm-setup-header"> | |
| 6 | - <h2 class="wpfnl-mm-setup-title">{{ pluginsSectionTitle }}</h2> | |
| 7 | - <p class="wpfnl-mm-setup-subtitle">{{ pluginsSectionSubtitle }}</p> | |
| 8 | - </div> | |
| 4 | + <h1 class="wpfnl-wz-h1">{{ pluginsSectionTitle }}</h1> | |
| 5 | + <p class="wpfnl-wz-sub">{{ pluginsSectionSubtitle }}</p> | |
| 9 | 6 | |
| 10 | 7 | <!-- Single unified white card — matches .wpfnl-mm-setup-section pattern --> |
| 11 | 8 | <div class="wpfnl-ri-card"> |
| 12 | 9 | |
| @@ -114,30 +111,8 @@ | ||
| 114 | 111 | </div> |
| 115 | 112 | |
| 116 | 113 | </div> |
| 117 | 114 | |
| 118 | - <!-- Footer Buttons --> | |
| 119 | - <div class="wpfnl-mm-choose-goal-buttons wpfnl-mm-buttons-container"> | |
| 120 | - <button class="wpfnl-mm-btn wpfnl-mm-btn-secondary" @click="goBack" :disabled="isProcessing"> | |
| 121 | - <svg width="17" height="12" viewBox="0 0 17 12" fill="none" xmlns="http://www.w3.org/2000/svg"> | |
| 122 | - <path d="M16 6H1M1 6L6 1M1 6L6 11" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | |
| 123 | - </svg> | |
| 124 | - Back | |
| 125 | - </button> | |
| 126 | - <div class="wpfnl-mm-btn-group"> | |
| 127 | - <button | |
| 128 | - class="wpfnl-mm-btn wpfnl-mm-btn-primary" | |
| 129 | - @click="handleContinue" | |
| 130 | - :disabled="isProcessing" | |
| 131 | - > | |
| 132 | - {{ installButtonLabel }} | |
| 133 | - <svg v-if="!isProcessing" width="17" height="12" viewBox="0 0 17 12" fill="none" xmlns="http://www.w3.org/2000/svg"> | |
| 134 | - <path d="M1 6H16M16 6L11 1M16 6L11 11" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> | |
| 135 | - </svg> | |
| 136 | - </button> | |
| 137 | - </div> | |
| 138 | - </div> | |
| 139 | - | |
| 140 | 115 | </div> |
| 141 | 116 | </template> |
| 142 | 117 | |
| 143 | 118 | <script> |
| @@ -142,8 +117,9 @@ | ||
| 142 | 117 | |
| 143 | 118 | <script> |
| 144 | 119 | export default { |
| 145 | 120 | name: 'Setup', |
| 121 | + emits: [ 'nav', 'next-step' ], | |
| 146 | 122 | data() { |
| 147 | 123 | return { |
| 148 | 124 | selectedBuilder: 'gutenberg', |
| 149 | 125 | builderStatuses: {}, |
| @@ -233,13 +209,37 @@ | ||
| 233 | 209 | if (this.isPluginInstalled('mail-mint')) return 'wpfnl-ri-plugin-card--installed'; |
| 234 | 210 | return ''; |
| 235 | 211 | }, |
| 236 | 212 | }, |
| 213 | + watch: { | |
| 214 | + // The footer label tracks what the button will actually do, which | |
| 215 | + // depends on the builder and Mail Mint choices plus install progress. | |
| 216 | + installButtonLabel: 'publishNav', | |
| 217 | + isProcessing: 'publishNav', | |
| 218 | + }, | |
| 237 | 219 | mounted() { |
| 238 | 220 | this.detectBuilder(); |
| 239 | 221 | this.checkPluginStatuses(); |
| 222 | + this.publishNav(); | |
| 240 | 223 | }, |
| 241 | 224 | methods: { |
| 225 | + publishNav() { | |
| 226 | + this.$emit( 'nav', { | |
| 227 | + label: this.installButtonLabel, | |
| 228 | + canProceed: ! this.isProcessing, | |
| 229 | + busy: this.isProcessing, | |
| 230 | + showBack: true, | |
| 231 | + showNext: true, | |
| 232 | + } ); | |
| 233 | + }, | |
| 234 | + | |
| 235 | + /** | |
| 236 | + * Called by the wizard footer's Next button. | |
| 237 | + */ | |
| 238 | + submit() { | |
| 239 | + this.handleContinue(); | |
| 240 | + }, | |
| 241 | + | |
| 242 | 242 | detectBuilder() { |
| 243 | 243 | const getPlugins = window?.setup_wizard_obj?.getPlugins || []; |
| 244 | 244 | const oxygenData = getPlugins.find(p => p.name === 'oxygen'); |
| 245 | 245 | const bricksData = getPlugins.find(p => p.name === 'bricks'); |
| @@ -372,9 +372,8 @@ | ||
| 372 | 372 | this.installStatusText = ''; |
| 373 | 373 | } |
| 374 | 374 | }, |
| 375 | 375 | |
| 376 | - goBack() { this.$emit('prev-step'); }, | |
| 377 | 376 | } |
| 378 | 377 | } |
| 379 | 378 | </script> |
| 380 | 379 | |