Skip to content

Commit

Permalink
Minor optimization for cron token
Browse files Browse the repository at this point in the history
  • Loading branch information
Kovah committed Sep 19, 2024
1 parent b0e47d7 commit dd6db20
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
3 changes: 2 additions & 1 deletion resources/assets/js/components/GenerateCronToken.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ export default class GenerateCronToken {
if (typeof response.new_token !== 'undefined') {
debounce(() => {
this.$input.value = response.new_token;
this.$cronUrl.innerHTML = this.buildCronURl(response.new_token);
this.$cronUrl.innerText = this.buildCronURl(response.new_token);
this.$cronUrl.parentElement.classList.remove('d-none');
}, 1000);

window.setTimeout(() => {
Expand Down
12 changes: 5 additions & 7 deletions resources/views/admin/system-settings/partials/cron.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@

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

@if(systemsettings('cron_token'))
<p>
@lang('settings.cron_token_url', [
'route' => route('cron', ['token' => systemsettings('cron_token') ?: ''])
])
</p>
@endif
<p class="{{ systemsettings('cron_token') ? '' : 'd-none' }}">
@lang('settings.cron_token_url', [
'route' => route('cron', ['token' => systemsettings('cron_token') ?: 'no-token-configured'])
])
</p>

</div>
</div>

0 comments on commit dd6db20

Please sign in to comment.