Add setup tool

master
Skylar Ittner 5 년 전
부모 da5978e390
커밋 dc7b2e1b68

1
.gitignore vendored

@ -4,3 +4,4 @@
/platforms
/plugins
npm-debug.log
nbproject/private/

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="512" height="512" version="1.1" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 -540.36)"><rect y="540.36" width="512" height="512" rx="50" ry="50" fill="#fff"/><g transform="translate(.61385 9.1477)"><rect x="145.69" y="726.61" width="100.27" height="296.34" rx="15" ry="15" fill="#1976d2"/><rect x="263.58" y="797.95" width="100.27" height="225" rx="15" ry="15" fill="#9e9e9e"/><rect x="30.27" y="858.02" width="100.27" height="164.93" rx="15" ry="15" fill="#9e9e9e"/><rect x="380.23" y="551.48" width="100.27" height="471.47" rx="15" ry="15" fill="#64b5f6"/><path transform="translate(0 540.36)" d="m195.89 55.102a24.749 24.749 0 0 0-24.816 24.682 24.749 24.749 0 0 0 3.0234 11.867l-97.42 243.43a24.749 24.749 0 0 0-21.021 24.383 24.749 24.749 0 0 0 24.68 24.816 24.749 24.749 0 0 0 24.816-24.682 24.749 24.749 0 0 0-5.2422-15.287l94.438-235.97 100.25 303.25a24.749 24.749 0 0 0-5.6309 15.625 24.749 24.749 0 0 0 24.68 24.816 24.749 24.749 0 0 0 24.816-24.68 24.749 24.749 0 0 0-7.8633-18.119l101.57-228.59a24.749 24.749 0 0 0 22.949-24.609 24.749 24.749 0 0 0-24.682-24.816 24.749 24.749 0 0 0-24.816 24.68 24.749 24.749 0 0 0 4.1055 13.689l-96.789 217.83-96.938-293.25a24.749 24.749 0 0 0 4.5781-14.248 24.749 24.749 0 0 0-24.682-24.816z" fill="#2196f3" stroke="#fff" stroke-width="7"/></g></g></svg>

After

