From 1bd7651e1a625e6b62b7adb67f17be36a3a27e21 Mon Sep 17 00:00:00 2001 From: Mehmet Ali <87281783+malisipi@users.noreply.github.com> Date: Wed, 2 Feb 2022 18:16:17 +0300 Subject: [PATCH] Updates * Login screen * PWA support --- LICENSE.md | 2 +- apps/terminal/js/main.js | 4 +-- assets/144.png | Bin 0 -> 3706 bytes assets/192.png | Bin 0 -> 4903 bytes assets/512.png | Bin 0 -> 14781 bytes assets/Vector.svg | 5 ++++ css/login.css | 55 +++++++++++++++++++++++++++++++++++++++ css/panel.css | 5 ++++ index.html | 23 +++++++++++++--- js/login.js | 7 +++++ js/panel.js | 37 +++++++++++++++++++++++--- js/pwa.js | 13 +++++++++ js/status.js | 20 +++++++++++++- manifest.webmanifest | 29 +++++++++++++++++++++ service-worker.js | 3 +++ status.html | 9 ++++--- 16 files changed, 198 insertions(+), 14 deletions(-) create mode 100644 assets/144.png create mode 100644 assets/192.png create mode 100644 assets/512.png create mode 100644 assets/Vector.svg create mode 100644 css/login.css create mode 100644 js/login.js create mode 100644 js/pwa.js create mode 100644 manifest.webmanifest create mode 100644 service-worker.js diff --git a/LICENSE.md b/LICENSE.md index 9ab5364..16fc79d 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -2,7 +2,7 @@ * css/UbuntuRegular.ttf licensed by [Ubuntu Font License](./LICENSE_UFL.txt). -* icons/Suru licensed by [Creative Commons Attribution-ShareAlike 4.0 License](./LICENSE_CCBYSA.txt). (Read icons/Suru/README.md and cons/Suru/CONTRIBUTING.md to learn about)(Forked from https://github.com/ubuntu/yaru) +* icons/Suru and assets licensed by [Creative Commons Attribution-ShareAlike 4.0 License](./LICENSE_CCBYSA.txt). (Read icons/Suru/README.md and cons/Suru/CONTRIBUTING.md to learn about)(Forked from https://github.com/ubuntu/yaru) * icons/unsplash licensed by [Unsplash License](./LICENSE_UNSPLASH.txt). (Read icons/unsplash/Attribution.html to learn about) diff --git a/apps/terminal/js/main.js b/apps/terminal/js/main.js index 737e80e..694718e 100644 --- a/apps/terminal/js/main.js +++ b/apps/terminal/js/main.js @@ -93,9 +93,9 @@ function runBashCommand(__command){ if(__command.length==1 || __command[1]=="--help"){ writeOutput("Usage: wine PROGRAM [ARGUMENTS...] Run the specified program\n wine --help Display this help and exit\n wine --version Output version information and exit"); } else if(__command[1]=="--version"){ - writeOutput("wine-6.21") + writeOutput("wine-7.0-rc5") } else { - writeOutput("Uygulama başlatılamadı veya belirtilen dosya ile ilişkili bir uygulama yok.") + writeOutput("The application could not be started or there is no application associated with the specified file.") } }else if(__the_command=="sh"||__the_command=="bash"){ writeOutput(__console_info); diff --git a/assets/144.png b/assets/144.png new file mode 100644 index 0000000000000000000000000000000000000000..eebb48be6d94eb46aadfbefbbdff80873721d217 GIT binary patch literal 3706 zcmV-=4u$cFP)oiL)Ou0!0F+3rP`R0IVb%M=}7&55NFOrrC3bz~LkSqL=L1WaHcp0OAFj3j|K& z$*_T;Hrey!J39rQf(C$c=^1G1z;u_rS2_U5EpVm?oLKZzfQ=rq_goJEvKu)8aF#t_ zn>MVpLVsyD07xG=3uK&;*iQlQ+-1)#S0EiQ1|zP{V<=*t zj;`a%1Ngo^-h=Kt;oyojyp_rrS)hdV%EP`h?_&k-9wrcxFncwms zDB}=zH<`ya9qVw2wmNZ?uMBhxthKQ`rhA+-dH^BK4&YJC%EH#dm4k8Jb4P zNf(5g;F%8LdL#M60|0@{a86sxp{Cz+-!qng$;o%vc>njj`N?(m0Exu+?jBW58%``U zg-ZdadfT=Pi|O2_39b>$fgBJS6`TY*Y5=# z8E+kQoTvq+J#7m5Hcs@7XW)T~ymNv>c$*Rjb!-40(D|~%@sHYAnXutY#KONrf0snx zyHYr)x{HtEr0x{w+!_P<7I0^l&$MzwJ7tpEt^Z^RfVYgKgA zG4&T&C@lfeYm-e(1U~qiGeW&aO~x8Du)nWN0kp%2VU0e=TVggySqR58DFEc#>PFo@BFN;k6uh>FWRIry zCJfoQ=c8M?iw{A0s2(D#p3Rpx|7%ssGWHWh*B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FHxpL!Wxg8TQ+y5a;)*+ zZd4}OQXWRj6d^0#3qRZQRo0(}6)(==Zcdd?RMy>ImEs4Ja7zT9_uHC<-z{t^7hm1k zcp(QiO_VB6vZ7$0+zH%~VpW4~&vR*o37U$O8T(W&zM!G)=6sp$8cjpoH1zB! zf_g16Svv&uZOz}uOibRqu8DluKpAVnyQRvk!bDK*g_SwW?;ZM^^w!2i)Hg8+(BU92Qnl=xwjHu)oLfjk#THw}*ETVhEpOP)MdA|igB9oU9J}3BZQ3Y6SiR;tDZJT`Q0SM?Aqk~7$ z50QYHmb@#cNq1e}J=Za{T3uSP1Y#`)sgu80{H(~~IM=#0P1;yX~U5Y+{;X2rayvX_tw< z%hCc1xyZfEZJZhjZH&Z&GwGBPnE(K*A*K$%VL_FCtH7#n)Y8t;wvqLN1%V4K4IrwGeC}{E(}Lb)+q$~q zdlukv2A}~%jU^S|w@yY5&A+oFO@T}8cu)?z4`R(>cIre|IM!c9KQBhvd+<1Cph7gE zI-xL#8$ZihcaSOxI|9&qLAeJjZb`MnY{&&BBGN(iV#>Mp;u12#V~s(e(dbAZ4Z Y05lr6TdK`5KL7v#07*qoM6N<$g0<%1IsgCw literal 0 HcmV?d00001 diff --git a/assets/192.png b/assets/192.png new file mode 100644 index 0000000000000000000000000000000000000000..1834ad0072ba0a51ea17bfa527b2c486fb004008 GIT binary patch literal 4903 zcmV+?6WHvDP)(RCwC#UB7qZHWCJD7r81bw_Ccq zE^@b>sqQ+(tj~T;E1aAnyz-J$5d*TtWiizm{)H z20tl*wOZoZu?46J{61=ZKC?qx)@Ti!Jb8NHDELS6?FZKSosf6(^=%x-|4Wi&%>+<$ zdHyM1Uomz%Be0f3NrIjv!B6Z07PsehFBBGux@s&@%W(sQDTE{t2x45;5Rk5R3!AV;p!d5FCH9l_3fk{NB1B zaP9Gv_;R#46^Oy!3p-awClVJoohN`CBmjTJ7_=e)b|{B3S5#7M7Y~@r?;UrR01SSs z8h=(t!^-~yhYzn>vF!-&? zKxdvE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|G+XKHxP;JKb_%>M&xhkR53 literal 0 HcmV?d00001 diff --git a/assets/Vector.svg b/assets/Vector.svg new file mode 100644 index 0000000..b9115ca --- /dev/null +++ b/assets/Vector.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/css/login.css b/css/login.css new file mode 100644 index 0000000..0513ee8 --- /dev/null +++ b/css/login.css @@ -0,0 +1,55 @@ +*:not(body,html){ + visibility:hidden !important; +} + +.panel-notification, .panel-status, .panel-status > *, .login-user, .login-user > *, .login-ubuntu{ + visibility: visible !important; +} + +.panel-notification, .panel-status{ + pointer-events: none; +} + +.login-user, .login-ubuntu{ + display: unset !important; +} + +.login-user{ + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%,-50%); + margin: 0; + background: #66666666; + border-radius: 5px; + width: 260px; + height: 65px; + color: #ffffff; +} + +.login-user > img { + position: relative; + top: 8.5px; + left: 8.5px; + width: 48px; + height: 48px; + filter: brightness(2); + border-radius: 50%; + background: #33333333; +} + +.login-user > div{ + position: relative; + bottom: 29px; + left: 65px; + font-size: 18px; +} + +.login-ubuntu{ + position: fixed; + bottom: 20px; + font-size: 45px; + color: #ffffff; + left: 50%; + transform: translate(-50%,0); +} \ No newline at end of file diff --git a/css/panel.css b/css/panel.css index be0b6d6..19681e3 100644 --- a/css/panel.css +++ b/css/panel.css @@ -94,6 +94,11 @@ transition-duration: 0.2s; } +.panel-status-no-wifi{ + grid-template-columns: 0px auto auto !important; + width: 55px !important; +} + .panel-status-icon{ height: 16px; filter: brightness(2); diff --git a/index.html b/index.html index 1cd1f29..e243261 100644 --- a/index.html +++ b/index.html @@ -3,8 +3,9 @@ Ubuntu - + + @@ -26,6 +27,17 @@ + + + + + + + + + + + @@ -37,8 +49,8 @@
- - + +
@@ -85,6 +97,11 @@
Text
+ +
\ No newline at end of file diff --git a/js/login.js b/js/login.js new file mode 100644 index 0000000..d82f399 --- /dev/null +++ b/js/login.js @@ -0,0 +1,7 @@ +loginSession=()=>{ + document.querySelector("link#login-css").remove(); +} + +lockSession=()=>{ + document.head.insertAdjacentHTML("beforeend",''); +} \ No newline at end of file diff --git a/js/panel.js b/js/panel.js index 9eb950e..d17d411 100644 --- a/js/panel.js +++ b/js/panel.js @@ -1,4 +1,5 @@ monthShortNames=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]; + if(navigator.getBattery!=undefined){ batteryIcon=document.querySelector("#battery"); (async ()=>{ @@ -7,23 +8,53 @@ if(navigator.getBattery!=undefined){ updateBatteryIcon=()=>{ if(deviceBattery.charging){ batteryIcon.src="icons/Suru/Suru/scalable/status/battery-level-"+(Math.round(deviceBattery.level*10)*10)+"-charging-symbolic.svg"; + document.querySelector(".status-about").contentDocument.querySelector("#battery").src="icons/Suru/Suru/scalable/status/battery-level-"+(Math.round(deviceBattery.level*10)*10)+"-charging-symbolic.svg"; + if(deviceBattery.level==1){ + document.querySelector(".status-about").contentDocument.querySelector("#battery-info").innerText="Full"; + } else { + if(deviceBattery.chargingTime!=Infinity){ + document.querySelector(".status-about").contentDocument.querySelector("#battery-info").innerText=Math.floor(((1-deviceBattery.level)*100*60*3) / 3600)+":"+Math.floor(((1-deviceBattery.level)*100*60*3) % 3600 / 60)+" Until Full ("+(deviceBattery.level*100)+" %)"; + } + } } else { batteryIcon.src="icons/Suru/Suru/scalable/status/battery-level-"+(Math.round(deviceBattery.level*10)*10)+"-symbolic.svg"; + document.querySelector(".status-about").contentDocument.querySelector("#battery").src="icons/Suru/Suru/scalable/status/battery-level-"+(Math.round(deviceBattery.level*10)*10)+"-symbolic.svg"; + if(deviceBattery.dischargingTime!=Infinity){ + document.querySelector(".status-about").contentDocument.querySelector("#battery-info").innerText=Math.floor(deviceBattery.dischargingTime / 3600)+":"+Math.floor(deviceBattery.dischargingTime % 3600 / 60)+" Remaining ("+(deviceBattery.level*100)+" %)"; + } else { + document.querySelector(".status-about").contentDocument.querySelector("#battery-info").innerText=Math.floor((deviceBattery.level*100*60*3) / 3600)+":"+Math.floor((deviceBattery.level*100*60*3) % 3600 / 60)+" Remaining ("+(deviceBattery.level*100)+" %)"; + } } } - updateBatteryIcon(); deviceBattery.addEventListener("chargingchange",updateBatteryIcon); deviceBattery.addEventListener("levelchange",updateBatteryIcon); })(); } -function UpdatePanelTime(){ +wifiIcon=document.querySelector("#wifi"); +wifiOfflineSVG="data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform='translate(-1073 267)'%3E%3Cpath d='M1081.003-265c-2.61 0-5.22.838-7.4 2.518l-.266.205.205.263 7.457 9.672 7.668-9.931-.264-.206a12.105 12.105 0 0 0-7.4-2.521zm0 1c2.181 0 4.344.672 6.227 1.951l-6.229 8.07-6.226-8.074c1.883-1.278 4.047-1.948 6.228-1.947z' fill='gray' font-family='sans-serif' font-weight='400' opacity='.5' overflow='visible' style='font-feature-settings:normal;font-variant-alternates:normal;font-variant-caps:normal;font-variant-ligatures:none;font-variant-numeric:normal;font-variant-position:normal;isolation:auto;mix-blend-mode:normal;shape-padding:0;text-decoration-color:%23000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none' white-space='normal'/%3E%3C/g%3E%3C/svg%3E"; // from Suru icons, licensed by (CC-BY-SA 4.0). Learn more about license from LICENSE.md + +window.addEventListener("offline",()=>{ + wifiIcon.src="data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3C/svg%3E"; + document.querySelector(".status-about").contentDocument.querySelector("#wifi").src=wifiOfflineSVG; + document.querySelector(".status-about").contentDocument.querySelector("#wifi-info").innerText="Wi-Fi Not Connected"; + document.querySelector(".panel-status").className+=" panel-status-no-wifi"; +}); + +window.addEventListener("online",()=>{ + wifiIcon.src="icons/Suru/Suru/scalable/status/network-wireless-connected-symbolic.svg"; + document.querySelector(".status-about").contentDocument.querySelector("#wifi").src="icons/Suru/Suru/scalable/status/network-wireless-connected-symbolic.svg"; + document.querySelector(".status-about").contentDocument.querySelector("#wifi-info").innerText="Wi-Fi"; + document.querySelector(".panel-status").className=document.querySelector(".panel-status").className.replace(" panel-status-no-wifi",""); +}); + +function UpdatePanel(){ now = new Date(); document.getElementsByClassName("panel-notification")[0].innerHTML=now.getDate()+" "+(monthShortNames[now.getMonth()])+ " " + now.toString().match("..:..")[0]; } -setInterval(UpdatePanelTime,1000) +setInterval(UpdatePanel,1000) function changePanelActiveAppIcon(icon,name,brightness=1){ if(name==""){ diff --git a/js/pwa.js b/js/pwa.js new file mode 100644 index 0000000..15d7e1a --- /dev/null +++ b/js/pwa.js @@ -0,0 +1,13 @@ +if ('serviceWorker' in navigator) { + window.addEventListener('load', function () { + navigator.serviceWorker.register('service-worker.js').then(function (registration) { + console.log('Registered!'); + }, function (err) { + console.log('ServiceWorker registration failed: ', err); + }).catch(function (err) { + console.log(err); + }); + }); +} else { + console.log('service worker is not supported'); +} diff --git a/js/status.js b/js/status.js index f9331b1..602802a 100644 --- a/js/status.js +++ b/js/status.js @@ -1,5 +1,18 @@ function changeBrightness(){ - parent.document.getElementById("brightness").style.opacity=1-document.getElementById("brightness-change").value/100; + parent.document.getElementById("brightness").style.opacity=1-window.event.target.value/100; +} + +function changeVolume(){ + let _volume=window.event.target.value; + if(_volume==0){ + parent.document.querySelector("#sound").src="icons/Suru/Suru/scalable/status/audio-volume-muted-symbolic.svg" + } else if(_volume<26){ + parent.document.querySelector("#sound").src="icons/Suru/Suru/scalable/status/audio-volume-low-symbolic.svg" + } else if(_volume<76){ + parent.document.querySelector("#sound").src="icons/Suru/Suru/scalable/status/audio-volume-medium-symbolic.svg" + } else { + parent.document.querySelector("#sound").src="icons/Suru/Suru/scalable/status/audio-volume-high-symbolic.svg" + } } function openSettings(){ @@ -9,4 +22,9 @@ function openSettings(){ openShutdown = ()=>{ parent.showDialog("Shutdown Computer","Do you want to shutdown your computer?","Cancel","Shutdown","","location.href='https://github.com/malisipi/ubuntu-tour'") +} + +lockSession=()=>{ + parent.showStatusAbout(); + parent.lockSession(); } \ No newline at end of file diff --git a/manifest.webmanifest b/manifest.webmanifest new file mode 100644 index 0000000..1d24ba6 --- /dev/null +++ b/manifest.webmanifest @@ -0,0 +1,29 @@ +{ + "short_name": "Ubuntu", + "name": "Ubuntu", + "icons": [ + { + "src": "/assets/Vector.svg", + "type": "image/svg+xml", + "sizes": "512x512" + }, + { + "src": "/assets/192.png", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "/assets/512.png", + "type": "image/png", + "sizes": "512x512" + } + ], + "start_url": "/?pwa=true", + "background_color": "#550055", + "display": "fullscreen", + "scope": "/", + "theme_color": "#550055", + "shortcuts": [], + "description": "Ubuntu", + "screenshots": [] +} diff --git a/service-worker.js b/service-worker.js new file mode 100644 index 0000000..d4c4d62 --- /dev/null +++ b/service-worker.js @@ -0,0 +1,3 @@ +self.addEventListener('install', function(e) {}); +self.addEventListener("activate", event => {}); +self.addEventListener('fetch', function (event){}); \ No newline at end of file diff --git a/status.html b/status.html index 05e5dcb..d26296f 100644 --- a/status.html +++ b/status.html @@ -7,15 +7,16 @@ - +
-
Wifi
+
Wi-Fi
Bluetooth is off
-
Full
+
Full
Settings
-
Lock
+
Lock
Shutdown
+ \ No newline at end of file