Skip to content

Commit dd6db20

Browse files
committed
Minor optimization for cron token
1 parent b0e47d7 commit dd6db20

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

resources/assets/js/components/GenerateCronToken.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ export default class GenerateCronToken {
5050
if (typeof response.new_token !== 'undefined') {
5151
debounce(() => {
5252
this.$input.value = response.new_token;
53-
this.$cronUrl.innerHTML = this.buildCronURl(response.new_token);
53+
this.$cronUrl.innerText = this.buildCronURl(response.new_token);
54+
this.$cronUrl.parentElement.classList.remove('d-none');
5455
}, 1000);
5556

5657
window.setTimeout(() => {

resources/views/admin/system-settings/partials/cron.blade.php

+5-7
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@
2323

2424
<p class="small text-warning">@lang('settings.cron_token_generate_info')</p>
2525

26-
@if(systemsettings('cron_token'))
27-
<p>
28-
@lang('settings.cron_token_url', [
29-
'route' => route('cron', ['token' => systemsettings('cron_token') ?: ''])
30-
])
31-
</p>
32-
@endif
26+
<p class="{{ systemsettings('cron_token') ? '' : 'd-none' }}">
27+
@lang('settings.cron_token_url', [
28+
'route' => route('cron', ['token' => systemsettings('cron_token') ?: 'no-token-configured'])
29+
])
30+
</p>
3331

3432
</div>
3533
</div>

0 commit comments

Comments
 (0)