Бета-вариант динамичных сайтов

This commit is contained in:
justuser 2024-06-21 20:44:58 +03:00
parent ffcf047286
commit 19349a0946

View File

@ -76,7 +76,12 @@ def update_sites(n, s_val):
res = []
for i in next(walk('cached/'), (None, None, []))[1]:
res.append(html.Div([ dcc.Link(children=i, href=f'{domain}/{i}',
conf = read(f'cached/{i}/config.json')
if conf['type'] == 'dynamic':
res.append(html.Div([ dcc.Link(children=i, href=f'http://bore.pub:{conf["port"]}',
target='_blank') ], className='sites_elem'))
else:
res.append(html.Div([ dcc.Link(children=i, href=f'{domain}/{i}',
target='_blank') ], className='sites_elem'))
return res