Width:  |  Height:  |  크기: 1.4 KiB

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="512" height="512" version="1.1" viewBox="0 0 135.47 135.47" xmlns="http://www.w3.org/2000/svg"><g transform="matrix(.92927 0 0 .92927 5.5244 23.768)" fill="#0082c9" stroke-width=".28473"><path id="XMLID_107_" d="m67.033 10c-11.805 0-21.811 8.0032-24.912 18.847-2.6952-5.7515-8.5359-9.7809-15.263-9.7809-9.2518 0-16.857 7.6052-16.857 16.857 0 9.2518 7.6052 16.861 16.857 16.861 6.7274 0 12.568-4.0319 15.263-9.7844 3.1012 10.844 13.107 18.85 24.912 18.85 11.718 0 21.673-7.8851 24.853-18.607 2.745 5.6219 8.5134 9.5413 15.145 9.5413 9.2518 0 16.861-7.6087 16.861-16.861 0-9.2518-7.6087-16.857-16.861-16.857-6.6319 0-12.4 3.917-15.145 9.5379-3.1805-10.721-13.135-18.604-24.853-18.604zm0 9.8955c8.9116 0 16.031 7.1156 16.031 16.027s-7.1191 16.031-16.031 16.031c-8.9116 0-16.027-7.1191-16.027-16.031s7.1156-16.027 16.027-16.027zm-40.176 9.0657c3.9044 0 6.965 3.0572 6.965 6.9616 0 3.9044-3.0607 6.965-6.965 6.965-3.9044 0-6.9616-3.0607-6.9616-6.965 0-3.9044 3.0572-6.9616 6.9616-6.9616zm80.174 0c3.9044 0 6.965 3.0572 6.965 6.9616 0 3.9044-3.0607 6.965-6.965 6.965-3.9044 0-6.9616-3.0607-6.9616-6.965 0-3.9044 3.0572-6.9616 6.9616-6.9616z" color="#000000" color-rendering="auto" image-rendering="auto" shape-rendering="auto" solid-color="#000000" style="isolation:auto;mix-blend-mode:normal;text-decoration-color:#000000;text-decoration-line:none;text-decoration-style:solid;text-indent:0;text-transform:none;white-space:normal"/><g transform="matrix(.47039 0 0 .47039 21.389 50.76)" stroke-width=".28473"><path id="XMLID_121_" d="m37.67 48.9c5.9 0 9.2 4.2 9.2 10.5 0 0.6-0.5 1.1-1.1 1.1h-15.9c0.1 5.6 4 8.8 8.5 8.8 2.8 0 4.8-1.2 5.8-2 0.6-0.4 1.1-0.3 1.4 0.3l0.3 0.5c0.3 0.5 0.2 1-0.3 1.4-1.2 0.9-3.8 2.4-7.3 2.4-6.5 0-11.5-4.7-11.5-11.5 0.1-7.2 4.9-11.5 10.9-11.5zm6.1 9.4c-0.2-4.6-3-6.9-6.2-6.9-3.7 0-6.9 2.4-7.6 6.9z"/><path id="XMLID_119_" d="m76.9 52.1v-7.7c0-0.7 0.4-1.1 1.1-1.1h0.8c0.7 0 1 0.4 1 1.1v5.2h4.5c0.7 0 1.1 0.4 1.1 1.1v0.3c0 0.7-0.4 1-1.1 1h-4.5v11c0 5.1 3.1 5.7 4.8 5.8 0.9 0.1 1.2 0.3 1.2 1.1v0.6c0 0.7-0.3 1-1.2 1-4.8 0-7.7-2.9-7.7-8.1z"/><path id="XMLID_117_" d="m99.8 48.9c3.8 0 6.2 1.6 7.3 2.5 0.5 0.4 0.6 0.9 0.1 1.5l-0.3 0.5c-0.4 0.6-0.9 0.6-1.5 0.2-1-0.7-2.9-2-5.5-2-4.8 0-8.6 3.6-8.6 8.9 0 5.2 3.8 8.8 8.6 8.8 3.1 0 5.2-1.4 6.2-2.3 0.6-0.4 1-0.3 1.4 0.3l0.3 0.4c0.3 0.6 0.2 1-0.3 1.5-1.1 0.9-3.8 2.8-7.8 2.8-6.5 0-11.5-4.7-11.5-11.5 0.1-6.8 5.1-11.6 11.6-11.6z"/><path id="XMLID_115_" d="m113.1 41.8c0-0.7-0.4-1.1 0.3-1.1h0.8c0.7 0 1.8 0.4 1.8 1.1v23.9c0 2.8 1.3 3.1 2.3 3.2 0.5 0 0.9 0.3 0.9 1v0.7c0 0.7-0.3 1.1-1.1 1.1-1.8 0-5-0.6-5-5.4z"/><path id="XMLID_112_" d="m133.6 48.9c6.4 0 11.6 4.9 11.6 11.4 0 6.6-5.2 11.6-11.6 11.6s-11.6-5-11.6-11.6c0-6.5 5.2-11.4 11.6-11.4zm0 20.4c4.7 0 8.5-3.8 8.5-9 0-5-3.8-8.7-8.5-8.7s-8.6 3.8-8.6 8.7c0.1 5.1 3.9 9 8.6 9z"/><path id="XMLID_109_" d="m183.5 48.9c5.3 0 7.2 4.4 7.2 4.4h0.1s-0.1-0.7-0.1-1.7v-9.9c0-0.7-0.3-1.1 0.4-1.1h0.8c0.7 0 1.8 0.4 1.8 1.1v28.5c0 0.7-0.3 1.1-1 1.1h-0.7c-0.7 0-1.1-0.3-1.1-1v-1.7c0-0.8 0.2-1.4 0.2-1.4h-0.1s-1.9 4.6-7.6 4.6c-5.9 0-9.6-4.7-9.6-11.5-0.2-6.8 3.9-11.4 9.7-11.4zm0.1 20.4c3.7 0 7.1-2.6 7.1-8.9 0-4.5-2.3-8.8-7-8.8-3.9 0-7.1 3.2-7.1 8.8 0.1 5.4 2.9 8.9 7 8.9z"/><path id="XMLID_103_" d="m1 71.4h0.8c0.7 0 1.1-0.4 1.1-1.1v-21.472c0-3.4 3.7-5.8277 7.9-5.8277s7.9 2.4277 7.9 5.8277v21.472c0 0.7 0.4 1.1 1.1 1.1h0.8c0.7 0 1-0.4 1-1.1v-21.6c0-5.7-5.7-8.5-10.9-8.5-5 0-10.7 2.8-10.7 8.5v21.6c0 0.7 0.3 1.1 1 1.1z"/><path id="XMLID_102_" d="m167.9 49.4h-0.8c-0.7 0-1.1 0.4-1.1 1.1v12.1c0 3.4-2.2 6.5-6.5 6.5-4.2 0-6.5-3.1-6.5-6.5v-12.1c0-0.7-0.4-1.1-1.1-1.1h-0.8c-0.7 0-1 0.4-1 1.1v12.9c0 5.7 4.2 8.5 9.4 8.5s9.4-2.8 9.4-8.5v-12.9c0.1-0.7-0.3-1.1-1-1.1z"/><path d="m68.908 49.236c-0.24494 0.0391-0.4801 0.20259-0.70508 0.4707l-4.0469 4.8242-3.0293 3.6094-4.5859-5.4668-2.4883-2.9668c-0.22498-0.26812-0.47975-0.41472-0.74414-0.4375-0.26439-0.02278-0.53852 0.07775-0.80664 0.30273l-0.61328 0.51367c-0.53623 0.44995-0.50854 0.94814-0.05859 1.4844l4.0488 4.8242 3.3574 4-4.916 5.8574c-0.0037 0.0044-0.0061 0.0093-0.0098 0.01367l-2.4805 2.9551c-0.44995 0.53623-0.39953 1.1008 0.13672 1.5508l0.61328 0.51172c0.53623 0.44995 1.0227 0.33701 1.4727-0.19922l4.0469-4.8242 3.0293-3.6094 4.5859 5.4668c3e-3 0.0036 0.0067 0.0062 0.0098 0.0098l2.4805 2.957c0.44995 0.53623 1.0126 0.58474 1.5488 0.13476l0.61328-0.51367c0.53623-0.44995 0.50854-0.94814 0.05859-1.4844l-4.0488-4.8242-3.3574-4 4.916-5.8574c0.0037-0.0044 0.0061-0.0093 0.0098-0.01367l2.4805-2.9551c0.44995-0.53623 0.39953-1.1008-0.13672-1.5508l-0.61328-0.51367c-0.26812-0.22498-0.52264-0.30864-0.76758-0.26953z"/></g></g></svg>

