From dd6db203544b4aac8b1ae10f71a62f318a84d3d3 Mon Sep 17 00:00:00 2001 From: Kovah Date: Fri, 20 Sep 2024 00:39:04 +0200 Subject: [PATCH] Minor optimization for cron token --- resources/assets/js/components/GenerateCronToken.js | 3 ++- .../admin/system-settings/partials/cron.blade.php | 12 +++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/resources/assets/js/components/GenerateCronToken.js b/resources/assets/js/components/GenerateCronToken.js index 4cd25cea..ab5d7694 100644 --- a/resources/assets/js/components/GenerateCronToken.js +++ b/resources/assets/js/components/GenerateCronToken.js @@ -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(() => { diff --git a/resources/views/admin/system-settings/partials/cron.blade.php b/resources/views/admin/system-settings/partials/cron.blade.php index 4a2d15cf..2230147f 100644 --- a/resources/views/admin/system-settings/partials/cron.blade.php +++ b/resources/views/admin/system-settings/partials/cron.blade.php @@ -23,13 +23,11 @@

@lang('settings.cron_token_generate_info')

- @if(systemsettings('cron_token')) -

- @lang('settings.cron_token_url', [ - 'route' => route('cron', ['token' => systemsettings('cron_token') ?: '']) - ]) -

- @endif +

+ @lang('settings.cron_token_url', [ + 'route' => route('cron', ['token' => systemsettings('cron_token') ?: 'no-token-configured']) + ]) +