mirror of
https://github.com/hcengineering/platform.git
synced 2025-01-03 08:57:14 +03:00
initial login
contribution
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
aaaa6d26e4
commit
0085a5430d
@ -5,6 +5,8 @@ specifiers:
|
||||
'@rush-temp/core': file:./projects/core.tgz
|
||||
'@rush-temp/dev-server': file:./projects/dev-server.tgz
|
||||
'@rush-temp/dev-storage': file:./projects/dev-storage.tgz
|
||||
'@rush-temp/login': file:./projects/login.tgz
|
||||
'@rush-temp/login-resources': file:./projects/login-resources.tgz
|
||||
'@rush-temp/platform': file:./projects/platform.tgz
|
||||
'@rush-temp/platform-rig': file:./projects/platform-rig.tgz
|
||||
'@rush-temp/prod': file:./projects/prod.tgz
|
||||
@ -42,6 +44,7 @@ specifiers:
|
||||
style-loader: ^3.2.1
|
||||
svelte-loader: ^3.1.2
|
||||
svelte-preprocess: ^4.7.4
|
||||
svgo-loader: ^3.0.0
|
||||
ts-loader: ^9.2.5
|
||||
typescript: ^4.3.5
|
||||
webpack: ^5.48.0
|
||||
@ -54,6 +57,8 @@ dependencies:
|
||||
'@rush-temp/core': file:projects/core.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
'@rush-temp/dev-server': file:projects/dev-server.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
'@rush-temp/dev-storage': file:projects/dev-storage.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
'@rush-temp/login': file:projects/login.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
'@rush-temp/login-resources': file:projects/login-resources.tgz_c38cf1a7a413db8918b0b4754c21e4c5
|
||||
'@rush-temp/platform': file:projects/platform.tgz_6c259fadfeb3a4b20890aefe87070b8b
|
||||
'@rush-temp/platform-rig': file:projects/platform-rig.tgz_6ab28797e7a22071465f7d680ae81ae5
|
||||
'@rush-temp/prod': file:projects/prod.tgz_typescript@4.3.5
|
||||
@ -91,6 +96,7 @@ dependencies:
|
||||
style-loader: 3.2.1_webpack@5.48.0
|
||||
svelte-loader: 3.1.2
|
||||
svelte-preprocess: 4.7.4_50400bf9937d80c38e5edf397791f1b6
|
||||
svgo-loader: 3.0.0
|
||||
ts-loader: 9.2.5_typescript@4.3.5+webpack@5.48.0
|
||||
typescript: 4.3.5
|
||||
webpack: 5.48.0_webpack-cli@4.7.2
|
||||
@ -797,6 +803,10 @@ packages:
|
||||
fastq: 1.11.1
|
||||
dev: false
|
||||
|
||||
/@polka/url/1.0.0-next.15:
|
||||
resolution: {integrity: sha512-15spi3V28QdevleWBNXE4pIls3nFZmBbUGrW9IVPwiQczuSb9n76TCB4bsk8TSel+I1OkHEdPhu5QKMfY6rQHA==}
|
||||
dev: false
|
||||
|
||||
/@rushstack/heft-config-file/0.6.1:
|
||||
resolution: {integrity: sha512-fdVFN8qvAdn4YeQr7k9zQ6jWAzwvnuLfiCOK/5gN+2o3iY8M02ntDmNEXuGfH7jBX6yhRga9UjHqKBh5bzoLpA==}
|
||||
engines: {node: '>=10.13.0'}
|
||||
@ -894,6 +904,11 @@ packages:
|
||||
type-detect: 4.0.8
|
||||
dev: false
|
||||
|
||||
/@trysound/sax/0.1.1:
|
||||
resolution: {integrity: sha512-Z6DoceYb/1xSg5+e+ZlPZ9v0N16ZvZ+wYMraFue4HYrE4ttONKtsvruIRf6t9TBR0YvSOfi1hUU0fJfBLCDYow==}
|
||||
engines: {node: '>=10.13.0'}
|
||||
dev: false
|
||||
|
||||
/@types/argparse/1.0.38:
|
||||
resolution: {integrity: sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==}
|
||||
dev: false
|
||||
@ -1347,6 +1362,11 @@ packages:
|
||||
engines: {node: '>=0.4.0'}
|
||||
dev: false
|
||||
|
||||
/acorn-walk/8.1.1:
|
||||
resolution: {integrity: sha512-FbJdceMlPHEAWJOILDk1fXD8lnTlEIWFkqtfk+MvmL5q/qlHfN7GEHcsFZWt/Tea9jRNPWUZG4G976nqAAmU9w==}
|
||||
engines: {node: '>=0.4.0'}
|
||||
dev: false
|
||||
|
||||
/acorn/6.4.2:
|
||||
resolution: {integrity: sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==}
|
||||
engines: {node: '>=0.4.0'}
|
||||
@ -1761,6 +1781,10 @@ packages:
|
||||
multicast-dns-service-types: 1.1.0
|
||||
dev: false
|
||||
|
||||
/boolbase/1.0.0:
|
||||
resolution: {integrity: sha1-aN/1++YMUes3cl6p4+0xDcwed24=}
|
||||
dev: false
|
||||
|
||||
/brace-expansion/1.1.11:
|
||||
resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==}
|
||||
dependencies:
|
||||
@ -2045,6 +2069,11 @@ packages:
|
||||
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
|
||||
dev: false
|
||||
|
||||
/commander/6.2.1:
|
||||
resolution: {integrity: sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==}
|
||||
engines: {node: '>= 6'}
|
||||
dev: false
|
||||
|
||||
/commander/7.2.0:
|
||||
resolution: {integrity: sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==}
|
||||
engines: {node: '>= 10'}
|
||||
@ -2175,12 +2204,42 @@ packages:
|
||||
webpack: 5.48.0_webpack-cli@4.7.2
|
||||
dev: false
|
||||
|
||||
/css-select/4.1.3:
|
||||
resolution: {integrity: sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA==}
|
||||
dependencies:
|
||||
boolbase: 1.0.0
|
||||
css-what: 5.0.1
|
||||
domhandler: 4.2.0
|
||||
domutils: 2.7.0
|
||||
nth-check: 2.0.0
|
||||
dev: false
|
||||
|
||||
/css-tree/1.1.3:
|
||||
resolution: {integrity: sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==}
|
||||
engines: {node: '>=8.0.0'}
|
||||
dependencies:
|
||||
mdn-data: 2.0.14
|
||||
source-map: 0.6.1
|
||||
dev: false
|
||||
|
||||
/css-what/5.0.1:
|
||||
resolution: {integrity: sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg==}
|
||||
engines: {node: '>= 6'}
|
||||
dev: false
|
||||
|
||||
/cssesc/3.0.0:
|
||||
resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==}
|
||||
engines: {node: '>=4'}
|
||||
hasBin: true
|
||||
dev: false
|
||||
|
||||
/csso/4.2.0:
|
||||
resolution: {integrity: sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==}
|
||||
engines: {node: '>=8.0.0'}
|
||||
dependencies:
|
||||
css-tree: 1.1.3
|
||||
dev: false
|
||||
|
||||
/cssom/0.3.8:
|
||||
resolution: {integrity: sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==}
|
||||
dev: false
|
||||
@ -2404,12 +2463,39 @@ packages:
|
||||
esutils: 2.0.3
|
||||
dev: false
|
||||
|
||||
/dom-serializer/1.3.2:
|
||||
resolution: {integrity: sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==}
|
||||
dependencies:
|
||||
domelementtype: 2.2.0
|
||||
domhandler: 4.2.0
|
||||
entities: 2.2.0
|
||||
dev: false
|
||||
|
||||
/domelementtype/2.2.0:
|
||||
resolution: {integrity: sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==}
|
||||
dev: false
|
||||
|
||||
/domexception/1.0.1:
|
||||
resolution: {integrity: sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==}
|
||||
dependencies:
|
||||
webidl-conversions: 4.0.2
|
||||
dev: false
|
||||
|
||||
/domhandler/4.2.0:
|
||||
resolution: {integrity: sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA==}
|
||||
engines: {node: '>= 4'}
|
||||
dependencies:
|
||||
domelementtype: 2.2.0
|
||||
dev: false
|
||||
|
||||
/domutils/2.7.0:
|
||||
resolution: {integrity: sha512-8eaHa17IwJUPAiB+SoTYBo5mCdeMgdcAoXJ59m6DT1vw+5iLS3gNoqYaRowaBKtGVrOF1Jz4yDTgYKLK2kvfJg==}
|
||||
dependencies:
|
||||
dom-serializer: 1.3.2
|
||||
domelementtype: 2.2.0
|
||||
domhandler: 4.2.0
|
||||
dev: false
|
||||
|
||||
/dotenv-defaults/2.0.2:
|
||||
resolution: {integrity: sha512-iOIzovWfsUHU91L5i8bJce3NYK5JXeAwH50Jh6+ARUdLiiGlYWfGw6UkzsYqaXZH/hjE/eCd/PlfM/qqyK0AMg==}
|
||||
dependencies:
|
||||
@ -2431,6 +2517,10 @@ packages:
|
||||
engines: {node: '>=10'}
|
||||
dev: false
|
||||
|
||||
/duplexer/0.1.2:
|
||||
resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==}
|
||||
dev: false
|
||||
|
||||
/ecc-jsbn/0.1.2:
|
||||
resolution: {integrity: sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=}
|
||||
dependencies:
|
||||
@ -2485,6 +2575,10 @@ packages:
|
||||
ansi-colors: 4.1.1
|
||||
dev: false
|
||||
|
||||
/entities/2.2.0:
|
||||
resolution: {integrity: sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==}
|
||||
dev: false
|
||||
|
||||
/envinfo/7.8.1:
|
||||
resolution: {integrity: sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==}
|
||||
engines: {node: '>=4'}
|
||||
@ -3358,6 +3452,13 @@ packages:
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/gzip-size/6.0.0:
|
||||
resolution: {integrity: sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==}
|
||||
engines: {node: '>=10'}
|
||||
dependencies:
|
||||
duplexer: 0.1.2
|
||||
dev: false
|
||||
|
||||
/handle-thing/2.0.1:
|
||||
resolution: {integrity: sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==}
|
||||
dev: false
|
||||
@ -4551,6 +4652,13 @@ packages:
|
||||
resolution: {integrity: sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==}
|
||||
dev: false
|
||||
|
||||
/json5/1.0.1:
|
||||
resolution: {integrity: sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
minimist: 1.2.5
|
||||
dev: false
|
||||
|
||||
/json5/2.2.0:
|
||||
resolution: {integrity: sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==}
|
||||
engines: {node: '>=6'}
|
||||
@ -4663,6 +4771,15 @@ packages:
|
||||
engines: {node: '>=6.11.5'}
|
||||
dev: false
|
||||
|
||||
/loader-utils/1.4.0:
|
||||
resolution: {integrity: sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==}
|
||||
engines: {node: '>=4.0.0'}
|
||||
dependencies:
|
||||
big.js: 5.2.2
|
||||
emojis-list: 3.0.0
|
||||
json5: 1.0.1
|
||||
dev: false
|
||||
|
||||
/loader-utils/2.0.0:
|
||||
resolution: {integrity: sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==}
|
||||
engines: {node: '>=8.9.0'}
|
||||
@ -4766,6 +4883,10 @@ packages:
|
||||
object-visit: 1.0.1
|
||||
dev: false
|
||||
|
||||
/mdn-data/2.0.14:
|
||||
resolution: {integrity: sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==}
|
||||
dev: false
|
||||
|
||||
/media-typer/0.3.0:
|
||||
resolution: {integrity: sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=}
|
||||
engines: {node: '>= 0.6'}
|
||||
@ -5034,6 +5155,12 @@ packages:
|
||||
path-key: 3.1.1
|
||||
dev: false
|
||||
|
||||
/nth-check/2.0.0:
|
||||
resolution: {integrity: sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==}
|
||||
dependencies:
|
||||
boolbase: 1.0.0
|
||||
dev: false
|
||||
|
||||
/nwsapi/2.2.0:
|
||||
resolution: {integrity: sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==}
|
||||
dev: false
|
||||
@ -5135,6 +5262,11 @@ packages:
|
||||
mimic-fn: 2.1.0
|
||||
dev: false
|
||||
|
||||
/opener/1.5.2:
|
||||
resolution: {integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==}
|
||||
hasBin: true
|
||||
dev: false
|
||||
|
||||
/opn/5.5.0:
|
||||
resolution: {integrity: sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==}
|
||||
engines: {node: '>=4'}
|
||||
@ -6182,6 +6314,15 @@ packages:
|
||||
typescript: 4.3.5
|
||||
dev: false
|
||||
|
||||
/sirv/1.0.12:
|
||||
resolution: {integrity: sha512-+jQoCxndz7L2tqQL4ZyzfDhky0W/4ZJip3XoOuxyQWnAwMxindLl3Xv1qT4x1YX/re0leShvTm8Uk0kQspGhBg==}
|
||||
engines: {node: '>= 10'}
|
||||
dependencies:
|
||||
'@polka/url': 1.0.0-next.15
|
||||
mime: 2.5.2
|
||||
totalist: 1.1.0
|
||||
dev: false
|
||||
|
||||
/slash/3.0.0:
|
||||
resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==}
|
||||
engines: {node: '>=8'}
|
||||
@ -6361,6 +6502,10 @@ packages:
|
||||
tweetnacl: 0.14.5
|
||||
dev: false
|
||||
|
||||
/stable/0.1.8:
|
||||
resolution: {integrity: sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==}
|
||||
dev: false
|
||||
|
||||
/stack-utils/1.0.5:
|
||||
resolution: {integrity: sha512-KZiTzuV3CnSnSvgMRrARVCj+Ht7rMbauGDK0LdVFRGyenwdylpajAp4Q0i6SX8rEmbTpMMf6ryq2gb8pPq2WgQ==}
|
||||
engines: {node: '>=8'}
|
||||
@ -6688,6 +6833,27 @@ packages:
|
||||
engines: {node: '>= 8'}
|
||||
dev: false
|
||||
|
||||
/svgo-loader/3.0.0:
|
||||
resolution: {integrity: sha512-gwyFuzTxZ8hEWYKQ9GodudSKRHzW8CUqgdfsdNpu1U5Keow5dPIgxT4DoHUEVXQRolefgSCeBtW3y12CyhIGxw==}
|
||||
dependencies:
|
||||
loader-utils: 1.4.0
|
||||
svgo: 2.3.1
|
||||
dev: false
|
||||
|
||||
/svgo/2.3.1:
|
||||
resolution: {integrity: sha512-riDDIQgXpEnn0BEl9Gvhh1LNLIyiusSpt64IR8upJu7MwxnzetmF/Y57pXQD2NMX2lVyMRzXt5f2M5rO4wG7Dw==}
|
||||
engines: {node: '>=10.13.0'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@trysound/sax': 0.1.1
|
||||
chalk: 4.1.2
|
||||
commander: 7.2.0
|
||||
css-select: 4.1.3
|
||||
css-tree: 1.1.3
|
||||
csso: 4.2.0
|
||||
stable: 0.1.8
|
||||
dev: false
|
||||
|
||||
/symbol-tree/3.2.4:
|
||||
resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==}
|
||||
dev: false
|
||||
@ -6818,6 +6984,11 @@ packages:
|
||||
engines: {node: '>=0.6'}
|
||||
dev: false
|
||||
|
||||
/totalist/1.1.0:
|
||||
resolution: {integrity: sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==}
|
||||
engines: {node: '>=6'}
|
||||
dev: false
|
||||
|
||||
/tough-cookie/2.5.0:
|
||||
resolution: {integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==}
|
||||
engines: {node: '>=0.8'}
|
||||
@ -7119,6 +7290,63 @@ packages:
|
||||
resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==}
|
||||
dev: false
|
||||
|
||||
/webpack-bundle-analyzer/4.4.2:
|
||||
resolution: {integrity: sha512-PIagMYhlEzFfhMYOzs5gFT55DkUdkyrJi/SxJp8EF3YMWhS+T9vvs2EoTetpk5qb6VsCq02eXTlRDOydRhDFAQ==}
|
||||
engines: {node: '>= 10.13.0'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
acorn: 8.4.1
|
||||
acorn-walk: 8.1.1
|
||||
chalk: 4.1.2
|
||||
commander: 6.2.1
|
||||
gzip-size: 6.0.0
|
||||
lodash: 4.17.21
|
||||
opener: 1.5.2
|
||||
sirv: 1.0.12
|
||||
ws: 7.5.3
|
||||
transitivePeerDependencies:
|
||||
- bufferutil
|
||||
- utf-8-validate
|
||||
dev: false
|
||||
|
||||
/webpack-cli/4.7.2_954feff0479d53ccf5b533f71f40f1af:
|
||||
resolution: {integrity: sha512-mEoLmnmOIZQNiRl0ebnjzQ74Hk0iKS5SiEEnpq3dRezoyR3yPaeQZCMCe+db4524pj1Pd5ghZXjT41KLzIhSLw==}
|
||||
engines: {node: '>=10.13.0'}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
'@webpack-cli/generators': '*'
|
||||
'@webpack-cli/migrate': '*'
|
||||
webpack: 4.x.x || 5.x.x
|
||||
webpack-bundle-analyzer: '*'
|
||||
webpack-dev-server: '*'
|
||||
peerDependenciesMeta:
|
||||
'@webpack-cli/generators':
|
||||
optional: true
|
||||
'@webpack-cli/migrate':
|
||||
optional: true
|
||||
webpack-bundle-analyzer:
|
||||
optional: true
|
||||
webpack-dev-server:
|
||||
optional: true
|
||||
dependencies:
|
||||
'@discoveryjs/json-ext': 0.5.3
|
||||
'@webpack-cli/configtest': 1.0.4_webpack-cli@4.7.2+webpack@5.48.0
|
||||
'@webpack-cli/info': 1.3.0_webpack-cli@4.7.2
|
||||
'@webpack-cli/serve': 1.5.1_8f539f003d3f73da23f531c906cfc201
|
||||
colorette: 1.2.2
|
||||
commander: 7.2.0
|
||||
execa: 5.1.1
|
||||
fastest-levenshtein: 1.0.12
|
||||
import-local: 3.0.2
|
||||
interpret: 2.2.0
|
||||
rechoir: 0.7.1
|
||||
v8-compile-cache: 2.3.0
|
||||
webpack: 5.48.0_webpack-cli@4.7.2
|
||||
webpack-bundle-analyzer: 4.4.2
|
||||
webpack-dev-server: 3.11.2_webpack-cli@4.7.2+webpack@5.48.0
|
||||
webpack-merge: 5.8.0
|
||||
dev: false
|
||||
|
||||
/webpack-cli/4.7.2_e6a3c038781d6207761c29e1aac8eed2:
|
||||
resolution: {integrity: sha512-mEoLmnmOIZQNiRl0ebnjzQ74Hk0iKS5SiEEnpq3dRezoyR3yPaeQZCMCe+db4524pj1Pd5ghZXjT41KLzIhSLw==}
|
||||
engines: {node: '>=10.13.0'}
|
||||
@ -7531,7 +7759,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/dev-storage.tgz_6c259fadfeb3a4b20890aefe87070b8b:
|
||||
resolution: {integrity: sha512-8aUE293xbOrDLOua1RsUMHGN5KMpU+FP0b6KRVBGnUMkbtvGZEghpU1lH3VkcNJgHbGKWFgdZsvhsZ+P1kohJg==, tarball: file:projects/dev-storage.tgz}
|
||||
resolution: {integrity: sha512-BH0Sx7BYFnR9Txy8IBwetWICRL7rMi8EXsiDCZsfdvtoxRMlYb9umorRv4yu5pJjIWtlgaTAGVID/1lSYHBvWg==, tarball: file:projects/dev-storage.tgz}
|
||||
id: file:projects/dev-storage.tgz
|
||||
name: '@rush-temp/dev-storage'
|
||||
version: 0.0.0
|
||||
@ -7549,6 +7777,47 @@ packages:
|
||||
- typescript
|
||||
dev: false
|
||||
|
||||
file:projects/login-resources.tgz_c38cf1a7a413db8918b0b4754c21e4c5:
|
||||
resolution: {integrity: sha512-/y0RdsR15OZIqLJx1mwd8oOB51lbw7kKHWmy+CS2qRZufQcUZLU0R3Eo0wnoRynXRby11E6A17LxMglB8R1Txw==, tarball: file:projects/login-resources.tgz}
|
||||
id: file:projects/login-resources.tgz
|
||||
name: '@rush-temp/login-resources'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
sass: 1.37.5
|
||||
svelte: 3.42.1
|
||||
svelte-loader: 3.1.2_svelte@3.42.1
|
||||
svelte-preprocess: 4.7.4_c407529626dbb58d14a718f48c7fa84c
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- coffeescript
|
||||
- less
|
||||
- node-sass
|
||||
- postcss
|
||||
- postcss-load-config
|
||||
- pug
|
||||
- stylus
|
||||
- sugarss
|
||||
- typescript
|
||||
dev: false
|
||||
|
||||
file:projects/login.tgz_6c259fadfeb3a4b20890aefe87070b8b:
|
||||
resolution: {integrity: sha512-LgyU874vSC22wRS0SqlBwfpLqCnznqQ4RMbbLAaZ0gPXX3PTW+wG263nX1D26kgcq2JZtOuf8F3+1/hRAzICVA==, tarball: file:projects/login.tgz}
|
||||
id: file:projects/login.tgz
|
||||
name: '@rush-temp/login'
|
||||
version: 0.0.0
|
||||
dependencies:
|
||||
'@types/heft-jest': 1.0.2
|
||||
'@typescript-eslint/eslint-plugin': 4.28.5_a8e83fcad666e1ba86be4b2e27a20aea
|
||||
eslint: 7.32.0
|
||||
eslint-plugin-import: 2.23.4_eslint@7.32.0
|
||||
eslint-plugin-node: 11.1.0_eslint@7.32.0
|
||||
eslint-plugin-promise: 4.3.1
|
||||
transitivePeerDependencies:
|
||||
- '@typescript-eslint/parser'
|
||||
- supports-color
|
||||
- typescript
|
||||
dev: false
|
||||
|
||||
file:projects/platform-rig.tgz_6ab28797e7a22071465f7d680ae81ae5:
|
||||
resolution: {integrity: sha512-VwGZVPcf2apIoa4sxQkIvW90B4otxf7ayw1jlTiZKQsQfwnLRKXvInMbIIAP0zCPRWIZdXXBYpUDm3dOJ/2bYQ==, tarball: file:projects/platform-rig.tgz}
|
||||
id: file:projects/platform-rig.tgz
|
||||
@ -7593,7 +7862,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/prod.tgz_typescript@4.3.5:
|
||||
resolution: {integrity: sha512-6UKxih/gCgl7bEmt5T/o96exvBJLr9Gzt430UaVS3WtqBdwsrJ8FunwOFVtvaJqWRvcD+FVSOx3ZLNXPTvF20w==, tarball: file:projects/prod.tgz}
|
||||
resolution: {integrity: sha512-ti6nz+pb0TRqhi0+pGET0k++WDa/DS+Crnfa0y9ZERFFNJMYFBKcspo5fpKKIUlwTx6O14layZ8h+fAHtKcj4Q==, tarball: file:projects/prod.tgz}
|
||||
id: file:projects/prod.tgz
|
||||
name: '@rush-temp/prod'
|
||||
version: 0.0.0
|
||||
@ -7613,14 +7882,17 @@ packages:
|
||||
svelte: 3.42.1
|
||||
svelte-loader: 3.1.2_svelte@3.42.1
|
||||
svelte-preprocess: 4.7.4_c407529626dbb58d14a718f48c7fa84c
|
||||
svgo-loader: 3.0.0
|
||||
ts-loader: 9.2.5_typescript@4.3.5+webpack@5.48.0
|
||||
webpack: 5.48.0_webpack-cli@4.7.2
|
||||
webpack-cli: 4.7.2_e6a3c038781d6207761c29e1aac8eed2
|
||||
webpack-bundle-analyzer: 4.4.2
|
||||
webpack-cli: 4.7.2_954feff0479d53ccf5b533f71f40f1af
|
||||
webpack-dev-server: 3.11.2_webpack-cli@4.7.2+webpack@5.48.0
|
||||
transitivePeerDependencies:
|
||||
- '@babel/core'
|
||||
- '@webpack-cli/generators'
|
||||
- '@webpack-cli/migrate'
|
||||
- bufferutil
|
||||
- coffeescript
|
||||
- fibers
|
||||
- less
|
||||
@ -7630,7 +7902,7 @@ packages:
|
||||
- sugarss
|
||||
- ts-node
|
||||
- typescript
|
||||
- webpack-bundle-analyzer
|
||||
- utf-8-validate
|
||||
dev: false
|
||||
|
||||
file:projects/server-core.tgz_6c259fadfeb3a4b20890aefe87070b8b:
|
||||
@ -7678,7 +7950,7 @@ packages:
|
||||
dev: false
|
||||
|
||||
file:projects/server.tgz_6c259fadfeb3a4b20890aefe87070b8b:
|
||||
resolution: {integrity: sha512-DDKeiFrAHUr+H88vgiv9LFigEmlZyqSLez073wjTVT/WS1cbHQ4cSAxObaxl1w3jt2HZ7q0Twf0DK51NQXQZRA==, tarball: file:projects/server.tgz}
|
||||
resolution: {integrity: sha512-wXZNomG+cesEB6aWjMYwJ1yTfc7qHi8wnRm6eLEYiEuvvnMXasZqHRuX+yIDObELwtaAJr7piexxaRoSO7u7kw==, tarball: file:projects/server.tgz}
|
||||
id: file:projects/server.tgz
|
||||
name: '@rush-temp/server'
|
||||
version: 0.0.0
|
||||
|
@ -33,11 +33,16 @@
|
||||
"file-loader":"^6.2.0",
|
||||
"sass":"^1.37.5",
|
||||
"webpack-dev-server":"^3.11.2",
|
||||
"style-loader":"^3.2.1"
|
||||
"style-loader":"^3.2.1",
|
||||
"svgo-loader":"^3.0.0",
|
||||
"webpack-bundle-analyzer":"^4.4.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@anticrm/ui": "~0.6.0",
|
||||
"@anticrm/theme": "~0.6.0",
|
||||
"svelte": "^3.42.1"
|
||||
"svelte": "^3.42.1",
|
||||
"@anticrm/login": "~0.6.0",
|
||||
"@anticrm/login-resources": "~0.6.0",
|
||||
"@anticrm/platform": "~0.6.3"
|
||||
}
|
||||
}
|
||||
|
@ -20,9 +20,9 @@ import { createApp } from '@anticrm/ui'
|
||||
// import pluginCore from '@anticrm/plugin-core'
|
||||
// import meetingPlugin from '@anticrm/meeting'
|
||||
|
||||
// import { configurePlatform } from './platform'
|
||||
import { configurePlatform } from './platform'
|
||||
|
||||
// configurePlatform()
|
||||
configurePlatform()
|
||||
|
||||
// const accountsUrl = process.env.APP_ACCOUNTS_URL
|
||||
// const appHost = process.env.APP_WSHOST
|
||||
|
57
dev/prod/src/platform.ts
Normal file
57
dev/prod/src/platform.ts
Normal file
@ -0,0 +1,57 @@
|
||||
//
|
||||
// Copyright © 2020 Anticrm Platform Contributors.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import { addLocation } from '@anticrm/platform'
|
||||
|
||||
import { loginId } from '@anticrm/login'
|
||||
// import { clientId } from '@anticrm/client'
|
||||
// import { workbenchId } from '@anticrm/workbench'
|
||||
// import { chunterId } from '@anticrm/chunter'
|
||||
// import { recruitId } from '@anticrm/recruit'
|
||||
// import { tableId } from '@anticrm/table'
|
||||
// import { viewId } from '@anticrm/view'
|
||||
// import { taskId } from '@anticrm/task'
|
||||
// import { contactId } from '@anticrm/contact'
|
||||
|
||||
// import { chunterServerId } from '@anticrm/chunter-server'
|
||||
|
||||
// import '@anticrm/login-assets'
|
||||
// import '@anticrm/chunter-assets'
|
||||
// import '@anticrm/recruit-assets'
|
||||
// import '@anticrm/task-assets'
|
||||
// import '@anticrm/view-assets'
|
||||
|
||||
export function configurePlatform() {
|
||||
|
||||
// platform.setMetadata(ui.metadata.LoginApplication, 'login')
|
||||
// platform.setMetadata(ui.metadata.DefaultApplication, 'workbench')
|
||||
|
||||
// if (process.env.CLIENT === 'dev')
|
||||
// addLocation(clientId, () => import(/* webpackChunkName: "client-dev" */ '@anticrm/plugin-client-dev'))
|
||||
// else
|
||||
// addLocation(core, () => import(/* webpackChunkName: "plugin-core" */ '@anticrm/plugin-core-impl'))
|
||||
|
||||
addLocation(loginId, () => import(/* webpackChunkName: "login" */ '@anticrm/login-resources'))
|
||||
// addLocation(workbenchId, () => import(/* webpackChunkName: "workbench" */ '@anticrm/plugin-workbench'))
|
||||
// addLocation(chunterId, () => import(/* webpackChunkName: "chunter" */ '@anticrm/plugin-chunter'))
|
||||
// addLocation(recruitId, () => import(/* webpackChunkName: "recruit" */ '@anticrm/plugin-recruit'))
|
||||
// addLocation(tableId, () => import(/* webpackChunkName: "table" */ '@anticrm/table-resources'))
|
||||
// addLocation(viewId, () => import(/* webpackChunkName: "view" */ '@anticrm/view-resources'))
|
||||
// addLocation(taskId, () => import(/* webpackChunkName: "task" */ '@anticrm/task-resources'))
|
||||
// addLocation(contactId, () => import(/* webpackChunkName: "contact" */ '@anticrm/contact-resources'))
|
||||
|
||||
// addLocation(chunterServerId, () => import(/* webpackChunkName: "chunter-server" */ '@anticrm/chunter-server'))
|
||||
|
||||
}
|
@ -1,57 +0,0 @@
|
||||
//
|
||||
// Copyright © 2020 Anticrm Platform Contributors.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import { addLocation } from '@anticrm/platform'
|
||||
|
||||
import { loginId } from '@anticrm/login'
|
||||
import { clientId } from '@anticrm/client'
|
||||
import { workbenchId } from '@anticrm/workbench'
|
||||
import { chunterId } from '@anticrm/chunter'
|
||||
import { recruitId } from '@anticrm/recruit'
|
||||
import { tableId } from '@anticrm/table'
|
||||
import { viewId } from '@anticrm/view'
|
||||
import { taskId } from '@anticrm/task'
|
||||
import { contactId } from '@anticrm/contact'
|
||||
|
||||
import { chunterServerId } from '@anticrm/chunter-server'
|
||||
|
||||
import '@anticrm/login-assets'
|
||||
import '@anticrm/chunter-assets'
|
||||
import '@anticrm/recruit-assets'
|
||||
import '@anticrm/task-assets'
|
||||
import '@anticrm/view-assets'
|
||||
|
||||
export function configurePlatform() {
|
||||
|
||||
// platform.setMetadata(ui.metadata.LoginApplication, 'login')
|
||||
// platform.setMetadata(ui.metadata.DefaultApplication, 'workbench')
|
||||
|
||||
// if (process.env.CLIENT === 'dev')
|
||||
addLocation(clientId, () => import(/* webpackChunkName: "client-dev" */ '@anticrm/plugin-client-dev'))
|
||||
// else
|
||||
// addLocation(core, () => import(/* webpackChunkName: "plugin-core" */ '@anticrm/plugin-core-impl'))
|
||||
|
||||
addLocation(loginId, () => import(/* webpackChunkName: "login" */ '@anticrm/plugin-login'))
|
||||
addLocation(workbenchId, () => import(/* webpackChunkName: "workbench" */ '@anticrm/plugin-workbench'))
|
||||
addLocation(chunterId, () => import(/* webpackChunkName: "chunter" */ '@anticrm/plugin-chunter'))
|
||||
addLocation(recruitId, () => import(/* webpackChunkName: "recruit" */ '@anticrm/plugin-recruit'))
|
||||
addLocation(tableId, () => import(/* webpackChunkName: "table" */ '@anticrm/table-resources'))
|
||||
addLocation(viewId, () => import(/* webpackChunkName: "view" */ '@anticrm/view-resources'))
|
||||
addLocation(taskId, () => import(/* webpackChunkName: "task" */ '@anticrm/task-resources'))
|
||||
addLocation(contactId, () => import(/* webpackChunkName: "contact" */ '@anticrm/contact-resources'))
|
||||
|
||||
addLocation(chunterServerId, () => import(/* webpackChunkName: "chunter-server" */ '@anticrm/chunter-server'))
|
||||
|
||||
}
|
3
plugins/login-resources/img/logo.svg
Normal file
3
plugins/login-resources/img/logo.svg
Normal file
@ -0,0 +1,3 @@
|
||||
<svg width="63" height="79" viewBox="0 0 63 79" fill="#fff" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M34.8089 0.679932H0.378906V78.9999H15.2289V51.6099H34.8089C52.8489 51.6099 62.5289 41.2699 62.5289 26.1999C62.5289 11.0199 52.8489 0.679932 34.8089 0.679932ZM34.1489 38.8499H15.2289V13.4399H34.1489C42.8389 13.4399 47.5689 18.0599 47.5689 26.1999C47.5689 34.3399 42.8389 38.8499 34.1489 38.8499Z" fill="white"/>
|
||||
</svg>
|
After Width: | Height: | Size: 423 B |
BIN
plugins/login-resources/img/noise.png
Normal file
BIN
plugins/login-resources/img/noise.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 MiB |
27
plugins/login-resources/package.json
Normal file
27
plugins/login-resources/package.json
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "@anticrm/login-resources",
|
||||
"version": "0.6.0",
|
||||
"main": "src/index.ts",
|
||||
"author": "Anticrm Platform Contributors",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "",
|
||||
"build:docs": "api-extractor run --local",
|
||||
"test": "jest",
|
||||
"lint": "eslint src",
|
||||
"lint:fix": "eslint --fix src",
|
||||
"format": "prettier --write 'src/**/*.{ts*,js*,yml}' && eslint --fix src",
|
||||
"svelte-check": "svelte-check"
|
||||
},
|
||||
"devDependencies": {
|
||||
"svelte-loader":"^3.1.2",
|
||||
"sass":"^1.37.5",
|
||||
"svelte-preprocess":"^4.7.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@anticrm/platform": "~0.6.0",
|
||||
"svelte": "^3.37.0",
|
||||
"@anticrm/login": "~0.6.0",
|
||||
"@anticrm/ui": "~0.6.0"
|
||||
}
|
||||
}
|
5
plugins/login-resources/postcss.config.js
Normal file
5
plugins/login-resources/postcss.config.js
Normal file
@ -0,0 +1,5 @@
|
||||
module.exports = {
|
||||
plugins: [
|
||||
require('autoprefixer')
|
||||
]
|
||||
}
|
172
plugins/login-resources/src/components/Form.svelte
Normal file
172
plugins/login-resources/src/components/Form.svelte
Normal file
@ -0,0 +1,172 @@
|
||||
<!--
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { EditBox, Label, Button, StatusControl } from '@anticrm/ui'
|
||||
import { OK, Status, Severity } from '@anticrm/platform'
|
||||
import type { IntlString } from '@anticrm/platform'
|
||||
import { translate } from '@anticrm/platform'
|
||||
|
||||
import login from '../plugin'
|
||||
|
||||
interface Field {
|
||||
name: string
|
||||
i18n: IntlString
|
||||
password?: boolean
|
||||
optional?: boolean
|
||||
short?: boolean
|
||||
}
|
||||
|
||||
interface Action {
|
||||
i18n: IntlString
|
||||
func: () => Promise<void>
|
||||
}
|
||||
|
||||
export let caption: IntlString
|
||||
export let status: Status
|
||||
export let fields: Field[]
|
||||
export let action: Action
|
||||
export let bottomCaption: IntlString
|
||||
export let bottomActionLabel: IntlString
|
||||
export let bottomActionFunc: () => void
|
||||
export let object: any
|
||||
|
||||
async function validate () {
|
||||
for (const field of fields) {
|
||||
const v = object[field.name]
|
||||
const f = field
|
||||
if (!f.optional && (!v || v === '')) {
|
||||
status = new Status(Severity.INFO, login.status.RequiredField, {field: await translate(field.i18n, {})})
|
||||
return
|
||||
}
|
||||
}
|
||||
status = OK
|
||||
}
|
||||
validate()
|
||||
|
||||
let inAction = false
|
||||
|
||||
function performAction(action: Action) {
|
||||
inAction = true
|
||||
action.func().finally(() => {inAction = false})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<form class="form-container">
|
||||
<div class="grow-separator"/>
|
||||
<div class="title"><Label label={caption}/></div>
|
||||
<div class="status">
|
||||
<StatusControl {status} width="100%"/>
|
||||
</div>
|
||||
<div class="form">
|
||||
|
||||
{#each fields as field (field.name)}
|
||||
<div class={field.short ? 'form-col' : 'form-row'}>
|
||||
<EditBox label={field.i18n} password={field.password} bind:value={object[field.name]} on:keyup={validate} on:focus={validate}/>
|
||||
</div>
|
||||
{/each}
|
||||
|
||||
<div class="form-row send">
|
||||
<Button label={action.i18n} primary width="100%" loading={inAction}
|
||||
disabled={status.severity !== Severity.OK && status.severity !== Severity.ERROR}
|
||||
on:click={() => {performAction(action)}}/>
|
||||
</div>
|
||||
|
||||
<!-- <div class="form-col"><EditBox label="First Name" bind:value={fname}/></div>
|
||||
<div class="form-col"><EditBox label="Last Name" bind:value={lname}/></div>
|
||||
<div class="form-row"><EditBox label="E-mail"/></div>
|
||||
<div class="form-row"><EditBox label="Password" password/></div>
|
||||
<div class="form-row"><EditBox label="Repeat password" password/></div> -->
|
||||
|
||||
</div>
|
||||
<div class="grow-separator"/>
|
||||
<div class="footer">
|
||||
<span><Label label={bottomCaption}/></span>
|
||||
<a href="." on:click|preventDefault={bottomActionFunc}><Label label={bottomActionLabel}/></a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<!-- <div class="actions">
|
||||
{#each actions as action, i}
|
||||
<button class="button" class:separator={i !== 0} on:click|preventDefault={action.func}> {action.i18n} </button>
|
||||
{/each}
|
||||
</div> -->
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.form-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
padding: 80px 80px;
|
||||
|
||||
.title {
|
||||
font-weight: 600;
|
||||
font-size: 24px;
|
||||
line-height: 29px;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.status {
|
||||
min-height: 120px;
|
||||
max-height: 120px;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.form {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
column-gap: 12px;
|
||||
row-gap: 24px;
|
||||
|
||||
.form-row {
|
||||
grid-column-start: 1;
|
||||
grid-column-end: 3;
|
||||
}
|
||||
@media (max-width: 985px) {
|
||||
.form-col {
|
||||
grid-column-start: 1;
|
||||
grid-column-end: 3;
|
||||
}
|
||||
}
|
||||
.send {
|
||||
margin-top: 36px;
|
||||
}
|
||||
}
|
||||
.grow-separator {
|
||||
flex-grow: 1;
|
||||
}
|
||||
.footer {
|
||||
margin-top: 56px;
|
||||
font-size: 13px;
|
||||
line-height: 16px;
|
||||
color: #FFFFFF;
|
||||
span {
|
||||
opacity: 0.3;
|
||||
}
|
||||
a {
|
||||
color: #fff;
|
||||
opacity: 0.8;
|
||||
text-decoration: none;
|
||||
:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
131
plugins/login-resources/src/components/LoginApp.svelte
Normal file
131
plugins/login-resources/src/components/LoginApp.svelte
Normal file
@ -0,0 +1,131 @@
|
||||
<!--
|
||||
// Copyright © 2020 Anticrm Platform Contributors.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import LoginForm from './LoginForm.svelte'
|
||||
import SignupForm from './SignupForm.svelte'
|
||||
|
||||
let page = 'login'
|
||||
</script>
|
||||
|
||||
<div class="container">
|
||||
<div class="panel">
|
||||
<div class="back-panel-dark"/>
|
||||
<div class="back-panel-light">
|
||||
<div class="bg-noise opacity-3"/>
|
||||
</div>
|
||||
{#if page === 'login'}
|
||||
<LoginForm on:switch={(event) => page = event.detail}/>
|
||||
{:else if page === 'signup'}
|
||||
<SignupForm on:switch={(event) => page = event.detail}/>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="intro">
|
||||
<div class="content">
|
||||
<div class="logo"> </div>
|
||||
</div>
|
||||
<div class="slogan">
|
||||
<p>A unique place to manage all of your work</p>
|
||||
<p>Welcome to the Platform</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
@import "@anticrm/theme/styles/mixins.scss";
|
||||
|
||||
.bg-noise {
|
||||
@include bg-fullsize;
|
||||
background: url('../../img/noise.png');
|
||||
z-index: -1;
|
||||
}
|
||||
.opacity-3 {
|
||||
opacity: 0.03;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 100%;
|
||||
padding: 0px 20px 20px 20px;
|
||||
|
||||
.panel {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
margin-right: 20px;
|
||||
width: 668px;
|
||||
height: 100%;
|
||||
border-radius: 20px;
|
||||
|
||||
.back-panel-light {
|
||||
@include bg-layer(linear-gradient(158.74deg, rgba(205, 166, 255, 0.12) 5.62%, rgba(255, 255, 255, 0) 97.09%), 0.3);
|
||||
z-index: -1;
|
||||
}
|
||||
.back-panel-dark {
|
||||
@include bg-layer(#1D1D23, 0.5);
|
||||
z-index: -1;
|
||||
}
|
||||
}
|
||||
|
||||
.intro {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
overflow: hidden;
|
||||
min-width: 320px;
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.logo {
|
||||
position: relative;
|
||||
&:after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
background: center url("../../img/logo.svg");
|
||||
transform: translate(-50%, -50%);
|
||||
width: 63px;
|
||||
height: 79px;
|
||||
}
|
||||
&:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
transform: translate(-50%, -50%);
|
||||
width: 255px;
|
||||
height: 255px;
|
||||
border: 1.8px solid #FFFFFF;
|
||||
border-radius: 50%;
|
||||
opacity: 0.08;
|
||||
}
|
||||
}
|
||||
}
|
||||
.slogan {
|
||||
margin-bottom: 60px;
|
||||
p {
|
||||
margin: 0;
|
||||
font-weight: 400;
|
||||
font-size: 13px;
|
||||
line-height: 19px;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
68
plugins/login-resources/src/components/LoginForm.svelte
Normal file
68
plugins/login-resources/src/components/LoginForm.svelte
Normal file
@ -0,0 +1,68 @@
|
||||
<!--
|
||||
// Copyright © 2020 Anticrm Platform Contributors.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import { OK, Status, Severity } from '@anticrm/platform'
|
||||
|
||||
import Form from './Form.svelte'
|
||||
import { doLogin } from '../utils'
|
||||
|
||||
import login from '../plugin'
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
const fields = [
|
||||
{ name: 'username', i18n: login.string.Email },
|
||||
{
|
||||
name: 'password',
|
||||
i18n: login.string.Password,
|
||||
password: true
|
||||
},
|
||||
{ name: 'workspace', i18n: login.string.Workspace }
|
||||
]
|
||||
|
||||
const object = {
|
||||
workspace: '',
|
||||
username: '',
|
||||
password: '',
|
||||
}
|
||||
|
||||
let status = OK
|
||||
|
||||
const action = {
|
||||
i18n: login.string.LogIn,
|
||||
func: async () => {
|
||||
status = new Status(Severity.INFO, login.status.ConnectingToServer, {})
|
||||
|
||||
const [loginStatus, result] = await doLogin(object.username, object.password, object.workspace)
|
||||
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
setTimeout(() => {
|
||||
status = loginStatus
|
||||
resolve()
|
||||
}, 1000)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<Form caption={login.string.LogIn} {status} {fields} {object} {action}
|
||||
bottomCaption={login.string.DoNotHaveAnAccount}
|
||||
bottomActionLabel={login.string.SignUp}
|
||||
bottomActionFunc={() => { dispatch('switch', 'signup') }}
|
||||
/>
|
146
plugins/login-resources/src/components/LoginFormOld.svelte
Normal file
146
plugins/login-resources/src/components/LoginFormOld.svelte
Normal file
@ -0,0 +1,146 @@
|
||||
<!--
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import type { Platform } from '@anticrm/plugin'
|
||||
import { AuthStatusCodes } from '@anticrm/plugin'
|
||||
import { Severity, Status } from '@anticrm/status'
|
||||
import { getContext, onDestroy } from 'svelte'
|
||||
import type { LoginService } from '@anticrm/plugin-login'
|
||||
import login from '@anticrm/plugin-login'
|
||||
import Form from './Form.svelte'
|
||||
import { Button } from '@anticrm/ui'
|
||||
import type { ApplicationRouter } from '@anticrm/plugin-ui'
|
||||
// import { PlatformStatusCodes } from '@anticrm/foundation'
|
||||
|
||||
// export let router: ApplicationRouter<ApplicationRoute>
|
||||
const object = { username: '', password: '', workspace: '', secondFactorCode: '' }
|
||||
let status: Status
|
||||
|
||||
let loginActive = false
|
||||
let needSecondFactor = false
|
||||
const baseFields = [
|
||||
{ name: 'username', i18n: 'Username' },
|
||||
{
|
||||
name: 'password',
|
||||
i18n: 'Password',
|
||||
password: true
|
||||
},
|
||||
{ name: 'workspace', i18n: 'Workspace' }
|
||||
]
|
||||
|
||||
let fields: { [key: string]: any }
|
||||
$: fields = needSecondFactor ? baseFields.concat({ name: 'secondFactorCode', i18n: 'Confirm code' }) : baseFields
|
||||
|
||||
const platform = getContext('platform') as Platform
|
||||
const loginService = platform.getPlugin(login.id)
|
||||
|
||||
async function doLogin () {
|
||||
status = new Status(Severity.INFO, 0, 'Соединяюсь с сервером...')
|
||||
|
||||
status = await (await loginService).doLogin(
|
||||
object.username,
|
||||
object.password,
|
||||
object.workspace,
|
||||
object.secondFactorCode
|
||||
)
|
||||
|
||||
if (status.code === AuthStatusCodes.CLIENT_VALIDATE_REQUIRED) {
|
||||
needSecondFactor = true
|
||||
}
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
async function doSignup () {}
|
||||
|
||||
async function checkLoginInfo (ls: LoginService) {
|
||||
const info = await ls.getLoginInfo()
|
||||
if (info) {
|
||||
loginActive = true
|
||||
object.username = info.email
|
||||
object.workspace = info.workspace
|
||||
}
|
||||
}
|
||||
|
||||
let timer: number
|
||||
// Auto forward to default application
|
||||
const loginCheck = loginService.then(async (ls) => {
|
||||
await checkLoginInfo(ls)
|
||||
|
||||
timer = setInterval(async () => {
|
||||
await checkLoginInfo(ls)
|
||||
}, 1000)
|
||||
})
|
||||
|
||||
onDestroy(() => {
|
||||
if (timer) {
|
||||
clearInterval(timer)
|
||||
}
|
||||
})
|
||||
|
||||
async function navigateApp (): Promise<void> {
|
||||
(await loginService).navigateApp()
|
||||
}
|
||||
|
||||
async function logout (): Promise<void> {
|
||||
(await loginService).doLogout()
|
||||
loginActive = false
|
||||
}
|
||||
|
||||
function navigateSetting (): void {
|
||||
// router.navigate({ route: 'setting' })
|
||||
}
|
||||
</script>
|
||||
|
||||
{#await loginCheck then value}
|
||||
{#if loginActive}
|
||||
<div class="login-form-info">
|
||||
<div class="field">
|
||||
Logged in as: {object.username}
|
||||
</div>
|
||||
<div class="field">
|
||||
Workspace: {object.workspace}
|
||||
</div>
|
||||
<div class="actions">
|
||||
<Button width="100px" on:click={logout}>Logout</Button>
|
||||
<Button width="100px" on:click={navigateSetting}>Settings</Button>
|
||||
<Button width="100px" on:click={navigateApp}>Switch to Application</Button>
|
||||
</div>
|
||||
</div>
|
||||
{:else}
|
||||
<Form
|
||||
actions={[
|
||||
{ i18n: 'Create Space', func: doSignup },
|
||||
{ i18n: 'Login', func: doLogin }
|
||||
]}
|
||||
{fields}
|
||||
{object}
|
||||
caption="Login into system"
|
||||
{status} />
|
||||
{/if}
|
||||
{/await}
|
||||
|
||||
<style lang="scss">
|
||||
.login-form-info {
|
||||
margin: 20vh auto auto;
|
||||
width: 30em;
|
||||
padding: 2em;
|
||||
border-radius: 1em;
|
||||
border: 1px solid var(--theme-bg-accent-color);
|
||||
.actions {
|
||||
display: flex;
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
}
|
||||
</style>
|
45
plugins/login-resources/src/components/MainLoginForm.svelte
Normal file
45
plugins/login-resources/src/components/MainLoginForm.svelte
Normal file
@ -0,0 +1,45 @@
|
||||
<!--
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import login from '..'
|
||||
import type { AnyComponent, ApplicationRoute } from '@anticrm/platform-ui'
|
||||
import { newRouter } from '@anticrm/platform-ui'
|
||||
import Component from '@anticrm/platform-ui/src/components/Component.svelte'
|
||||
|
||||
let form: ApplicationRoute
|
||||
const forms: ApplicationRoute[] = [{ route: 'setting', component: login.component.SettingForm }]
|
||||
|
||||
let component: AnyComponent | undefined
|
||||
|
||||
function routeDefaults (): ApplicationRoute {
|
||||
return {
|
||||
route: '#undefined',
|
||||
component: login.component.LoginForm
|
||||
} as ApplicationRoute
|
||||
}
|
||||
|
||||
const router = newRouter<ApplicationRoute>(
|
||||
':route',
|
||||
(info) => {
|
||||
if (forms.length > 0) {
|
||||
form = forms.find((a) => a.route === info.route) || routeDefaults()
|
||||
component = form?.component
|
||||
}
|
||||
},
|
||||
routeDefaults()
|
||||
)
|
||||
</script>
|
||||
|
||||
<Component is={component} props={{ router }} />
|
189
plugins/login-resources/src/components/SettingForm.svelte
Normal file
189
plugins/login-resources/src/components/SettingForm.svelte
Normal file
@ -0,0 +1,189 @@
|
||||
<!--
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import type { Platform } from '@anticrm/platform'
|
||||
import { Severity, Status } from '@anticrm/platform'
|
||||
import { getContext } from 'svelte'
|
||||
import login from '..'
|
||||
import { CheckBox } from '@anticrm/ui'
|
||||
import type { ApplicationRoute, ApplicationRouter } from '@anticrm/platform-ui'
|
||||
import twofactor from 'node-2fa'
|
||||
import type { Options } from 'node-2fa/dist/interfaces'
|
||||
|
||||
export let router: ApplicationRouter<ApplicationRoute>
|
||||
const object = { oldPassword: '', newPassword: '', newPasswordConfirm: '', clientSecret: '', secondFactorCode: '' }
|
||||
let changePassword = false
|
||||
let status = new Status(Severity.OK, 0, '')
|
||||
|
||||
const platform = getContext('platform') as Platform
|
||||
const loginService = platform.getPlugin(login.id)
|
||||
|
||||
let secondFactorInitEnabled = false
|
||||
let secondFactorEnabled = false
|
||||
let secondFactorCurrentEnabled = false
|
||||
let newSecret:
|
||||
| {
|
||||
secret: string
|
||||
uri: string
|
||||
qr: string
|
||||
}
|
||||
| false
|
||||
let src: string
|
||||
|
||||
$: secondFactorCurrentEnabled = secondFactorEnabled && !secondFactorInitEnabled
|
||||
$: newSecret = secondFactorCurrentEnabled && twofactor.generateSecret({ name: 'Anticrm' } as Options)
|
||||
$: src = newSecret.qr
|
||||
$: object.clientSecret = newSecret.secret
|
||||
|
||||
const secondFactorCheck = loginService.then((ls) => {
|
||||
ls.getLoginInfo().then((li) => {
|
||||
secondFactorInitEnabled = !!li?.secondFactorEnabled
|
||||
secondFactorEnabled = secondFactorInitEnabled
|
||||
})
|
||||
})
|
||||
|
||||
function navigateLoginForm (): Promise<void> {
|
||||
return Promise.resolve(router.navigate({ route: '' }))
|
||||
}
|
||||
|
||||
let description: string
|
||||
$: description = status.message
|
||||
|
||||
async function saveSetting (): Promise<void> {
|
||||
if (!object.oldPassword) {
|
||||
status = new Status(Severity.INFO, 0, 'Поле пароль обязательно к заполнению.')
|
||||
return
|
||||
}
|
||||
|
||||
if (changePassword && object.newPassword !== object.newPasswordConfirm) {
|
||||
status = new Status(Severity.INFO, 0, 'Пароль и подтверждения пароля не совпадают')
|
||||
return
|
||||
}
|
||||
|
||||
if (secondFactorCurrentEnabled) {
|
||||
if (object.clientSecret && !object.secondFactorCode) {
|
||||
status = new Status(Severity.INFO, 0, 'Поле код подтверждения обязательно для заполнения')
|
||||
return
|
||||
}
|
||||
|
||||
if (!object.clientSecret && object.secondFactorCode) {
|
||||
status = new Status(Severity.INFO, 0, 'Поле секретный код обязательно для заполнения')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
status = new Status(Severity.INFO, 0, 'Соединяюсь с сервером...')
|
||||
|
||||
status = await (await loginService).saveSetting(
|
||||
object.oldPassword,
|
||||
changePassword ? object.newPassword : '',
|
||||
secondFactorEnabled,
|
||||
secondFactorCurrentEnabled ? object.clientSecret : '',
|
||||
secondFactorCurrentEnabled ? object.secondFactorCode : ''
|
||||
)
|
||||
if (status.severity === Severity.OK) {
|
||||
await navigateLoginForm()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<form class="form">
|
||||
<div class="status">{description}</div>
|
||||
<div class="field">
|
||||
<input class="editbox" name="oldPassword" placeholder="Пароль" type="password" bind:value={object.oldPassword} />
|
||||
</div>
|
||||
<div class="field">
|
||||
<CheckBox bind:checked={changePassword}>Изменить пароль</CheckBox>
|
||||
</div>
|
||||
{#if changePassword}
|
||||
<div class="field">
|
||||
<input
|
||||
class="editbox"
|
||||
name="newPassword"
|
||||
placeholder="Новый пароль"
|
||||
type="password"
|
||||
bind:value={object.newPassword} />
|
||||
</div>
|
||||
<div class="field">
|
||||
<input
|
||||
class="editbox"
|
||||
name="newPasswordConfirm"
|
||||
placeholder="Подтверждение пароля"
|
||||
type="password"
|
||||
bind:value={object.newPasswordConfirm} />
|
||||
</div>
|
||||
{/if}
|
||||
{#await secondFactorCheck then value}
|
||||
<div class="field">
|
||||
<CheckBox bind:checked={secondFactorEnabled}>Включить двухфакторную авторизацию</CheckBox>
|
||||
</div>
|
||||
{#if secondFactorCurrentEnabled}
|
||||
<div class="field">
|
||||
<input
|
||||
class="editbox"
|
||||
name="clientSecret"
|
||||
placeholder="Секретный код"
|
||||
type="text"
|
||||
bind:value={object.clientSecret} />
|
||||
</div>
|
||||
{#if src}
|
||||
<div>
|
||||
<img {src} alt="qr code" />
|
||||
</div>
|
||||
{/if}
|
||||
<div class="field">
|
||||
<input
|
||||
class="editbox"
|
||||
name="secondFactorCode"
|
||||
placeholder="Код подтверждения"
|
||||
type="text"
|
||||
bind:value={object.secondFactorCode} />
|
||||
</div>
|
||||
{/if}
|
||||
{/await}
|
||||
<div class="buttons">
|
||||
<button class="button" on:click|preventDefault={navigateLoginForm}> Отменить</button>
|
||||
<button class="button" on:click|preventDefault={saveSetting}> Сохранить</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<style lang="scss">
|
||||
img {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 50%;
|
||||
border: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
|
||||
form {
|
||||
margin: auto;
|
||||
margin-top: 3vh;
|
||||
width: 30em;
|
||||
padding: 1em;
|
||||
border-radius: 1em;
|
||||
border: 1px solid var(--theme-bg-accent-color);
|
||||
.status {
|
||||
margin-top: 0.5em;
|
||||
}
|
||||
.field {
|
||||
.editbox {
|
||||
width: 100%;
|
||||
}
|
||||
margin: 1em 0;
|
||||
}
|
||||
}
|
||||
</style>
|
68
plugins/login-resources/src/components/SignupForm.svelte
Normal file
68
plugins/login-resources/src/components/SignupForm.svelte
Normal file
@ -0,0 +1,68 @@
|
||||
<!--
|
||||
// Copyright © 2020 Anticrm Platform Contributors.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
-->
|
||||
|
||||
<script lang="ts">
|
||||
import { getContext, createEventDispatcher } from 'svelte'
|
||||
import { Status, Severity } from '@anticrm/platform'
|
||||
|
||||
import Form from './Form.svelte'
|
||||
import { doLogin } from '../utils'
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
const fields = [
|
||||
{ name: 'first', i18n: 'First name', short: true },
|
||||
{ name: 'last', i18n: 'Last name', short: true },
|
||||
{ name: 'username', i18n: 'Email' },
|
||||
{ name: 'workspace', i18n: 'Workspace' },
|
||||
{ name: 'password', i18n: 'Password', password: true },
|
||||
{ name: 'password2', i18n: 'Repeat password', password: true },
|
||||
]
|
||||
|
||||
const object = {
|
||||
first: '',
|
||||
last: '',
|
||||
workspace: '',
|
||||
username: '',
|
||||
password: '',
|
||||
password2: '',
|
||||
}
|
||||
|
||||
let status = new Status(Severity.OK, 0, '')
|
||||
|
||||
const action = {
|
||||
i18n: 'Sign Up',
|
||||
func: async () => {
|
||||
status = new Status(Severity.INFO, 0, 'Соединяюсь с сервером...')
|
||||
|
||||
const [loginStatus, result] = await doLogin(object.username, object.password, object.workspace)
|
||||
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
setTimeout(() => {
|
||||
status = loginStatus
|
||||
resolve()
|
||||
}, 1000)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<Form caption="Sign Up" {status} {fields} {object} {action}
|
||||
bottomCaption="Already have an account?"
|
||||
bottomActionLabel="Log In"
|
||||
bottomActionFunc={() => { dispatch('switch', 'login') }}
|
||||
/>
|
29
plugins/login-resources/src/index.ts
Normal file
29
plugins/login-resources/src/index.ts
Normal file
@ -0,0 +1,29 @@
|
||||
//
|
||||
// Copyright © 2020, 2021 Anticrm Platform Contributors.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import LoginApp from './components/LoginApp.svelte'
|
||||
|
||||
/*!
|
||||
* Anticrm Platform™ Login Plugin
|
||||
* © 2020, 2021 Anticrm Platform Contributors.
|
||||
* © 2021 Hardcore Engineering Inc. All Rights Reserved.
|
||||
* Licensed under the Eclipse Public License, Version 2.0
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
||||
export default async () => ({
|
||||
component: {
|
||||
LoginApp
|
||||
},
|
||||
})
|
38
plugins/login-resources/src/plugin.ts
Normal file
38
plugins/login-resources/src/plugin.ts
Normal file
@ -0,0 +1,38 @@
|
||||
//
|
||||
// Copyright © 2020 Anticrm Platform Contributors.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import type { StatusCode, IntlString } from '@anticrm/platform'
|
||||
import { mergeIds } from '@anticrm/platform'
|
||||
import type { AnyComponent } from '@anticrm/ui'
|
||||
|
||||
import login, { loginId } from '@anticrm/login'
|
||||
|
||||
export default mergeIds(loginId, login, {
|
||||
component: {
|
||||
LoginApp: '' as AnyComponent
|
||||
},
|
||||
status: {
|
||||
RequiredField: '' as StatusCode<{ field: string }>,
|
||||
ConnectingToServer: '' as StatusCode
|
||||
},
|
||||
string: {
|
||||
Email: '' as IntlString,
|
||||
Password: '' as IntlString,
|
||||
Workspace: '' as IntlString,
|
||||
LogIn: '' as IntlString,
|
||||
SignUp: '' as IntlString,
|
||||
DoNotHaveAnAccount: '' as IntlString
|
||||
}
|
||||
})
|
54
plugins/login-resources/src/utils.ts
Normal file
54
plugins/login-resources/src/utils.ts
Normal file
@ -0,0 +1,54 @@
|
||||
//
|
||||
// Copyright © 2020 Anticrm Platform Contributors.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import { Status, OK, unknownError, getMetadata, serialize } from '@anticrm/platform'
|
||||
import type { Request, Response } from '@anticrm/platform'
|
||||
|
||||
import login from '@anticrm/login'
|
||||
|
||||
/**
|
||||
* Perform a login operation to required workspace with user credentials.
|
||||
*/
|
||||
export async function doLogin (
|
||||
username: string,
|
||||
password: string,
|
||||
workspace: string
|
||||
): Promise<[Status, any]> {
|
||||
const accountsUrl = getMetadata(login.metadata.AccountsUrl)
|
||||
|
||||
if (accountsUrl === undefined) {
|
||||
throw new Error('accounts url not specified')
|
||||
}
|
||||
|
||||
const request: Request<[string, string, string]> = {
|
||||
method: 'login',
|
||||
params: [username, password, workspace]
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await fetch(accountsUrl, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=utf-8'
|
||||
},
|
||||
body: serialize(request)
|
||||
})
|
||||
const result: Response<any> = await response.json()
|
||||
const status = result.error ?? OK
|
||||
return [status, result.result]
|
||||
} catch (err) {
|
||||
return [unknownError(err), undefined]
|
||||
}
|
||||
}
|
5
plugins/login-resources/svelte.config.js
Normal file
5
plugins/login-resources/svelte.config.js
Normal file
@ -0,0 +1,5 @@
|
||||
const sveltePreprocess = require('svelte-preprocess')
|
||||
|
||||
module.exports = {
|
||||
preprocess: sveltePreprocess()
|
||||
};
|
15
plugins/login-resources/tsconfig.json
Normal file
15
plugins/login-resources/tsconfig.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"moduleResolution": "node",
|
||||
"target": "esnext",
|
||||
"module": "esnext",
|
||||
"declaration": true,
|
||||
"outDir": "./lib",
|
||||
"strict": true,
|
||||
"esModuleInterop": true,
|
||||
"lib": [
|
||||
"esnext",
|
||||
"dom"
|
||||
]
|
||||
}
|
||||
}
|
6
plugins/login/.eslintrc.js
Normal file
6
plugins/login/.eslintrc.js
Normal file
@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
extends: ['./node_modules/@anticrm/platform-rig/profiles/default/config/eslint.config.json'],
|
||||
parserOptions: {
|
||||
project: './tsconfig.json'
|
||||
}
|
||||
}
|
4
plugins/login/.npmignore
Normal file
4
plugins/login/.npmignore
Normal file
@ -0,0 +1,4 @@
|
||||
*
|
||||
!/lib/**
|
||||
!CHANGELOG.md
|
||||
/lib/**/__tests__/
|
18
plugins/login/config/rig.json
Normal file
18
plugins/login/config/rig.json
Normal file
@ -0,0 +1,18 @@
|
||||
// The "rig.json" file directs tools to look for their config files in an external package.
|
||||
// Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
|
||||
|
||||
/**
|
||||
* (Required) The name of the rig package to inherit from.
|
||||
* It should be an NPM package name with the "-rig" suffix.
|
||||
*/
|
||||
"rigPackageName": "@anticrm/platform-rig"
|
||||
|
||||
/**
|
||||
* (Optional) Selects a config profile from the rig package. The name must consist of
|
||||
* lowercase alphanumeric words separated by hyphens, for example "sample-profile".
|
||||
* If omitted, then the "default" profile will be used."
|
||||
*/
|
||||
// "rigProfile": "your-profile-name"
|
||||
}
|
22
plugins/login/package.json
Normal file
22
plugins/login/package.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "@anticrm/login",
|
||||
"version": "0.6.0",
|
||||
"main": "lib/index.js",
|
||||
"author": "Anticrm Platform Contributors",
|
||||
"license": "EPL-2.0",
|
||||
"scripts": {
|
||||
"build": "heft build",
|
||||
"lint:fix": "eslint --fix src"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@anticrm/platform-rig":"~0.6.0",
|
||||
"@types/heft-jest":"^1.0.2",
|
||||
"@typescript-eslint/eslint-plugin":"4",
|
||||
"eslint-plugin-import":"2",
|
||||
"eslint-plugin-promise":"4",
|
||||
"eslint-plugin-node":"11",
|
||||
"eslint":"^7.32.0"
|
||||
},
|
||||
"dependencies": {"@anticrm/platform":"~0.6.3"
|
||||
}
|
||||
}
|
53
plugins/login/src/index.ts
Normal file
53
plugins/login/src/index.ts
Normal file
@ -0,0 +1,53 @@
|
||||
//
|
||||
// Copyright © 2020 Anticrm Platform Contributors.
|
||||
//
|
||||
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License. You may
|
||||
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import type { Plugin, Asset } from '@anticrm/platform'
|
||||
import { plugin } from '@anticrm/platform'
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface LoginInfo {
|
||||
email: string
|
||||
workspace: string
|
||||
server: string
|
||||
port: string
|
||||
token: string
|
||||
secondFactorEnabled: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export const ACCOUNT_KEY = 'anticrm-account'
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export function currentAccount (): LoginInfo | null {
|
||||
const account = localStorage.getItem(ACCOUNT_KEY)
|
||||
return (account !== null) ? JSON.parse(account) : null
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export const loginId = 'login' as Plugin
|
||||
|
||||
export default plugin(loginId, {
|
||||
metadata: {
|
||||
AccountsUrl: '' as Asset
|
||||
}
|
||||
})
|
9
plugins/login/tsconfig.json
Normal file
9
plugins/login/tsconfig.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"extends": "./node_modules/@anticrm/platform-rig/profiles/default/tsconfig.json",
|
||||
|
||||
"compilerOptions": {
|
||||
"rootDir": "./src",
|
||||
"outDir": "./lib",
|
||||
"lib": ["esnext", "dom"]
|
||||
}
|
||||
}
|
10
rush.json
10
rush.json
@ -500,6 +500,16 @@
|
||||
"packageName": "@anticrm/server",
|
||||
"projectFolder": "server/server",
|
||||
"shouldPublish": true
|
||||
},
|
||||
{
|
||||
"packageName": "@anticrm/login",
|
||||
"projectFolder": "plugins/login",
|
||||
"shouldPublish": true
|
||||
},
|
||||
{
|
||||
"packageName": "@anticrm/login-resources",
|
||||
"projectFolder": "plugins/login-resources",
|
||||
"shouldPublish": true
|
||||
}
|
||||
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user