refactor: 调整后台管理页面中的 Cloudflare Web Analytics 设置项位置
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
1 parent
16cf001bb3
commit
49e564c17b
1 file changed
+32
-31
@@ -231,6 +231,38 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="settings-card full-width" style="margin-top: 25px;">
|
||||||
|
<h3>Cloudflare Web Analytics</h3>
|
||||||
|
<p class="desc">
|
||||||
|
配置 Cloudflare Web Analytics 站点 Token。配置后博客将自动采集 PV、UV。如果您通过 Cloudflare
|
||||||
|
Pages 部署并在后台一键开启了统计,只需在这里填写对应生成的 Site Tag 即可拉取数据展示。
|
||||||
|
</p>
|
||||||
|
<form
|
||||||
|
method="POST"
|
||||||
|
action="?/updateWebAnalytics"
|
||||||
|
use:enhance={() => {
|
||||||
|
return async ({ update }) => {
|
||||||
|
update({ reset: false });
|
||||||
|
};
|
||||||
|
}}
|
||||||
|
class="alias-form"
|
||||||
|
>
|
||||||
|
<div class="form-group" style="max-width: 500px;">
|
||||||
|
<label for="web_analytics_token">Web Analytics Token</label>
|
||||||
|
<TextInput
|
||||||
|
type="text"
|
||||||
|
id="web_analytics_token"
|
||||||
|
name="web_analytics_token"
|
||||||
|
value={data.settings['site.web_analytics_token'] || ''}
|
||||||
|
placeholder="留空则禁用数据拉取和自动注入"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="form-actions" style="justify-content: flex-start;">
|
||||||
|
<Button type="submit" variant="primary">保存统计设置</Button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{#if activeTab === 'appearance'}
|
{#if activeTab === 'appearance'}
|
||||||
@@ -361,37 +393,6 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
{:else if activeTab === 'analytics'}
|
{:else if activeTab === 'analytics'}
|
||||||
<div class="settings-card full-width" style="margin-bottom: 25px;">
|
|
||||||
<h3>Web Analytics (流量统计)</h3>
|
|
||||||
<p class="desc">
|
|
||||||
配置 Cloudflare Web Analytics 站点 Token。配置后博客将自动采集 PV、UV。如果您通过 Cloudflare
|
|
||||||
Pages 部署并在后台一键开启了统计,只需在这里填写对应生成的 Site Tag 即可拉取数据展示。
|
|
||||||
</p>
|
|
||||||
<form
|
|
||||||
method="POST"
|
|
||||||
action="?/updateWebAnalytics"
|
|
||||||
use:enhance={() => {
|
|
||||||
return async ({ update }) => {
|
|
||||||
update({ reset: false });
|
|
||||||
};
|
|
||||||
}}
|
|
||||||
class="alias-form"
|
|
||||||
>
|
|
||||||
<div class="form-group" style="max-width: 500px;">
|
|
||||||
<label for="web_analytics_token">Web Analytics Token / Site Tag</label>
|
|
||||||
<TextInput
|
|
||||||
type="text"
|
|
||||||
id="web_analytics_token"
|
|
||||||
name="web_analytics_token"
|
|
||||||
value={data.settings['site.web_analytics_token'] || ''}
|
|
||||||
placeholder="留空则禁用数据拉取和自动注入"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="form-actions" style="justify-content: flex-start;">
|
|
||||||
<Button type="submit" variant="primary">保存统计设置</Button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
<AnalyticsPanel analyticsPromise={data.analytics} />
|
<AnalyticsPanel analyticsPromise={data.analytics} />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user