* WIP

* WIP

* lint

* package-lock.json

* test

* test

* meta tags fixed

* dynamic titles fix

---------

Co-authored-by: Igor Lobanov <igor.lobanov@onetwotrip.com>
This commit is contained in:
Kosta 2023-11-14 12:45:44 +02:00 committed by GitHub
parent 37a8805b8a
commit d90572e243
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
57 changed files with 387 additions and 439 deletions

View File

@ -1,4 +1,5 @@
{
"*.{js,mjs,ts,tsx,json,scss,css,html}": "prettier --write",
"package.json": "sort-package-json"
"*.{js,ts,tsx,json,scss,css,html}": "prettier --write",
"package.json": "sort-package-json",
"public/locales/**/*.json": "sort-json"
}

View File

@ -1,6 +1,6 @@
{
"*.{js,mjs,ts,tsx,json,scss,css,html}": "prettier --write",
"*.{js,ts,tsx,json,scss,css,html}": "prettier --write",
"package.json": "sort-package-json",
"*.{scss,css}": "stylelint",
"*.{ts,tsx,js,mjs}": "eslint --fix"
"*.{ts,tsx,js}": "eslint --fix"
}

436
package-lock.json generated
View File

@ -16,7 +16,7 @@
"mailgun.js": "8.2.1"
},
"devDependencies": {
"@babel/core": "7.21.8",
"@babel/core": "7.23.3",
"@graphql-codegen/cli": "5.0.0",
"@graphql-codegen/typescript": "4.0.1",
"@graphql-codegen/typescript-operations": "4.0.1",
@ -25,8 +25,8 @@
"@graphql-tools/url-loader": "7.17.18",
"@graphql-typed-document-node/core": "3.2.0",
"@hocuspocus/provider": "2.0.6",
"@nanostores/router": "0.8.3",
"@nanostores/solid": "0.3.2",
"@nanostores/router": "0.11.0",
"@nanostores/solid": "0.4.2",
"@popperjs/core": "2.11.8",
"@sentry/browser": "5.30.0",
"@solid-primitives/media": "2.2.3",
@ -34,7 +34,7 @@
"@solid-primitives/share": "2.0.4",
"@solid-primitives/storage": "1.3.9",
"@solid-primitives/upload": "0.0.110",
"@solidjs/meta": "0.28.2",
"@solidjs/meta": "0.29.1",
"@thisbeyond/solid-select": "0.14.0",
"@tiptap/core": "2.0.3",
"@tiptap/extension-blockquote": "2.0.3",
@ -65,10 +65,10 @@
"@tiptap/extension-text": "2.0.3",
"@tiptap/extension-underline": "2.0.3",
"@tiptap/extension-youtube": "2.0.3",
"@types/js-cookie": "3.0.5",
"@types/node": "20.8.10",
"@typescript-eslint/eslint-plugin": "6.9.1",
"@typescript-eslint/parser": "6.9.1",
"@types/js-cookie": "3.0.6",
"@types/node": "20.9.0",
"@typescript-eslint/eslint-plugin": "6.10.0",
"@typescript-eslint/parser": "6.10.0",
"@urql/core": "3.2.2",
"@urql/devtools": "2.0.3",
"babel-preset-solid": "1.8.4",
@ -94,11 +94,11 @@
"javascript-time-ago": "2.5.9",
"jest": "29.7.0",
"js-cookie": "3.0.5",
"lint-staged": "15.0.2",
"lint-staged": "15.1.0",
"loglevel": "1.8.1",
"loglevel-plugin-prefix": "0.8.4",
"nanostores": "0.7.4",
"prettier": "3.0.3",
"nanostores": "0.9.5",
"prettier": "3.1.0",
"prettier-eslint": "16.1.2",
"prosemirror-history": "1.3.0",
"prosemirror-trailing-node": "2.0.3",
@ -109,17 +109,18 @@
"solid-popper": "0.3.0",
"solid-tiptap": "0.6.0",
"solid-transition-group": "0.2.3",
"sort-json": "2.0.1",
"sort-package-json": "2.6.0",
"stylelint": "15.11.0",
"stylelint-config-standard-scss": "11.1.0",
"stylelint-order": "6.0.3",
"stylelint-scss": "5.3.0",
"stylelint-scss": "5.3.1",
"swiper": "9.4.1",
"throttle-debounce": "5.0.0",
"typescript": "5.2.2",
"typograf": "7.1.0",
"uniqolor": "1.1.0",
"vike": "0.4.144",
"vike": "0.4.145",
"vite": "4.5.0",
"vite-plugin-mkcert": "1.16.0",
"vite-plugin-sass-dts": "1.3.11",
@ -399,26 +400,26 @@
}
},
"node_modules/@babel/core": {
"version": "7.21.8",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.8.tgz",
"integrity": "sha512-YeM22Sondbo523Sz0+CirSPnbj9bG3P0CdHcBZdqUuaeOaYEFbOLoGU7lebvGP6P5J/WE9wOn7u7C4J9HvS1xQ==",
"version": "7.23.3",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.3.tgz",
"integrity": "sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==",
"dev": true,
"dependencies": {
"@ampproject/remapping": "^2.2.0",
"@babel/code-frame": "^7.21.4",
"@babel/generator": "^7.21.5",
"@babel/helper-compilation-targets": "^7.21.5",
"@babel/helper-module-transforms": "^7.21.5",
"@babel/helpers": "^7.21.5",
"@babel/parser": "^7.21.8",
"@babel/template": "^7.20.7",
"@babel/traverse": "^7.21.5",
"@babel/types": "^7.21.5",
"convert-source-map": "^1.7.0",
"@babel/code-frame": "^7.22.13",
"@babel/generator": "^7.23.3",
"@babel/helper-compilation-targets": "^7.22.15",
"@babel/helper-module-transforms": "^7.23.3",
"@babel/helpers": "^7.23.2",
"@babel/parser": "^7.23.3",
"@babel/template": "^7.22.15",
"@babel/traverse": "^7.23.3",
"@babel/types": "^7.23.3",
"convert-source-map": "^2.0.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.2",
"json5": "^2.2.2",
"semver": "^6.3.0"
"json5": "^2.2.3",
"semver": "^6.3.1"
},
"engines": {
"node": ">=6.9.0"
@ -3181,42 +3182,6 @@
"graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
}
},
"node_modules/@graphql-tools/graphql-tag-pluck/node_modules/@babel/core": {
"version": "7.23.3",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.3.tgz",
"integrity": "sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==",
"dev": true,
"dependencies": {
"@ampproject/remapping": "^2.2.0",
"@babel/code-frame": "^7.22.13",
"@babel/generator": "^7.23.3",
"@babel/helper-compilation-targets": "^7.22.15",
"@babel/helper-module-transforms": "^7.23.3",
"@babel/helpers": "^7.23.2",
"@babel/parser": "^7.23.3",
"@babel/template": "^7.22.15",
"@babel/traverse": "^7.23.3",
"@babel/types": "^7.23.3",
"convert-source-map": "^2.0.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.2",
"json5": "^2.2.3",
"semver": "^6.3.1"
},
"engines": {
"node": ">=6.9.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/babel"
}
},
"node_modules/@graphql-tools/graphql-tag-pluck/node_modules/convert-source-map": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
"integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
"dev": true
},
"node_modules/@graphql-tools/import": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/@graphql-tools/import/-/import-7.0.0.tgz",
@ -4474,12 +4439,6 @@
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true
},
"node_modules/@jest/transform/node_modules/convert-source-map": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
"integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
"dev": true
},
"node_modules/@jest/transform/node_modules/has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
@ -4706,36 +4665,6 @@
"node": "^12.16.0 || >=13.7.0"
}
},
"node_modules/@linaria/utils/node_modules/@babel/core": {
"version": "7.23.3",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.3.tgz",
"integrity": "sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==",
"dev": true,
"dependencies": {
"@ampproject/remapping": "^2.2.0",
"@babel/code-frame": "^7.22.13",
"@babel/generator": "^7.23.3",
"@babel/helper-compilation-targets": "^7.22.15",
"@babel/helper-module-transforms": "^7.23.3",
"@babel/helpers": "^7.23.2",
"@babel/parser": "^7.23.3",
"@babel/template": "^7.22.15",
"@babel/traverse": "^7.23.3",
"@babel/types": "^7.23.3",
"convert-source-map": "^2.0.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.2",
"json5": "^2.2.3",
"semver": "^6.3.1"
},
"engines": {
"node": ">=6.9.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/babel"
}
},
"node_modules/@linaria/utils/node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
@ -4745,12 +4674,6 @@
"balanced-match": "^1.0.0"
}
},
"node_modules/@linaria/utils/node_modules/convert-source-map": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
"integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
"dev": true
},
"node_modules/@linaria/utils/node_modules/minimatch": {
"version": "9.0.3",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
@ -4767,25 +4690,31 @@
}
},
"node_modules/@nanostores/router": {
"version": "0.8.3",
"resolved": "https://registry.npmjs.org/@nanostores/router/-/router-0.8.3.tgz",
"integrity": "sha512-AEGqyQQITIYgp232mIzwaG1wbP0yghCbEUi4ziy4kQaEfM8mRiaz/rrlnbDddd0MkwDZIWs3L3c3VodR5X9dUQ==",
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/@nanostores/router/-/router-0.11.0.tgz",
"integrity": "sha512-QlcneDqXVIsQL3agOS59d9gJQ/9M3qyVOWVttARL5Xvpmovtq91oOYcQxKbLq9i7iitGs5yDJmabe/O3QjWddQ==",
"dev": true,
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"engines": {
"node": "^14.0.0 || ^16.0.0 || >=18.0.0"
"node": "^16.0.0 || ^18.0.0 || >=20.0.0"
},
"peerDependencies": {
"nanostores": "^0.7.0"
"nanostores": "^0.9.0"
}
},
"node_modules/@nanostores/solid": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@nanostores/solid/-/solid-0.3.2.tgz",
"integrity": "sha512-OH4m81Bls8NCH2ANzqEujPvzzzLlunm0e6Vpqy9mMgBYzOcqxWr3SrZgIVA7KhMsjftINwcpMN7/FKo2MQa1aQ==",
"version": "0.4.2",
"resolved": "https://registry.npmjs.org/@nanostores/solid/-/solid-0.4.2.tgz",
"integrity": "sha512-8v32+C9KdRbnvP4x4Oiw/CtL1tZwbRxYfmFsPIY9PXevCgxSFnicG6VnLLtNAR7F0kl8Ec7OROHO34Ffv0KDzg==",
"dev": true,
"peerDependencies": {
"nanostores": "^0.7.0",
"solid-js": ">=1.4.0"
"nanostores": ">=0.8.0",
"solid-js": "^1.6.0"
}
},
"node_modules/@nodelib/fs.scandir": {
@ -5412,12 +5341,12 @@
}
},
"node_modules/@solidjs/meta": {
"version": "0.28.2",
"resolved": "https://registry.npmjs.org/@solidjs/meta/-/meta-0.28.2.tgz",
"integrity": "sha512-avlLgBPdk4KVxzRGFlYp/MIJo8B5jVgXPgk6OUnUP8km21Z+ovO+DUd7ZPA7ejv8PBdWi9GE3zCzw8RU2YuV2Q==",
"version": "0.29.1",
"resolved": "https://registry.npmjs.org/@solidjs/meta/-/meta-0.29.1.tgz",
"integrity": "sha512-qtrBYCnRRuzyvBg/u/SRO/2fM5r6DT1YKf+2W1RZhveMoeXHbZpWIrXjgpLFRHJLn6cqAGqrIzu42qS2o+1hKQ==",
"dev": true,
"peerDependencies": {
"solid-js": ">=1.4.0"
"solid-js": ">=1.8.4"
}
},
"node_modules/@thisbeyond/solid-select": {
@ -5934,9 +5863,9 @@
}
},
"node_modules/@types/js-cookie": {
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/@types/js-cookie/-/js-cookie-3.0.5.tgz",
"integrity": "sha512-dtLshqoiGRDHbHueIT9sjkd2F4tW1qPSX2xKAQK8p1e6pM+Z913GM1shv7dOqqasEMYbC5zEaClJomQe8OtQLA==",
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/@types/js-cookie/-/js-cookie-3.0.6.tgz",
"integrity": "sha512-wkw9yd1kEXOPnvEeEV1Go1MmxtBJL0RR79aOTAApecWFVu7w0NNXNqhcWgvw2YgZDYadliXkl14pa3WXw5jlCQ==",
"dev": true
},
"node_modules/@types/js-yaml": {
@ -5970,9 +5899,9 @@
"dev": true
},
"node_modules/@types/node": {
"version": "20.8.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.10.tgz",
"integrity": "sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w==",
"version": "20.9.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz",
"integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==",
"dev": true,
"dependencies": {
"undici-types": "~5.26.4"
@ -6039,16 +5968,16 @@
"dev": true
},
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "6.9.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.9.1.tgz",
"integrity": "sha512-w0tiiRc9I4S5XSXXrMHOWgHgxbrBn1Ro+PmiYhSg2ZVdxrAJtQgzU5o2m1BfP6UOn7Vxcc6152vFjQfmZR4xEg==",
"version": "6.10.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.10.0.tgz",
"integrity": "sha512-uoLj4g2OTL8rfUQVx2AFO1hp/zja1wABJq77P6IclQs6I/m9GLrm7jCdgzZkvWdDCQf1uEvoa8s8CupsgWQgVg==",
"dev": true,
"dependencies": {
"@eslint-community/regexpp": "^4.5.1",
"@typescript-eslint/scope-manager": "6.9.1",
"@typescript-eslint/type-utils": "6.9.1",
"@typescript-eslint/utils": "6.9.1",
"@typescript-eslint/visitor-keys": "6.9.1",
"@typescript-eslint/scope-manager": "6.10.0",
"@typescript-eslint/type-utils": "6.10.0",
"@typescript-eslint/utils": "6.10.0",
"@typescript-eslint/visitor-keys": "6.10.0",
"debug": "^4.3.4",
"graphemer": "^1.4.0",
"ignore": "^5.2.4",
@ -6107,15 +6036,15 @@
"dev": true
},
"node_modules/@typescript-eslint/parser": {
"version": "6.9.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.9.1.tgz",
"integrity": "sha512-C7AK2wn43GSaCUZ9do6Ksgi2g3mwFkMO3Cis96kzmgudoVaKyt62yNzJOktP0HDLb/iO2O0n2lBOzJgr6Q/cyg==",
"version": "6.10.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.10.0.tgz",
"integrity": "sha512-+sZwIj+s+io9ozSxIWbNB5873OSdfeBEH/FR0re14WLI6BaKuSOnnwCJ2foUiu8uXf4dRp1UqHP0vrZ1zXGrog==",
"dev": true,
"dependencies": {
"@typescript-eslint/scope-manager": "6.9.1",
"@typescript-eslint/types": "6.9.1",
"@typescript-eslint/typescript-estree": "6.9.1",
"@typescript-eslint/visitor-keys": "6.9.1",
"@typescript-eslint/scope-manager": "6.10.0",
"@typescript-eslint/types": "6.10.0",
"@typescript-eslint/typescript-estree": "6.10.0",
"@typescript-eslint/visitor-keys": "6.10.0",
"debug": "^4.3.4"
},
"engines": {
@ -6135,13 +6064,13 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "6.9.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.9.1.tgz",
"integrity": "sha512-38IxvKB6NAne3g/+MyXMs2Cda/Sz+CEpmm+KLGEM8hx/CvnSRuw51i8ukfwB/B/sESdeTGet1NH1Wj7I0YXswg==",
"version": "6.10.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.10.0.tgz",
"integrity": "sha512-TN/plV7dzqqC2iPNf1KrxozDgZs53Gfgg5ZHyw8erd6jd5Ta/JIEcdCheXFt9b1NYb93a1wmIIVW/2gLkombDg==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.9.1",
"@typescript-eslint/visitor-keys": "6.9.1"
"@typescript-eslint/types": "6.10.0",
"@typescript-eslint/visitor-keys": "6.10.0"
},
"engines": {
"node": "^16.0.0 || >=18.0.0"
@ -6152,13 +6081,13 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
"version": "6.9.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.9.1.tgz",
"integrity": "sha512-eh2oHaUKCK58qIeYp19F5V5TbpM52680sB4zNSz29VBQPTWIlE/hCj5P5B1AChxECe/fmZlspAWFuRniep1Skg==",
"version": "6.10.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.10.0.tgz",
"integrity": "sha512-wYpPs3hgTFblMYwbYWPT3eZtaDOjbLyIYuqpwuLBBqhLiuvJ+9sEp2gNRJEtR5N/c9G1uTtQQL5AhV0fEPJYcg==",
"dev": true,
"dependencies": {
"@typescript-eslint/typescript-estree": "6.9.1",
"@typescript-eslint/utils": "6.9.1",
"@typescript-eslint/typescript-estree": "6.10.0",
"@typescript-eslint/utils": "6.10.0",
"debug": "^4.3.4",
"ts-api-utils": "^1.0.1"
},
@ -6179,9 +6108,9 @@
}
},
"node_modules/@typescript-eslint/types": {
"version": "6.9.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.9.1.tgz",
"integrity": "sha512-BUGslGOb14zUHOUmDB2FfT6SI1CcZEJYfF3qFwBeUrU6srJfzANonwRYHDpLBuzbq3HaoF2XL2hcr01c8f8OaQ==",
"version": "6.10.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.10.0.tgz",
"integrity": "sha512-36Fq1PWh9dusgo3vH7qmQAj5/AZqARky1Wi6WpINxB6SkQdY5vQoT2/7rW7uBIsPDcvvGCLi4r10p0OJ7ITAeg==",
"dev": true,
"engines": {
"node": "^16.0.0 || >=18.0.0"
@ -6192,13 +6121,13 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "6.9.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.9.1.tgz",
"integrity": "sha512-U+mUylTHfcqeO7mLWVQ5W/tMLXqVpRv61wm9ZtfE5egz7gtnmqVIw9ryh0mgIlkKk9rZLY3UHygsBSdB9/ftyw==",
"version": "6.10.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.10.0.tgz",
"integrity": "sha512-ek0Eyuy6P15LJVeghbWhSrBCj/vJpPXXR+EpaRZqou7achUWL8IdYnMSC5WHAeTWswYQuP2hAZgij/bC9fanBg==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.9.1",
"@typescript-eslint/visitor-keys": "6.9.1",
"@typescript-eslint/types": "6.10.0",
"@typescript-eslint/visitor-keys": "6.10.0",
"debug": "^4.3.4",
"globby": "^11.1.0",
"is-glob": "^4.0.3",
@ -6252,17 +6181,17 @@
"dev": true
},
"node_modules/@typescript-eslint/utils": {
"version": "6.9.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.9.1.tgz",
"integrity": "sha512-L1T0A5nFdQrMVunpZgzqPL6y2wVreSyHhKGZryS6jrEN7bD9NplVAyMryUhXsQ4TWLnZmxc2ekar/lSGIlprCA==",
"version": "6.10.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.10.0.tgz",
"integrity": "sha512-v+pJ1/RcVyRc0o4wAGux9x42RHmAjIGzPRo538Z8M1tVx6HOnoQBCX/NoadHQlZeC+QO2yr4nNSFWOoraZCAyg==",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
"@types/json-schema": "^7.0.12",
"@types/semver": "^7.5.0",
"@typescript-eslint/scope-manager": "6.9.1",
"@typescript-eslint/types": "6.9.1",
"@typescript-eslint/typescript-estree": "6.9.1",
"@typescript-eslint/scope-manager": "6.10.0",
"@typescript-eslint/types": "6.10.0",
"@typescript-eslint/typescript-estree": "6.10.0",
"semver": "^7.5.4"
},
"engines": {
@ -6310,12 +6239,12 @@
"dev": true
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "6.9.1",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.9.1.tgz",
"integrity": "sha512-MUaPUe/QRLEffARsmNfmpghuQkW436DvESW+h+M52w0coICHRfD6Np9/K6PdACwnrq1HmuLl+cSPZaJmeVPkSw==",
"version": "6.10.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.10.0.tgz",
"integrity": "sha512-xMGluxQIEtOM7bqFCo+rCMh5fqI+ZxV5RUUOa29iVPz1OgCZrtc7rFnz5cLUazlkPKYqX+75iuDq7m0HQ48nCg==",
"dev": true,
"dependencies": {
"@typescript-eslint/types": "6.9.1",
"@typescript-eslint/types": "6.10.0",
"eslint-visitor-keys": "^3.4.1"
},
"engines": {
@ -7387,9 +7316,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001561",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001561.tgz",
"integrity": "sha512-NTt0DNoKe958Q0BE0j0c1V9jbUzhBxHIEJy7asmGrpE0yG63KTV7PLHPnK2E1O9RsQrQ081I3NLuXGS6zht3cw==",
"version": "1.0.30001562",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001562.tgz",
"integrity": "sha512-kfte3Hym//51EdX4239i+Rmp20EsLIYGdPkERegTgU19hQWCRhsRFGKHTliUlsry53tv17K7n077Kqa0WJU4ng==",
"dev": true,
"funding": [
{
@ -7807,9 +7736,9 @@
}
},
"node_modules/convert-source-map": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz",
"integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==",
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
"integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
"dev": true
},
"node_modules/cosmiconfig": {
@ -8342,9 +8271,9 @@
}
},
"node_modules/electron-to-chromium": {
"version": "1.4.581",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.581.tgz",
"integrity": "sha512-6uhqWBIapTJUxgPTCHH9sqdbxIMPt7oXl0VcAL1kOtlU6aECdcMncCrX5Z7sHQ/invtrC9jUQUef7+HhO8vVFw==",
"version": "1.4.582",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.582.tgz",
"integrity": "sha512-89o0MGoocwYbzqUUjc+VNpeOFSOK9nIdC5wY4N+PVUarUK0MtjyTjks75AZS2bW4Kl8MdewdFsWaH0jLy+JNoA==",
"dev": true
},
"node_modules/emittery": {
@ -13680,9 +13609,9 @@
}
},
"node_modules/jose": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/jose/-/jose-5.1.0.tgz",
"integrity": "sha512-H+RVqxA6apaJ0rcQYupKYhos7uosAiF42gUcWZiwhICWMphDULFj/CRr1R0tV/JCv9DEeJaSyYYpc9luHHNT4g==",
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/jose/-/jose-5.1.1.tgz",
"integrity": "sha512-bfB+lNxowY49LfrBO0ITUn93JbUhxUN8I11K6oI5hJu/G6PO6fEUddVLjqdD0cQ9SXIHWXuWh7eJYwZF7Z0N/g==",
"dev": true,
"funding": {
"url": "https://github.com/sponsors/panva"
@ -13758,12 +13687,18 @@
"dev": true
},
"node_modules/json-stable-stringify": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.2.tgz",
"integrity": "sha512-eunSSaEnxV12z+Z73y/j5N37/In40GK4GmsSy+tEHJMxknvqnA7/djeYtAgW0GsWHUfg+847WJjKaEylk2y09g==",
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.1.0.tgz",
"integrity": "sha512-zfA+5SuwYN2VWqN1/5HZaDzQKLJHaBVMZIIM+wuYjdptkaQsqzDdqjqf+lZZJUuJq1aanHiY8LhH8LmH+qBYJA==",
"dev": true,
"dependencies": {
"jsonify": "^0.0.1"
"call-bind": "^1.0.5",
"isarray": "^2.0.5",
"jsonify": "^0.0.1",
"object-keys": "^1.1.1"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
@ -13967,9 +13902,9 @@
"dev": true
},
"node_modules/lint-staged": {
"version": "15.0.2",
"resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.0.2.tgz",
"integrity": "sha512-vnEy7pFTHyVuDmCAIFKR5QDO8XLVlPFQQyujQ/STOxe40ICWqJ6knS2wSJ/ffX/Lw0rz83luRDh+ET7toN+rOw==",
"version": "15.1.0",
"resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.1.0.tgz",
"integrity": "sha512-ZPKXWHVlL7uwVpy8OZ7YQjYDAuO5X4kMh0XgZvPNxLcCCngd0PO5jKQyy3+s4TL2EnHoIXIzP1422f/l3nZKMw==",
"dev": true,
"dependencies": {
"chalk": "5.3.0",
@ -13981,7 +13916,7 @@
"micromatch": "4.0.5",
"pidtree": "0.6.0",
"string-argv": "0.3.2",
"yaml": "2.3.3"
"yaml": "2.3.4"
},
"bin": {
"lint-staged": "bin/lint-staged.js"
@ -14380,15 +14315,6 @@
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
"node_modules/lint-staged/node_modules/yaml": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.3.tgz",
"integrity": "sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==",
"dev": true,
"engines": {
"node": ">= 14"
}
},
"node_modules/listr2": {
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/listr2/-/listr2-4.0.5.tgz",
@ -15233,12 +15159,18 @@
}
},
"node_modules/nanostores": {
"version": "0.7.4",
"resolved": "https://registry.npmjs.org/nanostores/-/nanostores-0.7.4.tgz",
"integrity": "sha512-MBeUVt7NBcXqh7AGT+KSr3O0X/995CZsvcP2QEMP+PXFwb07qv3Vjyq+EX0yS8f12Vv3Tn2g/BvK/OZoMhJlOQ==",
"version": "0.9.5",
"resolved": "https://registry.npmjs.org/nanostores/-/nanostores-0.9.5.tgz",
"integrity": "sha512-Z+p+g8E7yzaWwOe5gEUB2Ox0rCEeXWYIZWmYvw/ajNYX8DlXdMvMDj8DWfM/subqPAcsf8l8Td4iAwO1DeIIRQ==",
"dev": true,
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"engines": {
"node": "^14.0.0 || ^16.0.0 || >=18.0.0"
"node": "^16.0.0 || ^18.0.0 || >=20.0.0"
}
},
"node_modules/natural-compare": {
@ -16057,9 +15989,9 @@
}
},
"node_modules/prettier": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz",
"integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==",
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.0.tgz",
"integrity": "sha512-TQLvXjq5IAibjh8EpBIkNKxO749UEWABoiIZehEPiY4GNpVdhaFKqSTu+QrlU6D2dPAfubRmtJTi4K4YkQ5eXw==",
"dev": true,
"bin": {
"prettier": "bin/prettier.cjs"
@ -17321,6 +17253,38 @@
"solid-js": "^1.6.12"
}
},
"node_modules/sort-json": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/sort-json/-/sort-json-2.0.1.tgz",
"integrity": "sha512-s8cs2bcsQCzo/P2T/uoU6Js4dS/jnX8+4xunziNoq9qmSpZNCrRIAIvp4avsz0ST18HycV4z/7myJ7jsHWB2XQ==",
"dev": true,
"dependencies": {
"detect-indent": "^5.0.0",
"detect-newline": "^2.1.0",
"minimist": "^1.2.0"
},
"bin": {
"sort-json": "app/cmd.js"
}
},
"node_modules/sort-json/node_modules/detect-indent": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz",
"integrity": "sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g==",
"dev": true,
"engines": {
"node": ">=4"
}
},
"node_modules/sort-json/node_modules/detect-newline": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz",
"integrity": "sha512-CwffZFvlJffUg9zZA0uqrjQayUTC8ob94pnr5sFwaVv3IOmkfUHcWH+jXaQK3askE51Cqe8/9Ql/0uXNwqZ8Zg==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/sort-object-keys": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/sort-object-keys/-/sort-object-keys-1.1.3.tgz",
@ -17817,12 +17781,12 @@
}
},
"node_modules/stylelint-scss": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-5.3.0.tgz",
"integrity": "sha512-Sc7S1uWqStMc99NREsHNxpxHHFRvjo2pWILNl/UCwWO8PxhODK8qbJH0GHWIALxl6BD5rwJL4cSm4jk36hi6fg==",
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/stylelint-scss/-/stylelint-scss-5.3.1.tgz",
"integrity": "sha512-5I9ZDIm77BZrjOccma5WyW2nJEKjXDd4Ca8Kk+oBapSO4pewSlno3n+OyimcyVJJujQZkBN2D+xuMkIamSc6hA==",
"dev": true,
"dependencies": {
"known-css-properties": "^0.28.0",
"known-css-properties": "^0.29.0",
"postcss-media-query-parser": "^0.2.3",
"postcss-resolve-nested-selector": "^0.1.1",
"postcss-selector-parser": "^6.0.13",
@ -17833,9 +17797,9 @@
}
},
"node_modules/stylelint-scss/node_modules/known-css-properties": {
"version": "0.28.0",
"resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.28.0.tgz",
"integrity": "sha512-9pSL5XB4J+ifHP0e0jmmC98OGC1nL8/JjS+fi6mnTlIf//yt/MfVLtKg7S6nCtj/8KTcWX7nRlY0XywoYY1ISQ==",
"version": "0.29.0",
"resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.29.0.tgz",
"integrity": "sha512-Ne7wqW7/9Cz54PDt4I3tcV+hAyat8ypyOGzYRJQfdxnnjeWsTxt1cy8pjvvKeI5kfXuyvULyeeAvwvvtAX3ayQ==",
"dev": true
},
"node_modules/stylelint/node_modules/balanced-match": {
@ -18606,12 +18570,6 @@
"node": ">=10.12.0"
}
},
"node_modules/v8-to-istanbul/node_modules/convert-source-map": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
"integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
"dev": true
},
"node_modules/validate-html-nesting": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/validate-html-nesting/-/validate-html-nesting-1.2.2.tgz",
@ -18638,13 +18596,13 @@
}
},
"node_modules/vike": {
"version": "0.4.144",
"resolved": "https://registry.npmjs.org/vike/-/vike-0.4.144.tgz",
"integrity": "sha512-smvBXv33IhP5FHOvoBYZuir/Zip93AoBGqiIdmWHva1RYeQDFlXQMbs/YZ5HqFc7OrL8cL3K7iUsEC6t/pF+/Q==",
"version": "0.4.145",
"resolved": "https://registry.npmjs.org/vike/-/vike-0.4.145.tgz",
"integrity": "sha512-FPYM69bRC4ilzP2lLEzXxpa8Q3lxNKUtp1h6LaFh+lROzhf9e88TTXEnZTQi7iBUsiJqBjxm+fXUGkz6BOccnw==",
"dev": true,
"dependencies": {
"@brillout/import": "0.2.3",
"@brillout/json-serializer": "^0.5.6",
"@brillout/json-serializer": "^0.5.8",
"@brillout/picocolors": "^1.0.9",
"@brillout/require-shim": "^0.1.2",
"@brillout/vite-plugin-import-build": "^0.2.20",
@ -18792,42 +18750,6 @@
"vite": "^3.0.0 || ^4.0.0"
}
},
"node_modules/vite-plugin-solid/node_modules/@babel/core": {
"version": "7.23.3",
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.3.tgz",
"integrity": "sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==",
"dev": true,
"dependencies": {
"@ampproject/remapping": "^2.2.0",
"@babel/code-frame": "^7.22.13",
"@babel/generator": "^7.23.3",
"@babel/helper-compilation-targets": "^7.22.15",
"@babel/helper-module-transforms": "^7.23.3",
"@babel/helpers": "^7.23.2",
"@babel/parser": "^7.23.3",
"@babel/template": "^7.22.15",
"@babel/traverse": "^7.23.3",
"@babel/types": "^7.23.3",
"convert-source-map": "^2.0.0",
"debug": "^4.1.0",
"gensync": "^1.0.0-beta.2",
"json5": "^2.2.3",
"semver": "^6.3.1"
},
"engines": {
"node": ">=6.9.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/babel"
}
},
"node_modules/vite-plugin-solid/node_modules/convert-source-map": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
"integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
"dev": true
},
"node_modules/vite/node_modules/@esbuild/android-arm": {
"version": "0.18.20",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz",

View File

@ -37,7 +37,7 @@
"mailgun.js": "8.2.1"
},
"devDependencies": {
"@babel/core": "7.21.8",
"@babel/core": "7.23.3",
"@graphql-codegen/cli": "5.0.0",
"@graphql-codegen/typescript": "4.0.1",
"@graphql-codegen/typescript-operations": "4.0.1",
@ -46,8 +46,8 @@
"@graphql-tools/url-loader": "7.17.18",
"@graphql-typed-document-node/core": "3.2.0",
"@hocuspocus/provider": "2.0.6",
"@nanostores/router": "0.8.3",
"@nanostores/solid": "0.3.2",
"@nanostores/router": "0.11.0",
"@nanostores/solid": "0.4.2",
"@popperjs/core": "2.11.8",
"@sentry/browser": "5.30.0",
"@solid-primitives/media": "2.2.3",
@ -55,7 +55,7 @@
"@solid-primitives/share": "2.0.4",
"@solid-primitives/storage": "1.3.9",
"@solid-primitives/upload": "0.0.110",
"@solidjs/meta": "0.28.2",
"@solidjs/meta": "0.29.1",
"@thisbeyond/solid-select": "0.14.0",
"@tiptap/core": "2.0.3",
"@tiptap/extension-blockquote": "2.0.3",
@ -86,10 +86,10 @@
"@tiptap/extension-text": "2.0.3",
"@tiptap/extension-underline": "2.0.3",
"@tiptap/extension-youtube": "2.0.3",
"@types/js-cookie": "3.0.5",
"@types/node": "20.8.10",
"@typescript-eslint/eslint-plugin": "6.9.1",
"@typescript-eslint/parser": "6.9.1",
"@types/js-cookie": "3.0.6",
"@types/node": "20.9.0",
"@typescript-eslint/eslint-plugin": "6.10.0",
"@typescript-eslint/parser": "6.10.0",
"@urql/core": "3.2.2",
"@urql/devtools": "2.0.3",
"babel-preset-solid": "1.8.4",
@ -115,11 +115,11 @@
"javascript-time-ago": "2.5.9",
"jest": "29.7.0",
"js-cookie": "3.0.5",
"lint-staged": "15.0.2",
"lint-staged": "15.1.0",
"loglevel": "1.8.1",
"loglevel-plugin-prefix": "0.8.4",
"nanostores": "0.7.4",
"prettier": "3.0.3",
"nanostores": "0.9.5",
"prettier": "3.1.0",
"prettier-eslint": "16.1.2",
"prosemirror-history": "1.3.0",
"prosemirror-trailing-node": "2.0.3",
@ -130,17 +130,18 @@
"solid-popper": "0.3.0",
"solid-tiptap": "0.6.0",
"solid-transition-group": "0.2.3",
"sort-json": "2.0.1",
"sort-package-json": "2.6.0",
"stylelint": "15.11.0",
"stylelint-config-standard-scss": "11.1.0",
"stylelint-order": "6.0.3",
"stylelint-scss": "5.3.0",
"stylelint-scss": "5.3.1",
"swiper": "9.4.1",
"throttle-debounce": "5.0.0",
"typescript": "5.2.2",
"typograf": "7.1.0",
"uniqolor": "1.1.0",
"vike": "0.4.144",
"vike": "0.4.145",
"vite": "4.5.0",
"vite-plugin-mkcert": "1.16.0",
"vite-plugin-sass-dts": "1.3.11",

View File

@ -126,6 +126,7 @@
"FAQ": "Tips and suggestions",
"Favorite": "Favorites",
"Favorite topics": "Favorite topics",
"Feed": "Feed",
"Feed settings": "Feed settings",
"Feedback": "Feedback",
"Fill email": "Fill email",
@ -168,6 +169,7 @@
"I know the password": "I know the password",
"Image format not supported": "Image format not supported",
"In&nbsp;bookmarks, you can save favorite discussions and&nbsp;materials that you want to return to": "In&nbsp;bookmarks, you can save favorite discussions and&nbsp;materials that you want to return to",
"Inbox": "Inbox",
"Incut": "Incut",
"Independant magazine with an open horizontal cooperation about culture, science and society": "Independant magazine with an open horizontal cooperation about culture, science and society",
"Insert footnote": "Insert footnote",

View File

@ -130,6 +130,7 @@
"FAQ": "Советы и предложения",
"Favorite": "Избранное",
"Favorite topics": "Избранные темы",
"Feed": "Лента",
"Feed settings": "Настройки ленты",
"Feedback": "Обратная связь",
"Fill email": "Введите почту",
@ -175,6 +176,7 @@
"I know the password": "Я знаю пароль!",
"Image format not supported": "Тип изображения не поддерживается",
"In&nbsp;bookmarks, you can save favorite discussions and&nbsp;materials that you want to return to": "В&nbsp;закладках можно сохранять избранные дискуссии и&nbsp;материалы, к&nbsp;которым хочется вернуться",
"Inbox": "Входящие",
"Incut": "Подверстка",
"Independant magazine with an open horizontal cooperation about culture, science and society": "Независимый журнал с открытой горизонтальной редакцией о культуре, науке и обществе",
"Insert footnote": "Вставить сноску",

View File

@ -1,6 +1,3 @@
// FIXME: breaks on vercel, research
// import 'solid-devtools'
import { hideModal, MODALS, showModal } from '../stores/ui'
import { Component, createEffect, createMemo } from 'solid-js'
import { ROUTES, useRouter } from '../stores/router'
@ -41,6 +38,7 @@ import { LocalizeProvider } from '../context/localize'
import { ConfirmProvider } from '../context/confirm'
import { EditorProvider } from '../context/editor'
import { NotificationsProvider } from '../context/notifications'
import { Meta, MetaProvider } from '@solidjs/meta'
// TODO: lazy load
// const SomePage = lazy(() => import('./Pages/SomePage'))
@ -110,18 +108,21 @@ export const App = (props: PageProps) => {
})
return (
<LocalizeProvider>
<SnackbarProvider>
<ConfirmProvider>
<SessionProvider>
<NotificationsProvider>
<EditorProvider>
<Dynamic component={pageComponent()} {...props} />
</EditorProvider>
</NotificationsProvider>
</SessionProvider>
</ConfirmProvider>
</SnackbarProvider>
</LocalizeProvider>
<MetaProvider>
<Meta name="viewport" content="width=device-width, initial-scale=1" />
<LocalizeProvider>
<SnackbarProvider>
<ConfirmProvider>
<SessionProvider>
<NotificationsProvider>
<EditorProvider>
<Dynamic component={pageComponent()} {...props} />
</EditorProvider>
</NotificationsProvider>
</SessionProvider>
</ConfirmProvider>
</SnackbarProvider>
</LocalizeProvider>
</MetaProvider>
)
}