After

Width:  |  Height:  |  크기: 4.5 KiB

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="512" height="512" version="1.1" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><rect y="-7.3828e-6" width="512" height="512" rx="70" ry="70" fill="#2196f3"/><path d="m198.56 65.838c-0.61516 0-1.1439-2.09e-4 -1.5723 0.15846-3.4273 1.2964-6.7936 12.993-8.3001 16.335-1.5064 3.3408-8.046 13.593-6.7492 17.021 1.2969 3.4258 12.995 6.7929 16.335 8.3001 3.3406 1.5061 13.615 8.0456 17.042 6.7492 3.4273-1.2964 6.7938-12.996 8.3001-16.335 1.5065-3.3419 8.0461-13.614 6.7492-17.042-1.297-3.4269-12.992-6.794-16.332-8.3001-2.9229-1.318-11.166-6.4753-15.473-6.8833zm-46.614 80.39c-0.61524 0-1.1438-1.9e-4 -1.5723 0.15845-3.4273 1.2964-6.7936 12.991-8.3001 16.332-1.5064 3.3397-8.046 13.594-6.7492 17.021 1.2969 3.428 12.995 6.794 16.335 8.3001 3.3406 1.5061 13.593 8.0486 17.021 6.7522 3.4273-1.2976 6.7938-12.994 8.3001-16.335 1.5065-3.3396 8.0461-13.614 6.7492-17.042s-12.995-6.794-16.335-8.3001c-2.9229-1.318-11.142-6.4753-15.448-6.8832zm85.213 1.6149c-0.61515 0-1.1409 0.0125-1.5692 0.13713-3.4273 1.2964-6.7936 12.991-8.3001 16.332-1.5064 3.3396-8.049 13.617-6.7522 17.045 1.2969 3.4269 12.995 6.7898 16.335 8.2971 3.3405 1.5061 13.593 8.0486 17.021 6.7522 3.4272-1.2964 6.7937-12.993 8.3001-16.335 1.5065-3.3408 8.0461-13.614 6.7492-17.042-1.2969-3.4269-12.992-6.794-16.332-8.3001-2.9229-1.3191-11.145-6.4866-15.452-6.8832zm184.88 12.858c-0.61527 0-1.1439 0.0125-1.5723 0.13712-3.4273 1.2976-6.7936 12.992-8.3001 16.332-1.5064 3.3408-8.046 13.618-6.7492 17.045 1.2969 3.4269 12.995 6.794 16.335 8.3001 3.3406 1.5072 13.615 8.0456 17.042 6.7492 3.4273-1.2964 6.7937-12.992 8.3001-16.332 1.5065-3.3408 8.0492-13.618 6.7522-17.045-1.2969-3.4269-12.995-6.7929-16.335-8.3001-2.9229-1.318-11.166-6.4753-15.473-6.8832zm-181.29 66.705c-0.61513 0-1.1408 0.01-1.5692 0.13401-3.4273 1.2976-6.7937 12.996-8.3001 16.338-1.5064 3.3397-8.0491 13.614-6.7522 17.042 1.2969 3.4258 12.995 6.794 16.335 8.3001 3.3406 1.5061 13.615 8.0467 17.042 6.7492 3.4273-1.2964 6.7938-12.995 8.3001-16.335 1.5065-3.3408 8.0492-13.616 6.7522-17.042-1.2969-3.428-12.995-6.7929-16.335-8.3001-2.9229-1.318-11.166-6.4753-15.473-6.8832zm-127.35-0.75646c-0.61517 0-1.1652-2e-4 -1.5936 0.15845-3.4273 1.2964-6.7936 12.993-8.3001 16.335-1.5063 3.3408-8.0247 13.594-6.7279 17.021 1.297 3.4269 12.992 6.7918 16.332 8.3001 3.3405 1.5061 13.593 8.0456 17.021 6.7492 3.4273-1.2964 6.7937-12.991 8.3001-16.332 1.5065-3.3408 8.0492-13.596 6.7522-17.024-1.2969-3.4269-12.995-6.7899-16.335-8.2971-2.9229-1.3168-11.142-6.511-15.448-6.9076zm271.67 12.826c-0.61515 0-1.1652-2e-4 -1.5936 0.15845-3.4273 1.2976-6.7936 12.991-8.3001 16.332-1.5064 3.3396-8.0247 13.593-6.7278 17.021 1.297 3.4269 12.995 6.794 16.335 8.3001 3.3406 1.5072 13.593 8.0498 17.021 6.7522 3.4273-1.2976 6.7938-12.994 8.3001-16.335 1.5064-3.3397 8.0461-13.594 6.7492-17.021-1.2969-3.428-12.992-6.794-16.332-8.3001-2.9229-1.3191-11.145-6.5079-15.451-6.9046zm-310.31 72.355c-0.61524 0-1.1439 0.01-1.5723 0.13402-3.4273 1.2976-6.7936 12.994-8.3001 16.335-1.5064 3.3396-8.049 13.614-6.7522 17.042 1.297 3.428 12.995 6.794 16.335 8.3001 3.3406 1.5061 13.618 8.0486 17.045 6.7522 3.4273-1.2976 6.7938-12.994 8.3001-16.335 1.5065-3.3396 8.0248-13.615 6.7279-17.042-1.2969-3.428-12.995-6.794-16.335-8.3001-2.9229-1.3191-11.142-6.4753-15.448-6.8833zm178.46 0c-0.61524 0-1.1439 0.01-1.5723 0.13402-3.4273 1.2976-6.7936 12.994-8.3001 16.335-1.5064 3.3396-8.046 13.614-6.7492 17.042 1.2969 3.428 12.995 6.794 16.335 8.3001 3.3406 1.5061 13.615 8.0486 17.042 6.7522 3.4273-1.2976 6.7938-12.994 8.3001-16.335 1.5064-3.3396 8.0461-13.615 6.7492-17.042-1.2969-3.428-12.992-6.794-16.332-8.3001-2.9229-1.3191-11.166-6.4753-15.473-6.8833zm85.248 5.6469c-0.61526 0-1.1439 0.0125-1.5723 0.13712-3.4273 1.2976-6.7937 12.994-8.3001 16.335-1.5064 3.3408-8.046 13.614-6.7492 17.042 1.297 3.4258 12.995 6.794 16.335 8.3001 3.3406 1.5061 13.615 8.0498 17.042 6.7522 3.4273-1.2964 6.7937-12.996 8.3001-16.335 1.5064-3.3408 8.0461-13.616 6.7492-17.042-1.2969-3.428-12.992-6.7918-16.332-8.3001-2.9229-1.3168-11.166-6.4753-15.473-6.8832zm-39.507 79.948c-0.61519 0-1.1652-2.1e-4 -1.5936 0.15843-3.4273 1.2976-6.7936 12.994-8.3001 16.335-1.5063 3.3408-8.0491 13.594-6.7522 17.021 1.2969 3.4269 12.995 6.794 16.335 8.3001 3.3406 1.5061 13.618 8.0498 17.045 6.7522 3.4272-1.2964 6.7938-12.995 8.3001-16.335 1.5064-3.3408 8.0461-13.594 6.7492-17.021-1.2969-3.428-12.995-6.794-16.335-8.3001-2.9229-1.318-11.142-6.511-15.448-6.9076z" fill="#fff"/><g transform="translate(-2442.8 -889.49)" fill="#78bff8"><rect transform="rotate(23.45)" x="46.829" y="305.29" width="579.88" height="355.5"/><rect transform="rotate(203.45)" x="-671.27" y="41.806" width="579.88" height="355.5"/><rect transform="rotate(-66.55)" x="-429.2" y="509.73" width="579.88" height="355.5"/><rect transform="rotate(-66.55)" x="-427.02" y="-188.84" width="579.88" height="355.5"/></g></svg>

