mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-11 05:56:55 +03:00
refactor: unify dynamic page structure
This commit is contained in:
54
fe-app-podkop/src/podkop/tabs/dashboard/render.ts
Normal file
54
fe-app-podkop/src/podkop/tabs/dashboard/render.ts
Normal file
@@ -0,0 +1,54 @@
|
||||
import { renderSections, renderWidget } from './partials';
|
||||
|
||||
export function render() {
|
||||
return E(
|
||||
'div',
|
||||
{
|
||||
id: 'dashboard-status',
|
||||
class: 'pdk_dashboard-page',
|
||||
},
|
||||
[
|
||||
// Widgets section
|
||||
E('div', { class: 'pdk_dashboard-page__widgets-section' }, [
|
||||
E(
|
||||
'div',
|
||||
{ id: 'dashboard-widget-traffic' },
|
||||
renderWidget({ loading: true, failed: false, title: '', items: [] }),
|
||||
),
|
||||
E(
|
||||
'div',
|
||||
{ id: 'dashboard-widget-traffic-total' },
|
||||
renderWidget({ loading: true, failed: false, title: '', items: [] }),
|
||||
),
|
||||
E(
|
||||
'div',
|
||||
{ id: 'dashboard-widget-system-info' },
|
||||
renderWidget({ loading: true, failed: false, title: '', items: [] }),
|
||||
),
|
||||
E(
|
||||
'div',
|
||||
{ id: 'dashboard-widget-service-info' },
|
||||
renderWidget({ loading: true, failed: false, title: '', items: [] }),
|
||||
),
|
||||
]),
|
||||
// All outbounds
|
||||
E(
|
||||
'div',
|
||||
{ id: 'dashboard-sections-grid' },
|
||||
renderSections({
|
||||
loading: true,
|
||||
failed: false,
|
||||
section: {
|
||||
code: '',
|
||||
displayName: '',
|
||||
outbounds: [],
|
||||
withTagSelect: false,
|
||||
},
|
||||
onTestLatency: () => {},
|
||||
onChooseOutbound: () => {},
|
||||
latencyFetching: false,
|
||||
}),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user