From c54983f70f433c1f6076d593085d90f4319b57af Mon Sep 17 00:00:00 2001 From: zefie Date: Tue, 8 Oct 2024 09:58:14 -0400 Subject: [PATCH] testing new homepage --- .../includes/ServiceVault/SharedROMCache/h.js | 4 +- .../includes/ServiceVault/wtv-home/home.js | 159 +++++++++++++++++- .../wtv-setup/phone-BYOISP-Done.js | 7 + .../ServiceVault/wtv-tricks/themes.html | 20 +++ 4 files changed, 185 insertions(+), 5 deletions(-) create mode 100644 zefie_wtvp_minisrv/includes/ServiceVault/wtv-setup/phone-BYOISP-Done.js create mode 100644 zefie_wtvp_minisrv/includes/ServiceVault/wtv-tricks/themes.html diff --git a/zefie_wtvp_minisrv/includes/ServiceVault/SharedROMCache/h.js b/zefie_wtvp_minisrv/includes/ServiceVault/SharedROMCache/h.js index 6e885ed4..75ca876d 100644 --- a/zefie_wtvp_minisrv/includes/ServiceVault/SharedROMCache/h.js +++ b/zefie_wtvp_minisrv/includes/ServiceVault/SharedROMCache/h.js @@ -27,7 +27,7 @@ function gTC(type,itm){ tclr='cbcbcb' vclr='dddddd' lclr='dddddd' - if(!itm){itm=th} + if(!itm&&itm!=0){itm=th} switch(itm){ case 1://dark bgclr='191919' @@ -236,7 +236,7 @@ function redir(){ if(r==htm+'Themes.html'||r==htm+'PhoneCallWaitThresh.html'||r==htm+'BGM.html'||r==htm+'NVRAM.html'||r.indexOf('wtv-')==0){go(r)} } -function goHTV(){return go(htm+'HackTV.html')} +function goHTV(){return go('wtv-home:/home')} function gsa(m,i,b1t,b1a,b2t,b2a){go(csa(m,i,b1t,b1a,b2t,b2a))} function head(msg,fs,bgm,lp,nl){d.write(headr(msg,fs,bgm,lp,nl))} function dhh(tit) {if(tit==1){head('Partition Map','','','',true)}} diff --git a/zefie_wtvp_minisrv/includes/ServiceVault/wtv-home/home.js b/zefie_wtvp_minisrv/includes/ServiceVault/wtv-home/home.js index f876f896..060a00d3 100644 --- a/zefie_wtvp_minisrv/includes/ServiceVault/wtv-home/home.js +++ b/zefie_wtvp_minisrv/includes/ServiceVault/wtv-home/home.js @@ -47,7 +47,7 @@ var supportZefieAlert = new clientShowAlert({ if (ssid_sessions[socket.ssid].get("wtv-used-8675309") || ssid_sessions[socket.ssid].get("wtv-need-upgrade")) { -data =` + data = ` MiniBrowser Home @@ -85,7 +85,159 @@ data =` ` } else { -data =` + hasJS = session_data.hasCap("client-can-do-javascript"); + title = `Home for ${session_data.getSessionData("subscriber_username") || "minisrv"}` + data = ``; + if (hasJS) { + data += `` + } else { + data += ` + +
+ +
+ + +
+ +${title}           +
`; + } + data += ` + +
+
+Mail - +Favorites - +Music - +Search - +ROMs - +Settings - +Help +
+
+ + + + + + + + + + + +
+ + + + + + + + +
» Community «
€ Chat
€ Discuss
€ Messenger
+
+ + + + + + + + + + + + +
» Account «
€ Relogin
€ Configure
€ Password
€ Add User
+`; + if (session_data.getSessionData("registered")) data += `€ Unregister`; + else data += `€ Register` + data += ` +
+
+ + + + + + + + + +
» Tools «
€ WTV Tricks
€ Themes +
€ Pagebuilder
€ Clear Cache
+
+ + + + + + + + + + +
» More Stuff «
€ Switch server
€ Run your own server
€ Midnight Archives
€ Help zefie
+
+ + + +
+ +` + if (hasJS) { + data += `` + } else { + data += ` + + + +` + if (hasJS) { + data += `` + } else { + data += ` + + +
` + } + data += ` + € Welcome to zefie's minisrv ${minisrv_version_string.split(" ")[3]} +
+This server is operated by ${minisrv_config.config.service_owner}.
+`; + if (minisrv_config.config.service_description) { + if (typeof minisrv_config.config.service_description === "string") { + if (minisrv_config.config.service_description.length > 0) { + data += minisrv_config.config.service_description; + } + } + } + + data += ` +

+
` + } + data += ` + € minisrv Latest Updates +
+•  Added Protoweb Support (Try it!)
+•  Added a WebTV Character Map
+•  Redesigned homepage based on MattMan69's HackTV
+•  Added a new minisrv logo
+
+
+ +` +} + +/* +data =` + + + @@ -346,4 +498,5 @@ data += ` </table> ` } -data += "</body>\n</html>"; \ No newline at end of file +data += "</body>\n</html>"; +*/ \ No newline at end of file diff --git a/zefie_wtvp_minisrv/includes/ServiceVault/wtv-setup/phone-BYOISP-Done.js b/zefie_wtvp_minisrv/includes/ServiceVault/wtv-setup/phone-BYOISP-Done.js new file mode 100644 index 00000000..2b2f22d1 --- /dev/null +++ b/zefie_wtvp_minisrv/includes/ServiceVault/wtv-setup/phone-BYOISP-Done.js @@ -0,0 +1,7 @@ +var minisrv_service_file = true; + +headers = `302 Moved +Connection: Keep-Alive +wtv-expire-all: wtv-tricks:/themes +Location: wtv-tricks:/themes +Content-Type: text/html` \ No newline at end of file diff --git a/zefie_wtvp_minisrv/includes/ServiceVault/wtv-tricks/themes.html b/zefie_wtvp_minisrv/includes/ServiceVault/wtv-tricks/themes.html new file mode 100644 index 00000000..adceab0b --- /dev/null +++ b/zefie_wtvp_minisrv/includes/ServiceVault/wtv-tricks/themes.html @@ -0,0 +1,20 @@ +<html><head><display nooptions noscroll allowoffline notvaudio switchtowebmode noreconnectalert nosave nosend> +<script src=/ROMCache/h.js></script><script src=/ROMCache/n.js></script></head> +<script>head('Theme Settings','large','',5) +function sBG(c){sB(0,c)}</script> +<spacer width=30 height=6 type=vertical> +<table cellspacing=0 cellpadding=0><tr><td abswidth=14><td colspan=3><spacer height=20 type=vertical><td> + <tr><td><td width=350 height=230 valign=top align=left> + <table cellspacing=0 cellpadding=0><tr><td height=250 valign=top> + <font size=-1> Please select the theme you would like to use from the list below. Click done when finished.<br> + <table cellspacing=0 cellpadding=4><tr><font size=-2><script> + for(i=0;i<z_th.length;i++){ + if(i==th){s=' selected'} + else{s=''} + if(i%6==0){d.write('<tr>')} + d.write('<td align=center><font size=-1>'+gTN(i)+'</font><br>') + d.write('<table border=1 href="javascript:sBG('+i+')" insetselection'+s+'><tr><td bgcolor='+gTC('bg',i)+' height=45 width=60></table>') + }</script></table> + </table> + <tr><td width=330 valign=top align=right colspan=2><br><form action="javascript:goHTV()"><script>butt('Done','Done',160);</script></form> +</table></body></html> \ No newline at end of file