V1.3.1
This commit is contained in:
@@ -10,49 +10,20 @@ Copyright (c) 2018-2024 by 于小丘Yuerchu, All Rights Reserved.
|
||||
'''
|
||||
|
||||
from nicegui import ui
|
||||
from fastapi import Request
|
||||
from tool import *
|
||||
from ..framework import frame
|
||||
|
||||
|
||||
def create():
|
||||
@ui.page('/admin/about')
|
||||
async def admin_about():
|
||||
|
||||
dark_mode = ui.dark_mode(value=True)
|
||||
|
||||
ui.add_head_html(
|
||||
code="""
|
||||
<style>
|
||||
a:link:not(.browser-window *),
|
||||
a:visited:not(.browser-window *) {
|
||||
color: inherit !important;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover:not(.browser-window *),
|
||||
a:active:not(.browser-window *) {
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
.bold-links a:link {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.arrow-links a:link:not(.auto-link)::after {
|
||||
content: "north_east";
|
||||
font-family: "Material Icons";
|
||||
font-weight: 100;
|
||||
vertical-align: -10%;
|
||||
}
|
||||
</style>
|
||||
"""
|
||||
)
|
||||
|
||||
async def admin_about(request: Request):
|
||||
ui.add_head_html("""
|
||||
<style type="text/css" src="/static/css/about.css"></style>
|
||||
<script type="text/javascript" src="/static/js/main.js"></script>
|
||||
""")
|
||||
|
||||
async with frame():
|
||||
async with frame(request=request):
|
||||
|
||||
# 关于 Findreve
|
||||
with ui.tab_panel('about'):
|
||||
|
||||
@@ -11,17 +11,15 @@ Copyright (c) 2018-2024 by 于小丘Yuerchu, All Rights Reserved.
|
||||
|
||||
from nicegui import ui
|
||||
from tool import *
|
||||
from fastapi import Request
|
||||
from ..framework import frame
|
||||
|
||||
|
||||
def create():
|
||||
@ui.page('/admin/auth')
|
||||
async def admin_auth():
|
||||
|
||||
dark_mode = ui.dark_mode(value=True)
|
||||
|
||||
async def admin_auth(request: Request):
|
||||
# Findreve 授权
|
||||
async with frame():
|
||||
async with frame(request=request):
|
||||
|
||||
ui.label('Findreve 授权').classes('text-2xl text-bold')
|
||||
|
||||
|
||||
@@ -9,22 +9,21 @@ Description: Findreve 后台管理 admin
|
||||
Copyright (c) 2018-2024 by 于小丘Yuerchu, All Rights Reserved.
|
||||
'''
|
||||
|
||||
from nicegui import ui
|
||||
from nicegui import ui, app
|
||||
from fastapi import Request
|
||||
from fastapi.responses import RedirectResponse
|
||||
from tool import *
|
||||
from ..framework import frame
|
||||
|
||||
|
||||
def create():
|
||||
@ui.page('/admin')
|
||||
@app.get('/admin')
|
||||
async def jump():
|
||||
ui.navigate.to('/admin/home')
|
||||
|
||||
return RedirectResponse(url='/admin/home')
|
||||
|
||||
@ui.page('/admin/home')
|
||||
async def admin_home():
|
||||
|
||||
dark_mode = ui.dark_mode(value=True)
|
||||
|
||||
async with frame():
|
||||
async def admin_home(request: Request):
|
||||
async with frame(request=request):
|
||||
with ui.tab_panel('main_page'):
|
||||
ui.label('首页配置').classes('text-2xl text-bold')
|
||||
ui.label('暂不支持,请直接修改main_page.py').classes('text-md text-gray-600').classes('w-full')
|
||||
Reference in New Issue
Block a user