More bug fixes and UI updates
This commit is contained in:
11 files changed
+816
-106
No files matched your search
+3
-11
@@ -1,21 +1,13 @@
|
||||
<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="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.4869C1517.74 79.9832 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"/>
|
||||
<path d="M999.359 128.89L998.051 131.727H1001.17H1105.11H1108.23L1106.93 128.89L1054.96 16.1007L1053.14 12.1583L1051.33 16.1007L999.359 128.89ZM1053.14 4.77445L1113.15 134.848H993.137L1053.14 4.77445Z" stroke="url(#paint1_linear_15_5)" stroke-width="4"/>
|
||||
<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">
|
||||
<linearGradient id="paint1_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>
|
||||
|
||||
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 8.1 KiB |
+5
-5
@@ -16,8 +16,8 @@ async function createWindow() {
|
||||
}
|
||||
});
|
||||
splash.loadFile('./src/render/html/splash.html');
|
||||
var loginPage = new LoginPage();
|
||||
var homePage = new HomePage();
|
||||
var loginPage = new LoginPage();
|
||||
loginPage.window.on('ready-to-show', () => {
|
||||
splash.destroy();
|
||||
if (!config.get('serverUrl')) {
|
||||
@@ -31,9 +31,9 @@ async function createWindow() {
|
||||
});
|
||||
emitter.on('closeHome', () => {
|
||||
homePage.hideHome();
|
||||
config.set('openHome',false);
|
||||
emitter.emit('reauth');
|
||||
loginPage.showLogin();
|
||||
config.set('openHome', false);
|
||||
app.relaunch();
|
||||
app.exit(0);
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -44,6 +44,6 @@ app.whenReady().then(() => {
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit();
|
||||
app.exit();
|
||||
}
|
||||
});
|
||||
+5
-13
@@ -6,7 +6,6 @@ const config = require('../config');
|
||||
const { Jellyfin } = require('@thornbill/jellyfin-sdk');
|
||||
|
||||
var icon = nativeImage.createFromPath('../assets/icon.png');
|
||||
console.log(icon.getAspectRatio);
|
||||
|
||||
class LoginPage {
|
||||
constructor() {
|
||||
@@ -25,18 +24,17 @@ class LoginPage {
|
||||
center: true,
|
||||
resizable: true,
|
||||
maximizable: true,
|
||||
show: false,
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
contextIsolation: false
|
||||
},
|
||||
show: false,
|
||||
icon: icon
|
||||
});
|
||||
this.window.loadFile("./src/render/html/login.html");
|
||||
this.window.webContents.openDevTools();
|
||||
this.window.setMenu(null);
|
||||
this.window.maximize();
|
||||
this.window.hide();
|
||||
}
|
||||
onstartUp() {
|
||||
ipcMain.on('check-server-status', (event) => {
|
||||
@@ -47,7 +45,6 @@ class LoginPage {
|
||||
}
|
||||
else {
|
||||
event.sender.send('server-offline');
|
||||
console.log('offline');
|
||||
this.serverOnline = true;
|
||||
}
|
||||
}).catch((er) => {
|
||||
@@ -108,10 +105,8 @@ class LoginPage {
|
||||
if (users.data.length == 0) {
|
||||
event.sender.send('no-public-users');
|
||||
} else {
|
||||
console.log(users.data);
|
||||
event.sender.send('userlist', users.data);
|
||||
}
|
||||
console.log('sending');
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -128,10 +123,9 @@ class LoginPage {
|
||||
}
|
||||
} else {
|
||||
this.window.once('ready-to-show', () => {
|
||||
ipcMain.on('user-auth-details', async (e, user) => {
|
||||
ipcMain.on('user-auth-details', async (event, user) => {
|
||||
try {
|
||||
auth = await this.api.authenticateUserByName(user[0], user[1]);
|
||||
console.log("Auth =>", auth.data);
|
||||
if (user[2] == true) {
|
||||
config.set('user.name', user[0]);
|
||||
config.set('user.pass', user[1]);
|
||||
@@ -139,7 +133,9 @@ class LoginPage {
|
||||
}
|
||||
emitter.emit('logged-in');
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
console.log("err");
|
||||
event.sender.send('user-auth-failed');
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -149,7 +145,6 @@ class LoginPage {
|
||||
ipcMain.on('user-auth-details', async (e, user) => {
|
||||
try {
|
||||
auth = await this.api.authenticateUserByName(user[0], user[1]);
|
||||
console.log("Auth =>", auth.data);
|
||||
if (user[2] == true) {
|
||||
config.set('user.name', user[0]);
|
||||
config.set('user.pass', user[1]);
|
||||
@@ -165,17 +160,14 @@ class LoginPage {
|
||||
}
|
||||
logoutUser() {
|
||||
emitter.on('logout-user', async () => {
|
||||
console.log('he');
|
||||
await this.api.logout();
|
||||
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() {
|
||||
|
||||
@@ -8,8 +8,10 @@
|
||||
--error-red: #b33a3a;
|
||||
--error-red-darker-1: #8b2e2e;
|
||||
--rounding: 10px;
|
||||
--transition-time-default: 0.25s;
|
||||
--transition-time-slow-1: 0.35s;
|
||||
--rounding-1: 5px;
|
||||
--transition-time-fast-1: 100ms;
|
||||
--transition-time-default: 250ms;
|
||||
--transition-time-slow-1: 350ms;
|
||||
}
|
||||
|
||||
body,
|
||||
@@ -31,6 +33,7 @@ button {
|
||||
.input {
|
||||
position: relative;
|
||||
font-size: calc(60vw / 20);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ripple__cont {
|
||||
|
||||
+118
-3
@@ -42,6 +42,12 @@ main {
|
||||
flex-shrink: 0;
|
||||
flex-basis: 100vw;
|
||||
overflow: hidden;
|
||||
flex-flow: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.page > button {
|
||||
width: 60vw;
|
||||
}
|
||||
|
||||
.server__cont,
|
||||
@@ -91,7 +97,7 @@ input[type="password"] {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.input__btn {
|
||||
button {
|
||||
overflow: hidden;
|
||||
background: #ffffff4b;
|
||||
border: 2px solid white;
|
||||
@@ -101,7 +107,7 @@ input[type="password"] {
|
||||
transition: background var(--transition-time-default);
|
||||
}
|
||||
|
||||
.input__btn:hover {
|
||||
button:hover {
|
||||
background: #ffffff6b;
|
||||
}
|
||||
|
||||
@@ -156,7 +162,7 @@ input:focus + .input__label,
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.error {
|
||||
.popup {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
@@ -177,9 +183,16 @@ input:focus + .input__label,
|
||||
.icon svg {
|
||||
width: auto;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.error .icon svg {
|
||||
color: var(--error-red);
|
||||
}
|
||||
|
||||
.waring .icon svg {
|
||||
color: var(--warning-yellow);
|
||||
}
|
||||
|
||||
.popup .text {
|
||||
font-family: "IBM Plex Mono";
|
||||
font-weight: 300;
|
||||
@@ -249,6 +262,108 @@ input:focus + .input__label,
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
section.user__cont {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
overflow: auto hidden;
|
||||
height: 50vh;
|
||||
}
|
||||
.user__card {
|
||||
width: 50%;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
flex-flow: column-reverse;
|
||||
}
|
||||
|
||||
.user__svg,
|
||||
.user__img {
|
||||
width: 10em;
|
||||
-o-object-fit: cover;
|
||||
object-fit: cover;
|
||||
height: 10em;
|
||||
border-radius: var(--rounding);
|
||||
background: white;
|
||||
mix-blend-mode: multiply;
|
||||
box-shadow: 0 0 20px #00000057;
|
||||
}
|
||||
|
||||
.user__svg {
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.user {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
grid-gap: 2em;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.user__info {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
grid-gap: 10px;
|
||||
}
|
||||
|
||||
.user__info .name {
|
||||
text-shadow: 0 0 8px #00000057;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
font-weight: 300;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-size: min(2em, calc(100vw / 25));
|
||||
}
|
||||
|
||||
.user__info .user__img {
|
||||
border-radius: 100%;
|
||||
}
|
||||
|
||||
.input.checkbox {
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
justify-content: flex-start;
|
||||
grid-gap: 10px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.checkbox label {
|
||||
font-size: min(0.6em, calc(100vw / 25));
|
||||
}
|
||||
|
||||
.tick {
|
||||
display: block;
|
||||
width: 0.6em;
|
||||
border-radius: var(--rounding-1);
|
||||
border: 1px solid white;
|
||||
}
|
||||
|
||||
.tick path {
|
||||
stroke: white;
|
||||
stroke-dasharray: 100%;
|
||||
stroke-dashoffset: 100%;
|
||||
transition: stroke-dashoffset var(--transition-time-fast-1);
|
||||
}
|
||||
|
||||
input[type="checkbox"]:checked + .tick > path {
|
||||
stroke-dashoffset: 0%;
|
||||
}
|
||||
|
||||
.remember__user {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
inset: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/*Animations*/
|
||||
@-webkit-keyframes fadeInBg {
|
||||
0% {
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
</div>
|
||||
<div class="form__cont">
|
||||
<div class="input">
|
||||
<input id="serverUrl" type="url" class="input__text server__url" onblur="setLabelPos()">
|
||||
<input id="serverUrl" type="url" class="input__text server__url" onblur="setLabelPos(this)">
|
||||
<label for="serverUrl" class="input__label">Server Address</label>
|
||||
</div>
|
||||
<button class="input__btn save__server clicky">
|
||||
@@ -61,6 +61,9 @@
|
||||
</section>
|
||||
<section class="page users hide">
|
||||
<section class="user__cont"></section>
|
||||
<button class="change__server clicky" onclick="changeServer()">
|
||||
<span>Change Server</span>
|
||||
</button>
|
||||
</section>
|
||||
<section class="page manual__login hide">
|
||||
<section class="manual__input"></section>
|
||||
@@ -74,7 +77,7 @@
|
||||
</svg>
|
||||
</div>
|
||||
<h2 class="text">Can't determine if the entered Server address is a valid Jellyfin Server</h2>
|
||||
<button class="popup__exit__btn">
|
||||
<button class="popup__exit__btn clicky">
|
||||
<span class="btn__label">Try Again</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -20,29 +20,19 @@
|
||||
}
|
||||
</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="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.4869C1517.74 79.9832 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"/>
|
||||
<path d="M999.359 128.89L998.051 131.727H1001.17H1105.11H1108.23L1106.93 128.89L1054.96 16.1007L1053.14 12.1583L1051.33 16.1007L999.359 128.89ZM1053.14 4.77445L1113.15 134.848H993.137L1053.14 4.77445Z" stroke="url(#paint1_linear_15_5)" stroke-width="4"/>
|
||||
<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">
|
||||
<linearGradient id="paint1_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>
|
||||
|
||||
</svg>
|
||||
</body>
|
||||
</html>
|
||||
+124
-17
@@ -1,4 +1,5 @@
|
||||
const { ipcRenderer } = require("electron");
|
||||
const got = require('got');
|
||||
const emitter = require('../../common/emitter');
|
||||
const config = require("../../config");
|
||||
const serverForm = document.querySelector('.server__cont');
|
||||
@@ -15,10 +16,10 @@ const createUserList = () => {
|
||||
ipcRenderer.on('userlist', (event, userlist) => {
|
||||
userlist.forEach(user => {
|
||||
if (user.PrimaryImageTag) {
|
||||
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>`;
|
||||
html = `<div class="user__card" data-user="${user.Name}" data-userid="${user.Id}" onclick="createEnterPassword(this.dataset.user, true, this.dataset.userid)"><h1>${user.Name}</h1><img class="user__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="createEnterPassword(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, false)"><h1>${user.Name}</h1><img class="user__svg" src="../svg/avatar.svg"></div>`;
|
||||
}
|
||||
document.querySelector('.user__cont').insertAdjacentHTML('beforeend', html);
|
||||
});
|
||||
@@ -114,31 +115,137 @@ if (config.get('serverGo') == true) {
|
||||
|
||||
|
||||
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>`;
|
||||
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');
|
||||
document.querySelector('.input__label').classList.remove('inputLabelActive');
|
||||
const setLabelPos = (element) => {
|
||||
if (element.value.length < 1) {
|
||||
element.parentNode.querySelector('.input__label').classList.remove('inputLabelActive');
|
||||
} else {
|
||||
document.querySelector('.input__label').classList.add('inputLabelActive');
|
||||
element.parentNode.querySelector('.input__label').classList.add('inputLabelActive');
|
||||
}
|
||||
};
|
||||
|
||||
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');
|
||||
const createEnterPassword = (userName, userImg, userId) => {
|
||||
if (userImg == true) {
|
||||
html = `<div class="user">
|
||||
<div class="user__info">
|
||||
<img class="user__img" src="${config.get('serverUrl')}/Users/${userId}/Images/Primary">
|
||||
<h3 class="name">Hello, ${userName}</h3>
|
||||
</div>
|
||||
<div class="input">
|
||||
<input type="password" value="" class="user__password" onblur="setLabelPos(this)">
|
||||
<label for="user__password" class="input__label">Password</label>
|
||||
</div>
|
||||
<div class="input checkbox">
|
||||
<label>Remember me</label>
|
||||
<input class="remember__user" type="checkbox" value="true" style="-webkit-appearance: none;">
|
||||
<svg class="tick" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13.854 3.646L6.5 11L2.646 7.146" stroke="black" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
<button class="user__login clicky" data-user="${userName}" onclick="sendAuthInfo(this.dataset.user, document.querySelector('.user__password').value, document.querySelector('.remember__user'))">
|
||||
<span>Login</span>
|
||||
</button>
|
||||
</div>`;
|
||||
} else if (userImg == false) {
|
||||
html = `<div class="user">
|
||||
<div class="user__info">
|
||||
<img class="user__svg" src="../svg/avatar.svg">
|
||||
<h3 class="name">Hello, ${userName}</h3>
|
||||
</div>
|
||||
<div class="input">
|
||||
<input type="password" value="" class="user__password" onblur="setLabelPos(this)">
|
||||
<label for="user__password" class="input__label">Password</label>
|
||||
</div>
|
||||
<div class="input checkbox">
|
||||
<label>Remember me</label>
|
||||
<input class="remember__user" type="checkbox" value="true" style="-webkit-appearance: none;">
|
||||
<svg class="tick" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13.854 3.646L6.5 11L2.646 7.146" stroke="black" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</div>
|
||||
<button class="user__login clicky" data-user="${userName}" onclick="sendAuthInfo(this.dataset.user, document.querySelector('.user__password').value, document.querySelector('.remember__user'))">
|
||||
<span>Login</span>
|
||||
</button>
|
||||
</div>`;
|
||||
}
|
||||
document.querySelector('.manual__input').insertAdjacentHTML('beforeend', html);
|
||||
document.querySelector('.manual__login').classList.remove('hide');
|
||||
document.querySelector('.manual__login').scrollIntoView({ behavior: "smooth" });
|
||||
setInterval(() => {
|
||||
document.querySelector('.users').classList.add('hide');
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
const sendAuthInfo = () => {
|
||||
const user_name = document.querySelector('.user__name');
|
||||
const user_pass = document.querySelector('.user__password');
|
||||
if (document.querySelector(".remember__user").checked == true) {
|
||||
ipcRenderer.send('user-auth-details', [user_name.value, user_pass.value, true]);
|
||||
const sendAuthInfo = (userName, password, checkbox) =>{
|
||||
if (checkbox.checked == true) {
|
||||
ipcRenderer.send('user-auth-details', [userName, password, true]);
|
||||
} else {
|
||||
ipcRenderer.send('user-auth-details', [user_name.value, user_pass.value, false]);
|
||||
ipcRenderer.send('user-auth-details', [userName, password, false]);
|
||||
}
|
||||
ipcRenderer.on('user-auth-failed', () => {
|
||||
console.log('heloo');
|
||||
document.querySelector('.error').querySelector('.text').innerHTML = "Unable to login Please check your password";
|
||||
createServerErr();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
const changeServer = () => {
|
||||
html = `<div class="popup warning hide">
|
||||
<div class="icon">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-exclamation-triangle" viewBox="0 0 16 16">
|
||||
<path d="M7.938 2.016A.13.13 0 0 1 8.002 2a.13.13 0 0 1 .063.016.146.146 0 0 1 .054.057l6.857 11.667c.036.06.035.124.002.183a.163.163 0 0 1-.054.06.116.116 0 0 1-.066.017H1.146a.115.115 0 0 1-.066-.017.163.163 0 0 1-.054-.06.176.176 0 0 1 .002-.183L7.884 2.073a.147.147 0 0 1 .054-.057zm1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566z"/>
|
||||
<path d="M7.002 12a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995z"/>
|
||||
</svg>
|
||||
</div>
|
||||
<h2 class="text">Are you sure, you want to remove your existing server?</h2>
|
||||
<button class="popup__exit__btn yes clicky" onclick="sendClearDataRequest()">
|
||||
<span class="btn__label">Yes</span>
|
||||
</button>
|
||||
<button class="popup__exit__btn no clicky">
|
||||
<span class="btn__label">No</span>
|
||||
</button>
|
||||
</div>`;
|
||||
document.querySelector('main').insertAdjacentHTML('beforeend', html);
|
||||
|
||||
document.querySelector('.warning').classList.remove('hide');
|
||||
document.querySelector('.warning').classList.add('active');
|
||||
document.querySelector('.popup__exit').classList.remove('hide');
|
||||
document.querySelector('.popup__exit').classList.add('active');
|
||||
|
||||
document.querySelector('.popup__exit').addEventListener('click', () => {
|
||||
document.querySelector('.warning').classList.remove('active');
|
||||
document.querySelector('.warning').classList.add('fadeOut');
|
||||
document.querySelector('.popup__exit').classList.remove('active');
|
||||
document.querySelector('.popup__exit').classList.add('fadeOut');
|
||||
setTimeout(() => {
|
||||
document.querySelector('.warning').classList.remove('fadeOut');
|
||||
document.querySelector('.popup__exit').classList.remove('fadeOut');
|
||||
document.querySelector('.warning').classList.add('hide');
|
||||
document.querySelector('.popup__exit').classList.add('hide');
|
||||
document.querySelector('.warning').remove();
|
||||
}, 305);
|
||||
});
|
||||
|
||||
document.querySelector('.popup__exit__btn').addEventListener('click', () => {
|
||||
document.querySelector('.warning').classList.remove('active');
|
||||
document.querySelector('.warning').classList.add('fadeOut');
|
||||
document.querySelector('.popup__exit').classList.remove('active');
|
||||
document.querySelector('.popup__exit').classList.add('fadeOut');
|
||||
setTimeout(() => {
|
||||
document.querySelector('.warning').classList.remove('fadeOut');
|
||||
document.querySelector('.popup__exit').classList.remove('fadeOut');
|
||||
document.querySelector('.warning').classList.add('hide');
|
||||
document.querySelector('.popup__exit').classList.add('hide');
|
||||
document.querySelector('.warning').remove();
|
||||
}, 305);
|
||||
});
|
||||
};
|
||||
Reference in new issue
Block a user