+
+
+
页面标题
+
访问量
+
最后访问时间
+
页面地址
-
- {{ item.pv }}
-
-
- {{ formatTime(item.lastVisitAt) }}
-
-
-
- {{ item.postUrl }}
-
-
-
+
+
+ {{ item.postTitle || item.postSlug }}
+
+
+ {{ item.pv }}
+
+
+ {{ formatTime(item.lastVisitAt) }}
+
+
@@ -392,9 +399,16 @@ watch(
color: #24292f;
}
+.domain-table-wrapper {
+ width: 100%;
+ overflow-x: auto;
+ -webkit-overflow-scrolling: touch;
+}
+
.domain-table {
border: 1px solid #d0d7de;
border-radius: 6px;
+ min-width: 520px;
overflow: hidden;
}
@@ -420,11 +434,48 @@ watch(
color: #57606a;
}
-.domain-cell-domain {
- flex: 2;
+.domain-cell-title {
font-weight: 500;
}
+.domain-cell-pv {
+ text-align: center;
+}
+
+.domain-cell-time {
+ flex: 0 0 170px;
+}
+
+.domain-cell-url {
+ word-break: break-all;
+}
+
+@media (max-width: 768px) {
+ .domain-table {
+ width: 610px;
+ }
+
+ .domain-cell {
+ flex: none;
+ }
+
+ .domain-cell-title {
+ width: 160px;
+ }
+
+ .domain-cell-pv {
+ width: 100px;
+ }
+
+ .domain-cell-time {
+ width: 150px;
+ }
+
+ .domain-cell-url {
+ width: 200px;
+ }
+}
+
.chart-wrapper {
margin-top: 4px;
}
@@ -457,10 +508,4 @@ watch(
background-color: #d1242f;
color: #ffffff;
}
-
-@media (max-width: 768px) {
- .stats-grid {
- grid-template-columns: repeat(1, minmax(0, 1fr));
- }
-}
diff --git a/cwd-admin/src/views/StatsView.vue b/cwd-admin/src/views/StatsView.vue
index eb9e8de..41cbe5a 100644
--- a/cwd-admin/src/views/StatsView.vue
+++ b/cwd-admin/src/views/StatsView.vue
@@ -65,20 +65,26 @@
加载中...
{{ statsError }}
暂无评论数据
-
-
-
域名
-
总数
-
已通过
-
待审核
-
已拒绝
-
-
-
{{ item.domain }}
-
{{ item.total }}
-
{{ item.approved }}
-
{{ item.pending }}
-
{{ item.rejected }}
+
+
+
+
域名
+
总数
+
已通过
+
待审核
+
已拒绝
+
+
+
{{ item.domain }}
+
{{ item.total }}
+
{{ item.approved }}
+
{{ item.pending }}
+
{{ item.rejected }}
+
@@ -346,9 +352,16 @@ onBeforeUnmount(() => {
color: #d1242f;
}
+.domain-table-wrapper {
+ width: 100%;
+ overflow-x: auto;
+ -webkit-overflow-scrolling: touch;
+}
+
.domain-table {
border: 1px solid #d0d7de;
border-radius: 6px;
+ min-width: 520px;
overflow: hidden;
}
diff --git a/cwd-api/src/api/admin/visitAnalytics.ts b/cwd-api/src/api/admin/visitAnalytics.ts
index 0ad4857..d6a4a0f 100644
--- a/cwd-api/src/api/admin/visitAnalytics.ts
+++ b/cwd-api/src/api/admin/visitAnalytics.ts
@@ -163,7 +163,7 @@ export const getVisitPages = async (c: Context<{ Bindings: Bindings }>) => {
last_visit_at: number | null;
}>();
- const items: VisitPageItem[] = [];
+ let items: VisitPageItem[] = [];
for (const row of results) {
const domain =
@@ -184,6 +184,8 @@ export const getVisitPages = async (c: Context<{ Bindings: Bindings }>) => {
});
}
+ items = items.slice(0, 20);
+
return c.json({ items });
} catch (e: any) {
return c.json(
diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs
index e10a341..b4a0a25 100644
--- a/docs/.vitepress/config.mjs
+++ b/docs/.vitepress/config.mjs
@@ -4,7 +4,7 @@ import { defineConfig } from 'vitepress';
export default defineConfig({
title: 'CWD 评论系统文档',
- description: '基于 Cloudflare Workers 的轻量级评论系统',
+ description: '基于 Cloudflare Workers 与全球边缘网络的免服务器、极速安全、即插即用评论系统。',
lang: 'zh-CN',
head: [
[
@@ -19,7 +19,7 @@ export default defineConfig({
nav,
sidebar,
outline: {
- level: [2,3],
+ level: [2, 3],
label: 'On this page',
},
editLink: {