After

Width:  |  Height:  |  크기: 4.8 KiB

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="512" height="512" version="1.1" viewBox="0 0 135.47 135.47" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 -161.53)"><g transform="translate(1.7769 -4.861)"><rect x="13.04" y="181.84" width="105.83" height="19.844" rx="5" ry="5" fill="#9e9e9e"/><circle cx="27.253" cy="191.77" r="4.8315" fill="#4caf50" stroke="#fff" stroke-width=".86719"/></g><g transform="translate(3.9123 -4.861)"><rect x="63.821" y="207.04" width="52.917" height="79.375" rx="5" ry="5" fill="#9e9e9e"/><circle cx="90.279" cy="254.57" r="4.8315" fill="#4caf50" stroke="#fff" stroke-width=".86719"/><path d="m77.311 224.06c9.4913 0.0175 18.983-0.0368 28.474 0.03 0.59908 0.13588-1.5556 0.0589-2.076 0.0891-9.0779 0.0278-18.156 0.0138-27.234 2e-3 -0.39246-0.0403-2.0443 0.0493-1.7494-0.0873 0.86063-0.0421 1.7242-0.0232 2.5851-0.0342zm0-9.2876h25.937c1.662 0 3 1.338 3 3v12.708c0 1.662-1.338 3-3 3h-25.937c-1.662 0-3-1.338-3-3v-12.708c0-1.662 1.338-3 3-3z" fill="none" stroke="#fff" stroke-width="1.1361"/><rect x="63.821" y="207.04" width="52.917" height="79.375" rx="5" ry="5" fill="#9e9e9e"/><circle cx="90.279" cy="254.57" r="4.8315" fill="#4caf50" stroke="#fff" stroke-width=".86719"/><path d="m77.311 224.06c9.4913 0.0175 18.983-0.0368 28.474 0.03 0.59908 0.13588-1.5556 0.0589-2.076 0.0891-9.0779 0.0278-18.156 0.0138-27.234 2e-3 -0.39246-0.0403-2.0443 0.0493-1.7494-0.0873 0.86063-0.0421 1.7242-0.0232 2.5851-0.0342zm0-9.2876h25.937c1.662 0 3 1.338 3 3v12.708c0 1.662-1.338 3-3 3h-25.937c-1.662 0-3-1.338-3-3v-12.708c0-1.662 1.338-3 3-3z" fill="none" stroke="#fff" stroke-width="1.1361"/></g><rect x="14.817" y="202.18" width="46.302" height="26.458" rx="5" ry="5" fill="#9e9e9e"/><circle cx="22.225" cy="221.06" r="2.3746" fill="#4caf50" stroke="#fff" stroke-width=".86719"/><rect x="14.817" y="233.68" width="46.302" height="47.869" rx="5" ry="5" fill="#9e9e9e"/><g transform="translate(-.0063038 -7.6294e-6)" fill="#4caf50" stroke="#fff" stroke-width=".86719"><circle cx="50.321" cy="257.62" r="2.3746"/><circle cx="37.974" cy="257.62" r="2.3746"/><circle cx="25.627" cy="257.62" r="2.3746"/></g></g></svg>

