This commit is contained in:
chenyh 2022-06-14 21:42:35 +08:00
parent 3099306f06
commit 70f327e1e7
13 changed files with 47 additions and 36 deletions

View File

@ -1,5 +1,5 @@
/*
Copyright 2020 DigitalOcean
Copyright 2022 DigitalOcean
This code is licensed under the MIT License.
You may obtain a copy of the License at

View File

@ -1,5 +1,5 @@
/*
Copyright 2021 DigitalOcean
Copyright 2022 DigitalOcean
This code is licensed under the MIT License.
You may obtain a copy of the License at
@ -27,8 +27,8 @@ THE SOFTWARE.
import common from '../../common';
export default {
disableHtmlCaching: 'Disable HTML caching',
enableChangesTakeEffect: 'disable HTML caching',
disableHtmlCaching: 'Disable HTML caching', // TODO: translate
enableDisableHtmlCaching: 'disable HTML caching', // TODO: translate
gzipCompression: 'Gzip Komprimierung',
enableGzipCompression: `${common.enable} Gzip Komprimierung`,
brotliCompression: 'Brotli Komprimierung',

View File

@ -1,5 +1,5 @@
/*
Copyright 2021 DigitalOcean
Copyright 2022 DigitalOcean
This code is licensed under the MIT License.
You may obtain a copy of the License at
@ -28,7 +28,7 @@ import common from '../../common';
export default {
disableHtmlCaching: 'Disable HTML caching',
enableChangesTakeEffect: 'disable HTML caching',
enableDisableHtmlCaching: 'disable HTML caching',
gzipCompression: 'Gzip compression',
enableGzipCompression: `${common.enable} gzip compression`,
brotliCompression: 'Brotli compression',

View File

@ -1,5 +1,5 @@
/*
Copyright 2021 DigitalOcean
Copyright 2022 DigitalOcean
This code is licensed under the MIT License.
You may obtain a copy of the License at
@ -27,8 +27,8 @@ THE SOFTWARE.
import common from '../../common';
export default {
disableHtmlCaching: 'Disable HTML caching',
enableChangesTakeEffect: 'disable HTML caching',
disableHtmlCaching: 'Disable HTML caching', // TODO: translate
enableDisableHtmlCaching: 'disable HTML caching', // TODO: translate
gzipCompression: 'Compresión Gzip',
enableGzipCompression: `${common.enable} compresión gzip`,
brotliCompression: 'Compresión Brotli',
@ -40,6 +40,5 @@ export default {
expirationForMedia: 'Expiración para media',
expirationForSvgs: 'Expiración para SVGs',
expirationForFonts: 'Expiración para fuentes',
performance: 'Rendimiento',
};

View File

@ -1,5 +1,5 @@
/*
Copyright 2021 DigitalOcean
Copyright 2022 DigitalOcean
This code is licensed under the MIT License.
You may obtain a copy of the License at
@ -27,8 +27,8 @@ THE SOFTWARE.
import common from '../../common';
export default {
disableHtmlCaching: 'Disable HTML caching',
enableChangesTakeEffect: 'disable HTML caching',
disableHtmlCaching: 'Disable HTML caching', // TODO: translate
enableDisableHtmlCaching: 'disable HTML caching', // TODO: translate
gzipCompression: 'Compression Gzip',
enableGzipCompression: `${common.enable} la compression gzip`,
brotliCompression: 'Compression Brotli',

View File

@ -1,5 +1,5 @@
/*
Copyright 2021 DigitalOcean
Copyright 2022 DigitalOcean
This code is licensed under the MIT License.
You may obtain a copy of the License at
@ -27,8 +27,8 @@ THE SOFTWARE.
import common from '../../common';
export default {
disableHtmlCaching: 'Disable HTML caching',
enableChangesTakeEffect: 'disable HTML caching',
disableHtmlCaching: 'Disable HTML caching', // TODO: translate
enableDisableHtmlCaching: 'disable HTML caching', // TODO: translate
gzipCompression: 'Kompresja gzip',
enableGzipCompression: `${common.enable} kompresję gzip`,
brotliCompression: 'Kompresja brotli',

View File

@ -1,5 +1,5 @@
/*
Copyright 2021 DigitalOcean
Copyright 2022 DigitalOcean
This code is licensed under the MIT License.
You may obtain a copy of the License at
@ -27,8 +27,8 @@ THE SOFTWARE.
import common from '../../common';
export default {
disableHtmlCaching: 'Disable HTML caching',
enableChangesTakeEffect: 'disable HTML caching',
disableHtmlCaching: 'Disable HTML caching', // TODO: translate
enableDisableHtmlCaching: 'disable HTML caching', // TODO: translate
gzipCompression: 'Compressão Gzip',
enableGzipCompression: `${common.enable} compressão gzip`,
brotliCompression: 'Compressão Brotli',

View File

@ -1,5 +1,5 @@
/*
Copyright 2021 DigitalOcean
Copyright 2022 DigitalOcean
This code is licensed under the MIT License.
You may obtain a copy of the License at
@ -27,8 +27,8 @@ THE SOFTWARE.
import common from '../../common';
export default {
disableHtmlCaching: 'Disable HTML caching',
enableChangesTakeEffect: 'disable HTML caching',
disableHtmlCaching: 'Disable HTML caching', // TODO: translate
enableDisableHtmlCaching: 'disable HTML caching', // TODO: translate
gzipCompression: 'Gzip сжатие',
enableGzipCompression: `${common.enable} gzip сжатие`,
brotliCompression: 'Brotli сжатие',

View File

@ -1,5 +1,5 @@
/*
Copyright 2021 DigitalOcean
Copyright 2022 DigitalOcean
This code is licensed under the MIT License.
You may obtain a copy of the License at
@ -28,7 +28,7 @@ import common from '../../common';
export default {
disableHtmlCaching: '禁用 HTML 缓存',
enableChangesTakeEffect: '禁用 HTML 缓存',
enableDisableHtmlCaching: '禁用 HTML 缓存',
gzipCompression: 'Gzip 压缩',
enableGzipCompression: `${common.enable} Gzip 压缩`,
brotliCompression: 'Brotli 压缩',

View File

@ -1,5 +1,5 @@
/*
Copyright 2021 DigitalOcean
Copyright 2022 DigitalOcean
This code is licensed under the MIT License.
You may obtain a copy of the License at
@ -27,8 +27,8 @@ THE SOFTWARE.
import common from '../../common';
export default {
disableHtmlCaching: 'Disable HTML caching',
enableChangesTakeEffect: 'disable HTML caching',
disableHtmlCaching: 'Disable HTML caching', // TODO: translate
enableDisableHtmlCaching: 'disable HTML caching', // TODO: translate
gzipCompression: 'Gzip 壓縮',
enableGzipCompression: `${common.enable}Gzip壓縮`,
brotliCompression: 'Brotli 壓縮',

View File

@ -26,8 +26,6 @@ THE SOFTWARE.
<template>
<div>
<div class="field is-horizontal">
<div class="field-label">
<label class="label">{{ $t('templates.globalSections.performance.disableHtmlCaching') }}</label>
@ -37,7 +35,7 @@ THE SOFTWARE.
<div :class="`control${disableHtmlCachingChanged ? ' is-changed' : ''}`">
<div class="checkbox">
<PrettyCheck v-model="disableHtmlCaching" class="p-default p-curve p-fill p-icon">
{{ $t('templates.globalSections.performance.enableChangesTakeEffect') }}
{{ $t('templates.globalSections.performance.enableDisableHtmlCaching') }}
</PrettyCheck>
</div>
</div>
@ -146,8 +144,23 @@ THE SOFTWARE.
</div>
</div>
<div class="field is-horizontal">
<div class="field-label">
<label class="label">{{ $t('templates.globalSections.performance.expirationForFonts') }}</label>
</div>
<div class="field-body">
<div class="field">
<div :class="`control${fontsExpirationChanged ? ' is-changed' : ''}`">
<input
v-model="fontsExpiration"
class="input"
type="text"
:placeholder="$props.data.fontsExpiration.default"
/>
</div>
</div>
</div>
</div>
</div>
</template>
@ -159,7 +172,7 @@ THE SOFTWARE.
const defaults = {
disableHtmlCaching: {
default: true,
default: false,
enabled: true,
},
gzipCompression: {

View File

@ -45,7 +45,6 @@ const globalMap = {
python_server: ['python', 'pythonServer'],
disableHtmlCaching: ['performance', 'disableHtmlCaching', oldBool],
gzip: ['performance', 'gzipCompression', oldBool],
brotli: ['performance', 'brotliCompression', oldBool],
expires_assets: ['performance', 'assetsExpiration'],

View File

@ -1,5 +1,5 @@
/*
Copyright 2020 DigitalOcean
Copyright 2022 DigitalOcean
This code is licensed under the MIT License.
You may obtain a copy of the License at
@ -37,5 +37,5 @@ export const extensions = {
'docx?|dotx?|docm|dotm|' +
'xlsx?|xltx?|xlsm|xltm|' +
'pptx?|potx?|pptm|potm|ppsx?',
html: 'html',
html: 'html?',
};