More Ui changes and more things

This commit is contained in:
Prayag committed 2022-03-13 22:38:21 +05:30
1 parent 8e6b33f630
commit 2170f375ba
11 files changed
+267 -76

No files matched your search

+5
View File
@@ -566,6 +566,11 @@
}
}
},
"@rive-app/webgl": {
"version": "1.0.23",
"resolved": "https://registry.npmjs.org/@rive-app/webgl/-/webgl-1.0.23.tgz",
"integrity": "sha512-/spOu7GGsn0EBIyEi3O5AA/BAbwdhwxm+gLMGX1LpP9uGhGaQ8Y+CA65uYzqCsAS+MYWxH7PJtSF7GYG2hy9Hw=="
},
"@sindresorhus/is": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.4.0.tgz",
+1
View File
@@ -45,6 +45,7 @@
}
},
"dependencies": {
"@rive-app/webgl": "^1.0.23",
"@thornbill/jellyfin-sdk": "^0.4.1",
"electron-squirrel-startup": "^1.0.0",
"electron-store": "^8.0.1",
+15 -15
View File
@@ -1,23 +1,23 @@
<svg width="1536" height="140" viewBox="0 0 1536 140" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M53.5075 139.735C44.3971 139.735 35.9283 137.682 28.1011 133.576C20.2739 129.342 13.8581 123.568 8.85381 116.254C3.84952 108.94 0.898268 100.856 6.10352e-05 92.0021H7.12156C8.01977 99.5727 10.6502 106.502 15.0129 112.789C19.3757 118.948 24.8932 123.824 31.5656 127.417C38.3663 130.882 45.6803 132.614 53.5075 132.614C62.1047 132.614 69.996 130.497 77.1817 126.262C84.3674 122.028 90.0774 116.189 94.3118 108.747C98.5462 101.305 100.663 92.9644 100.663 83.7257V10.0086H40.6118V2.88709H107.592V83.7257C107.592 94.2476 105.154 103.807 100.278 112.404C95.5308 120.873 88.9867 127.545 80.6462 132.421C72.434 137.297 63.3878 139.735 53.5075 139.735Z" fill="white"/>
<path d="M152.099 2.88709H246.41V10.0086H159.22V64.286H235.055V71.4075H159.22V129.727H246.41V136.848H152.099V2.88709Z" fill="white"/>
<path d="M299.386 136.848V2.88709H306.507V129.727H399.857V136.848H299.386Z" fill="white"/>
<path d="M441.861 136.848V2.88709H448.982V129.727H542.332V136.848H441.861Z" fill="white"/>
<path d="M578.369 2.88709L625.91 74.487L673.066 2.88709H681.535L629.374 81.9935V136.848H622.253V81.9935L569.9 2.88709H578.369Z" fill="white"/>
<path d="M730.853 136.848H723.731V2.88709H777.624C786.606 2.88709 794.882 4.81182 802.453 8.66128C810.152 12.5107 816.247 17.9641 820.738 25.0215C825.229 32.0788 827.474 40.2268 827.474 49.4655C827.474 58.3193 825.164 66.4673 820.545 73.9096C816.054 81.3519 809.895 87.0619 802.068 91.0397C795.267 94.5042 787.119 96.2365 777.624 96.2365H730.853V136.848ZM730.853 89.115H777.624C785.836 89.115 792.572 87.8318 797.833 85.2655C804.634 82.0576 810.087 77.2458 814.194 70.83C818.3 64.4143 820.353 57.2928 820.353 49.4655C820.353 41.7666 818.3 34.7093 814.194 28.2935C810.087 21.8778 804.57 17.0659 797.641 13.858C792.38 11.2917 785.708 10.0086 777.624 10.0086H730.853V89.115Z" fill="white"/>
<path d="M869.286 136.848V2.88709H876.407V129.727H969.757V136.848H869.286Z" fill="white"/>
<path d="M1116.27 136.848H990.012L1053.14 0L1116.27 136.848ZM1001.18 129.727H1105.11L1053.14 16.9376L1001.18 129.727Z" fill="url(#paint0_linear_4_2)"/>
<path d="M1148.27 2.88709L1195.81 74.487L1242.97 2.88709H1251.43L1199.27 81.9935V136.848H1192.15V81.9935L1139.8 2.88709H1148.27Z" fill="white"/>
<path d="M1291.9 2.88709H1386.21V10.0086H1299.02V64.286H1374.86V71.4075H1299.02V129.727H1386.21V136.848H1291.9V2.88709Z" fill="white"/>
<path d="M1536 136.848H1433.03C1433.03 84.5332 1433.03 55.2022 1433.03 2.88709H1485.19C1496.35 2.88709 1505.46 4.87598 1512.52 8.85375C1519.45 12.7032 1524.84 17.9641 1528.69 24.6365C1532.54 31.3089 1534.46 38.6871 1534.46 46.7709C1534.46 56.7795 1531.38 65.7616 1525.22 73.7171C1519.06 81.5444 1511.3 86.7411 1501.93 89.3074L1536 136.848ZM1445.15 10.0086L1497.51 83.1483C1506.1 81.3519 1513.22 77.0533 1518.87 70.2526C1524.52 63.4519 1527.34 55.6247 1527.34 46.7709C1527.34 39.7136 1525.61 33.2978 1522.14 27.5236C1518.68 21.7494 1513.8 17.3226 1507.51 14.243C1501.87 11.4201 1494.49 10.0086 1485.38 10.0086H1445.15ZM1440.15 14.6279V83.7257H1489.61L1440.15 14.6279ZM1440.15 129.727H1522.53L1494.43 90.6547L1488.46 90.8472H1440.15V129.727Z" fill="url(#paint1_linear_4_2)"/>
<path d="M1532.11 134.848H1435.03V134.715V134.413V134.111V133.809V133.508V133.207V132.907V132.607V132.308V132.01V131.712V131.414V131.117V130.82V130.524V130.228V129.933V129.638V129.344V129.05V128.757V128.464V128.172V127.88V127.588V127.297V127.007V126.717V126.427V126.138V125.849V125.561V125.273V124.986V124.699V124.412V124.126V123.841V123.556V123.271V122.987V122.703V122.419V122.136V121.854V121.572V121.29V121.008V120.728V120.447V120.167V119.887V119.608V119.329V119.051V118.773V118.495V118.218V117.941V117.664V117.388V117.113V116.837V116.562V116.288V116.014V115.74V115.466V115.193V114.921V114.648V114.376V114.105V113.834V113.563V113.292V113.022V112.752V112.483V112.214V111.945V111.677V111.409V111.141V110.874V110.607V110.34V110.074V109.808V109.542V109.277V109.012V108.747V108.483V108.219V107.955V107.692V107.428V107.166V106.903V106.641V106.379V106.118V105.856V105.595V105.335V105.074V104.814V104.555V104.295V104.036V103.777V103.518V103.26V103.002V102.744V102.487V102.229V101.972V101.716V101.459V101.203V100.947V100.692V100.436V100.181V99.9263V99.6717V99.4173V99.1632V98.9093V98.6557V98.4023V98.1492V97.8963V97.6436V97.3912V97.139V96.887V96.6352V96.3837V96.1324V95.8814V95.6305V95.3799V95.1295V94.8793V94.6293V94.3795V94.1299V93.8805V93.6314V93.3824V93.1336V92.8851V92.6367V92.3885V92.1405V91.8927V91.6451V91.3977V91.1504V90.9034V90.6565V90.4098V90.1633V89.9169V89.6707V89.4247V89.1788V88.9331V88.6876V88.4422V88.197V87.952V87.7071V87.4623V87.2177V86.9733V86.729V86.4848V86.2408V85.9969V85.7532V85.5096V85.2661V85.0228V84.7795V84.5365V84.2935V84.0507V83.8079V83.5654V83.3229V83.0805V82.8383V82.5961V82.3541V82.1122V81.8704V81.6286V81.387V81.1455V80.9041V80.6628V80.4215V80.1804V79.9393V79.6984V79.4575V79.2167V78.976V78.7353V78.4948V78.2543V78.0138V77.7735V77.5332V77.293V77.0528V76.8128V76.5727V76.3327V76.0928V75.853V75.6131V75.3734V75.1337V74.894V74.6544V74.4148V74.1752V73.9357V73.6962V73.4568V73.2174V72.978V72.7386V72.4993V72.26V72.0207V71.7814V71.5422V71.3029V71.0637V70.8245V70.5853V70.3461V70.1069V69.8677V69.6285V69.3893V69.1501V68.9109V68.6716V68.4324V68.1932V67.9539V67.7146V67.4753V67.236V66.9967V66.7573V66.518V66.2785V66.0391V65.7996V65.5601V65.3206V65.081V64.8414V64.6017V64.362V64.1222V63.8824V63.6425V63.4026V63.1626V62.9226V62.6825V62.4423V62.2021V61.9618V61.7215V61.4811V61.2406V61V60.7594V60.5187V60.2778V60.037V59.796V59.5549V59.3138V59.0726V58.8312V58.5898V58.3483V58.1067V57.865V57.6232V57.3812V57.1392V56.8971V56.6548V56.4125V56.17V55.9274V55.6847V55.4418V55.1989V54.9558V54.7126V54.4692V54.2258V53.9822V53.7384V53.4945V53.2505V53.0064V52.7621V52.5176V52.273V52.0283V51.7834V51.5383V51.2931V51.0477V50.8022V50.5565V50.3107V50.0646V49.8184V49.5721V49.3256V49.0788V48.832V48.5849V48.3376V48.0902V47.8426V47.5948V47.3468V47.0986V46.8503V46.6017V46.3529V46.104V45.8548V45.6054V45.3559V45.1061V44.8561V44.6059V44.3555V44.1048V43.854V43.6029V43.3516V43.1001V42.8483V42.5964V42.3442V42.0917V41.8391V41.5862V41.333V41.0796V40.826V40.5721V40.318V40.0637V39.809V39.5542V39.2991V39.0437V38.788V38.5321V38.276V38.0195V37.7628V37.5059V37.2486V36.9911V36.7334V36.4753V36.2169V35.9583V35.6994V35.4402V35.1807V34.921V34.6609V34.4006V34.1399V33.879V33.6177V33.3562V33.0943V32.8321V32.5697V32.3069V32.0438V31.7804V31.5167V31.2526V30.9883V30.7236V30.4586V30.1932V29.9276V29.6616V29.3952V29.1286V28.8616V28.5942V28.3266V28.0585V27.7902V27.5214V27.2524V26.983V26.7132V26.4431V26.1726V25.9017V25.6305V25.359V25.087V24.8147V24.542V24.269V23.9956V23.7218V23.4476V23.1731V22.8981V22.6228V22.3471V22.071V21.7945V21.5176V21.2404V20.9627V20.6846V20.4062V20.1273V19.848V19.5683V19.2882V19.0077V18.7268V18.4455V18.1638V17.8816V17.599V17.316V17.0326V16.7487V16.4644V16.1797V15.8945V15.6089V15.3229V15.0364V14.7495V14.4621V14.1743V13.8861V13.5974V13.3082V13.0186V12.7286V12.438V12.1471V11.8556V11.5637V11.2713V10.9785V10.6852V10.3914V10.0971V9.80238V9.50717V9.21147V8.91529V8.61862V8.32147V8.02382V7.72569V7.42706V7.12794V6.82832V6.5282V6.22758V5.92646V5.62483V5.3227V5.02005V4.88708H1485.19C1496.13 4.88708 1504.87 6.83915 1511.54 10.5961L1511.55 10.6021C1518.17 14.2808 1523.29 19.287 1526.95 25.636C1530.62 31.9892 1532.46 39.0199 1532.46 46.7709C1532.46 56.3313 1529.53 64.8813 1523.64 72.487C1517.74 79.9833 1510.34 84.9291 1501.4 87.3785L1498.63 88.1375L1500.31 90.4724L1532.11 134.848ZM1445.15 8.00858H1441.26L1443.53 11.1727L1495.88 84.3124L1496.64 85.3727L1497.91 85.106C1506.96 83.2165 1514.48 78.6763 1520.41 71.5301C1526.35 64.3698 1529.34 56.0904 1529.34 46.7709C1529.34 39.3692 1527.52 32.5949 1523.86 26.4946C1520.19 20.3781 1515.02 15.6924 1508.4 12.4503C1502.38 9.44345 1494.67 8.00858 1485.38 8.00858H1445.15ZM1441.77 13.4637L1438.15 8.39828V14.6279V83.7257V85.7257H1440.15H1489.61H1493.51L1491.24 82.5615L1441.77 13.4637ZM1438.15 129.727V131.727H1440.15H1522.53H1526.43L1524.15 128.559L1496.05 89.487L1495.43 88.6214L1494.36 88.6558L1488.43 88.8472H1440.15H1438.15V90.8472V129.727Z" stroke="url(#paint0_linear_15_5)" stroke-width="4"/>
<mask id="path-2-inside-1_15_5" fill="white">
<path d="M1116.27 136.848H990.011L1053.14 0L1116.27 136.848ZM1001.17 129.727H1105.11L1053.14 16.9376L1001.17 129.727Z"/>
</mask>
<path d="M1116.27 136.848H990.011L1053.14 0L1116.27 136.848ZM1001.17 129.727H1105.11L1053.14 16.9376L1001.17 129.727Z" fill="url(#paint1_linear_15_5)"/>
<path d="M1116.27 136.848V140.848H1122.52L1119.91 135.173L1116.27 136.848ZM990.011 136.848L986.379 135.173L983.761 140.848H990.011V136.848ZM1053.14 0L1056.77 -1.67558L1053.14 -9.5489L1049.51 -1.67559L1053.14 0ZM1001.17 129.727L997.542 128.053L994.928 133.727H1001.17V129.727ZM1105.11 129.727V133.727H1111.36L1108.74 128.053L1105.11 129.727ZM1053.14 16.9376L1056.78 15.2637L1053.14 7.37895L1049.51 15.2637L1053.14 16.9376ZM1116.27 132.848H990.011V140.848H1116.27V132.848ZM993.644 138.524L1056.77 1.67559L1049.51 -1.67559L986.379 135.173L993.644 138.524ZM1049.51 1.67558L1112.64 138.524L1119.91 135.173L1056.77 -1.67558L1049.51 1.67558ZM1001.17 133.727H1105.11V125.727H1001.17V133.727ZM1108.74 128.053L1056.78 15.2637L1049.51 18.6115L1101.48 131.401L1108.74 128.053ZM1049.51 15.2637L997.542 128.053L1004.81 131.401L1056.78 18.6115L1049.51 15.2637Z" fill="url(#paint2_linear_15_5)" mask="url(#path-2-inside-1_15_5)"/>
<path d="M10.5044 115.124C6.10763 108.698 3.36151 101.665 2.2595 94.002H5.37666C6.49452 101.216 9.16209 107.865 13.3698 113.929L13.3753 113.937L13.3809 113.945C17.9226 120.357 23.6746 125.44 30.6174 129.178L30.6375 129.189L30.6578 129.199C37.747 132.811 45.3731 134.614 53.5075 134.614C62.4503 134.614 70.694 132.407 78.1971 127.985C85.692 123.569 91.6478 117.474 96.0501 109.736C100.469 101.969 102.663 93.283 102.663 83.7257V10.0086V8.00858H100.663H42.6118V4.88708H105.592V83.7257C105.592 93.9248 103.233 103.141 98.5388 111.417L98.5339 111.426C93.9594 119.586 87.6684 125.999 79.6368 130.695L79.6251 130.702C71.7329 135.388 63.0414 137.735 53.5075 137.735C44.7152 137.735 36.5706 135.758 29.0424 131.811C21.4984 127.728 15.3261 122.171 10.5044 115.124ZM159.22 131.727H244.41V134.848H154.099V4.88708H244.41V8.00858H159.22H157.22V10.0086V64.2859V66.2859H159.22H233.055V69.4074H159.22H157.22V71.4074V129.727V131.727H159.22ZM306.507 131.727H397.857V134.848H301.386V4.88708H304.507V129.727V131.727H306.507ZM448.982 131.727H540.332V134.848H443.861V4.88708H446.982V129.727V131.727H448.982ZM623.921 80.8897L573.622 4.88708H577.296L624.244 75.5933L625.917 78.1129L627.58 75.5871L674.143 4.88708H677.82L627.705 80.8925L627.374 81.3934V81.9935V134.848H624.253V81.9935V81.3916L623.921 80.8897ZM728.853 96.2365V134.848H725.731V4.88708H777.624C786.309 4.88708 794.273 6.7456 801.546 10.4441L801.558 10.4501C808.943 14.1424 814.76 19.3529 819.05 26.0952C823.316 32.7986 825.474 40.5661 825.474 49.4655C825.474 57.9508 823.266 65.7329 818.846 72.8549L818.839 72.8655L818.833 72.8763C814.537 79.9948 808.659 85.4467 801.162 89.2567L801.16 89.2576C794.701 92.5481 786.879 94.2365 777.624 94.2365H730.853H728.853V96.2365ZM728.853 89.115V91.115H730.853H777.624C786.019 91.115 793.08 89.8068 798.699 87.0685C805.839 83.6978 811.574 78.6326 815.878 71.9081C820.196 65.1613 822.353 57.6638 822.353 49.4655C822.353 41.3888 820.193 33.9567 815.878 27.2154C811.569 20.4832 805.764 15.4188 798.499 12.0512C792.884 9.31721 785.893 8.00858 777.624 8.00858H730.853H728.853V10.0086V89.115ZM876.407 131.727H967.757V134.848H871.286V4.88708H874.407V129.727V131.727H876.407ZM1244.04 4.88708H1247.72L1197.61 80.8925L1197.27 81.3934V81.9935V134.848H1194.15V81.9935V81.3916L1193.82 80.8897L1143.52 4.88708H1147.2L1194.14 75.5933L1195.82 78.1129L1197.48 75.5871L1244.04 4.88708ZM1299.02 131.727H1384.21V134.848H1293.9V4.88708H1384.21V8.00858H1299.02H1297.02V10.0086V64.2859V66.2859H1299.02H1372.86V69.4074H1299.02H1297.02V71.4074V129.727V131.727H1299.02Z" stroke="white" stroke-width="4"/>
<defs>
<linearGradient id="paint0_linear_4_2" x1="1087" y1="72.9999" x2="990" y2="137" gradientUnits="userSpaceOnUse">
<linearGradient id="paint0_linear_15_5" x1="1536" y1="21.5" x2="1433" y2="137" gradientUnits="userSpaceOnUse">
<stop stop-color="#AA5CC3"/>
<stop offset="1" stop-color="#00A4DC"/>
</linearGradient>
<linearGradient id="paint1_linear_15_5" x1="1079.37" y1="71.4917" x2="1067.96" y2="72.1236" gradientUnits="userSpaceOnUse">
<stop stop-color="#00A4DC"/>
<stop offset="1" stop-color="#AA5CC3"/>
</linearGradient>
<linearGradient id="paint1_linear_4_2" x1="1536" y1="6.74843e-05" x2="1433" y2="137" gradientUnits="userSpaceOnUse">
<stop stop-color="#00A4DC"/>
<stop offset="1" stop-color="#AA5CC3"/>
<linearGradient id="paint2_linear_15_5" x1="1087.5" y1="72" x2="990" y2="137" gradientUnits="userSpaceOnUse">
<stop stop-color="#AA5CC3"/>
<stop offset="1" stop-color="#00A4DC"/>
</linearGradient>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

+12 -1
View File
@@ -14,7 +14,18 @@ const schema = {
openHome: {
type: 'boolean',
default: false
}
},
// user: {
// name: {
// type: 'string',
// default: ""
// },
// pass: {
// type: 'string',
// default: ""
// }
// }
};
const config = new Store({ schema });
+28 -14
View File
@@ -5,22 +5,36 @@ const LoginPage = require("./pages/login");
const HomePage = require("./pages/home");
async function createWindow() {
var splash = new BrowserWindow({
width: 810,
height: 610,
frame: false,
alwaysOnTop: true,
webPreferences: {
nodeIntegration: true,
contextIsolation: false
}
});
splash.loadFile('./src/render/html/splash.html');
var loginPage = new LoginPage();
var homePage = new HomePage();
if (!config.get('serverUrl')) {
loginPage.showLogin();
} else if (config.get('openHome') == false) {
loginPage.showLogin();
}
emitter.on('logged-in', () => {
loginPage.hideLogin();
homePage.showHome();
});
emitter.on('closeHome', () => {
homePage.hideHome();
config.set('openHome',false);
emitter.emit('reauth');
loginPage.showLogin();
loginPage.window.on('ready-to-show', () => {
splash.destroy();
if (!config.get('serverUrl')) {
loginPage.showLogin();
} else if (config.get('openHome') == false) {
loginPage.showLogin();
}
emitter.on('logged-in', () => {
loginPage.hideLogin();
homePage.showHome();
});
emitter.on('closeHome', () => {
homePage.hideHome();
config.set('openHome',false);
emitter.emit('reauth');
loginPage.showLogin();
});
});
}
+47 -6
View File
@@ -1,4 +1,5 @@
const { app, BrowserWindow, ipcMain, nativeImage } = require('electron');
const fs = require("fs");
const got = require('got');
const emitter = require('../common/emitter');
const config = require('../config');
@@ -11,9 +12,11 @@ class LoginPage {
constructor() {
this.createWindow();
this.setConfig();
this.onstartUp();
this.authUser();
this.logoutUser();
this.getUserlist();
this.clearData();
}
createWindow() {
this.window = new BrowserWindow({
@@ -24,7 +27,8 @@ class LoginPage {
maximizable: true,
show: false,
webPreferences: {
nodeIntegration: true
nodeIntegration: true,
contextIsolation: false
},
icon: icon
});
@@ -32,6 +36,33 @@ class LoginPage {
this.window.webContents.openDevTools();
this.window.setMenu(null);
this.window.maximize();
this.window.hide();
}
onstartUp() {
ipcMain.on('check-server-status', (event) => {
got.post(`${config.get('serverUrl')}/System/Ping`).then(async (response) => {
if (response.body == '"Jellyfin Server"') {
event.sender.send('server-online');
this.serverOnline = true;
}
else {
event.sender.send('server-offline');
console.log('offline');
this.serverOnline = true;
}
}).catch((er) => {
let error;
event.sender.send('server-offline');
if (typeof er == 'string') {
error = e;
} else {
error = "Can't connect to Jellyfin server";
}
});
});
ipcMain.on('reload-page', () => {
this.window.reload();
});
}
setConfig() {
if (config.get('serverGo') == false) {
@@ -87,11 +118,13 @@ class LoginPage {
async authUser() {
let auth;
if (config.get('openHome') == true) {
try {
auth = await this.api.authenticateUserByName(config.get('user.name'), config.get('user.pass'));
emitter.emit('logged-in');
} catch(err) {
console.log(err);
if (this.serverOnline == true) {
try {
auth = await this.api.authenticateUserByName(config.get('user.name'), config.get('user.pass'));
emitter.emit('logged-in');
} catch (err) {
console.log(err);
}
}
} else {
this.window.once('ready-to-show', () => {
@@ -137,6 +170,14 @@ class LoginPage {
emitter.emit('closeHome');
});
}
clearData() {
ipcMain.on('clear-user-data', async () => {
console.log(app.getPath('userData'));
config.clear();
this.window.reload();
console.log('cleared data!');
});
}
showLogin() {
this.window.show();
}
+30
View File
@@ -14,6 +14,8 @@
body,
html {
margin: 0 !important;
padding: 0 !important;
font-family: "Montserrat", sans-serif;
color: white;
background: var(--main-bg);
@@ -30,3 +32,31 @@ button {
position: relative;
font-size: calc(60vw / 20);
}
.ripple__cont {
width: 100%;
height: 100%;
overflow: hidden;
}
@-webkit-keyframes btn_click {
0% {
transform: scale(1);
opacity: 0;
}
100% {
transform: scale(5);
opacity: 1;
}
}
@keyframes btn_click {
0% {
transform: scale(1);
opacity: 0;
}
100% {
transform: scale(1.5);
opacity: 1;
}
}
+24 -5
View File
@@ -1,6 +1,8 @@
/** @format */
* {
*,
*::before,
*::after {
box-sizing: border-box;
}
@@ -56,11 +58,28 @@ main {
grid-gap: 3em;
}
.divider {
button.clicky {
position: relative;
overflow: visible;
}
button.clicky::after {
content: "";
box-shadow: 0 0 15px 40px white;
position: absolute;
width: 100%;
height: 2px;
background: white;
border-radius: 10px;
height: 100%;
top: 0;
left: 0;
border-radius: 100px;
opacity: 0;
transition: all var(--transition-time-slow-1);
}
button.clicky:active::after {
box-shadow: 0 0 0 0 white;
opacity: 0.5;
transition: 0s;
}
input[type="text"],
+1 -1
View File
@@ -43,7 +43,7 @@
<input id="serverUrl" type="url" class="input__text server__url" onblur="setLabelPos()">
<label for="serverUrl" class="input__label">Server Address</label>
</div>
<button class="input__btn save__server">
<button class="input__btn save__server clicky">
<span class="btn__label">Save</span>
</button>
<div class="info">
+48
View File
@@ -0,0 +1,48 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JellyPlayer</title>
</head>
<body>
<style>
html,body{margin: 0 !important;padding: 0 !important;background: #0d0326;}svg {position: fixed;top: 50%;left: 50%;transform: translate(-50%, -50%);width: 80%;}
path{stroke-dasharray:100%;animation: drawIN 5s forwards;}
@keyframes drawIN {
0%{
stroke-dashoffset: 100%;
}
100%{
stroke-dashoffset: 0%;
}
}
</style>
<svg width="1536" height="140" viewBox="0 0 1536 140" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1532.11 134.848H1435.03V134.715V134.413V134.111V133.809V133.508V133.207V132.907V132.607V132.308V132.01V131.712V131.414V131.117V130.82V130.524V130.228V129.933V129.638V129.344V129.05V128.757V128.464V128.172V127.88V127.588V127.297V127.007V126.717V126.427V126.138V125.849V125.561V125.273V124.986V124.699V124.412V124.126V123.841V123.556V123.271V122.987V122.703V122.419V122.136V121.854V121.572V121.29V121.008V120.728V120.447V120.167V119.887V119.608V119.329V119.051V118.773V118.495V118.218V117.941V117.664V117.388V117.113V116.837V116.562V116.288V116.014V115.74V115.466V115.193V114.921V114.648V114.376V114.105V113.834V113.563V113.292V113.022V112.752V112.483V112.214V111.945V111.677V111.409V111.141V110.874V110.607V110.34V110.074V109.808V109.542V109.277V109.012V108.747V108.483V108.219V107.955V107.692V107.428V107.166V106.903V106.641V106.379V106.118V105.856V105.595V105.335V105.074V104.814V104.555V104.295V104.036V103.777V103.518V103.26V103.002V102.744V102.487V102.229V101.972V101.716V101.459V101.203V100.947V100.692V100.436V100.181V99.9263V99.6717V99.4173V99.1632V98.9093V98.6557V98.4023V98.1492V97.8963V97.6436V97.3912V97.139V96.887V96.6352V96.3837V96.1324V95.8814V95.6305V95.3799V95.1295V94.8793V94.6293V94.3795V94.1299V93.8805V93.6314V93.3824V93.1336V92.8851V92.6367V92.3885V92.1405V91.8927V91.6451V91.3977V91.1504V90.9034V90.6565V90.4098V90.1633V89.9169V89.6707V89.4247V89.1788V88.9331V88.6876V88.4422V88.197V87.952V87.7071V87.4623V87.2177V86.9733V86.729V86.4848V86.2408V85.9969V85.7532V85.5096V85.2661V85.0228V84.7795V84.5365V84.2935V84.0507V83.8079V83.5654V83.3229V83.0805V82.8383V82.5961V82.3541V82.1122V81.8704V81.6286V81.387V81.1455V80.9041V80.6628V80.4215V80.1804V79.9393V79.6984V79.4575V79.2167V78.976V78.7353V78.4948V78.2543V78.0138V77.7735V77.5332V77.293V77.0528V76.8128V76.5727V76.3327V76.0928V75.853V75.6131V75.3734V75.1337V74.894V74.6544V74.4148V74.1752V73.9357V73.6962V73.4568V73.2174V72.978V72.7386V72.4993V72.26V72.0207V71.7814V71.5422V71.3029V71.0637V70.8245V70.5853V70.3461V70.1069V69.8677V69.6285V69.3893V69.1501V68.9109V68.6716V68.4324V68.1932V67.9539V67.7146V67.4753V67.236V66.9967V66.7573V66.518V66.2785V66.0391V65.7996V65.5601V65.3206V65.081V64.8414V64.6017V64.362V64.1222V63.8824V63.6425V63.4026V63.1626V62.9226V62.6825V62.4423V62.2021V61.9618V61.7215V61.4811V61.2406V61V60.7594V60.5187V60.2778V60.037V59.796V59.5549V59.3138V59.0726V58.8312V58.5898V58.3483V58.1067V57.865V57.6232V57.3812V57.1392V56.8971V56.6548V56.4125V56.17V55.9274V55.6847V55.4418V55.1989V54.9558V54.7126V54.4692V54.2258V53.9822V53.7384V53.4945V53.2505V53.0064V52.7621V52.5176V52.273V52.0283V51.7834V51.5383V51.2931V51.0477V50.8022V50.5565V50.3107V50.0646V49.8184V49.5721V49.3256V49.0788V48.832V48.5849V48.3376V48.0902V47.8426V47.5948V47.3468V47.0986V46.8503V46.6017V46.3529V46.104V45.8548V45.6054V45.3559V45.1061V44.8561V44.6059V44.3555V44.1048V43.854V43.6029V43.3516V43.1001V42.8483V42.5964V42.3442V42.0917V41.8391V41.5862V41.333V41.0796V40.826V40.5721V40.318V40.0637V39.809V39.5542V39.2991V39.0437V38.788V38.5321V38.276V38.0195V37.7628V37.5059V37.2486V36.9911V36.7334V36.4753V36.2169V35.9583V35.6994V35.4402V35.1807V34.921V34.6609V34.4006V34.1399V33.879V33.6177V33.3562V33.0943V32.8321V32.5697V32.3069V32.0438V31.7804V31.5167V31.2526V30.9883V30.7236V30.4586V30.1932V29.9276V29.6616V29.3952V29.1286V28.8616V28.5942V28.3266V28.0585V27.7902V27.5214V27.2524V26.983V26.7132V26.4431V26.1726V25.9017V25.6305V25.359V25.087V24.8147V24.542V24.269V23.9956V23.7218V23.4476V23.1731V22.8981V22.6228V22.3471V22.071V21.7945V21.5176V21.2404V20.9627V20.6846V20.4062V20.1273V19.848V19.5683V19.2882V19.0077V18.7268V18.4455V18.1638V17.8816V17.599V17.316V17.0326V16.7487V16.4644V16.1797V15.8945V15.6089V15.3229V15.0364V14.7495V14.4621V14.1743V13.8861V13.5974V13.3082V13.0186V12.7286V12.438V12.1471V11.8556V11.5637V11.2713V10.9785V10.6852V10.3914V10.0971V9.80238V9.50717V9.21147V8.91529V8.61862V8.32147V8.02382V7.72569V7.42706V7.12794V6.82832V6.5282V6.22758V5.92646V5.62483V5.3227V5.02005V4.88708H1485.19C1496.13 4.88708 1504.87 6.83915 1511.54 10.5961L1511.55 10.6021C1518.17 14.2808 1523.29 19.287 1526.95 25.636C1530.62 31.9892 1532.46 39.0199 1532.46 46.7709C1532.46 56.3313 1529.53 64.8813 1523.64 72.487C1517.74 79.9833 1510.34 84.9291 1501.4 87.3785L1498.63 88.1375L1500.31 90.4724L1532.11 134.848ZM1445.15 8.00858H1441.26L1443.53 11.1727L1495.88 84.3124L1496.64 85.3727L1497.91 85.106C1506.96 83.2165 1514.48 78.6763 1520.41 71.5301C1526.35 64.3698 1529.34 56.0904 1529.34 46.7709C1529.34 39.3692 1527.52 32.5949 1523.86 26.4946C1520.19 20.3781 1515.02 15.6924 1508.4 12.4503C1502.38 9.44345 1494.67 8.00858 1485.38 8.00858H1445.15ZM1441.77 13.4637L1438.15 8.39828V14.6279V83.7257V85.7257H1440.15H1489.61H1493.51L1491.24 82.5615L1441.77 13.4637ZM1438.15 129.727V131.727H1440.15H1522.53H1526.43L1524.15 128.559L1496.05 89.487L1495.43 88.6214L1494.36 88.6558L1488.43 88.8472H1440.15H1438.15V90.8472V129.727Z" stroke="url(#paint0_linear_15_5)" stroke-width="4"/>
<mask id="path-2-inside-1_15_5" fill="white">
<path d="M1116.27 136.848H990.011L1053.14 0L1116.27 136.848ZM1001.17 129.727H1105.11L1053.14 16.9376L1001.17 129.727Z"/>
</mask>
<path d="M1116.27 136.848H990.011L1053.14 0L1116.27 136.848ZM1001.17 129.727H1105.11L1053.14 16.9376L1001.17 129.727Z" fill="url(#paint1_linear_15_5)"/>
<path d="M1116.27 136.848V140.848H1122.52L1119.91 135.173L1116.27 136.848ZM990.011 136.848L986.379 135.173L983.761 140.848H990.011V136.848ZM1053.14 0L1056.77 -1.67558L1053.14 -9.5489L1049.51 -1.67559L1053.14 0ZM1001.17 129.727L997.542 128.053L994.928 133.727H1001.17V129.727ZM1105.11 129.727V133.727H1111.36L1108.74 128.053L1105.11 129.727ZM1053.14 16.9376L1056.78 15.2637L1053.14 7.37895L1049.51 15.2637L1053.14 16.9376ZM1116.27 132.848H990.011V140.848H1116.27V132.848ZM993.644 138.524L1056.77 1.67559L1049.51 -1.67559L986.379 135.173L993.644 138.524ZM1049.51 1.67558L1112.64 138.524L1119.91 135.173L1056.77 -1.67558L1049.51 1.67558ZM1001.17 133.727H1105.11V125.727H1001.17V133.727ZM1108.74 128.053L1056.78 15.2637L1049.51 18.6115L1101.48 131.401L1108.74 128.053ZM1049.51 15.2637L997.542 128.053L1004.81 131.401L1056.78 18.6115L1049.51 15.2637Z" fill="url(#paint2_linear_15_5)" mask="url(#path-2-inside-1_15_5)"/>
<path d="M10.5044 115.124C6.10763 108.698 3.36151 101.665 2.2595 94.002H5.37666C6.49452 101.216 9.16209 107.865 13.3698 113.929L13.3753 113.937L13.3809 113.945C17.9226 120.357 23.6746 125.44 30.6174 129.178L30.6375 129.189L30.6578 129.199C37.747 132.811 45.3731 134.614 53.5075 134.614C62.4503 134.614 70.694 132.407 78.1971 127.985C85.692 123.569 91.6478 117.474 96.0501 109.736C100.469 101.969 102.663 93.283 102.663 83.7257V10.0086V8.00858H100.663H42.6118V4.88708H105.592V83.7257C105.592 93.9248 103.233 103.141 98.5388 111.417L98.5339 111.426C93.9594 119.586 87.6684 125.999 79.6368 130.695L79.6251 130.702C71.7329 135.388 63.0414 137.735 53.5075 137.735C44.7152 137.735 36.5706 135.758 29.0424 131.811C21.4984 127.728 15.3261 122.171 10.5044 115.124ZM159.22 131.727H244.41V134.848H154.099V4.88708H244.41V8.00858H159.22H157.22V10.0086V64.2859V66.2859H159.22H233.055V69.4074H159.22H157.22V71.4074V129.727V131.727H159.22ZM306.507 131.727H397.857V134.848H301.386V4.88708H304.507V129.727V131.727H306.507ZM448.982 131.727H540.332V134.848H443.861V4.88708H446.982V129.727V131.727H448.982ZM623.921 80.8897L573.622 4.88708H577.296L624.244 75.5933L625.917 78.1129L627.58 75.5871L674.143 4.88708H677.82L627.705 80.8925L627.374 81.3934V81.9935V134.848H624.253V81.9935V81.3916L623.921 80.8897ZM728.853 96.2365V134.848H725.731V4.88708H777.624C786.309 4.88708 794.273 6.7456 801.546 10.4441L801.558 10.4501C808.943 14.1424 814.76 19.3529 819.05 26.0952C823.316 32.7986 825.474 40.5661 825.474 49.4655C825.474 57.9508 823.266 65.7329 818.846 72.8549L818.839 72.8655L818.833 72.8763C814.537 79.9948 808.659 85.4467 801.162 89.2567L801.16 89.2576C794.701 92.5481 786.879 94.2365 777.624 94.2365H730.853H728.853V96.2365ZM728.853 89.115V91.115H730.853H777.624C786.019 91.115 793.08 89.8068 798.699 87.0685C805.839 83.6978 811.574 78.6326 815.878 71.9081C820.196 65.1613 822.353 57.6638 822.353 49.4655C822.353 41.3888 820.193 33.9567 815.878 27.2154C811.569 20.4832 805.764 15.4188 798.499 12.0512C792.884 9.31721 785.893 8.00858 777.624 8.00858H730.853H728.853V10.0086V89.115ZM876.407 131.727H967.757V134.848H871.286V4.88708H874.407V129.727V131.727H876.407ZM1244.04 4.88708H1247.72L1197.61 80.8925L1197.27 81.3934V81.9935V134.848H1194.15V81.9935V81.3916L1193.82 80.8897L1143.52 4.88708H1147.2L1194.14 75.5933L1195.82 78.1129L1197.48 75.5871L1244.04 4.88708ZM1299.02 131.727H1384.21V134.848H1293.9V4.88708H1384.21V8.00858H1299.02H1297.02V10.0086V64.2859V66.2859H1299.02H1372.86V69.4074H1299.02H1297.02V71.4074V129.727V131.727H1299.02Z" stroke="white" stroke-width="4"/>
<defs>
<linearGradient id="paint0_linear_15_5" x1="1536" y1="21.5" x2="1433" y2="137" gradientUnits="userSpaceOnUse">
<stop stop-color="#AA5CC3"/>
<stop offset="1" stop-color="#00A4DC"/>
</linearGradient>
<linearGradient id="paint1_linear_15_5" x1="1079.37" y1="71.4917" x2="1067.96" y2="72.1236" gradientUnits="userSpaceOnUse">
<stop stop-color="#00A4DC"/>
<stop offset="1" stop-color="#AA5CC3"/>
</linearGradient>
<linearGradient id="paint2_linear_15_5" x1="1087.5" y1="72" x2="990" y2="137" gradientUnits="userSpaceOnUse">
<stop stop-color="#AA5CC3"/>
<stop offset="1" stop-color="#00A4DC"/>
</linearGradient>
</defs>
</svg>
</svg>
</body>
</html>
+56 -34
View File
@@ -7,6 +7,7 @@ const saveBtn = document.querySelector('.save__server');
const user__cont = document.querySelector('.users');
let html;
let ripple;
const createUserList = () => {
ipcRenderer.send("waiting-for-userlist");
@@ -14,10 +15,10 @@ const createUserList = () => {
ipcRenderer.on('userlist', (event, userlist) => {
userlist.forEach(user => {
if (user.PrimaryImageTag) {
html = `<div class="user__card" data-user="${user.Name}" onclick="createManualLoginFilled(this.dataset.user)"><h1>${user.Name}</h1><img src="${config.get('serverUrl')}/Users/${user.Id}/Images/Primary"></div>`;
html = `<div class="user__card" data-user="${user.Name}" onclick="createEnterPassword(this.dataset.user)"><h1>${user.Name}</h1><img src="${config.get('serverUrl')}/Users/${user.Id}/Images/Primary"></div>`;
}
else if (!user.PrimaryImageTag) {
html = `<div class="user__card" data-user="${user.Name}" onclick="createManualLoginFilled(this.dataset.user)"><h1>${user.Name}</h1><img src="../svg/avatar.svg"></div>`;
html = `<div class="user__card" data-user="${user.Name}" onclick="createEnterPassword(this.dataset.user)"><h1>${user.Name}</h1><img src="../svg/avatar.svg"></div>`;
}
document.querySelector('.user__cont').insertAdjacentHTML('beforeend', html);
});
@@ -37,37 +38,6 @@ const createUserList = () => {
});
};
if (config.get('serverGo') == true) {
createUserList();
} else if (config.get('serverGo') == false) {
saveBtn.onclick = () => {
ipcRenderer.send('setServer', serverUrl.value);
document.querySelector('.loader').classList.remove('hide');
ipcRenderer.on('not-jf-server', () => {
document.querySelector('.loader').classList.add('hide');
createServerErr();
});
ipcRenderer.on('is-jf-server', () => {
createUserList();
});
};
}
const createManualLogin = () => {
html = `<div class="one"><input type="text" value="" class="user__name"><input type="password" value="" class="user__password"><input class="remember__user" type="checkbox" value="true"><input type="button" value="Login" class="user__login" onclick="sendAuthInfo()"></div>`;
document.querySelector('.manual__input').insertAdjacentHTML('beforeend', html);
};
const createServerErr = () => {
document.querySelector('.error').classList.remove('hide');
document.querySelector('.error').classList.add('active');
document.querySelector('.popup__exit').classList.remove('hide');
document.querySelector('.popup__exit').classList.add('active');
closePopup();
};
const closePopup = () => {
document.querySelector('.popup__exit').addEventListener('click', () => {
document.querySelector('.error').classList.remove('active');
@@ -96,6 +66,58 @@ const closePopup = () => {
});
};
const createServerErr = () => {
document.querySelector('.error').classList.remove('hide');
document.querySelector('.error').classList.add('active');
document.querySelector('.popup__exit').classList.remove('hide');
document.querySelector('.popup__exit').classList.add('active');
closePopup();
};
const sendClearDataRequest = () => {
ipcRenderer.send('clear-user-data');
console.log('cleardata');
};
if (config.get('serverGo') == true) {
document.querySelector('.loader').classList.remove('hide');
ipcRenderer.send('check-server-status');
ipcRenderer.on('server-online', () => {
document.querySelector('.loader').classList.add('hide');
createUserList();
});
ipcRenderer.on('server-offline', () => {
html = `<button class="popup__cleardata__button" onclick="sendClearDataRequest()">
<span class="btn__label">Clear Data</span>
</button>`;
document.querySelector('.loader').classList.add('hide');
document.querySelector('.popup__exit__btn').addEventListener('click', () => {
ipcRenderer.send('reload-page');
});
document.querySelector('.error').insertAdjacentHTML('beforeend', html);
createServerErr();
});
} else if (config.get('serverGo') == false) {
saveBtn.onclick = () => {
ipcRenderer.send('setServer', serverUrl.value);
document.querySelector('.loader').classList.remove('hide');
ipcRenderer.on('not-jf-server', () => {
document.querySelector('.loader').classList.add('hide');
createServerErr();
});
ipcRenderer.on('is-jf-server', () => {
createUserList();
});
};
}
const createManualLogin = () => {
html = `<div class="one"><input type="text" value="" class="user__name"><input type="password" value="" class="user__password"><input class="remember__user" type="checkbox" value="true"><input type="button" value="Login" class="user__login" onclick="sendAuthInfo()"></div>`;
document.querySelector('.manual__input').insertAdjacentHTML('beforeend', html);
};
const setLabelPos = () => {
if (serverUrl.value.length < 1) {
console.log('empty');
@@ -105,7 +127,7 @@ const setLabelPos = () => {
}
};
const createManualLoginFilled = (userName) => {
const createEnterPassword = (userName) => {
html = `<div class="one"><input type="text" value="${userName}" class="user__name"><input type="password" value="" class="user__password"><input class="remember__user" type="checkbox" value="true"><input type="button" value="Login" class="user__login" onclick="sendAuthInfo()"></div>`;
document.querySelector('.user__cont').classList.add('hide');
document.querySelector('.manual__input').insertAdjacentHTML('beforeend', html);