| @@ -6,16 +6,30 @@ | ||
| 6 | 6 | <img src="<?php echo esc_url( FLYWP_PLUGIN_URL . 'assets/images/flywp-logo.svg' ); ?>" alt="FlyWP" class="fw-h-11 fw-mr-2 fw-inline-block"> |
| 7 | 7 | </h1> |
| 8 | 8 | |
| 9 | 9 | <div class=""> |
| 10 | - <a href="https://app.flywp.com" target="_blank" class="button button-secondary"><span class="dashicons dashicons-external fw-mt-1"></span> <?php esc_html_e( 'FlyWP Dashboard', 'flywp' ); ?></a> | |
| 10 | + <a href="<?php echo esc_url( $app_site_url ); ?>" target="_blank" class="button button-secondary"><span class="dashicons dashicons-external fw-mt-1"></span> <?php esc_html_e( 'FlyWP Dashboard', 'flywp' ); ?></a> | |
| 11 | 11 | </div> |
| 12 | 12 | </div> |
| 13 | + | |
| 14 | + <div class="fw-flex -fw-mb-px fw-gap-2"> | |
| 15 | + <?php foreach ( $tabs as $key => $label ) { ?> | |
| 16 | + <a href="<?php echo esc_url( add_query_arg( [ | |
| 17 | + 'tab' => $key, | |
| 18 | + ], $this->page_url() ) ); ?>" class="fw-block fw-px-4 fw-py-3 fw-text-sm -m fw-text-gray-800 fw-no-underline fw-outline-none focus:fw-outline-none <?php echo $key == $active_tab ? 'fw-border-b-2 fw-border-indigo-500 fw-font-semibold' : ''; ?>"><?php echo $label; ?></a> | |
| 19 | + <?php } ?> | |
| 20 | + </div> | |
| 13 | 21 | </div> |
| 14 | 22 | </div> |
| 15 | 23 | |
| 16 | 24 | <div class="fw-max-w-xl fw-mx-auto fw-px-4 sm:fw-px-0"> |
| 17 | - <?php require __DIR__ . '/page-cache.php'; ?> | |
| 18 | - <?php require __DIR__ . '/op-cache.php'; ?> | |
| 25 | + <?php | |
| 26 | + if ( $active_tab === 'cache' ) { | |
| 27 | + require __DIR__ . '/page-cache.php'; | |
| 28 | + require __DIR__ . '/op-cache.php'; | |
| 29 | + } elseif ( $active_tab === 'email' ) { | |
| 30 | + require __DIR__ . '/email.php'; | |
| 31 | + } | |
| 32 | + ?> | |
| 19 | 33 | </div> |
| 20 | 34 | |
| 21 | 35 | </div> |