After

Width:  |  Height:  |  크기: 2.1 KiB

@ -54,4 +54,9 @@ router.on("pageInit", function (pagedata) {
// Run platform-specific setup code for Cordova or NW.js
initPlatform();
router.navigate("/home");
if (localStorage.getItem("configured") == null) {
// Open the setup page
router.navigate("/setup/0");
} else {
router.navigate("/home");
}

@ -20,7 +20,7 @@ function initCordova() {
}
function initNW() {
// TODO: something clever with desktop integration
}
function initPlatform() {

@ -0,0 +1,103 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
netsymscomurl = "https://apps.netsyms.com/notepost";
netsymsbizurl = "https://BIZID.netsyms.biz/notepost";
$('#use-security-checkbox-li').click(function () {
// Event fires before the checkbox is changed, so we need to do the opposite
if ($("#use-security").prop("checked")) {
$('#protocol-select').text("http://");
} else {
$('#protocol-select').text("https://");
}
});
/* Detect if the user typed "http[s]://" into the URL box and correct for it */
$("#url").blur(function () {
if ($('#url').val().toLowerCase().startsWith("https://")) {
$('#url').val($('#url').val().replace(/https\:\/\//ig, ""));
$('#protocol-select').text("https://");
$('#use-security').prop('checked', true);
} else if ($('#url').val().toLowerCase().startsWith("http://")) {
$('#url').val($('#url').val().replace(/http\:\/\//ig, ""));
$('#protocol-select').text("http://");
$('#use-security').prop('checked', false);
}
});
$('#username').on("keyup", function () {
$('#username').val($('#username').val().toLowerCase());
});
function checkAndSave(url, username, password, nextcloud) {
app.preloader.show();
if (typeof nextcloud === 'undefined') {
nextcloud = false;
}
var checkurl = url + "/api/ping";
if (nextcloud) {
// TODO
}
$.ajax({
url: checkurl,
dataType: "json",
cache: false,
method: "POST",
beforeSend: function (xhr) {
xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));
}, success: function (data) {
app.preloader.hide();
if (data.status == "OK") {
localStorage.setItem("username", username);
localStorage.setItem("password", password);
localStorage.setItem("serverurl", url);
localStorage.setItem("configured", true);
// Restart the app to re-read the config
restartApplication();
} else if (data.status == "ERROR") {
app.dialog.alert(data.msg, "Error");
} else {
app.dialog.alert("", "Error");
}
}, error: function () {
app.preloader.hide();
app.dialog.alert("Could not sign in. Check your credentials and connection.", "Error");
}
});
}
function setupAccount() {
var type = $("#accttype").val();
var username = $("#username").val();
var password = $("#password").val();
switch (type) {
case "personal":
checkAndSave(netsymscomurl, username, password);
break;
case "business":
var url = netsymsbizurl.replace("BIZID", $("#bizid").val());
checkAndSave(url, username, password);
break;
case "selfhosted":
if (/^(https?:\/\/)/.test($('#url').val())) {
var url = $('#url').val();
} else {
var url = $('#protocol-select').text() + $('#url').val();
}
url = url.replace(/\/$/, ""); // Remove trailing slash
checkAndSave(url, username, password);
break;
}
}

@ -0,0 +1,125 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<div class="page" data-name="setup0">
<div class="navbar">
<div class="navbar-inner">
<div class="left">
<a href="#" class="link icon-only back">
<i class="icon icon-back"></i>
</a>
</div>
<div class="title">Sign In</div>
</div>
</div>
<div class="page-content">
<div class="block">
<p>Select an option to get started.</p>
</div>
<div class="list">
<ul>
<li>
<a href="#" class="item-link" onclick='router.navigate("/setup/1", {
context: {
personal: true,
business: false,
selfhosted: false
}
});'>
<div class="item-content">
<div class="item-media">
<img src="img/accounticons/personal.svg" width="44"/>
</div>
<div class="item-inner">
<div class="item-title">
Personal
</div>
<div class="item-text">
Your netsyms.com account
</div>
</div>
</div>
</a>
</li>
<li>
<a href="#" class="item-link" onclick='router.navigate("/setup/1", {
context: {
personal: false,
business: true,
selfhosted: false
}
});'>
<div class="item-content">
<div class="item-media">
<img src="img/accounticons/business.svg" width="44"/>
</div>
<div class="item-inner">
<div class="item-title">
Business
</div>
<div class="item-text">
Your netsyms.biz account
</div>
</div>
</div>
</a>
</li>
<li>
<a href="#" class="item-link" onclick='router.navigate("/setup/1", {
context: {
personal: false,
business: false,
selfhosted: true
}
});'>
<div class="item-content">
<div class="item-media">
<img src="img/accounticons/selfhosted.svg" width="44"/>
</div>
<div class="item-inner">
<div class="item-title">
Other
</div>
<div class="item-text">
Your private or third-party server
</div>
</div>
</div>
</a>
</li>
<!--<li>
<a href="#" class="item-link" onclick='router.navigate("/setup/1", {
context: {
personal: false,
business: false,
selfhosted: true,
nextcloud: true
}
});'>
<div class="item-content">
<div class="item-media">
<img src="img/accounticons/nextcloud.svg" width="44"/>
</div>
<div class="item-inner">
<div class="item-title">
Nextcloud
</div>
<div class="item-text">
A Nextcloud server with the Notes app installed
</div>
</div>
</div>
</a>
</li>-->
</ul>
</div>
</div>
</div>

