From 20a1fc055634e96cf3ecbe90e7fac21005f1d12d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <1173718158@qq.com> Date: Wed, 1 Jan 2025 04:46:48 +0800 Subject: [PATCH] . --- py/LunaTranslator/gui/setting_year.py | 16 ++++------- py/files/yearsummary/yearsummary.html | 40 ++++++++++++++++++--------- 2 files changed, 32 insertions(+), 24 deletions(-) diff --git a/py/LunaTranslator/gui/setting_year.py b/py/LunaTranslator/gui/setting_year.py index 281acc38..7e6ab6aa 100644 --- a/py/LunaTranslator/gui/setting_year.py +++ b/py/LunaTranslator/gui/setting_year.py @@ -54,20 +54,14 @@ def calc_uid_times(inf): return everytimes -def spliteverygameinmothon(yearinfos): - allmonths = [] - for uid in yearinfos: - everydays = split_range_into_days(yearinfos, uidx=uid) - everymonth = group_by_month(everydays) - - def getthisyearinfo(allinfos): - current_year = datetime.now().year + current_year = datetime.now().year * 12 + datetime.now().month yearinfos = {} for uid, ls in allinfos.items(): yearinfos[uid] = [] for s, e in ls: - if datetime.fromtimestamp(s).year == current_year: + date = datetime.fromtimestamp(s) + if date.year * 12 + date.month + 12 >= current_year: yearinfos[uid].append((s, e)) if len(yearinfos[uid]) == 0: yearinfos.pop(uid) @@ -122,11 +116,11 @@ def getuidimage_local(uid): if (main in savehook_new_data[uid]["imagepath_all"]) and os.path.exists( extradatas["localedpath"].get(main, main) ): - return os.path.abspath(main) + return os.path.abspath(extradatas["localedpath"].get(main, main)) else: for _ in savehook_new_data[uid]["imagepath_all"]: if os.path.exists(extradatas["localedpath"].get(_, _)): - return os.path.abspath(_) + return os.path.abspath(extradatas["localedpath"].get(_, _)) def getuidimage(uid): diff --git a/py/files/yearsummary/yearsummary.html b/py/files/yearsummary/yearsummary.html index 54ae18ad..2781bf02 100644 --- a/py/files/yearsummary/yearsummary.html +++ b/py/files/yearsummary/yearsummary.html @@ -13,13 +13,18 @@ .page { display: none; } - .vboxlayout{ - display: flex; flex-direction: column; + + .vboxlayout { + display: flex; + flex-direction: column; } - .hboxlayout{ - display: flex; flex-direction: row; + + .hboxlayout { + display: flex; + flex-direction: row; } + .active { display: block; } @@ -114,7 +119,7 @@ .imagecontainer { width: 20%; height: auto; - aspect-ratio: 1 / 1.618; + aspect-ratio: 1 / 1.5; } .imagexx { @@ -161,23 +166,32 @@
-

你所玩的游戏的标签

-
+

你所玩的游戏的标签

+
+
+
+
-

你所玩的游戏的开发商

-
+

你所玩的游戏的开发商

+
+
+
+
Next