View File

@ -1,5 +1,5 @@
import { createEffect, For, createMemo, onMount, Show, createSignal, onCleanup } from 'solid-js'
import { Title } from '@solidjs/meta'
import { clsx } from 'clsx'
import { getPagePath } from '@nanostores/router'
import type { Author, Shout } from '../../graphql/types.gen'
@ -28,6 +28,7 @@ import { getImageUrl } from '../../utils/getImageUrl'
import { FeedArticlePopup } from '../Feed/FeedArticlePopup'
import { Lightbox } from '../_shared/Lightbox'
import { Image } from '../_shared/Image'
import article from '../Editor/extensions/Article'
type Props = {
article: Shout
@ -91,8 +92,13 @@ export const FullArticle = (props: Props) => {
}
return props.article.body
})
const media = createMemo(() => {
return JSON.parse(props.article.media || '[]')
const media = createMemo<MediaItem[]>(() => {
try {
return JSON.parse(props.article.media)
} catch {
return []
}
})
const commentsRef: {
@ -146,6 +152,10 @@ export const FullArticle = (props: Props) => {
setIsReactionsLoaded(true)
})
onMount(() => {
document.title = props.article.title
})
const clickHandlers = []
const documentClickHandlers = []
@ -249,7 +259,6 @@ export const FullArticle = (props: Props) => {
return (
<>
<Title>{props.article.title}</Title>
<div class="wide-container">
<div class="row position-relative">
<article

View File

@ -57,14 +57,6 @@ export const AuthorBadge = (props: Props) => {
})
}, 'discussions')
}
const subscribeValue = createMemo(() => {
if (props.iconButtons) {
return <Icon name="author-subscribe" class={stylesButton.icon} />
}
return isSubscribing() ? t('subscribing...') : t('Subscribe')
})
const unsubscribeValue = () => {}
return (
<div class={clsx(styles.AuthorBadge, { [styles.nameOnly]: props.nameOnly })}>
@ -118,7 +110,18 @@ export const AuthorBadge = (props: Props) => {
<Button
variant={props.iconButtons ? 'secondary' : 'bordered'}
size="M"
value={subscribeValue()}
value={
<Show
when={props.iconButtons}
fallback={
<Show when={isSubscribing()} fallback={t('Subscribe')}>
{t('subscribing...')}
</Show>
}
>
<Icon name="author-subscribe" class={stylesButton.icon} />
</Show>
}
onClick={() => handleSubscribe(true)}
isSubscribeButton={true}
class={clsx(styles.actionButton, {

View File

@ -24,7 +24,6 @@ import { apiClient } from '../../../utils/apiClient'
import { RANDOM_TOPICS_COUNT } from '../../Views/Home'
import { Link } from './Link'
import { Subscribe } from '../../_shared/Subscribe'
import { ShowOnlyOnClient } from '../../_shared/ShowOnlyOnClient'
type Props = {
title?: string

View File

@ -81,6 +81,10 @@ export const AuthorView = (props: Props) => {
setFollowing([...authors, ...topics])
})
onMount(() => {
document.title = author().name
})
const loadMore = async () => {
saveScrollPosition()
const { hasMore } = await loadShouts({

View File

@ -1,7 +1,7 @@
import { Accessor, createMemo, createSignal, onCleanup, onMount, Show } from 'solid-js'
import { useLocalize } from '../../context/localize'
import { clsx } from 'clsx'
import { Title } from '@solidjs/meta'
import type { Shout, Topic } from '../../graphql/types.gen'
import { useRouter } from '../../stores/router'
import { ShoutForm, useEditorContext } from '../../context/editor'
@ -171,26 +171,6 @@ export const EditView = (props: Props) => {
}
}
const pageTitle = () => {
switch (props.shout.layout as LayoutType) {
case 'music': {
return t('Publish Album')
}
case 'image': {
return t('Create gallery')
}
case 'video': {
return t('Create video')
}
case 'literature': {
return t('New literary work')
}
default: {
return t('Write an article')
}
}
}
let autoSaveTimeOutId
const autoSaveRecursive = () => {
@ -235,7 +215,6 @@ export const EditView = (props: Props) => {
return (
<>
<div class={styles.container}>
<Title>{pageTitle()}</Title>
<form>
<div class="wide-container">
<button

View File

@ -43,6 +43,10 @@ export const TopicView = (props: TopicProps) => {
const topic = createMemo(() => topicEntities()[props.topicSlug])
onMount(() => {
document.title = topic().title
})
const loadMore = async () => {
saveScrollPosition()

View File

@ -1,6 +1,6 @@
import { clsx } from 'clsx'
import styles from './Lightbox.module.scss'
import { createSignal, onCleanup, onMount } from 'solid-js'
import { createSignal } from 'solid-js'
import { Icon } from '../Icon'
import { useEscKeyDownHandler } from '../../../utils/useEscKeyDownHandler'

View File

@ -6,9 +6,10 @@ import { createEffect, createSignal, Show } from 'solid-js'
import { clsx } from 'clsx'
import '../../styles/app.scss'
import styles from './PageLayout.module.scss'
import { Meta } from '@solidjs/meta'
import { Title } from '@solidjs/meta'
type Props = {
title: string
headerTitle?: string
slug?: string
articleBody?: string
@ -34,7 +35,7 @@ export const PageLayout = (props: Props) => {
return (
<>
<Meta name="viewport" content="width=device-width, initial-scale=1" />
<Title>{props.title}</Title>
<Header
slug={props.slug}
title={props.headerTitle}

View File

@ -66,7 +66,7 @@ export const NotificationsProvider = (props: { children: JSX.Element }) => {
sseService.connect(`${apiBaseUrl}/subscribe/${user().id}`)
sseService.subscribeToEvent('message', (data: EventData) => {
if (data.type === 'newNotifications') {
loadNotifications({ limit: loadedNotificationsCount() })
loadNotifications({ limit: Math.max(PAGE_SIZE, loadedNotificationsCount()) })
} else {
console.error(`[NotificationsProvider] unknown message type: ${JSON.stringify(data)}`)
}

View File

@ -1,13 +1,11 @@
import { PageLayout } from '../../components/_shared/PageLayout'
import { useLocalize } from '../../context/localize'
import { Title } from '@solidjs/meta'
export const DiscussionRulesPage = () => {
const { t } = useLocalize()
const title = t('Discussion rules in social networks')
return (
<PageLayout>
<Title>{title}</Title>
<PageLayout title={title}>
<article class="wide-container container--static-page">
<div class="row">
<div class="col-md-12 col-xl-14 offset-md-5 order-md-first">

View File

@ -1,10 +1,11 @@
import { PageLayout } from '../../components/_shared/PageLayout'
import { useLocalize } from '../../context/localize'
// const title = t('Dogma')
// TODO: l10n
export const DogmaPage = () => {
const { t } = useLocalize()
return (
<PageLayout>
<PageLayout title={t('Dogma')}>
<article class="wide-container container--static-page">
<div class="row">
<div class="col-md-12 col-xl-14 offset-md-5 order-md-first">

View File

@ -13,7 +13,7 @@ export const GuidePage = () => {
const toggleIndexExpanded = () => setIndexExpanded((oldExpanded) => !oldExpanded)
return (
<PageLayout>
<PageLayout title={title}>
<Meta name="description" content={title} />
<Meta name="keywords" content={t('Discours') + ',' + title} />
<Meta property="og:title" content={title} />

View File

@ -2,7 +2,7 @@ import { createSignal, Show } from 'solid-js'
import { PageLayout } from '../../components/_shared/PageLayout'
import { Donate } from '../../components/Discours/Donate'
import { Icon } from '../../components/_shared/Icon'
import { Meta, Title } from '@solidjs/meta'
import { Meta } from '@solidjs/meta'
import { useLocalize } from '../../context/localize'
export const HelpPage = () => {
@ -12,9 +12,9 @@ export const HelpPage = () => {
const toggleIndexExpanded = () => setIndexExpanded((oldExpanded) => !oldExpanded)
// TODO: l10n
return (
<PageLayout>
<Title>{t('Support us')}</Title>
<PageLayout title={t('Support us')}>
<Meta name="description" content="Здесь можно поддержать Дискурс материально." />
<Meta name="keywords" content="Discours.io, помощь, благотворительность" />

View File

@ -5,16 +5,17 @@ import { Feedback } from '../../components/Discours/Feedback'
import { Subscribe } from '../../components/_shared/Subscribe'
import Opener from '../../components/Nav/Modal/Opener'
import { Icon } from '../../components/_shared/Icon'
// title={t('Manifest')}
import { useLocalize } from '../../context/localize'
export const ManifestPage = () => {
const [indexExpanded, setIndexExpanded] = createSignal(true)
const { t } = useLocalize()
const toggleIndexExpanded = () => setIndexExpanded((oldExpanded) => !oldExpanded)
return (
<PageLayout>
<PageLayout title={t('Manifest')}>
<Modal variant="wide" name="feedback">
<Feedback />
</Modal>

View File

@ -1,12 +1,10 @@
import { PageLayout } from '../../components/_shared/PageLayout'
import { useLocalize } from '../../context/localize'
import { Title } from '@solidjs/meta'
export const PartnersPage = () => {
const { t } = useLocalize()
return (
<PageLayout>
<Title>{t('Partners')}</Title>
<PageLayout title={t('Partners')}>
<article class="wide-container container--static-page">
<div class="row">
<div class="col-md-12 col-xl-14 offset-md-5 order-md-first">

View File

@ -1,4 +1,3 @@
import { Title } from '@solidjs/meta'
import { PageLayout } from '../../components/_shared/PageLayout'
import { useLocalize } from '../../context/localize'
@ -6,8 +5,7 @@ export const PrinciplesPage = () => {
const { t } = useLocalize()
return (
<PageLayout>
<Title>{t('Principles')}</Title>
<PageLayout title={t('Principles')}>
<article class="wide-container container--static-page">
<div class="row">
<div class="col-md-12 col-xl-14 offset-md-5 order-md-first">

View File

@ -1,12 +1,10 @@
import { Title } from '@solidjs/meta'
import { PageLayout } from '../../components/_shared/PageLayout'
import { useLocalize } from '../../context/localize'
export const ProjectsPage = () => {
const { t } = useLocalize()
return (
<PageLayout>
<Title>{t('Projects')}</Title>
<PageLayout title={t('Projects')}>
<article class="wide-container container--static-page">
<div class="row">
<div class="col-md-12 col-xl-14 offset-md-5 order-md-first">

View File

@ -2,7 +2,7 @@ import { createSignal, Show } from 'solid-js'
import { PageLayout } from '../../components/_shared/PageLayout'
import { Icon } from '../../components/_shared/Icon'
import { useLocalize } from '../../context/localize'
import { Meta, Title } from '@solidjs/meta'
import { Meta } from '@solidjs/meta'
export const TermsOfUsePage = () => {
const { t } = useLocalize()
@ -12,10 +12,9 @@ export const TermsOfUsePage = () => {
const title = t('Terms of use')
return (
<PageLayout>
<Title>{title}</Title>
<PageLayout title={title}>
<Meta name="description" content={title} />
<Meta name="keywords" content={`Discours.io, ${t('Terms of use')}, ${t('Terms of use', 'en')}`} />
<Meta name="keywords" content={`Discours.io, ${title}`} />
<Meta property="og:title" content={title} />
<Meta property="og:description" content={title} />
<article class="wide-container container--static-page">

View File

@ -1,4 +1,4 @@
import { Meta, Title } from '@solidjs/meta'
import { Meta } from '@solidjs/meta'
import { PageLayout } from '../../components/_shared/PageLayout'
import { useLocalize } from '../../context/localize'
@ -6,10 +6,9 @@ export const ThanksPage = () => {
const { t } = useLocalize()
const title = t('Thank you')
return (
<PageLayout>
<Title>{title}</Title>
<PageLayout title={title}>
<Meta name="description" content={title} />
<Meta name="keywords" content={`Discours.io, ${title}, ${t('Thank you', 'en')}`} />
<Meta name="keywords" content={`Discours.io, ${title}`} />
<Meta property="og:title" content={title} />
<Meta property="og:description" content={title} />
<article class="wide-container container--static-page">

View File

@ -5,7 +5,7 @@ import type { PageProps } from './types'
export const onBeforeRender = async (_pageContext: PageContext) => {
const allAuthors = await apiClient.getAllAuthors()
const pageProps: PageProps = { allAuthors }
const pageProps: PageProps = { allAuthors, seo: { title: '' } }
return {
pageContext: {

View File

@ -4,7 +4,7 @@ import type { PageProps } from './types'
import { createSignal, onMount, Show } from 'solid-js'
import { loadAllAuthors } from '../stores/zine/authors'
import { Loading } from '../components/_shared/Loading'
import { Title } from '@solidjs/meta'
import { useLocalize } from '../context/localize'
export const AllAuthorsPage = (props: PageProps) => {
@ -22,8 +22,7 @@ export const AllAuthorsPage = (props: PageProps) => {
})
return (
<PageLayout>
<Title>{t('Authors')}</Title>
<PageLayout title={t('Authors')}>
<Show when={isLoaded()} fallback={<Loading />}>
<AllAuthorsView authors={props.allAuthors} />
</Show>

View File

@ -5,7 +5,7 @@ import type { PageProps } from './types'
export const onBeforeRender = async (_pageContext: PageContext) => {
const allTopics = await apiClient.getAllTopics()
const pageProps: PageProps = { allTopics }
const pageProps: PageProps = { allTopics, seo: { title: '' } }
return {
pageContext: {

View File

@ -4,8 +4,11 @@ import type { PageProps } from './types'
import { createSignal, onMount, Show } from 'solid-js'
import { loadAllTopics } from '../stores/zine/topics'
import { Loading } from '../components/_shared/Loading'
import { useLocalize } from '../context/localize'
export const AllTopicsPage = (props: PageProps) => {
const { t } = useLocalize()
const [isLoaded, setIsLoaded] = createSignal<boolean>(Boolean(props.allTopics))
onMount(async () => {
@ -18,7 +21,7 @@ export const AllTopicsPage = (props: PageProps) => {
})
return (
<PageLayout>
<PageLayout title={t('All topics')}>
<Show when={isLoaded()} fallback={<Loading />}>
<AllTopicsView topics={props.allTopics} />
</Show>

View File

@ -11,7 +11,7 @@ export const onBeforeRender = async (pageContext: PageContext) => {
throw render(404, '/404')
}
const pageProps: PageProps = { article }
const pageProps: PageProps = { article, seo: { title: article.title } }
return {
pageContext: {

View File

@ -23,9 +23,7 @@ export const ArticlePage = (props: PageProps) => {
const article = createMemo<Shout>(() => articleEntities()[slug()])
onMount(async () => {
const articleValue = articleEntities()[slug()]
if (!articleValue || !articleValue.body) {
if (!article() || !article().body) {
const loadShoutPromise = loadShout(slug())
setPageLoadManagerPromise(loadShoutPromise)
await loadShoutPromise
@ -48,6 +46,7 @@ export const ArticlePage = (props: PageProps) => {
return (
<PageLayout
title={props.seo.title}
headerTitle={article()?.title || ''}
slug={article()?.slug}
articleBody={article()?.body}

View File

@ -12,7 +12,7 @@ export const onBeforeRender = async (pageContext: PageContext) => {
})
const author = await apiClient.getAuthor({ slug })
const pageProps: PageProps = { author, authorShouts }
const pageProps: PageProps = { author, authorShouts, seo: { title: author.name } }
return {
pageContext: {

View File

@ -54,7 +54,7 @@ export const AuthorPage = (props: PageProps) => {
const usePrerenderedData = props.author?.slug === slug()
return (
<PageLayout>
<PageLayout title={props.seo.title}>
<ReactionsProvider>
<Show when={isLoaded()} fallback={<Loading />}>
<AuthorView

View File

@ -10,14 +10,17 @@ export const ConnectPage = () => {
setState('loading')
// eslint-disable-next-line unicorn/prefer-spread
const postData = Array.from(formRef.current.elements).reduce((acc, element) => {
const formField = element as unknown as { name: string; value: string }
if (formField.name) {
acc[formField.name] = formField.value
}
const postData = Array.from(formRef.current.elements).reduce(
(acc, element) => {
const formField = element as unknown as { name: string; value: string }
if (formField.name) {
acc[formField.name] = formField.value
}
return acc
}, {} as Record<string, string>)
return acc
},
{} as Record<string, string>
)
const requestOptions = {
method: 'POST',
@ -41,8 +44,9 @@ export const ConnectPage = () => {
})
}
// TODO: l10n
return (
<PageLayout>
<PageLayout title="Предложить идею">
<article class="wide-container container--static-page">
<div class="row">
<div class="col-sm-20 col-md-16 col-lg-14 col-xl-12 offset-md-5">

View File

@ -19,8 +19,9 @@ const handleCreate = async (layout: LayoutType) => {
export const CreatePage = () => {
const { t } = useLocalize()
return (
<PageLayout>
<PageLayout title={t('Choose a post type')}>
<AuthGuard>
<article class={clsx('wide-container', 'container--static-page', styles.Create)}>
<h1>{t('Choose a post type')}</h1>

View File

@ -1,5 +1,5 @@
import { PageLayout } from '../components/_shared/PageLayout'
import { Title } from '@solidjs/meta'
import { useLocalize } from '../context/localize'
import { DraftsView } from '../components/Views/DraftsView'
@ -7,8 +7,7 @@ export const DraftsPage = () => {
const { t } = useLocalize()
return (
<PageLayout>
<Title>{t('Drafts')}</Title>
<PageLayout title={t('Drafts')}>
<DraftsView />
</PageLayout>
)

View File

@ -5,11 +5,14 @@ import { Shout } from '../graphql/types.gen'
import { useRouter } from '../stores/router'
import { apiClient } from '../utils/apiClient'
import { AuthGuard } from '../components/AuthGuard'
import { LayoutType } from './types'
import { useLocalize } from '../context/localize'
const Edit = lazy(() => import('../components/Views/Edit'))
export const EditPage = () => {
const { page } = useRouter()
const { t } = useLocalize()
const shoutId = createMemo(() => Number((page().params as Record<'shoutId', string>).shoutId))
@ -20,8 +23,32 @@ export const EditPage = () => {
setShout(loadedShout)
})
const title = createMemo(() => {
if (!shout()) {
return t('Create post')
}
switch (shout().layout as LayoutType) {
case 'music': {
return t('Publish Album')
}
case 'image': {
return t('Create gallery')
}
case 'video': {
return t('Create video')
}
case 'literature': {
return t('New literary work')
}
default: {
return t('Write an article')
}
}
})
return (
<PageLayout>
<PageLayout title={title()}>
<AuthGuard>
<Show when={shout()}>
<Suspense fallback={<Loading />}>

View File

@ -8,7 +8,7 @@ export const onBeforeRender = async (_pageContext: PageContext) => {
filters: { excludeLayout: 'article' },
limit: PRERENDERED_ARTICLES_COUNT
})
const pageProps: PageProps = { expoShouts }
const pageProps: PageProps = { expoShouts, seo: { title: '' } }
return {
pageContext: {
pageProps

View File

@ -6,12 +6,12 @@ import { useLocalize } from '../../context/localize'
import { createMemo } from 'solid-js'
import { LayoutType } from '../types'
import { useRouter } from '../../stores/router'
import { Title } from '@solidjs/meta'
export const ExpoPage = (props: PageProps) => {
const { t } = useLocalize()
const { page: getPage } = useRouter()
const getLayout = createMemo<LayoutType>(() => getPage().params['layout'] as LayoutType)
const { page } = useRouter()
const getLayout = createMemo<LayoutType>(() => page().params['layout'] as LayoutType)
const title = createMemo(() => {
switch (getLayout()) {
case 'music': {
@ -33,8 +33,7 @@ export const ExpoPage = (props: PageProps) => {
})
return (
<PageLayout withPadding={true} zeroBottomPadding={true}>
<Title>{title()}</Title>
<PageLayout withPadding={true} zeroBottomPadding={true} title={title()}>
<Topics />
<Expo shouts={props.expoShouts} />
</PageLayout>

View File

@ -10,7 +10,7 @@ export const onBeforeRender = async (pageContext: PageContext) => {
limit: PRERENDERED_ARTICLES_COUNT
})
const pageProps: PageProps = { expoShouts }
const pageProps: PageProps = { expoShouts, seo: { title: '' } }
return {
pageContext: {

View File

@ -6,6 +6,7 @@ import { ReactionsProvider } from '../context/reactions'
import { useRouter } from '../stores/router'
import { AuthGuard } from '../components/AuthGuard'
import { LoadShoutsOptions } from '../graphql/types.gen'
import { useLocalize } from '../context/localize'
const handleFeedLoadShouts = (options: LoadShoutsOptions) => {
return loadShouts({
@ -19,6 +20,8 @@ const handleMyFeedLoadShouts = (options: LoadShoutsOptions) => {
}
export const FeedPage = () => {
const { t } = useLocalize()
onCleanup(() => resetSortedArticles())
const { page } = useRouter()
@ -34,7 +37,7 @@ export const FeedPage = () => {
)
return (
<PageLayout>
<PageLayout title={t('Feed')}>
<ReactionsProvider>
<Switch fallback={<FeedView loadShouts={handleFeedLoadShouts} />}>
<Match when={page().route === 'feed'}>

View File

@ -1,9 +1,12 @@
import { FourOuFourView } from '../components/Views/FourOuFour'
import { PageLayout } from '../components/_shared/PageLayout'
import { useLocalize } from '../context/localize'
export const FourOuFourPage = () => {
const { t } = useLocalize()
return (
<PageLayout isHeaderFixed={false} hideFooter={true}>
<PageLayout isHeaderFixed={false} hideFooter={true} title={t('Nothing is here')}>
<FourOuFourView />
</PageLayout>
)

View File

@ -2,10 +2,13 @@ import { PageLayout } from '../components/_shared/PageLayout'
import { InboxView } from '../components/Views/Inbox'
import { InboxProvider } from '../context/inbox'
import { ShowOnlyOnClient } from '../components/_shared/ShowOnlyOnClient'
import { useLocalize } from '../context/localize'
export const InboxPage = () => {
const { t } = useLocalize()
return (
<PageLayout hideFooter={true}>
<PageLayout hideFooter={true} title={t('Inbox')}>
<ShowOnlyOnClient>
<InboxProvider>
<InboxView />

View File

@ -9,7 +9,7 @@ export const onBeforeRender = async (_pageContext: PageContext) => {
limit: PRERENDERED_ARTICLES_COUNT
})
const pageProps: PageProps = { homeShouts }
const pageProps: PageProps = { homeShouts, seo: { title: '' } }
return {
pageContext: {

View File

@ -1,5 +1,5 @@
import { createSignal, onCleanup, onMount, Show } from 'solid-js'
import { Title } from '@solidjs/meta'
import { HomeView, PRERENDERED_ARTICLES_COUNT, RANDOM_TOPICS_COUNT } from '../components/Views/Home'
import { PageLayout } from '../components/_shared/PageLayout'
import type { PageProps } from './types'
@ -29,9 +29,8 @@ export const HomePage = (props: PageProps) => {
onCleanup(() => resetSortedArticles())
return (
<PageLayout withPadding={true}>
<PageLayout withPadding={true} title={t('Discours')}>
<ReactionsProvider>
<Title>{t('Discours')}</Title>
<Show when={isLoaded()} fallback={<Loading />}>
<HomeView shouts={props.homeShouts || []} />
</Show>

View File

@ -4,10 +4,13 @@ import { Icon } from '../../components/_shared/Icon'
import { clsx } from 'clsx'
import { ProfileSettingsNavigation } from '../../components/Nav/ProfileSettingsNavigation'
import { AuthGuard } from '../../components/AuthGuard'
import { useLocalize } from '../../context/localize'
export const ProfileSecurityPage = () => {
const { t } = useLocalize()
return (
<PageLayout>
<PageLayout title={t('Profile')}>
<AuthGuard>
<div class="wide-container">
<div class="row">

View File

@ -21,7 +21,6 @@ import { SocialNetworkInput } from '../../components/_shared/SocialNetworkInput'
import { profileSocialLinks } from '../../utils/profileSocialLinks'
import { Icon } from '../../components/_shared/Icon'
import { Popover } from '../../components/_shared/Popover'
import { Image } from '../../components/_shared/Image'
import { Loading } from '../../components/_shared/Loading'
import { getImageUrl } from '../../utils/getImageUrl'
@ -123,7 +122,7 @@ export const ProfileSettingsPage = () => {
})
return (
<PageLayout>
<PageLayout title={t('Profile')}>
<AuthGuard>
<Show when={form}>
<div class="wide-container">

View File

@ -1,10 +1,13 @@
import { PageLayout } from '../../components/_shared/PageLayout'
import { AuthGuard } from '../../components/AuthGuard'
import { ProfileSubscriptions } from '../../components/Views/ProfileSubscriptions'
import { useLocalize } from '../../context/localize'
export const ProfileSubscriptionsPage = () => {
const { t } = useLocalize()
return (
<PageLayout>
<PageLayout title={t('Profile')}>
<AuthGuard>
<ProfileSubscriptions />
</AuthGuard>

View File

@ -7,7 +7,7 @@ export const onBeforeRender = async (pageContext: PageContext) => {
const searchResults = await apiClient.getShouts({ filters: { title: q, body: q }, limit: 50 })
const pageProps: PageProps = { searchResults }
const pageProps: PageProps = { searchResults, seo: { title: '' } }
return {
pageContext: {

View File

@ -6,21 +6,16 @@ import { useRouter } from '../stores/router'
import { loadShouts, resetSortedArticles } from '../stores/zine/articles'
import { Loading } from '../components/_shared/Loading'
import { ReactionsProvider } from '../context/reactions'
import { useLocalize } from '../context/localize'
export const SearchPage = (props: PageProps) => {
const [isLoaded, setIsLoaded] = createSignal(Boolean(props.searchResults))
const q = createMemo(() => {
const { page: getPage } = useRouter()
const { t } = useLocalize()
const page = getPage()
const { page } = useRouter()
if (page.route !== 'search') {
throw new Error('ts guard')
}
return page.params.q
})
const q = createMemo(() => page().params['q'] as string)
onMount(async () => {
if (isLoaded()) {
@ -34,7 +29,7 @@ export const SearchPage = (props: PageProps) => {
onCleanup(() => resetSortedArticles())
return (
<PageLayout>
<PageLayout title={t('Search')}>
<ReactionsProvider>
<Show when={isLoaded()} fallback={<Loading />}>
<SearchView results={props.searchResults || []} query={props.searchQuery} />

View File

@ -7,7 +7,7 @@ export const onBeforeRender = async (pageContext: PageContext) => {
const topic = await apiClient.getTopic({ slug })
const pageProps: PageProps = { topic }
const pageProps: PageProps = { topic, seo: { title: topic.title } }
return {
pageContext: {

View File

@ -51,7 +51,7 @@ export const TopicPage = (props: PageProps) => {
const usePrerenderedData = props.topic?.slug === slug()
return (
<PageLayout>
<PageLayout title={props.seo.title}>
<ReactionsProvider>
<Show when={isLoaded()} fallback={<Loading />}>
<TopicView

View File

@ -17,6 +17,9 @@ export type PageProps = {
// other types?
searchResults?: Shout[]
chats?: Chat[]
seo: {
title: string
}
}
export type RootSearchParams = {

View File

@ -2,7 +2,6 @@ import { App } from '../components/App'
import { hydrate } from 'solid-js/web'
import type { PageContextBuiltInClientWithClientRouting } from 'vike/types'
import type { PageContext } from './types'
import { MetaProvider } from '@solidjs/meta'
import i18next from 'i18next'
import ICU from 'i18next-icu'
import HttpApi from 'i18next-http-backend'
@ -52,14 +51,7 @@ export const render = async (pageContext: PageContextBuiltInClientWithClientRout
const content = document.querySelector('#root')
if (!layoutReady) {
hydrate(
() => (
<MetaProvider>
<App {...pageProps} />
</MetaProvider>
),
content
)
hydrate(() => <App {...pageProps} />, content)
layoutReady = true
}
}

View File

@ -3,7 +3,6 @@ import { escapeInject, dangerouslySkipEscape } from 'vike/server'
import { App } from '../components/App'
import { initRouter } from '../stores/router'
import type { PageContext } from './types'
import { MetaProvider } from '@solidjs/meta'
import i18next from 'i18next'
import ru from '../../public/locales/ru/translation.json'
import en from '../../public/locales/en/translation.json'
@ -12,8 +11,6 @@ import ICU from 'i18next-icu'
export const passToClient = ['pageProps', 'lng', 'documentProps', 'is404']
const metaTags = []
const getLng = (pageContext: PageContext): Language => {
const { urlParsed, cookies } = pageContext
@ -57,11 +54,7 @@ export const render = async (pageContext: PageContext) => {
pageContext.lng = lng
const rootContent = renderToString(() => (
<MetaProvider tags={metaTags}>
<App {...pageContext.pageProps} />
</MetaProvider>
))
const rootContent = renderToString(() => <App {...pageContext.pageProps} />)
return escapeInject`<!DOCTYPE html>
<html lang="${lng}">

View File

@ -112,14 +112,15 @@ const handleClientRouteLinkClick = async (event) => {
searchParamsStore.open(params)
}
if (!url.hash) {
window.scrollTo({
top: 0,
left: 0
})
if (url.hash) {
scrollToHash(url.hash)
return
}
scrollToHash(url.hash)
window.scrollTo({
top: 0,
left: 0
})
}
export const initRouter = (pathname: string, search?: Record<string, string>) => {