This commit is contained in:
@@ -35,131 +35,19 @@
|
|||||||
<p>로드 중...</p>
|
<p>로드 중...</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<Routes @rendermode="InteractiveWebAssembly" />
|
||||||
// 로그인 화면은 prerender로 즉시 표시되므로 스피너가 필요 없다.
|
|
||||||
// 그 외 인증 화면은 WASM 부팅이 끝날 때까지(AdminShell.OnAfterRenderAsync에서 hideLoading 호출)
|
|
||||||
// 스피너를 "업데이트 스플래시"로 보여준다.
|
|
||||||
if (!document.documentElement.classList.contains('admin-login-route')) {
|
|
||||||
var loadingOverlay = document.getElementById('blazor-loading');
|
|
||||||
if (loadingOverlay) loadingOverlay.classList.add('show');
|
|
||||||
window.setTimeout(function () {
|
|
||||||
if (window.taxbaikAdminSession && typeof window.taxbaikAdminSession.hideLoading === 'function') {
|
|
||||||
window.taxbaikAdminSession.hideLoading();
|
|
||||||
}
|
|
||||||
}, 8000);
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
<MudThemeProvider @bind-IsDarkMode="isDarkMode" Theme="mudTheme" />
|
|
||||||
<Routes />
|
|
||||||
<script src="/taxbaik/_content/MudBlazor/MudBlazor.min.js"></script>
|
<script src="/taxbaik/_content/MudBlazor/MudBlazor.min.js"></script>
|
||||||
<script src="/taxbaik/js/admin-session.js"></script>
|
<script src="/taxbaik/js/admin-session.js"></script>
|
||||||
<script src="/taxbaik/admin/_framework/blazor.webassembly.js"></script>
|
<script src="/taxbaik/admin/_framework/blazor.webassembly.js"></script>
|
||||||
<script>
|
<script>
|
||||||
// admin-session.js 로드 완료 대기 후 초기화
|
if (document.documentElement.classList.contains('admin-login-route') &&
|
||||||
function initSession() {
|
window.taxbaikAdminSession &&
|
||||||
if (window.taxbaikAdminSession) {
|
typeof window.taxbaikAdminSession.bindLoginForm === 'function') {
|
||||||
if (typeof window.taxbaikAdminSession.initErrorLogging === 'function') {
|
window.taxbaikAdminSession.bindLoginForm();
|
||||||
window.taxbaikAdminSession.initErrorLogging();
|
|
||||||
}
|
|
||||||
if (typeof window.taxbaikAdminSession.bindLoginForm === 'function') {
|
|
||||||
window.taxbaikAdminSession.bindLoginForm();
|
|
||||||
}
|
|
||||||
if (typeof window.taxbaikAdminSession.watchReconnect === 'function') {
|
|
||||||
window.taxbaikAdminSession.watchReconnect();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// admin-session.js가 아직 로드되지 않았으면 재시도
|
|
||||||
setTimeout(initSession, 50);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
initSession();
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
private bool isDarkMode = false;
|
|
||||||
private MudTheme mudTheme = new()
|
|
||||||
{
|
|
||||||
Palette = new PaletteLight()
|
|
||||||
{
|
|
||||||
Primary = "#1976D2",
|
|
||||||
PrimaryContrastText = "#FFFFFF",
|
|
||||||
Secondary = "#2D9F7E",
|
|
||||||
SecondaryContrastText = "#FFFFFF",
|
|
||||||
Tertiary = "#FF8A50",
|
|
||||||
TertiaryContrastText = "#FFFFFF",
|
|
||||||
Surface = "#F5F7FA",
|
|
||||||
Background = "#FFFFFF",
|
|
||||||
BackgroundGrey = "#F8F9FB",
|
|
||||||
DrawerBackground = "#FFFFFF",
|
|
||||||
DrawerText = "#424242",
|
|
||||||
AppbarBackground = "#FFFFFF",
|
|
||||||
AppbarText = "#424242",
|
|
||||||
TextPrimary = "#1A1A1A",
|
|
||||||
TextSecondary = "#64748B",
|
|
||||||
TextDisabled = "#94A3B8",
|
|
||||||
ActionDefault = "#1976D2",
|
|
||||||
ActionDisabled = "#BDBDBD",
|
|
||||||
Divider = "#E2E8F0",
|
|
||||||
DividerLight = "#F1F5F9",
|
|
||||||
Error = "#DC2626",
|
|
||||||
ErrorContrastText = "#FFFFFF",
|
|
||||||
Warning = "#F59E0B",
|
|
||||||
WarningContrastText = "#FFFFFF",
|
|
||||||
Info = "#06B6D4",
|
|
||||||
InfoContrastText = "#FFFFFF",
|
|
||||||
Success = "#16A34A",
|
|
||||||
SuccessContrastText = "#FFFFFF",
|
|
||||||
},
|
|
||||||
LayoutProperties = new LayoutProperties()
|
|
||||||
{
|
|
||||||
DefaultBorderRadius = "6px"
|
|
||||||
},
|
|
||||||
Typography = new Typography()
|
|
||||||
{
|
|
||||||
Default = new Default()
|
|
||||||
{
|
|
||||||
FontSize = ".8125rem",
|
|
||||||
FontWeight = 400,
|
|
||||||
LineHeight = 1.5
|
|
||||||
},
|
|
||||||
H1 = new H1()
|
|
||||||
{
|
|
||||||
FontSize = "1.75rem",
|
|
||||||
FontWeight = 600,
|
|
||||||
LineHeight = 1.2
|
|
||||||
},
|
|
||||||
H2 = new H2()
|
|
||||||
{
|
|
||||||
FontSize = "1.5rem",
|
|
||||||
FontWeight = 600,
|
|
||||||
LineHeight = 1.3
|
|
||||||
},
|
|
||||||
H3 = new H3()
|
|
||||||
{
|
|
||||||
FontSize = "1.25rem",
|
|
||||||
FontWeight = 600,
|
|
||||||
LineHeight = 1.3
|
|
||||||
},
|
|
||||||
H4 = new H4()
|
|
||||||
{
|
|
||||||
FontSize = "1.1rem",
|
|
||||||
FontWeight = 600,
|
|
||||||
LineHeight = 1.4
|
|
||||||
},
|
|
||||||
H5 = new H5()
|
|
||||||
{
|
|
||||||
FontSize = "0.95rem",
|
|
||||||
FontWeight = 500,
|
|
||||||
LineHeight = 1.4
|
|
||||||
},
|
|
||||||
H6 = new H6()
|
|
||||||
{
|
|
||||||
FontSize = "0.85rem",
|
|
||||||
FontWeight = 500,
|
|
||||||
LineHeight = 1.5
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
Dense="true"
|
Dense="true"
|
||||||
Hover="true"
|
Hover="true"
|
||||||
Striped="true"
|
Striped="true"
|
||||||
Virtualize="true"
|
|
||||||
RowsPerPage="30"
|
RowsPerPage="30"
|
||||||
Class="admin-grid">
|
Class="admin-grid">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ else
|
|||||||
Dense="true"
|
Dense="true"
|
||||||
Hover="true"
|
Hover="true"
|
||||||
Striped="true"
|
Striped="true"
|
||||||
Virtualize="true"
|
|
||||||
RowsPerPage="30"
|
RowsPerPage="30"
|
||||||
SelectedItem="@selectedContract"
|
SelectedItem="@selectedContract"
|
||||||
SelectedItemChanged="OnRowSelected"
|
SelectedItemChanged="OnRowSelected"
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
Dense="true"
|
Dense="true"
|
||||||
Hover="true"
|
Hover="true"
|
||||||
Striped="true"
|
Striped="true"
|
||||||
Virtualize="true"
|
|
||||||
RowsPerPage="30"
|
RowsPerPage="30"
|
||||||
Class="admin-grid">
|
Class="admin-grid">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ else
|
|||||||
Dense="true"
|
Dense="true"
|
||||||
Hover="true"
|
Hover="true"
|
||||||
Striped="true"
|
Striped="true"
|
||||||
Virtualize="true"
|
|
||||||
RowsPerPage="30"
|
RowsPerPage="30"
|
||||||
SelectedItem="@selectedSchedule"
|
SelectedItem="@selectedSchedule"
|
||||||
SelectedItemChanged="OnRowSelected"
|
SelectedItemChanged="OnRowSelected"
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ else
|
|||||||
Dense="true"
|
Dense="true"
|
||||||
Hover="true"
|
Hover="true"
|
||||||
Striped="true"
|
Striped="true"
|
||||||
Virtualize="true"
|
|
||||||
RowsPerPage="30"
|
RowsPerPage="30"
|
||||||
SelectedItem="@selectedProfile"
|
SelectedItem="@selectedProfile"
|
||||||
SelectedItemChanged="OnRowSelected"
|
SelectedItemChanged="OnRowSelected"
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
@inject NavigationManager Navigation
|
@inject NavigationManager Navigation
|
||||||
@inject IJSRuntime JS
|
|
||||||
@implements IDisposable
|
@implements IDisposable
|
||||||
|
|
||||||
<MudPopoverProvider />
|
|
||||||
<MudDialogProvider />
|
|
||||||
<MudSnackbarProvider />
|
|
||||||
|
|
||||||
<MudLayout Class="admin-shell">
|
<MudLayout Class="admin-shell">
|
||||||
<MudAppBar Elevation="0" Class="admin-topbar">
|
<MudAppBar Elevation="0" Class="admin-topbar">
|
||||||
<MudIconButton Icon="@Icons.Material.Filled.Menu"
|
<MudIconButton Icon="@Icons.Material.Filled.Menu"
|
||||||
@@ -43,7 +38,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</MudAppBar>
|
</MudAppBar>
|
||||||
|
|
||||||
<MudDrawer @bind-open="@drawerOpen"
|
<MudDrawer Open="@drawerOpen"
|
||||||
Elevation="0"
|
Elevation="0"
|
||||||
Variant="DrawerVariant.Responsive"
|
Variant="DrawerVariant.Responsive"
|
||||||
Breakpoint="Breakpoint.Md"
|
Breakpoint="Breakpoint.Md"
|
||||||
@@ -106,27 +101,13 @@
|
|||||||
Navigation.LocationChanged += OnLocationChanged;
|
Navigation.LocationChanged += OnLocationChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
|
||||||
{
|
|
||||||
if (firstRender)
|
|
||||||
{
|
|
||||||
await JS.InvokeVoidAsync("taxbaikAdminSession.setContext", "admin/shell", "navigation", "layout", "shell", "shell", "", "main");
|
|
||||||
await JS.InvokeVoidAsync("taxbaikAdminSession.hideLoading");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnLocationChanged(object? sender, LocationChangedEventArgs args)
|
private void OnLocationChanged(object? sender, LocationChangedEventArgs args)
|
||||||
{
|
{
|
||||||
var route = new Uri(args.Location).AbsolutePath;
|
|
||||||
_ = JS.InvokeVoidAsync("taxbaikAdminSession.setContext", route, "navigation", "route-change", "layout", "shell", "", route);
|
|
||||||
_ = InvokeAsync(() => JS.InvokeVoidAsync("taxbaikAdminSession.hideLoading"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ToggleDrawer()
|
private void ToggleDrawer()
|
||||||
{
|
{
|
||||||
drawerOpen = !drawerOpen;
|
drawerOpen = !drawerOpen;
|
||||||
_ = JS.InvokeVoidAsync("taxbaikAdminSession.setContext", "admin/shell", "navigation", "drawer", drawerOpen ? "opened" : "closed", "shell", "", "drawer");
|
|
||||||
_ = JS.InvokeVoidAsync("taxbaikAdminSession.traceUiState", "admin-shell", drawerOpen ? "drawer opened" : "drawer closed");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void NavigateTo(string url)
|
private void NavigateTo(string url)
|
||||||
|
|||||||
Reference in New Issue
Block a user