Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pages/dashboard_admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ function getThreatsByCountry() {
<input type="hidden" name="toggle_action" value="toggle_frontend">
<button type="submit" class="btn btn-sm <?= $frontendMaintenanceActive ? 'btn-success' : 'btn-warning' ?>">
<i class="rex-icon fa-<?= $frontendMaintenanceActive ? 'play' : 'pause' ?>"></i>
Comment on lines 343 to 344
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The button styling and icon logic appear to be inverted. When maintenance is active, the button shows green (btn-success) with a "play" icon, but this is inconsistent with the "Deactivate" text on line 345.

For consistency with other parts of the codebase (e.g., pages/mail_security.badwords.php line 553-554), when maintenance is active, it should show:

  • btn-warning (yellow/orange)
  • fa-pause icon
  • "Deactivate" text

Suggested fix:

<button type="submit" class="btn btn-sm <?= $frontendMaintenanceActive ? 'btn-warning' : 'btn-success' ?>">
    <i class="rex-icon fa-<?= $frontendMaintenanceActive ? 'pause' : 'play' ?>"></i>
Suggested change
<button type="submit" class="btn btn-sm <?= $frontendMaintenanceActive ? 'btn-success' : 'btn-warning' ?>">
<i class="rex-icon fa-<?= $frontendMaintenanceActive ? 'play' : 'pause' ?>"></i>
<button type="submit" class="btn btn-sm <?= $frontendMaintenanceActive ? 'btn-warning' : 'btn-success' ?>">
<i class="rex-icon fa-<?= $frontendMaintenanceActive ? 'pause' : 'play' ?>"></i>

Copilot uses AI. Check for mistakes.
<?= $frontendMaintenanceActive ? 'Aktivieren' : 'Wartung' ?>
<?= $frontendMaintenanceActive ? $addon->i18n('upkeep_deactivate') : $addon->i18n('upkeep_activate') ?>
</button>
</form>
<?php endif; ?>
Expand Down Expand Up @@ -397,7 +397,7 @@ function getThreatsByCountry() {
<input type="hidden" name="toggle_action" value="toggle_backend">
<button type="submit" class="btn btn-sm <?= $backendMaintenanceActive ? 'btn-success' : 'btn-warning' ?>">
<i class="rex-icon fa-<?= $backendMaintenanceActive ? 'play' : 'pause' ?>"></i>
Comment on lines 398 to 399
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The button styling and icon logic appear to be inverted. When maintenance is active, the button shows green (btn-success) with a "play" icon, but this is inconsistent with the "Deactivate" text on line 400.

For consistency with other parts of the codebase (e.g., pages/mail_security.badwords.php line 553-554), when maintenance is active, it should show:

  • btn-warning (yellow/orange)
  • fa-pause icon
  • "Deactivate" text

Suggested fix:

<button type="submit" class="btn btn-sm <?= $backendMaintenanceActive ? 'btn-warning' : 'btn-success' ?>">
    <i class="rex-icon fa-<?= $backendMaintenanceActive ? 'pause' : 'play' ?>"></i>
Suggested change
<button type="submit" class="btn btn-sm <?= $backendMaintenanceActive ? 'btn-success' : 'btn-warning' ?>">
<i class="rex-icon fa-<?= $backendMaintenanceActive ? 'play' : 'pause' ?>"></i>
<button type="submit" class="btn btn-sm <?= $backendMaintenanceActive ? 'btn-warning' : 'btn-success' ?>">
<i class="rex-icon fa-<?= $backendMaintenanceActive ? 'pause' : 'play' ?>"></i>

Copilot uses AI. Check for mistakes.
<?= $backendMaintenanceActive ? 'Aktivieren' : 'Wartung' ?>
<?= $backendMaintenanceActive ? $addon->i18n('upkeep_deactivate') : $addon->i18n('upkeep_activate') ?>
</button>
</form>
<?php endif; ?>
Expand Down