Skip to content

Commit

Permalink
Add warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
sangnguyenplus committed Jan 31, 2023
1 parent 4da5ea8 commit f7058a6
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"provider": "Botble\\MaintenanceMode\\Providers\\MaintenanceModeServiceProvider",
"author": "Botble Technologies",
"url": "https://botble.com",
"version": "2.2.1",
"version": "2.2.2",
"description": "Manage maintenance mode from the admin panel"
}
2 changes: 1 addition & 1 deletion public/js/maintenance.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions resources/assets/js/maintenance.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class MaintenanceMode {
_self.closest('form').find('.maintenance-mode-notice div span').addClass('text-danger').removeClass('text-success').text(data.notice);
if (data.url) {
$('#bypassMaintenanceMode .maintenance-mode-bypass').attr('href', data.url);
$('#bypassMaintenanceMode #secret-link').val(data.url);
$('#bypassMaintenanceMode').modal('show');
}
}
Expand Down
1 change: 1 addition & 0 deletions resources/lang/en/maintenance-mode.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@
'bypass_maintenance_mode' => 'Bypassing Maintenance Mode',
'click_to_bypass_maintenance_mode' => 'Please click <a class="maintenance-mode-bypass" href="" target="_blank">here</a> to bypassing maintenance mode.',
'close' => 'Close',
'bypass_warning' => 'The secret link to bypass maintenance mode, <strong>YOU NEED TO BACK UP THIS LINK IN A SAFE PLACE</strong>',
];
1 change: 1 addition & 0 deletions resources/lang/vi/maintenance-mode.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@
'bypass_maintenance_mode' => 'Bỏ qua chế độ bảo trì',
'click_to_bypass_maintenance_mode' => 'Vui lòng nhấp vào <a class="maintenance-mode-bypass" href="" target="_blank">đây</a> để được bỏ qua chế độ bảo trì.',
'close' => 'Đóng',
'bypass_warning' => 'Đường dẫn bí mật để vượt qua chế độ bảo trì, <strong>BẠN CẦN LƯU LIÊN KẾT NÀY Ở MỘT NƠI AN TOÀN</strong>',
];
4 changes: 4 additions & 0 deletions resources/views/maintenance.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
</button>
</div>
<div class="modal-body">
<div class="form-group">
<label for="secret-link">{!! clean(trans('plugins/maintenance-mode::maintenance-mode.bypass_warning')) !!}.</label>
<input type="text" class="form-control" id="secret-link">
</div>
<p>{!! clean(trans('plugins/maintenance-mode::maintenance-mode.click_to_bypass_maintenance_mode')) !!}</p>
</div>
</div>
Expand Down

0 comments on commit f7058a6

Please sign in to comment.