From b200ed242d88c29d10708f0d58474d9c1cd513b2 Mon Sep 17 00:00:00 2001 From: thofx Date: Wed, 27 Dec 2023 23:39:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E4=B8=8D=E5=B1=85=E4=B8=AD=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20=E5=8E=86=E5=8F=B2=E5=8E=86=E5=8F=B2=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=BF=A1=E6=81=AF=E4=BD=BF=E7=94=A8tooltip=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=20fix:=E8=A7=A3=E5=86=B3=E5=BD=93=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E8=BF=87=E5=A4=9A=E5=AF=BC=E8=87=B4=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=8D=A1=E9=A1=BF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/vuetify/defaults.ts | 2 +- src/styles/styles.scss | 4 + src/util/dom.ts | 15 ++ src/views/discover/TorrentCardListView.vue | 23 ++- src/views/discover/TorrentRowListView.vue | 54 +++--- src/views/reorganize/TransferHistoryView.vue | 185 +++++++++---------- 6 files changed, 144 insertions(+), 139 deletions(-) diff --git a/src/plugins/vuetify/defaults.ts b/src/plugins/vuetify/defaults.ts index 452427e2..ddf2eb21 100644 --- a/src/plugins/vuetify/defaults.ts +++ b/src/plugins/vuetify/defaults.ts @@ -31,7 +31,7 @@ export default { elevation: 0, }, VList: { - activeColor: 'primary', + color: 'primary', }, VPagination: { activeColor: 'primary', diff --git a/src/styles/styles.scss b/src/styles/styles.scss index ac9c7bfd..8d65e53d 100644 --- a/src/styles/styles.scss +++ b/src/styles/styles.scss @@ -3,6 +3,10 @@ @tailwind components; @tailwind utilities; +:root{ + font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei UI", "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; +} + #nprogress .bar { background: rgb(var(--v-theme-primary)) !important; top: env(safe-area-inset-top) !important; diff --git a/src/util/dom.ts b/src/util/dom.ts index d113007b..ad5504ce 100644 --- a/src/util/dom.ts +++ b/src/util/dom.ts @@ -4,3 +4,18 @@ export function removeEl(selector: string) { el?.parentNode?.removeChild(el) } } + +export function useDefer(maxFrameCount = 1) { + const frameCount = ref(0) + const refreshFrameCount = () => { + requestAnimationFrame(() => { + frameCount.value++ + if (frameCount.value < maxFrameCount) + refreshFrameCount() + }) + } + refreshFrameCount() + return function (showInFrameCount: number) { + return frameCount.value >= showInFrameCount + } +} diff --git a/src/views/discover/TorrentCardListView.vue b/src/views/discover/TorrentCardListView.vue index 73f24b22..156b0508 100644 --- a/src/views/discover/TorrentCardListView.vue +++ b/src/views/discover/TorrentCardListView.vue @@ -1,6 +1,8 @@ @@ -216,12 +222,9 @@ watchEffect(() => {
- +
+ +
diff --git a/src/views/discover/TorrentRowListView.vue b/src/views/discover/TorrentRowListView.vue index 50e0910e..aaa51a0a 100644 --- a/src/views/discover/TorrentRowListView.vue +++ b/src/views/discover/TorrentRowListView.vue @@ -1,4 +1,5 @@