File tree Expand file tree Collapse file tree 9 files changed +101
-37
lines changed Expand file tree Collapse file tree 9 files changed +101
-37
lines changed Original file line number Diff line number Diff line change 66 <NotFound >
77 <PageTitle >Not found</PageTitle >
88 <LayoutView Layout =" @typeof(MainLayout)" >
9- <p role = " alert " >Sorry, there's nothing at this address.</ p >
9+ <ErrorPage / >
1010 </LayoutView >
1111 </NotFound >
1212</Router >
Original file line number Diff line number Diff line change 1- <MudAppBar
1+ @inject Data Datas
2+ @inject NavigationManager nav
3+ @inject IJSRuntime JSRuntime
4+ @inject Data Datas
5+ <MudAppBar
26 Color =" Color.Secondary"
37 Fixed =" true"
48 Dense =" true"
2832 </div >
2933 </MudPaper >
3034</MudAppBar >
31-
32-
33-
34- @inject Data Datas
35- @inject NavigationManager nav
36- @inject IJSRuntime JSRuntime
37- @inject Data Datas
38-
35+
3936@code {
4037 public string FindData = string .Empty ;
41- protected override async Task OnInitializedAsync ()
42- {
43- Datas .OnChange += StateHasChanged ;
44- await Datas .InitializeAsync ();
45- }
46-
47- public void Dispose ()
48- {
49- Datas .OnChange -= StateHasChanged ;
50- }
38+
5139 void GoToHomePage ()
5240 {
5341 nav .NavigateTo (" " );
8674 }
8775}
8876
77+ @code {
78+ protected override async Task OnInitializedAsync ()
79+ {
80+ Datas .OnChange += StateHasChanged ;
81+ await Datas .InitializeAsync ();
82+ }
83+
84+ public void Dispose ()
85+ {
86+ Datas .OnChange -= StateHasChanged ;
87+ }
88+ }
8989<style >
9090 .InputContainer {
9191 height : 40px ;
Original file line number Diff line number Diff line change 1+ @inject NavigationManager nav
2+ @inject IDialogService DialogService
3+ <MudPaper Class =" d-flex flex-wrap justify-center "
4+ Style =" background-color:transparent"
5+ Elevation =" 0"
6+ Width =" 100%" >
7+ <MudImage
8+ Src =" Tom.png"
9+ Alt =" 404 Error page"
10+ Class =" rounded-lg imageHight"
11+ @onclick =" Home"
12+ />
13+ </MudPaper >
14+ <MudDialog @bind-IsVisible =" visible" Options =" dialogOptions" >
15+ <DialogContent >
16+ <MudImage Src =" Tom.png"
17+ Alt =" 404 Error page"
18+ Class =" rounded-lg"
19+ Fluid =true
20+ @onclick =" Home" />
21+ <MudButton Variant =" Variant.Outlined"
22+ Color =" Color.Secondary"
23+ OnClick =" Home"
24+ Class =" px-10 " FullWidth =true >Go Home</MudButton >
25+ </DialogContent >
26+ </MudDialog >
27+ @code {
28+ private bool visible = true ;
29+ private DialogOptions dialogOptions = new () { FullWidth = true , ClassBackground = " my-custom-class" };
30+ void Home ()
31+ {
32+ visible = false ;
33+ nav .NavigateTo ($" " );
34+ }
35+ }
36+
37+ <style >
38+ .imageHight
39+ {
40+ height :80% ;
41+ width :80% ;
42+ }
43+
44+ .my-custom-class {
45+ backdrop-filter : blur (10px );
46+ }
47+ </style >
Original file line number Diff line number Diff line change 1313
1414@code
1515{
16- [Parameter ] public Video VideoModel { get ; set ; }
16+ [Parameter ] public Video VideoModel { get ; set ; } = new ();
1717 public void GoTOPage ()
1818 {
1919 nav .NavigateTo ($" playmedia/{VideoModel .VideoId }" );
Original file line number Diff line number Diff line change 2626 protected override async Task OnInitializedAsync ()
2727 {
2828 Datas .OnChange += StateHasChanged ;
29- await Datas .InitializeAsync ();
29+ // await Datas.InitializeAsync();
3030 }
3131
3232 public void Dispose ()
Original file line number Diff line number Diff line change 2626 </MudText >
2727 </MudListItem >
2828 <MudListItem >
29- <MudTabs Elevation =" 2" Rounded =" true" ApplyEffectsToContainer =" true" PanelClass =" pa-6" >
30- <MudTabPanel Text =" Giscuss" >
31- <Giscus Term =" @Datas.GetVideo(VideId).CommentName" />
32- </MudTabPanel >
33- <MudTabPanel
34- Text =" Disqus"
35- OnClick =" @(()=>LoadGiscud(Datas.GetVideo(VideId).CommentName))" >
36- <div id =" disqus_thread" ></div >
37- </MudTabPanel >
38- </MudTabs >
29+ @if (show )
30+ {
31+ <MudButton
32+ OnClick =" ShowComment"
33+ Color =" Color.Secondary"
34+ Variant =" Variant.Outlined" >
35+ Show Comment
36+ </MudButton >
37+ }
38+ else
39+ {
40+ <MudTabs Elevation =" 2" Rounded =" true" ApplyEffectsToContainer =" true" PanelClass =" pa-6" >
41+ <MudTabPanel Text =" Giscuss" >
42+ <Giscus Term =" @Datas.GetVideo(VideId).CommentName" />
43+ </MudTabPanel >
44+ <MudTabPanel
45+ Text =" Disqus"
46+ OnClick =" @(()=>LoadGiscud(Datas.GetVideo(VideId).CommentName))" >
47+ <div id =" disqus_thread" ></div >
48+ </MudTabPanel >
49+ </MudTabs >
50+ }
3951 </MudListItem >
4052 </MudList >
4153 </MudItem >
5769
5870@code
5971{
72+ bool show = true ;
6073 [Parameter ] public string VideId { get ; set ; } = string .Empty ;
6174 public async Task GoTOPage (Video video )
6275 {
6780 {
6881 await JS .InvokeVoidAsync (" loadDisqus" , nav .Uri , id );
6982 }
70-
71- protected override async Task OnInitializedAsync ()
83+ void ShowComment ()
7284 {
85+ show = false ;
86+ StateHasChanged ();
87+ }
88+ protected override async Task OnInitializedAsync ()
89+ {
7390 Datas .OnChange += StateHasChanged ;
74- await Datas .InitializeAsync ();
91+ // await Datas.InitializeAsync();
7592 }
7693
7794 public void Dispose ()
Original file line number Diff line number Diff line change 2525 {
2626 Datas .OnChange += StateHasChanged ;
2727
28- await Datas .InitializeAsync ();
28+ // await Datas.InitializeAsync();
2929 // await Datas.GetFilteredVideos(searchterm);
3030 }
3131
Original file line number Diff line number Diff line change 55 "start_url" : " ./" ,
66 "display" : " standalone" ,
77 "background_color" : " #ffffff" ,
8- "theme_color" : " #03173d " ,
8+ "theme_color" : " #f64a82 " ,
99 "prefer_related_applications" : false ,
1010 "icons" : [
1111 {
You can’t perform that action at this time.
0 commit comments