Skip to content

Commit

Permalink
Merge pull request #59 from TZFC/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
TZFC authored Jan 3, 2024
2 parents 9e8323d + 7d3f84b commit e681eba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
7 changes: 6 additions & 1 deletion master.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ async def any_event(event):
event_types.add(event['type'])


async def refresh_credentials_loop(master_config: dict, room_infos: dict, database: MySQLConnection):
while True:
await refresh_credentials(master_config, room_infos, database)


async def refresh_credentials(master_config: dict, room_infos: dict, database: MySQLConnection):
for __master in master_config["masters"]:
__credential = get_credential(__master)
Expand Down Expand Up @@ -140,4 +145,4 @@ async def refresh_credentials(master_config: dict, room_infos: dict, database: M
bind(live_danmaku=roomInfos[room_id]['live_danmaku'], master_config=masterConfig)
if __name__ == "__main__":
sync(asyncio.gather(*[roomInfos[room_id]['live_danmaku'].connect() for room_id in ROOM_IDS],
refresh_credentials(master_config=masterConfig, room_infos=roomInfos, database=mydb)))
refresh_credentials_loop(master_config=masterConfig, room_infos=roomInfos, database=mydb)))
12 changes: 6 additions & 6 deletions web/rolling_style.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+HK:wght@700&family=Noto+Serif+JP:wght@700&family=Noto+Serif+SC:wght@700&family=Noto+Serif+TC:wght@700&display=swap');
@keyframes scrollup{
from{
transform: translateY(calc(100% + 100vh));
transform: translateY(100vh);
}
to{
transform: translateY(calc(-100% - 20vh));
transform: translateY(calc(-100% - 100vh));
}
}
html,body{
Expand All @@ -20,7 +20,7 @@ body::before{
}
body{
color:#fff; /* 正文颜色 */
animation:scrollup 10s linear infinite; /* 滚动时间 */
animation:scrollup 120s linear infinite; /* 滚动时间 */
background-color:transparent;
position:relative;
width:fit-content;
Expand All @@ -37,7 +37,7 @@ body{
p{
margin: 50px 0px; /* 段落间距 竖向 横向 */
text-align: center;
display: none;
display: block; /* 默认全部显示 */
}
#_1 ._30 .top::before{ /* 排名第一且30场全勤头衔 */
content:"老公 ";
Expand All @@ -56,6 +56,6 @@ p{
#_1{
color:#76ea8f;/* 当前第一名颜色(会被全勤覆写) */
}
#_1, #_2, #_3{ /* 前三名 */
display: block; /* 显示 */
._0, ._1, ._2 { /* 打卡 0场 与 1场 与 2场*/
display: none; /* 不显示 */
}

0 comments on commit e681eba

Please sign in to comment.