@ -0,0 +1,120 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<div class="page" data-name="setup1">
<div class="navbar">
<div class="navbar-inner">
<div class="left">
<a href="#" class="link icon-only back">
<i class="icon icon-back"></i>
</a>
</div>
<div class="title">Sign In</div>
</div>
</div>
<div class="page-content">
<div class="block">
<div class="card">
<div class="card-content card-content-padding">
{{#if personal}}
<p>Type your netsyms.com username and password.</p>
{{/if}}
{{#if business}}
<p>Type your netsyms.biz username, password, and business ID.</p>
{{/if}}
{{#if selfhosted}}
<p>Type your username, password, and server URL.</p>
{{/if}}
<div class="list no-hairlines">
<ul>
<li class="item-content item-input">
<div class="item-inner">
<div class="item-title item-floating-label">Username</div>
<div class="item-input-wrap">
<input type="text" id="username" placeholder="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li class="item-content item-input">
<div class="item-inner">
<div class="item-title item-floating-label">Password</div>
<div class="item-input-wrap">
<input type="password" id="password" placeholder="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
<span class="input-clear-button"></span>
</div>
</div>
</li>
{{#if business}}
<li class="item-content item-input">
<div class="item-inner">
<div class="item-title item-floating-label">Business ID (____.netsyms.biz)</div>
<div class="item-input-wrap">
<input type="text" id="bizid" placeholder="" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
<span class="input-clear-button"></span>
</div>
</div>
</li>
{{/if}}
{{#if selfhosted}}
<li class="item-content item-input">
<div class="item-inner">
<div class="item-title item-floating-label">Server Address: <span id="protocol-select">https://</span></div>
<div class="item-input-wrap">
<input type="url" id="url" placeholder="URL" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" />
<span class="input-clear-button"></span>
</div>
</div>
</li>
<li id="use-security-checkbox-li">
<label class="item-checkbox item-content">
<input type="checkbox" id="use-security" checked="checked" />
<i class="icon icon-checkbox"></i>
<span class="item-inner">
<span class="item-title">Use secure connection</span>
</span>
</label>
</li>
{{/if}}
</ul>
</div>
{{#if personal}}
<input type="hidden" id="accttype" value="personal" />
{{/if}}
{{#if business}}
<input type="hidden" id="accttype" value="business" />
{{/if}}
{{#if selfhosted}}
<input type="hidden" id="accttype" value="selfhosted" />
{{/if}}
{{#if nextcloud}}
<input type="hidden" id="nextcloud" value="1" />
{{else}}
<input type="hidden" id="nextcloud" value="0" />
{{/if}}
<br />
<div class="button button-fill button-raised button-round" onclick="setupAccount()">
Continue
</div>
</div>
</div>
</div>
</div>
<script src="js/setup1.js"></script>
</div>

@ -28,6 +28,16 @@ var routes = [
});
}
},
{
path: '/setup/0',
url: './pages/setup0.html',
name: 'setup0'
},
{
path: '/setup/1',
templateUrl: './pages/setup1.html',
name: 'setup1'
},
{
path: '/credits',
url: './pages/credits.html',

불러오는 중...
취소
저장