First commit
This commit is contained in:
36
Tesses.YouTubeDownloader.Server/src/pages/list.tcross
Normal file
36
Tesses.YouTubeDownloader.Server/src/pages/list.tcross
Normal file
@@ -0,0 +1,36 @@
|
||||
func Pages.List(tytd,ctx)
|
||||
{
|
||||
var name = ctx.QueryParams.TryGetFirst("name");
|
||||
var page = ctx.QueryParams.TryGetFirstInt("page");
|
||||
if(TypeOf(page) != "Long") page = 1;
|
||||
page--;
|
||||
if(TypeOf(name) != "String")
|
||||
{
|
||||
name = "";
|
||||
}
|
||||
|
||||
var res = tytd.GetPersonalListContents(name, page, 20);
|
||||
|
||||
var html = <null>
|
||||
<div class="row">
|
||||
<div class="min">
|
||||
<button hx-get="./downloads?type=personal" hx-target="body" hx-push-url="true"><i>arrow_back</i></button>
|
||||
</div>
|
||||
<div class="max">
|
||||
<h1>{name}</h1>
|
||||
</div>
|
||||
</div>
|
||||
<each(var item : res)>
|
||||
<raw(Components.DownloadedVideo(item))>
|
||||
</each>
|
||||
<footer class="row center-align">
|
||||
|
||||
<button hx-get={$"./downloads?name={Net.Http.UrlEncode(name)}&page={page}"} hx-target="body" hx-push-url="true" >Prev</button>{page+1}<button hx-get={$"./downloads?name={Net.Http.UrlEncode(name)}&page={page+2}"} hx-target="body" hx-push-url="true" >Next</button>
|
||||
|
||||
</footer>
|
||||
|
||||
</null>;
|
||||
|
||||
|
||||
return Components.Shell($"Personal List {name}",html,1);
|
||||
}
|
||||
Reference in New Issue
Block a user