Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions web/public/js/components/server/http-compression-config-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Vue.component("http-compression-config-box", {
isOn: false,
useDefaultTypes: true,
types: ["brotli", "gzip", "zstd", "deflate"],
level: 0,
level: 2,
decompressData: false,
gzipRef: null,
deflateRef: null,
Expand All @@ -41,6 +41,9 @@ Vue.component("http-compression-config-box", {
if (config.extensions == null) {
config.extensions = []
}
if (config.level == null || config.level <= 0) {
config.level = 2
}

let allTypes = [
{
Expand Down Expand Up @@ -162,6 +165,15 @@ Vue.component("http-compression-config-box", {
</tr>
</tbody>
<tbody v-show="isOn()">
<tr>
<td>压缩级别</td>
<td>
<select class="ui dropdown auto-width" v-model.number="config.level">
<option v-for="i in 12" :value="i">{{i}}</option>
</select>
<p class="comment">级别越高,压缩比例越大。</p>
</td>
</tr>
<tr>
<td>支持的扩展名</td>
<td>
Expand Down Expand Up @@ -259,4 +271,4 @@ Vue.component("http-compression-config-box", {
</table>
<div class="margin"></div>
</div>`
})
})