fixed lint validation, chores, lint, safe lib updates
This commit is contained in:
parent
5160e00bda
commit
9a1862b575
21
.gitlab-ci.yml
Normal file
21
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
stages:
|
||||
- deploy
|
||||
|
||||
deploy:
|
||||
image:
|
||||
name: alpine/git
|
||||
entrypoint: [""]
|
||||
stage: deploy
|
||||
environment:
|
||||
name: production
|
||||
url: https://new.discours.io
|
||||
only:
|
||||
- main
|
||||
script:
|
||||
- mkdir ~/.ssh
|
||||
- echo "${HOST_KEY}" > ~/.ssh/known_hosts
|
||||
- echo "${SSH_PRIVATE_KEY}" > ~/.ssh/id_rsa
|
||||
- chmod 0400 ~/.ssh/id_rsa
|
||||
- git remote add github git@github.com:Discours/discoursio-webapp.git
|
||||
- git push github HEAD:main
|
206
package-lock.json
generated
206
package-lock.json
generated
|
@ -66,10 +66,10 @@
|
|||
"@tiptap/extension-underline": "2.0.3",
|
||||
"@tiptap/extension-youtube": "2.0.3",
|
||||
"@types/express": "4.17.17",
|
||||
"@types/node": "20.1.0",
|
||||
"@types/node": "20.1.1",
|
||||
"@types/uuid": "9.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "5.59.2",
|
||||
"@typescript-eslint/parser": "5.59.2",
|
||||
"@typescript-eslint/eslint-plugin": "5.59.5",
|
||||
"@typescript-eslint/parser": "5.59.5",
|
||||
"@urql/core": "3.2.2",
|
||||
"@urql/devtools": "2.0.3",
|
||||
"@urql/exchange-graphcache": "5.2.0",
|
||||
|
@ -126,7 +126,7 @@
|
|||
"prosemirror-schema-list": "1.2.2",
|
||||
"prosemirror-state": "1.4.2",
|
||||
"prosemirror-view": "1.30.2",
|
||||
"rollup": "3.21.5",
|
||||
"rollup": "3.21.6",
|
||||
"rollup-plugin-visualizer": "5.9.0",
|
||||
"sass": "1.62.1",
|
||||
"solid-js": "1.7.5",
|
||||
|
@ -145,7 +145,7 @@
|
|||
"unique-names-generator": "4.7.1",
|
||||
"uuid": "9.0.0",
|
||||
"vite": "4.3.5",
|
||||
"vite-plugin-sass-dts": "1.3.4",
|
||||
"vite-plugin-sass-dts": "1.3.5",
|
||||
"vite-plugin-solid": "2.7.0",
|
||||
"vite-plugin-ssr": "0.4.123",
|
||||
"wonka": "6.3.1",
|
||||
|
@ -6406,9 +6406,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "20.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.0.tgz",
|
||||
"integrity": "sha512-O+z53uwx64xY7D6roOi4+jApDGFg0qn6WHcxe5QeqjMaTezBO/mxdfFXIVAVVyNWKx84OmPB3L8kbVYOTeN34A==",
|
||||
"version": "20.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.1.tgz",
|
||||
"integrity": "sha512-uKBEevTNb+l6/aCQaKVnUModfEMjAl98lw2Si9P5y4hLu9tm6AlX2ZIoXZX6Wh9lJueYPrGPKk5WMCNHg/u6/A==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/normalize-package-data": {
|
||||
|
@ -6521,15 +6521,15 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "5.59.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.2.tgz",
|
||||
"integrity": "sha512-yVrXupeHjRxLDcPKL10sGQ/QlVrA8J5IYOEWVqk0lJaSZP7X5DfnP7Ns3cc74/blmbipQ1htFNVGsHX6wsYm0A==",
|
||||
"version": "5.59.5",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.5.tgz",
|
||||
"integrity": "sha512-feA9xbVRWJZor+AnLNAr7A8JRWeZqHUf4T9tlP+TN04b05pFVhO5eN7/O93Y/1OUlLMHKbnJisgDURs/qvtqdg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.4.0",
|
||||
"@typescript-eslint/scope-manager": "5.59.2",
|
||||
"@typescript-eslint/type-utils": "5.59.2",
|
||||
"@typescript-eslint/utils": "5.59.2",
|
||||
"@typescript-eslint/scope-manager": "5.59.5",
|
||||
"@typescript-eslint/type-utils": "5.59.5",
|
||||
"@typescript-eslint/utils": "5.59.5",
|
||||
"debug": "^4.3.4",
|
||||
"grapheme-splitter": "^1.0.4",
|
||||
"ignore": "^5.2.0",
|
||||
|
@ -6588,14 +6588,14 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "5.59.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.2.tgz",
|
||||
"integrity": "sha512-uq0sKyw6ao1iFOZZGk9F8Nro/8+gfB5ezl1cA06SrqbgJAt0SRoFhb9pXaHvkrxUpZaoLxt8KlovHNk8Gp6/HQ==",
|
||||
"version": "5.59.5",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.5.tgz",
|
||||
"integrity": "sha512-NJXQC4MRnF9N9yWqQE2/KLRSOLvrrlZb48NGVfBa+RuPMN6B7ZcK5jZOvhuygv4D64fRKnZI4L4p8+M+rfeQuw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "5.59.2",
|
||||
"@typescript-eslint/types": "5.59.2",
|
||||
"@typescript-eslint/typescript-estree": "5.59.2",
|
||||
"@typescript-eslint/scope-manager": "5.59.5",
|
||||
"@typescript-eslint/types": "5.59.5",
|
||||
"@typescript-eslint/typescript-estree": "5.59.5",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
|
@ -6615,13 +6615,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "5.59.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.2.tgz",
|
||||
"integrity": "sha512-dB1v7ROySwQWKqQ8rEWcdbTsFjh2G0vn8KUyvTXdPoyzSL6lLGkiXEV5CvpJsEe9xIdKV+8Zqb7wif2issoOFA==",
|
||||
"version": "5.59.5",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.5.tgz",
|
||||
"integrity": "sha512-jVecWwnkX6ZgutF+DovbBJirZcAxgxC0EOHYt/niMROf8p4PwxxG32Qdhj/iIQQIuOflLjNkxoXyArkcIP7C3A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.59.2",
|
||||
"@typescript-eslint/visitor-keys": "5.59.2"
|
||||
"@typescript-eslint/types": "5.59.5",
|
||||
"@typescript-eslint/visitor-keys": "5.59.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
|
@ -6632,13 +6632,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils": {
|
||||
"version": "5.59.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.2.tgz",
|
||||
"integrity": "sha512-b1LS2phBOsEy/T381bxkkywfQXkV1dWda/z0PhnIy3bC5+rQWQDS7fk9CSpcXBccPY27Z6vBEuaPBCKCgYezyQ==",
|
||||
"version": "5.59.5",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.5.tgz",
|
||||
"integrity": "sha512-4eyhS7oGym67/pSxA2mmNq7X164oqDYNnZCUayBwJZIRVvKpBCMBzFnFxjeoDeShjtO6RQBHBuwybuX3POnDqg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/typescript-estree": "5.59.2",
|
||||
"@typescript-eslint/utils": "5.59.2",
|
||||
"@typescript-eslint/typescript-estree": "5.59.5",
|
||||
"@typescript-eslint/utils": "5.59.5",
|
||||
"debug": "^4.3.4",
|
||||
"tsutils": "^3.21.0"
|
||||
},
|
||||
|
@ -6659,9 +6659,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "5.59.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.2.tgz",
|
||||
"integrity": "sha512-LbJ/HqoVs2XTGq5shkiKaNTuVv5tTejdHgfdjqRUGdYhjW1crm/M7og2jhVskMt8/4wS3T1+PfFvL1K3wqYj4w==",
|
||||
"version": "5.59.5",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.5.tgz",
|
||||
"integrity": "sha512-xkfRPHbqSH4Ggx4eHRIO/eGL8XL4Ysb4woL8c87YuAo8Md7AUjyWKa9YMwTL519SyDPrfEgKdewjkxNCVeJW7w==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
|
@ -6672,13 +6672,13 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "5.59.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.2.tgz",
|
||||
"integrity": "sha512-+j4SmbwVmZsQ9jEyBMgpuBD0rKwi9RxRpjX71Brr73RsYnEr3Lt5QZ624Bxphp8HUkSKfqGnPJp1kA5nl0Sh7Q==",
|
||||
"version": "5.59.5",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.5.tgz",
|
||||
"integrity": "sha512-+XXdLN2CZLZcD/mO7mQtJMvCkzRfmODbeSKuMY/yXbGkzvA9rJyDY5qDYNoiz2kP/dmyAxXquL2BvLQLJFPQIg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.59.2",
|
||||
"@typescript-eslint/visitor-keys": "5.59.2",
|
||||
"@typescript-eslint/types": "5.59.5",
|
||||
"@typescript-eslint/visitor-keys": "5.59.5",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
|
@ -6732,17 +6732,17 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/@typescript-eslint/utils": {
|
||||
"version": "5.59.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.2.tgz",
|
||||
"integrity": "sha512-kSuF6/77TZzyGPhGO4uVp+f0SBoYxCDf+lW3GKhtKru/L8k/Hd7NFQxyWUeY7Z/KGB2C6Fe3yf2vVi4V9TsCSQ==",
|
||||
"version": "5.59.5",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.5.tgz",
|
||||
"integrity": "sha512-sCEHOiw+RbyTii9c3/qN74hYDPNORb8yWCoPLmB7BIflhplJ65u2PBpdRla12e3SSTJ2erRkPjz7ngLHhUegxA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.2.0",
|
||||
"@types/json-schema": "^7.0.9",
|
||||
"@types/semver": "^7.3.12",
|
||||
"@typescript-eslint/scope-manager": "5.59.2",
|
||||
"@typescript-eslint/types": "5.59.2",
|
||||
"@typescript-eslint/typescript-estree": "5.59.2",
|
||||
"@typescript-eslint/scope-manager": "5.59.5",
|
||||
"@typescript-eslint/types": "5.59.5",
|
||||
"@typescript-eslint/typescript-estree": "5.59.5",
|
||||
"eslint-scope": "^5.1.1",
|
||||
"semver": "^7.3.7"
|
||||
},
|
||||
|
@ -6791,12 +6791,12 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "5.59.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.2.tgz",
|
||||
"integrity": "sha512-EEpsO8m3RASrKAHI9jpavNv9NlEUebV4qmF1OWxSTtKSFBpC1NCmWazDQHFivRf0O1DV11BA645yrLEVQ0/Lig==",
|
||||
"version": "5.59.5",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.5.tgz",
|
||||
"integrity": "sha512-qL+Oz+dbeBRTeyJTIy0eniD3uvqU7x+y1QceBismZ41hd4aBSRh8UAw4pZP0+XzLuPZmx4raNMq/I+59W2lXKA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.59.2",
|
||||
"@typescript-eslint/types": "5.59.5",
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
},
|
||||
"engines": {
|
||||
|
@ -17894,9 +17894,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/rollup": {
|
||||
"version": "3.21.5",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.21.5.tgz",
|
||||
"integrity": "sha512-a4NTKS4u9PusbUJcfF4IMxuqjFzjm6ifj76P54a7cKnvVzJaG12BLVR+hgU2YDGHzyMMQNxLAZWuALsn8q2oQg==",
|
||||
"version": "3.21.6",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.21.6.tgz",
|
||||
"integrity": "sha512-SXIICxvxQxR3D4dp/3LDHZIJPC8a4anKMHd4E3Jiz2/JnY+2bEjqrOokAauc5ShGVNFHlEFjBXAXlaxkJqIqSg==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"rollup": "dist/bin/rollup"
|
||||
|
@ -19907,9 +19907,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/vite-plugin-sass-dts": {
|
||||
"version": "1.3.4",
|
||||
"resolved": "https://registry.npmjs.org/vite-plugin-sass-dts/-/vite-plugin-sass-dts-1.3.4.tgz",
|
||||
"integrity": "sha512-wwyI6mRahYEX71CXOOo3f1dRcb70qUmcppvrhJ3elSypxHcmU4qbN9RTZIwCrA6155Pz4Beh/t1yuPt6M0yr/g==",
|
||||
"version": "1.3.5",
|
||||
"resolved": "https://registry.npmjs.org/vite-plugin-sass-dts/-/vite-plugin-sass-dts-1.3.5.tgz",
|
||||
"integrity": "sha512-yGm5uRTDq1qc17ZMJV0bQRgxNfw2a/Ejqc/T2NOILXmcR1z9zHpqqo1FwoDddyTV87GDQZYldqKZOE4O5bGBOw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"postcss-js": "^4.0.1"
|
||||
|
@ -25287,9 +25287,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "20.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.0.tgz",
|
||||
"integrity": "sha512-O+z53uwx64xY7D6roOi4+jApDGFg0qn6WHcxe5QeqjMaTezBO/mxdfFXIVAVVyNWKx84OmPB3L8kbVYOTeN34A==",
|
||||
"version": "20.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.1.tgz",
|
||||
"integrity": "sha512-uKBEevTNb+l6/aCQaKVnUModfEMjAl98lw2Si9P5y4hLu9tm6AlX2ZIoXZX6Wh9lJueYPrGPKk5WMCNHg/u6/A==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/normalize-package-data": {
|
||||
|
@ -25402,15 +25402,15 @@
|
|||
"dev": true
|
||||
},
|
||||
"@typescript-eslint/eslint-plugin": {
|
||||
"version": "5.59.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.2.tgz",
|
||||
"integrity": "sha512-yVrXupeHjRxLDcPKL10sGQ/QlVrA8J5IYOEWVqk0lJaSZP7X5DfnP7Ns3cc74/blmbipQ1htFNVGsHX6wsYm0A==",
|
||||
"version": "5.59.5",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.5.tgz",
|
||||
"integrity": "sha512-feA9xbVRWJZor+AnLNAr7A8JRWeZqHUf4T9tlP+TN04b05pFVhO5eN7/O93Y/1OUlLMHKbnJisgDURs/qvtqdg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@eslint-community/regexpp": "^4.4.0",
|
||||
"@typescript-eslint/scope-manager": "5.59.2",
|
||||
"@typescript-eslint/type-utils": "5.59.2",
|
||||
"@typescript-eslint/utils": "5.59.2",
|
||||
"@typescript-eslint/scope-manager": "5.59.5",
|
||||
"@typescript-eslint/type-utils": "5.59.5",
|
||||
"@typescript-eslint/utils": "5.59.5",
|
||||
"debug": "^4.3.4",
|
||||
"grapheme-splitter": "^1.0.4",
|
||||
"ignore": "^5.2.0",
|
||||
|
@ -25446,53 +25446,53 @@
|
|||
}
|
||||
},
|
||||
"@typescript-eslint/parser": {
|
||||
"version": "5.59.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.2.tgz",
|
||||
"integrity": "sha512-uq0sKyw6ao1iFOZZGk9F8Nro/8+gfB5ezl1cA06SrqbgJAt0SRoFhb9pXaHvkrxUpZaoLxt8KlovHNk8Gp6/HQ==",
|
||||
"version": "5.59.5",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.5.tgz",
|
||||
"integrity": "sha512-NJXQC4MRnF9N9yWqQE2/KLRSOLvrrlZb48NGVfBa+RuPMN6B7ZcK5jZOvhuygv4D64fRKnZI4L4p8+M+rfeQuw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/scope-manager": "5.59.2",
|
||||
"@typescript-eslint/types": "5.59.2",
|
||||
"@typescript-eslint/typescript-estree": "5.59.2",
|
||||
"@typescript-eslint/scope-manager": "5.59.5",
|
||||
"@typescript-eslint/types": "5.59.5",
|
||||
"@typescript-eslint/typescript-estree": "5.59.5",
|
||||
"debug": "^4.3.4"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/scope-manager": {
|
||||
"version": "5.59.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.2.tgz",
|
||||
"integrity": "sha512-dB1v7ROySwQWKqQ8rEWcdbTsFjh2G0vn8KUyvTXdPoyzSL6lLGkiXEV5CvpJsEe9xIdKV+8Zqb7wif2issoOFA==",
|
||||
"version": "5.59.5",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.5.tgz",
|
||||
"integrity": "sha512-jVecWwnkX6ZgutF+DovbBJirZcAxgxC0EOHYt/niMROf8p4PwxxG32Qdhj/iIQQIuOflLjNkxoXyArkcIP7C3A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "5.59.2",
|
||||
"@typescript-eslint/visitor-keys": "5.59.2"
|
||||
"@typescript-eslint/types": "5.59.5",
|
||||
"@typescript-eslint/visitor-keys": "5.59.5"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/type-utils": {
|
||||
"version": "5.59.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.2.tgz",
|
||||
"integrity": "sha512-b1LS2phBOsEy/T381bxkkywfQXkV1dWda/z0PhnIy3bC5+rQWQDS7fk9CSpcXBccPY27Z6vBEuaPBCKCgYezyQ==",
|
||||
"version": "5.59.5",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.5.tgz",
|
||||
"integrity": "sha512-4eyhS7oGym67/pSxA2mmNq7X164oqDYNnZCUayBwJZIRVvKpBCMBzFnFxjeoDeShjtO6RQBHBuwybuX3POnDqg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/typescript-estree": "5.59.2",
|
||||
"@typescript-eslint/utils": "5.59.2",
|
||||
"@typescript-eslint/typescript-estree": "5.59.5",
|
||||
"@typescript-eslint/utils": "5.59.5",
|
||||
"debug": "^4.3.4",
|
||||
"tsutils": "^3.21.0"
|
||||
}
|
||||
},
|
||||
"@typescript-eslint/types": {
|
||||
"version": "5.59.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.2.tgz",
|
||||
"integrity": "sha512-LbJ/HqoVs2XTGq5shkiKaNTuVv5tTejdHgfdjqRUGdYhjW1crm/M7og2jhVskMt8/4wS3T1+PfFvL1K3wqYj4w==",
|
||||
"version": "5.59.5",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.5.tgz",
|
||||
"integrity": "sha512-xkfRPHbqSH4Ggx4eHRIO/eGL8XL4Ysb4woL8c87YuAo8Md7AUjyWKa9YMwTL519SyDPrfEgKdewjkxNCVeJW7w==",
|
||||
"dev": true
|
||||
},
|
||||
"@typescript-eslint/typescript-estree": {
|
||||
"version": "5.59.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.2.tgz",
|
||||
"integrity": "sha512-+j4SmbwVmZsQ9jEyBMgpuBD0rKwi9RxRpjX71Brr73RsYnEr3Lt5QZ624Bxphp8HUkSKfqGnPJp1kA5nl0Sh7Q==",
|
||||
"version": "5.59.5",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.5.tgz",
|
||||
"integrity": "sha512-+XXdLN2CZLZcD/mO7mQtJMvCkzRfmODbeSKuMY/yXbGkzvA9rJyDY5qDYNoiz2kP/dmyAxXquL2BvLQLJFPQIg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "5.59.2",
|
||||
"@typescript-eslint/visitor-keys": "5.59.2",
|
||||
"@typescript-eslint/types": "5.59.5",
|
||||
"@typescript-eslint/visitor-keys": "5.59.5",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
|
@ -25527,17 +25527,17 @@
|
|||
}
|
||||
},
|
||||
"@typescript-eslint/utils": {
|
||||
"version": "5.59.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.2.tgz",
|
||||
"integrity": "sha512-kSuF6/77TZzyGPhGO4uVp+f0SBoYxCDf+lW3GKhtKru/L8k/Hd7NFQxyWUeY7Z/KGB2C6Fe3yf2vVi4V9TsCSQ==",
|
||||
"version": "5.59.5",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.5.tgz",
|
||||
"integrity": "sha512-sCEHOiw+RbyTii9c3/qN74hYDPNORb8yWCoPLmB7BIflhplJ65u2PBpdRla12e3SSTJ2erRkPjz7ngLHhUegxA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@eslint-community/eslint-utils": "^4.2.0",
|
||||
"@types/json-schema": "^7.0.9",
|
||||
"@types/semver": "^7.3.12",
|
||||
"@typescript-eslint/scope-manager": "5.59.2",
|
||||
"@typescript-eslint/types": "5.59.2",
|
||||
"@typescript-eslint/typescript-estree": "5.59.2",
|
||||
"@typescript-eslint/scope-manager": "5.59.5",
|
||||
"@typescript-eslint/types": "5.59.5",
|
||||
"@typescript-eslint/typescript-estree": "5.59.5",
|
||||
"eslint-scope": "^5.1.1",
|
||||
"semver": "^7.3.7"
|
||||
},
|
||||
|
@ -25569,12 +25569,12 @@
|
|||
}
|
||||
},
|
||||
"@typescript-eslint/visitor-keys": {
|
||||
"version": "5.59.2",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.2.tgz",
|
||||
"integrity": "sha512-EEpsO8m3RASrKAHI9jpavNv9NlEUebV4qmF1OWxSTtKSFBpC1NCmWazDQHFivRf0O1DV11BA645yrLEVQ0/Lig==",
|
||||
"version": "5.59.5",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.5.tgz",
|
||||
"integrity": "sha512-qL+Oz+dbeBRTeyJTIy0eniD3uvqU7x+y1QceBismZ41hd4aBSRh8UAw4pZP0+XzLuPZmx4raNMq/I+59W2lXKA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@typescript-eslint/types": "5.59.2",
|
||||
"@typescript-eslint/types": "5.59.5",
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
}
|
||||
},
|
||||
|
@ -33810,9 +33810,9 @@
|
|||
}
|
||||
},
|
||||
"rollup": {
|
||||
"version": "3.21.5",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.21.5.tgz",
|
||||
"integrity": "sha512-a4NTKS4u9PusbUJcfF4IMxuqjFzjm6ifj76P54a7cKnvVzJaG12BLVR+hgU2YDGHzyMMQNxLAZWuALsn8q2oQg==",
|
||||
"version": "3.21.6",
|
||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.21.6.tgz",
|
||||
"integrity": "sha512-SXIICxvxQxR3D4dp/3LDHZIJPC8a4anKMHd4E3Jiz2/JnY+2bEjqrOokAauc5ShGVNFHlEFjBXAXlaxkJqIqSg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fsevents": "~2.3.2"
|
||||
|
@ -35292,9 +35292,9 @@
|
|||
}
|
||||
},
|
||||
"vite-plugin-sass-dts": {
|
||||
"version": "1.3.4",
|
||||
"resolved": "https://registry.npmjs.org/vite-plugin-sass-dts/-/vite-plugin-sass-dts-1.3.4.tgz",
|
||||
"integrity": "sha512-wwyI6mRahYEX71CXOOo3f1dRcb70qUmcppvrhJ3elSypxHcmU4qbN9RTZIwCrA6155Pz4Beh/t1yuPt6M0yr/g==",
|
||||
"version": "1.3.5",
|
||||
"resolved": "https://registry.npmjs.org/vite-plugin-sass-dts/-/vite-plugin-sass-dts-1.3.5.tgz",
|
||||
"integrity": "sha512-yGm5uRTDq1qc17ZMJV0bQRgxNfw2a/Ejqc/T2NOILXmcR1z9zHpqqo1FwoDddyTV87GDQZYldqKZOE4O5bGBOw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"postcss-js": "^4.0.1"
|
||||
|
|
10
package.json
10
package.json
|
@ -86,10 +86,10 @@
|
|||
"@tiptap/extension-underline": "2.0.3",
|
||||
"@tiptap/extension-youtube": "2.0.3",
|
||||
"@types/express": "4.17.17",
|
||||
"@types/node": "20.1.0",
|
||||
"@types/node": "20.1.1",
|
||||
"@types/uuid": "9.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "5.59.2",
|
||||
"@typescript-eslint/parser": "5.59.2",
|
||||
"@typescript-eslint/eslint-plugin": "5.59.5",
|
||||
"@typescript-eslint/parser": "5.59.5",
|
||||
"@urql/core": "3.2.2",
|
||||
"@urql/devtools": "2.0.3",
|
||||
"@urql/exchange-graphcache": "5.2.0",
|
||||
|
@ -146,7 +146,7 @@
|
|||
"prosemirror-schema-list": "1.2.2",
|
||||
"prosemirror-state": "1.4.2",
|
||||
"prosemirror-view": "1.30.2",
|
||||
"rollup": "3.21.5",
|
||||
"rollup": "3.21.6",
|
||||
"rollup-plugin-visualizer": "5.9.0",
|
||||
"sass": "1.62.1",
|
||||
"solid-js": "1.7.5",
|
||||
|
@ -165,7 +165,7 @@
|
|||
"unique-names-generator": "4.7.1",
|
||||
"uuid": "9.0.0",
|
||||
"vite": "4.3.5",
|
||||
"vite-plugin-sass-dts": "1.3.4",
|
||||
"vite-plugin-sass-dts": "1.3.5",
|
||||
"vite-plugin-solid": "2.7.0",
|
||||
"vite-plugin-ssr": "0.4.123",
|
||||
"wonka": "6.3.1",
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
"Independant magazine with an open horizontal cooperation about culture, science and society": "Independant magazine with an open horizontal cooperation about culture, science and society",
|
||||
"Introduce": "Introduction",
|
||||
"Invalid email": "Check if your email is correct",
|
||||
"Invalid image link": "Invalid image link",
|
||||
"Invalid image URL": "Invalid image URL",
|
||||
"Invalid url format": "Invalid url format",
|
||||
"Invite co-authors": "Invite co-authors",
|
||||
"Invite to collab": "Invite to Collab",
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
"Independant magazine with an open horizontal cooperation about culture, science and society": "Независимый журнал с открытой горизонтальной редакцией о культуре, науке и обществе",
|
||||
"Introduce": "Представление",
|
||||
"Invalid email": "Проверьте правильность ввода почты",
|
||||
"Invalid image link": "Некорректная ссылка на изображение",
|
||||
"Invalid image URL": "Некорректная ссылка на изображение",
|
||||
"Invalid url format": "Неверный формат ссылки",
|
||||
"Invite co-authors": "Пригласить соавторов",
|
||||
"Invite experts": "Пригласить экспертов",
|
||||
|
|
|
@ -5,9 +5,8 @@ import { Icon } from '../_shared/Icon'
|
|||
import { formatDate } from '../../utils'
|
||||
import formatDateTime from '../../utils/formatDateTime'
|
||||
import { useLocalize } from '../../context/localize'
|
||||
import { getPagePath, openPage } from '@nanostores/router'
|
||||
import { getPagePath } from '@nanostores/router'
|
||||
import { router } from '../../stores/router'
|
||||
import { useEditorContext } from '../../context/editor'
|
||||
|
||||
type Props = {
|
||||
class?: string
|
||||
|
|
|
@ -25,13 +25,6 @@ const embedData = async (data) => {
|
|||
}
|
||||
}
|
||||
|
||||
const validateEmbed = async (value) => {
|
||||
const iframeData = (await HTMLParser(value, false)) as JSONContent
|
||||
if (iframeData.type !== 'iframe') {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
export const EditorFloatingMenu = (props: FloatingMenuProps) => {
|
||||
const { t } = useLocalize()
|
||||
const [selectedMenuItem, setSelectedMenuItem] = createSignal<MenuItem | undefined>()
|
||||
|
@ -43,6 +36,13 @@ export const EditorFloatingMenu = (props: FloatingMenuProps) => {
|
|||
props.editor.chain().focus().setIframe(emb).run()
|
||||
}
|
||||
|
||||
const validateEmbed = async (value) => {
|
||||
const iframeData = (await HTMLParser(value, false)) as JSONContent
|
||||
if (iframeData.type !== 'iframe') {
|
||||
return t('Error')
|
||||
}
|
||||
}
|
||||
|
||||
createEffect(() => {
|
||||
switch (selectedMenuItem()) {
|
||||
case 'image': {
|
||||
|
@ -102,7 +102,6 @@ export const EditorFloatingMenu = (props: FloatingMenuProps) => {
|
|||
onClear={() => setSelectedMenuItem()}
|
||||
validate={validateEmbed}
|
||||
onSubmit={handleEmbedFormSubmit}
|
||||
errorMessage={t('Error')}
|
||||
/>
|
||||
</Show>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
.Menu {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
.icon {
|
||||
opacity: 0.5;
|
||||
display: block;
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
|
||||
.form {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
flex-flow: row nowrap;
|
||||
padding: 6px 11px;
|
||||
width: 100%;
|
||||
|
||||
|
|
|
@ -7,11 +7,10 @@ type Props = {
|
|||
onClose: () => void
|
||||
onClear?: () => void
|
||||
onSubmit: (value: string) => void
|
||||
validate?: (value: string) => string | Promise<string> | Promise<void> | Promise<boolean>
|
||||
validate?: (value: string) => string | Promise<string>
|
||||
initialValue?: string
|
||||
showInput?: boolean
|
||||
placeholder: string
|
||||
errorMessage: string
|
||||
autoFocus?: boolean
|
||||
}
|
||||
|
||||
|
@ -26,17 +25,15 @@ export const InlineForm = (props: Props) => {
|
|||
|
||||
const handleSaveButtonClick = async () => {
|
||||
if (props.validate) {
|
||||
const checkValid = await props.validate(formValue())
|
||||
if (checkValid) {
|
||||
const errorMessage = await props.validate(formValue())
|
||||
if (errorMessage) {
|
||||
setFormValueError(errorMessage)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
props.onSubmit(formValue())
|
||||
props.onClose()
|
||||
} else {
|
||||
setFormValueError(props.errorMessage)
|
||||
}
|
||||
} else {
|
||||
props.onSubmit(formValue())
|
||||
props.onClose()
|
||||
}
|
||||
}
|
||||
|
||||
const handleKeyPress = async (event) => {
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
.LinkForm {
|
||||
position: relative;
|
||||
|
||||
.form {
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
padding: 6px 11px;
|
||||
|
||||
input {
|
||||
margin: 0 12px 0 0;
|
||||
padding: 0;
|
||||
flex: 1;
|
||||
border: none;
|
||||
min-width: 200px;
|
||||
display: block;
|
||||
|
||||
&::placeholder {
|
||||
color: rgba(#000, 0.3);
|
||||
}
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.linkError {
|
||||
padding: 6px 11px;
|
||||
color: red;
|
||||
font-size: 0.7em;
|
||||
position: absolute;
|
||||
bottom: -3rem;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 0;
|
||||
background: #fff;
|
||||
box-shadow: 0 4px 10px rgba(#000, 0.25);
|
||||
opacity: 0;
|
||||
transition: height 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
||||
|
||||
&.visible {
|
||||
height: 32px;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,85 +0,0 @@
|
|||
import styles from './LinkForm.module.scss'
|
||||
import { Icon } from '../../../_shared/Icon'
|
||||
import { createEditorTransaction } from 'solid-tiptap'
|
||||
import validateUrl from '../../../../utils/validateUrl'
|
||||
import type { Editor } from '@tiptap/core'
|
||||
import { createSignal } from 'solid-js'
|
||||
import { useLocalize } from '../../../../context/localize'
|
||||
import { clsx } from 'clsx'
|
||||
|
||||
type Props = {
|
||||
editor: Editor
|
||||
onClose: () => void
|
||||
}
|
||||
|
||||
export const LinkForm = (props: Props) => {
|
||||
const { t } = useLocalize()
|
||||
const [url, setUrl] = createSignal('')
|
||||
const [linkError, setLinkError] = createSignal('')
|
||||
|
||||
const currentUrl = createEditorTransaction(
|
||||
() => props.editor,
|
||||
(editor) => {
|
||||
return (editor && editor.getAttributes('link').href) || ''
|
||||
}
|
||||
)
|
||||
|
||||
const clearLinkForm = () => {
|
||||
if (currentUrl()) {
|
||||
props.editor.chain().focus().unsetLink().run()
|
||||
}
|
||||
setUrl('')
|
||||
props.onClose()
|
||||
}
|
||||
|
||||
const handleUrlInput = (value) => {
|
||||
setUrl(value)
|
||||
}
|
||||
|
||||
const handleSaveButtonClick = () => {
|
||||
if (!validateUrl(url())) {
|
||||
setLinkError(t('Invalid url format'))
|
||||
return
|
||||
}
|
||||
|
||||
props.editor.chain().focus().setLink({ href: url() }).run()
|
||||
props.onClose()
|
||||
}
|
||||
|
||||
const handleKeyPress = (event) => {
|
||||
event.preventDefault()
|
||||
setLinkError('')
|
||||
const key = event.key
|
||||
|
||||
if (key === 'Enter') {
|
||||
handleSaveButtonClick()
|
||||
}
|
||||
|
||||
if (key === 'Esc') {
|
||||
clearLinkForm()
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div class={styles.LinkForm}>
|
||||
<div class={styles.form}>
|
||||
<input
|
||||
type="text"
|
||||
placeholder={t('Enter URL address')}
|
||||
autofocus
|
||||
value={currentUrl()}
|
||||
onKeyPress={(e) => handleKeyPress(e)}
|
||||
onInput={(e) => handleUrlInput(e.currentTarget.value)}
|
||||
/>
|
||||
<button type="button" onClick={handleSaveButtonClick} disabled={linkError() !== ''}>
|
||||
<Icon name="status-done" />
|
||||
</button>
|
||||
<button type="button" onClick={() => clearLinkForm()}>
|
||||
{currentUrl() ? 'Ж' : <Icon name="status-cancel" />}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class={clsx(styles.linkError, { [styles.visible]: Boolean(linkError()) })}>{linkError()}</div>
|
||||
</div>
|
||||
)
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
export { LinkForm } from './LinkForm'
|
|
@ -6,7 +6,7 @@ import { clsx } from 'clsx'
|
|||
import { createEditorTransaction } from 'solid-tiptap'
|
||||
import { useLocalize } from '../../../context/localize'
|
||||
import { InlineForm } from '../InlineForm'
|
||||
import validateImage from '../../../utils/validateUrl'
|
||||
import { validateUrl } from '../../../utils/validateUrl'
|
||||
|
||||
type BubbleMenuProps = {
|
||||
editor: Editor
|
||||
|
@ -83,10 +83,9 @@ export const TextBubbleMenu = (props: BubbleMenuProps) => {
|
|||
placeholder={t('Enter URL address')}
|
||||
initialValue={currentUrl() ?? ''}
|
||||
onClear={handleClearLinkForm}
|
||||
validate={(value) => (validateImage(value) ? '' : t('Invalid url format'))}
|
||||
validate={(value) => (validateUrl(value) ? '' : t('Invalid url format'))}
|
||||
onSubmit={handleLinkFormSubmit}
|
||||
onClose={() => setLinkEditorOpen(false)}
|
||||
errorMessage={t('Error')}
|
||||
/>
|
||||
</Match>
|
||||
<Match when={!linkEditorOpen()}>
|
||||
|
|
|
@ -40,8 +40,8 @@
|
|||
to right,
|
||||
rgba(#fff, 0) 0%,
|
||||
rgba(#fff, 0.8) 50%,
|
||||
rgba(128, 186, 232, 0) 99%,
|
||||
rgba(125, 185, 232, 0) 100%
|
||||
rgb(128 186 232 / 0%) 99%,
|
||||
rgb(125 185 232 / 0%) 100%
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -89,6 +89,7 @@
|
|||
0% {
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
|
|
@ -113,9 +113,8 @@ export const UploadModalContent = (props: Props) => {
|
|||
hideModal()
|
||||
props.onClose()
|
||||
}}
|
||||
validate={(value) => verifyImg(value)}
|
||||
validate={async (value) => ((await verifyImg(value)) ? '' : t('Invalid image URL'))}
|
||||
onSubmit={handleImageFormSubmit}
|
||||
errorMessage={t('Invalid image link')}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
|
|
|
@ -118,7 +118,12 @@ export const Figure = Node.create<FigureOptions>({
|
|||
|
||||
const tracker = new Tracker(tr)
|
||||
|
||||
return commands.forEach(images, ({ node, pos }) => {
|
||||
return commands.forEach(
|
||||
// eslint-disable-next-line unicorn/no-array-callback-reference
|
||||
images,
|
||||
// eslint-disable-next-line unicorn/no-array-method-this-argument
|
||||
({ node, pos }) => {
|
||||
// eslint-disable-next-line unicorn/no-array-callback-reference
|
||||
const mapResult = tracker.map(pos)
|
||||
|
||||
if (mapResult.deleted) {
|
||||
|
@ -137,7 +142,8 @@ export const Figure = Node.create<FigureOptions>({
|
|||
},
|
||||
content: [{ type: 'text', text: node.attrs.src }]
|
||||
})
|
||||
})
|
||||
}
|
||||
)
|
||||
},
|
||||
figureToImage:
|
||||
() =>
|
||||
|
@ -153,7 +159,12 @@ export const Figure = Node.create<FigureOptions>({
|
|||
|
||||
const tracker = new Tracker(tr)
|
||||
|
||||
return commands.forEach(figures, ({ node, pos }) => {
|
||||
return commands.forEach(
|
||||
// eslint-disable-next-line unicorn/no-array-callback-reference
|
||||
figures,
|
||||
// eslint-disable-next-line unicorn/no-array-method-this-argument
|
||||
({ node, pos }) => {
|
||||
// eslint-disable-next-line unicorn/no-array-callback-reference
|
||||
const mapResult = tracker.map(pos)
|
||||
|
||||
if (mapResult.deleted) {
|
||||
|
@ -171,7 +182,8 @@ export const Figure = Node.create<FigureOptions>({
|
|||
src: node.attrs.src
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { Extension } from '@tiptap/core'
|
||||
import { Plugin, PluginKey } from '@tiptap/pm/state'
|
||||
|
||||
// @ts-ignore
|
||||
function nodeEqualsType({ types, node }) {
|
||||
return (Array.isArray(types) && types.includes(node.type)) || node.type === types
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import { showModal, useWarningsStore } from '../../stores/ui'
|
|||
import { ShowOnlyOnClient } from '../_shared/ShowOnlyOnClient'
|
||||
import { useSession } from '../../context/session'
|
||||
import { useLocalize } from '../../context/localize'
|
||||
import { getPagePath, openPage } from '@nanostores/router'
|
||||
import { getPagePath } from '@nanostores/router'
|
||||
import { Button } from '../_shared/Button'
|
||||
import { useEditorContext } from '../../context/editor'
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import { openPage } from '@nanostores/router'
|
|||
import { router } from '../../../stores/router'
|
||||
|
||||
export const DraftsView = () => {
|
||||
const { isAuthenticated, isSessionLoaded, user } = useSession()
|
||||
const { isAuthenticated, isSessionLoaded } = useSession()
|
||||
|
||||
const [drafts, setDrafts] = createSignal<Shout[]>([])
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
.shoutCardCoverContainer {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
.shoutCardCover {
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
|
|
|
@ -38,7 +38,6 @@ export const EditView = (props: EditViewProps) => {
|
|||
formErrors,
|
||||
actions: { setForm, setFormErrors }
|
||||
} = useEditorContext()
|
||||
const [isSlugChanged, setIsSlugChanged] = createSignal(false)
|
||||
|
||||
setForm({
|
||||
shoutId: props.shout.id,
|
||||
|
@ -78,10 +77,6 @@ export const EditView = (props: EditViewProps) => {
|
|||
|
||||
const handleSlugInputChange = (e) => {
|
||||
const slug = e.currentTarget.value
|
||||
|
||||
if (slug !== form.slug) {
|
||||
setIsSlugChanged(true)
|
||||
}
|
||||
setForm('slug', slug)
|
||||
}
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import { For, createSignal, Show, onMount } from 'solid-js'
|
|||
import { clsx } from 'clsx'
|
||||
import styles from './Settings.module.scss'
|
||||
import { useProfileForm } from '../../context/profile'
|
||||
import validateUrl from '../../utils/validateUrl'
|
||||
import { validateUrl } from '../../utils/validateUrl'
|
||||
import { createFileUploader } from '@solid-primitives/upload'
|
||||
import { Loading } from '../../components/_shared/Loading'
|
||||
import { useSession } from '../../context/session'
|
||||
|
|
|
@ -853,6 +853,7 @@ details {
|
|||
|
||||
.description {
|
||||
@include font-size(1.4rem);
|
||||
|
||||
color: rgba(0 0 0 / 40%);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
const validateUrl = (value: string) => {
|
||||
export const validateUrl = (value: string) => {
|
||||
return /^(http|https):\/\/[^ "]+$/.test(value)
|
||||
}
|
||||
|
||||
export default validateUrl
|
||||
|
|
Loading…
Reference in New Issue
Block a user