{$layout}
{$template "../settings_menu"}
{$template "/left_menu_with_menu"}

<div class="right-box with-menu" :class="{'null-data': rewriteRules.length == 0}">
    {$if .featureIsOn}
    <button v-if="rewriteRules.length > 0" class="ui button primary" @click.prevent="createRewriteRule()">
        <i class="pi pi-plus"></i>
        创建
    </button>
	<http-rewrite-rule-list v-if="rewriteRules.length > 0" :v-web-id="webId" :v-rewrite-rules="rewriteRules"></http-rewrite-rule-list>
    <div class="null-data-comment" v-else>
        <div class="ui segment" style="text-align: center; padding: 2em">
            <div style="margin-bottom: 1em">
                <i class="pi pi-inbox" style="font-size: 3em;"></i>
            </div>
            <div style="margin-bottom: 1em; font-size: 1.2em;">
                还没有设置重写规则，点击下方按钮创建第一条规则
            </div>
            <button class="ui button primary" @click.prevent="createRewriteRule()">
                <i class="pi pi-plus"></i>
                创建重写规则
            </button>
        </div>
    </div>
    {$else}
    <server-feature-required></server-feature-required>
    {$end}
</div>