updated language files, cache clear button loading

This commit is contained in:
Peter Papp
2020-08-18 15:12:34 +02:00
parent 93a7542502
commit 5f5caae9e7
9 changed files with 47 additions and 10 deletions

View File

@@ -81,13 +81,13 @@
</div>
<FormLabel class="mt-70">
Application Cache
{{ $t('admin_settings.others.section_cache') }}
</FormLabel>
<InfoBox>
Did you change anything in your .env file or change your stripe credentials? Then clear your cache.
{{ $t('admin_settings.others.cache_disclaimer') }}
</InfoBox>
<ButtonBase @click.native="flushCache" type="submit" button-style="theme" class="submit-button">
Clear Cache
<ButtonBase @click.native="flushCache" :loading="isFlushingCache" :disabled="isFlushingCache" type="submit" button-style="theme" class="submit-button">
{{ $t('admin_settings.others.cache_clear') }}
</ButtonBase>
</div>
</PageTabGroup>
@@ -130,6 +130,7 @@
data() {
return {
isLoading: true,
isFlushingCache: false,
app: {
contactMail: '',
googleAnalytics: '',
@@ -141,6 +142,9 @@
},
methods: {
flushCache() {
this.isFlushingCache = true
axios.get('/api/flush-cache')
.then(() => {
events.$emit('toaster', {
@@ -148,6 +152,9 @@
message: 'Your cache was successfully deleted.',
})
})
.finally(() => {
this.isFlushingCache = false
})
}
},
mounted() {