diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d9b04b9d22..ca74227897 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: - go-version: [ 1.18.10 ] + go-version: [ 1.21 ] os: [ macos-latest, ubuntu-latest, windows-latest ] steps: diff --git a/.husky/pre-commit b/.husky/pre-commit index e4c9a2f753..7d1e3f139d 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -5,7 +5,7 @@ npx lint-staged --concurrent false # npm run typecheck # Checking for secrets -#gitleaks protect --verbose --redact --staged +gitleaks protect --verbose --redact --staged # Checking dependencies' licenses npx license-checker --production --json --out licenses.json diff --git a/README.md b/README.md index bb19ae6d9e..c8ac0fb889 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,19 @@ # Anytype Official Anytype client for MacOS, Linux, and Windows. +Anytype is a personal knowledge base, a digital brain that allows you to quickly capture, describe, and connect information. You can use Anytype to create books, tasks, notes, ideas, documents, tools and organize them any way you want. + +## Links + +* 🌐 [Website](https://anytype.io) +* 📝 [Blog](https://blog.anytype.io) +* 📑 [Documentation](https://doc.anytype.io) +* 💼 [Technical information](https://tech.anytype.io) +* 👋 [Community forum](https://community.anytype.io) +* 💾 [Downloads](https://download.anytype.io) +* ▶️ [Google Play](https://play.google.com/store/apps/details?id=io.anytype.app) +* 🍏 [App Store](https://apps.apple.com/us/app/anytype-private-notes/id6449487029) + ## Building the source ### Dependencies diff --git a/dist/challenge/index.html b/dist/challenge/index.html index 33eb7197d5..8ebbc3faed 100644 --- a/dist/challenge/index.html +++ b/dist/challenge/index.html @@ -2,46 +2,39 @@
- -
Challenge
+
- -
- -
diff --git a/dist/extension/js/foreground.js b/dist/extension/js/foreground.js index 459e8e96fa..9040aaa847 100644 --- a/dist/extension/js/foreground.js +++ b/dist/extension/js/foreground.js @@ -43,7 +43,7 @@ return true; }); - window.addEventListener('message', (e) => { + window.addEventListener('message', e => { if (e.origin != `chrome-extension://${extensionId}`) { return; }; diff --git a/dist/img/emoji/1f192.png b/dist/img/emoji/1f192.png index 53ca7c39c6..459cb9521f 100644 Binary files a/dist/img/emoji/1f192.png and b/dist/img/emoji/1f192.png differ diff --git a/dist/img/emoji/1f196.png b/dist/img/emoji/1f196.png index 5d9bb3ede4..837a3b24d5 100644 Binary files a/dist/img/emoji/1f196.png and b/dist/img/emoji/1f196.png differ diff --git a/dist/img/emoji/1f197.png b/dist/img/emoji/1f197.png index cc0ce82b41..7b00da46ba 100644 Binary files a/dist/img/emoji/1f197.png and b/dist/img/emoji/1f197.png differ diff --git a/dist/img/emoji/1f198.png b/dist/img/emoji/1f198.png index bcd8ae8fc6..c7acbc333b 100644 Binary files a/dist/img/emoji/1f198.png and b/dist/img/emoji/1f198.png differ diff --git a/dist/img/emoji/1f1e6-1f1e8.png b/dist/img/emoji/1f1e6-1f1e8.png index 5db149b5c1..ca59c301bf 100644 Binary files a/dist/img/emoji/1f1e6-1f1e8.png and b/dist/img/emoji/1f1e6-1f1e8.png differ diff --git a/dist/img/emoji/1f1e6-1f1ee.png b/dist/img/emoji/1f1e6-1f1ee.png index cb5f40d666..a918a19d35 100644 Binary files a/dist/img/emoji/1f1e6-1f1ee.png and b/dist/img/emoji/1f1e6-1f1ee.png differ diff --git a/dist/img/emoji/1f1e6-1f1f1.png b/dist/img/emoji/1f1e6-1f1f1.png index 4f25f0f9e1..37b77e3bf3 100644 Binary files a/dist/img/emoji/1f1e6-1f1f1.png and b/dist/img/emoji/1f1e6-1f1f1.png differ diff --git a/dist/img/emoji/1f1e6-1f1f8.png b/dist/img/emoji/1f1e6-1f1f8.png index e54729fe07..63b5d4e814 100644 Binary files a/dist/img/emoji/1f1e6-1f1f8.png and b/dist/img/emoji/1f1e6-1f1f8.png differ diff --git a/dist/img/emoji/1f1e6-1f1fa.png b/dist/img/emoji/1f1e6-1f1fa.png index a0330ff67b..e56515d281 100644 Binary files a/dist/img/emoji/1f1e6-1f1fa.png and b/dist/img/emoji/1f1e6-1f1fa.png differ diff --git a/dist/img/emoji/1f1e7-1f1ee.png b/dist/img/emoji/1f1e7-1f1ee.png index 6b8038b880..15efe33254 100644 Binary files a/dist/img/emoji/1f1e7-1f1ee.png and b/dist/img/emoji/1f1e7-1f1ee.png differ diff --git a/dist/img/emoji/1f1e7-1f1f1.png b/dist/img/emoji/1f1e7-1f1f1.png index 6f8c225496..061930c015 100644 Binary files a/dist/img/emoji/1f1e7-1f1f1.png and b/dist/img/emoji/1f1e7-1f1f1.png differ diff --git a/dist/img/emoji/1f1e7-1f1f2.png b/dist/img/emoji/1f1e7-1f1f2.png index c7e99ea9b1..1a95a9e9e8 100644 Binary files a/dist/img/emoji/1f1e7-1f1f2.png and b/dist/img/emoji/1f1e7-1f1f2.png differ diff --git a/dist/img/emoji/1f1e7-1f1f3.png b/dist/img/emoji/1f1e7-1f1f3.png index f9b9a27681..0de339cad9 100644 Binary files a/dist/img/emoji/1f1e7-1f1f3.png and b/dist/img/emoji/1f1e7-1f1f3.png differ diff --git a/dist/img/emoji/1f1e7-1f1f7.png b/dist/img/emoji/1f1e7-1f1f7.png index 2d5f9513c3..0768d04b26 100644 Binary files a/dist/img/emoji/1f1e7-1f1f7.png and b/dist/img/emoji/1f1e7-1f1f7.png differ diff --git a/dist/img/emoji/1f1e8-1f1e9.png b/dist/img/emoji/1f1e8-1f1e9.png index 971678f83b..72520728d6 100644 Binary files a/dist/img/emoji/1f1e8-1f1e9.png and b/dist/img/emoji/1f1e8-1f1e9.png differ diff --git a/dist/img/emoji/1f1e8-1f1f0.png b/dist/img/emoji/1f1e8-1f1f0.png index f35ba23861..dd407026a7 100644 Binary files a/dist/img/emoji/1f1e8-1f1f0.png and b/dist/img/emoji/1f1e8-1f1f0.png differ diff --git a/dist/img/emoji/1f1e8-1f1fa.png b/dist/img/emoji/1f1e8-1f1fa.png index 92625f6f53..62a8c833b2 100644 Binary files a/dist/img/emoji/1f1e8-1f1fa.png and b/dist/img/emoji/1f1e8-1f1fa.png differ diff --git a/dist/img/emoji/1f1e8-1f1fb.png b/dist/img/emoji/1f1e8-1f1fb.png index cbc94bd49f..e76debc11f 100644 Binary files a/dist/img/emoji/1f1e8-1f1fb.png and b/dist/img/emoji/1f1e8-1f1fb.png differ diff --git a/dist/img/emoji/1f1e9-1f1f2.png b/dist/img/emoji/1f1e9-1f1f2.png index fda8731a8e..e9bd4524a0 100644 Binary files a/dist/img/emoji/1f1e9-1f1f2.png and b/dist/img/emoji/1f1e9-1f1f2.png differ diff --git a/dist/img/emoji/1f1ea-1f1e6.png b/dist/img/emoji/1f1ea-1f1e6.png index 054754c949..4df9d748d0 100644 Binary files a/dist/img/emoji/1f1ea-1f1e6.png and b/dist/img/emoji/1f1ea-1f1e6.png differ diff --git a/dist/img/emoji/1f1ea-1f1e8.png b/dist/img/emoji/1f1ea-1f1e8.png index 0687cc7b52..13ad8eaba6 100644 Binary files a/dist/img/emoji/1f1ea-1f1e8.png and b/dist/img/emoji/1f1ea-1f1e8.png differ diff --git a/dist/img/emoji/1f1ea-1f1f7.png b/dist/img/emoji/1f1ea-1f1f7.png index c5dbab4da8..ff08839565 100644 Binary files a/dist/img/emoji/1f1ea-1f1f7.png and b/dist/img/emoji/1f1ea-1f1f7.png differ diff --git a/dist/img/emoji/1f1ea-1f1f8.png b/dist/img/emoji/1f1ea-1f1f8.png index 054754c949..4df9d748d0 100644 Binary files a/dist/img/emoji/1f1ea-1f1f8.png and b/dist/img/emoji/1f1ea-1f1f8.png differ diff --git a/dist/img/emoji/1f1ea-1f1f9.png b/dist/img/emoji/1f1ea-1f1f9.png index 9b71853c83..1021390871 100644 Binary files a/dist/img/emoji/1f1ea-1f1f9.png and b/dist/img/emoji/1f1ea-1f1f9.png differ diff --git a/dist/img/emoji/1f1eb-1f1ef.png b/dist/img/emoji/1f1eb-1f1ef.png index f29686aef0..63c4e7e9d6 100644 Binary files a/dist/img/emoji/1f1eb-1f1ef.png and b/dist/img/emoji/1f1eb-1f1ef.png differ diff --git a/dist/img/emoji/1f1eb-1f1f0.png b/dist/img/emoji/1f1eb-1f1f0.png index d4b4d657be..55e46bb6d8 100644 Binary files a/dist/img/emoji/1f1eb-1f1f0.png and b/dist/img/emoji/1f1eb-1f1f0.png differ diff --git a/dist/img/emoji/1f1ec-1f1e9.png b/dist/img/emoji/1f1ec-1f1e9.png index 284214f260..7ecb967862 100644 Binary files a/dist/img/emoji/1f1ec-1f1e9.png and b/dist/img/emoji/1f1ec-1f1e9.png differ diff --git a/dist/img/emoji/1f1ec-1f1f5.png b/dist/img/emoji/1f1ec-1f1f5.png index 50d295b6de..b48038b36e 100644 Binary files a/dist/img/emoji/1f1ec-1f1f5.png and b/dist/img/emoji/1f1ec-1f1f5.png differ diff --git a/dist/img/emoji/1f1ec-1f1f7.png b/dist/img/emoji/1f1ec-1f1f7.png index 932f1fad36..a9655896d2 100644 Binary files a/dist/img/emoji/1f1ec-1f1f7.png and b/dist/img/emoji/1f1ec-1f1f7.png differ diff --git a/dist/img/emoji/1f1ec-1f1fe.png b/dist/img/emoji/1f1ec-1f1fe.png index abcfaf9b91..d9814fa259 100644 Binary files a/dist/img/emoji/1f1ec-1f1fe.png and b/dist/img/emoji/1f1ec-1f1fe.png differ diff --git a/dist/img/emoji/1f1ed-1f1f2.png b/dist/img/emoji/1f1ed-1f1f2.png index a0330ff67b..e56515d281 100644 Binary files a/dist/img/emoji/1f1ed-1f1f2.png and b/dist/img/emoji/1f1ed-1f1f2.png differ diff --git a/dist/img/emoji/1f1ed-1f1f7.png b/dist/img/emoji/1f1ed-1f1f7.png index ae9f6c4db9..56a3f7aabb 100644 Binary files a/dist/img/emoji/1f1ed-1f1f7.png and b/dist/img/emoji/1f1ed-1f1f7.png differ diff --git a/dist/img/emoji/1f1ee-1f1f7.png b/dist/img/emoji/1f1ee-1f1f7.png index 315eb24726..f62656103c 100644 Binary files a/dist/img/emoji/1f1ee-1f1f7.png and b/dist/img/emoji/1f1ee-1f1f7.png differ diff --git a/dist/img/emoji/1f1f0-1f1ec.png b/dist/img/emoji/1f1f0-1f1ec.png index 58f8ff09e4..c7d70f3798 100644 Binary files a/dist/img/emoji/1f1f0-1f1ec.png and b/dist/img/emoji/1f1f0-1f1ec.png differ diff --git a/dist/img/emoji/1f1f0-1f1ed.png b/dist/img/emoji/1f1f0-1f1ed.png index f91a051503..9aaffbbf82 100644 Binary files a/dist/img/emoji/1f1f0-1f1ed.png and b/dist/img/emoji/1f1f0-1f1ed.png differ diff --git a/dist/img/emoji/1f1f0-1f1f2.png b/dist/img/emoji/1f1f0-1f1f2.png index 2d20cca8e3..bed58678ca 100644 Binary files a/dist/img/emoji/1f1f0-1f1f2.png and b/dist/img/emoji/1f1f0-1f1f2.png differ diff --git a/dist/img/emoji/1f1f0-1f1f3.png b/dist/img/emoji/1f1f0-1f1f3.png index 6c6fcd4a7d..a962e97f18 100644 Binary files a/dist/img/emoji/1f1f0-1f1f3.png and b/dist/img/emoji/1f1f0-1f1f3.png differ diff --git a/dist/img/emoji/1f1f0-1f1f5.png b/dist/img/emoji/1f1f0-1f1f5.png index 085144e83d..fc6c272811 100644 Binary files a/dist/img/emoji/1f1f0-1f1f5.png and b/dist/img/emoji/1f1f0-1f1f5.png differ diff --git a/dist/img/emoji/1f1f0-1f1fe.png b/dist/img/emoji/1f1f0-1f1fe.png index 681d1c2955..6f283bc1d6 100644 Binary files a/dist/img/emoji/1f1f0-1f1fe.png and b/dist/img/emoji/1f1f0-1f1fe.png differ diff --git a/dist/img/emoji/1f1f0-1f1ff.png b/dist/img/emoji/1f1f0-1f1ff.png index 47a160485c..1b099bd87a 100644 Binary files a/dist/img/emoji/1f1f0-1f1ff.png and b/dist/img/emoji/1f1f0-1f1ff.png differ diff --git a/dist/img/emoji/1f1f1-1f1f0.png b/dist/img/emoji/1f1f1-1f1f0.png index 821b42e437..2772967ca9 100644 Binary files a/dist/img/emoji/1f1f1-1f1f0.png and b/dist/img/emoji/1f1f1-1f1f0.png differ diff --git a/dist/img/emoji/1f1f2-1f1ed.png b/dist/img/emoji/1f1f2-1f1ed.png index 44f8247b1c..a117c82508 100644 Binary files a/dist/img/emoji/1f1f2-1f1ed.png and b/dist/img/emoji/1f1f2-1f1ed.png differ diff --git a/dist/img/emoji/1f1f2-1f1f0.png b/dist/img/emoji/1f1f2-1f1f0.png index c00b3dfe91..3c19d3ca8a 100644 Binary files a/dist/img/emoji/1f1f2-1f1f0.png and b/dist/img/emoji/1f1f2-1f1f0.png differ diff --git a/dist/img/emoji/1f1f2-1f1f5.png b/dist/img/emoji/1f1f2-1f1f5.png index cda6c42944..f87a0e3728 100644 Binary files a/dist/img/emoji/1f1f2-1f1f5.png and b/dist/img/emoji/1f1f2-1f1f5.png differ diff --git a/dist/img/emoji/1f1f2-1f1f6.png b/dist/img/emoji/1f1f2-1f1f6.png index ec50a01c0b..9445fe6c5d 100644 Binary files a/dist/img/emoji/1f1f2-1f1f6.png and b/dist/img/emoji/1f1f2-1f1f6.png differ diff --git a/dist/img/emoji/1f1f2-1f1f8.png b/dist/img/emoji/1f1f2-1f1f8.png index 7d2cf63d58..71caf1c525 100644 Binary files a/dist/img/emoji/1f1f2-1f1f8.png and b/dist/img/emoji/1f1f2-1f1f8.png differ diff --git a/dist/img/emoji/1f1f2-1f1ff.png b/dist/img/emoji/1f1f2-1f1ff.png index fd23f9364a..05997902a6 100644 Binary files a/dist/img/emoji/1f1f2-1f1ff.png and b/dist/img/emoji/1f1f2-1f1ff.png differ diff --git a/dist/img/emoji/1f1f3-1f1e6.png b/dist/img/emoji/1f1f3-1f1e6.png index 2a2e43743d..c593f6f0d7 100644 Binary files a/dist/img/emoji/1f1f3-1f1e6.png and b/dist/img/emoji/1f1f3-1f1e6.png differ diff --git a/dist/img/emoji/1f1f3-1f1e8.png b/dist/img/emoji/1f1f3-1f1e8.png index 57a4824671..116167c9fe 100644 Binary files a/dist/img/emoji/1f1f3-1f1e8.png and b/dist/img/emoji/1f1f3-1f1e8.png differ diff --git a/dist/img/emoji/1f1f3-1f1fa.png b/dist/img/emoji/1f1f3-1f1fa.png index 3de308ee98..df6edaf9c5 100644 Binary files a/dist/img/emoji/1f1f3-1f1fa.png and b/dist/img/emoji/1f1f3-1f1fa.png differ diff --git a/dist/img/emoji/1f1f3-1f1ff.png b/dist/img/emoji/1f1f3-1f1ff.png index 387b9137ad..e67e9f35be 100644 Binary files a/dist/img/emoji/1f1f3-1f1ff.png and b/dist/img/emoji/1f1f3-1f1ff.png differ diff --git a/dist/img/emoji/1f1f5-1f1f7.png b/dist/img/emoji/1f1f5-1f1f7.png index 1b49a42ad0..63a2bf50ca 100644 Binary files a/dist/img/emoji/1f1f5-1f1f7.png and b/dist/img/emoji/1f1f5-1f1f7.png differ diff --git a/dist/img/emoji/1f1f7-1f1ea.png b/dist/img/emoji/1f1f7-1f1ea.png index b6becdca78..cc6025726e 100644 Binary files a/dist/img/emoji/1f1f7-1f1ea.png and b/dist/img/emoji/1f1f7-1f1ea.png differ diff --git a/dist/img/emoji/1f1f7-1f1f8.png b/dist/img/emoji/1f1f7-1f1f8.png index 6023e8a06c..017c5fdc70 100644 Binary files a/dist/img/emoji/1f1f7-1f1f8.png and b/dist/img/emoji/1f1f7-1f1f8.png differ diff --git a/dist/img/emoji/1f1f7-1f1fc.png b/dist/img/emoji/1f1f7-1f1fc.png index a7f14093ea..4f871c7ab7 100644 Binary files a/dist/img/emoji/1f1f7-1f1fc.png and b/dist/img/emoji/1f1f7-1f1fc.png differ diff --git a/dist/img/emoji/1f1f8-1f1e6.png b/dist/img/emoji/1f1f8-1f1e6.png index 9933774dce..70ffa70e65 100644 Binary files a/dist/img/emoji/1f1f8-1f1e6.png and b/dist/img/emoji/1f1f8-1f1e6.png differ diff --git a/dist/img/emoji/1f1f8-1f1e7.png b/dist/img/emoji/1f1f8-1f1e7.png index a8896e6121..deb7c5471b 100644 Binary files a/dist/img/emoji/1f1f8-1f1e7.png and b/dist/img/emoji/1f1f8-1f1e7.png differ diff --git a/dist/img/emoji/1f1f8-1f1ed.png b/dist/img/emoji/1f1f8-1f1ed.png index 5db149b5c1..ca59c301bf 100644 Binary files a/dist/img/emoji/1f1f8-1f1ed.png and b/dist/img/emoji/1f1f8-1f1ed.png differ diff --git a/dist/img/emoji/1f1f8-1f1f2.png b/dist/img/emoji/1f1f8-1f1f2.png index 7e481b2cf8..80980b42e2 100644 Binary files a/dist/img/emoji/1f1f8-1f1f2.png and b/dist/img/emoji/1f1f8-1f1f2.png differ diff --git a/dist/img/emoji/1f1f8-1f1f7.png b/dist/img/emoji/1f1f8-1f1f7.png index b97f81ea1e..0653a62794 100644 Binary files a/dist/img/emoji/1f1f8-1f1f7.png and b/dist/img/emoji/1f1f8-1f1f7.png differ diff --git a/dist/img/emoji/1f1f9-1f1e6.png b/dist/img/emoji/1f1f9-1f1e6.png index 5db149b5c1..ca59c301bf 100644 Binary files a/dist/img/emoji/1f1f9-1f1e6.png and b/dist/img/emoji/1f1f9-1f1e6.png differ diff --git a/dist/img/emoji/1f1f9-1f1e8.png b/dist/img/emoji/1f1f9-1f1e8.png index 9e30fbbf45..69bbb5c323 100644 Binary files a/dist/img/emoji/1f1f9-1f1e8.png and b/dist/img/emoji/1f1f9-1f1e8.png differ diff --git a/dist/img/emoji/1f1f9-1f1f2.png b/dist/img/emoji/1f1f9-1f1f2.png index a4cbf0992e..6d4e1a54b7 100644 Binary files a/dist/img/emoji/1f1f9-1f1f2.png and b/dist/img/emoji/1f1f9-1f1f2.png differ diff --git a/dist/img/emoji/1f1f9-1f1fb.png b/dist/img/emoji/1f1f9-1f1fb.png index 9fbde35b29..6647e3856c 100644 Binary files a/dist/img/emoji/1f1f9-1f1fb.png and b/dist/img/emoji/1f1f9-1f1fb.png differ diff --git a/dist/img/emoji/1f1fa-1f1f3.png b/dist/img/emoji/1f1fa-1f1f3.png index dc516b2456..19e166179e 100644 Binary files a/dist/img/emoji/1f1fa-1f1f3.png and b/dist/img/emoji/1f1fa-1f1f3.png differ diff --git a/dist/img/emoji/1f1fa-1f1fe.png b/dist/img/emoji/1f1fa-1f1fe.png index df5af1ac40..2e0d89d0f0 100644 Binary files a/dist/img/emoji/1f1fa-1f1fe.png and b/dist/img/emoji/1f1fa-1f1fe.png differ diff --git a/dist/img/emoji/1f1fb-1f1ec.png b/dist/img/emoji/1f1fb-1f1ec.png index cbd756a69f..e9d0589a6e 100644 Binary files a/dist/img/emoji/1f1fb-1f1ec.png and b/dist/img/emoji/1f1fb-1f1ec.png differ diff --git a/dist/img/emoji/1f1fb-1f1fa.png b/dist/img/emoji/1f1fb-1f1fa.png index caaac05fb0..f5b651f3b6 100644 Binary files a/dist/img/emoji/1f1fb-1f1fa.png and b/dist/img/emoji/1f1fb-1f1fa.png differ diff --git a/dist/img/emoji/1f1fe-1f1f9.png b/dist/img/emoji/1f1fe-1f1f9.png index fc75f559df..1aa791748b 100644 Binary files a/dist/img/emoji/1f1fe-1f1f9.png and b/dist/img/emoji/1f1fe-1f1f9.png differ diff --git a/dist/img/emoji/1f1ff-1f1e6.png b/dist/img/emoji/1f1ff-1f1e6.png index 18e5e405a2..057baff979 100644 Binary files a/dist/img/emoji/1f1ff-1f1e6.png and b/dist/img/emoji/1f1ff-1f1e6.png differ diff --git a/dist/img/emoji/1f1ff-1f1fc.png b/dist/img/emoji/1f1ff-1f1fc.png index a2f291d01b..46fc8a4464 100644 Binary files a/dist/img/emoji/1f1ff-1f1fc.png and b/dist/img/emoji/1f1ff-1f1fc.png differ diff --git a/dist/img/emoji/1f232.png b/dist/img/emoji/1f232.png index 4abd71d7fc..2a36936a48 100644 Binary files a/dist/img/emoji/1f232.png and b/dist/img/emoji/1f232.png differ diff --git a/dist/img/emoji/1f235.png b/dist/img/emoji/1f235.png index a13ed9f5f1..34b33c2a48 100644 Binary files a/dist/img/emoji/1f235.png and b/dist/img/emoji/1f235.png differ diff --git a/dist/img/emoji/1f239.png b/dist/img/emoji/1f239.png index 849a4c2f08..b3295ceb8f 100644 Binary files a/dist/img/emoji/1f239.png and b/dist/img/emoji/1f239.png differ diff --git a/dist/img/emoji/1f250.png b/dist/img/emoji/1f250.png index 2620f83b2e..b6a5b628d2 100644 Binary files a/dist/img/emoji/1f250.png and b/dist/img/emoji/1f250.png differ diff --git a/dist/img/emoji/1f300.png b/dist/img/emoji/1f300.png index 9d00a929e5..884767984a 100644 Binary files a/dist/img/emoji/1f300.png and b/dist/img/emoji/1f300.png differ diff --git a/dist/img/emoji/1f302.png b/dist/img/emoji/1f302.png index 51661e478d..4de0f2e39c 100644 Binary files a/dist/img/emoji/1f302.png and b/dist/img/emoji/1f302.png differ diff --git a/dist/img/emoji/1f306.png b/dist/img/emoji/1f306.png index 8d82f6a622..add8086451 100644 Binary files a/dist/img/emoji/1f306.png and b/dist/img/emoji/1f306.png differ diff --git a/dist/img/emoji/1f311.png b/dist/img/emoji/1f311.png index 84763d901f..9c51e6abbe 100644 Binary files a/dist/img/emoji/1f311.png and b/dist/img/emoji/1f311.png differ diff --git a/dist/img/emoji/1f319.png b/dist/img/emoji/1f319.png index 1264f6e32e..0e75244dab 100644 Binary files a/dist/img/emoji/1f319.png and b/dist/img/emoji/1f319.png differ diff --git a/dist/img/emoji/1f31a.png b/dist/img/emoji/1f31a.png index 2e0c9f6172..d63612a40a 100644 Binary files a/dist/img/emoji/1f31a.png and b/dist/img/emoji/1f31a.png differ diff --git a/dist/img/emoji/1f31b.png b/dist/img/emoji/1f31b.png index be80fa1874..20e46d4143 100644 Binary files a/dist/img/emoji/1f31b.png and b/dist/img/emoji/1f31b.png differ diff --git a/dist/img/emoji/1f31c.png b/dist/img/emoji/1f31c.png index 51cb247566..b8293a5051 100644 Binary files a/dist/img/emoji/1f31c.png and b/dist/img/emoji/1f31c.png differ diff --git a/dist/img/emoji/1f31d.png b/dist/img/emoji/1f31d.png index 3136803148..ffea8b1c9e 100644 Binary files a/dist/img/emoji/1f31d.png and b/dist/img/emoji/1f31d.png differ diff --git a/dist/img/emoji/1f325-fe0f.png b/dist/img/emoji/1f325-fe0f.png index cd7434ea55..4c3cbb7b45 100644 Binary files a/dist/img/emoji/1f325-fe0f.png and b/dist/img/emoji/1f325-fe0f.png differ diff --git a/dist/img/emoji/1f325.png b/dist/img/emoji/1f325.png index cd7434ea55..4c3cbb7b45 100644 Binary files a/dist/img/emoji/1f325.png and b/dist/img/emoji/1f325.png differ diff --git a/dist/img/emoji/1f326-fe0f.png b/dist/img/emoji/1f326-fe0f.png index bf1548d006..8a2b5855fc 100644 Binary files a/dist/img/emoji/1f326-fe0f.png and b/dist/img/emoji/1f326-fe0f.png differ diff --git a/dist/img/emoji/1f326.png b/dist/img/emoji/1f326.png index bf1548d006..8a2b5855fc 100644 Binary files a/dist/img/emoji/1f326.png and b/dist/img/emoji/1f326.png differ diff --git a/dist/img/emoji/1f329-fe0f.png b/dist/img/emoji/1f329-fe0f.png index 77983b0bfc..d66f55b735 100644 Binary files a/dist/img/emoji/1f329-fe0f.png and b/dist/img/emoji/1f329-fe0f.png differ diff --git a/dist/img/emoji/1f329.png b/dist/img/emoji/1f329.png index 77983b0bfc..d66f55b735 100644 Binary files a/dist/img/emoji/1f329.png and b/dist/img/emoji/1f329.png differ diff --git a/dist/img/emoji/1f32c-fe0f.png b/dist/img/emoji/1f32c-fe0f.png index b3d72e30be..57b3ae1d03 100644 Binary files a/dist/img/emoji/1f32c-fe0f.png and b/dist/img/emoji/1f32c-fe0f.png differ diff --git a/dist/img/emoji/1f32c.png b/dist/img/emoji/1f32c.png index b3d72e30be..57b3ae1d03 100644 Binary files a/dist/img/emoji/1f32c.png and b/dist/img/emoji/1f32c.png differ diff --git a/dist/img/emoji/1f331.png b/dist/img/emoji/1f331.png index 0efa5b98f3..39e4755a5a 100644 Binary files a/dist/img/emoji/1f331.png and b/dist/img/emoji/1f331.png differ diff --git a/dist/img/emoji/1f33a.png b/dist/img/emoji/1f33a.png index 3e2508e35f..57339d2b93 100644 Binary files a/dist/img/emoji/1f33a.png and b/dist/img/emoji/1f33a.png differ diff --git a/dist/img/emoji/1f33c.png b/dist/img/emoji/1f33c.png index 2af7e29bee..0742b72edc 100644 Binary files a/dist/img/emoji/1f33c.png and b/dist/img/emoji/1f33c.png differ diff --git a/dist/img/emoji/1f348.png b/dist/img/emoji/1f348.png index 07104ca498..74828a961d 100644 Binary files a/dist/img/emoji/1f348.png and b/dist/img/emoji/1f348.png differ diff --git a/dist/img/emoji/1f358.png b/dist/img/emoji/1f358.png index 905d6990da..8b37b183c6 100644 Binary files a/dist/img/emoji/1f358.png and b/dist/img/emoji/1f358.png differ diff --git a/dist/img/emoji/1f359.png b/dist/img/emoji/1f359.png index cba020e628..5967b79c68 100644 Binary files a/dist/img/emoji/1f359.png and b/dist/img/emoji/1f359.png differ diff --git a/dist/img/emoji/1f361.png b/dist/img/emoji/1f361.png index a2cc650378..e0ecb4383d 100644 Binary files a/dist/img/emoji/1f361.png and b/dist/img/emoji/1f361.png differ diff --git a/dist/img/emoji/1f36c.png b/dist/img/emoji/1f36c.png index 7a1e915a3f..68ef02219e 100644 Binary files a/dist/img/emoji/1f36c.png and b/dist/img/emoji/1f36c.png differ diff --git a/dist/img/emoji/1f376.png b/dist/img/emoji/1f376.png index f57a6ccbb5..2c5f5d8b6d 100644 Binary files a/dist/img/emoji/1f376.png and b/dist/img/emoji/1f376.png differ diff --git a/dist/img/emoji/1f377.png b/dist/img/emoji/1f377.png index 4cbe1d981e..84e8ac29a2 100644 Binary files a/dist/img/emoji/1f377.png and b/dist/img/emoji/1f377.png differ diff --git a/dist/img/emoji/1f388.png b/dist/img/emoji/1f388.png index 029adff861..e5652415bc 100644 Binary files a/dist/img/emoji/1f388.png and b/dist/img/emoji/1f388.png differ diff --git a/dist/img/emoji/1f396-fe0f.png b/dist/img/emoji/1f396-fe0f.png index 9ebf9930f4..e50457e79b 100644 Binary files a/dist/img/emoji/1f396-fe0f.png and b/dist/img/emoji/1f396-fe0f.png differ diff --git a/dist/img/emoji/1f396.png b/dist/img/emoji/1f396.png index 9ebf9930f4..e50457e79b 100644 Binary files a/dist/img/emoji/1f396.png and b/dist/img/emoji/1f396.png differ diff --git a/dist/img/emoji/1f39b.png b/dist/img/emoji/1f39b.png index 0b65c5b925..b9ec1a2fee 100644 Binary files a/dist/img/emoji/1f39b.png and b/dist/img/emoji/1f39b.png differ diff --git a/dist/img/emoji/1f3b2.png b/dist/img/emoji/1f3b2.png index 7cd0ea808a..d7f4eaa69f 100644 Binary files a/dist/img/emoji/1f3b2.png and b/dist/img/emoji/1f3b2.png differ diff --git a/dist/img/emoji/1f3b5.png b/dist/img/emoji/1f3b5.png index 889d9a3c37..64e1616ae6 100644 Binary files a/dist/img/emoji/1f3b5.png and b/dist/img/emoji/1f3b5.png differ diff --git a/dist/img/emoji/1f3c0.png b/dist/img/emoji/1f3c0.png index e077d43750..b0adeedb48 100644 Binary files a/dist/img/emoji/1f3c0.png and b/dist/img/emoji/1f3c0.png differ diff --git a/dist/img/emoji/1f3c3-1f3fb-200d-2640-fe0f.png b/dist/img/emoji/1f3c3-1f3fb-200d-2640-fe0f.png index 71ab8130a4..46deb8a4ec 100644 Binary files a/dist/img/emoji/1f3c3-1f3fb-200d-2640-fe0f.png and b/dist/img/emoji/1f3c3-1f3fb-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f3c3-1f3fb-200d-2640.png b/dist/img/emoji/1f3c3-1f3fb-200d-2640.png index 71ab8130a4..46deb8a4ec 100644 Binary files a/dist/img/emoji/1f3c3-1f3fb-200d-2640.png and b/dist/img/emoji/1f3c3-1f3fb-200d-2640.png differ diff --git a/dist/img/emoji/1f3c3-1f3fb-200d-2642-fe0f.png b/dist/img/emoji/1f3c3-1f3fb-200d-2642-fe0f.png index 70da5b18a3..5c38c6eec5 100644 Binary files a/dist/img/emoji/1f3c3-1f3fb-200d-2642-fe0f.png and b/dist/img/emoji/1f3c3-1f3fb-200d-2642-fe0f.png differ diff --git a/dist/img/emoji/1f3c3-1f3fb-200d-2642.png b/dist/img/emoji/1f3c3-1f3fb-200d-2642.png index 70da5b18a3..5c38c6eec5 100644 Binary files a/dist/img/emoji/1f3c3-1f3fb-200d-2642.png and b/dist/img/emoji/1f3c3-1f3fb-200d-2642.png differ diff --git a/dist/img/emoji/1f3c3-1f3fc-200d-2640-fe0f.png b/dist/img/emoji/1f3c3-1f3fc-200d-2640-fe0f.png index 876e172e44..594f35fcfe 100644 Binary files a/dist/img/emoji/1f3c3-1f3fc-200d-2640-fe0f.png and b/dist/img/emoji/1f3c3-1f3fc-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f3c3-1f3fc-200d-2640.png b/dist/img/emoji/1f3c3-1f3fc-200d-2640.png index 876e172e44..594f35fcfe 100644 Binary files a/dist/img/emoji/1f3c3-1f3fc-200d-2640.png and b/dist/img/emoji/1f3c3-1f3fc-200d-2640.png differ diff --git a/dist/img/emoji/1f3c3-1f3fc-200d-2642-fe0f.png b/dist/img/emoji/1f3c3-1f3fc-200d-2642-fe0f.png index dd909aef94..804da2bb5f 100644 Binary files a/dist/img/emoji/1f3c3-1f3fc-200d-2642-fe0f.png and b/dist/img/emoji/1f3c3-1f3fc-200d-2642-fe0f.png differ diff --git a/dist/img/emoji/1f3c3-1f3fc-200d-2642.png b/dist/img/emoji/1f3c3-1f3fc-200d-2642.png index dd909aef94..804da2bb5f 100644 Binary files a/dist/img/emoji/1f3c3-1f3fc-200d-2642.png and b/dist/img/emoji/1f3c3-1f3fc-200d-2642.png differ diff --git a/dist/img/emoji/1f3c3-1f3fd-200d-2640-fe0f.png b/dist/img/emoji/1f3c3-1f3fd-200d-2640-fe0f.png index 5c63e8b73a..ad80ad9222 100644 Binary files a/dist/img/emoji/1f3c3-1f3fd-200d-2640-fe0f.png and b/dist/img/emoji/1f3c3-1f3fd-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f3c3-1f3fd-200d-2640.png b/dist/img/emoji/1f3c3-1f3fd-200d-2640.png index 5c63e8b73a..ad80ad9222 100644 Binary files a/dist/img/emoji/1f3c3-1f3fd-200d-2640.png and b/dist/img/emoji/1f3c3-1f3fd-200d-2640.png differ diff --git a/dist/img/emoji/1f3c3-1f3fd-200d-2642-fe0f.png b/dist/img/emoji/1f3c3-1f3fd-200d-2642-fe0f.png index 3d8a78c1fc..d09dd7c864 100644 Binary files a/dist/img/emoji/1f3c3-1f3fd-200d-2642-fe0f.png and b/dist/img/emoji/1f3c3-1f3fd-200d-2642-fe0f.png differ diff --git a/dist/img/emoji/1f3c3-1f3fd-200d-2642.png b/dist/img/emoji/1f3c3-1f3fd-200d-2642.png index 3d8a78c1fc..d09dd7c864 100644 Binary files a/dist/img/emoji/1f3c3-1f3fd-200d-2642.png and b/dist/img/emoji/1f3c3-1f3fd-200d-2642.png differ diff --git a/dist/img/emoji/1f3c3-1f3fe-200d-2640-fe0f.png b/dist/img/emoji/1f3c3-1f3fe-200d-2640-fe0f.png index 93ed51e2e8..795bd8dd8b 100644 Binary files a/dist/img/emoji/1f3c3-1f3fe-200d-2640-fe0f.png and b/dist/img/emoji/1f3c3-1f3fe-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f3c3-1f3fe-200d-2640.png b/dist/img/emoji/1f3c3-1f3fe-200d-2640.png index 93ed51e2e8..795bd8dd8b 100644 Binary files a/dist/img/emoji/1f3c3-1f3fe-200d-2640.png and b/dist/img/emoji/1f3c3-1f3fe-200d-2640.png differ diff --git a/dist/img/emoji/1f3c3-1f3fe-200d-2642-fe0f.png b/dist/img/emoji/1f3c3-1f3fe-200d-2642-fe0f.png index 99353cab70..60f3e0c20a 100644 Binary files a/dist/img/emoji/1f3c3-1f3fe-200d-2642-fe0f.png and b/dist/img/emoji/1f3c3-1f3fe-200d-2642-fe0f.png differ diff --git a/dist/img/emoji/1f3c3-1f3fe-200d-2642.png b/dist/img/emoji/1f3c3-1f3fe-200d-2642.png index 99353cab70..60f3e0c20a 100644 Binary files a/dist/img/emoji/1f3c3-1f3fe-200d-2642.png and b/dist/img/emoji/1f3c3-1f3fe-200d-2642.png differ diff --git a/dist/img/emoji/1f3c3-1f3ff-200d-2640-fe0f.png b/dist/img/emoji/1f3c3-1f3ff-200d-2640-fe0f.png index ff5dd616ff..0940c1553f 100644 Binary files a/dist/img/emoji/1f3c3-1f3ff-200d-2640-fe0f.png and b/dist/img/emoji/1f3c3-1f3ff-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f3c3-1f3ff-200d-2640.png b/dist/img/emoji/1f3c3-1f3ff-200d-2640.png index ff5dd616ff..0940c1553f 100644 Binary files a/dist/img/emoji/1f3c3-1f3ff-200d-2640.png and b/dist/img/emoji/1f3c3-1f3ff-200d-2640.png differ diff --git a/dist/img/emoji/1f3c3-1f3ff-200d-2642-fe0f.png b/dist/img/emoji/1f3c3-1f3ff-200d-2642-fe0f.png index 4cfc66949f..af30cea15c 100644 Binary files a/dist/img/emoji/1f3c3-1f3ff-200d-2642-fe0f.png and b/dist/img/emoji/1f3c3-1f3ff-200d-2642-fe0f.png differ diff --git a/dist/img/emoji/1f3c3-1f3ff-200d-2642.png b/dist/img/emoji/1f3c3-1f3ff-200d-2642.png index 4cfc66949f..af30cea15c 100644 Binary files a/dist/img/emoji/1f3c3-1f3ff-200d-2642.png and b/dist/img/emoji/1f3c3-1f3ff-200d-2642.png differ diff --git a/dist/img/emoji/1f3c3-200d-2640-fe0f.png b/dist/img/emoji/1f3c3-200d-2640-fe0f.png index e80415f2f9..910818942a 100644 Binary files a/dist/img/emoji/1f3c3-200d-2640-fe0f.png and b/dist/img/emoji/1f3c3-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f3c3-200d-2640.png b/dist/img/emoji/1f3c3-200d-2640.png index e80415f2f9..910818942a 100644 Binary files a/dist/img/emoji/1f3c3-200d-2640.png and b/dist/img/emoji/1f3c3-200d-2640.png differ diff --git a/dist/img/emoji/1f3c3-200d-2642-fe0f.png b/dist/img/emoji/1f3c3-200d-2642-fe0f.png index fdf59bacd7..b05bd3da01 100644 Binary files a/dist/img/emoji/1f3c3-200d-2642-fe0f.png and b/dist/img/emoji/1f3c3-200d-2642-fe0f.png differ diff --git a/dist/img/emoji/1f3c3-200d-2642.png b/dist/img/emoji/1f3c3-200d-2642.png index fdf59bacd7..b05bd3da01 100644 Binary files a/dist/img/emoji/1f3c3-200d-2642.png and b/dist/img/emoji/1f3c3-200d-2642.png differ diff --git a/dist/img/emoji/1f3c8.png b/dist/img/emoji/1f3c8.png index fbcda65942..2882a4ec50 100644 Binary files a/dist/img/emoji/1f3c8.png and b/dist/img/emoji/1f3c8.png differ diff --git a/dist/img/emoji/1f3cc-1f3fb-200d-2640-fe0f.png b/dist/img/emoji/1f3cc-1f3fb-200d-2640-fe0f.png index 9485017645..f3885733d2 100644 Binary files a/dist/img/emoji/1f3cc-1f3fb-200d-2640-fe0f.png and b/dist/img/emoji/1f3cc-1f3fb-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f3cc-1f3fb-200d-2642-fe0f.png b/dist/img/emoji/1f3cc-1f3fb-200d-2642-fe0f.png index d87519f432..44f3bf5b00 100644 Binary files a/dist/img/emoji/1f3cc-1f3fb-200d-2642-fe0f.png and b/dist/img/emoji/1f3cc-1f3fb-200d-2642-fe0f.png differ diff --git a/dist/img/emoji/1f3cc-1f3fb.png b/dist/img/emoji/1f3cc-1f3fb.png index f3d26d63b1..b0a60717a9 100644 Binary files a/dist/img/emoji/1f3cc-1f3fb.png and b/dist/img/emoji/1f3cc-1f3fb.png differ diff --git a/dist/img/emoji/1f3cc-1f3fc-200d-2640-fe0f.png b/dist/img/emoji/1f3cc-1f3fc-200d-2640-fe0f.png index fafa60c73b..ad600b0959 100644 Binary files a/dist/img/emoji/1f3cc-1f3fc-200d-2640-fe0f.png and b/dist/img/emoji/1f3cc-1f3fc-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f3cc-1f3fc-200d-2642-fe0f.png b/dist/img/emoji/1f3cc-1f3fc-200d-2642-fe0f.png index 0ef76c75a4..0f01316895 100644 Binary files a/dist/img/emoji/1f3cc-1f3fc-200d-2642-fe0f.png and b/dist/img/emoji/1f3cc-1f3fc-200d-2642-fe0f.png differ diff --git a/dist/img/emoji/1f3cc-1f3fc.png b/dist/img/emoji/1f3cc-1f3fc.png index 532ee13737..ed2a43ac49 100644 Binary files a/dist/img/emoji/1f3cc-1f3fc.png and b/dist/img/emoji/1f3cc-1f3fc.png differ diff --git a/dist/img/emoji/1f3cc-1f3fd-200d-2640-fe0f.png b/dist/img/emoji/1f3cc-1f3fd-200d-2640-fe0f.png index 19557e30dd..80d4192a17 100644 Binary files a/dist/img/emoji/1f3cc-1f3fd-200d-2640-fe0f.png and b/dist/img/emoji/1f3cc-1f3fd-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f3cc-1f3fd-200d-2642-fe0f.png b/dist/img/emoji/1f3cc-1f3fd-200d-2642-fe0f.png index 3689d3527e..7db51d806d 100644 Binary files a/dist/img/emoji/1f3cc-1f3fd-200d-2642-fe0f.png and b/dist/img/emoji/1f3cc-1f3fd-200d-2642-fe0f.png differ diff --git a/dist/img/emoji/1f3cc-1f3fd.png b/dist/img/emoji/1f3cc-1f3fd.png index aa8dc9651e..c970d391fc 100644 Binary files a/dist/img/emoji/1f3cc-1f3fd.png and b/dist/img/emoji/1f3cc-1f3fd.png differ diff --git a/dist/img/emoji/1f3cc-1f3fe-200d-2640-fe0f.png b/dist/img/emoji/1f3cc-1f3fe-200d-2640-fe0f.png index 75ff6f082c..32919ce775 100644 Binary files a/dist/img/emoji/1f3cc-1f3fe-200d-2640-fe0f.png and b/dist/img/emoji/1f3cc-1f3fe-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f3cc-1f3fe-200d-2642-fe0f.png b/dist/img/emoji/1f3cc-1f3fe-200d-2642-fe0f.png index 695894dfbc..a12272073e 100644 Binary files a/dist/img/emoji/1f3cc-1f3fe-200d-2642-fe0f.png and b/dist/img/emoji/1f3cc-1f3fe-200d-2642-fe0f.png differ diff --git a/dist/img/emoji/1f3cc-1f3fe.png b/dist/img/emoji/1f3cc-1f3fe.png index 4085890828..5adaeac51c 100644 Binary files a/dist/img/emoji/1f3cc-1f3fe.png and b/dist/img/emoji/1f3cc-1f3fe.png differ diff --git a/dist/img/emoji/1f3cc-1f3ff-200d-2640-fe0f.png b/dist/img/emoji/1f3cc-1f3ff-200d-2640-fe0f.png index a80bd94d12..b4b9e1b51f 100644 Binary files a/dist/img/emoji/1f3cc-1f3ff-200d-2640-fe0f.png and b/dist/img/emoji/1f3cc-1f3ff-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f3cc-1f3ff-200d-2642-fe0f.png b/dist/img/emoji/1f3cc-1f3ff-200d-2642-fe0f.png index c169be2cc8..c602ff1137 100644 Binary files a/dist/img/emoji/1f3cc-1f3ff-200d-2642-fe0f.png and b/dist/img/emoji/1f3cc-1f3ff-200d-2642-fe0f.png differ diff --git a/dist/img/emoji/1f3cc-1f3ff.png b/dist/img/emoji/1f3cc-1f3ff.png index ef564249f7..2f03947d98 100644 Binary files a/dist/img/emoji/1f3cc-1f3ff.png and b/dist/img/emoji/1f3cc-1f3ff.png differ diff --git a/dist/img/emoji/1f3cc-fe0f-1f3fb-200d-2640.png b/dist/img/emoji/1f3cc-fe0f-1f3fb-200d-2640.png index 9485017645..f3885733d2 100644 Binary files a/dist/img/emoji/1f3cc-fe0f-1f3fb-200d-2640.png and b/dist/img/emoji/1f3cc-fe0f-1f3fb-200d-2640.png differ diff --git a/dist/img/emoji/1f3cc-fe0f-1f3fb-200d-2642.png b/dist/img/emoji/1f3cc-fe0f-1f3fb-200d-2642.png index d87519f432..44f3bf5b00 100644 Binary files a/dist/img/emoji/1f3cc-fe0f-1f3fb-200d-2642.png and b/dist/img/emoji/1f3cc-fe0f-1f3fb-200d-2642.png differ diff --git a/dist/img/emoji/1f3cc-fe0f-1f3fc-200d-2640.png b/dist/img/emoji/1f3cc-fe0f-1f3fc-200d-2640.png index fafa60c73b..ad600b0959 100644 Binary files a/dist/img/emoji/1f3cc-fe0f-1f3fc-200d-2640.png and b/dist/img/emoji/1f3cc-fe0f-1f3fc-200d-2640.png differ diff --git a/dist/img/emoji/1f3cc-fe0f-1f3fc-200d-2642.png b/dist/img/emoji/1f3cc-fe0f-1f3fc-200d-2642.png index 0ef76c75a4..0f01316895 100644 Binary files a/dist/img/emoji/1f3cc-fe0f-1f3fc-200d-2642.png and b/dist/img/emoji/1f3cc-fe0f-1f3fc-200d-2642.png differ diff --git a/dist/img/emoji/1f3cc-fe0f-1f3fd-200d-2640.png b/dist/img/emoji/1f3cc-fe0f-1f3fd-200d-2640.png index 19557e30dd..80d4192a17 100644 Binary files a/dist/img/emoji/1f3cc-fe0f-1f3fd-200d-2640.png and b/dist/img/emoji/1f3cc-fe0f-1f3fd-200d-2640.png differ diff --git a/dist/img/emoji/1f3cc-fe0f-1f3fd-200d-2642.png b/dist/img/emoji/1f3cc-fe0f-1f3fd-200d-2642.png index 3689d3527e..7db51d806d 100644 Binary files a/dist/img/emoji/1f3cc-fe0f-1f3fd-200d-2642.png and b/dist/img/emoji/1f3cc-fe0f-1f3fd-200d-2642.png differ diff --git a/dist/img/emoji/1f3cc-fe0f-1f3fe-200d-2640.png b/dist/img/emoji/1f3cc-fe0f-1f3fe-200d-2640.png index 75ff6f082c..32919ce775 100644 Binary files a/dist/img/emoji/1f3cc-fe0f-1f3fe-200d-2640.png and b/dist/img/emoji/1f3cc-fe0f-1f3fe-200d-2640.png differ diff --git a/dist/img/emoji/1f3cc-fe0f-1f3fe-200d-2642.png b/dist/img/emoji/1f3cc-fe0f-1f3fe-200d-2642.png index 695894dfbc..a12272073e 100644 Binary files a/dist/img/emoji/1f3cc-fe0f-1f3fe-200d-2642.png and b/dist/img/emoji/1f3cc-fe0f-1f3fe-200d-2642.png differ diff --git a/dist/img/emoji/1f3cc-fe0f-1f3ff-200d-2640.png b/dist/img/emoji/1f3cc-fe0f-1f3ff-200d-2640.png index a80bd94d12..b4b9e1b51f 100644 Binary files a/dist/img/emoji/1f3cc-fe0f-1f3ff-200d-2640.png and b/dist/img/emoji/1f3cc-fe0f-1f3ff-200d-2640.png differ diff --git a/dist/img/emoji/1f3cc-fe0f-1f3ff-200d-2642.png b/dist/img/emoji/1f3cc-fe0f-1f3ff-200d-2642.png index c169be2cc8..c602ff1137 100644 Binary files a/dist/img/emoji/1f3cc-fe0f-1f3ff-200d-2642.png and b/dist/img/emoji/1f3cc-fe0f-1f3ff-200d-2642.png differ diff --git a/dist/img/emoji/1f3cc-fe0f-200d-2640-fe0f.png b/dist/img/emoji/1f3cc-fe0f-200d-2640-fe0f.png index e383db8297..772e43f3b1 100644 Binary files a/dist/img/emoji/1f3cc-fe0f-200d-2640-fe0f.png and b/dist/img/emoji/1f3cc-fe0f-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f3cc-fe0f-200d-2640.png b/dist/img/emoji/1f3cc-fe0f-200d-2640.png index e383db8297..772e43f3b1 100644 Binary files a/dist/img/emoji/1f3cc-fe0f-200d-2640.png and b/dist/img/emoji/1f3cc-fe0f-200d-2640.png differ diff --git a/dist/img/emoji/1f3cc-fe0f-200d-2642-fe0f.png b/dist/img/emoji/1f3cc-fe0f-200d-2642-fe0f.png index 27f88c1439..9e56b90231 100644 Binary files a/dist/img/emoji/1f3cc-fe0f-200d-2642-fe0f.png and b/dist/img/emoji/1f3cc-fe0f-200d-2642-fe0f.png differ diff --git a/dist/img/emoji/1f3cc-fe0f-200d-2642.png b/dist/img/emoji/1f3cc-fe0f-200d-2642.png index 27f88c1439..9e56b90231 100644 Binary files a/dist/img/emoji/1f3cc-fe0f-200d-2642.png and b/dist/img/emoji/1f3cc-fe0f-200d-2642.png differ diff --git a/dist/img/emoji/1f3cc-fe0f.png b/dist/img/emoji/1f3cc-fe0f.png index 54fea9dcdb..4e208d4403 100644 Binary files a/dist/img/emoji/1f3cc-fe0f.png and b/dist/img/emoji/1f3cc-fe0f.png differ diff --git a/dist/img/emoji/1f3cc.png b/dist/img/emoji/1f3cc.png index 6440c598a0..4e208d4403 100644 Binary files a/dist/img/emoji/1f3cc.png and b/dist/img/emoji/1f3cc.png differ diff --git a/dist/img/emoji/1f3d1.png b/dist/img/emoji/1f3d1.png index 8391cf2499..607fb35a49 100644 Binary files a/dist/img/emoji/1f3d1.png and b/dist/img/emoji/1f3d1.png differ diff --git a/dist/img/emoji/1f3d9-fe0f.png b/dist/img/emoji/1f3d9-fe0f.png index 210d5fdab2..46be238cef 100644 Binary files a/dist/img/emoji/1f3d9-fe0f.png and b/dist/img/emoji/1f3d9-fe0f.png differ diff --git a/dist/img/emoji/1f3d9.png b/dist/img/emoji/1f3d9.png index 210d5fdab2..46be238cef 100644 Binary files a/dist/img/emoji/1f3d9.png and b/dist/img/emoji/1f3d9.png differ diff --git a/dist/img/emoji/1f3db.png b/dist/img/emoji/1f3db.png index 4929a515fc..40019ab7fa 100644 Binary files a/dist/img/emoji/1f3db.png and b/dist/img/emoji/1f3db.png differ diff --git a/dist/img/emoji/1f3ee.png b/dist/img/emoji/1f3ee.png index 7288c7f575..e064c78d9d 100644 Binary files a/dist/img/emoji/1f3ee.png and b/dist/img/emoji/1f3ee.png differ diff --git a/dist/img/emoji/1f3f0.png b/dist/img/emoji/1f3f0.png index cabb283799..f39cdf0fea 100644 Binary files a/dist/img/emoji/1f3f0.png and b/dist/img/emoji/1f3f0.png differ diff --git a/dist/img/emoji/1f3f7-fe0f.png b/dist/img/emoji/1f3f7-fe0f.png index 4e9c335e7e..aa1f3f3ad2 100644 Binary files a/dist/img/emoji/1f3f7-fe0f.png and b/dist/img/emoji/1f3f7-fe0f.png differ diff --git a/dist/img/emoji/1f3f7.png b/dist/img/emoji/1f3f7.png index c0c3e58f97..aa1f3f3ad2 100644 Binary files a/dist/img/emoji/1f3f7.png and b/dist/img/emoji/1f3f7.png differ diff --git a/dist/img/emoji/1f402.png b/dist/img/emoji/1f402.png index f3326fab24..8473db3784 100644 Binary files a/dist/img/emoji/1f402.png and b/dist/img/emoji/1f402.png differ diff --git a/dist/img/emoji/1f403.png b/dist/img/emoji/1f403.png index c9a90287e4..e64d589c63 100644 Binary files a/dist/img/emoji/1f403.png and b/dist/img/emoji/1f403.png differ diff --git a/dist/img/emoji/1f407.png b/dist/img/emoji/1f407.png index b3cac1eb37..b42141489b 100644 Binary files a/dist/img/emoji/1f407.png and b/dist/img/emoji/1f407.png differ diff --git a/dist/img/emoji/1f410.png b/dist/img/emoji/1f410.png index d4d709e2b3..19cdd764f8 100644 Binary files a/dist/img/emoji/1f410.png and b/dist/img/emoji/1f410.png differ diff --git a/dist/img/emoji/1f416.png b/dist/img/emoji/1f416.png index 2f74a8d028..e6db67be35 100644 Binary files a/dist/img/emoji/1f416.png and b/dist/img/emoji/1f416.png differ diff --git a/dist/img/emoji/1f418.png b/dist/img/emoji/1f418.png index 5fcf707ec6..d318ad328b 100644 Binary files a/dist/img/emoji/1f418.png and b/dist/img/emoji/1f418.png differ diff --git a/dist/img/emoji/1f424.png b/dist/img/emoji/1f424.png index bf3c955fb8..d04fb522a9 100644 Binary files a/dist/img/emoji/1f424.png and b/dist/img/emoji/1f424.png differ diff --git a/dist/img/emoji/1f426.png b/dist/img/emoji/1f426.png index eb3afe0547..ab58c57673 100644 Binary files a/dist/img/emoji/1f426.png and b/dist/img/emoji/1f426.png differ diff --git a/dist/img/emoji/1f427.png b/dist/img/emoji/1f427.png index fe3ee58edb..73940ce0ae 100644 Binary files a/dist/img/emoji/1f427.png and b/dist/img/emoji/1f427.png differ diff --git a/dist/img/emoji/1f42a.png b/dist/img/emoji/1f42a.png index abb0bbd20b..0494ac42c7 100644 Binary files a/dist/img/emoji/1f42a.png and b/dist/img/emoji/1f42a.png differ diff --git a/dist/img/emoji/1f442-1f3fb.png b/dist/img/emoji/1f442-1f3fb.png index e9aaa4e7eb..c7181fb425 100644 Binary files a/dist/img/emoji/1f442-1f3fb.png and b/dist/img/emoji/1f442-1f3fb.png differ diff --git a/dist/img/emoji/1f442.png b/dist/img/emoji/1f442.png index 1bedc1a542..ee7abd75ba 100644 Binary files a/dist/img/emoji/1f442.png and b/dist/img/emoji/1f442.png differ diff --git a/dist/img/emoji/1f444.png b/dist/img/emoji/1f444.png index a2a9dacbee..a796663e7a 100644 Binary files a/dist/img/emoji/1f444.png and b/dist/img/emoji/1f444.png differ diff --git a/dist/img/emoji/1f44a.png b/dist/img/emoji/1f44a.png index a93f44cae2..1f1f47f0e2 100644 Binary files a/dist/img/emoji/1f44a.png and b/dist/img/emoji/1f44a.png differ diff --git a/dist/img/emoji/1f44b-1f3fe.png b/dist/img/emoji/1f44b-1f3fe.png index e56d7bd04b..d0583e7d65 100644 Binary files a/dist/img/emoji/1f44b-1f3fe.png and b/dist/img/emoji/1f44b-1f3fe.png differ diff --git a/dist/img/emoji/1f44b-1f3ff.png b/dist/img/emoji/1f44b-1f3ff.png index 97220d1dfa..a839f3699b 100644 Binary files a/dist/img/emoji/1f44b-1f3ff.png and b/dist/img/emoji/1f44b-1f3ff.png differ diff --git a/dist/img/emoji/1f44c-1f3fb.png b/dist/img/emoji/1f44c-1f3fb.png index 694ee3ecec..117a5d779c 100644 Binary files a/dist/img/emoji/1f44c-1f3fb.png and b/dist/img/emoji/1f44c-1f3fb.png differ diff --git a/dist/img/emoji/1f44c-1f3fd.png b/dist/img/emoji/1f44c-1f3fd.png index 6c118ebc84..f62ba133e9 100644 Binary files a/dist/img/emoji/1f44c-1f3fd.png and b/dist/img/emoji/1f44c-1f3fd.png differ diff --git a/dist/img/emoji/1f44c.png b/dist/img/emoji/1f44c.png index 797ddd0cbe..f21e77c498 100644 Binary files a/dist/img/emoji/1f44c.png and b/dist/img/emoji/1f44c.png differ diff --git a/dist/img/emoji/1f44d-1f3fc.png b/dist/img/emoji/1f44d-1f3fc.png index 6327f9ea4e..db8f359c89 100644 Binary files a/dist/img/emoji/1f44d-1f3fc.png and b/dist/img/emoji/1f44d-1f3fc.png differ diff --git a/dist/img/emoji/1f44d.png b/dist/img/emoji/1f44d.png index 9d383935b6..81813ed9d1 100644 Binary files a/dist/img/emoji/1f44d.png and b/dist/img/emoji/1f44d.png differ diff --git a/dist/img/emoji/1f44e-1f3fb.png b/dist/img/emoji/1f44e-1f3fb.png index 09471f497a..3505e23076 100644 Binary files a/dist/img/emoji/1f44e-1f3fb.png and b/dist/img/emoji/1f44e-1f3fb.png differ diff --git a/dist/img/emoji/1f44e-1f3fc.png b/dist/img/emoji/1f44e-1f3fc.png index a7f9b5b2f7..f87879d7c6 100644 Binary files a/dist/img/emoji/1f44e-1f3fc.png and b/dist/img/emoji/1f44e-1f3fc.png differ diff --git a/dist/img/emoji/1f44e-1f3fd.png b/dist/img/emoji/1f44e-1f3fd.png index 5a4c985f38..5bdf98f24d 100644 Binary files a/dist/img/emoji/1f44e-1f3fd.png and b/dist/img/emoji/1f44e-1f3fd.png differ diff --git a/dist/img/emoji/1f44e.png b/dist/img/emoji/1f44e.png index a1c6bf8cfc..72386894ce 100644 Binary files a/dist/img/emoji/1f44e.png and b/dist/img/emoji/1f44e.png differ diff --git a/dist/img/emoji/1f44f-1f3fb.png b/dist/img/emoji/1f44f-1f3fb.png index eb973cc52d..432f2519b2 100644 Binary files a/dist/img/emoji/1f44f-1f3fb.png and b/dist/img/emoji/1f44f-1f3fb.png differ diff --git a/dist/img/emoji/1f44f-1f3fc.png b/dist/img/emoji/1f44f-1f3fc.png index 7c11bd5ff2..48028f168e 100644 Binary files a/dist/img/emoji/1f44f-1f3fc.png and b/dist/img/emoji/1f44f-1f3fc.png differ diff --git a/dist/img/emoji/1f44f-1f3fd.png b/dist/img/emoji/1f44f-1f3fd.png index 3ad32aaa6a..e0496cd7da 100644 Binary files a/dist/img/emoji/1f44f-1f3fd.png and b/dist/img/emoji/1f44f-1f3fd.png differ diff --git a/dist/img/emoji/1f44f-1f3fe.png b/dist/img/emoji/1f44f-1f3fe.png index 5b76d44495..8807a3e912 100644 Binary files a/dist/img/emoji/1f44f-1f3fe.png and b/dist/img/emoji/1f44f-1f3fe.png differ diff --git a/dist/img/emoji/1f44f-1f3ff.png b/dist/img/emoji/1f44f-1f3ff.png index 7b07d9d73e..1a38b8879a 100644 Binary files a/dist/img/emoji/1f44f-1f3ff.png and b/dist/img/emoji/1f44f-1f3ff.png differ diff --git a/dist/img/emoji/1f450.png b/dist/img/emoji/1f450.png index 5172d8528c..2f13111529 100644 Binary files a/dist/img/emoji/1f450.png and b/dist/img/emoji/1f450.png differ diff --git a/dist/img/emoji/1f453.png b/dist/img/emoji/1f453.png index 19cc495af5..56ec8ed450 100644 Binary files a/dist/img/emoji/1f453.png and b/dist/img/emoji/1f453.png differ diff --git a/dist/img/emoji/1f459.png b/dist/img/emoji/1f459.png index 74ffc86031..68b8bd905f 100644 Binary files a/dist/img/emoji/1f459.png and b/dist/img/emoji/1f459.png differ diff --git a/dist/img/emoji/1f45b.png b/dist/img/emoji/1f45b.png index 9af9a39f48..d5e9c12153 100644 Binary files a/dist/img/emoji/1f45b.png and b/dist/img/emoji/1f45b.png differ diff --git a/dist/img/emoji/1f461.png b/dist/img/emoji/1f461.png index 1bfd7f1ed3..4338ab31b1 100644 Binary files a/dist/img/emoji/1f461.png and b/dist/img/emoji/1f461.png differ diff --git a/dist/img/emoji/1f462.png b/dist/img/emoji/1f462.png index 177a8acca6..a0622fbca3 100644 Binary files a/dist/img/emoji/1f462.png and b/dist/img/emoji/1f462.png differ diff --git a/dist/img/emoji/1f465.png b/dist/img/emoji/1f465.png index 42d24ecc8e..650557f51b 100644 Binary files a/dist/img/emoji/1f465.png and b/dist/img/emoji/1f465.png differ diff --git a/dist/img/emoji/1f469-1f3fc-200d-1f9b1.png b/dist/img/emoji/1f469-1f3fc-200d-1f9b1.png index f38bf15ef7..483f331a92 100644 Binary files a/dist/img/emoji/1f469-1f3fc-200d-1f9b1.png and b/dist/img/emoji/1f469-1f3fc-200d-1f9b1.png differ diff --git a/dist/img/emoji/1f469-1f3fd-200d-1f9b1.png b/dist/img/emoji/1f469-1f3fd-200d-1f9b1.png index e182dbc922..aec38c68f6 100644 Binary files a/dist/img/emoji/1f469-1f3fd-200d-1f9b1.png and b/dist/img/emoji/1f469-1f3fd-200d-1f9b1.png differ diff --git a/dist/img/emoji/1f469-1f3fe-200d-1f9b1.png b/dist/img/emoji/1f469-1f3fe-200d-1f9b1.png index e4e06a3a35..02ec162f66 100644 Binary files a/dist/img/emoji/1f469-1f3fe-200d-1f9b1.png and b/dist/img/emoji/1f469-1f3fe-200d-1f9b1.png differ diff --git a/dist/img/emoji/1f469-1f3ff-200d-1f9b1.png b/dist/img/emoji/1f469-1f3ff-200d-1f9b1.png index 719c76a738..1ae8a1f09e 100644 Binary files a/dist/img/emoji/1f469-1f3ff-200d-1f9b1.png and b/dist/img/emoji/1f469-1f3ff-200d-1f9b1.png differ diff --git a/dist/img/emoji/1f469-200d-1f9b1.png b/dist/img/emoji/1f469-200d-1f9b1.png index ad74075a1d..b006eba06a 100644 Binary files a/dist/img/emoji/1f469-200d-1f9b1.png and b/dist/img/emoji/1f469-200d-1f9b1.png differ diff --git a/dist/img/emoji/1f479.png b/dist/img/emoji/1f479.png index d9c60a1474..b0aa8bcb28 100644 Binary files a/dist/img/emoji/1f479.png and b/dist/img/emoji/1f479.png differ diff --git a/dist/img/emoji/1f47e.png b/dist/img/emoji/1f47e.png index a92193a951..a09fa2560e 100644 Binary files a/dist/img/emoji/1f47e.png and b/dist/img/emoji/1f47e.png differ diff --git a/dist/img/emoji/1f488.png b/dist/img/emoji/1f488.png index ff60b8c006..f24fd35e9a 100644 Binary files a/dist/img/emoji/1f488.png and b/dist/img/emoji/1f488.png differ diff --git a/dist/img/emoji/1f489.png b/dist/img/emoji/1f489.png index 7aa63f1e9a..8a1353d3cb 100644 Binary files a/dist/img/emoji/1f489.png and b/dist/img/emoji/1f489.png differ diff --git a/dist/img/emoji/1f493.png b/dist/img/emoji/1f493.png index 306db7c6b9..5f182d881a 100644 Binary files a/dist/img/emoji/1f493.png and b/dist/img/emoji/1f493.png differ diff --git a/dist/img/emoji/1f495.png b/dist/img/emoji/1f495.png index 59cdfa6b9c..3fef45838f 100644 Binary files a/dist/img/emoji/1f495.png and b/dist/img/emoji/1f495.png differ diff --git a/dist/img/emoji/1f499.png b/dist/img/emoji/1f499.png index dccc5feaaa..4830a691a9 100644 Binary files a/dist/img/emoji/1f499.png and b/dist/img/emoji/1f499.png differ diff --git a/dist/img/emoji/1f49c.png b/dist/img/emoji/1f49c.png index 917d8e51c6..4e844eabf9 100644 Binary files a/dist/img/emoji/1f49c.png and b/dist/img/emoji/1f49c.png differ diff --git a/dist/img/emoji/1f4a7.png b/dist/img/emoji/1f4a7.png index 3b334fbdcd..14e9414ba8 100644 Binary files a/dist/img/emoji/1f4a7.png and b/dist/img/emoji/1f4a7.png differ diff --git a/dist/img/emoji/1f4aa.png b/dist/img/emoji/1f4aa.png index 21925fb906..ba827b4902 100644 Binary files a/dist/img/emoji/1f4aa.png and b/dist/img/emoji/1f4aa.png differ diff --git a/dist/img/emoji/1f4ab.png b/dist/img/emoji/1f4ab.png index b7d1e6ca6e..ccb10fc09b 100644 Binary files a/dist/img/emoji/1f4ab.png and b/dist/img/emoji/1f4ab.png differ diff --git a/dist/img/emoji/1f4af.png b/dist/img/emoji/1f4af.png index a68a622d04..6fef34b2b9 100644 Binary files a/dist/img/emoji/1f4af.png and b/dist/img/emoji/1f4af.png differ diff --git a/dist/img/emoji/1f4b9.png b/dist/img/emoji/1f4b9.png index dd95caf5d4..1590a6e481 100644 Binary files a/dist/img/emoji/1f4b9.png and b/dist/img/emoji/1f4b9.png differ diff --git a/dist/img/emoji/1f4bb.png b/dist/img/emoji/1f4bb.png index bf214e93c1..462bc9232b 100644 Binary files a/dist/img/emoji/1f4bb.png and b/dist/img/emoji/1f4bb.png differ diff --git a/dist/img/emoji/1f4c4.png b/dist/img/emoji/1f4c4.png index 7e1671da7f..8415b7a9be 100644 Binary files a/dist/img/emoji/1f4c4.png and b/dist/img/emoji/1f4c4.png differ diff --git a/dist/img/emoji/1f4c6.png b/dist/img/emoji/1f4c6.png index e007d1598b..ecc8320295 100644 Binary files a/dist/img/emoji/1f4c6.png and b/dist/img/emoji/1f4c6.png differ diff --git a/dist/img/emoji/1f4cf.png b/dist/img/emoji/1f4cf.png index 9ae899be18..7d0d0708f0 100644 Binary files a/dist/img/emoji/1f4cf.png and b/dist/img/emoji/1f4cf.png differ diff --git a/dist/img/emoji/1f4d0.png b/dist/img/emoji/1f4d0.png index 3e18f7cd63..a62bcb8cfa 100644 Binary files a/dist/img/emoji/1f4d0.png and b/dist/img/emoji/1f4d0.png differ diff --git a/dist/img/emoji/1f4d1.png b/dist/img/emoji/1f4d1.png index 7811c4fd77..ad23b8caeb 100644 Binary files a/dist/img/emoji/1f4d1.png and b/dist/img/emoji/1f4d1.png differ diff --git a/dist/img/emoji/1f4d3.png b/dist/img/emoji/1f4d3.png index e17208de9d..8079cc85fe 100644 Binary files a/dist/img/emoji/1f4d3.png and b/dist/img/emoji/1f4d3.png differ diff --git a/dist/img/emoji/1f4dc.png b/dist/img/emoji/1f4dc.png index df91a0feba..1d94f4431f 100644 Binary files a/dist/img/emoji/1f4dc.png and b/dist/img/emoji/1f4dc.png differ diff --git a/dist/img/emoji/1f4de.png b/dist/img/emoji/1f4de.png index 9a06c5ad8f..de291e02af 100644 Binary files a/dist/img/emoji/1f4de.png and b/dist/img/emoji/1f4de.png differ diff --git a/dist/img/emoji/1f4e0.png b/dist/img/emoji/1f4e0.png index 6673856689..b6340d1f21 100644 Binary files a/dist/img/emoji/1f4e0.png and b/dist/img/emoji/1f4e0.png differ diff --git a/dist/img/emoji/1f4ea.png b/dist/img/emoji/1f4ea.png index 83380e25d1..490cefe1fb 100644 Binary files a/dist/img/emoji/1f4ea.png and b/dist/img/emoji/1f4ea.png differ diff --git a/dist/img/emoji/1f4eb.png b/dist/img/emoji/1f4eb.png index 6373293352..d11074d501 100644 Binary files a/dist/img/emoji/1f4eb.png and b/dist/img/emoji/1f4eb.png differ diff --git a/dist/img/emoji/1f4ed.png b/dist/img/emoji/1f4ed.png index 6402ba26d5..6f9d5e6fd1 100644 Binary files a/dist/img/emoji/1f4ed.png and b/dist/img/emoji/1f4ed.png differ diff --git a/dist/img/emoji/1f4ee.png b/dist/img/emoji/1f4ee.png index 0b25440bb2..15b3ddfca2 100644 Binary files a/dist/img/emoji/1f4ee.png and b/dist/img/emoji/1f4ee.png differ diff --git a/dist/img/emoji/1f4f4.png b/dist/img/emoji/1f4f4.png index 2838c2af54..63cb7431d1 100644 Binary files a/dist/img/emoji/1f4f4.png and b/dist/img/emoji/1f4f4.png differ diff --git a/dist/img/emoji/1f502.png b/dist/img/emoji/1f502.png index 9e4834d3f0..1daec9bc64 100644 Binary files a/dist/img/emoji/1f502.png and b/dist/img/emoji/1f502.png differ diff --git a/dist/img/emoji/1f503.png b/dist/img/emoji/1f503.png index 8630268899..af8b97cfa7 100644 Binary files a/dist/img/emoji/1f503.png and b/dist/img/emoji/1f503.png differ diff --git a/dist/img/emoji/1f504.png b/dist/img/emoji/1f504.png index eed3ca6fba..aa684634a4 100644 Binary files a/dist/img/emoji/1f504.png and b/dist/img/emoji/1f504.png differ diff --git a/dist/img/emoji/1f506.png b/dist/img/emoji/1f506.png index 2831461d34..936b779f6d 100644 Binary files a/dist/img/emoji/1f506.png and b/dist/img/emoji/1f506.png differ diff --git a/dist/img/emoji/1f512.png b/dist/img/emoji/1f512.png index 8175b41a42..4c95868c53 100644 Binary files a/dist/img/emoji/1f512.png and b/dist/img/emoji/1f512.png differ diff --git a/dist/img/emoji/1f513.png b/dist/img/emoji/1f513.png index 1387932db0..4b1846e0f6 100644 Binary files a/dist/img/emoji/1f513.png and b/dist/img/emoji/1f513.png differ diff --git a/dist/img/emoji/1f520.png b/dist/img/emoji/1f520.png index b58e3a50d7..6c33822e86 100644 Binary files a/dist/img/emoji/1f520.png and b/dist/img/emoji/1f520.png differ diff --git a/dist/img/emoji/1f521.png b/dist/img/emoji/1f521.png index 615b9fc3f0..2f3fe5c7e0 100644 Binary files a/dist/img/emoji/1f521.png and b/dist/img/emoji/1f521.png differ diff --git a/dist/img/emoji/1f522.png b/dist/img/emoji/1f522.png index efa209db63..c0ab3497f5 100644 Binary files a/dist/img/emoji/1f522.png and b/dist/img/emoji/1f522.png differ diff --git a/dist/img/emoji/1f523.png b/dist/img/emoji/1f523.png index a13945475a..a1f2aad17c 100644 Binary files a/dist/img/emoji/1f523.png and b/dist/img/emoji/1f523.png differ diff --git a/dist/img/emoji/1f527.png b/dist/img/emoji/1f527.png index e89127688d..2e6b28cb48 100644 Binary files a/dist/img/emoji/1f527.png and b/dist/img/emoji/1f527.png differ diff --git a/dist/img/emoji/1f528.png b/dist/img/emoji/1f528.png index e26456ce97..10cadbcb5b 100644 Binary files a/dist/img/emoji/1f528.png and b/dist/img/emoji/1f528.png differ diff --git a/dist/img/emoji/1f52a.png b/dist/img/emoji/1f52a.png index 9f19627119..8516c2cde9 100644 Binary files a/dist/img/emoji/1f52a.png and b/dist/img/emoji/1f52a.png differ diff --git a/dist/img/emoji/1f52f.png b/dist/img/emoji/1f52f.png index b9c17b6741..667a61672e 100644 Binary files a/dist/img/emoji/1f52f.png and b/dist/img/emoji/1f52f.png differ diff --git a/dist/img/emoji/1f549-fe0f.png b/dist/img/emoji/1f549-fe0f.png index 5f4ea188e1..a85e9afba4 100644 Binary files a/dist/img/emoji/1f549-fe0f.png and b/dist/img/emoji/1f549-fe0f.png differ diff --git a/dist/img/emoji/1f549.png b/dist/img/emoji/1f549.png index 7aef1b460d..a85e9afba4 100644 Binary files a/dist/img/emoji/1f549.png and b/dist/img/emoji/1f549.png differ diff --git a/dist/img/emoji/1f54b.png b/dist/img/emoji/1f54b.png index daccb6f6af..7d6a5e00ce 100644 Binary files a/dist/img/emoji/1f54b.png and b/dist/img/emoji/1f54b.png differ diff --git a/dist/img/emoji/1f56f-fe0f.png b/dist/img/emoji/1f56f-fe0f.png index 27f86423e3..afca6706ab 100644 Binary files a/dist/img/emoji/1f56f-fe0f.png and b/dist/img/emoji/1f56f-fe0f.png differ diff --git a/dist/img/emoji/1f56f.png b/dist/img/emoji/1f56f.png index 27f86423e3..afca6706ab 100644 Binary files a/dist/img/emoji/1f56f.png and b/dist/img/emoji/1f56f.png differ diff --git a/dist/img/emoji/1f574-1f3fb.png b/dist/img/emoji/1f574-1f3fb.png index b6eb16a541..38a17ea011 100644 Binary files a/dist/img/emoji/1f574-1f3fb.png and b/dist/img/emoji/1f574-1f3fb.png differ diff --git a/dist/img/emoji/1f574-1f3fc.png b/dist/img/emoji/1f574-1f3fc.png index 7bbda7313b..c984649bc0 100644 Binary files a/dist/img/emoji/1f574-1f3fc.png and b/dist/img/emoji/1f574-1f3fc.png differ diff --git a/dist/img/emoji/1f574-1f3fd.png b/dist/img/emoji/1f574-1f3fd.png index 5b869ec051..75691b5570 100644 Binary files a/dist/img/emoji/1f574-1f3fd.png and b/dist/img/emoji/1f574-1f3fd.png differ diff --git a/dist/img/emoji/1f574-1f3fe.png b/dist/img/emoji/1f574-1f3fe.png index cf46073a95..a3e9899e8c 100644 Binary files a/dist/img/emoji/1f574-1f3fe.png and b/dist/img/emoji/1f574-1f3fe.png differ diff --git a/dist/img/emoji/1f574-1f3ff.png b/dist/img/emoji/1f574-1f3ff.png index 365ba42916..287fc0348d 100644 Binary files a/dist/img/emoji/1f574-1f3ff.png and b/dist/img/emoji/1f574-1f3ff.png differ diff --git a/dist/img/emoji/1f574.png b/dist/img/emoji/1f574.png index 36a505408b..49919af287 100644 Binary files a/dist/img/emoji/1f574.png and b/dist/img/emoji/1f574.png differ diff --git a/dist/img/emoji/1f579-fe0f.png b/dist/img/emoji/1f579-fe0f.png index c45b53c779..9eb04425e2 100644 Binary files a/dist/img/emoji/1f579-fe0f.png and b/dist/img/emoji/1f579-fe0f.png differ diff --git a/dist/img/emoji/1f579.png b/dist/img/emoji/1f579.png index c45b53c779..9eb04425e2 100644 Binary files a/dist/img/emoji/1f579.png and b/dist/img/emoji/1f579.png differ diff --git a/dist/img/emoji/1f57a-1f3fb.png b/dist/img/emoji/1f57a-1f3fb.png index 61156d702a..b1beb9329f 100644 Binary files a/dist/img/emoji/1f57a-1f3fb.png and b/dist/img/emoji/1f57a-1f3fb.png differ diff --git a/dist/img/emoji/1f57a-1f3fc.png b/dist/img/emoji/1f57a-1f3fc.png index 8ba85d2c66..588885f3ea 100644 Binary files a/dist/img/emoji/1f57a-1f3fc.png and b/dist/img/emoji/1f57a-1f3fc.png differ diff --git a/dist/img/emoji/1f57a-1f3fd.png b/dist/img/emoji/1f57a-1f3fd.png index 0474bc2664..dce67237f7 100644 Binary files a/dist/img/emoji/1f57a-1f3fd.png and b/dist/img/emoji/1f57a-1f3fd.png differ diff --git a/dist/img/emoji/1f57a-1f3fe.png b/dist/img/emoji/1f57a-1f3fe.png index 20e83a6050..d245b1f59c 100644 Binary files a/dist/img/emoji/1f57a-1f3fe.png and b/dist/img/emoji/1f57a-1f3fe.png differ diff --git a/dist/img/emoji/1f57a-1f3ff.png b/dist/img/emoji/1f57a-1f3ff.png index 53876ee5e4..fdaafd1079 100644 Binary files a/dist/img/emoji/1f57a-1f3ff.png and b/dist/img/emoji/1f57a-1f3ff.png differ diff --git a/dist/img/emoji/1f57a.png b/dist/img/emoji/1f57a.png index 862cf34366..026e104c05 100644 Binary files a/dist/img/emoji/1f57a.png and b/dist/img/emoji/1f57a.png differ diff --git a/dist/img/emoji/1f58d-fe0f.png b/dist/img/emoji/1f58d-fe0f.png index fdb5fc65e8..0d36ea13c8 100644 Binary files a/dist/img/emoji/1f58d-fe0f.png and b/dist/img/emoji/1f58d-fe0f.png differ diff --git a/dist/img/emoji/1f58d.png b/dist/img/emoji/1f58d.png index fdb5fc65e8..0d36ea13c8 100644 Binary files a/dist/img/emoji/1f58d.png and b/dist/img/emoji/1f58d.png differ diff --git a/dist/img/emoji/1f590-1f3fb.png b/dist/img/emoji/1f590-1f3fb.png index 03da1abfa6..3113e091dd 100644 Binary files a/dist/img/emoji/1f590-1f3fb.png and b/dist/img/emoji/1f590-1f3fb.png differ diff --git a/dist/img/emoji/1f590-1f3fc.png b/dist/img/emoji/1f590-1f3fc.png index bf4b7f7e58..fa8e26d2cd 100644 Binary files a/dist/img/emoji/1f590-1f3fc.png and b/dist/img/emoji/1f590-1f3fc.png differ diff --git a/dist/img/emoji/1f590-1f3fd.png b/dist/img/emoji/1f590-1f3fd.png index f48d9c86ad..6874e29791 100644 Binary files a/dist/img/emoji/1f590-1f3fd.png and b/dist/img/emoji/1f590-1f3fd.png differ diff --git a/dist/img/emoji/1f590-1f3fe.png b/dist/img/emoji/1f590-1f3fe.png index 7e436b0c61..dbc000ccd4 100644 Binary files a/dist/img/emoji/1f590-1f3fe.png and b/dist/img/emoji/1f590-1f3fe.png differ diff --git a/dist/img/emoji/1f590-fe0f.png b/dist/img/emoji/1f590-fe0f.png index b66d8bc3ae..cd48deceef 100644 Binary files a/dist/img/emoji/1f590-fe0f.png and b/dist/img/emoji/1f590-fe0f.png differ diff --git a/dist/img/emoji/1f590.png b/dist/img/emoji/1f590.png index b66d8bc3ae..cd48deceef 100644 Binary files a/dist/img/emoji/1f590.png and b/dist/img/emoji/1f590.png differ diff --git a/dist/img/emoji/1f596-1f3fb.png b/dist/img/emoji/1f596-1f3fb.png index 7f1b195bfb..3d96845f56 100644 Binary files a/dist/img/emoji/1f596-1f3fb.png and b/dist/img/emoji/1f596-1f3fb.png differ diff --git a/dist/img/emoji/1f596-1f3fc.png b/dist/img/emoji/1f596-1f3fc.png index eba7805527..1e8926ac42 100644 Binary files a/dist/img/emoji/1f596-1f3fc.png and b/dist/img/emoji/1f596-1f3fc.png differ diff --git a/dist/img/emoji/1f596-1f3fd.png b/dist/img/emoji/1f596-1f3fd.png index 79c7e2f29b..68837f6f37 100644 Binary files a/dist/img/emoji/1f596-1f3fd.png and b/dist/img/emoji/1f596-1f3fd.png differ diff --git a/dist/img/emoji/1f596-1f3fe.png b/dist/img/emoji/1f596-1f3fe.png index 40b9131d64..adf18e1d05 100644 Binary files a/dist/img/emoji/1f596-1f3fe.png and b/dist/img/emoji/1f596-1f3fe.png differ diff --git a/dist/img/emoji/1f596.png b/dist/img/emoji/1f596.png index 9537142efd..94c7812e97 100644 Binary files a/dist/img/emoji/1f596.png and b/dist/img/emoji/1f596.png differ diff --git a/dist/img/emoji/1f5a4.png b/dist/img/emoji/1f5a4.png index 5361619c46..c743476770 100644 Binary files a/dist/img/emoji/1f5a4.png and b/dist/img/emoji/1f5a4.png differ diff --git a/dist/img/emoji/1f5d1.png b/dist/img/emoji/1f5d1.png index dc623210dc..1e9279243d 100644 Binary files a/dist/img/emoji/1f5d1.png and b/dist/img/emoji/1f5d1.png differ diff --git a/dist/img/emoji/1f5e1-fe0f.png b/dist/img/emoji/1f5e1-fe0f.png index 5d0f3b6dab..354a3dd297 100644 Binary files a/dist/img/emoji/1f5e1-fe0f.png and b/dist/img/emoji/1f5e1-fe0f.png differ diff --git a/dist/img/emoji/1f5fb.png b/dist/img/emoji/1f5fb.png index 8661908326..b785d20ed5 100644 Binary files a/dist/img/emoji/1f5fb.png and b/dist/img/emoji/1f5fb.png differ diff --git a/dist/img/emoji/1f621.png b/dist/img/emoji/1f621.png index a34034d2d4..8ded645a66 100644 Binary files a/dist/img/emoji/1f621.png and b/dist/img/emoji/1f621.png differ diff --git a/dist/img/emoji/1f64c-1f3fb.png b/dist/img/emoji/1f64c-1f3fb.png index 20836aad28..c133fcbab0 100644 Binary files a/dist/img/emoji/1f64c-1f3fb.png and b/dist/img/emoji/1f64c-1f3fb.png differ diff --git a/dist/img/emoji/1f64c-1f3fc.png b/dist/img/emoji/1f64c-1f3fc.png index 0a012f7c54..bfee03929d 100644 Binary files a/dist/img/emoji/1f64c-1f3fc.png and b/dist/img/emoji/1f64c-1f3fc.png differ diff --git a/dist/img/emoji/1f64c-1f3fd.png b/dist/img/emoji/1f64c-1f3fd.png index d7a02c51e6..7edb7ea6cb 100644 Binary files a/dist/img/emoji/1f64c-1f3fd.png and b/dist/img/emoji/1f64c-1f3fd.png differ diff --git a/dist/img/emoji/1f64c-1f3fe.png b/dist/img/emoji/1f64c-1f3fe.png index 9508dc0563..71397e5db8 100644 Binary files a/dist/img/emoji/1f64c-1f3fe.png and b/dist/img/emoji/1f64c-1f3fe.png differ diff --git a/dist/img/emoji/1f64c-1f3ff.png b/dist/img/emoji/1f64c-1f3ff.png index d98135e334..96e70ce29a 100644 Binary files a/dist/img/emoji/1f64c-1f3ff.png and b/dist/img/emoji/1f64c-1f3ff.png differ diff --git a/dist/img/emoji/1f64d-1f3ff-200d-2642-fe0f.png b/dist/img/emoji/1f64d-1f3ff-200d-2642-fe0f.png index e21e099ece..30f7de04c4 100644 Binary files a/dist/img/emoji/1f64d-1f3ff-200d-2642-fe0f.png and b/dist/img/emoji/1f64d-1f3ff-200d-2642-fe0f.png differ diff --git a/dist/img/emoji/1f64d-1f3ff-200d-2642.png b/dist/img/emoji/1f64d-1f3ff-200d-2642.png index e21e099ece..30f7de04c4 100644 Binary files a/dist/img/emoji/1f64d-1f3ff-200d-2642.png and b/dist/img/emoji/1f64d-1f3ff-200d-2642.png differ diff --git a/dist/img/emoji/1f64e-1f3ff-200d-2642-fe0f.png b/dist/img/emoji/1f64e-1f3ff-200d-2642-fe0f.png index 4f04a4f41b..6980e7b311 100644 Binary files a/dist/img/emoji/1f64e-1f3ff-200d-2642-fe0f.png and b/dist/img/emoji/1f64e-1f3ff-200d-2642-fe0f.png differ diff --git a/dist/img/emoji/1f64e-1f3ff-200d-2642.png b/dist/img/emoji/1f64e-1f3ff-200d-2642.png index 4f04a4f41b..6980e7b311 100644 Binary files a/dist/img/emoji/1f64e-1f3ff-200d-2642.png and b/dist/img/emoji/1f64e-1f3ff-200d-2642.png differ diff --git a/dist/img/emoji/1f64f-1f3fb.png b/dist/img/emoji/1f64f-1f3fb.png index 66ab349133..d730272de5 100644 Binary files a/dist/img/emoji/1f64f-1f3fb.png and b/dist/img/emoji/1f64f-1f3fb.png differ diff --git a/dist/img/emoji/1f64f-1f3fc.png b/dist/img/emoji/1f64f-1f3fc.png index 5566459cd5..3464fb00cf 100644 Binary files a/dist/img/emoji/1f64f-1f3fc.png and b/dist/img/emoji/1f64f-1f3fc.png differ diff --git a/dist/img/emoji/1f64f-1f3fd.png b/dist/img/emoji/1f64f-1f3fd.png index 2867c2481d..6382205a25 100644 Binary files a/dist/img/emoji/1f64f-1f3fd.png and b/dist/img/emoji/1f64f-1f3fd.png differ diff --git a/dist/img/emoji/1f64f.png b/dist/img/emoji/1f64f.png index b2939acc35..9d027a62d2 100644 Binary files a/dist/img/emoji/1f64f.png and b/dist/img/emoji/1f64f.png differ diff --git a/dist/img/emoji/1f68f.png b/dist/img/emoji/1f68f.png index b9d261b4d5..0c1d498716 100644 Binary files a/dist/img/emoji/1f68f.png and b/dist/img/emoji/1f68f.png differ diff --git a/dist/img/emoji/1f6a1.png b/dist/img/emoji/1f6a1.png index 1b03845500..6b120f4f0e 100644 Binary files a/dist/img/emoji/1f6a1.png and b/dist/img/emoji/1f6a1.png differ diff --git a/dist/img/emoji/1f6a3-1f3fb-200d-2640-fe0f.png b/dist/img/emoji/1f6a3-1f3fb-200d-2640-fe0f.png index b0a62d552c..199e186090 100644 Binary files a/dist/img/emoji/1f6a3-1f3fb-200d-2640-fe0f.png and b/dist/img/emoji/1f6a3-1f3fb-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f6a3-1f3fb-200d-2640.png b/dist/img/emoji/1f6a3-1f3fb-200d-2640.png index b0a62d552c..199e186090 100644 Binary files a/dist/img/emoji/1f6a3-1f3fb-200d-2640.png and b/dist/img/emoji/1f6a3-1f3fb-200d-2640.png differ diff --git a/dist/img/emoji/1f6a3-1f3fc-200d-2640-fe0f.png b/dist/img/emoji/1f6a3-1f3fc-200d-2640-fe0f.png index c6dbb18dd6..61be54f0fe 100644 Binary files a/dist/img/emoji/1f6a3-1f3fc-200d-2640-fe0f.png and b/dist/img/emoji/1f6a3-1f3fc-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f6a3-1f3fc-200d-2640.png b/dist/img/emoji/1f6a3-1f3fc-200d-2640.png index c6dbb18dd6..61be54f0fe 100644 Binary files a/dist/img/emoji/1f6a3-1f3fc-200d-2640.png and b/dist/img/emoji/1f6a3-1f3fc-200d-2640.png differ diff --git a/dist/img/emoji/1f6a3-1f3fd-200d-2640-fe0f.png b/dist/img/emoji/1f6a3-1f3fd-200d-2640-fe0f.png index 5d071cfb63..7efee635b2 100644 Binary files a/dist/img/emoji/1f6a3-1f3fd-200d-2640-fe0f.png and b/dist/img/emoji/1f6a3-1f3fd-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f6a3-1f3fd-200d-2640.png b/dist/img/emoji/1f6a3-1f3fd-200d-2640.png index 5d071cfb63..7efee635b2 100644 Binary files a/dist/img/emoji/1f6a3-1f3fd-200d-2640.png and b/dist/img/emoji/1f6a3-1f3fd-200d-2640.png differ diff --git a/dist/img/emoji/1f6a3-1f3fe-200d-2640-fe0f.png b/dist/img/emoji/1f6a3-1f3fe-200d-2640-fe0f.png index 01652938b7..a9df5ec035 100644 Binary files a/dist/img/emoji/1f6a3-1f3fe-200d-2640-fe0f.png and b/dist/img/emoji/1f6a3-1f3fe-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f6a3-1f3fe-200d-2640.png b/dist/img/emoji/1f6a3-1f3fe-200d-2640.png index 01652938b7..a9df5ec035 100644 Binary files a/dist/img/emoji/1f6a3-1f3fe-200d-2640.png and b/dist/img/emoji/1f6a3-1f3fe-200d-2640.png differ diff --git a/dist/img/emoji/1f6a3-1f3ff-200d-2640-fe0f.png b/dist/img/emoji/1f6a3-1f3ff-200d-2640-fe0f.png index aa2d02fe4f..3bbc46d0b5 100644 Binary files a/dist/img/emoji/1f6a3-1f3ff-200d-2640-fe0f.png and b/dist/img/emoji/1f6a3-1f3ff-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f6a3-1f3ff-200d-2640.png b/dist/img/emoji/1f6a3-1f3ff-200d-2640.png index aa2d02fe4f..3bbc46d0b5 100644 Binary files a/dist/img/emoji/1f6a3-1f3ff-200d-2640.png and b/dist/img/emoji/1f6a3-1f3ff-200d-2640.png differ diff --git a/dist/img/emoji/1f6a3-200d-2640-fe0f.png b/dist/img/emoji/1f6a3-200d-2640-fe0f.png index 3c350e13ae..39866a22b1 100644 Binary files a/dist/img/emoji/1f6a3-200d-2640-fe0f.png and b/dist/img/emoji/1f6a3-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f6a3-200d-2640.png b/dist/img/emoji/1f6a3-200d-2640.png index 3c350e13ae..39866a22b1 100644 Binary files a/dist/img/emoji/1f6a3-200d-2640.png and b/dist/img/emoji/1f6a3-200d-2640.png differ diff --git a/dist/img/emoji/1f6a4.png b/dist/img/emoji/1f6a4.png index 29385b0ab4..73241575bb 100644 Binary files a/dist/img/emoji/1f6a4.png and b/dist/img/emoji/1f6a4.png differ diff --git a/dist/img/emoji/1f6aa.png b/dist/img/emoji/1f6aa.png index beafc2ca3e..6f5c73e741 100644 Binary files a/dist/img/emoji/1f6aa.png and b/dist/img/emoji/1f6aa.png differ diff --git a/dist/img/emoji/1f6b5-1f3fb-200d-2642.png b/dist/img/emoji/1f6b5-1f3fb-200d-2642.png index cbb4b0cbb4..aad1af3a45 100644 Binary files a/dist/img/emoji/1f6b5-1f3fb-200d-2642.png and b/dist/img/emoji/1f6b5-1f3fb-200d-2642.png differ diff --git a/dist/img/emoji/1f6b5-1f3fb.png b/dist/img/emoji/1f6b5-1f3fb.png index 6f29572f1f..f5b52e82fa 100644 Binary files a/dist/img/emoji/1f6b5-1f3fb.png and b/dist/img/emoji/1f6b5-1f3fb.png differ diff --git a/dist/img/emoji/1f6b5-1f3fc-200d-2640.png b/dist/img/emoji/1f6b5-1f3fc-200d-2640.png index f10c006cca..302c940672 100644 Binary files a/dist/img/emoji/1f6b5-1f3fc-200d-2640.png and b/dist/img/emoji/1f6b5-1f3fc-200d-2640.png differ diff --git a/dist/img/emoji/1f6b5-1f3fc-200d-2642.png b/dist/img/emoji/1f6b5-1f3fc-200d-2642.png index 4806e67627..1a5af7b2e5 100644 Binary files a/dist/img/emoji/1f6b5-1f3fc-200d-2642.png and b/dist/img/emoji/1f6b5-1f3fc-200d-2642.png differ diff --git a/dist/img/emoji/1f6b5-1f3fc.png b/dist/img/emoji/1f6b5-1f3fc.png index cfd46dd059..3df9f52550 100644 Binary files a/dist/img/emoji/1f6b5-1f3fc.png and b/dist/img/emoji/1f6b5-1f3fc.png differ diff --git a/dist/img/emoji/1f6b5-1f3fd-200d-2642.png b/dist/img/emoji/1f6b5-1f3fd-200d-2642.png index c25cdd560e..323f28ddea 100644 Binary files a/dist/img/emoji/1f6b5-1f3fd-200d-2642.png and b/dist/img/emoji/1f6b5-1f3fd-200d-2642.png differ diff --git a/dist/img/emoji/1f6b5-1f3fd.png b/dist/img/emoji/1f6b5-1f3fd.png index 405b8cfafe..8d73ba6ea9 100644 Binary files a/dist/img/emoji/1f6b5-1f3fd.png and b/dist/img/emoji/1f6b5-1f3fd.png differ diff --git a/dist/img/emoji/1f6b5-1f3fe-200d-2642.png b/dist/img/emoji/1f6b5-1f3fe-200d-2642.png index 246a241109..45ae90736d 100644 Binary files a/dist/img/emoji/1f6b5-1f3fe-200d-2642.png and b/dist/img/emoji/1f6b5-1f3fe-200d-2642.png differ diff --git a/dist/img/emoji/1f6b5-1f3fe.png b/dist/img/emoji/1f6b5-1f3fe.png index e31df49b98..9053ca39b9 100644 Binary files a/dist/img/emoji/1f6b5-1f3fe.png and b/dist/img/emoji/1f6b5-1f3fe.png differ diff --git a/dist/img/emoji/1f6b5-1f3ff-200d-2642.png b/dist/img/emoji/1f6b5-1f3ff-200d-2642.png index b408feba7d..1af1d8fd05 100644 Binary files a/dist/img/emoji/1f6b5-1f3ff-200d-2642.png and b/dist/img/emoji/1f6b5-1f3ff-200d-2642.png differ diff --git a/dist/img/emoji/1f6b5-1f3ff.png b/dist/img/emoji/1f6b5-1f3ff.png index 6386b7e3c2..98dc6e97a4 100644 Binary files a/dist/img/emoji/1f6b5-1f3ff.png and b/dist/img/emoji/1f6b5-1f3ff.png differ diff --git a/dist/img/emoji/1f6b5-200d-2642.png b/dist/img/emoji/1f6b5-200d-2642.png index efcf5b2a9f..f3361abc26 100644 Binary files a/dist/img/emoji/1f6b5-200d-2642.png and b/dist/img/emoji/1f6b5-200d-2642.png differ diff --git a/dist/img/emoji/1f6b5.png b/dist/img/emoji/1f6b5.png index 722e3b70bc..8e0ddf2782 100644 Binary files a/dist/img/emoji/1f6b5.png and b/dist/img/emoji/1f6b5.png differ diff --git a/dist/img/emoji/1f6b6-1f3fb.png b/dist/img/emoji/1f6b6-1f3fb.png index 450cbe339d..b407ea96e2 100644 Binary files a/dist/img/emoji/1f6b6-1f3fb.png and b/dist/img/emoji/1f6b6-1f3fb.png differ diff --git a/dist/img/emoji/1f6b6-1f3fc.png b/dist/img/emoji/1f6b6-1f3fc.png index a1d3a81f73..574a7e1c14 100644 Binary files a/dist/img/emoji/1f6b6-1f3fc.png and b/dist/img/emoji/1f6b6-1f3fc.png differ diff --git a/dist/img/emoji/1f6b6-1f3fd.png b/dist/img/emoji/1f6b6-1f3fd.png index 50783e3618..9afcfff747 100644 Binary files a/dist/img/emoji/1f6b6-1f3fd.png and b/dist/img/emoji/1f6b6-1f3fd.png differ diff --git a/dist/img/emoji/1f6b6-1f3fe.png b/dist/img/emoji/1f6b6-1f3fe.png index 6f0439ee74..d9dc90829a 100644 Binary files a/dist/img/emoji/1f6b6-1f3fe.png and b/dist/img/emoji/1f6b6-1f3fe.png differ diff --git a/dist/img/emoji/1f6b6-1f3ff.png b/dist/img/emoji/1f6b6-1f3ff.png index 738f6d5178..02afb52b02 100644 Binary files a/dist/img/emoji/1f6b6-1f3ff.png and b/dist/img/emoji/1f6b6-1f3ff.png differ diff --git a/dist/img/emoji/1f6b6.png b/dist/img/emoji/1f6b6.png index 6397ef6d09..f6b9b102e2 100644 Binary files a/dist/img/emoji/1f6b6.png and b/dist/img/emoji/1f6b6.png differ diff --git a/dist/img/emoji/1f6b8.png b/dist/img/emoji/1f6b8.png index 3767163cdc..8d5f985c4b 100644 Binary files a/dist/img/emoji/1f6b8.png and b/dist/img/emoji/1f6b8.png differ diff --git a/dist/img/emoji/1f6bd.png b/dist/img/emoji/1f6bd.png index 62c9beabeb..9bb889dba0 100644 Binary files a/dist/img/emoji/1f6bd.png and b/dist/img/emoji/1f6bd.png differ diff --git a/dist/img/emoji/1f6cc-1f3fb.png b/dist/img/emoji/1f6cc-1f3fb.png index 696649af04..de2406c656 100644 Binary files a/dist/img/emoji/1f6cc-1f3fb.png and b/dist/img/emoji/1f6cc-1f3fb.png differ diff --git a/dist/img/emoji/1f6cc-1f3fc.png b/dist/img/emoji/1f6cc-1f3fc.png index 696649af04..de2406c656 100644 Binary files a/dist/img/emoji/1f6cc-1f3fc.png and b/dist/img/emoji/1f6cc-1f3fc.png differ diff --git a/dist/img/emoji/1f6cc-1f3fd.png b/dist/img/emoji/1f6cc-1f3fd.png index 696649af04..de2406c656 100644 Binary files a/dist/img/emoji/1f6cc-1f3fd.png and b/dist/img/emoji/1f6cc-1f3fd.png differ diff --git a/dist/img/emoji/1f6cc-1f3fe.png b/dist/img/emoji/1f6cc-1f3fe.png index 696649af04..de2406c656 100644 Binary files a/dist/img/emoji/1f6cc-1f3fe.png and b/dist/img/emoji/1f6cc-1f3fe.png differ diff --git a/dist/img/emoji/1f6cc-1f3ff.png b/dist/img/emoji/1f6cc-1f3ff.png index 696649af04..de2406c656 100644 Binary files a/dist/img/emoji/1f6cc-1f3ff.png and b/dist/img/emoji/1f6cc-1f3ff.png differ diff --git a/dist/img/emoji/1f6cc.png b/dist/img/emoji/1f6cc.png index 696649af04..de2406c656 100644 Binary files a/dist/img/emoji/1f6cc.png and b/dist/img/emoji/1f6cc.png differ diff --git a/dist/img/emoji/1f6cf-fe0f.png b/dist/img/emoji/1f6cf-fe0f.png index 0ad1bc1369..f9199eb7a6 100644 Binary files a/dist/img/emoji/1f6cf-fe0f.png and b/dist/img/emoji/1f6cf-fe0f.png differ diff --git a/dist/img/emoji/1f6cf.png b/dist/img/emoji/1f6cf.png index 0ad1bc1369..f9199eb7a6 100644 Binary files a/dist/img/emoji/1f6cf.png and b/dist/img/emoji/1f6cf.png differ diff --git a/dist/img/emoji/1f6eb.png b/dist/img/emoji/1f6eb.png index b47850a89d..79ab0a11f4 100644 Binary files a/dist/img/emoji/1f6eb.png and b/dist/img/emoji/1f6eb.png differ diff --git a/dist/img/emoji/1f6ec.png b/dist/img/emoji/1f6ec.png index ddfb43a1a9..a16999c3f2 100644 Binary files a/dist/img/emoji/1f6ec.png and b/dist/img/emoji/1f6ec.png differ diff --git a/dist/img/emoji/1f6f6.png b/dist/img/emoji/1f6f6.png index dea037627b..816ab89439 100644 Binary files a/dist/img/emoji/1f6f6.png and b/dist/img/emoji/1f6f6.png differ diff --git a/dist/img/emoji/1f6f8.png b/dist/img/emoji/1f6f8.png index c806f57b8a..5c12f387c3 100644 Binary files a/dist/img/emoji/1f6f8.png and b/dist/img/emoji/1f6f8.png differ diff --git a/dist/img/emoji/1f6f9.png b/dist/img/emoji/1f6f9.png index 6d4fb4f392..c2dffd9cb5 100644 Binary files a/dist/img/emoji/1f6f9.png and b/dist/img/emoji/1f6f9.png differ diff --git a/dist/img/emoji/1f90c-1f3fb.png b/dist/img/emoji/1f90c-1f3fb.png index 22dd452b14..dc1cc1fff5 100644 Binary files a/dist/img/emoji/1f90c-1f3fb.png and b/dist/img/emoji/1f90c-1f3fb.png differ diff --git a/dist/img/emoji/1f90c-1f3fc.png b/dist/img/emoji/1f90c-1f3fc.png index a28f5d7456..009f248bcc 100644 Binary files a/dist/img/emoji/1f90c-1f3fc.png and b/dist/img/emoji/1f90c-1f3fc.png differ diff --git a/dist/img/emoji/1f90c-1f3fd.png b/dist/img/emoji/1f90c-1f3fd.png index f460b7b84d..ffa8ffc313 100644 Binary files a/dist/img/emoji/1f90c-1f3fd.png and b/dist/img/emoji/1f90c-1f3fd.png differ diff --git a/dist/img/emoji/1f90c-1f3fe.png b/dist/img/emoji/1f90c-1f3fe.png index eda3354578..06319d540f 100644 Binary files a/dist/img/emoji/1f90c-1f3fe.png and b/dist/img/emoji/1f90c-1f3fe.png differ diff --git a/dist/img/emoji/1f90c.png b/dist/img/emoji/1f90c.png index d53e870e86..834a0b3922 100644 Binary files a/dist/img/emoji/1f90c.png and b/dist/img/emoji/1f90c.png differ diff --git a/dist/img/emoji/1f90f.png b/dist/img/emoji/1f90f.png index 034e5a6e9a..5655ad086b 100644 Binary files a/dist/img/emoji/1f90f.png and b/dist/img/emoji/1f90f.png differ diff --git a/dist/img/emoji/1f918.png b/dist/img/emoji/1f918.png index 6acb2a8d2b..da1046c2a8 100644 Binary files a/dist/img/emoji/1f918.png and b/dist/img/emoji/1f918.png differ diff --git a/dist/img/emoji/1f919.png b/dist/img/emoji/1f919.png index 1927bb29e8..2d287c09c1 100644 Binary files a/dist/img/emoji/1f919.png and b/dist/img/emoji/1f919.png differ diff --git a/dist/img/emoji/1f91a-1f3fb.png b/dist/img/emoji/1f91a-1f3fb.png index 46a274d288..fdac4d2df3 100644 Binary files a/dist/img/emoji/1f91a-1f3fb.png and b/dist/img/emoji/1f91a-1f3fb.png differ diff --git a/dist/img/emoji/1f91a-1f3fd.png b/dist/img/emoji/1f91a-1f3fd.png index 1ba73fc8d1..2ca61fed37 100644 Binary files a/dist/img/emoji/1f91a-1f3fd.png and b/dist/img/emoji/1f91a-1f3fd.png differ diff --git a/dist/img/emoji/1f91a.png b/dist/img/emoji/1f91a.png index d9dab059bc..9bb9389368 100644 Binary files a/dist/img/emoji/1f91a.png and b/dist/img/emoji/1f91a.png differ diff --git a/dist/img/emoji/1f91d-1f3fb.png b/dist/img/emoji/1f91d-1f3fb.png index 1ff1a5c351..c9fc8091df 100644 Binary files a/dist/img/emoji/1f91d-1f3fb.png and b/dist/img/emoji/1f91d-1f3fb.png differ diff --git a/dist/img/emoji/1f91d-1f3fc.png b/dist/img/emoji/1f91d-1f3fc.png index 5852571396..59c37b5ef0 100644 Binary files a/dist/img/emoji/1f91d-1f3fc.png and b/dist/img/emoji/1f91d-1f3fc.png differ diff --git a/dist/img/emoji/1f91d-1f3fd.png b/dist/img/emoji/1f91d-1f3fd.png index 5b8dce8321..6346d1dde2 100644 Binary files a/dist/img/emoji/1f91d-1f3fd.png and b/dist/img/emoji/1f91d-1f3fd.png differ diff --git a/dist/img/emoji/1f91d-1f3fe.png b/dist/img/emoji/1f91d-1f3fe.png index 446a7ac671..c8a21620ec 100644 Binary files a/dist/img/emoji/1f91d-1f3fe.png and b/dist/img/emoji/1f91d-1f3fe.png differ diff --git a/dist/img/emoji/1f91d-1f3ff.png b/dist/img/emoji/1f91d-1f3ff.png index 7bfcb3c561..9ac4f1bdbe 100644 Binary files a/dist/img/emoji/1f91d-1f3ff.png and b/dist/img/emoji/1f91d-1f3ff.png differ diff --git a/dist/img/emoji/1f91e-1f3fb.png b/dist/img/emoji/1f91e-1f3fb.png index 2c33c19045..34e15d316c 100644 Binary files a/dist/img/emoji/1f91e-1f3fb.png and b/dist/img/emoji/1f91e-1f3fb.png differ diff --git a/dist/img/emoji/1f91e-1f3fd.png b/dist/img/emoji/1f91e-1f3fd.png index e421e8818f..f457db94a6 100644 Binary files a/dist/img/emoji/1f91e-1f3fd.png and b/dist/img/emoji/1f91e-1f3fd.png differ diff --git a/dist/img/emoji/1f91e.png b/dist/img/emoji/1f91e.png index 5b71018a4a..743a3bdb9c 100644 Binary files a/dist/img/emoji/1f91e.png and b/dist/img/emoji/1f91e.png differ diff --git a/dist/img/emoji/1f91f-1f3fb.png b/dist/img/emoji/1f91f-1f3fb.png index 809c91fee2..2ba7612e57 100644 Binary files a/dist/img/emoji/1f91f-1f3fb.png and b/dist/img/emoji/1f91f-1f3fb.png differ diff --git a/dist/img/emoji/1f91f-1f3fc.png b/dist/img/emoji/1f91f-1f3fc.png index 55f2008629..1a848e15c1 100644 Binary files a/dist/img/emoji/1f91f-1f3fc.png and b/dist/img/emoji/1f91f-1f3fc.png differ diff --git a/dist/img/emoji/1f91f-1f3fd.png b/dist/img/emoji/1f91f-1f3fd.png index ec84902802..6b59054632 100644 Binary files a/dist/img/emoji/1f91f-1f3fd.png and b/dist/img/emoji/1f91f-1f3fd.png differ diff --git a/dist/img/emoji/1f91f-1f3fe.png b/dist/img/emoji/1f91f-1f3fe.png index 4838e9299d..179c223bea 100644 Binary files a/dist/img/emoji/1f91f-1f3fe.png and b/dist/img/emoji/1f91f-1f3fe.png differ diff --git a/dist/img/emoji/1f933-1f3fb.png b/dist/img/emoji/1f933-1f3fb.png index 7dfdc37811..b5fa8b3e02 100644 Binary files a/dist/img/emoji/1f933-1f3fb.png and b/dist/img/emoji/1f933-1f3fb.png differ diff --git a/dist/img/emoji/1f933-1f3fc.png b/dist/img/emoji/1f933-1f3fc.png index 32b01bad8d..d9efe45406 100644 Binary files a/dist/img/emoji/1f933-1f3fc.png and b/dist/img/emoji/1f933-1f3fc.png differ diff --git a/dist/img/emoji/1f933-1f3fd.png b/dist/img/emoji/1f933-1f3fd.png index b56cc9d828..6c19f6d929 100644 Binary files a/dist/img/emoji/1f933-1f3fd.png and b/dist/img/emoji/1f933-1f3fd.png differ diff --git a/dist/img/emoji/1f933-1f3fe.png b/dist/img/emoji/1f933-1f3fe.png index 728a2c0d0c..f4b84e500e 100644 Binary files a/dist/img/emoji/1f933-1f3fe.png and b/dist/img/emoji/1f933-1f3fe.png differ diff --git a/dist/img/emoji/1f933-1f3ff.png b/dist/img/emoji/1f933-1f3ff.png index ccf2bc0a8c..3fe98db28b 100644 Binary files a/dist/img/emoji/1f933-1f3ff.png and b/dist/img/emoji/1f933-1f3ff.png differ diff --git a/dist/img/emoji/1f933.png b/dist/img/emoji/1f933.png index 4e2abdfefb..a45bf9e467 100644 Binary files a/dist/img/emoji/1f933.png and b/dist/img/emoji/1f933.png differ diff --git a/dist/img/emoji/1f938-1f3fb.png b/dist/img/emoji/1f938-1f3fb.png index a9b4fef546..9a782dffcd 100644 Binary files a/dist/img/emoji/1f938-1f3fb.png and b/dist/img/emoji/1f938-1f3fb.png differ diff --git a/dist/img/emoji/1f938-1f3fc.png b/dist/img/emoji/1f938-1f3fc.png index 9b89938a9b..a8b800e660 100644 Binary files a/dist/img/emoji/1f938-1f3fc.png and b/dist/img/emoji/1f938-1f3fc.png differ diff --git a/dist/img/emoji/1f938-1f3fd.png b/dist/img/emoji/1f938-1f3fd.png index 951a8ac061..4090f35cf3 100644 Binary files a/dist/img/emoji/1f938-1f3fd.png and b/dist/img/emoji/1f938-1f3fd.png differ diff --git a/dist/img/emoji/1f938-1f3fe.png b/dist/img/emoji/1f938-1f3fe.png index b1ac07eacd..7d179f45fc 100644 Binary files a/dist/img/emoji/1f938-1f3fe.png and b/dist/img/emoji/1f938-1f3fe.png differ diff --git a/dist/img/emoji/1f938-1f3ff.png b/dist/img/emoji/1f938-1f3ff.png index 8832c2f705..f91269fcd1 100644 Binary files a/dist/img/emoji/1f938-1f3ff.png and b/dist/img/emoji/1f938-1f3ff.png differ diff --git a/dist/img/emoji/1f938.png b/dist/img/emoji/1f938.png index 34fa2064fe..9f60f88204 100644 Binary files a/dist/img/emoji/1f938.png and b/dist/img/emoji/1f938.png differ diff --git a/dist/img/emoji/1f944.png b/dist/img/emoji/1f944.png index fe0d3c2ed3..e54cf52b0d 100644 Binary files a/dist/img/emoji/1f944.png and b/dist/img/emoji/1f944.png differ diff --git a/dist/img/emoji/1f947.png b/dist/img/emoji/1f947.png index b9e8b03863..278a3f8e4f 100644 Binary files a/dist/img/emoji/1f947.png and b/dist/img/emoji/1f947.png differ diff --git a/dist/img/emoji/1f948.png b/dist/img/emoji/1f948.png index c88a61a997..3fd76d0006 100644 Binary files a/dist/img/emoji/1f948.png and b/dist/img/emoji/1f948.png differ diff --git a/dist/img/emoji/1f957.png b/dist/img/emoji/1f957.png index c1df968517..4f7e20ab5a 100644 Binary files a/dist/img/emoji/1f957.png and b/dist/img/emoji/1f957.png differ diff --git a/dist/img/emoji/1f95a.png b/dist/img/emoji/1f95a.png index 74c6ada451..382555fc14 100644 Binary files a/dist/img/emoji/1f95a.png and b/dist/img/emoji/1f95a.png differ diff --git a/dist/img/emoji/1f95c.png b/dist/img/emoji/1f95c.png index 56fae56fc7..8aa924627b 100644 Binary files a/dist/img/emoji/1f95c.png and b/dist/img/emoji/1f95c.png differ diff --git a/dist/img/emoji/1f95d.png b/dist/img/emoji/1f95d.png index d44450c16a..a1dae26c8c 100644 Binary files a/dist/img/emoji/1f95d.png and b/dist/img/emoji/1f95d.png differ diff --git a/dist/img/emoji/1f964.png b/dist/img/emoji/1f964.png index f805fe3110..d102a34783 100644 Binary files a/dist/img/emoji/1f964.png and b/dist/img/emoji/1f964.png differ diff --git a/dist/img/emoji/1f966.png b/dist/img/emoji/1f966.png index 75bd0f748a..bba136c97b 100644 Binary files a/dist/img/emoji/1f966.png and b/dist/img/emoji/1f966.png differ diff --git a/dist/img/emoji/1f96e.png b/dist/img/emoji/1f96e.png index 467ed5a0db..1e931bcb51 100644 Binary files a/dist/img/emoji/1f96e.png and b/dist/img/emoji/1f96e.png differ diff --git a/dist/img/emoji/1f97b.png b/dist/img/emoji/1f97b.png index 246003b9f1..0052508cd4 100644 Binary files a/dist/img/emoji/1f97b.png and b/dist/img/emoji/1f97b.png differ diff --git a/dist/img/emoji/1f9a9.png b/dist/img/emoji/1f9a9.png index 73fe692840..9fd4042d93 100644 Binary files a/dist/img/emoji/1f9a9.png and b/dist/img/emoji/1f9a9.png differ diff --git a/dist/img/emoji/1f9ad.png b/dist/img/emoji/1f9ad.png index e293d3d0e8..c5ed2924cb 100644 Binary files a/dist/img/emoji/1f9ad.png and b/dist/img/emoji/1f9ad.png differ diff --git a/dist/img/emoji/1f9b0.png b/dist/img/emoji/1f9b0.png index 685ea67ff4..a465ef3988 100644 Binary files a/dist/img/emoji/1f9b0.png and b/dist/img/emoji/1f9b0.png differ diff --git a/dist/img/emoji/1f9b2.png b/dist/img/emoji/1f9b2.png index 7ec36c424e..2ed9a76b3f 100644 Binary files a/dist/img/emoji/1f9b2.png and b/dist/img/emoji/1f9b2.png differ diff --git a/dist/img/emoji/1f9b3.png b/dist/img/emoji/1f9b3.png index d3e89ef789..4789190896 100644 Binary files a/dist/img/emoji/1f9b3.png and b/dist/img/emoji/1f9b3.png differ diff --git a/dist/img/emoji/1f9b4.png b/dist/img/emoji/1f9b4.png index 6b9432857b..2fe52e1e1c 100644 Binary files a/dist/img/emoji/1f9b4.png and b/dist/img/emoji/1f9b4.png differ diff --git a/dist/img/emoji/1f9b6-1f3fb.png b/dist/img/emoji/1f9b6-1f3fb.png index 2276f2021d..2a0a5b88d7 100644 Binary files a/dist/img/emoji/1f9b6-1f3fb.png and b/dist/img/emoji/1f9b6-1f3fb.png differ diff --git a/dist/img/emoji/1f9b6-1f3fc.png b/dist/img/emoji/1f9b6-1f3fc.png index f1ac9640ec..7f9513ced0 100644 Binary files a/dist/img/emoji/1f9b6-1f3fc.png and b/dist/img/emoji/1f9b6-1f3fc.png differ diff --git a/dist/img/emoji/1f9b6-1f3fd.png b/dist/img/emoji/1f9b6-1f3fd.png index ccf834b75a..3b3e0e8cc2 100644 Binary files a/dist/img/emoji/1f9b6-1f3fd.png and b/dist/img/emoji/1f9b6-1f3fd.png differ diff --git a/dist/img/emoji/1f9b6-1f3fe.png b/dist/img/emoji/1f9b6-1f3fe.png index 566afb8f10..f7b52100e1 100644 Binary files a/dist/img/emoji/1f9b6-1f3fe.png and b/dist/img/emoji/1f9b6-1f3fe.png differ diff --git a/dist/img/emoji/1f9b6-1f3ff.png b/dist/img/emoji/1f9b6-1f3ff.png index 1efda90f37..6618d5f6fd 100644 Binary files a/dist/img/emoji/1f9b6-1f3ff.png and b/dist/img/emoji/1f9b6-1f3ff.png differ diff --git a/dist/img/emoji/1f9b6.png b/dist/img/emoji/1f9b6.png index 5c11c14566..35ad39bd9a 100644 Binary files a/dist/img/emoji/1f9b6.png and b/dist/img/emoji/1f9b6.png differ diff --git a/dist/img/emoji/1f9bb-1f3ff.png b/dist/img/emoji/1f9bb-1f3ff.png index c68d9dabb3..451da4a43e 100644 Binary files a/dist/img/emoji/1f9bb-1f3ff.png and b/dist/img/emoji/1f9bb-1f3ff.png differ diff --git a/dist/img/emoji/1f9bd.png b/dist/img/emoji/1f9bd.png index e80c0c6b0b..9a6d950b0d 100644 Binary files a/dist/img/emoji/1f9bd.png and b/dist/img/emoji/1f9bd.png differ diff --git a/dist/img/emoji/1f9be.png b/dist/img/emoji/1f9be.png index c43431c38e..e75b6ccd9b 100644 Binary files a/dist/img/emoji/1f9be.png and b/dist/img/emoji/1f9be.png differ diff --git a/dist/img/emoji/1f9c8.png b/dist/img/emoji/1f9c8.png index fbc185be9b..5eb6b9603a 100644 Binary files a/dist/img/emoji/1f9c8.png and b/dist/img/emoji/1f9c8.png differ diff --git a/dist/img/emoji/1f9cd-1f3fb-200d-2640-fe0f.png b/dist/img/emoji/1f9cd-1f3fb-200d-2640-fe0f.png index 9e955a4cf8..283f0d9f25 100644 Binary files a/dist/img/emoji/1f9cd-1f3fb-200d-2640-fe0f.png and b/dist/img/emoji/1f9cd-1f3fb-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f9cd-1f3fb-200d-2640.png b/dist/img/emoji/1f9cd-1f3fb-200d-2640.png index d4cdf98985..283f0d9f25 100644 Binary files a/dist/img/emoji/1f9cd-1f3fb-200d-2640.png and b/dist/img/emoji/1f9cd-1f3fb-200d-2640.png differ diff --git a/dist/img/emoji/1f9cd-1f3fb-200d-2642-fe0f.png b/dist/img/emoji/1f9cd-1f3fb-200d-2642-fe0f.png index 9808452f63..58fec38eb1 100644 Binary files a/dist/img/emoji/1f9cd-1f3fb-200d-2642-fe0f.png and b/dist/img/emoji/1f9cd-1f3fb-200d-2642-fe0f.png differ diff --git a/dist/img/emoji/1f9cd-1f3fb-200d-2642.png b/dist/img/emoji/1f9cd-1f3fb-200d-2642.png index d7859add02..58fec38eb1 100644 Binary files a/dist/img/emoji/1f9cd-1f3fb-200d-2642.png and b/dist/img/emoji/1f9cd-1f3fb-200d-2642.png differ diff --git a/dist/img/emoji/1f9cd-1f3fb.png b/dist/img/emoji/1f9cd-1f3fb.png index 5b4f72bd90..3188ec0e88 100644 Binary files a/dist/img/emoji/1f9cd-1f3fb.png and b/dist/img/emoji/1f9cd-1f3fb.png differ diff --git a/dist/img/emoji/1f9cd-1f3fc-200d-2640-fe0f.png b/dist/img/emoji/1f9cd-1f3fc-200d-2640-fe0f.png index 253e5c6564..8fa73bad89 100644 Binary files a/dist/img/emoji/1f9cd-1f3fc-200d-2640-fe0f.png and b/dist/img/emoji/1f9cd-1f3fc-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f9cd-1f3fc-200d-2640.png b/dist/img/emoji/1f9cd-1f3fc-200d-2640.png index 66a928913f..8fa73bad89 100644 Binary files a/dist/img/emoji/1f9cd-1f3fc-200d-2640.png and b/dist/img/emoji/1f9cd-1f3fc-200d-2640.png differ diff --git a/dist/img/emoji/1f9cd-1f3fc-200d-2642-fe0f.png b/dist/img/emoji/1f9cd-1f3fc-200d-2642-fe0f.png index 9ada2c5ff8..880df7c7b8 100644 Binary files a/dist/img/emoji/1f9cd-1f3fc-200d-2642-fe0f.png and b/dist/img/emoji/1f9cd-1f3fc-200d-2642-fe0f.png differ diff --git a/dist/img/emoji/1f9cd-1f3fc-200d-2642.png b/dist/img/emoji/1f9cd-1f3fc-200d-2642.png index 074716f835..880df7c7b8 100644 Binary files a/dist/img/emoji/1f9cd-1f3fc-200d-2642.png and b/dist/img/emoji/1f9cd-1f3fc-200d-2642.png differ diff --git a/dist/img/emoji/1f9cd-1f3fc.png b/dist/img/emoji/1f9cd-1f3fc.png index 903977a128..e328505bac 100644 Binary files a/dist/img/emoji/1f9cd-1f3fc.png and b/dist/img/emoji/1f9cd-1f3fc.png differ diff --git a/dist/img/emoji/1f9cd-1f3fd-200d-2640-fe0f.png b/dist/img/emoji/1f9cd-1f3fd-200d-2640-fe0f.png index e70c15736a..deaae49e01 100644 Binary files a/dist/img/emoji/1f9cd-1f3fd-200d-2640-fe0f.png and b/dist/img/emoji/1f9cd-1f3fd-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f9cd-1f3fd-200d-2640.png b/dist/img/emoji/1f9cd-1f3fd-200d-2640.png index 6d6bfd2492..deaae49e01 100644 Binary files a/dist/img/emoji/1f9cd-1f3fd-200d-2640.png and b/dist/img/emoji/1f9cd-1f3fd-200d-2640.png differ diff --git a/dist/img/emoji/1f9cd-1f3fd-200d-2642-fe0f.png b/dist/img/emoji/1f9cd-1f3fd-200d-2642-fe0f.png index 2af4ce862e..2b462dab35 100644 Binary files a/dist/img/emoji/1f9cd-1f3fd-200d-2642-fe0f.png and b/dist/img/emoji/1f9cd-1f3fd-200d-2642-fe0f.png differ diff --git a/dist/img/emoji/1f9cd-1f3fd-200d-2642.png b/dist/img/emoji/1f9cd-1f3fd-200d-2642.png index eac54076a0..2b462dab35 100644 Binary files a/dist/img/emoji/1f9cd-1f3fd-200d-2642.png and b/dist/img/emoji/1f9cd-1f3fd-200d-2642.png differ diff --git a/dist/img/emoji/1f9cd-1f3fd.png b/dist/img/emoji/1f9cd-1f3fd.png index debee07813..a9e8da2300 100644 Binary files a/dist/img/emoji/1f9cd-1f3fd.png and b/dist/img/emoji/1f9cd-1f3fd.png differ diff --git a/dist/img/emoji/1f9cd-1f3fe-200d-2640-fe0f.png b/dist/img/emoji/1f9cd-1f3fe-200d-2640-fe0f.png index 8bb725bd71..c4caacbfdb 100644 Binary files a/dist/img/emoji/1f9cd-1f3fe-200d-2640-fe0f.png and b/dist/img/emoji/1f9cd-1f3fe-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f9cd-1f3fe-200d-2640.png b/dist/img/emoji/1f9cd-1f3fe-200d-2640.png index 4b935b1488..c4caacbfdb 100644 Binary files a/dist/img/emoji/1f9cd-1f3fe-200d-2640.png and b/dist/img/emoji/1f9cd-1f3fe-200d-2640.png differ diff --git a/dist/img/emoji/1f9cd-1f3fe-200d-2642-fe0f.png b/dist/img/emoji/1f9cd-1f3fe-200d-2642-fe0f.png index 9d5165e1ee..5ef7478a2c 100644 Binary files a/dist/img/emoji/1f9cd-1f3fe-200d-2642-fe0f.png and b/dist/img/emoji/1f9cd-1f3fe-200d-2642-fe0f.png differ diff --git a/dist/img/emoji/1f9cd-1f3fe-200d-2642.png b/dist/img/emoji/1f9cd-1f3fe-200d-2642.png index c4a8f71259..5ef7478a2c 100644 Binary files a/dist/img/emoji/1f9cd-1f3fe-200d-2642.png and b/dist/img/emoji/1f9cd-1f3fe-200d-2642.png differ diff --git a/dist/img/emoji/1f9cd-1f3fe.png b/dist/img/emoji/1f9cd-1f3fe.png index b94cea3264..1011b6f3b7 100644 Binary files a/dist/img/emoji/1f9cd-1f3fe.png and b/dist/img/emoji/1f9cd-1f3fe.png differ diff --git a/dist/img/emoji/1f9cd-1f3ff-200d-2640-fe0f.png b/dist/img/emoji/1f9cd-1f3ff-200d-2640-fe0f.png index 48306d53ae..3add6aa1ef 100644 Binary files a/dist/img/emoji/1f9cd-1f3ff-200d-2640-fe0f.png and b/dist/img/emoji/1f9cd-1f3ff-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f9cd-1f3ff-200d-2640.png b/dist/img/emoji/1f9cd-1f3ff-200d-2640.png index b34bb1c9ce..3add6aa1ef 100644 Binary files a/dist/img/emoji/1f9cd-1f3ff-200d-2640.png and b/dist/img/emoji/1f9cd-1f3ff-200d-2640.png differ diff --git a/dist/img/emoji/1f9cd-1f3ff-200d-2642-fe0f.png b/dist/img/emoji/1f9cd-1f3ff-200d-2642-fe0f.png index fcbabae250..ac1eec5427 100644 Binary files a/dist/img/emoji/1f9cd-1f3ff-200d-2642-fe0f.png and b/dist/img/emoji/1f9cd-1f3ff-200d-2642-fe0f.png differ diff --git a/dist/img/emoji/1f9cd-1f3ff-200d-2642.png b/dist/img/emoji/1f9cd-1f3ff-200d-2642.png index 8ea67adb87..ac1eec5427 100644 Binary files a/dist/img/emoji/1f9cd-1f3ff-200d-2642.png and b/dist/img/emoji/1f9cd-1f3ff-200d-2642.png differ diff --git a/dist/img/emoji/1f9cd-1f3ff.png b/dist/img/emoji/1f9cd-1f3ff.png index ca5df0932a..d4d95b7722 100644 Binary files a/dist/img/emoji/1f9cd-1f3ff.png and b/dist/img/emoji/1f9cd-1f3ff.png differ diff --git a/dist/img/emoji/1f9cd-200d-2640-fe0f.png b/dist/img/emoji/1f9cd-200d-2640-fe0f.png index db82a5b614..2351a576ec 100644 Binary files a/dist/img/emoji/1f9cd-200d-2640-fe0f.png and b/dist/img/emoji/1f9cd-200d-2640-fe0f.png differ diff --git a/dist/img/emoji/1f9cd-200d-2640.png b/dist/img/emoji/1f9cd-200d-2640.png index e236523707..2351a576ec 100644 Binary files a/dist/img/emoji/1f9cd-200d-2640.png and b/dist/img/emoji/1f9cd-200d-2640.png differ diff --git a/dist/img/emoji/1f9cd-200d-2642-fe0f.png b/dist/img/emoji/1f9cd-200d-2642-fe0f.png index 3177997689..769cd0ecb3 100644 Binary files a/dist/img/emoji/1f9cd-200d-2642-fe0f.png and b/dist/img/emoji/1f9cd-200d-2642-fe0f.png differ diff --git a/dist/img/emoji/1f9cd-200d-2642.png b/dist/img/emoji/1f9cd-200d-2642.png index 4fa573b045..769cd0ecb3 100644 Binary files a/dist/img/emoji/1f9cd-200d-2642.png and b/dist/img/emoji/1f9cd-200d-2642.png differ diff --git a/dist/img/emoji/1f9cd.png b/dist/img/emoji/1f9cd.png index dc1410817d..40c1defbb5 100644 Binary files a/dist/img/emoji/1f9cd.png and b/dist/img/emoji/1f9cd.png differ diff --git a/dist/img/emoji/1f9ce-200d-2640.png b/dist/img/emoji/1f9ce-200d-2640.png index 96f6f45188..ccfd9aee6e 100644 Binary files a/dist/img/emoji/1f9ce-200d-2640.png and b/dist/img/emoji/1f9ce-200d-2640.png differ diff --git a/dist/img/emoji/1f9d1-1f3ff-200d-1f9b2.png b/dist/img/emoji/1f9d1-1f3ff-200d-1f9b2.png index 909abc7c26..22927a0cfd 100644 Binary files a/dist/img/emoji/1f9d1-1f3ff-200d-1f9b2.png and b/dist/img/emoji/1f9d1-1f3ff-200d-1f9b2.png differ diff --git a/dist/img/emoji/1f9e1.png b/dist/img/emoji/1f9e1.png index dd9a9e046c..2b601e5fc7 100644 Binary files a/dist/img/emoji/1f9e1.png and b/dist/img/emoji/1f9e1.png differ diff --git a/dist/img/emoji/1f9e2.png b/dist/img/emoji/1f9e2.png index 154ad9bbdc..2f325b7afc 100644 Binary files a/dist/img/emoji/1f9e2.png and b/dist/img/emoji/1f9e2.png differ diff --git a/dist/img/emoji/1f9f4.png b/dist/img/emoji/1f9f4.png index 019c47e221..d4d277fbe8 100644 Binary files a/dist/img/emoji/1f9f4.png and b/dist/img/emoji/1f9f4.png differ diff --git a/dist/img/emoji/1f9f6.png b/dist/img/emoji/1f9f6.png index 39d34a2e37..4db870da2f 100644 Binary files a/dist/img/emoji/1f9f6.png and b/dist/img/emoji/1f9f6.png differ diff --git a/dist/img/emoji/1f9f9.png b/dist/img/emoji/1f9f9.png index 3546c6fc9c..42a30a34ec 100644 Binary files a/dist/img/emoji/1f9f9.png and b/dist/img/emoji/1f9f9.png differ diff --git a/dist/img/emoji/1f9fe.png b/dist/img/emoji/1f9fe.png index 3050f5734c..52b210bfed 100644 Binary files a/dist/img/emoji/1f9fe.png and b/dist/img/emoji/1f9fe.png differ diff --git a/dist/img/emoji/1fa71.png b/dist/img/emoji/1fa71.png index 1b0c5e1225..0766737358 100644 Binary files a/dist/img/emoji/1fa71.png and b/dist/img/emoji/1fa71.png differ diff --git a/dist/img/emoji/1fa79.png b/dist/img/emoji/1fa79.png index 0e83c8ce0b..2bc7927e32 100644 Binary files a/dist/img/emoji/1fa79.png and b/dist/img/emoji/1fa79.png differ diff --git a/dist/img/emoji/1fa83.png b/dist/img/emoji/1fa83.png index a3e1aa8eb2..ea2f7113ed 100644 Binary files a/dist/img/emoji/1fa83.png and b/dist/img/emoji/1fa83.png differ diff --git a/dist/img/emoji/1fa93.png b/dist/img/emoji/1fa93.png index 5b417ebe41..9264465f16 100644 Binary files a/dist/img/emoji/1fa93.png and b/dist/img/emoji/1fa93.png differ diff --git a/dist/img/emoji/1fa99.png b/dist/img/emoji/1fa99.png index 45959796c3..c1a4a4d7cf 100644 Binary files a/dist/img/emoji/1fa99.png and b/dist/img/emoji/1fa99.png differ diff --git a/dist/img/emoji/1fa9a.png b/dist/img/emoji/1fa9a.png index 1ff93cb5a7..6a261cadf3 100644 Binary files a/dist/img/emoji/1fa9a.png and b/dist/img/emoji/1fa9a.png differ diff --git a/dist/img/emoji/1fa9b.png b/dist/img/emoji/1fa9b.png index 939fd4f8e2..f789b85e64 100644 Binary files a/dist/img/emoji/1fa9b.png and b/dist/img/emoji/1fa9b.png differ diff --git a/dist/img/emoji/1faa0.png b/dist/img/emoji/1faa0.png index 56c7f113a6..e8c338c9a5 100644 Binary files a/dist/img/emoji/1faa0.png and b/dist/img/emoji/1faa0.png differ diff --git a/dist/img/emoji/1faa1.png b/dist/img/emoji/1faa1.png index fa07ec07a1..b903289442 100644 Binary files a/dist/img/emoji/1faa1.png and b/dist/img/emoji/1faa1.png differ diff --git a/dist/img/emoji/1faa6.png b/dist/img/emoji/1faa6.png index 323b0db48f..445ccf0d47 100644 Binary files a/dist/img/emoji/1faa6.png and b/dist/img/emoji/1faa6.png differ diff --git a/dist/img/emoji/1faa8.png b/dist/img/emoji/1faa8.png index d73daa02f5..462475ef0e 100644 Binary files a/dist/img/emoji/1faa8.png and b/dist/img/emoji/1faa8.png differ diff --git a/dist/img/emoji/1faaa.png b/dist/img/emoji/1faaa.png index a899242bfb..01cf1213fb 100644 Binary files a/dist/img/emoji/1faaa.png and b/dist/img/emoji/1faaa.png differ diff --git a/dist/img/emoji/1fab5.png b/dist/img/emoji/1fab5.png index 7db89527a0..bd45dbf402 100644 Binary files a/dist/img/emoji/1fab5.png and b/dist/img/emoji/1fab5.png differ diff --git a/dist/img/emoji/1fac2.png b/dist/img/emoji/1fac2.png index 66e38a5e2f..c3a3b84d9d 100644 Binary files a/dist/img/emoji/1fac2.png and b/dist/img/emoji/1fac2.png differ diff --git a/dist/img/emoji/1fac3-1f3fb.png b/dist/img/emoji/1fac3-1f3fb.png index 7eb08b40de..7dae726315 100644 Binary files a/dist/img/emoji/1fac3-1f3fb.png and b/dist/img/emoji/1fac3-1f3fb.png differ diff --git a/dist/img/emoji/1fac3-1f3fd.png b/dist/img/emoji/1fac3-1f3fd.png index ae02ef0363..270bd87ecd 100644 Binary files a/dist/img/emoji/1fac3-1f3fd.png and b/dist/img/emoji/1fac3-1f3fd.png differ diff --git a/dist/img/emoji/1fac3-1f3fe.png b/dist/img/emoji/1fac3-1f3fe.png index bd4496bb36..cca657476e 100644 Binary files a/dist/img/emoji/1fac3-1f3fe.png and b/dist/img/emoji/1fac3-1f3fe.png differ diff --git a/dist/img/emoji/1fac3-1f3ff.png b/dist/img/emoji/1fac3-1f3ff.png index 863571b619..5281eb36b0 100644 Binary files a/dist/img/emoji/1fac3-1f3ff.png and b/dist/img/emoji/1fac3-1f3ff.png differ diff --git a/dist/img/emoji/1fac4-1f3fb.png b/dist/img/emoji/1fac4-1f3fb.png index 4fa00c4b4a..8fcf05ab2b 100644 Binary files a/dist/img/emoji/1fac4-1f3fb.png and b/dist/img/emoji/1fac4-1f3fb.png differ diff --git a/dist/img/emoji/1fac4-1f3fc.png b/dist/img/emoji/1fac4-1f3fc.png index 2f19dcb225..34b5b39693 100644 Binary files a/dist/img/emoji/1fac4-1f3fc.png and b/dist/img/emoji/1fac4-1f3fc.png differ diff --git a/dist/img/emoji/1fac4-1f3fd.png b/dist/img/emoji/1fac4-1f3fd.png index 81f4ba6b6d..0589064a97 100644 Binary files a/dist/img/emoji/1fac4-1f3fd.png and b/dist/img/emoji/1fac4-1f3fd.png differ diff --git a/dist/img/emoji/1fac4-1f3fe.png b/dist/img/emoji/1fac4-1f3fe.png index 6b254f47f3..470b5f986e 100644 Binary files a/dist/img/emoji/1fac4-1f3fe.png and b/dist/img/emoji/1fac4-1f3fe.png differ diff --git a/dist/img/emoji/1fac4-1f3ff.png b/dist/img/emoji/1fac4-1f3ff.png index 1e7e68a56d..a16ae66994 100644 Binary files a/dist/img/emoji/1fac4-1f3ff.png and b/dist/img/emoji/1fac4-1f3ff.png differ diff --git a/dist/img/emoji/1fac4.png b/dist/img/emoji/1fac4.png index 805c8a756f..9d7a421ad2 100644 Binary files a/dist/img/emoji/1fac4.png and b/dist/img/emoji/1fac4.png differ diff --git a/dist/img/emoji/1fad7.png b/dist/img/emoji/1fad7.png index a61ac74fa9..5903f61d12 100644 Binary files a/dist/img/emoji/1fad7.png and b/dist/img/emoji/1fad7.png differ diff --git a/dist/img/emoji/1fae1.png b/dist/img/emoji/1fae1.png index 76aa47cb85..7519c3336b 100644 Binary files a/dist/img/emoji/1fae1.png and b/dist/img/emoji/1fae1.png differ diff --git a/dist/img/emoji/1fae6.png b/dist/img/emoji/1fae6.png index cf0561c559..036a96047b 100644 Binary files a/dist/img/emoji/1fae6.png and b/dist/img/emoji/1fae6.png differ diff --git a/dist/img/emoji/1faf0-1f3fb.png b/dist/img/emoji/1faf0-1f3fb.png index f32c906e84..2b370dfadd 100644 Binary files a/dist/img/emoji/1faf0-1f3fb.png and b/dist/img/emoji/1faf0-1f3fb.png differ diff --git a/dist/img/emoji/1faf0.png b/dist/img/emoji/1faf0.png index 5607f34833..74b9091920 100644 Binary files a/dist/img/emoji/1faf0.png and b/dist/img/emoji/1faf0.png differ diff --git a/dist/img/emoji/1faf1-1f3fb.png b/dist/img/emoji/1faf1-1f3fb.png index 96f5e2ec6b..5bebe27451 100644 Binary files a/dist/img/emoji/1faf1-1f3fb.png and b/dist/img/emoji/1faf1-1f3fb.png differ diff --git a/dist/img/emoji/1faf1-1f3fc.png b/dist/img/emoji/1faf1-1f3fc.png index f635bf51c9..e0a70a0f75 100644 Binary files a/dist/img/emoji/1faf1-1f3fc.png and b/dist/img/emoji/1faf1-1f3fc.png differ diff --git a/dist/img/emoji/1faf1-1f3fd.png b/dist/img/emoji/1faf1-1f3fd.png index d49a664742..9a30572ee9 100644 Binary files a/dist/img/emoji/1faf1-1f3fd.png and b/dist/img/emoji/1faf1-1f3fd.png differ diff --git a/dist/img/emoji/1faf1-1f3fe.png b/dist/img/emoji/1faf1-1f3fe.png index 58f42b466b..aa97da8e7a 100644 Binary files a/dist/img/emoji/1faf1-1f3fe.png and b/dist/img/emoji/1faf1-1f3fe.png differ diff --git a/dist/img/emoji/1faf1.png b/dist/img/emoji/1faf1.png index e4453fccb8..cadd5d70e2 100644 Binary files a/dist/img/emoji/1faf1.png and b/dist/img/emoji/1faf1.png differ diff --git a/dist/img/emoji/1faf2-1f3fb.png b/dist/img/emoji/1faf2-1f3fb.png index 2810d222c0..0b51f0467a 100644 Binary files a/dist/img/emoji/1faf2-1f3fb.png and b/dist/img/emoji/1faf2-1f3fb.png differ diff --git a/dist/img/emoji/1faf2-1f3fc.png b/dist/img/emoji/1faf2-1f3fc.png index 72f56cc899..c366055163 100644 Binary files a/dist/img/emoji/1faf2-1f3fc.png and b/dist/img/emoji/1faf2-1f3fc.png differ diff --git a/dist/img/emoji/1faf2-1f3fd.png b/dist/img/emoji/1faf2-1f3fd.png index 9b39607ba1..45cf175ca4 100644 Binary files a/dist/img/emoji/1faf2-1f3fd.png and b/dist/img/emoji/1faf2-1f3fd.png differ diff --git a/dist/img/emoji/1faf2-1f3fe.png b/dist/img/emoji/1faf2-1f3fe.png index 50280efe0a..ff54650488 100644 Binary files a/dist/img/emoji/1faf2-1f3fe.png and b/dist/img/emoji/1faf2-1f3fe.png differ diff --git a/dist/img/emoji/1faf2.png b/dist/img/emoji/1faf2.png index 92ad20847d..fcc2054491 100644 Binary files a/dist/img/emoji/1faf2.png and b/dist/img/emoji/1faf2.png differ diff --git a/dist/img/emoji/1faf5-1f3fe.png b/dist/img/emoji/1faf5-1f3fe.png index c940d7fd69..02de4c914d 100644 Binary files a/dist/img/emoji/1faf5-1f3fe.png and b/dist/img/emoji/1faf5-1f3fe.png differ diff --git a/dist/img/emoji/1faf5-1f3ff.png b/dist/img/emoji/1faf5-1f3ff.png index 6c62a0a589..aa93ca77ac 100644 Binary files a/dist/img/emoji/1faf5-1f3ff.png and b/dist/img/emoji/1faf5-1f3ff.png differ diff --git a/dist/img/emoji/1faf6-1f3fb.png b/dist/img/emoji/1faf6-1f3fb.png index 107274064f..b52a440fcc 100644 Binary files a/dist/img/emoji/1faf6-1f3fb.png and b/dist/img/emoji/1faf6-1f3fb.png differ diff --git a/dist/img/emoji/1faf6-1f3fc.png b/dist/img/emoji/1faf6-1f3fc.png index 9b58625ac2..61b6e36628 100644 Binary files a/dist/img/emoji/1faf6-1f3fc.png and b/dist/img/emoji/1faf6-1f3fc.png differ diff --git a/dist/img/emoji/1faf6-1f3fd.png b/dist/img/emoji/1faf6-1f3fd.png index 5bab1e924e..392c18202d 100644 Binary files a/dist/img/emoji/1faf6-1f3fd.png and b/dist/img/emoji/1faf6-1f3fd.png differ diff --git a/dist/img/emoji/1faf6-1f3fe.png b/dist/img/emoji/1faf6-1f3fe.png index fb8e22b7a4..d86b5ac91d 100644 Binary files a/dist/img/emoji/1faf6-1f3fe.png and b/dist/img/emoji/1faf6-1f3fe.png differ diff --git a/dist/img/emoji/1faf6-1f3ff.png b/dist/img/emoji/1faf6-1f3ff.png index 7b96599dfd..7b628addf2 100644 Binary files a/dist/img/emoji/1faf6-1f3ff.png and b/dist/img/emoji/1faf6-1f3ff.png differ diff --git a/dist/img/emoji/1faf6.png b/dist/img/emoji/1faf6.png index 69c2382b32..6e5eafd17f 100644 Binary files a/dist/img/emoji/1faf6.png and b/dist/img/emoji/1faf6.png differ diff --git a/dist/img/emoji/231a.png b/dist/img/emoji/231a.png index 6cbe971c3e..f228d110b3 100644 Binary files a/dist/img/emoji/231a.png and b/dist/img/emoji/231a.png differ diff --git a/dist/img/emoji/2600-fe0f.png b/dist/img/emoji/2600-fe0f.png index 7ec2d5fc97..47835a94a1 100644 Binary files a/dist/img/emoji/2600-fe0f.png and b/dist/img/emoji/2600-fe0f.png differ diff --git a/dist/img/emoji/2600.png b/dist/img/emoji/2600.png index 7ec2d5fc97..47835a94a1 100644 Binary files a/dist/img/emoji/2600.png and b/dist/img/emoji/2600.png differ diff --git a/dist/img/emoji/2602-fe0f.png b/dist/img/emoji/2602-fe0f.png index 6a7500735b..fd8ca33ac3 100644 Binary files a/dist/img/emoji/2602-fe0f.png and b/dist/img/emoji/2602-fe0f.png differ diff --git a/dist/img/emoji/2602.png b/dist/img/emoji/2602.png index 6a7500735b..fd8ca33ac3 100644 Binary files a/dist/img/emoji/2602.png and b/dist/img/emoji/2602.png differ diff --git a/dist/img/emoji/2611.png b/dist/img/emoji/2611.png index 0683ceb1b5..1c42dd8026 100644 Binary files a/dist/img/emoji/2611.png and b/dist/img/emoji/2611.png differ diff --git a/dist/img/emoji/2622.png b/dist/img/emoji/2622.png index b468610477..ae1fab2b4e 100644 Binary files a/dist/img/emoji/2622.png and b/dist/img/emoji/2622.png differ diff --git a/dist/img/emoji/2623-fe0f.png b/dist/img/emoji/2623-fe0f.png index 5e8cd3923e..9601ea40cb 100644 Binary files a/dist/img/emoji/2623-fe0f.png and b/dist/img/emoji/2623-fe0f.png differ diff --git a/dist/img/emoji/262a.png b/dist/img/emoji/262a.png index 11bdaba1d4..ecda2eecbe 100644 Binary files a/dist/img/emoji/262a.png and b/dist/img/emoji/262a.png differ diff --git a/dist/img/emoji/262e-fe0f.png b/dist/img/emoji/262e-fe0f.png index e4810b31c8..448ec9d000 100644 Binary files a/dist/img/emoji/262e-fe0f.png and b/dist/img/emoji/262e-fe0f.png differ diff --git a/dist/img/emoji/262e.png b/dist/img/emoji/262e.png index bdeec25b4f..448ec9d000 100644 Binary files a/dist/img/emoji/262e.png and b/dist/img/emoji/262e.png differ diff --git a/dist/img/emoji/262f-fe0f.png b/dist/img/emoji/262f-fe0f.png index dab7ec9cd1..aea4dab972 100644 Binary files a/dist/img/emoji/262f-fe0f.png and b/dist/img/emoji/262f-fe0f.png differ diff --git a/dist/img/emoji/262f.png b/dist/img/emoji/262f.png index 41fa8aee4f..aea4dab972 100644 Binary files a/dist/img/emoji/262f.png and b/dist/img/emoji/262f.png differ diff --git a/dist/img/emoji/2638-fe0f.png b/dist/img/emoji/2638-fe0f.png index a81cde9de4..f14fd1c469 100644 Binary files a/dist/img/emoji/2638-fe0f.png and b/dist/img/emoji/2638-fe0f.png differ diff --git a/dist/img/emoji/2648.png b/dist/img/emoji/2648.png index 3183911b81..070ae2ef79 100644 Binary files a/dist/img/emoji/2648.png and b/dist/img/emoji/2648.png differ diff --git a/dist/img/emoji/2649.png b/dist/img/emoji/2649.png index 5aa9b6b212..c4c84f1547 100644 Binary files a/dist/img/emoji/2649.png and b/dist/img/emoji/2649.png differ diff --git a/dist/img/emoji/264b.png b/dist/img/emoji/264b.png index d474bf06d6..c2a2f57e79 100644 Binary files a/dist/img/emoji/264b.png and b/dist/img/emoji/264b.png differ diff --git a/dist/img/emoji/264c.png b/dist/img/emoji/264c.png index 36f9a79690..10c9108edc 100644 Binary files a/dist/img/emoji/264c.png and b/dist/img/emoji/264c.png differ diff --git a/dist/img/emoji/264d.png b/dist/img/emoji/264d.png index 5c3fcf2f1c..7ccbc1ff03 100644 Binary files a/dist/img/emoji/264d.png and b/dist/img/emoji/264d.png differ diff --git a/dist/img/emoji/2650.png b/dist/img/emoji/2650.png index 37ad32b785..0700865921 100644 Binary files a/dist/img/emoji/2650.png and b/dist/img/emoji/2650.png differ diff --git a/dist/img/emoji/2651.png b/dist/img/emoji/2651.png index a6a3c0cd5c..3e56040a3d 100644 Binary files a/dist/img/emoji/2651.png and b/dist/img/emoji/2651.png differ diff --git a/dist/img/emoji/2660.png b/dist/img/emoji/2660.png index a40dd6bee3..a3ea371a2f 100644 Binary files a/dist/img/emoji/2660.png and b/dist/img/emoji/2660.png differ diff --git a/dist/img/emoji/2663.png b/dist/img/emoji/2663.png index 91aaf09860..c229a31d7c 100644 Binary files a/dist/img/emoji/2663.png and b/dist/img/emoji/2663.png differ diff --git a/dist/img/emoji/2665.png b/dist/img/emoji/2665.png index 30f878b9ac..cd56ef7de5 100644 Binary files a/dist/img/emoji/2665.png and b/dist/img/emoji/2665.png differ diff --git a/dist/img/emoji/2668.png b/dist/img/emoji/2668.png index e8565eb230..0c7be0de39 100644 Binary files a/dist/img/emoji/2668.png and b/dist/img/emoji/2668.png differ diff --git a/dist/img/emoji/267f.png b/dist/img/emoji/267f.png index 8c85e92749..58e47c87f8 100644 Binary files a/dist/img/emoji/267f.png and b/dist/img/emoji/267f.png differ diff --git a/dist/img/emoji/2693.png b/dist/img/emoji/2693.png index 49032299fe..494e92d918 100644 Binary files a/dist/img/emoji/2693.png and b/dist/img/emoji/2693.png differ diff --git a/dist/img/emoji/26ab.png b/dist/img/emoji/26ab.png index 04f5967c0a..c716b0d49c 100644 Binary files a/dist/img/emoji/26ab.png and b/dist/img/emoji/26ab.png differ diff --git a/dist/img/emoji/26bd.png b/dist/img/emoji/26bd.png index 742f4f17d9..51db2b0eae 100644 Binary files a/dist/img/emoji/26bd.png and b/dist/img/emoji/26bd.png differ diff --git a/dist/img/emoji/26f1-fe0f.png b/dist/img/emoji/26f1-fe0f.png index 5212f453d8..f5df204d75 100644 Binary files a/dist/img/emoji/26f1-fe0f.png and b/dist/img/emoji/26f1-fe0f.png differ diff --git a/dist/img/emoji/26f1.png b/dist/img/emoji/26f1.png index 5212f453d8..f5df204d75 100644 Binary files a/dist/img/emoji/26f1.png and b/dist/img/emoji/26f1.png differ diff --git a/dist/img/emoji/26f3.png b/dist/img/emoji/26f3.png index 79e70dd03e..67b4cc5253 100644 Binary files a/dist/img/emoji/26f3.png and b/dist/img/emoji/26f3.png differ diff --git a/dist/img/emoji/26fa.png b/dist/img/emoji/26fa.png index 8082ac0728..78570f4019 100644 Binary files a/dist/img/emoji/26fa.png and b/dist/img/emoji/26fa.png differ diff --git a/dist/img/emoji/270a-1f3fb.png b/dist/img/emoji/270a-1f3fb.png index 8b6ad7df97..3cf9f6bc07 100644 Binary files a/dist/img/emoji/270a-1f3fb.png and b/dist/img/emoji/270a-1f3fb.png differ diff --git a/dist/img/emoji/270a-1f3fd.png b/dist/img/emoji/270a-1f3fd.png index 87e5ebf7d3..a9b654991a 100644 Binary files a/dist/img/emoji/270a-1f3fd.png and b/dist/img/emoji/270a-1f3fd.png differ diff --git a/dist/img/emoji/270a.png b/dist/img/emoji/270a.png index 575c068fe2..5b483772bb 100644 Binary files a/dist/img/emoji/270a.png and b/dist/img/emoji/270a.png differ diff --git a/dist/img/emoji/270b-1f3fb.png b/dist/img/emoji/270b-1f3fb.png index 1611e2a8c7..7558e8736c 100644 Binary files a/dist/img/emoji/270b-1f3fb.png and b/dist/img/emoji/270b-1f3fb.png differ diff --git a/dist/img/emoji/270b-1f3fd.png b/dist/img/emoji/270b-1f3fd.png index b035dd1ad9..786cd221b8 100644 Binary files a/dist/img/emoji/270b-1f3fd.png and b/dist/img/emoji/270b-1f3fd.png differ diff --git a/dist/img/emoji/270b.png b/dist/img/emoji/270b.png index a05c5eca5b..f6155389bb 100644 Binary files a/dist/img/emoji/270b.png and b/dist/img/emoji/270b.png differ diff --git a/dist/img/emoji/270c-1f3fb.png b/dist/img/emoji/270c-1f3fb.png index 54a7e22efb..dad130ca61 100644 Binary files a/dist/img/emoji/270c-1f3fb.png and b/dist/img/emoji/270c-1f3fb.png differ diff --git a/dist/img/emoji/270c-fe0f.png b/dist/img/emoji/270c-fe0f.png index 761cbe6fd7..280d226b28 100644 Binary files a/dist/img/emoji/270c-fe0f.png and b/dist/img/emoji/270c-fe0f.png differ diff --git a/dist/img/emoji/270c.png b/dist/img/emoji/270c.png index 761cbe6fd7..280d226b28 100644 Binary files a/dist/img/emoji/270c.png and b/dist/img/emoji/270c.png differ diff --git a/dist/img/emoji/270d-1f3fb.png b/dist/img/emoji/270d-1f3fb.png index fab96b2320..3c08b54546 100644 Binary files a/dist/img/emoji/270d-1f3fb.png and b/dist/img/emoji/270d-1f3fb.png differ diff --git a/dist/img/emoji/270d-1f3fc.png b/dist/img/emoji/270d-1f3fc.png index cc78a6b102..fdf923ecd7 100644 Binary files a/dist/img/emoji/270d-1f3fc.png and b/dist/img/emoji/270d-1f3fc.png differ diff --git a/dist/img/emoji/270d-1f3fd.png b/dist/img/emoji/270d-1f3fd.png index d4bf887374..993eb0d37b 100644 Binary files a/dist/img/emoji/270d-1f3fd.png and b/dist/img/emoji/270d-1f3fd.png differ diff --git a/dist/img/emoji/270d-fe0f.png b/dist/img/emoji/270d-fe0f.png index 087b9dc2df..8298ef44dd 100644 Binary files a/dist/img/emoji/270d-fe0f.png and b/dist/img/emoji/270d-fe0f.png differ diff --git a/dist/img/emoji/270d.png b/dist/img/emoji/270d.png index 087b9dc2df..8298ef44dd 100644 Binary files a/dist/img/emoji/270d.png and b/dist/img/emoji/270d.png differ diff --git a/dist/img/emoji/270f-fe0f.png b/dist/img/emoji/270f-fe0f.png index c99f9dd920..94f7f4fea9 100644 Binary files a/dist/img/emoji/270f-fe0f.png and b/dist/img/emoji/270f-fe0f.png differ diff --git a/dist/img/emoji/270f.png b/dist/img/emoji/270f.png index c99f9dd920..94f7f4fea9 100644 Binary files a/dist/img/emoji/270f.png and b/dist/img/emoji/270f.png differ diff --git a/dist/img/emoji/2721.png b/dist/img/emoji/2721.png index 0bafa25361..bc93e3cee0 100644 Binary files a/dist/img/emoji/2721.png and b/dist/img/emoji/2721.png differ diff --git a/dist/img/emoji/2744.png b/dist/img/emoji/2744.png index 0dc89f88cb..0d57db8a18 100644 Binary files a/dist/img/emoji/2744.png and b/dist/img/emoji/2744.png differ diff --git a/dist/img/emoji/2763.png b/dist/img/emoji/2763.png index 8968b1b524..11713b8d23 100644 Binary files a/dist/img/emoji/2763.png and b/dist/img/emoji/2763.png differ diff --git a/dist/img/emoji/3299-fe0f.png b/dist/img/emoji/3299-fe0f.png index 1f0ee18273..b0ca885a68 100644 Binary files a/dist/img/emoji/3299-fe0f.png and b/dist/img/emoji/3299-fe0f.png differ diff --git a/dist/img/help/32/1-spaces.mp4 b/dist/img/help/32/1-spaces.mp4 deleted file mode 100644 index d5d8bb8354..0000000000 Binary files a/dist/img/help/32/1-spaces.mp4 and /dev/null differ diff --git a/dist/img/help/32/2-widgets.mp4 b/dist/img/help/32/2-widgets.mp4 deleted file mode 100644 index ff0fa3766e..0000000000 Binary files a/dist/img/help/32/2-widgets.mp4 and /dev/null differ diff --git a/dist/img/help/32/3-navbar.mp4 b/dist/img/help/32/3-navbar.mp4 deleted file mode 100644 index b658d5fc31..0000000000 Binary files a/dist/img/help/32/3-navbar.mp4 and /dev/null differ diff --git a/dist/img/help/32/4-collections.mp4 b/dist/img/help/32/4-collections.mp4 deleted file mode 100644 index d1d613c01c..0000000000 Binary files a/dist/img/help/32/4-collections.mp4 and /dev/null differ diff --git a/dist/img/help/32/export.png b/dist/img/help/32/export.png deleted file mode 100644 index d94a8db4aa..0000000000 Binary files a/dist/img/help/32/export.png and /dev/null differ diff --git a/dist/img/help/33/onboarding.mp4 b/dist/img/help/33/onboarding.mp4 deleted file mode 100644 index cdf345ebbb..0000000000 Binary files a/dist/img/help/33/onboarding.mp4 and /dev/null differ diff --git a/dist/img/help/34/1.png b/dist/img/help/34/1.png deleted file mode 100644 index 05a6ba64a0..0000000000 Binary files a/dist/img/help/34/1.png and /dev/null differ diff --git a/dist/img/help/34/2.png b/dist/img/help/34/2.png deleted file mode 100644 index 5986a4ab19..0000000000 Binary files a/dist/img/help/34/2.png and /dev/null differ diff --git a/dist/img/help/34/3.png b/dist/img/help/34/3.png deleted file mode 100644 index 9daaea0710..0000000000 Binary files a/dist/img/help/34/3.png and /dev/null differ diff --git a/dist/img/help/34/4.png b/dist/img/help/34/4.png deleted file mode 100644 index e9b42543dd..0000000000 Binary files a/dist/img/help/34/4.png and /dev/null differ diff --git a/dist/img/help/35/1-templates.mp4 b/dist/img/help/35/1-templates.mp4 deleted file mode 100644 index dc8787c1b5..0000000000 Binary files a/dist/img/help/35/1-templates.mp4 and /dev/null differ diff --git a/dist/img/help/35/2-restore.mp4 b/dist/img/help/35/2-restore.mp4 deleted file mode 100644 index 6fd747bf88..0000000000 Binary files a/dist/img/help/35/2-restore.mp4 and /dev/null differ diff --git a/dist/img/help/35/3-menu.png b/dist/img/help/35/3-menu.png deleted file mode 100644 index 8bac50e3f3..0000000000 Binary files a/dist/img/help/35/3-menu.png and /dev/null differ diff --git a/dist/img/help/35/4-set.png b/dist/img/help/35/4-set.png deleted file mode 100644 index 8b4dfb66d6..0000000000 Binary files a/dist/img/help/35/4-set.png and /dev/null differ diff --git a/dist/img/help/36/1.mp4 b/dist/img/help/36/1.mp4 deleted file mode 100644 index ccc44cafa2..0000000000 Binary files a/dist/img/help/36/1.mp4 and /dev/null differ diff --git a/dist/img/help/36/3.mp4 b/dist/img/help/36/3.mp4 deleted file mode 100644 index c4bbdf0f00..0000000000 Binary files a/dist/img/help/36/3.mp4 and /dev/null differ diff --git a/dist/img/help/36/4.mp4 b/dist/img/help/36/4.mp4 deleted file mode 100644 index 6915ed1e5c..0000000000 Binary files a/dist/img/help/36/4.mp4 and /dev/null differ diff --git a/dist/img/help/36/5.png b/dist/img/help/36/5.png deleted file mode 100644 index 8cb018fde2..0000000000 Binary files a/dist/img/help/36/5.png and /dev/null differ diff --git a/dist/img/help/36/6.png b/dist/img/help/36/6.png deleted file mode 100644 index 32e6a05808..0000000000 Binary files a/dist/img/help/36/6.png and /dev/null differ diff --git a/dist/img/help/37/1.png b/dist/img/help/37/1.png deleted file mode 100644 index cdb165c0cb..0000000000 Binary files a/dist/img/help/37/1.png and /dev/null differ diff --git a/dist/img/help/37/2.mp4 b/dist/img/help/37/2.mp4 deleted file mode 100644 index 7c232c4429..0000000000 Binary files a/dist/img/help/37/2.mp4 and /dev/null differ diff --git a/dist/img/help/37/3.png b/dist/img/help/37/3.png deleted file mode 100644 index 0518100d8a..0000000000 Binary files a/dist/img/help/37/3.png and /dev/null differ diff --git a/dist/img/help/37/4.mp4 b/dist/img/help/37/4.mp4 deleted file mode 100644 index 1f909334ff..0000000000 Binary files a/dist/img/help/37/4.mp4 and /dev/null differ diff --git a/dist/img/help/37/5.png b/dist/img/help/37/5.png deleted file mode 100644 index 9dfbdbb3ad..0000000000 Binary files a/dist/img/help/37/5.png and /dev/null differ diff --git a/dist/img/help/37/6.png b/dist/img/help/37/6.png deleted file mode 100644 index 29655f538b..0000000000 Binary files a/dist/img/help/37/6.png and /dev/null differ diff --git a/dist/img/help/37/7.png b/dist/img/help/37/7.png deleted file mode 100644 index 176e354e74..0000000000 Binary files a/dist/img/help/37/7.png and /dev/null differ diff --git a/dist/img/help/37/8.mp4 b/dist/img/help/37/8.mp4 deleted file mode 100644 index 80a20d3d20..0000000000 Binary files a/dist/img/help/37/8.mp4 and /dev/null differ diff --git a/dist/img/help/38/1.png b/dist/img/help/38/1.png deleted file mode 100644 index 853381c70d..0000000000 Binary files a/dist/img/help/38/1.png and /dev/null differ diff --git a/dist/img/help/38/2.mp4 b/dist/img/help/38/2.mp4 deleted file mode 100644 index d04eeba3c7..0000000000 Binary files a/dist/img/help/38/2.mp4 and /dev/null differ diff --git a/dist/img/help/38/3.mp4 b/dist/img/help/38/3.mp4 deleted file mode 100644 index b5ce059b4a..0000000000 Binary files a/dist/img/help/38/3.mp4 and /dev/null differ diff --git a/dist/img/help/38/4.png b/dist/img/help/38/4.png deleted file mode 100644 index af2dcea2a7..0000000000 Binary files a/dist/img/help/38/4.png and /dev/null differ diff --git a/dist/img/icon/file/archive.svg b/dist/img/icon/file/archive.svg index 0b79ff9d7a..bcc255e8ea 100644 --- a/dist/img/icon/file/archive.svg +++ b/dist/img/icon/file/archive.svg @@ -1,11 +1,5 @@ - - - - - - - - - - + + + + \ No newline at end of file diff --git a/dist/img/icon/file/audio.svg b/dist/img/icon/file/audio.svg index 9db625828b..ea92b9990b 100644 --- a/dist/img/icon/file/audio.svg +++ b/dist/img/icon/file/audio.svg @@ -1,4 +1,7 @@ - - - + + + + + + \ No newline at end of file diff --git a/dist/img/icon/file/image.svg b/dist/img/icon/file/image.svg index 5a63e2e576..eff685e89a 100644 --- a/dist/img/icon/file/image.svg +++ b/dist/img/icon/file/image.svg @@ -1,5 +1,6 @@ - - - - + + + + + \ No newline at end of file diff --git a/dist/img/icon/file/other.svg b/dist/img/icon/file/other.svg index f3b6f775e3..554bad6b8f 100644 --- a/dist/img/icon/file/other.svg +++ b/dist/img/icon/file/other.svg @@ -1,6 +1,6 @@ - - - - - - + + + + + + \ No newline at end of file diff --git a/dist/img/icon/file/pdf.svg b/dist/img/icon/file/pdf.svg index 03f67c0dfe..a223423d51 100644 --- a/dist/img/icon/file/pdf.svg +++ b/dist/img/icon/file/pdf.svg @@ -1,11 +1,5 @@ - - - - - - - - - - + + + + \ No newline at end of file diff --git a/dist/img/icon/file/presentation.svg b/dist/img/icon/file/presentation.svg index 25d577e83a..2f329bf492 100644 --- a/dist/img/icon/file/presentation.svg +++ b/dist/img/icon/file/presentation.svg @@ -1,5 +1,6 @@ - - - - - + + + + + + \ No newline at end of file diff --git a/dist/img/icon/file/table.svg b/dist/img/icon/file/table.svg index beae11248d..4989c602f9 100644 --- a/dist/img/icon/file/table.svg +++ b/dist/img/icon/file/table.svg @@ -1,9 +1,16 @@ - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + diff --git a/dist/img/icon/file/text.svg b/dist/img/icon/file/text.svg index 1a2324d671..a9689e786b 100644 --- a/dist/img/icon/file/text.svg +++ b/dist/img/icon/file/text.svg @@ -1,7 +1,8 @@ - - - - - - - + + + + + + + + \ No newline at end of file diff --git a/dist/img/icon/file/video.svg b/dist/img/icon/file/video.svg index 2f5fe99ffd..cbd69032f1 100644 --- a/dist/img/icon/file/video.svg +++ b/dist/img/icon/file/video.svg @@ -1,4 +1,5 @@ - - - + + + + \ No newline at end of file diff --git a/dist/img/theme/dark/icon/file/archive.svg b/dist/img/theme/dark/icon/file/archive.svg new file mode 100644 index 0000000000..36b93b9785 --- /dev/null +++ b/dist/img/theme/dark/icon/file/archive.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/dist/img/theme/dark/icon/file/audio.svg b/dist/img/theme/dark/icon/file/audio.svg new file mode 100644 index 0000000000..42c48d6125 --- /dev/null +++ b/dist/img/theme/dark/icon/file/audio.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/dist/img/theme/dark/icon/file/image.svg b/dist/img/theme/dark/icon/file/image.svg new file mode 100644 index 0000000000..cecbf63f4f --- /dev/null +++ b/dist/img/theme/dark/icon/file/image.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/dist/img/theme/dark/icon/file/other.svg b/dist/img/theme/dark/icon/file/other.svg new file mode 100644 index 0000000000..80e41f2d1b --- /dev/null +++ b/dist/img/theme/dark/icon/file/other.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/dist/img/theme/dark/icon/file/pdf.svg b/dist/img/theme/dark/icon/file/pdf.svg new file mode 100644 index 0000000000..54b2b998e2 --- /dev/null +++ b/dist/img/theme/dark/icon/file/pdf.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/dist/img/theme/dark/icon/file/presentation.svg b/dist/img/theme/dark/icon/file/presentation.svg new file mode 100644 index 0000000000..5166935f8a --- /dev/null +++ b/dist/img/theme/dark/icon/file/presentation.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/dist/img/theme/dark/icon/file/table.svg b/dist/img/theme/dark/icon/file/table.svg new file mode 100644 index 0000000000..1a8e3910a0 --- /dev/null +++ b/dist/img/theme/dark/icon/file/table.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/img/theme/dark/icon/file/text.svg b/dist/img/theme/dark/icon/file/text.svg new file mode 100644 index 0000000000..373efedc14 --- /dev/null +++ b/dist/img/theme/dark/icon/file/text.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/dist/img/theme/dark/icon/file/video.svg b/dist/img/theme/dark/icon/file/video.svg new file mode 100644 index 0000000000..850da1048d --- /dev/null +++ b/dist/img/theme/dark/icon/file/video.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/dist/workers/graph.js b/dist/workers/graph.js index 1a6365cba1..12625831ba 100644 --- a/dist/workers/graph.js +++ b/dist/workers/graph.js @@ -141,7 +141,7 @@ initFonts = () => { const fontFace = new FontFace(name, `url("../font/inter/regular.woff2") format("woff2")`); self.fonts.add(fontFace); - fontFace.load().then(() => { fontFamily = name; }); + fontFace.load().then(() => fontFamily = name); }; image = ({ src, bitmap }) => { diff --git a/electron.js b/electron.js index 4f7db9d591..57418f26c7 100644 --- a/electron.js +++ b/electron.js @@ -105,7 +105,7 @@ nativeTheme.on('updated', () => { function createWindow () { mainWindow = WindowManager.createMain({ route: Util.getRouteFromUrl(deeplinkingUrl), isChild: false }); - mainWindow.on('close', (e) => { + mainWindow.on('close', e => { Util.log('info', 'closeMain: ' + app.isQuiting); if (app.isQuiting) { @@ -116,7 +116,7 @@ function createWindow () { if (mainWindow.isFullScreen()) { mainWindow.setFullScreen(false); - mainWindow.once('leave-full-screen', () => { mainWindow.hide(); }); + mainWindow.once('leave-full-screen', () => mainWindow.hide()); } else { mainWindow.hide(); }; @@ -184,7 +184,7 @@ app.on('second-instance', (event, argv) => { mainWindow.focus(); }); -app.on('before-quit', (e) => { +app.on('before-quit', e => { Util.log('info', 'before-quit'); if (app.isQuiting) { diff --git a/electron/about/about.js b/electron/about/about.js index 0a1eb6d2b9..9d7fd0710a 100644 --- a/electron/about/about.js +++ b/electron/about/about.js @@ -16,7 +16,7 @@ $(() => { versionButton.on('click', e => { e.preventDefault(); - var handler = (e) => { + var handler = e => { e.preventDefault(); e.clipboardData.setData('text/plain', versionText); @@ -29,7 +29,7 @@ $(() => { copyIcon.addClass('active'); clearTimeout(timeout); - setTimeout(() => { copyIcon.removeClass('active'); }, 2000); + setTimeout(() => copyIcon.removeClass('active'), 2000); }); $.ajax({ diff --git a/electron/js/api.js b/electron/js/api.js index ae4f2c527b..dbdc4c3b46 100644 --- a/electron/js/api.js +++ b/electron/js/api.js @@ -182,7 +182,7 @@ class Api { Util.log('info', '[Api].exit, relaunch: ' + relaunch); Util.send(win, 'shutdownStart'); - Server.stop(signal).then(() => { this.shutdown(win, relaunch); }); + Server.stop(signal).then(() => this.shutdown(win, relaunch)); }; setInterfaceLang (win, lang) { diff --git a/electron/js/lib/installNativeMessagingHost.js b/electron/js/lib/installNativeMessagingHost.js index 8f768aa0a0..6aff633229 100644 --- a/electron/js/lib/installNativeMessagingHost.js +++ b/electron/js/lib/installNativeMessagingHost.js @@ -8,7 +8,7 @@ */ -const { existsSync, mkdir, writeFile } = require('fs'); +const fs = require('fs'); const { userInfo, homedir } = require('os'); const { app } = require('electron'); const path = require('path'); @@ -69,14 +69,10 @@ const installToMacOS = (manifest) => { const dirs = getDarwinDirectory(); for (const [ key, value ] of Object.entries(dirs)) { - if (existsSync(value)) { - const p = path.join(value, 'NativeMessagingHosts', MANIFEST_FILENAME); - - writeManifest(p, manifest).catch(e => { - console.log(`Error writing manifest for ${key}. ${e}`); - }); + if (fs.existsSync(value)) { + writeManifest(path.join(value, 'NativeMessagingHosts', MANIFEST_FILENAME), manifest); } else { - console.log(`Warning: ${key} not found skipping.`); + console.log(`Manifest skipped: ${key}`); }; }; }; @@ -160,18 +156,25 @@ const getDarwinDirectory = () => { /* eslint-enable no-useless-escape */ }; -const writeManifest = async (dst, data) => { - if (!existsSync(path.dirname(dst))) { - await mkdir(path.dirname(dst)); +const writeManifest = (dst, data) => { + try { + if (!fs.existsSync(path.dirname(dst))) { + fs.mkdirSync(path.dirname(dst)); + }; + + fs.writeFileSync(dst, JSON.stringify(data, null, 2), {}, (err) => { + if (err) { + console.log(err); + } else { + console.log(`Manifest written: ${dst}`); + }; + }); + + console.log(`Manifest written: ${dst}`); + } catch(err) { + console.error(err); }; - await writeFile(dst, JSON.stringify(data, null, 2), (err) => { - if (err) { - console.log(err); - } else { - console.log(`Manifest written: ${dst}`); - }; - }); }; module.exports = { installNativeMessagingHost }; \ No newline at end of file diff --git a/electron/js/menu.js b/electron/js/menu.js index d8caab9195..1acc63505c 100644 --- a/electron/js/menu.js +++ b/electron/js/menu.js @@ -230,7 +230,7 @@ class MenuManager { { label: 'Export templates', click: () => Util.send(this.win, 'commandGlobal', 'exportTemplates') }, { label: 'Export objects', click: () => Util.send(this.win, 'commandGlobal', 'exportObjects') }, - { label: 'Export localstore', click: () => { Util.send(this.win, 'commandGlobal', 'exportLocalstore'); } }, + { label: 'Export localstore', click: () => Util.send(this.win, 'commandGlobal', 'exportLocalstore') }, Separator, diff --git a/electron/js/window.js b/electron/js/window.js index 4d45270b0a..7a2a198cea 100644 --- a/electron/js/window.js +++ b/electron/js/window.js @@ -53,7 +53,7 @@ class WindowManager { win = null; }); - win.once('ready-to-show', () => { win.show(); }); + win.once('ready-to-show', () => win.show()); win.on('focus', () => { UpdateManager.setWindow(win); MenuManager.setWindow(win); diff --git a/extension/entry.tsx b/extension/entry.tsx index a6790d08b4..491ee1f7b1 100644 --- a/extension/entry.tsx +++ b/extension/entry.tsx @@ -5,7 +5,6 @@ import Popup from './popup'; import Iframe from './iframe'; import Util from './lib/util'; import Extension from 'json/extension.json'; -import Url from 'json/url.json'; import './scss/common.scss'; @@ -13,7 +12,13 @@ window.Electron = { currentWindow: () => ({ windowId: 1 }), Api: () => {}, }; -window.AnytypeGlobalConfig = { emojiPrefix: Url.emojiPrefix, menuBorderTop: 16, menuBorderBottom: 16, debug: { mw: true } }; + +window.AnytypeGlobalConfig = { + emojiUrl: Extension.clipper.emojiUrl, + menuBorderTop: 16, + menuBorderBottom: 16, + debug: { mw: true }, +}; let rootId = ''; let component: any = null; diff --git a/extension/iframe/create.tsx b/extension/iframe/create.tsx index 35da99a6fc..86bfa0279c 100644 --- a/extension/iframe/create.tsx +++ b/extension/iframe/create.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import $ from 'jquery'; import { observer } from 'mobx-react'; -import { Button, Block, Loader, Icon, Select } from 'Component'; +import { Button, Block, Loader, Icon, Select, IconObject } from 'Component'; import { I, C, M, translate, UtilObject, UtilData } from 'Lib'; import { blockStore, extensionStore, menuStore, dbStore, commonStore } from 'Store'; @@ -37,7 +37,7 @@ const Create = observer(class Create extends React.Component !it.isFile()); return (
this.node = ref} className="page pageCreate"> @@ -59,6 +59,7 @@ const Create = observer(class Create extends React.Component
+ {object ? : ''}
{object ? object.name : translate('commonSelectObject')}
@@ -134,8 +135,10 @@ const Create = observer(class Create extends React.Component - this.ref = ref} placeholder="Challenge" /> +
+ - <div className="buttons"> - <Button type="input" color="pink" className="c32" text="Authorize" /> - </div> + <Pin + ref={ref => this.ref = ref} + pinLength={4} + focusOnMount={true} + onSuccess={this.onSuccess} + onError={this.onError} + /> <Error text={error} /> - </form> + </div> ); }; - onSubmit (e: any) { - e.preventDefault(); - + onSuccess () { C.AccountLocalLinkSolveChallenge(extensionStore.challengeId, this.ref?.getValue().trim(), (message: any) => { if (message.error.code) { this.setState({ error: message.error.description }); @@ -52,6 +55,9 @@ const Challenge = observer(class Challenge extends React.Component<I.PageCompone }); }; + onError () { + }; + }); export default Challenge; \ No newline at end of file diff --git a/extension/popup/create.tsx b/extension/popup/create.tsx index d983886838..b5eed15711 100644 --- a/extension/popup/create.tsx +++ b/extension/popup/create.tsx @@ -150,7 +150,7 @@ const Create = observer(class Create extends React.Component<I.PageComponent, St </div> </div> - <div className="buttons"> + <div className="buttonsWrapper"> <Button color="pink" className="c32" text="Save" type="input" subType="submit" onClick={this.onSubmit} /> </div> @@ -334,9 +334,9 @@ const Create = observer(class Create extends React.Component<I.PageComponent, St horizontal: I.MenuDirection.Center, commonFilter: true, onOpen: () => { - window.setTimeout(() => { $(element).addClass('isFocused'); }); + window.setTimeout(() => $(element).addClass('isFocused')); }, - onClose: () => { $(element).removeClass('isFocused'); }, + onClose: () => $(element).removeClass('isFocused'), data: { canAdd: true, filter: '', diff --git a/extension/popup/index.tsx b/extension/popup/index.tsx index afae27627b..46349fab80 100644 --- a/extension/popup/index.tsx +++ b/extension/popup/index.tsx @@ -32,7 +32,7 @@ const Index = observer(class Index extends React.Component<I.PageComponent, Stat <div className="page pageIndex"> <Label text="To save in Anytype you need to Pair with the app" /> - <div className="buttons"> + <div className="buttonsWrapper"> <Button color="pink" className="c32" text="Pair with app" onClick={this.onOpen} /> <Button color="blank" className="c32" text="Download app" onClick={this.onDownload} /> </div> diff --git a/extension/popup/success.tsx b/extension/popup/success.tsx index 0bf745f325..f5f6a95c0a 100644 --- a/extension/popup/success.tsx +++ b/extension/popup/success.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { observer } from 'mobx-react'; import { Button } from 'Component'; import { I, UtilCommon, UtilObject } from 'Lib'; -import { extensionStore } from 'Store'; +import { extensionStore, detailStore } from 'Store'; import Url from 'json/url.json'; interface State { @@ -18,20 +18,18 @@ const Success = observer(class Success extends React.Component<I.PageComponent, }; render () { - const object = extensionStore.createdObject; + const object = detailStore.mapper(extensionStore.createdObject); if (!object) { return null; }; - const name = object.name || UtilObject.defaultName('Page'); - return ( <div className="page pageSuccess"> - <div className="label bold">{UtilCommon.sprintf('"%s" is saved!', UtilCommon.shorten(name, 64))}</div> + <div className="label bold">{UtilCommon.sprintf('"%s" is saved!', UtilCommon.shorten(object.name, 64))}</div> <div className="label">{object.description}</div> - <div className="buttons"> + <div className="buttonsWrapper"> <Button color="blank" className="c32" text="Open in app" onClick={this.onOpen} /> </div> </div> diff --git a/extension/scss/common.scss b/extension/scss/common.scss index aee8434315..c42f96093f 100644 --- a/extension/scss/common.scss +++ b/extension/scss/common.scss @@ -70,6 +70,15 @@ html.anytypeWebclipper-popup { } .button, .select, .cellContent { cursor: pointer; } - .tagItem { @include text-small; } + + .filter.outlined { + .inner { border-radius: 1px; border: 1px solid var(--color-shape-secondary); box-shadow: unset; height: 32px; } + } + + .filter.outlined.isFocused { border: unset !important; box-shadow: unset !important; } + .filter.outlined.isFocused { + .inner { border-color: var(--color-ice) !important; box-shadow: 0px 0px 0px 1px var(--color-ice) !important; } + .input { border: unset !important; box-shadow: unset !important; } + } } \ No newline at end of file diff --git a/extension/scss/popup.scss b/extension/scss/popup.scss index a043ccccf4..2038034860 100644 --- a/extension/scss/popup.scss +++ b/extension/scss/popup.scss @@ -8,14 +8,26 @@ html.anytypeWebclipper-popup { width: 268px; } .menu.vertical { .wrap, .items, .scrollArea, .ReactVirtualized__List { border-radius: inherit; } } + + .menu.menuDataviewOptionEdit { + .section.colorPicker { + .items { + .item.color { height: 35px; width: 35px; } + } + } + } } .input, .select, .textarea { @include text-small; border: 1px solid var(--color-shape-secondary); width: 100%; border-radius: 1px; } + .pin { + .input { width: 32px; height: 40px; @include text-paragraph; border-radius: 6px; } + } + .input, .select { height: 32px; padding: 0px 10px; } .select { display: flex; align-items: center; } .textarea { padding: 10px; resize: none; height: 68px; display: block; } - .buttons { display: flex; flex-direction: column; justify-content: center; gap: 8px 0px; margin: 16px 0px 0px 0px; } + .buttonsWrapper { display: flex; flex-direction: column; justify-content: center; gap: 8px 0px; margin: 16px 0px 0px 0px; } .loaderWrapper { position: fixed; left: 0px; top: 0px; width: 100%; height: 100%; background: var(--color-bg-loader); z-index: 10; } .error { @include text-small; margin: 1em 0px 0px 0px; } @@ -23,6 +35,10 @@ html.anytypeWebclipper-popup { width: 268px; } .page.pageIndex, .page.pageChallenge { padding: 50px 16px; text-align: center; } + .page.pageChallenge { + .title { @include text-common; font-weight: 600; margin: 0px 0px 24px 0px; } + } + .page.pageCreate { padding: 16px; } .page.pageCreate { .row { margin: 0px 0px 10px 0px; } diff --git a/go.mod b/go.mod new file mode 100644 index 0000000000..f5f37fb6d6 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module nativeMessagingHost + +go 1.21 \ No newline at end of file diff --git a/middleware.version b/middleware.version index 13b2f1eecd..ad2b8d01c6 100644 --- a/middleware.version +++ b/middleware.version @@ -1 +1 @@ -0.30.12 \ No newline at end of file +0.31.4 \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 5b401595f0..78ab5b2c12 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "anytype", - "version": "0.38.0", + "version": "0.38.6-alpha", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "anytype", - "version": "0.38.0", + "version": "0.38.6-alpha", "hasInstallScript": true, "license": "SEE LICENSE IN LICENSE.md", "dependencies": { diff --git a/package.json b/package.json index a1945e49e4..02c2c16317 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "anytype", - "version": "0.38.0", + "version": "0.38.6-alpha", "description": "Anytype", "main": "electron.js", "scripts": { @@ -18,7 +18,7 @@ "build:dev": "webpack --mode=development --node-env=development --config webpack.config.js", "build:deps": "webpack --config webpack.node.config.js --stats detailed | grep 'node_modules' | sed -E 's/.*(node_modules[\\/][^\\\\/[:space:]]{1,})[\\\\/].*/\\1/' | uniq | node save-node-deps.js", "build:nmh": "go build -o dist/nativeMessagingHost ./go/nativeMessagingHost.go", - "build:nmh-win": "go build -o dist/nativeMessagingHost.exe ./gonativeMessagingHost.go", + "build:nmh-win": "go build -o dist/nativeMessagingHost.exe ./go/nativeMessagingHost.go", "dist:mac": "npm run build:deps && webpack --progress --mode=production --node-env=production && DATE=`date '+%Y-%m-%d_%H_%M'` GIT_COMMIT=`git rev-parse --short HEAD` electron-builder --macos --arm64 --x64", "dist:macarm": "npm run build:deps && webpack --mode=production --node-env=production && DATE=`date '+%Y-%m-%d_%H_%M'` GIT_COMMIT=`git rev-parse --short HEAD` electron-builder --macos --arm64", "dist:macamd": "npm run build:deps && webpack --mode=production --node-env=production && DATE=`date '+%Y-%m-%d_%H_%M'` GIT_COMMIT=`git rev-parse --short HEAD` electron-builder --macos --x64", @@ -581,4 +581,4 @@ "pre-commit": "npm run precommit && git add licenses.json" } } -} \ No newline at end of file +} diff --git a/src/img/icon/menu/action/clipboard0.svg b/src/img/icon/menu/action/clipboard0.svg new file mode 100644 index 0000000000..41dd4dba43 --- /dev/null +++ b/src/img/icon/menu/action/clipboard0.svg @@ -0,0 +1,3 @@ +<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M8.06301 2.5C8.28503 1.63739 9.06808 1 10 1C10.9319 1 11.715 1.63739 11.937 2.5H13C13.5523 2.5 14 2.94772 14 3.5V4C14 4.55228 13.5523 5 13 5H10H7C6.44772 5 6 4.55228 6 4V3.5C6 2.94772 6.44772 2.5 7 2.5H8.06301ZM11 3C11 3.55228 10.5523 4 10 4C9.44772 4 9 3.55228 9 3C9 2.44772 9.44772 2 10 2C10.5523 2 11 2.44772 11 3ZM3 6.00002C3 4.51353 4.08114 3.27954 5.5 3.0415V4.50002C5.5 4.52836 5.50118 4.55641 5.50349 4.58415C4.91907 4.78908 4.5 5.34561 4.5 6.00002V15C4.5 15.8285 5.17157 16.5 6 16.5H14C14.8284 16.5 15.5 15.8285 15.5 15V6.00002C15.5 5.34561 15.0809 4.78908 14.4965 4.58415C14.4988 4.55642 14.5 4.52836 14.5 4.50002V3.0415C15.9189 3.27954 17 4.51353 17 6.00002V15C17 16.6569 15.6569 18 14 18H6C4.34315 18 3 16.6569 3 15V6.00002ZM6.5 8.00002C6.22386 8.00002 6 8.22388 6 8.50002V9.00002C6 9.27617 6.22386 9.50002 6.5 9.50002H13.5C13.7761 9.50002 14 9.27617 14 9.00002V8.50002C14 8.22388 13.7761 8.00002 13.5 8.00002H6.5ZM6 11.5C6 11.2239 6.22386 11 6.5 11H11.5C11.7761 11 12 11.2239 12 11.5V12C12 12.2762 11.7761 12.5 11.5 12.5H6.5C6.22386 12.5 6 12.2762 6 12V11.5Z" fill="#B6B6B6"/> +</svg> \ No newline at end of file diff --git a/src/img/icon/menu/action/image0.svg b/src/img/icon/menu/action/image0.svg new file mode 100644 index 0000000000..fd75b7a135 --- /dev/null +++ b/src/img/icon/menu/action/image0.svg @@ -0,0 +1,3 @@ +<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"> +<path fill-rule="evenodd" clip-rule="evenodd" d="M5.5 3.5C4.39543 3.5 3.5 4.39543 3.5 5.5V13.4393L7.46967 9.46967L8 8.93934L8.53033 9.46967L11 11.9393L12.4697 10.4697L13 9.93934L13.5303 10.4697L16.5 13.4393V5.5C16.5 4.39543 15.6046 3.5 14.5 3.5H5.5ZM16.304 15.3646L13 12.0607L11.5303 13.5303L11 14.0607L10.4697 13.5303L8 11.0607L3.69604 15.3646C4.01855 16.0363 4.70512 16.5 5.5 16.5H14.5C15.2949 16.5 15.9815 16.0363 16.304 15.3646ZM2 5.5C2 3.567 3.567 2 5.5 2H14.5C16.433 2 18 3.567 18 5.5V14.5C18 16.433 16.433 18 14.5 18H5.5C3.567 18 2 16.433 2 14.5V5.5ZM13 8.5C13.8284 8.5 14.5 7.82843 14.5 7C14.5 6.17157 13.8284 5.5 13 5.5C12.1716 5.5 11.5 6.17157 11.5 7C11.5 7.82843 12.1716 8.5 13 8.5Z" fill="#B6B6B6"/> +</svg> diff --git a/src/json/extension.json b/src/json/extension.json index 51dc181911..eb53f8448f 100644 --- a/src/json/extension.json +++ b/src/json/extension.json @@ -2,6 +2,7 @@ "clipper": { "id": "jkmhmgghdjjbafmkgjmplhemjjnkligf", "name": "Anytype Webclipper", - "prefix": "anytypeWebclipper" + "prefix": "anytypeWebclipper", + "emojiUrl": "https://anytype-static.fra1.cdn.digitaloceanspaces.com/emojies/" } } \ No newline at end of file diff --git a/src/json/text.json b/src/json/text.json index 2e7b65ce84..179002cc26 100644 --- a/src/json/text.json +++ b/src/json/text.json @@ -362,6 +362,14 @@ "pageMainTypeNewSetOfObjects": "New Set of Objects", "pageMainTypeNoTemplates": "This Object Type doesn't have Templates", + "pageMainIndexComponentNotFound": "Page component "%s" not found", + + "pageMainArchiveEmpty": "Your Bin is empty", + "pageMainBlockEmpty": "Block not found", + "pageMainRelationObjectsCreated": "%s created", + + "pageMainMediaNotFound": "File not found", + "pageAuthLoginInvalidPhrase": "Invalid Recovery Phrase", "pageAuthDeletedAccountDeletionTitle": "This account is planned for deletion in %s", @@ -380,12 +388,6 @@ "pageHeadSimpleCreateSet": "Create Set", "pageHeadSimpleInstall": "Install", - "pageMainIndexComponentNotFound": "Page component "%s" not found", - - "pageMainArchiveEmpty": "Your Bin is empty", - "pageMainBlockEmpty": "Block not found", - "pageMainRelationObjectsCreated": "%s created", - "editorControlIcon": "Icon", "editorControlCover": "Cover", "editorControlLayout": "Layout", @@ -1273,6 +1275,7 @@ "menuQuickCaptureGroups": "Lists", "menuQuickCapturePinned": "Pinned", "menuQuickCaptureTooltipSearch": "Search types", + "menuQuickCaptureTooltipClipboard": "Create object from clipboard", "menuQuickCaptureOpenType": "Open type", "menuQuickCapturePin": "Pin on top", "menuQuickCaptureUnpin": "Unpin", @@ -1645,5 +1648,8 @@ "notificationGalleryImportErrorText": "Oops! \"%s\" wasn't installed. Please check your internet connection and try again or post a report on forum.", "notificationNotionErrorNoObjectsTitle": "Add integration to the Notion pages you want to import", - "notificationNotionErrorNoObjectsText": "Select Notion document → … -> Add Connections -> Confirm Integration" + "notificationNotionErrorNoObjectsText": "Select Notion document → … -> Add Connections -> Confirm Integration", + + "challengeTitle": "Please enter the following numbers in the extension" + } diff --git a/src/json/url.json b/src/json/url.json index 1c821c6521..808c341404 100644 --- a/src/json/url.json +++ b/src/json/url.json @@ -15,5 +15,5 @@ "contact": "mailto:support@anytype.io?subject=Support%20request%2C%20account%20%25accountId%25&body=%0A%0ATechnical%20information%0A----------------------------------------------%0AOS%20version%3A%20%25os%25%0AApp%20version%3A%20%25version%25%0ABuild%20number%3A%20%25build%25%0ALibrary%20version%3A%20%25middleware%25%0AAccount%20ID%3A%20%25accountId%25%0AAnalytics%20ID%3A%20%25analyticsId%25%0ADevice%20ID%3A%20%25deviceId%25", "extendStorage": "mailto:storage@anytype.io?subject=Get%20more%20storage%2C%20account%20%25accountId%25&body=Hi%2C%20Anytype%20team.%20I%20am%20reaching%20out%20to%20request%20an%20increase%20in%20my%20file%20storage%20capacity%20as%20I%20have%20run%20out%20of%20storage.%20My%20current%20limit%20is%20%25storageLimit%25.%20My%20account%20id%20is%20%25accountId%25.%20Cheers%2C%20%25spaceName%25", "gallery": "https://gallery.any.coop", - "emojiPrefix": "https://anytype-static.fra1.cdn.digitaloceanspaces.com/emojies/" + "cdn": "https://anytype-static.fra1.cdn.digitaloceanspaces.com" } diff --git a/src/scss/block/common.scss b/src/scss/block/common.scss index d949eec158..712d29fc86 100644 --- a/src/scss/block/common.scss +++ b/src/scss/block/common.scss @@ -49,7 +49,7 @@ .emptyToggle:hover { color: var(--color-text-primary); } } - .block.index0 { padding-top: 0px !important; } + .block.isFirst { padding-top: 0px !important; } .block { > .wrapContent { diff --git a/src/scss/block/layout.scss b/src/scss/block/layout.scss index ac2a24210c..827865437d 100644 --- a/src/scss/block/layout.scss +++ b/src/scss/block/layout.scss @@ -15,6 +15,7 @@ .block.blockLayout:not(.blockLayout.layoutDiv):not(.blockLayout.layoutHeader) { > .wrapContent { > .children { + > .block.first { padding-top: 0px !important; } > .block.first { .colResize { .inner { top: 0px; height: calc(100% + 15px); } diff --git a/src/scss/common.scss b/src/scss/common.scss index 30717fd097..4e776d1c72 100644 --- a/src/scss/common.scss +++ b/src/scss/common.scss @@ -44,7 +44,7 @@ input, textarea, select { font-family: 'Inter'; } .anim.to { opacity: 0; transform: translate3d(0px,-20px,0px); } .logo { width: 120px; height: 24px; background: url('~img/logo/color.svg') no-repeat; background-size: 100%; } - .version { @include text-small; color: #fff; transition-delay: 0.25s; } + .version { @include text-small; color: var(--color-text-inversion); transition-delay: 0.25s; } } #globalFade { diff --git a/src/scss/component/icon.scss b/src/scss/component/icon.scss index 5d9f2729cc..4f7b588880 100644 --- a/src/scss/component/icon.scss +++ b/src/scss/component/icon.scss @@ -42,16 +42,6 @@ .icon.layout.c-relation { background-image: url('~img/icon/object/relation.svg'); } .icon.layout.c-note { background-image: url('~img/icon/object/note.svg'); } -.icon.iconFile.other { background-image: url('~img/icon/file/other.svg') !important; } -.icon.iconFile.image { background-image: url('~img/icon/file/image.svg') !important; } -.icon.iconFile.video { background-image: url('~img/icon/file/video.svg') !important; } -.icon.iconFile.text { background-image: url('~img/icon/file/text.svg') !important; } -.icon.iconFile.archive { background-image: url('~img/icon/file/archive.svg') !important; } -.icon.iconFile.audio { background-image: url('~img/icon/file/audio.svg') !important; } -.icon.iconFile.pdf { background-image: url('~img/icon/file/pdf.svg') !important; } -.icon.iconFile.presentation { background-image: url('~img/icon/file/presentation.svg') !important; } -.icon.iconFile.table { background-image: url('~img/icon/file/table.svg') !important; } - .icon.view.c0 { background-image: url('~img/icon/dataview/view/grid.svg'); } .icon.view.c1 { background-image: url('~img/icon/dataview/view/list.svg'); } .icon.view.c2 { background-image: url('~img/icon/dataview/view/gallery.svg'); } diff --git a/src/scss/form/pin.scss b/src/scss/form/pin.scss index d67070b17a..ec617a8a94 100644 --- a/src/scss/form/pin.scss +++ b/src/scss/form/pin.scss @@ -5,7 +5,7 @@ width: 40px; height: 40px; margin-right: 8px; padding: 0px; text-align: center; vertical-align: top; font-size: 18px; border: 1px solid var(--color-shape-primary); border-radius: 2px; } - .input.active { box-shadow: 0px 0px 0px 1px var(--color-system-accent-100) inset; border-color: var(--color-system-accent-100); } + .input.isFocused { box-shadow: 0px 0px 0px 1px var(--color-system-accent-100) inset; border-color: var(--color-system-accent-100); } .input-password { font-size: 14px; line-height: 1; } .input:last-child { margin: 0px; } } \ No newline at end of file diff --git a/src/scss/media/print.scss b/src/scss/media/print.scss index 1fc6873069..fa3419d2a2 100644 --- a/src/scss/media/print.scss +++ b/src/scss/media/print.scss @@ -2,7 +2,7 @@ html.printMedia { @page { size: A4; margin: 0px 1.5cm; } @page:first { margin-top: 0px; } - body { margin: 0px; -webkit-print-color-adjust: exact; } + body { margin: 0px; -webkit-print-color-adjust: exact; caret-color: transparent; } #selection * { user-select: text; } .overPopup { overflow: visible !important; } @@ -55,6 +55,9 @@ html.printMedia { } .block.blockCover { left: 0px !important; top: 0px !important; width: 100%; border-radius: 0px; } + .block.blockCover { + .elements { display: none; } + } .blocks { width: 100%; } .blocks { @@ -64,8 +67,15 @@ html.printMedia { .icon.dnd { display: none; } } + .block.blockEmbed { + .icon.source, + .icon.resize { display: none; } + } + .block.blockMedia { - .icon.play { display: none; } + .icon.play, + .icon.download, + .icon.resize { display: none; } } .block.blockText { diff --git a/src/scss/menu/block/icon.scss b/src/scss/menu/block/icon.scss index f9a499ff1f..408a02302d 100644 --- a/src/scss/menu/block/icon.scss +++ b/src/scss/menu/block/icon.scss @@ -84,6 +84,8 @@ .icon.store { background-image: url('~img/icon/menu/action/store0.svg'); } .icon.pencil { background-image: url('~img/icon/menu/action/pencil0.svg'); } .icon.createWidget { background-image: url('~img/icon/menu/action/createWidget0.svg'); } + .icon.clipboard { background-image: url('~img/icon/menu/action/clipboard0.svg'); } + .icon.image { background-image: url('~img/icon/menu/action/image0.svg'); } .icon.coverChange { background-image: url('~img/icon/cover/change.svg'); } .icon.coverPosition { background-image: url('~img/icon/cover/position.svg'); } diff --git a/src/scss/menu/dataview/option.scss b/src/scss/menu/dataview/option.scss index 19f6daf4b1..57386a5b46 100644 --- a/src/scss/menu/dataview/option.scss +++ b/src/scss/menu/dataview/option.scss @@ -38,12 +38,19 @@ .section.colorPicker { padding: 8px 14px 0px 14px; } .section.colorPicker { - .items { width: 224px; display: flex; flex-wrap: wrap; gap: 8px; } + .items { display: flex; flex-wrap: wrap; gap: 8px; } .items { - .item.color { width: 38px; height: 38px; border-radius: 50%; position: relative;; } + .item.color { width: 38px; height: 38px; border-radius: 50%; position: relative; padding: 0px; } .item.color::before { display: none; } .item.hover, .item:hover { box-shadow: 0px 0px 0px 1px var(--color-bg-primary), 0px 0px 0px 3px var(--color-shape-primary); } + .item { + .icon.tick { + position: absolute; left: 50%; top: 50%; margin: -10px 0px 0px -10px; width: 20px; height: 20px; + background-image: url('~img/icon/tick.svg'); + } + } + .item.color-grey { background: var(--color-control-active); } .item.color-yellow { background: var(--color-yellow); } .item.color-orange { background: var(--color-orange); } @@ -54,8 +61,6 @@ .item.color-ice { background: var(--color-ice); } .item.color-teal { background: var(--color-teal); } .item.color-lime { background: var(--color-lime); } - - .icon.tick { position: absolute; left: 50%; top: 50%; margin: -10px 0px 0px -10px; width: 20px; height: 20px; background-image: url('~img/icon/tick.svg'); } } } .section.colorPicker:after { margin: 16px 0px 0px 0px; } diff --git a/src/scss/page/main/media.scss b/src/scss/page/main/media.scss index 4dee45bae4..9b05a25dbe 100644 --- a/src/scss/page/main/media.scss +++ b/src/scss/page/main/media.scss @@ -18,16 +18,18 @@ .block.blockMedia { max-height: unset; } } - .blocks.vertical { width: calc(100% - 56px); flex-direction: row; } + .blocks.vertical { width: calc(100% - 56px); flex-direction: row; gap: 0px 32px; } .blocks.vertical { - .side { width: 50%; } - .side.left { margin-right: 32px; min-width: 400px; } + > .side { width: 50%; } + > .side.left { min-width: 400px; } + > .side.left { + .iconObject { width: 100%; height: 100%; border-radius: 6px; background: var(--color-shape-highlight-medium); } + } .block.blockMedia { max-height: 100%; } .block.blockMedia { img.media { width: auto; height: auto; max-width: 100%; display: inline-block; object-fit: contain; } } - .iconObject { width: 100%; height: 100%; border-radius: 6px; background: var(--color-shape-highlight-medium); } } .blocks { diff --git a/src/scss/theme/dark/block.scss b/src/scss/theme/dark/block.scss index cb099154d2..78b5c7e3b8 100644 --- a/src/scss/theme/dark/block.scss +++ b/src/scss/theme/dark/block.scss @@ -1,9 +1,13 @@ .block.blockCover { .loaderWrapper { background: rgba(0,0,0,0.3); } + .author, .author a { color: var(--color-text-primary); } + .elements { .btn.white { background: var(--color-shape-secondary); color: var(--color-text-primary); } - .btn.white:hover { background: var(--color-bg-primary); color: var(--color-text-primary); } + .btn.white:hover { background: var(--color-shape-primary); color: var(--color-text-primary); } + + .btn.black { color: var(--color-text-primary); } .btn { .icon.icon { background-image: url('#{$themePath}/icon/add/icon1.svg'); } diff --git a/src/scss/theme/dark/common.scss b/src/scss/theme/dark/common.scss index 4b8d8cb5f3..22c19d0925 100644 --- a/src/scss/theme/dark/common.scss +++ b/src/scss/theme/dark/common.scss @@ -162,12 +162,12 @@ html.themeDark { .input.isReadonly { background: rgba(255,255,255,0.1); } .inputWithFile { border-color: transparent; background-color: var(--color-shape-highlight-medium); } .input-drag { - .fill { background: #fff; } - .icon { border-color: #fff; } + .fill { background: var(--color-text-primary); } + .icon { border-color: var(--color-text-secondary); } } .dragWrap { - .number { color: #fff; } + .number { color: var(--color-text-primary); } } .listPreviewObject { diff --git a/src/scss/widget/common.scss b/src/scss/widget/common.scss index 65fe0392d3..c6313eec55 100644 --- a/src/scss/widget/common.scss +++ b/src/scss/widget/common.scss @@ -59,11 +59,14 @@ > .dropTarget.targetTop.isOver::before { top: 0px; } > .dropTarget.targetBot.isOver::before { bottom: 0px; } + .item.isSection { padding-top: 12px; } + .item.isSection:first-child { padding-top: 0px; } .item.isSection { .inner { display: flex; align-items: center; } - .label { @include text-small; color: var(--color-text-secondary); @include text-overflow-nw; } + .label { @include text-small; font-weight: 500; color: var(--color-text-secondary); @include text-overflow-nw; } } - .item.isSection::before { display: none !important; } + .item.isSection::before, + .item.isSection .inner::before { display: none !important; } } .widget.active { diff --git a/src/ts/app.tsx b/src/ts/app.tsx index 9864c2455d..35ee55f2f1 100644 --- a/src/ts/app.tsx +++ b/src/ts/app.tsx @@ -306,6 +306,7 @@ class App extends React.Component<object, State> { onInit (e: any, data: any) { const { dataPath, config, isDark, isChild, account, phrase, languages, isPinChecked, css } = data; const win = $(window); + const body = $('body'); const node = $(this.node); const loader = node.find('#root-loader'); const anim = loader.find('.anim'); @@ -332,13 +333,18 @@ class App extends React.Component<object, State> { UtilCommon.injectCss('anytype-custom-css', css); }; + body.addClass('over'); + const cb = () => { window.setTimeout(() => { anim.addClass('to'); window.setTimeout(() => { loader.css({ opacity: 0 }); - window.setTimeout(() => { loader.remove(); }, 500); + window.setTimeout(() => { + loader.remove(); + body.removeClass('over'); + }, 500); }, 750); }, 2000); }; @@ -417,7 +423,7 @@ class App extends React.Component<object, State> { popupStore.closeAll(); }; - window.setTimeout(() => { popupStore.open(id, param); }, Constant.delay.popup); + window.setTimeout(() => popupStore.open(id, param), Constant.delay.popup); }; onUpdateCheck (e: any, auto: boolean) { diff --git a/src/ts/component/block/cover.tsx b/src/ts/component/block/cover.tsx index eef46e72a9..3c4ba2d961 100644 --- a/src/ts/component/block/cover.tsx +++ b/src/ts/component/block/cover.tsx @@ -177,6 +177,10 @@ const BlockCover = observer(class BlockCover extends React.Component<I.BlockComp onIcon (e: any) { const { rootId } = this.props; const root = blockStore.getLeaf(rootId, rootId); + + if (!root) { + return; + }; focus.clear(true); root.isObjectHuman() ? this.onIconUser() : this.onIconPage(); @@ -205,8 +209,8 @@ const BlockCover = observer(class BlockCover extends React.Component<I.BlockComp menuStore.update('smile', { element: `#block-icon-${rootId}` }); }); }, - onUpload (hash: string) { - UtilObject.setIcon(rootId, '', hash, () => { + onUpload (objectId: string) { + UtilObject.setIcon(rootId, '', objectId, () => { menuStore.update('smile', { element: `#block-icon-${rootId}` }); }); }, @@ -218,9 +222,9 @@ const BlockCover = observer(class BlockCover extends React.Component<I.BlockComp const { rootId } = this.props; Action.openFile(Constant.fileExtension.cover, paths => { - C.FileUpload(commonStore.space, '', paths[0], I.FileType.Image, (message: any) => { + C.FileUpload(commonStore.space, '', paths[0], I.FileType.Image, {}, (message: any) => { if (!message.error.code) { - UtilObject.setIcon(rootId, '', message.hash); + UtilObject.setIcon(rootId, '', message.objectId); }; }); }); @@ -302,14 +306,14 @@ const BlockCover = observer(class BlockCover extends React.Component<I.BlockComp this.setLoading(true); }; - onUpload (type: I.CoverType, hash: string) { + onUpload (type: I.CoverType, objectId: string) { const { rootId } = this.props; this.coords.x = 0; this.coords.y = -0.25; this.scale = 0; - UtilObject.setCover(rootId, type, hash, this.coords.x, this.coords.y, this.scale, () => { + UtilObject.setCover(rootId, type, objectId, this.coords.x, this.coords.y, this.scale, () => { this.loaded = false; this.setLoading(false); }); @@ -407,8 +411,8 @@ const BlockCover = observer(class BlockCover extends React.Component<I.BlockComp node.addClass('isDragging'); win.off('mousemove.cover mouseup.cover'); - win.on('mousemove.cover', (e: any) => { this.onDragMove(e); }); - win.on('mouseup.cover', (e: any) => { this.onDragEnd(e); }); + win.on('mousemove.cover', e => this.onDragMove(e)); + win.on('mouseup.cover', e => this.onDragEnd(e)); }; onDragMove (e: any) { @@ -511,7 +515,7 @@ const BlockCover = observer(class BlockCover extends React.Component<I.BlockComp preventCommonDrop(true); this.setLoading(true); - C.FileUpload(commonStore.space, '', file, I.FileType.Image, (message: any) => { + C.FileUpload(commonStore.space, '', file, I.FileType.Image, {}, (message: any) => { this.setLoading(false); preventCommonDrop(false); @@ -520,7 +524,7 @@ const BlockCover = observer(class BlockCover extends React.Component<I.BlockComp }; this.loaded = false; - UtilObject.setCover(rootId, I.CoverType.Upload, message.hash); + UtilObject.setCover(rootId, I.CoverType.Upload, message.objectId); }); }; diff --git a/src/ts/component/block/dataview.tsx b/src/ts/component/block/dataview.tsx index dc0a0a4a9a..bb8a01e6d3 100644 --- a/src/ts/component/block/dataview.tsx +++ b/src/ts/component/block/dataview.tsx @@ -156,7 +156,6 @@ const BlockDataview = observer(class BlockDataview extends React.Component<Props getView: this.getView, getTarget: this.getTarget, getSources: this.getSources, - getRecord: this.getRecord, getRecords: this.getRecords, getKeys: this.getKeys, getIdPrefix: this.getIdPrefix, @@ -474,7 +473,7 @@ const BlockDataview = observer(class BlockDataview extends React.Component<Props return this.applyObjectOrder('', UtilCommon.objectCopy(records)); }; - getRecord (recordId: string) { + getRecord (id: string) { const view = this.getView(); if (!view) { return {}; @@ -482,10 +481,10 @@ const BlockDataview = observer(class BlockDataview extends React.Component<Props const keys = this.getKeys(view.id); const subId = this.getSubId(); - const item = detailStore.get(subId, recordId, keys); + const item = detailStore.get(subId, id, keys); const { layout, isReadonly, isDeleted, snippet } = item; - if (item.name == UtilObject.defaultName('Page')) { + if (item.name == translate('defaultNamePage')) { item.name = ''; }; if (layout == I.ObjectLayout.Note) { @@ -961,7 +960,7 @@ const BlockDataview = observer(class BlockDataview extends React.Component<Props }; if (message.views && message.views.length) { - window.setTimeout(() => { this.loadData(message.views[0].id, 0, true); }, 50); + window.setTimeout(() => this.loadData(message.views[0].id, 0, true), 50); }; if (isNew) { @@ -1201,7 +1200,7 @@ const BlockDataview = observer(class BlockDataview extends React.Component<Props block.content.objectOrder.push(it); }; - window.setTimeout(() => { this.applyObjectOrder(it.groupId, records); }, 30); + window.setTimeout(() => this.applyObjectOrder(it.groupId, records), 30); }); if (callBack) { diff --git a/src/ts/component/block/dataview/cell/checkbox.tsx b/src/ts/component/block/dataview/cell/checkbox.tsx index 232f4616e5..28000dc781 100644 --- a/src/ts/component/block/dataview/cell/checkbox.tsx +++ b/src/ts/component/block/dataview/cell/checkbox.tsx @@ -12,8 +12,7 @@ const CellCheckbox = observer(class CellCheckbox extends React.Component<I.Cell> }; render () { - const { recordId, getRecord, withLabel, withName, relation } = this.props; - const record = getRecord(recordId); + const { withLabel, withName, relation, record } = this.props; if (!record) { return null; @@ -43,8 +42,7 @@ const CellCheckbox = observer(class CellCheckbox extends React.Component<I.Cell> }; getValue () { - const { relation, getRecord, recordId } = this.props; - const record = getRecord(recordId); + const { relation, record } = this.props; return Boolean(record[relation.relationKey]); }; diff --git a/src/ts/component/block/dataview/cell/file.tsx b/src/ts/component/block/dataview/cell/file.tsx index 4dd1454327..eae9ac3e3e 100644 --- a/src/ts/component/block/dataview/cell/file.tsx +++ b/src/ts/component/block/dataview/cell/file.tsx @@ -22,8 +22,7 @@ const CellFile = observer(class CellFile extends React.Component<I.Cell, State> }; render () { - const { subId, relation, recordId, getRecord, iconSize, placeholder, elementMapper, arrayLimit } = this.props; - const record = getRecord(recordId); + const { subId, relation, record, iconSize, placeholder, elementMapper, arrayLimit } = this.props; if (!record) { return null; @@ -48,7 +47,7 @@ const CellFile = observer(class CellFile extends React.Component<I.Cell, State> }; const Item = (item: any) => ( - <div className="element" onClick={(e: any) => { this.onClick(e, item); }}> + <div className="element" onClick={e => this.onClick(e, item)}> <div className="flex"> <IconObject object={item} size={iconSize} /> <div className="name">{UtilFile.name(item)}</div> diff --git a/src/ts/component/block/dataview/cell/index.tsx b/src/ts/component/block/dataview/cell/index.tsx index 1ce75fbbb3..27540f7d72 100644 --- a/src/ts/component/block/dataview/cell/index.tsx +++ b/src/ts/component/block/dataview/cell/index.tsx @@ -40,15 +40,14 @@ const Cell = observer(class Cell extends React.Component<Props> { }; render () { - const { elementId, relationKey, recordId, onClick, idPrefix, getRecord } = this.props; + const { elementId, relationKey, record, onClick, idPrefix } = this.props; const relation = this.getRelation(); - const record = getRecord(recordId); if (!relation || !record) { return null; }; - const id = Relation.cellId(idPrefix, relation.relationKey, recordId); + const id = Relation.cellId(idPrefix, relation.relationKey, record.id); const canEdit = this.canEdit(); const cn = [ @@ -135,9 +134,8 @@ const Cell = observer(class Cell extends React.Component<Props> { }; checkValue (): boolean { - const { recordId, getRecord } = this.props; + const { record } = this.props; const relation = this.getRelation(); - const record = getRecord(recordId); if (relation.relationKey == 'name') { return true; @@ -149,16 +147,15 @@ const Cell = observer(class Cell extends React.Component<Props> { onClick (e: any) { e.stopPropagation(); - const { rootId, subId, block, recordId, getRecord, maxWidth, menuClassName, menuClassNameWrap, idPrefix, pageContainer, bodyContainer, cellPosition, placeholder } = this.props; + const { rootId, subId, block, record, maxWidth, menuClassName, menuClassNameWrap, idPrefix, pageContainer, bodyContainer, cellPosition, placeholder } = this.props; const relation = this.getRelation(); - const record = getRecord(recordId); if (!relation || !record) { return; }; const { config } = commonStore; - const cellId = Relation.cellId(idPrefix, relation.relationKey, recordId); + const cellId = Relation.cellId(idPrefix, relation.relationKey, record.id); const value = record[relation.relationKey] || ''; if (!this.canEdit()) { @@ -427,7 +424,7 @@ const Cell = observer(class Cell extends React.Component<Props> { }); if (!config.debug.ui) { - win.off('blur.cell').on('blur.cell', () => { menuStore.closeAll(Constant.menuIds.cell); }); + win.off('blur.cell').on('blur.cell', () => menuStore.closeAll(Constant.menuIds.cell)); }; } else if (closeIfOpen) { @@ -441,7 +438,7 @@ const Cell = observer(class Cell extends React.Component<Props> { }; onChange (value: any, callBack?: (message: any) => void) { - const { onCellChange, recordId } = this.props; + const { onCellChange, record } = this.props; const relation = this.getRelation(); if (!relation) { @@ -450,14 +447,14 @@ const Cell = observer(class Cell extends React.Component<Props> { value = Relation.formatValue(relation, value, true); if (onCellChange) { - onCellChange(recordId, relation.relationKey, value, callBack); + onCellChange(record.id, relation.relationKey, value, callBack); }; }; onMouseEnter (e: any) { - const { onMouseEnter, showTooltip, tooltipX, tooltipY, idPrefix, recordId, withName } = this.props; + const { onMouseEnter, showTooltip, tooltipX, tooltipY, idPrefix, record, withName } = this.props; const relation = this.getRelation(); - const cell = $(`#${Relation.cellId(idPrefix, relation.relationKey, recordId)}`); + const cell = $(`#${Relation.cellId(idPrefix, relation.relationKey, record.id)}`); if (onMouseEnter) { onMouseEnter(e); @@ -485,9 +482,8 @@ const Cell = observer(class Cell extends React.Component<Props> { }; canEdit () { - const { readonly, getRecord, recordId } = this.props; + const { readonly, record } = this.props; const relation = this.getRelation(); - const record = getRecord(recordId); if (!relation || !record || readonly || relation.isReadonlyValue || record.isReadonly) { return false; diff --git a/src/ts/component/block/dataview/cell/object.tsx b/src/ts/component/block/dataview/cell/object.tsx index 4db6d3698b..06647a4975 100644 --- a/src/ts/component/block/dataview/cell/object.tsx +++ b/src/ts/component/block/dataview/cell/object.tsx @@ -40,8 +40,7 @@ const CellObject = observer(class CellObject extends React.Component<I.Cell, Sta render () { const { isEditing } = this.state; - const { getRecord, recordId, relation, iconSize, elementMapper, arrayLimit, readonly } = this.props; - const record = getRecord(recordId); + const { record, relation, iconSize, elementMapper, arrayLimit, readonly } = this.props; const cn = [ 'wrap' ]; if (!relation || !record) { @@ -171,7 +170,7 @@ const CellObject = observer(class CellObject extends React.Component<I.Cell, Sta this.setState({ isEditing: v }); if (v) { - window.setTimeout(() => { this.focus(); }, 15); + window.setTimeout(() => this.focus(), 15); }; }; }; @@ -216,8 +215,7 @@ const CellObject = observer(class CellObject extends React.Component<I.Cell, Sta }; getItems (): any[] { - const { relation, getRecord, recordId, subId } = this.props; - const record = getRecord(recordId); + const { relation, record, subId } = this.props; if (!relation || !record) { return []; diff --git a/src/ts/component/block/dataview/cell/select.tsx b/src/ts/component/block/dataview/cell/select.tsx index 28796bb140..2c81a07e9d 100644 --- a/src/ts/component/block/dataview/cell/select.tsx +++ b/src/ts/component/block/dataview/cell/select.tsx @@ -36,9 +36,8 @@ const CellSelect = observer(class CellSelect extends React.Component<I.Cell, Sta }; render () { - const { relation, getRecord, recordId, elementMapper, arrayLimit } = this.props; + const { relation, record, elementMapper, arrayLimit } = this.props; const { isEditing } = this.state; - const record = getRecord(recordId); const placeholder = this.props.placeholder || translate(`placeholderCell${relation.format}`); const isSelect = relation.format == I.RelationType.Select; const cn = [ 'wrap' ]; @@ -91,7 +90,7 @@ const CellSelect = observer(class CellSelect extends React.Component<I.Cell, Sta color={item.color} canEdit={!isSelect} className={Relation.selectClassName(relation.format)} - onRemove={() => { this.onValueRemove(item.id); }} + onRemove={() => this.onValueRemove(item.id)} /> </span> ))} @@ -344,8 +343,11 @@ const CellSelect = observer(class CellSelect extends React.Component<I.Cell, Sta }; getItems (): any[] { - const { relation, getRecord, recordId } = this.props; - const record = getRecord(recordId); + const { relation, record } = this.props; + + if (!relation || !record) { + return []; + }; let items = record && relation ? Relation.getOptions(record[relation.relationKey]) : []; items.filter(it => it && !it._empty_ && !it.isArchived && !it.isDeleted); diff --git a/src/ts/component/block/dataview/cell/text.tsx b/src/ts/component/block/dataview/cell/text.tsx index 3e6808c2a5..b9577b23ad 100644 --- a/src/ts/component/block/dataview/cell/text.tsx +++ b/src/ts/component/block/dataview/cell/text.tsx @@ -41,8 +41,7 @@ const CellText = observer(class CellText extends React.Component<I.Cell, State> render () { const { isEditing } = this.state; const { showRelativeDates } = commonStore; - const { recordId, relation, getView, getRecord, textLimit, isInline, iconSize, placeholder, shortUrl } = this.props; - const record = getRecord(recordId); + const { relation, getView, record, textLimit, isInline, iconSize, placeholder, shortUrl } = this.props; if (!record || !relation) { return null; @@ -220,7 +219,7 @@ const CellText = observer(class CellText extends React.Component<I.Cell, State> if (record.layout == I.ObjectLayout.Note) { value = record.snippet; } else { - value = value || UtilObject.defaultName('Page'); + value = value || translate('defaultNamePage'); }; }; }; @@ -234,8 +233,7 @@ const CellText = observer(class CellText extends React.Component<I.Cell, State> }; componentDidMount () { - const { relation, recordId, getRecord } = this.props; - const record = getRecord(recordId); + const { relation, record } = this.props; this._isMounted = true; this.setValue(Relation.formatValue(relation, record[relation.relationKey], true)); @@ -243,9 +241,8 @@ const CellText = observer(class CellText extends React.Component<I.Cell, State> componentDidUpdate () { const { isEditing } = this.state; - const { id, relation, recordId, viewType, cellPosition, getView, getRecord } = this.props; + const { id, relation, viewType, record, cellPosition, getView } = this.props; const cell = $(`#${id}`); - const record = getRecord(recordId); this.setValue(Relation.formatValue(relation, record[relation.relationKey], true)); @@ -259,14 +256,14 @@ const CellText = observer(class CellText extends React.Component<I.Cell, State> }; if (viewType != I.ViewType.Grid) { - card = $(`#record-${recordId}`); + card = $(`#record-${record.id}`); }; if (isEditing) { let value = this.value; if (relation.relationKey == 'name') { - if (value == UtilObject.defaultName('Page')) { + if (value == translate('defaultNamePage')) { value = ''; }; } else @@ -398,8 +395,7 @@ const CellText = observer(class CellText extends React.Component<I.Cell, State> }; onBlur (e: any) { - const { relation, onChange, recordId, getRecord } = this.props; - const record = getRecord(recordId); + const { relation, record, onChange } = this.props; if (!this.ref || keyboard.isBlurDisabled || !record) { return; @@ -442,18 +438,17 @@ const CellText = observer(class CellText extends React.Component<I.Cell, State> }; onIconSelect (icon: string) { - UtilObject.setIcon(this.props.recordId, icon, ''); + UtilObject.setIcon(this.props.record.id, icon, ''); }; - onIconUpload (hash: string) { - UtilObject.setIcon(this.props.recordId, '', hash); + onIconUpload (objectId: string) { + UtilObject.setIcon(this.props.record.id, '', objectId); }; onCheckbox () { - const { recordId, getRecord } = this.props; - const record = getRecord(recordId); + const { record } = this.props; - UtilObject.setDone(recordId, !record.done, () => { + UtilObject.setDone(record.id, !record.done, () => { if (this._isMounted) { this.forceUpdate(); }; diff --git a/src/ts/component/block/dataview/controls.tsx b/src/ts/component/block/dataview/controls.tsx index 463f40b9fd..285ef567ea 100644 --- a/src/ts/component/block/dataview/controls.tsx +++ b/src/ts/component/block/dataview/controls.tsx @@ -99,7 +99,7 @@ const Controls = observer(class Controls extends React.Component<Props> { onClick={() => this.onViewSet(item)} onContextMenu={e => this.onViewContext(e, `#views #${elementId}`, item)} > - {item.name || UtilObject.defaultName('Page')} + {item.name || translate('defaultNamePage')} </div> ); }); diff --git a/src/ts/component/block/dataview/head.tsx b/src/ts/component/block/dataview/head.tsx index 1eabf76854..c54243cafc 100644 --- a/src/ts/component/block/dataview/head.tsx +++ b/src/ts/component/block/dataview/head.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { observer } from 'mobx-react'; import { Icon, Editable } from 'Component'; import { I, C, keyboard, UtilObject, analytics, translate, UtilCommon } from 'Lib'; -import { menuStore, detailStore, commonStore, dbStore } from 'Store'; +import { menuStore, detailStore, commonStore } from 'Store'; import Constant from 'json/constant.json'; interface State { @@ -43,6 +43,7 @@ const Head = observer(class Head extends React.Component<I.ViewComponent, State> const { targetObjectId } = block.content; const object = getTarget(); const cn = [ 'dataviewHead' ]; + const placeholder = isCollection ? translate('defaultNameCollection') : translate('defaultNameSet'); if (className) { cn.push(className); @@ -69,7 +70,7 @@ const Head = observer(class Head extends React.Component<I.ViewComponent, State> ref={ref => this.ref = ref} id="value" readonly={readonly || !isEditing} - placeholder={UtilObject.defaultName(isCollection ? 'Collection' : 'Set')} + placeholder={placeholder} onFocus={this.onFocus} onMouseDown={this.onTitle} onBlur={this.onBlur} @@ -301,7 +302,11 @@ const Head = observer(class Head extends React.Component<I.ViewComponent, State> const object = getTarget(); let name = String(object.name || ''); - if ((name == UtilObject.defaultName('Page')) || (name == UtilObject.defaultName('Set'))) { + if ([ + translate('defaultNamePage'), + translate('defaultNameSet'), + translate('defaultNameCollection'), + ].includes(name)) { name = ''; }; @@ -337,7 +342,11 @@ const Head = observer(class Head extends React.Component<I.ViewComponent, State> return; }; - if ((value == UtilObject.defaultName('Page')) || (value == UtilObject.defaultName('Set'))) { + if ([ + translate('defaultNamePage'), + translate('defaultNameSet'), + translate('defaultNameCollection'), + ].includes(value)) { value = ''; }; @@ -357,12 +366,12 @@ const Head = observer(class Head extends React.Component<I.ViewComponent, State> }; }; - onIconUpload (hash: string) { + onIconUpload (objectId: string) { const { block } = this.props; const { targetObjectId } = block.content; if (targetObjectId) { - UtilObject.setIcon(targetObjectId, '', hash); + UtilObject.setIcon(targetObjectId, '', objectId); }; }; diff --git a/src/ts/component/block/dataview/view/board.tsx b/src/ts/component/block/dataview/view/board.tsx index ef0b41feb5..e676f09449 100644 --- a/src/ts/component/block/dataview/view/board.tsx +++ b/src/ts/component/block/dataview/view/board.tsx @@ -108,7 +108,7 @@ const ViewBoard = observer(class ViewBoard extends React.Component<I.ViewCompone this.unbind(); const node = $(this.node); - node.find('#scroll').on('scroll', (e: any) => { this.onScrollView(); }); + node.find('#scroll').on('scroll', e => this.onScrollView()); }; unbind () { @@ -267,7 +267,7 @@ const ViewBoard = observer(class ViewBoard extends React.Component<I.ViewCompone clone.attr({ id: '' }).addClass('isClone').css({ zIndex: 10000, position: 'fixed', left: -10000, top: -10000 }); view.append(clone); - $(document).off('dragover').on('dragover', (e: any) => { e.preventDefault(); }); + $(document).off('dragover').on('dragover', e => e.preventDefault()); $(window).off('dragend.board drag.board'); $('body').addClass('grab'); @@ -310,8 +310,8 @@ const ViewBoard = observer(class ViewBoard extends React.Component<I.ViewCompone this.initCacheColumn(); this.isDraggingColumn = true; - win.on('drag.board', (e: any) => { this.onDragMoveColumn(e, groupId); }); - win.on('dragend.board', (e: any) => { this.onDragEndColumn(e, groupId); }); + win.on('drag.board', e => this.onDragMoveColumn(e, groupId)); + win.on('dragend.board', e => this.onDragEndColumn(e, groupId)); }; onDragMoveColumn (e: any, groupId: any) { diff --git a/src/ts/component/block/dataview/view/board/card.tsx b/src/ts/component/block/dataview/view/board/card.tsx index 73b8b6ae92..3a5b0bd571 100644 --- a/src/ts/component/block/dataview/view/board/card.tsx +++ b/src/ts/component/block/dataview/view/board/card.tsx @@ -7,7 +7,6 @@ import { Cell } from 'Component'; interface Props extends I.ViewComponent { id: string; groupId: string; - recordId: string; onDragStartCard?: (e: any, groupId: any, record: any) => void; }; @@ -17,7 +16,7 @@ const Card = observer(class Card extends React.Component<Props> { node: any = null; render () { - const { rootId, block, groupId, id, recordId, getView, onContext, onRef, onDragStartCard, getIdPrefix, isInline, getVisibleRelations } = this.props; + const { rootId, block, groupId, id, getView, onContext, onRef, onDragStartCard, getIdPrefix, isInline, getVisibleRelations } = this.props; const view = getView(); const relations = getVisibleRelations(); const idPrefix = getIdPrefix(); @@ -29,13 +28,13 @@ const Card = observer(class Card extends React.Component<Props> { let content = ( <div className="cardContent"> {relations.map((relation: any, i: number) => { - const id = Relation.cellId(idPrefix, relation.relationKey, recordId); + const id = Relation.cellId(idPrefix, relation.relationKey, record.id); return ( <Cell elementId={id} key={'board-cell-' + view.id + relation.relationKey} {...this.props} - getRecord={() => record} + record={record} subId={subId} ref={ref => onRef(ref, Relation.cellId(idPrefix, relation.relationKey, record.id))} relationKey={relation.relationKey} @@ -105,7 +104,7 @@ const Card = observer(class Card extends React.Component<Props> { 0: () => { keyboard.withCommand(e) ? UtilObject.openWindow(record) : UtilObject.openPopup(record); }, - 2: () => { onContext(e, record.id); } + 2: () => onContext(e, record.id) }; const ids = selection ? selection.get(I.SelectType.Record) : []; @@ -119,7 +118,7 @@ const Card = observer(class Card extends React.Component<Props> { }; onCellClick (e: React.MouseEvent, vr: I.ViewRelation) { - const { onCellClick, recordId } = this.props; + const { onCellClick, record } = this.props; const relation = dbStore.getRelationByKey(vr.relationKey); if (!relation || ![ I.RelationType.Url, I.RelationType.Phone, I.RelationType.Email, I.RelationType.Checkbox ].includes(relation.format)) { @@ -129,7 +128,7 @@ const Card = observer(class Card extends React.Component<Props> { e.preventDefault(); e.stopPropagation(); - onCellClick(e, relation.relationKey, recordId); + onCellClick(e, relation.relationKey, record.id); }; resize () { diff --git a/src/ts/component/block/dataview/view/board/column.tsx b/src/ts/component/block/dataview/view/board/column.tsx index 29bc73d8a9..91b458d687 100644 --- a/src/ts/component/block/dataview/view/board/column.tsx +++ b/src/ts/component/block/dataview/view/board/column.tsx @@ -83,8 +83,7 @@ const Column = observer(class Column extends React.Component<Props> { block={block} relationKey={view.groupRelationKey} viewType={I.ViewType.Board} - getRecord={() => head} - recordId="" + record={head} readonly={true} arrayLimit={4} withName={true} @@ -109,7 +108,7 @@ const Column = observer(class Column extends React.Component<Props> { {...this.props} id={item.id} groupId={id} - recordId={item.id} + record={item} /> ))} @@ -247,7 +246,7 @@ const Column = observer(class Column extends React.Component<Props> { menuStore.open('dataviewGroupEdit', { element: `#column-${id}-head`, horizontal: I.MenuDirection.Center, - onClose: () => { node.removeClass('active'); }, + onClose: () => node.removeClass('active'), data: { rootId, blockId: block.id, diff --git a/src/ts/component/block/dataview/view/calendar/item.tsx b/src/ts/component/block/dataview/view/calendar/item.tsx index 8044ec4338..3ffa054b82 100644 --- a/src/ts/component/block/dataview/view/calendar/item.tsx +++ b/src/ts/component/block/dataview/view/calendar/item.tsx @@ -60,7 +60,7 @@ const Item = observer(class Item extends React.Component<Props> { size={16} canEdit={canEdit} onSelect={icon => this.onSelect(item, icon)} - onUpload={hash => this.onUpload(item, hash)} + onUpload={objectId => this.onUpload(item, objectId)} onCheckbox={() => this.onCheckbox(item)} /> ); @@ -109,8 +109,8 @@ const Item = observer(class Item extends React.Component<Props> { UtilObject.setIcon(item.id, icon, ''); }; - onUpload (item: any, hash: string) { - UtilObject.setIcon(item.id, '', hash); + onUpload (item: any, objectId: string) { + UtilObject.setIcon(item.id, '', objectId); }; onCheckbox (item: any) { diff --git a/src/ts/component/block/dataview/view/gallery.tsx b/src/ts/component/block/dataview/view/gallery.tsx index 499e9d94df..ced2aac679 100644 --- a/src/ts/component/block/dataview/view/gallery.tsx +++ b/src/ts/component/block/dataview/view/gallery.tsx @@ -81,9 +81,16 @@ const ViewGallery = observer(class ViewGallery extends React.Component<I.ViewCom const row = (id: string) => { if (id == 'add-record') { - return <CardAdd key={'gallery-card-' + view.id + id} />; + return <CardAdd key={`gallery-card-${view.id + id}`} />; } else { - return <Card key={'gallery-card-' + view.id + id} {...this.props} recordId={id} getCoverObject={this.getCoverObject} />; + return ( + <Card + key={`gallery-card-${view.id + id}`} + {...this.props} + record={detailStore.get(subId, id, getKeys(view.id))} + getCoverObject={this.getCoverObject} + /> + ); }; }; @@ -305,7 +312,7 @@ const ViewGallery = observer(class ViewGallery extends React.Component<I.ViewCom }; getCoverObject (id: string): any { - const { rootId, block, getView, getRecord } = this.props; + const { rootId, block, getView, getKeys } = this.props; const view = getView(); if (!view.coverRelationKey) { @@ -313,7 +320,7 @@ const ViewGallery = observer(class ViewGallery extends React.Component<I.ViewCom }; const subId = dbStore.getSubId(rootId, block.id); - const record = getRecord(id); + const record = detailStore.get(subId, id, getKeys(view.id)); const value = Relation.getArrayValue(record[view.coverRelationKey]); const fileLayouts = UtilObject.getFileLayouts(); diff --git a/src/ts/component/block/dataview/view/gallery/card.tsx b/src/ts/component/block/dataview/view/gallery/card.tsx index 6c0b69c3f0..4247af6ff6 100644 --- a/src/ts/component/block/dataview/view/gallery/card.tsx +++ b/src/ts/component/block/dataview/view/gallery/card.tsx @@ -1,13 +1,11 @@ import * as React from 'react'; import $ from 'jquery'; import { observer } from 'mobx-react'; -import { Cell, Cover, Icon, MediaAudio, MediaVideo, DropTarget } from 'Component'; +import { Cell, Cover, MediaAudio, MediaVideo, DropTarget } from 'Component'; import { I, UtilCommon, UtilData, UtilObject, Relation, keyboard } from 'Lib'; -import { commonStore, detailStore, dbStore } from 'Store'; -import Constant from 'json/constant.json'; +import { commonStore, dbStore } from 'Store'; interface Props extends I.ViewComponent { - recordId: string; style?: any; }; @@ -24,12 +22,11 @@ const Card = observer(class Card extends React.Component<Props> { }; render () { - const { rootId, block, recordId, getView, getRecord, onRef, style, onContext, getIdPrefix, getVisibleRelations, isInline, isCollection } = this.props; + const { rootId, block, record, getView, onRef, style, onContext, getIdPrefix, getVisibleRelations, isInline, isCollection } = this.props; const view = getView(); const { cardSize, coverFit, hideIcon } = view; const relations = getVisibleRelations(); const idPrefix = getIdPrefix(); - const record = getRecord(recordId); const cn = [ 'card', UtilData.layoutClass(record.id, record.layout), UtilData.cardSizeClass(cardSize) ]; const subId = dbStore.getSubId(rootId, block.id); const cover = this.getCover(); @@ -48,7 +45,7 @@ const Card = observer(class Card extends React.Component<Props> { <div className="inner"> {relations.map(relation => { - const id = Relation.cellId(idPrefix, relation.relationKey, recordId); + const id = Relation.cellId(idPrefix, relation.relationKey, record.id); return ( <Cell elementId={id} @@ -137,24 +134,23 @@ const Card = observer(class Card extends React.Component<Props> { }; onDragStart (e: any) { - const { isCollection, recordId, onDragRecordStart } = this.props; + const { isCollection, record, onDragRecordStart } = this.props; if (isCollection) { - onDragRecordStart(e, recordId); + onDragRecordStart(e, record.id); }; }; onClick (e: any) { e.preventDefault(); - const { recordId, getRecord, onContext, dataset } = this.props; + const { record, onContext, dataset } = this.props; const { selection } = dataset || {}; - const record = getRecord(recordId); const cb = { 0: () => { keyboard.withCommand(e) ? UtilObject.openWindow(record) : UtilObject.openPopup(record); }, - 2: () => { onContext(e, record.id); } + 2: () => onContext(e, record.id) }; const ids = selection ? selection.get(I.SelectType.Record) : []; @@ -168,7 +164,7 @@ const Card = observer(class Card extends React.Component<Props> { }; onCellClick (e: React.MouseEvent, vr: I.ViewRelation) { - const { onCellClick, recordId } = this.props; + const { onCellClick, record } = this.props; const relation = dbStore.getRelationByKey(vr.relationKey); if (!relation || ![ I.RelationType.Url, I.RelationType.Phone, I.RelationType.Email, I.RelationType.Checkbox ].includes(relation.format)) { @@ -178,12 +174,12 @@ const Card = observer(class Card extends React.Component<Props> { e.preventDefault(); e.stopPropagation(); - onCellClick(e, relation.relationKey, recordId); + onCellClick(e, relation.relationKey, record.id); }; getCover (): any { - const { recordId, getCoverObject } = this.props; - const cover = getCoverObject(recordId); + const { record, getCoverObject } = this.props; + const cover = getCoverObject(record.id); return cover ? this.mediaCover(cover) : null; }; diff --git a/src/ts/component/block/dataview/view/grid.tsx b/src/ts/component/block/dataview/view/grid.tsx index f09b7ff351..9c1bad932d 100644 --- a/src/ts/component/block/dataview/view/grid.tsx +++ b/src/ts/component/block/dataview/view/grid.tsx @@ -5,7 +5,7 @@ import arrayMove from 'array-move'; import $ from 'jquery'; import { Icon, LoadMore } from 'Component'; import { I, C, UtilCommon, translate, keyboard, Relation } from 'Lib'; -import { dbStore, menuStore, blockStore } from 'Store'; +import { dbStore, menuStore, blockStore, detailStore } from 'Store'; import HeadRow from './grid/head/row'; import BodyRow from './grid/body/row'; import Constant from 'json/constant.json'; @@ -31,9 +31,10 @@ const ViewGrid = observer(class ViewGrid extends React.Component<I.ViewComponent }; render () { - const { rootId, block, isPopup, isInline, className, getView, onRecordAdd, getEmpty, getRecords, getLimit, getVisibleRelations } = this.props; + const { rootId, block, isPopup, isInline, className, getView, getKeys, onRecordAdd, getEmpty, getRecords, getLimit, getVisibleRelations } = this.props; const view = getView(); const relations = getVisibleRelations(); + const subId = dbStore.getSubId(rootId, block.id); const records = getRecords(); const { offset, total } = dbStore.getMeta(dbStore.getSubId(rootId, block.id), ''); const limit = getLimit(); @@ -55,7 +56,7 @@ const ViewGrid = observer(class ViewGrid extends React.Component<I.ViewComponent key={'grid-row-' + view.id + index} {...this.props} readonly={!isAllowedObject} - recordId={id} + record={detailStore.get(subId, records[index], getKeys(view.id))} cellPosition={this.cellPosition} getColumnWidths={this.getColumnWidths} /> @@ -89,7 +90,7 @@ const ViewGrid = observer(class ViewGrid extends React.Component<I.ViewComponent key={'grid-row-' + view.id + index} {...this.props} readonly={!isAllowedObject} - recordId={records[index]} + record={detailStore.get(subId, records[index], getKeys(view.id))} style={{ ...style, top: style.top + 2 }} cellPosition={this.cellPosition} getColumnWidths={this.getColumnWidths} @@ -168,7 +169,7 @@ const ViewGrid = observer(class ViewGrid extends React.Component<I.ViewComponent const node = $(this.node); this.unbind(); - node.find('#scroll').on('scroll', () => { this.onScroll(); }); + node.find('#scroll').on('scroll', () => this.onScroll()); }; unbind () { @@ -258,8 +259,8 @@ const ViewGrid = observer(class ViewGrid extends React.Component<I.ViewComponent $('body').addClass('colResize'); win.off('mousemove.cell mouseup.cell'); - win.on('mousemove.cell', (e: any) => { this.onResizeMove(e, relationKey); }); - win.on('mouseup.cell', (e: any) => { this.onResizeEnd(e, relationKey); }); + win.on('mousemove.cell', e => this.onResizeMove(e, relationKey)); + win.on('mouseup.cell', e => this.onResizeEnd(e, relationKey)); el.addClass('isResizing'); keyboard.setResize(true); @@ -296,7 +297,7 @@ const ViewGrid = observer(class ViewGrid extends React.Component<I.ViewComponent width: this.checkWidth(e.pageX - this.ox), }); - window.setTimeout(() => { keyboard.setResize(false); }, 50); + window.setTimeout(() => keyboard.setResize(false), 50); }; checkWidth (width: number): number { @@ -319,7 +320,7 @@ const ViewGrid = observer(class ViewGrid extends React.Component<I.ViewComponent isInline, isCollection, blockId: block.id, - onAdd: () => { menuStore.closeAll(Constant.menuIds.cellAdd); } + onAdd: () => menuStore.closeAll(Constant.menuIds.cellAdd) } }); }; diff --git a/src/ts/component/block/dataview/view/grid/body/cell.tsx b/src/ts/component/block/dataview/view/grid/body/cell.tsx index 0d55a2907e..d341d63d56 100644 --- a/src/ts/component/block/dataview/view/grid/body/cell.tsx +++ b/src/ts/component/block/dataview/view/grid/body/cell.tsx @@ -6,14 +6,13 @@ import { dbStore } from 'Store'; import Constant from 'json/constant.json'; interface Props { + record?: any; rootId?: string; block?: I.Block; - recordId: string; relationKey: string; readonly: boolean; width: number; className?: string; - getRecord(id: string): any; getIdPrefix?(): string; onRef?(ref: any, id: string): void; onCellClick?(e: any, key: string, id?: string): void; @@ -31,15 +30,14 @@ const BodyCell = observer(class BodyCell extends React.Component<Props> { }; render () { - const { rootId, block, className, relationKey, recordId, readonly, onRef, getRecord, onCellClick, onCellChange, getIdPrefix } = this.props; + const { rootId, block, className, relationKey, record, readonly, onRef, onCellClick, onCellChange, getIdPrefix } = this.props; const relation: any = dbStore.getRelationByKey(relationKey) || {}; const cn = [ 'cell', `cell-key-${this.props.relationKey}`, Relation.className(relation.format), (!readonly ? 'canEdit' : '') ]; const idPrefix = getIdPrefix(); - const id = Relation.cellId(idPrefix, relation.relationKey, recordId); + const id = Relation.cellId(idPrefix, relation.relationKey, record.id); const width = Relation.width(this.props.width, relation.format); const size = Constant.size.dataview.cell; const subId = dbStore.getSubId(rootId, block.id); - const record = getRecord(recordId); if (relation.relationKey == 'name') { cn.push('isName'); @@ -63,7 +61,7 @@ const BodyCell = observer(class BodyCell extends React.Component<Props> { key={id} id={id} className={cn.join(' ')} - onClick={(e: any) => { onCellClick(e, relation.relationKey, recordId); }} + onClick={e => onCellClick(e, relation.relationKey, record.id)} > <Cell ref={ref => { diff --git a/src/ts/component/block/dataview/view/grid/body/row.tsx b/src/ts/component/block/dataview/view/grid/body/row.tsx index c9700002d3..95cd7998b8 100644 --- a/src/ts/component/block/dataview/view/grid/body/row.tsx +++ b/src/ts/component/block/dataview/view/grid/body/row.tsx @@ -5,7 +5,6 @@ import { DropTarget, Icon } from 'Component'; import Cell from './cell'; interface Props extends I.ViewComponent { - recordId: string; style?: any; cellPosition?: (cellId: string) => void; onRef?(ref: any, id: string): void; @@ -15,9 +14,8 @@ interface Props extends I.ViewComponent { const BodyRow = observer(class BodyRow extends React.Component<Props> { render () { - const { rootId, recordId, block, getRecord, style, onContext, onDragRecordStart, getColumnWidths, isInline, getVisibleRelations, isCollection, onSelectToggle } = this.props; + const { rootId, record, block, style, onContext, onDragRecordStart, getColumnWidths, isInline, getVisibleRelations, isCollection, onSelectToggle } = this.props; const relations = getVisibleRelations(); - const record = getRecord(recordId); const widths = getColumnWidths('', 0); const str = relations.map(it => widths[it.relationKey] + 'px').concat([ 'auto' ]).join(' '); const cn = [ 'row', UtilData.layoutClass('', record.layout), ]; @@ -73,7 +71,7 @@ const BodyRow = observer(class BodyRow extends React.Component<Props> { className="drag" draggable={true} onClick={e => onSelectToggle(e, record.id)} - onDragStart={e => onDragRecordStart(e, recordId)} + onDragStart={e => onDragRecordStart(e, record.id)} onMouseEnter={() => keyboard.setSelectionClearDisabled(true)} onMouseLeave={() => keyboard.setSelectionClearDisabled(false)} /> @@ -86,7 +84,7 @@ const BodyRow = observer(class BodyRow extends React.Component<Props> { return ( <div - id={`record-${recordId}`} + id={`record-${record.id}`} className={cn.join(' ')} style={style} onContextMenu={e => onContext(e, record.id)} diff --git a/src/ts/component/block/dataview/view/grid/head/cell.tsx b/src/ts/component/block/dataview/view/grid/head/cell.tsx index e27fe9e860..e092b0a222 100644 --- a/src/ts/component/block/dataview/view/grid/head/cell.tsx +++ b/src/ts/component/block/dataview/view/grid/head/cell.tsx @@ -48,7 +48,7 @@ const HeadCell = observer(class HeadCell extends React.Component<Props> { > <div className="cellContent"> <Handle name={name} format={format} readonly={readonly} /> - <div className="resize" onMouseDown={(e: any) => { onResizeStart(e, relationKey); }} /> + <div className="resize" onMouseDown={e => onResizeStart(e, relationKey)} /> </div> </div> ); @@ -88,8 +88,8 @@ const HeadCell = observer(class HeadCell extends React.Component<Props> { element, horizontal: I.MenuDirection.Center, noFlipY: true, - onOpen: () => { obj.addClass('active'); }, - onClose: () => { obj.removeClass('active'); }, + onOpen: () => obj.addClass('active'), + onClose: () => obj.removeClass('active'), data: { loadData, getView, diff --git a/src/ts/component/block/dataview/view/list.tsx b/src/ts/component/block/dataview/view/list.tsx index 33e37b4595..6f27b2e5f1 100644 --- a/src/ts/component/block/dataview/view/list.tsx +++ b/src/ts/component/block/dataview/view/list.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import $ from 'jquery'; import { observer } from 'mobx-react'; import { AutoSizer, WindowScroller, List, InfiniteLoader } from 'react-virtualized'; -import { dbStore } from 'Store'; +import { dbStore, detailStore } from 'Store'; import { Icon, LoadMore } from 'Component'; import { I, translate, UtilCommon } from 'Lib'; import Row from './list/row'; @@ -21,10 +21,11 @@ const ViewList = observer(class ViewList extends React.Component<I.ViewComponent }; render () { - const { rootId, block, className, isPopup, isInline, getView, onRecordAdd, getLimit, getEmpty, getRecords } = this.props; + const { rootId, block, className, isPopup, isInline, getView, getKeys, onRecordAdd, getLimit, getEmpty, getRecords } = this.props; const view = getView(); const records = getRecords(); - const { offset, total } = dbStore.getMeta(dbStore.getSubId(rootId, block.id), ''); + const subId = dbStore.getSubId(rootId, block.id); + const { offset, total } = dbStore.getMeta(subId, ''); const limit = getLimit(); const length = records.length; const isAllowedObject = this.props.isAllowedObject(); @@ -45,7 +46,7 @@ const ViewList = observer(class ViewList extends React.Component<I.ViewComponent {...this.props} style={{height: HEIGHT}} readonly={!isAllowedObject} - recordId={id} + record={detailStore.get(subId, id)} /> ))} </div> @@ -74,10 +75,10 @@ const ViewList = observer(class ViewList extends React.Component<I.ViewComponent rowHeight={HEIGHT} onRowsRendered={onRowsRendered} rowRenderer={({ key, index, style }) => ( - <div className="listItem" key={'grid-row-' + view.id + index} style={style}> + <div className="listItem" key={`grid-row-${view.id + index}`} style={style}> <Row {...this.props} - recordId={records[index]} + record={detailStore.get(subId, records[index], getKeys(view.id))} /> </div> )} diff --git a/src/ts/component/block/dataview/view/list/row.tsx b/src/ts/component/block/dataview/view/list/row.tsx index 915298e799..3347291a4c 100644 --- a/src/ts/component/block/dataview/view/list/row.tsx +++ b/src/ts/component/block/dataview/view/list/row.tsx @@ -6,7 +6,6 @@ import { Cell, DropTarget, Icon } from 'Component'; import { dbStore } from 'Store'; interface Props extends I.ViewComponent { - recordId: string; style?: any; }; @@ -16,12 +15,11 @@ const Row = observer(class Row extends React.Component<Props> { node: any = null; render () { - const { rootId, block, recordId, getView, onRef, style, getRecord, onContext, getIdPrefix, isInline, isCollection, onDragRecordStart, onSelectToggle } = this.props; + const { rootId, block, record, getView, onRef, style, onContext, getIdPrefix, isInline, isCollection, onDragRecordStart, onSelectToggle } = this.props; const view = getView(); const relations = view.getVisibleRelations(); const idPrefix = getIdPrefix(); const subId = dbStore.getSubId(rootId, block.id); - const record = getRecord(recordId); const cn = [ 'row' ]; // Subscriptions @@ -35,7 +33,7 @@ const Row = observer(class Row extends React.Component<Props> { let content = ( <React.Fragment> {relations.map((relation: any, i: number) => { - const id = Relation.cellId(idPrefix, relation.relationKey, recordId); + const id = Relation.cellId(idPrefix, relation.relationKey, record.id); return ( <Cell key={'list-cell-' + relation.relationKey} @@ -77,7 +75,7 @@ const Row = observer(class Row extends React.Component<Props> { className="drag" draggable={true} onClick={e => onSelectToggle(e, record.id)} - onDragStart={e => onDragRecordStart(e, recordId)} + onDragStart={e => onDragRecordStart(e, record.id)} onMouseEnter={() => keyboard.setSelectionClearDisabled(true)} onMouseLeave={() => keyboard.setSelectionClearDisabled(false)} /> @@ -118,14 +116,13 @@ const Row = observer(class Row extends React.Component<Props> { onClick (e: any) { e.preventDefault(); - const { onContext, dataset, getRecord, recordId } = this.props; + const { onContext, dataset, record } = this.props; const { selection } = dataset || {}; - const record = getRecord(recordId); const cb = { 0: () => { keyboard.withCommand(e) ? UtilObject.openWindow(record) : UtilObject.openPopup(record); }, - 2: () => { onContext(e, record.id); } + 2: () => onContext(e, record.id) }; const ids = selection ? selection.get(I.SelectType.Record) : []; @@ -139,7 +136,7 @@ const Row = observer(class Row extends React.Component<Props> { }; onCellClick (e: React.MouseEvent, vr: I.ViewRelation) { - const { onCellClick, recordId } = this.props; + const { onCellClick, record } = this.props; const relation = dbStore.getRelationByKey(vr.relationKey); if (!relation || ![ I.RelationType.Url, I.RelationType.Phone, I.RelationType.Email, I.RelationType.Checkbox ].includes(relation.format)) { @@ -149,7 +146,7 @@ const Row = observer(class Row extends React.Component<Props> { e.preventDefault(); e.stopPropagation(); - onCellClick(e, relation.relationKey, recordId); + onCellClick(e, relation.relationKey, record.id); }; resize () { diff --git a/src/ts/component/block/embed.tsx b/src/ts/component/block/embed.tsx index afd631deb3..8c92a8c73c 100644 --- a/src/ts/component/block/embed.tsx +++ b/src/ts/component/block/embed.tsx @@ -631,7 +631,6 @@ const BlockEmbed = observer(class BlockEmbed extends React.Component<I.BlockComp }; const data: any = { - ...UtilEmbed.getEnvironmentContent(processor), allowIframeResize, insertBeforeLoad: UtilEmbed.insertBeforeLoad(processor), useRootHeight: UtilEmbed.useRootHeight(processor), diff --git a/src/ts/component/block/featured.tsx b/src/ts/component/block/featured.tsx index 3f2c37479b..c8a4e4cca4 100644 --- a/src/ts/component/block/featured.tsx +++ b/src/ts/component/block/featured.tsx @@ -77,7 +77,7 @@ const BlockFeatured = observer(class BlockFeatured extends React.Component<Props id={Relation.cellId(PREFIX, 'type', object.id)} className="cellContent type" onClick={this.onType} - onMouseEnter={(e: any) => { this.onMouseEnter(e, 'type'); }} + onMouseEnter={e => this.onMouseEnter(e, 'type')} onMouseLeave={this.onMouseLeave} > {typeName} @@ -127,7 +127,7 @@ const BlockFeatured = observer(class BlockFeatured extends React.Component<Props id={Relation.cellId(PREFIX, 'setOf', object.id)} className="cellContent setOf" onClick={this.onSource} - onMouseEnter={(e: any) => { this.onMouseEnter(e, 'setOf', 'Query'); }} + onMouseEnter={e => this.onMouseEnter(e, 'setOf', 'Query')} onMouseLeave={this.onMouseLeave} > {setOfString.length ? ( @@ -194,8 +194,7 @@ const BlockFeatured = observer(class BlockFeatured extends React.Component<Props subId={rootId} block={block} relationKey={relationKey} - getRecord={() => object} - recordId={object.id} + record={object} viewType={I.ViewType.Grid} bodyContainer={UtilCommon.getBodyContainer(isPopup ? 'popup' : 'page')} pageContainer={UtilCommon.getCellContainer(isPopup ? 'popup' : 'page')} @@ -458,6 +457,7 @@ const BlockFeatured = observer(class BlockFeatured extends React.Component<Props { operator: I.FilterOperator.And, relationKey: 'recommendedLayout', condition: I.FilterCondition.In, value: UtilObject.getPageLayouts() }, ], keys: UtilData.typeRelationKeys(), + skipIds: [ object.type ], onClick: (item: any) => { keyboard.disableClose(true); @@ -656,7 +656,7 @@ const BlockFeatured = observer(class BlockFeatured extends React.Component<Props param.classNameWrap = 'fixed fromHeader'; }; - menuStore.closeAll(null, () => { menuStore.open('blockRelationView', param); }); + menuStore.closeAll(null, () => menuStore.open('blockRelationView', param)); break; }; }; diff --git a/src/ts/component/block/iconPage.tsx b/src/ts/component/block/iconPage.tsx index 6f0f44cc81..f6c11679c1 100644 --- a/src/ts/component/block/iconPage.tsx +++ b/src/ts/component/block/iconPage.tsx @@ -32,8 +32,8 @@ const BlockIconPage = observer(class BlockIconPage extends React.Component<I.Blo UtilObject.setIcon(this.props.rootId, icon, ''); }; - onUpload (hash: string) { - UtilObject.setIcon(this.props.rootId, '', hash); + onUpload (objectId: string) { + UtilObject.setIcon(this.props.rootId, '', objectId); }; }); diff --git a/src/ts/component/block/iconUser.tsx b/src/ts/component/block/iconUser.tsx index 4eed71427f..1df9d92a8b 100644 --- a/src/ts/component/block/iconUser.tsx +++ b/src/ts/component/block/iconUser.tsx @@ -78,9 +78,9 @@ const BlockIconUser = observer(class BlockIconUser extends React.Component<I.Blo Action.openFile(Constant.fileExtension.cover, paths => { this.setState({ loading: true }); - C.FileUpload(commonStore.space, '', paths[0], I.FileType.Image, (message: any) => { + C.FileUpload(commonStore.space, '', paths[0], I.FileType.Image, {}, (message: any) => { if (!message.error.code) { - UtilObject.setIcon(rootId, '', message.hash, () => { + UtilObject.setIcon(rootId, '', message.objectId, () => { this.setState({ loading: false }); }); }; diff --git a/src/ts/component/block/index.tsx b/src/ts/component/block/index.tsx index 4110afdebd..9550c22e4d 100644 --- a/src/ts/component/block/index.tsx +++ b/src/ts/component/block/index.tsx @@ -79,7 +79,7 @@ const Block = observer(class Block extends React.Component<Props> { const index = Number(this.props.index) || 0; const { style, checked } = content; const root = blockStore.getLeaf(rootId, rootId); - const cn: string[] = [ 'block', UtilData.blockClass(block), 'align' + hAlign, 'index' + index ]; + const cn: string[] = [ 'block', UtilData.blockClass(block), `align${hAlign}`, `index${index}` ]; const cd: string[] = [ 'wrapContent' ]; const setRef = ref => this.ref = ref; const key = [ 'block', block.id, 'component' ].join(' '); @@ -568,8 +568,8 @@ const Block = observer(class Block extends React.Component<Props> { node.find('.colResize.active').removeClass('active'); node.find('.colResize.c' + index).addClass('active'); - win.on('mousemove.block', (e: any) => { this.onResize(e, index, offset); }); - win.on('mouseup.block', (e: any) => { this.onResizeEnd(e, index, offset); }); + win.on('mousemove.block', e => this.onResize(e, index, offset)); + win.on('mouseup.block', e => this.onResizeEnd(e, index, offset)); node.find('.resizable').trigger('resizeStart', [ e ]); }; diff --git a/src/ts/component/block/link.tsx b/src/ts/component/block/link.tsx index 357f4fbeed..cf07c67724 100644 --- a/src/ts/component/block/link.tsx +++ b/src/ts/component/block/link.tsx @@ -277,10 +277,8 @@ const BlockLink = observer(class BlockLink extends React.Component<I.BlockCompon UtilObject.setIcon(block.content.targetBlockId, icon, ''); }; - onUpload (hash: string) { - const { block } = this.props; - - UtilObject.setIcon(block.content.targetBlockId, '', hash); + onUpload (objectId: string) { + UtilObject.setIcon(this.props.block.content.targetBlockId, '', objectId); }; onCheckbox () { diff --git a/src/ts/component/block/media/audio.tsx b/src/ts/component/block/media/audio.tsx index cd33b9546c..fa1aa2bc5b 100644 --- a/src/ts/component/block/media/audio.tsx +++ b/src/ts/component/block/media/audio.tsx @@ -3,7 +3,7 @@ import $ from 'jquery'; import { observer } from 'mobx-react'; import { InputWithFile, Loader, Error, MediaAudio } from 'Component'; import { I, translate, focus, keyboard, Action } from 'Lib'; -import { commonStore } from 'Store'; +import { commonStore, detailStore } from 'Store'; import Constant from 'json/constant.json'; const BlockAudio = observer(class BlockAudio extends React.Component<I.BlockComponent> { @@ -25,9 +25,10 @@ const BlockAudio = observer(class BlockAudio extends React.Component<I.BlockComp }; render () { - const { block, readonly } = this.props; + const { rootId, block, readonly } = this.props; const { id, content } = block; - const { state, hash, name } = content; + const { state, targetObjectId } = content; + const object = detailStore.get(rootId, targetObjectId, [ 'name' ], true); let element = null; @@ -57,7 +58,7 @@ const BlockAudio = observer(class BlockAudio extends React.Component<I.BlockComp case I.FileState.Done: const playlist = [ - { name, src: commonStore.fileUrl(hash) }, + { name: object.name, src: commonStore.fileUrl(targetObjectId) }, ]; element = ( diff --git a/src/ts/component/block/media/file.tsx b/src/ts/component/block/media/file.tsx index 02374a990a..4786874ac4 100644 --- a/src/ts/component/block/media/file.tsx +++ b/src/ts/component/block/media/file.tsx @@ -22,15 +22,10 @@ const BlockFile = observer(class BlockFile extends React.Component<I.BlockCompon render () { const { rootId, block, readonly } = this.props; const { id, content } = block; - const { state, style } = content; - - let object = detailStore.get(rootId, content.hash, [ 'sizeInBytes' ]); - if (object._empty_) { - object = UtilCommon.objectCopy(content); - object.sizeInBytes = object.size; - }; - + const { state, style, targetObjectId } = content; + const object = detailStore.get(rootId, targetObjectId, [ 'sizeInBytes' ]); const { name, sizeInBytes } = object; + let element = null; switch (state) { @@ -119,13 +114,9 @@ const BlockFile = observer(class BlockFile extends React.Component<I.BlockCompon }; onOpen (e: any) { - if (e.button) { - return; + if (!e.button) { + UtilObject.openPopup({ id: this.props.block.content.targetObjectId, layout: I.ObjectLayout.File }); }; - - const { block } = this.props; - - UtilObject.openPopup({ id: block.content.hash, layout: I.ObjectLayout.File }); }; }); diff --git a/src/ts/component/block/media/image.tsx b/src/ts/component/block/media/image.tsx index 440492f9a2..b2f7b0aa5d 100644 --- a/src/ts/component/block/media/image.tsx +++ b/src/ts/component/block/media/image.tsx @@ -31,11 +31,11 @@ const BlockImage = observer(class BlockImage extends React.Component<I.BlockComp render () { const { block, readonly } = this.props; const { width } = block.fields || {}; - const { state, hash } = block.content; - - let element = null; + const { state, targetObjectId } = block.content; const css: any = {}; + let element = null; + if (width) { css.width = (width * 100) + '%'; }; @@ -68,14 +68,14 @@ const BlockImage = observer(class BlockImage extends React.Component<I.BlockComp <div id="wrap" className="wrap" style={css}> <img className="mediaImage" - src={commonStore.imageUrl(hash, Constant.size.image)} - onDragStart={(e: any) => { e.preventDefault(); }} + src={commonStore.imageUrl(targetObjectId, Constant.size.image)} + onDragStart={e => e.preventDefault()} onClick={this.onClick} onLoad={this.onLoad} onError={this.onError} /> <Icon className="download" onClick={this.onDownload} /> - <Icon className="resize" onMouseDown={(e: any) => { this.onResizeStart(e, false); }} /> + <Icon className="resize" onMouseDown={e => this.onResizeStart(e, false)} /> </div> ); break; @@ -159,8 +159,8 @@ const BlockImage = observer(class BlockImage extends React.Component<I.BlockComp keyboard.disableSelection(true); node.addClass('isResizing'); - win.on('mousemove.media', (e: any) => { this.onResize(e, checkMax); }); - win.on('mouseup.media', (e: any) => { this.onResizeEnd(e, checkMax); }); + win.on('mousemove.media', e => this.onResize(e, checkMax)); + win.on('mouseup.media', e => this.onResizeEnd(e, checkMax)); }; onResize (e: any, checkMax: boolean) { @@ -224,8 +224,9 @@ const BlockImage = observer(class BlockImage extends React.Component<I.BlockComp onClick (e: any) { const { block } = this.props; - const { hash } = block.content; - const src = commonStore.imageUrl(hash, Constant.size.image); + const { targetObjectId } = block.content; + const src = commonStore.imageUrl(targetObjectId, Constant.size.image); + if (!keyboard.withCommand(e)) { popupStore.open('preview', { data: { src, type: I.FileType.Image } }); }; diff --git a/src/ts/component/block/media/pdf.tsx b/src/ts/component/block/media/pdf.tsx index 253579f25d..28dfa9288e 100644 --- a/src/ts/component/block/media/pdf.tsx +++ b/src/ts/component/block/media/pdf.tsx @@ -44,21 +44,15 @@ const BlockPdf = observer(class BlockPdf extends React.Component<I.BlockComponen render () { const { rootId, block, readonly } = this.props; const { id, fields, content } = block; - const { state, hash, type, mime } = content; + const { state, targetObjectId, type } = content; const { page, pages } = this.state; - - let object = detailStore.get(rootId, content.hash, [ 'sizeInBytes' ]); - if (object._empty_) { - object = UtilCommon.objectCopy(content); - object.sizeInBytes = object.size; - }; - + const object = detailStore.get(rootId, targetObjectId, [ 'sizeInBytes' ]); const { name, sizeInBytes } = object; - const { width } = fields; + const css: any = {}; + let element = null; let pager = null; - const css: any = {}; if (width) { css.width = (width * 100) + '%'; @@ -67,7 +61,7 @@ const BlockPdf = observer(class BlockPdf extends React.Component<I.BlockComponen if (this.height) { css.minHeight = this.height; }; - + switch (state) { default: case I.FileState.Error: @@ -116,7 +110,7 @@ const BlockPdf = observer(class BlockPdf extends React.Component<I.BlockComponen <MediaPdf id={`pdf-block-${id}`} ref={ref => this.refMedia = ref} - src={commonStore.fileUrl(hash)} + src={commonStore.fileUrl(targetObjectId)} page={page} onDocumentLoad={this.onDocumentLoad} onPageRender={this.onPageRender} @@ -220,11 +214,7 @@ const BlockPdf = observer(class BlockPdf extends React.Component<I.BlockComponen }; onOpen (e: any) { - const { block } = this.props; - const { content } = block; - const { hash } = content; - - C.FileDownload(hash, UtilCommon.getElectron().tmpPath, (message: any) => { + C.FileDownload(this.props.block.getTargetObjectId(), UtilCommon.getElectron().tmpPath, (message: any) => { if (message.path) { Renderer.send('pathOpen', message.path); }; @@ -244,15 +234,9 @@ const BlockPdf = observer(class BlockPdf extends React.Component<I.BlockComponen }; onClick (e: any) { - if (keyboard.withCommand(e)) { - return; + if (!keyboard.withCommand(e)) { + UtilObject.openPopup({ id: this.props.block.getTargetObjectId(), layout: I.ObjectLayout.Image }); }; - - const { block } = this.props; - const { content } = block; - const { hash } = content; - - UtilObject.openPopup({ id: hash, layout: I.ObjectLayout.Image }); }; onResizeInit () { diff --git a/src/ts/component/block/media/video.tsx b/src/ts/component/block/media/video.tsx index 730b0b7af0..5d985fb89f 100644 --- a/src/ts/component/block/media/video.tsx +++ b/src/ts/component/block/media/video.tsx @@ -32,7 +32,7 @@ const BlockVideo = observer(class BlockVideo extends React.Component<I.BlockComp render () { const { block, readonly } = this.props; const { id, fields, content } = block; - const { state, hash, type, mime } = content; + const { state, targetObjectId, type, mime } = content; const { width } = fields || {}; const css: any = {}; @@ -71,7 +71,7 @@ const BlockVideo = observer(class BlockVideo extends React.Component<I.BlockComp element = ( <div className="wrap resizable blockVideo" style={css}> <MediaVideo - src={commonStore.fileUrl(hash)} + src={commonStore.fileUrl(targetObjectId)} onPlay={this.onPlay} onPause={this.onPause} /> diff --git a/src/ts/component/block/relation.tsx b/src/ts/component/block/relation.tsx index bc4a31cacc..88283f4ab5 100644 --- a/src/ts/component/block/relation.tsx +++ b/src/ts/component/block/relation.tsx @@ -72,8 +72,7 @@ const BlockRelation = observer(class BlockRelation extends React.Component<I.Blo subId={rootId} block={block} relationKey={relation.relationKey} - getRecord={() => detailStore.get(rootId, rootId, [ relation.relationKey ], true)} - recordId={rootId} + record={detailStore.get(rootId, rootId, [ relation.relationKey ], true)} viewType={I.ViewType.Grid} readonly={readonly || !allowedValue} idPrefix={idPrefix} diff --git a/src/ts/component/block/table.tsx b/src/ts/component/block/table.tsx index 9c5919555a..9e7ece7f00 100644 --- a/src/ts/component/block/table.tsx +++ b/src/ts/component/block/table.tsx @@ -264,7 +264,7 @@ const BlockTable = observer(class BlockTable extends React.Component<I.BlockComp component: 'select', onOpen: (context: any) => { menuContext = context; - raf(() => { this.onOptionsOpen(type, rowId, columnId, cellId); }); + raf(() => this.onOptionsOpen(type, rowId, columnId, cellId)); }, onClose: () => { menuStore.closeAll(Constant.menuIds.table); @@ -362,7 +362,7 @@ const BlockTable = observer(class BlockTable extends React.Component<I.BlockComp offsetX: menuContext.getSize().width, vertical: I.MenuDirection.Center, isSub: true, - onOpen: (context: any) => { menuSubContext = context; }, + onOpen: context => menuSubContext = context, data: { rootId, rebind: menuContext.ref.rebind, @@ -432,7 +432,7 @@ const BlockTable = observer(class BlockTable extends React.Component<I.BlockComp options: this.optionsHAlign(), value: current.hAlign, onSelect: (e: any, el: any) => { - fill(() => { C.BlockListSetAlign(rootId, blockIds, el.id); }); + fill(() => C.BlockListSetAlign(rootId, blockIds, el.id)); menuContext.close(); } }); @@ -446,7 +446,7 @@ const BlockTable = observer(class BlockTable extends React.Component<I.BlockComp options: this.optionsVAlign(), value: current.vAlign, onSelect: (e: any, el: any) => { - fill(() => { C.BlockListSetVerticalAlign(rootId, blockIds, el.id); }); + fill(() => C.BlockListSetVerticalAlign(rootId, blockIds, el.id)); menuContext.close(); } }); @@ -457,7 +457,7 @@ const BlockTable = observer(class BlockTable extends React.Component<I.BlockComp menuId = 'blockColor'; menuParam.data = Object.assign(menuParam.data, { onChange: (id: string) => { - fill(() => { C.BlockTextListSetColor(rootId, blockIds, id); }); + fill(() => C.BlockTextListSetColor(rootId, blockIds, id)); menuContext.close(); } }); @@ -468,7 +468,7 @@ const BlockTable = observer(class BlockTable extends React.Component<I.BlockComp menuId = 'blockBackground'; menuParam.data = Object.assign(menuParam.data, { onChange: (id: string) => { - fill(() => { C.BlockListSetBackgroundColor(rootId, blockIds, id); }); + fill(() => C.BlockListSetBackgroundColor(rootId, blockIds, id)); menuContext.close(); } }); @@ -839,8 +839,8 @@ const BlockTable = observer(class BlockTable extends React.Component<I.BlockComp body.addClass('colResize'); win.off('mousemove.table mouseup.table'); - win.on('mousemove.table', throttle((e: any) => { this.onResizeMove(e, id); }, 40)); - win.on('mouseup.table', (e: any) => { this.onResizeEnd(e, id); }); + win.on('mousemove.table', throttle(e => this.onResizeMove(e, id), 40)); + win.on('mouseup.table', e => this.onResizeEnd(e, id)); keyboard.setResize(true); }; @@ -921,11 +921,11 @@ const BlockTable = observer(class BlockTable extends React.Component<I.BlockComp table.css({ width: widths[idx], zIndex: 10000, position: 'fixed', left: -10000, top: -10000 }); node.append(table); - $(document).off('dragover').on('dragover', (e: any) => { e.preventDefault(); }); + $(document).off('dragover').on('dragover', e => e.preventDefault()); e.dataTransfer.setDragImage(table.get(0), table.outerWidth(), 0); - win.on('drag.tableColumn', throttle((e: any) => { this.onDragMoveColumn(e, id); }, 40)); - win.on('dragend.tableColumn', (e: any) => { this.onDragEndColumn(e, id); }); + win.on('drag.tableColumn', throttle(e => this.onDragMoveColumn(e, id), 40)); + win.on('dragend.tableColumn', e => this.onDragEndColumn(e, id)); this.initCache(I.BlockType.TableColumn); this.setEditing(''); @@ -1013,11 +1013,11 @@ const BlockTable = observer(class BlockTable extends React.Component<I.BlockComp layer.append(table); table.append(clone); - $(document).off('dragover').on('dragover', (e: any) => { e.preventDefault(); }); + $(document).off('dragover').on('dragover', e => e.preventDefault()); e.dataTransfer.setDragImage(layer.get(0), 0, table.outerHeight()); - win.on('drag.tableRow', throttle((e: any) => { this.onDragMoveRow(e, id); }, 40)); - win.on('dragend.tableRow', (e: any) => { this.onDragEndRow(e, id); }); + win.on('drag.tableRow', throttle(e => this.onDragMoveRow(e, id), 40)); + win.on('dragend.tableRow', e => this.onDragEndRow(e, id)); this.initCache(I.BlockType.TableRow); this.setEditing(''); diff --git a/src/ts/component/block/table/cell.tsx b/src/ts/component/block/table/cell.tsx index b8aa47ffb1..3b43d5dbab 100644 --- a/src/ts/component/block/table/cell.tsx +++ b/src/ts/component/block/table/cell.tsx @@ -49,8 +49,8 @@ const BlockTableCell = observer(class BlockTableCell extends React.Component<Pro case I.BlockType.TableColumn: cn.push('handleColumn canDrag'); - onDragStart = (e: any) => { onDragStartColumn(e, column.id); }; - onClick = (e: any) => { onHandleColumn(e, item.type, row.id, column.id, cellId); }; + onDragStart = e => onDragStartColumn(e, column.id); + onClick = e => onHandleColumn(e, item.type, row.id, column.id, cellId); break; case I.BlockType.TableRow: @@ -58,9 +58,9 @@ const BlockTableCell = observer(class BlockTableCell extends React.Component<Pro canDrag = !isHeader; if (canDrag) { - onDragStart = (e: any) => { onDragStartRow(e, row.id); }; + onDragStart = e => onDragStartRow(e, row.id); }; - onClick = (e: any) => { onHandleRow(e, item.type, row.id, column.id, cellId); }; + onClick = e => onHandleRow(e, item.type, row.id, column.id, cellId); break; }; @@ -72,8 +72,8 @@ const BlockTableCell = observer(class BlockTableCell extends React.Component<Pro <div className={cn.join(' ')} draggable={canDrag} - onMouseEnter={(e: any) => { onEnterHandle(e, item.type, row.id, column.id); }} - onMouseLeave={(e: any) => { onLeaveHandle(e); }} + onMouseEnter={e => onEnterHandle(e, item.type, row.id, column.id)} + onMouseLeave={e => onLeaveHandle(e)} onClick={onClick} onDragStart={onDragStart} onContextMenu={onClick} @@ -144,24 +144,24 @@ const BlockTableCell = observer(class BlockTableCell extends React.Component<Pro onKeyUp={(e: any, text: string, marks: I.Mark[], range: I.TextRange, props: any) => { onCellKeyUp(e, row.id, column.id, cellId, text, marks, range, props); }} - onUpdate={() => { onCellUpdate(cellId); }} - onFocus={(e: any) => { onCellFocus(e, row.id, column.id, cellId); }} - onBlur={(e: any) => { onCellBlur(e, row.id, column.id, cellId); }} + onUpdate={() => onCellUpdate(cellId)} + onFocus={e => onCellFocus(e, row.id, column.id, cellId)} + onBlur={e => onCellBlur(e, row.id, column.id, cellId)} getWrapperWidth={() => Constant.size.editor} /> ) : ( <EmptyBlock /> )} - {!readonly ? <div className="resize" onMouseDown={(e: any) => { onResizeStart(e, column.id); }} /> : ''} - <Icon className="menu" inner={inner} onClick={(e: any) => { onOptions(e, I.BlockType.Text, row.id, column.id, cellId); }} /> + {!readonly ? <div className="resize" onMouseDown={e => onResizeStart(e, column.id)} /> : ''} + <Icon className="menu" inner={inner} onClick={e => onOptions(e, I.BlockType.Text, row.id, column.id, cellId)} /> </div> ); }; onMouseDown (e: any) { keyboard.disableSelection(true); - $(window).off('mousedown.table-cell').on('mousedown.table-cell', (e: any) => { keyboard.disableSelection(false); }); + $(window).off('mousedown.table-cell').on('mousedown.table-cell', e => keyboard.disableSelection(false)); }; }); diff --git a/src/ts/component/block/tableOfContents.tsx b/src/ts/component/block/tableOfContents.tsx index 17fab6e467..e19ba3a101 100644 --- a/src/ts/component/block/tableOfContents.tsx +++ b/src/ts/component/block/tableOfContents.tsx @@ -24,7 +24,7 @@ const BlockTableOfContents = observer(class BlockTableOfContents extends React.C return ( <div className="item" - onClick={(e: any) => { this.onClick(e, item.id); }} + onClick={e => this.onClick(e, item.id)} style={{ paddingLeft: item.depth * 24 }} > <span>{item.text}</span> @@ -105,7 +105,7 @@ const BlockTableOfContents = observer(class BlockTableOfContents extends React.C list.push({ depth, id: block.id, - text: String(block.content.text || UtilObject.defaultName('Page')), + text: String(block.content.text || translate('defaultNamePage')), }); }); return list; diff --git a/src/ts/component/block/text.tsx b/src/ts/component/block/text.tsx index 818c3cab6d..24cdc7e5ea 100644 --- a/src/ts/component/block/text.tsx +++ b/src/ts/component/block/text.tsx @@ -93,7 +93,7 @@ const BlockText = observer(class BlockText extends React.Component<Props> { switch (style) { case I.TextStyle.Title: { - placeholder = UtilObject.defaultName('Page'); + placeholder = translate('defaultNamePage'); if (root && root.isObjectTask()) { marker = { type: 'checkboxTask', className: 'check', active: checked, onClick: this.onCheckbox }; @@ -203,7 +203,7 @@ const BlockText = observer(class BlockText extends React.Component<Props> { onMouseDown={this.onMouseDown} onMouseUp={this.onMouseUp} onInput={this.onInput} - onDragStart={(e: any) => { e.preventDefault(); }} + onDragStart={e => e.preventDefault()} /> </div> ); @@ -496,7 +496,7 @@ const BlockText = observer(class BlockText extends React.Component<Props> { object={object} canEdit={!isArchived} onSelect={icon => this.onMentionSelect(object.id, icon)} - onUpload={hash => this.onMentionUpload(object.id, hash)} + onUpload={objectId => this.onMentionUpload(object.id, objectId)} onCheckbox={() => this.onMentionCheckbox(object.id, !done)} /> ); @@ -1429,7 +1429,7 @@ const BlockText = observer(class BlockText extends React.Component<Props> { onMouseUp () { window.clearTimeout(this.timeoutClick); - this.timeoutClick = window.setTimeout(() => { this.clicks = 0; }, 300); + this.timeoutClick = window.setTimeout(() => this.clicks = 0, 300); }; onSelectIcon (icon: string) { @@ -1438,10 +1438,10 @@ const BlockText = observer(class BlockText extends React.Component<Props> { C.BlockTextSetIcon(rootId, block.id, icon, ''); }; - onUploadIcon (hash: string) { + onUploadIcon (objectId: string) { const { rootId, block } = this.props; - C.BlockTextSetIcon(rootId, block.id, '', hash); + C.BlockTextSetIcon(rootId, block.id, '', objectId); }; placeholderCheck () { @@ -1471,12 +1471,12 @@ const BlockText = observer(class BlockText extends React.Component<Props> { }); }; - onMentionUpload (objectId: string, hash: string) { + onMentionUpload (targetId: string, objectId: string) { const { rootId, block } = this.props; const value = this.getValue(); UtilData.blockSetText(rootId, block.id, value, this.marks, true, () => { - UtilObject.setIcon(objectId, '', hash); + UtilObject.setIcon(targetId, '', objectId); }); }; diff --git a/src/ts/component/block/type.tsx b/src/ts/component/block/type.tsx index bd36599792..696796ce95 100644 --- a/src/ts/component/block/type.tsx +++ b/src/ts/component/block/type.tsx @@ -32,8 +32,8 @@ const BlockType = observer(class BlockType extends React.Component<I.BlockCompon <div id={'item-' + item.id} className="item" - onClick={(e: any) => { this.onClick(e, item); }} - onMouseEnter={(e: any) => { this.onOver(e, item); }} + onClick={e => this.onClick(e, item)} + onMouseEnter={e => this.onOver(e, item)} onMouseLeave={this.onOut} > {item.icon ? <Icon className={item.icon} /> : ''} @@ -186,7 +186,7 @@ const BlockType = observer(class BlockType extends React.Component<I.BlockCompon menuStore.open('typeSuggest', { element: `#block-${block.id} #item-menu`, - onOpen: () => { obj.addClass('active'); }, + onOpen: () => obj.addClass('active'), onClose: () => { obj.removeClass('active'); focus.apply(); diff --git a/src/ts/component/drag/box.tsx b/src/ts/component/drag/box.tsx index da63215480..39db81ef44 100644 --- a/src/ts/component/drag/box.tsx +++ b/src/ts/component/drag/box.tsx @@ -102,8 +102,8 @@ class DragBox extends React.Component<Props> { element.addClass('isDragging'); win.off('mousemove.dragbox mouseup.dragbox'); - win.on('mousemove.dragbox', (e: any) => { this.onDragMove(e); }); - win.on('mouseup.dragbox', (e: any) => { this.onDragEnd(e); }); + win.on('mousemove.dragbox', e => this.onDragMove(e)); + win.on('mouseup.dragbox', e => this.onDragEnd(e)); }; onDragMove (e: any) { diff --git a/src/ts/component/drag/provider.tsx b/src/ts/component/drag/provider.tsx index fe30d84e27..cd58c315dc 100644 --- a/src/ts/component/drag/provider.tsx +++ b/src/ts/component/drag/provider.tsx @@ -235,8 +235,8 @@ const DragProvider = observer(class DragProvider extends React.Component<Props> keyboard.disableSelection(true); Preview.hideAll(); - win.on('drag.drag', (e: any) => { this.onDrag(e); }); - win.on('dragend.drag', (e: any) => { this.onDragEnd(e); }); + win.on('drag.drag', e => this.onDrag(e)); + win.on('dragend.drag', e => this.onDragEnd(e)); container.off('scroll.drag').on('scroll.drag', throttle(() => this.onScroll(), 20)); sidebar.off('scroll.drag').on('scroll.drag', throttle(() => this.onScroll(), 20)); diff --git a/src/ts/component/editor/page.tsx b/src/ts/component/editor/page.tsx index 5b2ede235e..8682888bc8 100644 --- a/src/ts/component/editor/page.tsx +++ b/src/ts/component/editor/page.tsx @@ -628,7 +628,7 @@ const EditorPage = observer(class EditorPage extends React.Component<Props, Stat }; e.preventDefault(); - Action.duplicate(rootId, rootId, ids[ids.length - 1], ids, I.BlockPosition.Bottom, () => { focus.clear(true); }); + Action.duplicate(rootId, rootId, ids[ids.length - 1], ids, I.BlockPosition.Bottom, () => focus.clear(true)); }); for (const item of styleParam) { @@ -1329,7 +1329,7 @@ const EditorPage = observer(class EditorPage extends React.Component<Props, Stat }; Action.move(rootId, rootId, obj.id, [ block.id ], (isShift ? I.BlockPosition.Bottom : I.BlockPosition.Inner), () => { - window.setTimeout(() => { this.focus(block.id, range.from, range.to, false); }, 50); + window.setTimeout(() => this.focus(block.id, range.from, range.to, false), 50); if (next && next.isTextToggle()) { blockStore.toggle(rootId, next.id, true); @@ -1880,7 +1880,7 @@ const EditorPage = observer(class EditorPage extends React.Component<Props, Stat C.BlockCreate(rootId, blockId, position, param, (message: any) => { if (param.type == I.BlockType.Text) { - window.setTimeout(() => { this.focus(message.blockId, 0, 0, false); }, 15); + window.setTimeout(() => this.focus(message.blockId, 0, 0, false), 15); }; if (callBack) { diff --git a/src/ts/component/form/inputWithFile.tsx b/src/ts/component/form/inputWithFile.tsx index 07b5a0781d..4847767736 100644 --- a/src/ts/component/form/inputWithFile.tsx +++ b/src/ts/component/form/inputWithFile.tsx @@ -80,7 +80,7 @@ class InputWithFile extends React.Component<Props, State> { if (isIcon) { cn.push('isIcon'); - onClick = (e: MouseEvent) => { this.onClickFile(e); }; + onClick = e => this.onClickFile(e); }; if (focused) { @@ -260,7 +260,7 @@ class InputWithFile extends React.Component<Props, State> { if (readonly) { return; }; - + Action.openFile(accept, paths => { if (onChangeFile) { onChangeFile(e, paths[0]); diff --git a/src/ts/component/form/pin.tsx b/src/ts/component/form/pin.tsx index c919b32b7d..37366ba582 100644 --- a/src/ts/component/form/pin.tsx +++ b/src/ts/component/form/pin.tsx @@ -6,11 +6,11 @@ import Constant from 'json/constant.json'; interface Props { /** the length of the pin, defaults to Constant.pinLength */ - pinLength: number; + pinLength?: number; /** the expected pin, encrypted in sha1. if none provided, this component does not make a comparison check */ - expectedPin: string | null; + expectedPin?: string | null; /** if true, the input field will be focused on component mount */ - focusOnMount: boolean; + focusOnMount?: boolean; /** callback when the pin is entered (and matches expectedPin if provided)*/ onSuccess?: (value: string) => void; /** callback when the pin is entered (and does not match expectedPin if provided)*/ @@ -53,12 +53,10 @@ class Pin extends React.Component<Props, State> { <div className="pin" onClick={this.onClick}> {Array(pinLength).fill(null).map((_, i) => ( <Input - className={i === index ? 'active' : ''} ref={ref => this.inputRefs[i] = ref} maxLength={1} key={i} onFocus={() => this.onInputFocus(i)} - onBlur={() => this.onInputBlur(i)} onKeyUp={this.onInputKeyUp} onKeyDown={e => this.onInputKeyDown(e, i)} onChange={(_, value) => this.onInputChange(i, value)} @@ -99,9 +97,11 @@ class Pin extends React.Component<Props, State> { /** triggers when all the pin characters have been entered in, resetting state and calling callbacks */ check = () => { - const { expectedPin, onSuccess, onError } = this.props; + const { expectedPin } = this.props; const pin = this.getValue(); const success = !expectedPin || (expectedPin === sha1(pin)); + const onSuccess = this.props.onSuccess || (() => {}); + const onError = this.props.onError || (() => {}); success ? onSuccess(pin) : onError(); }; @@ -132,10 +132,6 @@ class Pin extends React.Component<Props, State> { this.setState({ index }); }; - onInputBlur = (index: number) => { - this.inputRefs[index].removeClass('active'); - }; - onInputKeyDown = (e, index: number) => { const prev = this.inputRefs[index - 1]; diff --git a/src/ts/component/header/index.tsx b/src/ts/component/header/index.tsx index ca1f338069..8dcd2b9b76 100644 --- a/src/ts/component/header/index.tsx +++ b/src/ts/component/header/index.tsx @@ -116,7 +116,7 @@ class Header extends React.Component<Props> { menuParam.classNameWrap = 'fixed fromHeader'; }; - menuStore.closeAllForced(null, () => { menuStore.open(id, menuParam); }); + menuStore.closeAllForced(null, () => menuStore.open(id, menuParam)); }; getContainer () { diff --git a/src/ts/component/header/main/object.tsx b/src/ts/component/header/main/object.tsx index cb2ee28875..ecbc49b0c4 100644 --- a/src/ts/component/header/main/object.tsx +++ b/src/ts/component/header/main/object.tsx @@ -116,7 +116,7 @@ const HeaderMainObject = observer(class HeaderMainObject extends React.Component const object = detailStore.get(rootId, rootId, []); keyboard.disableClose(true); - popupStore.closeAll(null, () => { UtilObject.openRoute(object); }); + popupStore.closeAll(null, () => UtilObject.openRoute(object)); }; onMore () { diff --git a/src/ts/component/list/object.tsx b/src/ts/component/list/object.tsx index 63fb07174d..090f964808 100644 --- a/src/ts/component/list/object.tsx +++ b/src/ts/component/list/object.tsx @@ -50,7 +50,7 @@ const ListObject = observer(class ListObject extends React.Component<Props> { offset={offset} limit={LIMIT} total={total} - onChange={(page: number) => { this.getData(page); }} + onChange={page => this.getData(page)} /> ); }; @@ -125,8 +125,7 @@ const ListObject = observer(class ListObject extends React.Component<Props> { subId={subId} block={null} relationKey={column.relationKey} - getRecord={() => item} - recordId={item.id} + record={item} viewType={I.ViewType.Grid} idPrefix={PREFIX} iconSize={20} diff --git a/src/ts/component/list/objectManager.tsx b/src/ts/component/list/objectManager.tsx index a063763bf3..3985a86d7a 100644 --- a/src/ts/component/list/objectManager.tsx +++ b/src/ts/component/list/objectManager.tsx @@ -112,7 +112,7 @@ const ListObjectManager = observer(class ListObjectManager extends React.Compone <Checkbox ref={ref => this.refCheckbox.set(item.id, ref)} value={this.selected.includes(item.id)} - onChange={(e) => this.onClick(e, item)} + onChange={e => this.onClick(e, item)} /> <div className="objectClickArea" onClick={() => UtilObject.openPopup(item)}> <IconObject object={item} size={iconSize} /> diff --git a/src/ts/component/menu/block/action.tsx b/src/ts/component/menu/block/action.tsx index 9f1ed57c3b..2afe5b0c31 100644 --- a/src/ts/component/menu/block/action.tsx +++ b/src/ts/component/menu/block/action.tsx @@ -61,8 +61,8 @@ class MenuBlockAction extends React.Component<I.Menu, State> { <MenuItemVertical key={i} {...action} - onMouseEnter={(e: any) => { this.onMouseEnter(e, action); }} - onClick={(e: any) => { this.onClick(e, action); }} + onMouseEnter={e => this.onMouseEnter(e, action)} + onClick={e => this.onClick(e, action)} /> ); })} @@ -99,7 +99,7 @@ class MenuBlockAction extends React.Component<I.Menu, State> { this._isMounted = true; this.rebind(); - menu.off('mouseleave').on('mouseleave', () => { menuStore.clearTimeout(); }); + menu.off('mouseleave').on('mouseleave', () => menuStore.clearTimeout()); }; componentDidUpdate () { @@ -199,7 +199,6 @@ class MenuBlockAction extends React.Component<I.Menu, State> { const align = { id: 'align', icon: '', name: translate('commonAlign'), children: [] }; const bgColor = { id: 'bgColor', icon: '', name: translate('commonBackground'), children: UtilMenu.getBgColors() }; const color = { id: 'color', icon: 'color', name: translate('commonColor'), arrow: true, children: UtilMenu.getTextColors() }; - const dataview = { id: 'dataview', icon: '', name: translate('menuBlockActionsSectionsDataview'), children: UtilMenu.getDataviewActions(rootId, blockId) }; let hasTurnText = true; let hasTurnObject = true; @@ -252,7 +251,6 @@ class MenuBlockAction extends React.Component<I.Menu, State> { if (hasTurnObject) sections.push(turnPage); if (hasColor) sections.push(color); if (hasBg) sections.push(bgColor); - if (hasDataview) sections.push(dataview); if (hasAlign) { sections.push({ @@ -264,7 +262,7 @@ class MenuBlockAction extends React.Component<I.Menu, State> { if (hasAction) { sections.push({ ...action, - children: UtilMenu.getActions({ hasText, hasFile, hasLink, hasBookmark }), + children: UtilMenu.getActions({ rootId, blockId, hasText, hasFile, hasLink, hasBookmark, hasDataview }), }); }; @@ -313,7 +311,7 @@ class MenuBlockAction extends React.Component<I.Menu, State> { }; const section1: any = { - children: UtilMenu.getActions({ hasText, hasFile, hasLink, hasDataview, hasBookmark, hasTurnObject }) + children: UtilMenu.getActions({ rootId, blockId, hasText, hasFile, hasLink, hasDataview, hasBookmark, hasTurnObject }) }; const section2: any = { @@ -322,10 +320,6 @@ class MenuBlockAction extends React.Component<I.Menu, State> { ] }; - if (hasDataview) { - section2.children = section2.children.concat(UtilMenu.getDataviewActions(rootId, blockId)); - }; - if (hasLink) { section2.children.push({ id: 'linkSettings', icon: 'linkStyle' + content.cardStyle, name: translate('commonPreview'), arrow: true }); }; @@ -519,7 +513,7 @@ class MenuBlockAction extends React.Component<I.Menu, State> { { operator: I.FilterOperator.And, relationKey: 'layout', condition: I.FilterCondition.In, value: UtilObject.getPageLayouts() }, ], canAdd: true, - onSelect: () => { close(); } + onSelect: () => close() }); break; }; @@ -658,6 +652,7 @@ class MenuBlockAction extends React.Component<I.Menu, State> { }; const ids = UtilData.selectionGet(blockId, false, false, data); + const targetObjectId = block.getTargetObjectId(); switch (item.itemId) { case 'download': { @@ -665,17 +660,15 @@ class MenuBlockAction extends React.Component<I.Menu, State> { break; }; - case 'openBookmarkAsObject': { - UtilObject.openPopup({ id: block.content.targetObjectId, layout: I.ObjectLayout.Bookmark }); + case 'openAsObject': { + UtilObject.openPopup(detailStore.get(rootId, targetObjectId)); - analytics.event('OpenAsObject', { type: block.type }); - break; - }; + const event: any = { type: block.type }; + if (block.isFile()) { + event.params = { fileType: block.content.type }; + }; - case 'openFileAsObject': { - UtilObject.openPopup({ id: block.content.hash, layout: I.ObjectLayout.File }); - - analytics.event('OpenAsObject', { type: block.type, params: { fileType: block.content.type } }); + analytics.event('OpenAsObject', event); break; }; @@ -685,11 +678,6 @@ class MenuBlockAction extends React.Component<I.Menu, State> { break; }; - case 'openDataviewObject': { - UtilObject.openPopup(detailStore.get(rootId, block.content.targetObjectId)); - break; - }; - case 'copy': { Action.duplicate(rootId, rootId, ids[ids.length - 1], ids, I.BlockPosition.Bottom); break; diff --git a/src/ts/component/menu/block/add.tsx b/src/ts/component/menu/block/add.tsx index 9636084e73..c1e7362aa3 100644 --- a/src/ts/component/menu/block/add.tsx +++ b/src/ts/component/menu/block/add.tsx @@ -50,8 +50,8 @@ const MenuBlockAdd = observer(class MenuBlockAdd extends React.Component<I.Menu> <div id="item-relation-add" className="item add" - onClick={(e: any) => { this.onClick(e, item); }} - onMouseEnter={(e: any) => { this.onMouseEnter(e, item); }} + onClick={e => this.onClick(e, item)} + onMouseEnter={e => this.onMouseEnter(e, item)} style={param.style} > <Icon className="plus" /> @@ -83,8 +83,7 @@ const MenuBlockAdd = observer(class MenuBlockAdd extends React.Component<I.Menu> subId={rootId} block={block} relationKey={item.relationKey} - getRecord={() => detailStore.get(rootId, rootId, [ item.relationKey ])} - recordId={rootId} + record={detailStore.get(rootId, rootId, [ item.relationKey ])} viewType={I.ViewType.Grid} idPrefix={idPrefix} menuClassName="fromBlock" @@ -136,8 +135,8 @@ const MenuBlockAdd = observer(class MenuBlockAdd extends React.Component<I.Menu> {...item} className={cn.join(' ')} withDescription={item.isBlock} - onMouseEnter={(e: any) => { this.onMouseEnter(e, item); }} - onClick={(e: any) => { this.onClick(e, item); }} + onMouseEnter={e => this.onMouseEnter(e, item)} + onClick={e => this.onClick(e, item)} style={param.style} /> ); @@ -207,7 +206,7 @@ const MenuBlockAdd = observer(class MenuBlockAdd extends React.Component<I.Menu> keyMapper: i => (items[i] || {}).id, }); - $(`#${getId()}`).off('mouseleave').on('mouseleave', () => { window.clearTimeout(this.timeout); }); + $(`#${getId()}`).off('mouseleave').on('mouseleave', () => window.clearTimeout(this.timeout)); }; componentDidUpdate () { @@ -257,7 +256,7 @@ const MenuBlockAdd = observer(class MenuBlockAdd extends React.Component<I.Menu> rebind () { this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; diff --git a/src/ts/component/menu/block/align.tsx b/src/ts/component/menu/block/align.tsx index db76f529f2..d3405b875c 100644 --- a/src/ts/component/menu/block/align.tsx +++ b/src/ts/component/menu/block/align.tsx @@ -41,7 +41,7 @@ class MenuBlockHAlign extends React.Component<I.Menu> { rebind () { this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; diff --git a/src/ts/component/menu/block/background.tsx b/src/ts/component/menu/block/background.tsx index b8ffc99649..9eb2154582 100644 --- a/src/ts/component/menu/block/background.tsx +++ b/src/ts/component/menu/block/background.tsx @@ -32,8 +32,8 @@ class MenuBlockBackground extends React.Component<I.Menu> { icon="color" inner={inner} checkbox={action.value == value} - onClick={(e: any) => { this.onClick(e, action); }} - onMouseEnter={(e: any) => { this.onOver(e, action); }} + onClick={e => this.onClick(e, action)} + onMouseEnter={e => this.onOver(e, action)} /> ); })} @@ -47,7 +47,7 @@ class MenuBlockBackground extends React.Component<I.Menu> { rebind () { this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; diff --git a/src/ts/component/menu/block/color.tsx b/src/ts/component/menu/block/color.tsx index 1064f775dd..569f1379fa 100644 --- a/src/ts/component/menu/block/color.tsx +++ b/src/ts/component/menu/block/color.tsx @@ -32,8 +32,8 @@ class MenuBlockColor extends React.Component<I.Menu> { icon="color" inner={inner} checkbox={action.value == value} - onClick={(e: any) => { this.onClick(e, action); }} - onMouseEnter={(e: any) => { this.onOver(e, action); }} + onClick={e => this.onClick(e, action)} + onMouseEnter={e => this.onOver(e, action)} /> ); })} @@ -47,7 +47,7 @@ class MenuBlockColor extends React.Component<I.Menu> { rebind () { this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; diff --git a/src/ts/component/menu/block/context.tsx b/src/ts/component/menu/block/context.tsx index 99c958091c..c962e81e2d 100644 --- a/src/ts/component/menu/block/context.tsx +++ b/src/ts/component/menu/block/context.tsx @@ -60,7 +60,7 @@ const MenuBlockContext = observer(class MenuBlockContext extends React.Component <div className="flex"> {canTurn ? ( <div className="section"> - <Icon id={'button-' + blockId + '-style'} arrow={true} tooltip={translate('menuBlockContextSwitchStyle')} tooltipY={I.MenuDirection.Top} className={[ styleIcon, 'blockStyle' ].join(' ')} onMouseDown={(e: any) => { this.onMark(e, 'style'); }} /> + <Icon id={'button-' + blockId + '-style'} arrow={true} tooltip={translate('menuBlockContextSwitchStyle')} tooltipY={I.MenuDirection.Top} className={[ styleIcon, 'blockStyle' ].join(' ')} onMouseDown={e => this.onMark(e, 'style')} /> </div> ) : ''} @@ -91,7 +91,7 @@ const MenuBlockContext = observer(class MenuBlockContext extends React.Component tooltip={action.name} tooltipCaption={action.caption} tooltipY={I.MenuDirection.Top} - onMouseDown={(e: any) => { this.onMark(e, action.type); }} + onMouseDown={e => this.onMark(e, action.type)} /> ); })} @@ -106,7 +106,7 @@ const MenuBlockContext = observer(class MenuBlockContext extends React.Component tooltip={translate('commonColor')} tooltipCaption={`${cmd} + Shift + C`} tooltipY={I.MenuDirection.Top} - onMouseDown={(e: any) => { this.onMark(e, I.MarkType.Color); }} + onMouseDown={e => this.onMark(e, I.MarkType.Color)} /> <Icon @@ -116,7 +116,7 @@ const MenuBlockContext = observer(class MenuBlockContext extends React.Component tooltip={translate('commonBackground')} tooltipCaption={`${cmd} + Shift + H`} tooltipY={I.MenuDirection.Top} - onMouseDown={(e: any) => { this.onMark(e, I.MarkType.BgColor); }} + onMouseDown={e => this.onMark(e, I.MarkType.BgColor)} /> </div> </React.Fragment> @@ -136,7 +136,7 @@ const MenuBlockContext = observer(class MenuBlockContext extends React.Component className="more" tooltip={translate('menuBlockContextMoreOptions')} tooltipY={I.MenuDirection.Top} - onMouseDown={(e: any) => { this.onMark(e, 'more'); }} + onMouseDown={e => this.onMark(e, 'more')} /> </div> ) : ''} @@ -256,7 +256,7 @@ const MenuBlockContext = observer(class MenuBlockContext extends React.Component menuStore.updateData(this.props.id, { marks }); onChange(marks); - window.setTimeout(() => { focus.apply(); }, 15); + window.setTimeout(() => focus.apply(), 15); } }); diff --git a/src/ts/component/menu/block/cover.tsx b/src/ts/component/menu/block/cover.tsx index 6562b43c24..ce4c3ae193 100644 --- a/src/ts/component/menu/block/cover.tsx +++ b/src/ts/component/menu/block/cover.tsx @@ -56,7 +56,7 @@ const MenuBlockCover = observer(class MenuBlockCover extends React.Component<I.M const sections = this.getSections(); const Item = (item: any) => ( - <div className="item" onClick={(e: any) => { this.onSelect(e, item); }}> + <div className="item" onClick={e => this.onSelect(e, item)}> <Cover preview={true} {...item} /> {item.artist ? <div className="name">{item.artist}</div> : ''} </div> @@ -136,7 +136,7 @@ const MenuBlockCover = observer(class MenuBlockCover extends React.Component<I.M <div key={item.id} className={[ 'btn', (item.id == this.tab ? 'active' : '') ].join(' ')} - onClick={() => { this.setTab(item.id); }} + onClick={() => this.setTab(item.id)} > {item.name} </div> @@ -276,13 +276,13 @@ const MenuBlockCover = observer(class MenuBlockCover extends React.Component<I.M onUploadStart(); }; - C.FileUpload(commonStore.space, '', paths[0], I.FileType.Image, (message: any) => { + C.FileUpload(commonStore.space, '', paths[0], I.FileType.Image, {}, (message: any) => { if (message.error.code) { return; }; if (onUpload) { - onUpload(I.CoverType.Upload, message.hash); + onUpload(I.CoverType.Upload, message.objectId); }; analytics.event('SetCover', { type: I.CoverType.Upload }); @@ -307,7 +307,7 @@ const MenuBlockCover = observer(class MenuBlockCover extends React.Component<I.M C.UnsplashDownload(commonStore.space, item.id, (message: any) => { if (!message.error.code) { - onUpload(item.type, message.hash); + onUpload(item.type, message.objectId); }; }); @@ -387,12 +387,12 @@ const MenuBlockCover = observer(class MenuBlockCover extends React.Component<I.M preventCommonDrop(true); this.setState({ isLoading: true }); - C.FileUpload(commonStore.space, '', file, I.FileType.Image, (message: any) => { + C.FileUpload(commonStore.space, '', file, I.FileType.Image, {}, (message: any) => { this.setState({ isLoading: false }); preventCommonDrop(false); if (!message.error.code) { - UtilObject.setCover(rootId, I.CoverType.Upload, message.hash); + UtilObject.setCover(rootId, I.CoverType.Upload, message.objectId); }; close(); @@ -417,9 +417,9 @@ const MenuBlockCover = observer(class MenuBlockCover extends React.Component<I.M return; }; - C.FileUpload(commonStore.space, '', data.files[0].path, I.FileType.Image, (message: any) => { + C.FileUpload(commonStore.space, '', data.files[0].path, I.FileType.Image, {}, (message: any) => { if (!message.error.code) { - UtilObject.setCover(rootId, I.CoverType.Upload, message.hash); + UtilObject.setCover(rootId, I.CoverType.Upload, message.objectId); }; this.setState({ isLoading: false }); diff --git a/src/ts/component/menu/block/latex.tsx b/src/ts/component/menu/block/latex.tsx index c8cbc1a650..7a940adf2a 100644 --- a/src/ts/component/menu/block/latex.tsx +++ b/src/ts/component/menu/block/latex.tsx @@ -178,7 +178,7 @@ const MenuBlockLatex = observer(class MenuBlockLatex extends React.Component<I.M rebind () { this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; diff --git a/src/ts/component/menu/block/layout.tsx b/src/ts/component/menu/block/layout.tsx index 2304da178d..904fb4b483 100644 --- a/src/ts/component/menu/block/layout.tsx +++ b/src/ts/component/menu/block/layout.tsx @@ -34,8 +34,8 @@ class MenuBlockLayout extends React.Component<I.Menu> { {...action} icon={action.icon || action.id} checkbox={action.id == value} - onMouseEnter={(e: any) => { this.onMouseEnter(e, action); }} - onClick={(e: any) => { this.onClick(e, action); }} + onMouseEnter={e => this.onMouseEnter(e, action)} + onClick={e => this.onClick(e, action)} /> ))} </div> @@ -61,7 +61,7 @@ class MenuBlockLayout extends React.Component<I.Menu> { rebind () { this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; diff --git a/src/ts/component/menu/block/link.tsx b/src/ts/component/menu/block/link.tsx index 7336f5ceda..db36bbc118 100644 --- a/src/ts/component/menu/block/link.tsx +++ b/src/ts/component/menu/block/link.tsx @@ -92,8 +92,8 @@ const MenuBlockLink = observer(class MenuBlockLink extends React.Component<I.Men object={object} icon={item.icon} name={<ObjectName object={item} />} - onMouseEnter={(e: any) => { this.onOver(e, item); }} - onClick={(e: any) => { this.onClick(e, item); }} + onMouseEnter={e => this.onOver(e, item)} + onClick={e => this.onClick(e, item)} withDescription={item.isBig} description={type ? type.name : undefined} style={param.style} @@ -206,7 +206,7 @@ const MenuBlockLink = observer(class MenuBlockLink extends React.Component<I.Men rebind () { this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; diff --git a/src/ts/component/menu/block/link/settings.tsx b/src/ts/component/menu/block/link/settings.tsx index 82cc91c417..06afd133c7 100644 --- a/src/ts/component/menu/block/link/settings.tsx +++ b/src/ts/component/menu/block/link/settings.tsx @@ -28,8 +28,8 @@ const MenuBlockLinkSettings = observer(class MenuBlockLinkSettings extends React <MenuItemVertical key={i} {...action} - onClick={(e: any) => { this.onClick(e, action); }} - onMouseEnter={(e: any) => { this.onOver(e, action); }} + onClick={e => this.onClick(e, action)} + onMouseEnter={e => this.onOver(e, action)} /> ))} </div> @@ -60,7 +60,7 @@ const MenuBlockLinkSettings = observer(class MenuBlockLinkSettings extends React rebind () { this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; diff --git a/src/ts/component/menu/block/mention.tsx b/src/ts/component/menu/block/mention.tsx index c2e2a4a62a..03939d17b9 100644 --- a/src/ts/component/menu/block/mention.tsx +++ b/src/ts/component/menu/block/mention.tsx @@ -72,8 +72,8 @@ const MenuBlockMention = observer(class MenuBlockMention extends React.Component object={item.id == 'add' ? undefined : item} icon={item.icon} name={<ObjectName object={item} />} - onMouseEnter={(e: any) => { this.onOver(e, item); }} - onClick={(e: any) => { this.onClick(e, item); }} + onMouseEnter={e => this.onOver(e, item)} + onClick={e => this.onClick(e, item)} caption={type ? type.name : undefined} style={param.style} className={cn.join(' ')} @@ -162,7 +162,7 @@ const MenuBlockMention = observer(class MenuBlockMention extends React.Component rebind () { this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; @@ -283,7 +283,7 @@ const MenuBlockMention = observer(class MenuBlockMention extends React.Component const { from } = commonStore.filter; const cb = (id: string, name: string) => { - name = String(name || UtilObject.defaultName('Page')); + name = String(name || translate('defaultNamePage')); name = UtilCommon.shorten(name, 30); const to = from + name.length; diff --git a/src/ts/component/menu/block/more.tsx b/src/ts/component/menu/block/more.tsx index aadb6a8de1..10e1c6c6ad 100644 --- a/src/ts/component/menu/block/more.tsx +++ b/src/ts/component/menu/block/more.tsx @@ -38,8 +38,8 @@ class MenuBlockMore extends React.Component<I.Menu> { key={i} {...action} icon={action.icon || action.id} - onMouseEnter={(e: any) => { this.onMouseEnter(e, action); }} - onClick={(e: any) => { this.onClick(e, action); }} + onMouseEnter={e => this.onMouseEnter(e, action)} + onClick={e => this.onClick(e, action)} /> ); })} @@ -83,7 +83,7 @@ class MenuBlockMore extends React.Component<I.Menu> { rebind () { this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; @@ -445,7 +445,7 @@ class MenuBlockMore extends React.Component<I.Menu> { }; case 'pageExport': { - popupStore.open('export', { data: { rootId } }); + popupStore.open('export', { data: { objectIds: [ rootId ], allowHtml: true } }); break; }; @@ -508,7 +508,7 @@ class MenuBlockMore extends React.Component<I.Menu> { }; case 'pageUninstall': { - Action.uninstall(object, false, () => { onBack(); }); + Action.uninstall(object, false, () => onBack()); break; }; diff --git a/src/ts/component/menu/block/relation/view.tsx b/src/ts/component/menu/block/relation/view.tsx index 918030d54c..719342a562 100644 --- a/src/ts/component/menu/block/relation/view.tsx +++ b/src/ts/component/menu/block/relation/view.tsx @@ -82,7 +82,7 @@ const MenuBlockRelationView = observer(class MenuBlockRelationView extends React ); const ItemAdd = () => ( - <div id="item-add" className="item add" onClick={(e: any) => { this.onAdd(e); }}> + <div id="item-add" className="item add" onClick={e => this.onAdd(e)}> <div className="line" /> <div className="info"> <Icon className="plus" /> @@ -111,7 +111,7 @@ const MenuBlockRelationView = observer(class MenuBlockRelationView extends React const scrollWrap = node.find('#scrollWrap'); this.resize(); - scrollWrap.off('scroll').on('scroll', (e: any) => { this.onScroll(); }); + scrollWrap.off('scroll').on('scroll', e => this.onScroll()); this.selectionPrevent(true); }; @@ -219,7 +219,7 @@ const MenuBlockRelationView = observer(class MenuBlockRelationView extends React if (idx < 0) { const item = items.find(it => it.relationKey == relationKey); const cb = () => { - C.ObjectRelationAddFeatured(rootId, [ relationKey ], () => { analytics.event('FeatureRelation'); }); + C.ObjectRelationAddFeatured(rootId, [ relationKey ], () => analytics.event('FeatureRelation')); }; if (item.scope == I.RelationScope.Type) { @@ -228,7 +228,7 @@ const MenuBlockRelationView = observer(class MenuBlockRelationView extends React cb(); }; } else { - C.ObjectRelationRemoveFeatured(rootId, [ relationKey ], () => { analytics.event('UnfeatureRelation'); }); + C.ObjectRelationRemoveFeatured(rootId, [ relationKey ], () => analytics.event('UnfeatureRelation')); }; }; diff --git a/src/ts/component/menu/block/style.tsx b/src/ts/component/menu/block/style.tsx index e82d606a7a..b340c3d793 100644 --- a/src/ts/component/menu/block/style.tsx +++ b/src/ts/component/menu/block/style.tsx @@ -26,8 +26,8 @@ const MenuBlockStyle = observer(class MenuBlockStyle extends React.Component<I.M key={i} {...action} checkbox={action.itemId == active} - onClick={(e: any) => { this.onClick(e, action); }} - onMouseEnter={(e: any) => { this.onOver(e, action); }} + onClick={e => this.onClick(e, action)} + onMouseEnter={e => this.onOver(e, action)} /> ))} </div> @@ -52,7 +52,7 @@ const MenuBlockStyle = observer(class MenuBlockStyle extends React.Component<I.M rebind () { this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; diff --git a/src/ts/component/menu/button.tsx b/src/ts/component/menu/button.tsx index 7101232de1..96d4861944 100644 --- a/src/ts/component/menu/button.tsx +++ b/src/ts/component/menu/button.tsx @@ -26,7 +26,7 @@ const MenuButton = observer(class MenuButton extends React.Component<I.Menu> { key={i} {...item} className={disabled ? 'disabled' : ''} - onClick={(e: any) => { this.onSelect(e, item); }} + onClick={e => this.onSelect(e, item)} /> ))} </div> diff --git a/src/ts/component/menu/dataview/calendar/day.tsx b/src/ts/component/menu/dataview/calendar/day.tsx index 7cda0906a2..f438b64a1c 100644 --- a/src/ts/component/menu/dataview/calendar/day.tsx +++ b/src/ts/component/menu/dataview/calendar/day.tsx @@ -45,7 +45,7 @@ const MenuCalendarDay = observer(class MenuCalendarDay extends React.Component<I size={16} canEdit={canEdit} onSelect={icon => this.onSelect(item, icon)} - onUpload={hash => this.onUpload(item, hash)} + onUpload={objectId => this.onUpload(item, objectId)} onCheckbox={() => this.onCheckbox(item)} /> ) : ''} @@ -104,8 +104,8 @@ const MenuCalendarDay = observer(class MenuCalendarDay extends React.Component<I UtilObject.setIcon(item.id, icon, ''); }; - onUpload (item: any, hash: string) { - UtilObject.setIcon(item.id, '', hash); + onUpload (item: any, objectId: string) { + UtilObject.setIcon(item.id, '', objectId); }; onCheckbox (item: any) { diff --git a/src/ts/component/menu/dataview/context.tsx b/src/ts/component/menu/dataview/context.tsx index 66519502d2..a12a7944f5 100644 --- a/src/ts/component/menu/dataview/context.tsx +++ b/src/ts/component/menu/dataview/context.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import $ from 'jquery'; import { MenuItemVertical } from 'Component'; import { I, C, keyboard, analytics, translate, UtilObject, focus, Action } from 'Lib'; -import { detailStore, menuStore, blockStore } from 'Store'; +import { detailStore, menuStore, blockStore, popupStore } from 'Store'; import Constant from 'json/constant.json'; class MenuContext extends React.Component<I.Menu> { @@ -37,8 +37,8 @@ class MenuContext extends React.Component<I.Menu> { key={i} {...action} icon={action.icon || action.id} - onMouseEnter={(e: any) => { this.onMouseEnter(e, action); }} - onClick={(e: any) => { this.onClick(e, action); }} + onMouseEnter={e => this.onMouseEnter(e, action)} + onClick={e => this.onClick(e, action)} /> ); })} @@ -71,7 +71,7 @@ class MenuContext extends React.Component<I.Menu> { rebind () { this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; @@ -90,6 +90,7 @@ class MenuContext extends React.Component<I.Menu> { let linkTo = { id: 'linkTo', icon: 'linkTo', name: translate('commonLinkTo'), arrow: true }; let changeType = { id: 'changeType', icon: 'pencil', name: translate('blockFeaturedTypeMenuChangeType'), arrow: true }; let createWidget = { id: 'createWidget', icon: 'createWidget', name: translate('menuBlockMoreCreateWidget') }; + let exportObject = { id: 'export', icon: 'export', name: translate('menuBlockMoreExport') }; let unlink = null; let archive = null; let archiveCnt = 0; @@ -152,6 +153,7 @@ class MenuContext extends React.Component<I.Menu> { linkTo = null; unlink = null; changeType = null; + exportObject = null; archive = { id: 'unarchive', icon: 'restore', name: translate('commonRestoreFromBin') }; } else { archive = { id: 'archive', icon: 'remove', name: translate('commonMoveToBin') }; @@ -165,7 +167,7 @@ class MenuContext extends React.Component<I.Menu> { if (!allowedOpen) open = null; let sections = [ - { children: [ createWidget, open, fav, linkTo ] }, + { children: [ createWidget, open, fav, linkTo, exportObject ] }, { children: [ changeType, pageCopy, unlink, archive ] }, ]; @@ -359,6 +361,10 @@ class MenuContext extends React.Component<I.Menu> { break; }; + case 'export': { + popupStore.open('export', { data: { objectIds } }); + break; + }; }; close(); diff --git a/src/ts/component/menu/dataview/date.tsx b/src/ts/component/menu/dataview/date.tsx index 4c43749a68..b63b24a64b 100644 --- a/src/ts/component/menu/dataview/date.tsx +++ b/src/ts/component/menu/dataview/date.tsx @@ -27,7 +27,7 @@ const MenuDataviewDate = observer(class MenuDataviewDate extends React.Component <MenuItemVertical key={i} {...action} - onMouseEnter={(e: any) => { this.onMouseEnter(e, action); }} + onMouseEnter={e => this.onMouseEnter(e, action)} /> ))} </div> @@ -59,7 +59,7 @@ const MenuDataviewDate = observer(class MenuDataviewDate extends React.Component rebind () { this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; diff --git a/src/ts/component/menu/dataview/file/list.tsx b/src/ts/component/menu/dataview/file/list.tsx index 41f13130e2..db93fb1ac8 100644 --- a/src/ts/component/menu/dataview/file/list.tsx +++ b/src/ts/component/menu/dataview/file/list.tsx @@ -58,7 +58,7 @@ const MenuDataviewFileList = observer(class MenuDataviewFileList extends React.C let content = null; if (item.id == 'add') { content = ( - <div id="item-add" className="item add" onMouseEnter={(e: any) => { this.onOver(e, item); }} onClick={(e: any) => { this.onClick(e, item); }} style={param.style}> + <div id="item-add" className="item add" onMouseEnter={e => this.onOver(e, item)} onClick={e => this.onClick(e, item)} style={param.style}> <Icon className="plus" /> <div className="name">{item.name}</div> </div> @@ -69,8 +69,8 @@ const MenuDataviewFileList = observer(class MenuDataviewFileList extends React.C id={item.id} object={item} name={UtilFile.name(item)} - onMouseEnter={(e: any) => { this.onOver(e, item); }} - onClick={(e: any) => { this.onClick(e, item); }} + onMouseEnter={e => this.onOver(e, item)} + onClick={e => this.onClick(e, item)} caption={type ? type.name : undefined} style={param.style} /> @@ -176,7 +176,7 @@ const MenuDataviewFileList = observer(class MenuDataviewFileList extends React.C rebind () { this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; @@ -235,7 +235,7 @@ const MenuDataviewFileList = observer(class MenuDataviewFileList extends React.C }; this.items = this.items.concat((message.records || []).map((it: any) => { - it.name = String(it.name || UtilObject.defaultName('Page')); + it.name = String(it.name || translate('defaultNamePage')); return it; })); diff --git a/src/ts/component/menu/dataview/file/values.tsx b/src/ts/component/menu/dataview/file/values.tsx index 240add7307..86fedd9ac9 100644 --- a/src/ts/component/menu/dataview/file/values.tsx +++ b/src/ts/component/menu/dataview/file/values.tsx @@ -45,7 +45,7 @@ const MenuDataviewFileValues = observer(class MenuDataviewFileValues extends Rea ); const Image = (item: any) => ( - <img src={commonStore.imageUrl(item.id, 208)} className="img" onLoad={() => { position(); }} /> + <img src={commonStore.imageUrl(item.id, 208)} className="img" onLoad={() => position()} /> ); const Item = SortableElement((item: any) => { @@ -70,11 +70,11 @@ const MenuDataviewFileValues = observer(class MenuDataviewFileValues extends Rea return ( <div id={'item-' + item.id} className={cn.join(' ')}> <Handle /> - <div className="clickable" onClick={(e: any) => { UtilObject.openPopup(item); }}> + <div className="clickable" onClick={e => UtilObject.openPopup(item)}> {content} </div> <div className="buttons"> - <Icon className="more" onClick={(e: any) => { this.onMore(e, item); }} /> + <Icon className="more" onClick={e => this.onMore(e, item)} /> </div> </div> ); @@ -182,23 +182,19 @@ const MenuDataviewFileValues = observer(class MenuDataviewFileValues extends Rea onUpload (e: any) { Action.openFile([], paths => { - C.FileUpload(commonStore.space, '', paths[0], I.FileType.None, (message: any) => { + C.FileUpload(commonStore.space, '', paths[0], I.FileType.None, {}, (message: any) => { if (!message.error.code) { - this.add(message.hash); + this.add(message.objectId); }; }); }); }; - add (hash: string) { + add (objectId: string) { const { param } = this.props; const { data } = param; - let value = Relation.getArrayValue(data.value); - value.push(hash); - value = UtilCommon.arrayUnique(value); - - this.save(value); + this.save(Relation.getArrayValue(data.value).concat([ objectId ])); }; save (value: string[]) { @@ -206,7 +202,7 @@ const MenuDataviewFileValues = observer(class MenuDataviewFileValues extends Rea const { data } = param; const { onChange } = data; - onChange(value, () => { + onChange(UtilCommon.arrayUnique(value), () => { menuStore.updateData(id, { value }); }); }; diff --git a/src/ts/component/menu/dataview/filter/list.tsx b/src/ts/component/menu/dataview/filter/list.tsx index 24298a9c24..341bd81fe9 100644 --- a/src/ts/component/menu/dataview/filter/list.tsx +++ b/src/ts/component/menu/dataview/filter/list.tsx @@ -68,9 +68,9 @@ const MenuFilterList = observer(class MenuFilterList extends React.Component<I.M index={param.index} style={param.style} readonly={!allowedView} - onOver={(e: any) => { this.onOver(e, item); }} - onClick={(e: any) => { this.onClick(e, item); }} - onRemove={(e: any) => { this.onRemove(e, item); }} + onOver={e => this.onOver(e, item)} + onClick={e => this.onClick(e, item)} + onRemove={e => this.onRemove(e, item)} /> </CellMeasurer> ); @@ -139,7 +139,7 @@ const MenuFilterList = observer(class MenuFilterList extends React.Component<I.M className="item add" onClick={this.onAdd} onMouseEnter={() => { this.props.setHover({ id: 'add' }); }} - onMouseLeave={() => { this.props.setHover(); }} + onMouseLeave={() => this.props.setHover()} > <Icon className="plus" /> <div className="name">{translate('menuDataviewFilterNewFilter')}</div> @@ -182,10 +182,10 @@ const MenuFilterList = observer(class MenuFilterList extends React.Component<I.M const { getId } = this.props; const obj = $(`#${getId()} .content`); - obj.off('click').on('click', () => { menuStore.closeAll(Constant.menuIds.cell); }); + obj.off('click').on('click', () => menuStore.closeAll(Constant.menuIds.cell)); this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; @@ -286,7 +286,7 @@ const MenuFilterList = observer(class MenuFilterList extends React.Component<I.M const { oldIndex, newIndex } = result; view.filters = arrayMove(view.filters as I.Filter[], oldIndex, newIndex); - C.BlockDataviewFilterSort(rootId, blockId, view.id, view.filters.map(it => it.id), () => { loadData(view.id, 0); }); + C.BlockDataviewFilterSort(rootId, blockId, view.id, view.filters.map(it => it.id), () => loadData(view.id, 0)); keyboard.disableSelection(false); diff --git a/src/ts/component/menu/dataview/filter/values.tsx b/src/ts/component/menu/dataview/filter/values.tsx index e0b5a1de02..a32372d6da 100644 --- a/src/ts/component/menu/dataview/filter/values.tsx +++ b/src/ts/component/menu/dataview/filter/values.tsx @@ -74,7 +74,7 @@ const MenuDataviewFilterValues = observer(class MenuDataviewFilterValues extends let value = null; let Item = null; let list = []; - let onSubmit = (e: any) => { this.onSubmit(e); }; + let onSubmit = e => this.onSubmit(e); const ItemAdd = (item: any) => ( <div @@ -114,7 +114,7 @@ const MenuDataviewFilterValues = observer(class MenuDataviewFilterValues extends /> </div> <div className="buttons"> - <Icon className="delete" onClick={(e: any) => { this.onDelete(e, element); }} /> + <Icon className="delete" onClick={e => this.onDelete(e, element)} /> </div> </div> ); diff --git a/src/ts/component/menu/dataview/group/edit.tsx b/src/ts/component/menu/dataview/group/edit.tsx index 92ee48e8c0..5dc55875d4 100644 --- a/src/ts/component/menu/dataview/group/edit.tsx +++ b/src/ts/component/menu/dataview/group/edit.tsx @@ -29,8 +29,8 @@ const MenuGroupEdit = observer(class MenuGroupEdit extends React.Component<I.Men <MenuItemVertical key={i} {...action} - onClick={(e: any) => { this.onClick(e, action); }} - onMouseEnter={(e: any) => { this.onMouseEnter(e, action); }} + onClick={e => this.onClick(e, action)} + onMouseEnter={e => this.onMouseEnter(e, action)} /> ); })} @@ -73,7 +73,7 @@ const MenuGroupEdit = observer(class MenuGroupEdit extends React.Component<I.Men rebind () { this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; diff --git a/src/ts/component/menu/dataview/group/list.tsx b/src/ts/component/menu/dataview/group/list.tsx index 01bd2d1e44..22f5e61a7b 100644 --- a/src/ts/component/menu/dataview/group/list.tsx +++ b/src/ts/component/menu/dataview/group/list.tsx @@ -61,7 +61,7 @@ const MenuGroupList = observer(class MenuGroupList extends React.Component<I.Men ref={node => this.node = node} id={'item-' + item.id} className={cn.join(' ')} - onMouseEnter={(e: any) => { this.onMouseEnter(e, item); }} + onMouseEnter={e => this.onMouseEnter(e, item)} style={item.style} > {allowedView ? <Handle /> : ''} @@ -73,8 +73,7 @@ const MenuGroupList = observer(class MenuGroupList extends React.Component<I.Men block={block} relationKey={view.groupRelationKey} viewType={I.ViewType.Board} - getRecord={() => head} - recordId="" + record={head} readonly={true} arrayLimit={4} withName={true} diff --git a/src/ts/component/menu/dataview/object/list.tsx b/src/ts/component/menu/dataview/object/list.tsx index 555c1c8940..9a3ee5868d 100644 --- a/src/ts/component/menu/dataview/object/list.tsx +++ b/src/ts/component/menu/dataview/object/list.tsx @@ -75,7 +75,7 @@ const MenuDataviewObjectList = observer(class MenuDataviewObjectList extends Rea } else if (item.id == 'add') { content = ( - <div id="item-add" className="item add" onMouseEnter={(e: any) => { this.onOver(e, item); }} onClick={(e: any) => { this.onClick(e, item); }} style={param.style}> + <div id="item-add" className="item add" onMouseEnter={e => this.onOver(e, item)} onClick={e => this.onClick(e, item)} style={param.style}> <Icon className="plus" /> <div className="name">{item.name}</div> </div> @@ -86,8 +86,8 @@ const MenuDataviewObjectList = observer(class MenuDataviewObjectList extends Rea id={item.id} object={item} name={name} - onMouseEnter={(e: any) => { this.onOver(e, item); }} - onClick={(e: any) => { this.onClick(e, item); }} + onMouseEnter={e => this.onOver(e, item)} + onClick={e => this.onClick(e, item)} caption={type ? type.name : undefined} style={param.style} /> @@ -287,7 +287,7 @@ const MenuDataviewObjectList = observer(class MenuDataviewObjectList extends Rea }; this.items = this.items.concat((message.records || []).map((it: any) => { - it.name = String(it.name || UtilObject.defaultName('Page')); + it.name = String(it.name || translate('defaultNamePage')); return it; })); diff --git a/src/ts/component/menu/dataview/object/values.tsx b/src/ts/component/menu/dataview/object/values.tsx index 7d1491b83f..5d43fd76f2 100644 --- a/src/ts/component/menu/dataview/object/values.tsx +++ b/src/ts/component/menu/dataview/object/values.tsx @@ -46,15 +46,15 @@ const MenuObjectValues = observer(class MenuObjectValues extends React.Component <div id={'item-' + item.id} className={cn.join(' ')} - onMouseEnter={(e: any) => { this.onOver(e, item); }} + onMouseEnter={e => this.onOver(e, item)} style={item.style} > <Handle /> - <span className="clickable" onClick={(e: any) => { this.onClick(e, item); }}> + <span className="clickable" onClick={e => this.onClick(e, item)}> <IconObject object={item} /> <ObjectName object={item} /> </span> - <Icon className="delete" onClick={(e: any) => { this.onRemove(e, item); }} /> + <Icon className="delete" onClick={e => this.onRemove(e, item)} /> </div> ); }); @@ -63,8 +63,8 @@ const MenuObjectValues = observer(class MenuObjectValues extends React.Component <div id="item-add" className="item add" - onMouseEnter={(e: any) => { this.onOver(e, item); }} - onClick={(e: any) => { this.onClick(e, item); }} + onMouseEnter={e => this.onOver(e, item)} + onClick={e => this.onClick(e, item)} style={item.style} > <Icon className="plus" /> diff --git a/src/ts/component/menu/dataview/option/list.tsx b/src/ts/component/menu/dataview/option/list.tsx index 4e4a4bfe4e..bd374799ac 100644 --- a/src/ts/component/menu/dataview/option/list.tsx +++ b/src/ts/component/menu/dataview/option/list.tsx @@ -186,7 +186,7 @@ const MenuOptionList = observer(class MenuOptionList extends React.Component<I.M rebind () { this.unbind(); $(window).on('keydown.menu', e => this.onKeyDown(e)); - $(`#${this.props.getId()}`).on('click', () => { menuStore.close('dataviewOptionEdit'); }); + $(`#${this.props.getId()}`).on('click', () => menuStore.close('dataviewOptionEdit')); window.setTimeout(() => this.props.setActive(), 15); }; @@ -316,7 +316,7 @@ const MenuOptionList = observer(class MenuOptionList extends React.Component<I.M this.onFilterChange(''); this.onValueAdd(message.objectId); - window.setTimeout(() => { this.resize(); }, 50); + window.setTimeout(() => this.resize(), 50); }); }; @@ -364,6 +364,16 @@ const MenuOptionList = observer(class MenuOptionList extends React.Component<I.M items = items.filter(filterMapper); }; + items.sort((c1, c2) => { + const isSelected1 = value.includes(c1.id); + const isSelected2 = value.includes(c2.id); + + if (isSelected1 && !isSelected2) return -1; + if (!isSelected1 && isSelected2) return 1; + + return 0; + }); + if (data.filter) { const filter = new RegExp(UtilCommon.regexEscape(data.filter), 'gi'); diff --git a/src/ts/component/menu/dataview/relation/edit.tsx b/src/ts/component/menu/dataview/relation/edit.tsx index 57549f18d2..f6712213b0 100644 --- a/src/ts/component/menu/dataview/relation/edit.tsx +++ b/src/ts/component/menu/dataview/relation/edit.tsx @@ -149,7 +149,7 @@ const MenuRelationEdit = observer(class MenuRelationEdit extends React.Component <MenuItemVertical key={c} {...action} - onClick={(e: any) => { this.onClick(e, action); }} + onClick={e => this.onClick(e, action)} onMouseEnter={this.menuClose} /> ))} diff --git a/src/ts/component/menu/dataview/relation/list.tsx b/src/ts/component/menu/dataview/relation/list.tsx index a9fd3d7b63..9a13a7fc6f 100644 --- a/src/ts/component/menu/dataview/relation/list.tsx +++ b/src/ts/component/menu/dataview/relation/list.tsx @@ -62,7 +62,7 @@ const MenuRelationList = observer(class MenuRelationList extends React.Component <div id={'item-' + item.relationKey} className={cn.join(' ')} - onMouseEnter={(e: any) => { this.onMouseEnter(e, item); }} + onMouseEnter={e => this.onMouseEnter(e, item)} style={item.style} > {allowedView ? <Handle /> : ''} @@ -153,7 +153,7 @@ const MenuRelationList = observer(class MenuRelationList extends React.Component className="item add" onClick={this.onAdd} onMouseEnter={() => { this.props.setHover({ id: 'add' }); }} - onMouseLeave={() => { this.props.setHover(); }} + onMouseLeave={() => this.props.setHover()} > <Icon className="plus" /> <div className="name">{translate('menuDataviewRelationListAddRelation')}</div> diff --git a/src/ts/component/menu/dataview/sort.tsx b/src/ts/component/menu/dataview/sort.tsx index f609880712..c5b52a0ecb 100644 --- a/src/ts/component/menu/dataview/sort.tsx +++ b/src/ts/component/menu/dataview/sort.tsx @@ -61,7 +61,7 @@ const MenuSort = observer(class MenuSort extends React.Component<I.Menu> { <div id={'item-' + item.id} className={[ 'item', (!allowedView ? 'isReadonly' : '') ].join(' ')} - onMouseEnter={(e: any) => { this.onOver(e, item); }} + onMouseEnter={e => this.onOver(e, item)} style={item.style} > {allowedView ? <Handle /> : ''} @@ -71,7 +71,7 @@ const MenuSort = observer(class MenuSort extends React.Component<I.Menu> { id={[ 'filter', 'relation', item.id ].join('-')} options={relationOptions} value={item.relationKey} - onChange={(v: string) => { this.onChange(item.id, 'relationKey', v); }} + onChange={v => this.onChange(item.id, 'relationKey', v)} /> <Select @@ -79,13 +79,13 @@ const MenuSort = observer(class MenuSort extends React.Component<I.Menu> { className="grey" options={typeOptions} value={item.type} - onChange={(v: string) => { this.onChange(item.id, 'type', v); }} + onChange={v => this.onChange(item.id, 'type', v)} /> </div> {allowedView ? ( <div className="buttons"> - <Icon className="more" onClick={(e: any) => { this.onClick(e, item); }} /> - <Icon className="delete" onClick={(e: any) => { this.onRemove(e, item); }} /> + <Icon className="more" onClick={e => this.onClick(e, item)} /> + <Icon className="delete" onClick={e => this.onRemove(e, item)} /> </div> ) : ''} </div> @@ -172,7 +172,7 @@ const MenuSort = observer(class MenuSort extends React.Component<I.Menu> { className="item add" onClick={this.onAdd} onMouseEnter={() => { this.props.setHover({ id: 'add' }); }} - onMouseLeave={() => { this.props.setHover(); }} + onMouseLeave={() => this.props.setHover()} > <Icon className="plus" /> <div className="name">{translate('menuDataviewSortNewSort')}</div> @@ -213,7 +213,7 @@ const MenuSort = observer(class MenuSort extends React.Component<I.Menu> { rebind () { this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; diff --git a/src/ts/component/menu/dataview/source.tsx b/src/ts/component/menu/dataview/source.tsx index 9f471681db..2b6fbae506 100644 --- a/src/ts/component/menu/dataview/source.tsx +++ b/src/ts/component/menu/dataview/source.tsx @@ -87,7 +87,7 @@ const MenuSource = observer(class MenuSource extends React.Component<I.Menu> { rebind () { this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; diff --git a/src/ts/component/menu/dataview/view/layout.tsx b/src/ts/component/menu/dataview/view/layout.tsx index 9980a632c3..d1069fd705 100644 --- a/src/ts/component/menu/dataview/view/layout.tsx +++ b/src/ts/component/menu/dataview/view/layout.tsx @@ -36,7 +36,7 @@ const MenuViewLayout = observer(class MenuViewLayout extends React.Component<I.M const Layout = (item: any) => ( <div className={[ 'layout', type == item.id ? 'active' : '' ].join(' ')} - onClick={(e: any) => { this.onClick(e, item); }} + onClick={e => this.onClick(e, item)} onMouseEnter={this.menuClose} > <Icon className={item.icon} /> @@ -55,9 +55,9 @@ const MenuViewLayout = observer(class MenuViewLayout extends React.Component<I.M icon={action.icon} readonly={readonly} checkbox={(type == action.id) && (item.id == 'type')} - onMouseEnter={(e: any) => { this.onMouseEnter(e, action); }} - onMouseLeave={(e: any) => { this.onMouseLeave(e, action); }} - onClick={(e: any) => { this.onClick(e, action); }} + onMouseEnter={e => this.onMouseEnter(e, action)} + onMouseLeave={e => this.onMouseLeave(e, action)} + onClick={e => this.onClick(e, action)} /> ))} </div> diff --git a/src/ts/component/menu/dataview/view/list.tsx b/src/ts/component/menu/dataview/view/list.tsx index 650b5cb332..bbfc717f1d 100644 --- a/src/ts/component/menu/dataview/view/list.tsx +++ b/src/ts/component/menu/dataview/view/list.tsx @@ -46,16 +46,16 @@ const MenuViewList = observer(class MenuViewList extends React.Component<I.Menu> <div id={'item-' + item.id} className="item" - onClick={(e: any) => { this.onClick(e, item); }} - onMouseEnter={(e: any) => { this.onOver(e, item); }} + onClick={e => this.onClick(e, item)} + onMouseEnter={e => this.onOver(e, item)} style={item.style} > {allowed ? <Handle /> : ''} - <div className="clickable" onClick={(e: any) => { loadData(item.id, 0); }}> + <div className="clickable" onClick={e => loadData(item.id, 0)}> <div className="name">{item.name}</div> </div> <div className="buttons"> - <Icon className="more" onClick={(e: any) => { this.onViewContext(e, item); }} /> + <Icon className="more" onClick={e => this.onViewContext(e, item)} /> </div> </div> )); @@ -146,7 +146,7 @@ const MenuViewList = observer(class MenuViewList extends React.Component<I.Menu> className="item add" onClick={this.onAdd} onMouseEnter={() => { this.props.setHover({ id: 'add' }); }} - onMouseLeave={() => { this.props.setHover(); }} + onMouseLeave={() => this.props.setHover()} > <Icon className="plus" /> <div className="name">{translate('menuDataviewViewListAddView')}</div> @@ -189,7 +189,7 @@ const MenuViewList = observer(class MenuViewList extends React.Component<I.Menu> rebind () { this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; @@ -202,7 +202,7 @@ const MenuViewList = observer(class MenuViewList extends React.Component<I.Menu> const { data } = param; const { rootId, blockId } = data; const items: any[] = UtilCommon.objectCopy(dbStore.getViews(rootId, blockId)).map(it => ({ - ...it, name: it.name || UtilObject.defaultName('Page'), + ...it, name: it.name || translate('defaultNamePage'), })); items.unshift({ id: 'label', name: translate('menuDataviewViewListViews'), isSection: true }); diff --git a/src/ts/component/menu/dataview/view/settings.tsx b/src/ts/component/menu/dataview/view/settings.tsx index a60902b86e..c2e0744249 100644 --- a/src/ts/component/menu/dataview/view/settings.tsx +++ b/src/ts/component/menu/dataview/view/settings.tsx @@ -43,9 +43,9 @@ const MenuViewSettings = observer(class MenuViewSettings extends React.Component icon={action.icon} readonly={readonly} checkbox={(type == action.id) && (item.id == 'type')} - onMouseEnter={(e: any) => { this.onMouseEnter(e, action); }} - onMouseLeave={(e: any) => { this.onMouseLeave(e, action); }} - onClick={(e: any) => { this.onClick(e, action); }} + onMouseEnter={e => this.onMouseEnter(e, action)} + onMouseLeave={e => this.onMouseLeave(e, action)} + onClick={e => this.onClick(e, action)} /> ))} </div> diff --git a/src/ts/component/menu/graph/settings.tsx b/src/ts/component/menu/graph/settings.tsx index a9daecc5cc..7fabff6bb7 100644 --- a/src/ts/component/menu/graph/settings.tsx +++ b/src/ts/component/menu/graph/settings.tsx @@ -27,8 +27,8 @@ const MenuGraphSettings = observer(class MenuGraphSettings extends React.Compone <MenuItemVertical key={i} {...item} - onMouseEnter={(e: any) => { this.onMouseEnter(e, item); }} - onClick={(e: any) => { this.onClick(e, item); }} + onMouseEnter={e => this.onMouseEnter(e, item)} + onClick={e => this.onClick(e, item)} /> ); })} @@ -60,7 +60,7 @@ const MenuGraphSettings = observer(class MenuGraphSettings extends React.Compone rebind () { this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; diff --git a/src/ts/component/menu/help.tsx b/src/ts/component/menu/help.tsx index 4985854112..b385031e99 100644 --- a/src/ts/component/menu/help.tsx +++ b/src/ts/component/menu/help.tsx @@ -33,8 +33,8 @@ class MenuHelp extends React.Component<I.Menu> { <MenuItemVertical key={i} {...item} - onMouseEnter={(e: any) => { this.onMouseEnter(e, item); }} - onClick={(e: any) => { this.onClick(e, item); }} + onMouseEnter={e => this.onMouseEnter(e, item)} + onClick={e => this.onClick(e, item)} /> ); }; diff --git a/src/ts/component/menu/index.tsx b/src/ts/component/menu/index.tsx index 311d0bb928..4b0a1fcbff 100644 --- a/src/ts/component/menu/index.tsx +++ b/src/ts/component/menu/index.tsx @@ -248,7 +248,7 @@ const Menu = observer(class Menu extends React.Component<I.Menu, State> { }; const Tab = (item: any) => ( - <div className={[ 'tab', (item.id == tab ? 'active' : '') ].join(' ')} onClick={(e: any) => { this.onTab(item.id); }}> + <div className={[ 'tab', (item.id == tab ? 'active' : '') ].join(' ')} onClick={e => this.onTab(item.id)}> {item.name} </div> ); @@ -601,7 +601,7 @@ const Menu = observer(class Menu extends React.Component<I.Menu, State> { }); window.clearTimeout(this.timeoutPoly); - this.timeoutPoly = window.setTimeout(() => { this.poly.hide(); }, 500); + this.timeoutPoly = window.setTimeout(() => this.poly.hide(), 500); }; // Arrow positioning @@ -704,7 +704,7 @@ const Menu = observer(class Menu extends React.Component<I.Menu, State> { if (refInput) { if (refInput.isFocused && (this.ref.n < 0)) { - keyboard.shortcut('arrowleft, arrowright', e, () => { ret = true; }); + keyboard.shortcut('arrowleft, arrowright', e, () => ret = true); keyboard.shortcut('arrowdown', e, () => { refInput.blur(); diff --git a/src/ts/component/menu/item/relationView.tsx b/src/ts/component/menu/item/relationView.tsx index 2507bdbe59..7d6f247a1f 100644 --- a/src/ts/component/menu/item/relationView.tsx +++ b/src/ts/component/menu/item/relationView.tsx @@ -91,8 +91,7 @@ const MenuItemRelationView = observer(class MenuItemRelationView extends React.C subId={rootId} block={block} relationKey={relationKey} - getRecord={() => object} - recordId="" + record={object} viewType={I.ViewType.Grid} idPrefix={PREFIX} menuClassName="fromBlock" diff --git a/src/ts/component/menu/quickCapture.tsx b/src/ts/component/menu/quickCapture.tsx index 4e2a0a02a9..038cca08ae 100644 --- a/src/ts/component/menu/quickCapture.tsx +++ b/src/ts/component/menu/quickCapture.tsx @@ -13,6 +13,12 @@ interface State { const LIMIT_PINNED = 5; +enum SystemIds { + Add = 'add', + Search = 'search', + Clipboard = 'clipboard', +}; + class MenuQuickCapture extends React.Component<I.Menu, State> { n = 0; @@ -22,7 +28,9 @@ class MenuQuickCapture extends React.Component<I.Menu, State> { filter = ''; refFilter: any = null; timeoutFilter = 0; + intervalClipboard = 0; items: any[] = []; + clipboardItems: any[] = []; offset = 0; state = { isExpanded: false, @@ -88,13 +96,13 @@ class MenuQuickCapture extends React.Component<I.Menu, State> { cn.push('isDefault'); }; - if ([ 'search', 'add' ].includes(item.itemId)) { + if ([ SystemIds.Search, SystemIds.Add, SystemIds.Clipboard ].includes(item.itemId)) { icon = <Icon className={item.itemId} />; } else { icon = <IconObject object={item} />; }; - if (item.itemId != 'search') { + if (![ SystemIds.Search, SystemIds.Clipboard ].includes(item.itemId)) { name = <ObjectName object={item} />; }; @@ -103,7 +111,7 @@ class MenuQuickCapture extends React.Component<I.Menu, State> { id={`item-${item.id}`} className={cn.join(' ')} onClick={e => this.onClick(e, item)} - onContextMenu={e => this.onContextMneu(e, item)} + onContextMenu={e => this.onContextMenu(e, item)} onMouseEnter={e => this.onOver(e, item)} onMouseLeave={e => this.onOut(e, item)} > @@ -139,6 +147,17 @@ class MenuQuickCapture extends React.Component<I.Menu, State> { this._isMounted = true; this.load(true); this.rebind(); + + const check = async () => { + const items = await this.getClipboardData(); + if (this.clipboardItems !== items) { + this.clipboardItems = items; + this.forceUpdate(); + }; + }; + + check(); + this.intervalClipboard = window.setInterval(check, 1000); }; componentDidUpdate () { @@ -159,6 +178,8 @@ class MenuQuickCapture extends React.Component<I.Menu, State> { componentWillUnmount () { this._isMounted = false; this.unbind(); + + window.clearInterval(this.intervalClipboard); }; rebind () { @@ -236,7 +257,7 @@ class MenuQuickCapture extends React.Component<I.Menu, State> { if (this.filter) { objects.push({ - id: 'add', + id: SystemIds.Add, name: UtilCommon.sprintf(translate('menuTypeSuggestCreateType'), this.filter), }); }; @@ -273,13 +294,23 @@ class MenuQuickCapture extends React.Component<I.Menu, State> { }); items.unshift({ - id: 'search', + id: SystemIds.Search, icon: 'search', name: '', tooltip: translate('menuQuickCaptureTooltipSearch'), caption: '0', }); + if (this.clipboardItems && this.clipboardItems.length) { + items.push({ + id: SystemIds.Clipboard, + icon: 'clipboard', + name: '', + tooltip: translate('menuQuickCaptureTooltipSearch'), + caption: '0', + }); + }; + sections.push({ id: 'collapsed', children: items }); }; @@ -313,6 +344,7 @@ class MenuQuickCapture extends React.Component<I.Menu, State> { const { setHover, onKeyDown } = this.props; const items = this.getItems(); const length = items.length; + const cmd = keyboard.cmdKey(); keyboard.disableMouse(true); @@ -338,7 +370,7 @@ class MenuQuickCapture extends React.Component<I.Menu, State> { }); if (!isExpanded) { - keyboard.shortcut('0, 1, 2, 3, 4, 5, 6, 7, 8, 9', e, (pressed) => { + keyboard.shortcut('0, 1, 2, 3, 4, 5, 6, 7, 8, 9', e, (pressed: string) => { e.preventDefault(); const n = Number(pressed) || 0; @@ -349,13 +381,25 @@ class MenuQuickCapture extends React.Component<I.Menu, State> { }); }; + keyboard.shortcut(`${cmd}+v`, e, () => { + e.preventDefault(); + + this.onPaste(); + ret = true; + }); + if (!ret) { onKeyDown(e); }; }; onClick (e: any, item: any) { - if (item.itemId == 'search') { + if (item.itemId == SystemIds.Clipboard) { + this.onPaste(); + return; + }; + + if (item.itemId == SystemIds.Search) { this.onExpand(); return; }; @@ -376,7 +420,7 @@ class MenuQuickCapture extends React.Component<I.Menu, State> { }); }; - if (item.itemId == 'add') { + if (item.itemId == SystemIds.Add) { C.ObjectCreateObjectType({ name: this.filter }, [], commonStore.space, (message: any) => { if (!message.error.code) { cb(message.details); @@ -394,7 +438,7 @@ class MenuQuickCapture extends React.Component<I.Menu, State> { close(); }; - onContextMneu (e: any, item: any) { + onContextMenu (e: any, item: any) { e.preventDefault(); e.stopPropagation(); @@ -402,7 +446,7 @@ class MenuQuickCapture extends React.Component<I.Menu, State> { return; }; - if ([ 'add', 'search' ].includes(item.itemId)) { + if ([ SystemIds.Add, SystemIds.Search, SystemIds.Clipboard ].includes(item.itemId)) { return; }; @@ -462,7 +506,6 @@ class MenuQuickCapture extends React.Component<I.Menu, State> { }; break; }; - }; } } @@ -511,6 +554,62 @@ class MenuQuickCapture extends React.Component<I.Menu, State> { $('body').removeClass('grab'); }; + async onPaste () { + const type = dbStore.getTypeById(commonStore.type); + const data = await this.getClipboardData(); + + data.forEach(async item => { + let text = ''; + let html = ''; + + if (item.types.includes('text/plain')) { + const textBlob = await item.getType('text/plain'); + + if (textBlob) { + text = await textBlob.text(); + }; + }; + + if (item.types.includes('text/html')) { + const htmlBlob = await item.getType('text/html'); + + if (htmlBlob) { + html = await htmlBlob.text(); + }; + }; + + if (!text && !html) { + return; + }; + + const url = UtilCommon.matchUrl(text); + + if (url) { + C.ObjectCreateBookmark({ source: url }, commonStore.space, (message: any) => { + UtilObject.openAuto(message.details); + }); + } else { + C.ObjectCreate({}, [], '', type?.uniqueKey, commonStore.space, (message: any) => { + if (message.error.code) { + return; + }; + + const object = message.details; + + C.BlockPaste (object.id, '', { from: 0, to: 0 }, [], false, { html, text }, () => { + UtilObject.openAuto(object); + }); + }); + }; + }); + }; + + async getClipboardData () { + let ret = []; + try { ret = await navigator.clipboard.read(); } catch (e) { /**/ }; + return ret; + }; + beforePosition () { const node = $(this.node); diff --git a/src/ts/component/menu/relation/suggest.tsx b/src/ts/component/menu/relation/suggest.tsx index ca11045453..66ce6defe1 100644 --- a/src/ts/component/menu/relation/suggest.tsx +++ b/src/ts/component/menu/relation/suggest.tsx @@ -60,8 +60,8 @@ const MenuRelationSuggest = observer(class MenuRelationSuggest extends React.Com <div id="item-add" className="item add" - onMouseEnter={(e: any) => { this.onMouseEnter(e, item); }} - onClick={(e: any) => { this.onClick(e, item); }} + onMouseEnter={e => this.onMouseEnter(e, item)} + onClick={e => this.onClick(e, item)} style={param.style} > <Icon className="plus" /> @@ -84,8 +84,8 @@ const MenuRelationSuggest = observer(class MenuRelationSuggest extends React.Com {...item} className={item.isHidden ? 'isHidden' : ''} style={param.style} - onMouseEnter={(e: any) => { this.onMouseEnter(e, item); }} - onClick={(e: any) => { this.onClick(e, item); }} + onMouseEnter={e => this.onMouseEnter(e, item)} + onClick={e => this.onClick(e, item)} /> ); }; @@ -451,7 +451,7 @@ const MenuRelationSuggest = observer(class MenuRelationSuggest extends React.Com analytics.event('AddExistingRelation', { format: item.format, type: ref, objectType: object.type }); }; } else { - Action.install(item, true, (message: any) => { cb(message.details); }); + Action.install(item, true, message => cb(message.details)); }; }; }; diff --git a/src/ts/component/menu/search/object.tsx b/src/ts/component/menu/search/object.tsx index 06d72ff57d..e488bf2af4 100644 --- a/src/ts/component/menu/search/object.tsx +++ b/src/ts/component/menu/search/object.tsx @@ -226,7 +226,7 @@ const MenuSearchObject = observer(class MenuSearchObject extends React.Component rebind () { this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; @@ -455,7 +455,7 @@ const MenuSearchObject = observer(class MenuSearchObject extends React.Component close(); } else { UtilObject.create('', '', { name: filter, type: commonStore.type, ...details }, I.BlockPosition.Bottom, '', {}, [ I.ObjectFlag.SelectType, I.ObjectFlag.SelectTemplate ], (message: any) => { - UtilObject.getById(message.targetId, (object: any) => { process(object, true); }); + UtilObject.getById(message.targetId, object => process(object, true)); close(); }); }; diff --git a/src/ts/component/menu/search/text.tsx b/src/ts/component/menu/search/text.tsx index f3d3874360..4b20ee385c 100644 --- a/src/ts/component/menu/search/text.tsx +++ b/src/ts/component/menu/search/text.tsx @@ -8,7 +8,7 @@ import Constant from 'json/constant.json'; const SKIP = [ 'span', 'div', 'name', 'markupMention', 'markupColor', 'markupBgcolor', 'markupStrike', 'markupCode', 'markupItalic', 'markupBold', 'markupUnderline', 'markupLink', 'markupEmoji', 'markupObject', -]; +].map(tag => tag.toLowerCase()); class MenuSearchText extends React.Component<I.Menu> { @@ -49,9 +49,9 @@ class MenuSearchText extends React.Component<I.Menu> { <div className="buttons"> <div id="switcher" className="switcher"> - <Icon className="arrow left" onClick={() => { this.onArrow(-1); }} /> + <Icon className="arrow left" onClick={() => this.onArrow(-1)} /> <div id="cnt" className="cnt" /> - <Icon className="arrow right" onClick={() => { this.onArrow(1); }} /> + <Icon className="arrow right" onClick={() => this.onArrow(1)} /> </div> <div className="line" /> diff --git a/src/ts/component/menu/select.tsx b/src/ts/component/menu/select.tsx index eb3d87fbf7..9a783c4731 100644 --- a/src/ts/component/menu/select.tsx +++ b/src/ts/component/menu/select.tsx @@ -191,7 +191,7 @@ const MenuSelect = observer(class MenuSelect extends React.Component<I.Menu> { }; if (active && !active.isInitial) { - window.setTimeout(() => { setActive(active, true); }, 15); + window.setTimeout(() => setActive(active, true), 15); }; this.resize(); diff --git a/src/ts/component/menu/smile.tsx b/src/ts/component/menu/smile.tsx index 3554d87a6e..87c6e22fef 100644 --- a/src/ts/component/menu/smile.tsx +++ b/src/ts/component/menu/smile.tsx @@ -602,9 +602,9 @@ class MenuSmile extends React.Component<I.Menu, State> { close(); Action.openFile(Constant.fileExtension.cover, paths => { - C.FileUpload(commonStore.space, '', paths[0], I.FileType.Image, (message: any) => { + C.FileUpload(commonStore.space, '', paths[0], I.FileType.Image, {}, (message: any) => { if (!message.error.code && onUpload) { - onUpload(message.hash); + onUpload(message.objectId); }; }); }); @@ -840,13 +840,13 @@ class MenuSmile extends React.Component<I.Menu, State> { zone.removeClass('isDraggingOver'); this.setState({ isLoading: true }); - C.FileUpload(commonStore.space, '', file, I.FileType.Image, (message: any) => { + C.FileUpload(commonStore.space, '', file, I.FileType.Image, {}, (message: any) => { this.setState({ isLoading: false }); preventCommonDrop(false); if (!message.error.code) { - onUpload(message.hash); + onUpload(message.objectId); }; close(); diff --git a/src/ts/component/menu/type/suggest.tsx b/src/ts/component/menu/type/suggest.tsx index f60639f7c1..7d65452541 100644 --- a/src/ts/component/menu/type/suggest.tsx +++ b/src/ts/component/menu/type/suggest.tsx @@ -60,8 +60,8 @@ const MenuTypeSuggest = observer(class MenuTypeSuggest extends React.Component<I <div id="item-add" className="item add" - onMouseEnter={(e: any) => { this.onMouseEnter(e, item); }} - onClick={(e: any) => { this.onClick(e, item); }} + onMouseEnter={e => this.onMouseEnter(e, item)} + onClick={e => this.onClick(e, item)} style={param.style} > <Icon className="plus" /> @@ -84,8 +84,8 @@ const MenuTypeSuggest = observer(class MenuTypeSuggest extends React.Component<I {...item} className={item.isHidden ? 'isHidden' : ''} style={param.style} - onMouseEnter={(e: any) => { this.onMouseEnter(e, item); }} - onClick={(e: any) => { this.onClick(e, item); }} + onMouseEnter={e => this.onMouseEnter(e, item)} + onClick={e => this.onClick(e, item)} /> ); }; @@ -193,7 +193,7 @@ const MenuTypeSuggest = observer(class MenuTypeSuggest extends React.Component<I rebind () { this.unbind(); - $(window).on('keydown.menu', (e: any) => { this.props.onKeyDown(e); }); + $(window).on('keydown.menu', e => this.props.onKeyDown(e)); window.setTimeout(() => this.props.setActive(), 15); }; @@ -450,7 +450,7 @@ const MenuTypeSuggest = observer(class MenuTypeSuggest extends React.Component<I if (item.isInstalled || noInstall) { cb(item); } else { - Action.install(item, true, (message: any) => { cb(message.details); }); + Action.install(item, true, message => cb(message.details)); }; }; }; diff --git a/src/ts/component/page/auth/onboard.tsx b/src/ts/component/page/auth/onboard.tsx index 72d7dd18ce..60690ec298 100644 --- a/src/ts/component/page/auth/onboard.tsx +++ b/src/ts/component/page/auth/onboard.tsx @@ -168,7 +168,7 @@ const PageAuthOnboard = observer(class PageAuthOnboard extends React.Component<I const tooltipPhrase = node.find('#tooltipPhrase'); this.unbind(); - $(window).on('keydown.onboarding', (e) => this.onKeyDown(e)); + $(window).on('keydown.onboarding', e => this.onKeyDown(e)); tooltipPhrase.off('click').on('click', () => this.onPhraseTooltip()); }; diff --git a/src/ts/component/page/auth/pinCheck.tsx b/src/ts/component/page/auth/pinCheck.tsx index c5c9e3a66a..6360a2fabf 100644 --- a/src/ts/component/page/auth/pinCheck.tsx +++ b/src/ts/component/page/auth/pinCheck.tsx @@ -56,7 +56,7 @@ const PageAuthPinCheck = observer(class PageAuthPinCheck extends React.Component rebind () { this.unbind(); - $(window).on('focus.pin', () => { this.ref.focus(); }); + $(window).on('focus.pin', () => this.ref.focus()); }; onError () { diff --git a/src/ts/component/page/elements/children.tsx b/src/ts/component/page/elements/children.tsx index a9b2f4525e..4c2b47111b 100644 --- a/src/ts/component/page/elements/children.tsx +++ b/src/ts/component/page/elements/children.tsx @@ -15,7 +15,7 @@ const Children = observer(class Children extends React.Component<I.BlockComponen return ( <React.Fragment> {children.map((block: I.Block, i: number) => ( - <Block key={`block-${block.id}`} {...this.props} block={block} index={i} /> + <Block key={`block-${block.id}`} {...this.props} block={block} index={i} className={i == 0 ? 'isFirst' : ''} /> ))} </React.Fragment> ); diff --git a/src/ts/component/page/elements/head/controlButtons.tsx b/src/ts/component/page/elements/head/controlButtons.tsx index bf0867e65a..90a9aabb82 100644 --- a/src/ts/component/page/elements/head/controlButtons.tsx +++ b/src/ts/component/page/elements/head/controlButtons.tsx @@ -16,7 +16,7 @@ interface Props { onLayout?: (e: any) => void; onEdit?: (e: any) => void; onUploadStart?: (e: any) => void; - onUpload?: (type: I.CoverType, hash: string) => void; + onUpload?: (type: I.CoverType, objectId: string) => void; }; const ControlButtons = observer(class ControlButtons extends React.Component<Props> { @@ -151,7 +151,7 @@ const ControlButtons = observer(class ControlButtons extends React.Component<Pro onOpen: onCoverOpen, onClose: () => { window.clearTimeout(this.timeout); - this.timeout = window.setTimeout(() => { onCoverClose(); }, Constant.delay.menu); + this.timeout = window.setTimeout(() => onCoverClose(), Constant.delay.menu); }, data: { options: options, diff --git a/src/ts/component/page/elements/head/controls.tsx b/src/ts/component/page/elements/head/controls.tsx index 7d22b71592..32671853ad 100644 --- a/src/ts/component/page/elements/head/controls.tsx +++ b/src/ts/component/page/elements/head/controls.tsx @@ -98,6 +98,10 @@ const Controls = observer(class Controls extends React.Component<Props, State> { onIcon (e: any) { const { rootId } = this.props; const root = blockStore.getLeaf(rootId, rootId); + + if (!root) { + return; + }; focus.clear(true); root.isObjectHuman() ? this.onIconUser() : this.onIconPage(); @@ -127,8 +131,8 @@ const Controls = observer(class Controls extends React.Component<Props, State> { menuStore.update('smile', { element: `#block-icon-${rootId}` }); }); }, - onUpload (hash: string) { - UtilObject.setIcon(rootId, '', hash, () => { + onUpload (objectId: string) { + UtilObject.setIcon(rootId, '', objectId, () => { menuStore.update('smile', { element: `#block-icon-${rootId}` }); }); }, @@ -140,9 +144,9 @@ const Controls = observer(class Controls extends React.Component<Props, State> { const { rootId } = this.props; Action.openFile(Constant.fileExtension.cover, paths => { - C.FileUpload(commonStore.space, '', paths[0], I.FileType.Image, (message: any) => { - if (message.hash) { - UtilObject.setIcon(rootId, '', message.hash); + C.FileUpload(commonStore.space, '', paths[0], I.FileType.Image, {}, (message: any) => { + if (message.objectId) { + UtilObject.setIcon(rootId, '', message.objectId); }; }); }); @@ -221,12 +225,12 @@ const Controls = observer(class Controls extends React.Component<Props, State> { preventCommonDrop(true); this.onUploadStart(); - C.FileUpload(commonStore.space, '', file, I.FileType.Image, (message: any) => { + C.FileUpload(commonStore.space, '', file, I.FileType.Image, {}, (message: any) => { this.setState({ loading: false }); preventCommonDrop(false); if (!message.error.code) { - this.onUpload(I.CoverType.Upload, message.hash); + this.onUpload(I.CoverType.Upload, message.objectId); }; }); }; @@ -235,10 +239,10 @@ const Controls = observer(class Controls extends React.Component<Props, State> { this.setState({ loading: true }); }; - onUpload (type: I.CoverType, hash: string) { + onUpload (type: I.CoverType, objectId: string) { const { rootId } = this.props; - UtilObject.setCover(rootId, type, hash, 0, -0.25, 0, () => { + UtilObject.setCover(rootId, type, objectId, 0, -0.25, 0, () => { this.setState({ loading: false }); }); }; diff --git a/src/ts/component/page/elements/head/simple.tsx b/src/ts/component/page/elements/head/simple.tsx index b2f213c5ff..0a78458303 100644 --- a/src/ts/component/page/elements/head/simple.tsx +++ b/src/ts/component/page/elements/head/simple.tsx @@ -7,7 +7,7 @@ import Constant from 'json/constant.json'; interface Props { rootId: string; - type: string; + placeholder?: string; onCreate?: () => void; }; @@ -22,6 +22,9 @@ const HeadSimple = observer(class Controls extends React.Component<Props> { refEditable: any = {}; node: any = null; timeout = 0; + public static defaultProps = { + placeholder: '', + }; constructor (props: Props) { super(props); @@ -33,13 +36,13 @@ const HeadSimple = observer(class Controls extends React.Component<Props> { }; render (): any { - const { rootId, type, onCreate } = this.props; + const { rootId, onCreate } = this.props; const check = UtilData.checkDetails(rootId); const object = detailStore.get(rootId, rootId, [ 'featuredRelations' ]); const featuredRelations = Relation.getArrayValue(object.featuredRelations); const allowDetails = blockStore.checkFlags(rootId, rootId, [ I.RestrictionObject.Details ]); const placeholder = { - title: UtilObject.defaultName(type), + title: this.props.placeholder, description: translate('placeholderBlockDescription'), }; @@ -52,17 +55,17 @@ const HeadSimple = observer(class Controls extends React.Component<Props> { const Editor = (item: any) => ( <Editable ref={ref => this.refEditable[item.id] = ref} - id={'editor-' + item.id} + id={`editor-${item.id}`} placeholder={placeholder[item.id]} readonly={!allowDetails} classNameWrap={item.className} classNameEditor={[ 'focusable', 'c' + item.id ].join(' ')} classNamePlaceholder={'c' + item.id} - onFocus={(e: any) => { this.onFocus(e, item); }} - onBlur={(e: any) => { this.onBlur(e, item); }} - onKeyDown={(e: any) => { this.onKeyDown(e, item); }} - onKeyUp={() => { this.onKeyUp(); }} - onSelect={(e: any) => { this.onSelectText(e, item); }} + onFocus={e => this.onFocus(e, item)} + onBlur={e => this.onBlur(e, item)} + onKeyDown={e => this.onKeyDown(e, item)} + onKeyUp={() => this.onKeyUp()} + onSelect={e => this.onSelectText(e, item)} onCompositionStart={this.onCompositionStart} /> ); @@ -141,24 +144,11 @@ const HeadSimple = observer(class Controls extends React.Component<Props> { componentDidMount () { this._isMounted = true; + this.init(); }; componentDidUpdate () { - const { focused } = focus.state; - const { rootId } = this.props; - const object = detailStore.get(rootId, rootId); - - this.setValue(); - - for (const item of EDITORS) { - this.placeholderCheck(item.blockId); - }; - - if (!focused && !object._empty_ && (object.name == UtilObject.defaultName('Page'))) { - focus.set('title', { from: 0, to: 0 }); - }; - - window.setTimeout(() => { focus.apply(); }, 10); + this.init(); }; componentWillUnmount () { @@ -168,6 +158,20 @@ const HeadSimple = observer(class Controls extends React.Component<Props> { window.clearTimeout(this.timeout); }; + init () { + const { focused } = focus.state; + const { rootId } = this.props; + const object = detailStore.get(rootId, rootId); + + this.setValue(); + + if (!focused && !object._empty_ && (object.name == translate('defaultNamePage'))) { + focus.set('title', { from: 0, to: 0 }); + }; + + window.setTimeout(() => focus.apply(), 10); + }; + onFocus (e: any, item: any) { keyboard.setFocus(true); this.placeholderCheck(item.id); @@ -184,9 +188,8 @@ const HeadSimple = observer(class Controls extends React.Component<Props> { UtilObject.setIcon(rootId, icon, ''); }; - onUpload (hash: string) { - const { rootId } = this.props; - UtilObject.setIcon(rootId, '', hash); + onUpload (objectId: string) { + UtilObject.setIcon(this.props.rootId, '', objectId); }; onKeyDown (e: any, item: any) { @@ -236,11 +239,12 @@ const HeadSimple = observer(class Controls extends React.Component<Props> { }; let text = String(object[item.relationKey] || ''); - if (text == UtilObject.defaultName('Page')) { + if (text == translate('defaultNamePage')) { text = ''; }; this.refEditable[item.blockId].setValue(text); + this.placeholderCheck(item.blockId); }; }; diff --git a/src/ts/component/page/main/graph.tsx b/src/ts/component/page/main/graph.tsx index 3b537456f5..40cbfc32e0 100644 --- a/src/ts/component/page/main/graph.tsx +++ b/src/ts/component/page/main/graph.tsx @@ -74,7 +74,7 @@ const PageMainGraph = observer(class PageMainGraph extends React.Component<I.Pag if (this.loading) { window.clearTimeout(this.timeoutLoading); - this.timeoutLoading = window.setTimeout(() => { this.setLoading(false); }, 100); + this.timeoutLoading = window.setTimeout(() => this.setLoading(false), 100); }; }; @@ -167,7 +167,7 @@ const PageMainGraph = observer(class PageMainGraph extends React.Component<I.Pag loader.show().css({ opacity: 1 }); } else { loader.css({ opacity: 0 }); - window.setTimeout(() => { loader.hide(); }, 200); + window.setTimeout(() => loader.hide(), 200); }; }; diff --git a/src/ts/component/page/main/history.tsx b/src/ts/component/page/main/history.tsx index c01cf65fce..8fba348552 100644 --- a/src/ts/component/page/main/history.tsx +++ b/src/ts/component/page/main/history.tsx @@ -322,7 +322,7 @@ const PageMainHistory = observer(class PageMainHistory extends React.Component<I children.css({ overflow: 'hidden', height: height }); window.setTimeout(() => { children.css({ height: 0 }); }, 15); - window.setTimeout(() => { children.hide(); }, 215); + window.setTimeout(() => children.hide(), 215); } else { item.addClass('expanded'); children.show(); diff --git a/src/ts/component/page/main/media.tsx b/src/ts/component/page/main/media.tsx index 364b155369..1384ba6154 100644 --- a/src/ts/component/page/main/media.tsx +++ b/src/ts/component/page/main/media.tsx @@ -1,12 +1,14 @@ import * as React from 'react'; import $ from 'jquery'; import { observer } from 'mobx-react'; -import { Header, Footer, Loader, Block, Button, IconObject, Deleted, ObjectName } from 'Component'; -import { I, M, C, UtilCommon, Action, Renderer, UtilObject, translate, UtilRouter } from 'Lib'; +import { Header, Footer, Loader, Block, Button, IconObject, Deleted } from 'Component'; +import { I, C, UtilCommon, Action, Renderer, UtilObject, translate, UtilRouter } from 'Lib'; import { blockStore, detailStore } from 'Store'; +import HeadSimple from 'Component/page/elements/head/simple'; import Errors from 'json/error.json'; interface State { + isLoading: boolean; isDeleted: boolean; }; @@ -15,12 +17,13 @@ const MAX_HEIGHT = 396; const PageMainMedia = observer(class PageMainMedia extends React.Component<I.PageComponent, State> { _isMounted = false; - node: any = null; + node = null; + refHeader = null; + refHead = null; id = ''; - refHeader: any = null; - loading = false; state = { + isLoading: false, isDeleted: false, }; @@ -32,19 +35,19 @@ const PageMainMedia = observer(class PageMainMedia extends React.Component<I.Pag }; render () { - const { isDeleted } = this.state; + const { isLoading, isDeleted } = this.state; const rootId = this.getRootId(); - const object = detailStore.get(rootId, rootId, [ 'heightInPixels' ]); + const object = detailStore.get(rootId, rootId, [ 'widthInPixels', 'heightInPixels' ]); + const allowed = blockStore.checkFlags(rootId, rootId, [ I.RestrictionObject.Details ]); - if (isDeleted || object.isDeleted) { + if (isDeleted) { return <Deleted {...this.props} />; }; - if (this.loading) { + if (isLoading) { return <Loader id="loader" />; }; - const featured: any = new M.Block({ id: rootId + '-featured', type: I.BlockType.Featured, childrenIds: [], fields: {}, content: {} }); const blocks = blockStore.getBlocks(rootId); const file = blocks.find(it => it.isFile()); const relations = blocks.filter(it => it.isRelation()); @@ -110,17 +113,7 @@ const PageMainMedia = observer(class PageMainMedia extends React.Component<I.Pag <div className="side right"> <div className="head"> - <ObjectName className="title" object={object} /> - <div className="descr">{object.description}</div> - - <Block - {...this.props} - key={featured.id} - rootId={rootId} - iconSize={20} - block={featured} - isSelectionDisabled={true} - /> + <HeadSimple ref={ref => this.refHead = ref} placeholder={translate('defaultNamePage')} rootId={rootId} /> <div className="buttons"> <Button text={translate('commonOpen')} color="blank" onClick={this.onOpen} /> @@ -135,7 +128,7 @@ const PageMainMedia = observer(class PageMainMedia extends React.Component<I.Pag key={item.id} rootId={rootId} block={item} - readonly={true} + readonly={!allowed} isSelectionDisabled={true} /> ))} @@ -143,9 +136,7 @@ const PageMainMedia = observer(class PageMainMedia extends React.Component<I.Pag </div> </React.Fragment> ) : ( - <div id="empty" className="empty"> - File not found - </div> + <div id="empty" className="empty">{translate('pageMainMediaNotFound')}</div> )} </div> @@ -180,8 +171,7 @@ const PageMainMedia = observer(class PageMainMedia extends React.Component<I.Pag this.close(); this.id = rootId; - this.loading = true; - this.forceUpdate(); + this.setState({ isLoading: true}); C.ObjectOpen(rootId, '', UtilRouter.getRouteSpaceId(), (message: any) => { if (message.error.code) { @@ -193,12 +183,21 @@ const PageMainMedia = observer(class PageMainMedia extends React.Component<I.Pag return; }; - this.loading = false; - this.forceUpdate(); + const object = detailStore.get(rootId, rootId, []); + if (object.isDeleted) { + this.setState({ isDeleted: true, isLoading: false }); + return; + }; if (this.refHeader) { this.refHeader.forceUpdate(); }; + + if (this.refHead) { + this.refHead.forceUpdate(); + }; + + this.setState({ isLoading: false }); }); }; @@ -253,9 +252,12 @@ const PageMainMedia = observer(class PageMainMedia extends React.Component<I.Pag const rootId = this.getRootId(); const blocks = blockStore.getBlocks(rootId); const block = blocks.find(it => it.isFile()); - const { content } = block; - C.FileDownload(content.hash, UtilCommon.getElectron().tmpPath, (message: any) => { + if (!block) { + return; + }; + + C.FileDownload(block.content.targetObjectId, UtilCommon.getElectron().tmpPath, (message: any) => { if (message.path) { Renderer.send('pathOpen', message.path); }; diff --git a/src/ts/component/page/main/navigation.tsx b/src/ts/component/page/main/navigation.tsx index 186be5589f..1d498f7806 100644 --- a/src/ts/component/page/main/navigation.tsx +++ b/src/ts/component/page/main/navigation.tsx @@ -117,7 +117,7 @@ const PageMainNavigation = observer(class PageMainNavigation extends React.Compo <div className="buttons"> <Button text={translate('popupNavigationOpen')} className="c36" onClick={e => this.onConfirm(e, item)} /> - {isPopup ? <Button text={translate('popupNavigationCancel')} className="c36" color="blank" onClick={() => { popupStore.close('page'); }} /> : ''} + {isPopup ? <Button text={translate('popupNavigationCancel')} className="c36" color="blank" onClick={() => popupStore.close('page')} /> : ''} </div> </div> ); diff --git a/src/ts/component/page/main/relation.tsx b/src/ts/component/page/main/relation.tsx index a8deb5bfa1..b5af4caa46 100644 --- a/src/ts/component/page/main/relation.tsx +++ b/src/ts/component/page/main/relation.tsx @@ -65,7 +65,7 @@ const PageMainRelation = observer(class PageMainRelation extends React.Component {isLoading ? <Loader id="loader" /> : ''} <div className="blocks wrapper"> - <HeadSimple ref={ref => this.refHead = ref} type="Relation" rootId={rootId} onCreate={this.onCreate} /> + <HeadSimple ref={ref => this.refHead = ref} placeholder={translate('defaultNameRelation')} rootId={rootId} onCreate={this.onCreate} /> <div className="section set"> <div className="title">{totalType} {UtilCommon.plural(totalType, translate('pluralObjectType'))}</div> diff --git a/src/ts/component/page/main/set.tsx b/src/ts/component/page/main/set.tsx index 77d3121174..7713476e78 100644 --- a/src/ts/component/page/main/set.tsx +++ b/src/ts/component/page/main/set.tsx @@ -3,7 +3,7 @@ import $ from 'jquery'; import raf from 'raf'; import { observer } from 'mobx-react'; import { Header, Footer, Loader, Block, Deleted } from 'Component'; -import { I, M, C, UtilData, UtilCommon, Action, UtilObject, keyboard, UtilRouter } from 'Lib'; +import { I, M, C, UtilData, UtilCommon, Action, UtilObject, keyboard, UtilRouter, translate } from 'Lib'; import { blockStore, detailStore, dbStore, menuStore } from 'Store'; import Controls from 'Component/page/elements/head/controls'; import HeadSimple from 'Component/page/elements/head/simple'; @@ -57,6 +57,7 @@ const PageMainSet = observer(class PageMainSet extends React.Component<I.PageCom const isCollection = object.layout == I.ObjectLayout.Collection; const children = blockStore.getChildren(rootId, rootId, it => it.isDataview()); const cover = new M.Block({ id: rootId + '-cover', type: I.BlockType.Cover, childrenIds: [], fields: {}, content: {} }); + const placeholder = isCollection ? translate('defaultNameCollection') : translate('defaultNameSet'); content = ( <React.Fragment> @@ -64,7 +65,7 @@ const PageMainSet = observer(class PageMainSet extends React.Component<I.PageCom <div className="blocks wrapper"> <Controls ref={ref => this.refControls = ref} key="editorControls" {...this.props} rootId={rootId} resize={this.resize} /> - <HeadSimple ref={ref => this.refHead = ref} type={isCollection ? 'Collection' : 'Set'} rootId={rootId} /> + <HeadSimple ref={ref => this.refHead = ref} placeholder={placeholder} rootId={rootId} /> {children.map((block: I.Block, i: number) => ( <Block diff --git a/src/ts/component/page/main/store.tsx b/src/ts/component/page/main/store.tsx index 5726523b32..99b5b2e45d 100644 --- a/src/ts/component/page/main/store.tsx +++ b/src/ts/component/page/main/store.tsx @@ -123,7 +123,7 @@ const PageMainStore = observer(class PageMainStore extends React.Component<I.Pag <div key={item.id} className={[ 'tab', (item.id == this.view ? 'active' : '') ].join(' ')} - onClick={(e: any) => { this.onView(item.id, true); }} + onClick={e => this.onView(item.id, true)} > {item.name} </div> @@ -150,14 +150,14 @@ const PageMainStore = observer(class PageMainStore extends React.Component<I.Pag if (sources.includes(item.id)) { icons.push({ className: 'check', tooltip: textInstalled }); } else { - icons.push({ className: 'plus', tooltip: textInstall, onClick: (e: any) => { this.onInstall(e, item); } }); + icons.push({ className: 'plus', tooltip: textInstall, onClick: e => this.onInstall(e, item) }); }; break; }; return ( <div className={cn.join(' ')}> - <div className="flex" onClick={(e: any) => { this.onClick(e, item); }}> + <div className="flex" onClick={e => this.onClick(e, item)}> <IconObject iconSize={iconSize} object={item} /> <div className="name">{item.name}</div> </div> diff --git a/src/ts/component/page/main/type.tsx b/src/ts/component/page/main/type.tsx index 0e2a0bbbae..d10d6a3d41 100644 --- a/src/ts/component/page/main/type.tsx +++ b/src/ts/component/page/main/type.tsx @@ -125,7 +125,7 @@ const PageMainType = observer(class PageMainType extends React.Component<I.PageC <div className={[ 'blocks', 'wrapper', check.className ].join(' ')}> <Controls ref={ref => this.refControls = ref} key="editorControls" {...this.props} rootId={rootId} resize={() => {}} /> - <HeadSimple ref={ref => this.refHead = ref} type="Type" rootId={rootId} onCreate={this.onCreate} /> + <HeadSimple ref={ref => this.refHead = ref} placeholder={translate('defaultNameType')} rootId={rootId} onCreate={this.onCreate} /> {showTemplates ? ( <div className="section template"> diff --git a/src/ts/component/popup/export.tsx b/src/ts/component/popup/export.tsx index 9e2482d41a..7fd880b101 100644 --- a/src/ts/component/popup/export.tsx +++ b/src/ts/component/popup/export.tsx @@ -16,16 +16,7 @@ const PopupExport = observer(class PopupExport extends React.Component<I.Popup> }; render() { - const { config } = commonStore; - const formats = [ - { id: I.ExportType.Markdown, name: 'Markdown' }, - { id: I.ExportType.Protobuf, name: 'Any-Block' }, - { id: I.ExportType.Pdf, name: 'PDF' }, - ]; - - if (config.experimental) { - formats.push({ id: I.ExportType.Html, name: 'HTML' }); - }; + const formats = this.getFormats(); const pageSize = [ { id: 'A3', name: 'A3'}, @@ -157,9 +148,15 @@ const PopupExport = observer(class PopupExport extends React.Component<I.Popup> init () { const { storageGet } = this.props; const options = storageGet(); + const formats = this.getFormats(); + + let format = Number(options.format); + if (!formats.map(it => it.id).includes(format)) { + format = formats[0].id; + }; this.data = { - format: Number(options.format) || I.ExportType.Markdown, + format, zip: Boolean(options.zip), nested: Boolean(options.nested), files: Boolean(options.files), @@ -171,6 +168,20 @@ const PopupExport = observer(class PopupExport extends React.Component<I.Popup> }; }; + getFormats () { + const { param } = this.props; + const { data } = param; + const { allowHtml } = data; + const { config } = commonStore; + + return [ + { id: I.ExportType.Markdown, name: 'Markdown' }, + { id: I.ExportType.Protobuf, name: 'Any-Block' }, + allowHtml ? { id: I.ExportType.Pdf, name: 'PDF' } : null, + allowHtml && config.experimental ? { id: I.ExportType.Html, name: 'HTML' } : null, + ].filter(it => it); + }; + save () { this.props.storageSet(this.data); }; @@ -178,7 +189,7 @@ const PopupExport = observer(class PopupExport extends React.Component<I.Popup> onConfirm (e: any) { const { param, close } = this.props; const { data } = param; - const { rootId } = data; + const { objectIds } = data; const { format } = this.data; const route = 'MenuObject'; @@ -186,7 +197,7 @@ const PopupExport = observer(class PopupExport extends React.Component<I.Popup> switch (format) { default: - Action.export([ rootId ], format, { ...this.data, route }); + Action.export(objectIds, format, { ...this.data, route }); break; case I.ExportType.Html: diff --git a/src/ts/component/popup/page/settings/account.tsx b/src/ts/component/popup/page/settings/account.tsx index f180f74121..3edfb4ce27 100644 --- a/src/ts/component/popup/page/settings/account.tsx +++ b/src/ts/component/popup/page/settings/account.tsx @@ -40,7 +40,7 @@ const PopupSettingsPageAccount = observer(class PopupSettingsPageAccount extends const profile = UtilObject.getProfile(); let name = profile.name; - if (name == UtilObject.defaultName('Page')) { + if (name == translate('defaultNamePage')) { name = ''; }; @@ -135,14 +135,12 @@ const PopupSettingsPageAccount = observer(class PopupSettingsPageAccount extends Action.openFile(Constant.fileExtension.cover, paths => { this.setState({ loading: true }); - C.FileUpload(commonStore.space, '', paths[0], I.FileType.Image, (message: any) => { - if (message.error.code) { - return; + C.FileUpload(commonStore.space, '', paths[0], I.FileType.Image, {}, (message: any) => { + if (!message.error.code) { + UtilObject.setIcon(blockStore.profile, '', message.objectId, () => { + this.setState({ loading: false }); + }); }; - - UtilObject.setIcon(blockStore.profile, '', message.hash, () => { - this.setState({ loading: false }); - }); }); }); }; diff --git a/src/ts/component/popup/page/settings/appearance.tsx b/src/ts/component/popup/page/settings/appearance.tsx index 5e45bace48..e989886f3e 100644 --- a/src/ts/component/popup/page/settings/appearance.tsx +++ b/src/ts/component/popup/page/settings/appearance.tsx @@ -27,7 +27,7 @@ const PopupSettingsPageAppearance = observer(class PopupSettingsPageAppearance e <div key={i} className={[ 'btn', (theme == item.id ? 'active' : ''), item.class ].join(' ')} - onClick={() => { this.onTheme(item.id); }} + onClick={() => this.onTheme(item.id)} > <div className="bg"> <Icon /> diff --git a/src/ts/component/popup/page/settings/data.tsx b/src/ts/component/popup/page/settings/data.tsx index 18570d029c..f4cd4ac383 100644 --- a/src/ts/component/popup/page/settings/data.tsx +++ b/src/ts/component/popup/page/settings/data.tsx @@ -45,7 +45,7 @@ const PopupSettingsPageDataManagement = observer(class PopupSettingsPageStorageI <Title className="sub" text={translate('popupSettingsDataManagementDeleteTitle')} /> <Label className="description" text={translate('popupSettingsDataManagementDeleteText')} /> - <Button className="c36" onClick={() => { onPage('delete'); }} color="red" text={translate('popupSettingsDataManagementDeleteButton')} /> + <Button className="c36" onClick={() => onPage('delete')} color="red" text={translate('popupSettingsDataManagementDeleteButton')} /> </React.Fragment> ); }; diff --git a/src/ts/component/popup/page/settings/head.tsx b/src/ts/component/popup/page/settings/head.tsx index 9bbf891aa2..d840f8624d 100644 --- a/src/ts/component/popup/page/settings/head.tsx +++ b/src/ts/component/popup/page/settings/head.tsx @@ -16,7 +16,7 @@ class PopupSettingsHead extends React.Component<Props> { return ( <div className="head"> <div className="inner"> - <div className="element" onClick={() => { onPage(returnTo || prevPage); }}> + <div className="element" onClick={() => onPage(returnTo || prevPage)}> <Icon className="back" /> {name} </div> diff --git a/src/ts/component/popup/page/settings/import/index.tsx b/src/ts/component/popup/page/settings/import/index.tsx index ac477fa73b..b0fc0d420f 100644 --- a/src/ts/component/popup/page/settings/import/index.tsx +++ b/src/ts/component/popup/page/settings/import/index.tsx @@ -17,7 +17,7 @@ const PopupSettingsPageImportIndex = observer(class PopupSettingsPageImportIndex const Item = (item: any) => { return ( - <div className={[ 'item', item.id ].join(' ')} onClick={() => { this.onClick(item.id); }} > + <div className={[ 'item', item.id ].join(' ')} onClick={() => this.onClick(item.id)} > <Icon className={`import-${item.id}`} /> <div className="name">{item.name}</div> </div> diff --git a/src/ts/component/popup/page/settings/import/notion.tsx b/src/ts/component/popup/page/settings/import/notion.tsx index e2e444e284..18bdfddc78 100644 --- a/src/ts/component/popup/page/settings/import/notion.tsx +++ b/src/ts/component/popup/page/settings/import/notion.tsx @@ -37,7 +37,7 @@ class PopupSettingsPageImportNotion extends React.Component<I.PopupSettings, Sta <div className="errorWrapper"> <Input focusOnMount - ref={(ref: any) => { this.ref = ref; }} + ref={ref => this.ref = ref} type="password" placeholder={translate('popupSettingsImportNotionTokenPlaceholder')} /> @@ -50,7 +50,7 @@ class PopupSettingsPageImportNotion extends React.Component<I.PopupSettings, Sta <div className="helpWrapper flex"> <Title text={translate('popupSettingsImportNotionHowTo')} /> - <div className="btn" onClick={() => { onPage('importNotionHelp'); }}> + <div className="btn" onClick={() => onPage('importNotionHelp')}> <Icon className="help" />{translate('popupSettingsImportNotionStepByStepGuide')} </div> </div> diff --git a/src/ts/component/popup/page/settings/space/create.tsx b/src/ts/component/popup/page/settings/space/create.tsx index 5baf118935..66605a6d5c 100644 --- a/src/ts/component/popup/page/settings/space/create.tsx +++ b/src/ts/component/popup/page/settings/space/create.tsx @@ -66,7 +66,7 @@ const PopupSettingsSpaceIndex = observer(class PopupSettingsSpaceIndex extends R ref={ref => this.refName = ref} value="" onKeyDown={this.onKeyDown} - placeholder={UtilObject.defaultName('Page')} + placeholder={translate('defaultNamePage')} /> </div> @@ -136,7 +136,10 @@ const PopupSettingsSpaceIndex = observer(class PopupSettingsSpaceIndex extends R }; checkName (v: string): string { - if ([ UtilObject.defaultName('Space'), UtilObject.defaultName('Page') ].includes(v)) { + if ([ + translate('defaultNameSpace'), + translate('defaultNamePage'), + ].includes(v)) { v = ''; }; return v; diff --git a/src/ts/component/popup/page/settings/space/index.tsx b/src/ts/component/popup/page/settings/space/index.tsx index 43444a92ed..57fcfca143 100644 --- a/src/ts/component/popup/page/settings/space/index.tsx +++ b/src/ts/component/popup/page/settings/space/index.tsx @@ -100,7 +100,7 @@ const PopupSettingsSpaceIndex = observer(class PopupSettingsSpaceIndex extends R ref={ref => this.refName = ref} value={this.checkName(space.name)} onKeyUp={this.onName} - placeholder={UtilObject.defaultName('Page')} + placeholder={translate('defaultNamePage')} /> </div> @@ -339,8 +339,8 @@ const PopupSettingsSpaceIndex = observer(class PopupSettingsSpaceIndex extends R }; }; - onUpload (hash: string) { - C.WorkspaceSetInfo(commonStore.space, { iconImage: hash }); + onUpload (objectId: string) { + C.WorkspaceSetInfo(commonStore.space, { iconImage: objectId }); }; onDelete () { @@ -352,7 +352,10 @@ const PopupSettingsSpaceIndex = observer(class PopupSettingsSpaceIndex extends R }; checkName (v: string): string { - if ([ UtilObject.defaultName('Space'), UtilObject.defaultName('Page') ].includes(v)) { + if ([ + translate('defaultNameSpace'), + translate('defaultNamePage'), + ].includes(v)) { v = ''; }; return v; diff --git a/src/ts/component/popup/search.tsx b/src/ts/component/popup/search.tsx index 91e373a1dd..acaa8d5be8 100644 --- a/src/ts/component/popup/search.tsx +++ b/src/ts/component/popup/search.tsx @@ -250,7 +250,7 @@ const PopupSearch = observer(class PopupSearch extends React.Component<I.Popup, const win = $(window); win.on('keydown.search', e => this.onKeyDown(e)); - win.on('resize.search', (e: any) => { this.resize(); }); + win.on('resize.search', e => this.resize()); }; unbind () { @@ -569,7 +569,7 @@ const PopupSearch = observer(class PopupSearch extends React.Component<I.Popup, case 'relation': { $('#button-header-relation').trigger('click'); - window.setTimeout(() => { $('#menuBlockRelationView #item-add').trigger('click'); }, Constant.delay.menu * 2); + window.setTimeout(() => $('#menuBlockRelationView #item-add').trigger('click'), Constant.delay.menu * 2); break; }; diff --git a/src/ts/component/popup/settings.tsx b/src/ts/component/popup/settings.tsx index d88bc5af73..28271ba393 100644 --- a/src/ts/component/popup/settings.tsx +++ b/src/ts/component/popup/settings.tsx @@ -223,9 +223,9 @@ const PopupSettings = observer(class PopupSettings extends React.Component<I.Pop const win = $(window); this.unbind(); - win.on('resize.settings', () => { this.resize(); }); + win.on('resize.settings', () => this.resize()); win.on('keydown.settings', e => this.onKeyDown(e)); - win.on('mousedown.settings', (e: any) => { this.onMouseDown(e); }); + win.on('mousedown.settings', e => this.onMouseDown(e)); }; unbind () { diff --git a/src/ts/component/preview/index.tsx b/src/ts/component/preview/index.tsx index e1247d4165..a2f9150b01 100644 --- a/src/ts/component/preview/index.tsx +++ b/src/ts/component/preview/index.tsx @@ -142,7 +142,7 @@ const PreviewComponent = observer(class PreviewComponent extends React.Component menuStore.open('blockLink', { rect: rect ? { ...rect, height: 0, y: rect.y + win.scrollTop() } : null, horizontal: I.MenuDirection.Center, - onOpen: () => { Preview.previewHide(true); }, + onOpen: () => Preview.previewHide(true), data: { filter: mark ? mark.param : '', type: mark ? mark.type : null, diff --git a/src/ts/component/preview/object.tsx b/src/ts/component/preview/object.tsx index 7131e44542..61ef1d275f 100644 --- a/src/ts/component/preview/object.tsx +++ b/src/ts/component/preview/object.tsx @@ -55,8 +55,6 @@ const PreviewObject = observer(class PreviewObject extends React.Component<Props const check = UtilData.checkDetails(contextId, rootId); const object = detailStore.get(contextId, rootId); const { name, description, coverType, coverId, coverX, coverY, coverScale, iconImage } = object; - const author = detailStore.get(contextId, object.creator, []); - const type = detailStore.get(contextId, object.type, []); const childBlocks = blockStore.getChildren(contextId, rootId, it => !it.isLayoutHeader()).slice(0, 10); const isTask = object.layout == I.ObjectLayout.Task; const isBookmark = object.layout == I.ObjectLayout.Bookmark; @@ -105,7 +103,7 @@ const PreviewObject = observer(class PreviewObject extends React.Component<Props const Block = (item: any) => { const { content, fields } = item; - const { text, style, checked } = content; + const { text, style, checked, targetObjectId } = content; const childBlocks = blockStore.getChildren(contextId, item.id); const length = childBlocks.length; const cn = [ 'element', UtilData.blockClass(item), item.className ]; @@ -238,7 +236,7 @@ const PreviewObject = observer(class PreviewObject extends React.Component<Props css.width = (fields.width * 100) + '%'; }; - inner = <img className="media" src={commonStore.imageUrl(content.hash, Constant.size.image)} style={css} />; + inner = <img className="media" src={commonStore.imageUrl(targetObjectId, Constant.size.image)} style={css} />; break; }; diff --git a/src/ts/component/selection/provider.tsx b/src/ts/component/selection/provider.tsx index b838fd8718..fde0f3a546 100644 --- a/src/ts/component/selection/provider.tsx +++ b/src/ts/component/selection/provider.tsx @@ -161,8 +161,8 @@ const SelectionProvider = observer(class SelectionProvider extends React.Compone scrollOnMove.onMouseDown(e, isPopup); this.unbindMouse(); - win.on(`mousemove.selection`, (e: any) => { this.onMouseMove(e); }); - win.on(`blur.selection mouseup.selection`, (e: any) => { this.onMouseUp(e); }); + win.on(`mousemove.selection`, e => this.onMouseMove(e)); + win.on(`blur.selection mouseup.selection`, e => this.onMouseUp(e)); }; initNodes () { diff --git a/src/ts/component/sidebar/index.tsx b/src/ts/component/sidebar/index.tsx index 6b5ad57c5e..38055e0bc6 100644 --- a/src/ts/component/sidebar/index.tsx +++ b/src/ts/component/sidebar/index.tsx @@ -234,7 +234,7 @@ const Sidebar = observer(class Sidebar extends React.Component<Props> { $('body').removeClass('rowResize colResize'); $(window).off('mousemove.sidebar mouseup.sidebar'); - window.setTimeout(() => { this.movedX = false; }, 15); + window.setTimeout(() => this.movedX = false, 15); }; onHandleClick () { diff --git a/src/ts/component/util/frame.tsx b/src/ts/component/util/frame.tsx index ef912b9001..ceb66e0c4f 100644 --- a/src/ts/component/util/frame.tsx +++ b/src/ts/component/util/frame.tsx @@ -38,7 +38,7 @@ class Frame extends React.Component<Props> { this.resize(); this.unbind(); - $(window).on('resize.frame', () => { this.resize(); }); + $(window).on('resize.frame', () => this.resize()); }; componentWillUnmount () { diff --git a/src/ts/component/util/graph.tsx b/src/ts/component/util/graph.tsx index 875392e1ed..4a6e1bf3da 100644 --- a/src/ts/component/util/graph.tsx +++ b/src/ts/component/util/graph.tsx @@ -174,7 +174,7 @@ const Graph = observer(class Graph extends React.Component<Props> { if (d.layout == I.ObjectLayout.Note) { d.name = d.snippet || translate('commonEmpty'); } else { - d.name = d.name || UtilObject.defaultName('Page'); + d.name = d.name || translate('defaultNamePage'); }; d.name = UtilSmile.strip(d.name); diff --git a/src/ts/component/util/iconEmoji.tsx b/src/ts/component/util/iconEmoji.tsx index 6409dc123c..d1e410726f 100644 --- a/src/ts/component/util/iconEmoji.tsx +++ b/src/ts/component/util/iconEmoji.tsx @@ -8,7 +8,7 @@ interface Props { id?: string; icon?: string; iconClass?: string; - hash?: string; + objectId?: string; size?: number; asImage?: boolean; className?: string; @@ -17,7 +17,7 @@ interface Props { offsetY?: number; menuId?: string; onSelect?(id: string): void; - onUpload?(hash: string): void; + onUpload?(objectId: string): void; } const IconSrc = { @@ -34,7 +34,7 @@ const IconEmoji = observer(class IconEmoji extends React.Component<Props> { }; render () { - const { id, size, icon, hash, asImage, className, canEdit, menuId, iconClass } = this.props; + const { id, size, icon, objectId, asImage, className, canEdit, menuId, iconClass } = this.props; const cn = [ 'iconEmoji' ]; const css = { lineHeight: size + 'px' }; @@ -59,8 +59,8 @@ const IconEmoji = observer(class IconEmoji extends React.Component<Props> { }; }; } else - if (hash) { - element = <img src={commonStore.imageUrl(hash, Constant.size.iconPage)} className={[ 'iconImage', 'c' + size ].join(' ')} onDragStart={e => e.preventDefault()} />; + if (objectId) { + element = <img src={commonStore.imageUrl(objectId, Constant.size.iconPage)} className={[ 'iconImage', 'c' + size ].join(' ')} onDragStart={e => e.preventDefault()} />; } else if (iconClass) { element = <img src={IconSrc[iconClass]} className={[ 'iconCommon', iconClass, 'c' + size ].join(' ')} />; diff --git a/src/ts/component/util/iconObject.tsx b/src/ts/component/util/iconObject.tsx index 448dae2ec4..f0b3f3487b 100644 --- a/src/ts/component/util/iconObject.tsx +++ b/src/ts/component/util/iconObject.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import $ from 'jquery'; import { observer } from 'mobx-react'; import { IconEmoji } from 'Component'; -import { I, Preview, UtilSmile, UtilData, UtilFile, UtilObject, UtilCommon } from 'Lib'; +import { I, Preview, UtilSmile, UtilData, UtilFile, UtilObject, UtilCommon, translate } from 'Lib'; import { commonStore, menuStore } from 'Store'; import Colors from 'json/colors.json'; import Theme from 'json/theme.json'; @@ -32,7 +32,7 @@ interface Props { menuParam?: Partial<I.MenuParam>; getObject?(): any; onSelect?(id: string): void; - onUpload?(hash: string): void; + onUpload?(objectId: string): void; onClick?(e: any): void; onCheckbox?(e: any): void; onMouseEnter?(e: any): void; @@ -90,13 +90,8 @@ const FontSize = { 128: 72, }; -const File = {}; const Relation: any = { small: {}, big: {} }; -for (const key of [ 'other', 'image', 'video', 'text', 'archive', 'audio', 'pdf', 'presentation', 'table' ]) { - File[key] = require(`img/icon/file/${key}.svg`).default; -}; - for (const i in I.RelationType) { const it = Number(i); @@ -180,7 +175,7 @@ const IconObject = observer(class IconObject extends React.Component<Props> { }; if (iconEmoji || iconImage || iconClass) { - icon = <IconEmoji {...this.props} className={icn.join(' ')} iconClass={iconClass} size={iconSize} icon={iconEmoji} hash={iconImage} />; + icon = <IconEmoji {...this.props} className={icn.join(' ')} iconClass={iconClass} size={iconSize} icon={iconEmoji} objectId={iconImage} />; } else if (forceLetter) { onLetter(); @@ -213,7 +208,7 @@ const IconObject = observer(class IconObject extends React.Component<Props> { case I.ObjectLayout.Type: { if (iconEmoji) { - icon = <IconEmoji {...this.props} className={icn.join(' ')} iconClass={iconClass} size={iconSize} icon={iconEmoji} hash={iconImage} />; + icon = <IconEmoji {...this.props} className={icn.join(' ')} iconClass={iconClass} size={iconSize} icon={iconEmoji} objectId={iconImage} />; } else if (forceLetter) { onLetter(); @@ -227,7 +222,7 @@ const IconObject = observer(class IconObject extends React.Component<Props> { }; if (iconEmoji || iconImage) { - icon = <IconEmoji {...this.props} className={icn.join(' ')} iconClass={iconClass} size={iconSize} icon={iconEmoji} hash={iconImage} />; + icon = <IconEmoji {...this.props} className={icn.join(' ')} iconClass={iconClass} size={iconSize} icon={iconEmoji} objectId={iconImage} />; } else if (forceLetter) { onLetter(); @@ -251,7 +246,7 @@ const IconObject = observer(class IconObject extends React.Component<Props> { icon = <img src={commonStore.imageUrl(id, iconSize * 2)} className={icn.join(' ')} />; } else { icn = icn.concat([ 'iconFile', 'c' + iconSize ]); - icon = <img src={File[UtilFile.icon(object)]} className={icn.join(' ')} />; + icon = <img src={UtilFile.iconImage(object)} className={icn.join(' ')} />; }; break; }; @@ -266,7 +261,7 @@ const IconObject = observer(class IconObject extends React.Component<Props> { case I.ObjectLayout.File: { icn = icn.concat([ 'iconFile', 'c' + iconSize ]); - icon = <img src={File[UtilFile.icon(object)]} className={icn.join(' ')} />; + icon = <img src={UtilFile.iconImage(object)} className={icn.join(' ')} />; break; }; @@ -414,9 +409,9 @@ const IconObject = observer(class IconObject extends React.Component<Props> { }; }, - onUpload: (hash: string) => { + onUpload: (objectId: string) => { if (onUpload) { - onUpload(hash); + onUpload(objectId); }; } }, @@ -541,7 +536,7 @@ const IconObject = observer(class IconObject extends React.Component<Props> { iconName () { const object = this.getObject(); - let name = String(object.name || UtilObject.defaultName('Page')); + let name = String(object.name || translate('defaultNamePage')); name = UtilSmile.strip(name); name = name.trim().substring(0, 1).toUpperCase(); diff --git a/src/ts/component/util/marker.tsx b/src/ts/component/util/marker.tsx index 7319cc6705..fca12f3740 100644 --- a/src/ts/component/util/marker.tsx +++ b/src/ts/component/util/marker.tsx @@ -3,7 +3,6 @@ import $ from 'jquery'; import { I, UtilCommon } from 'Lib'; import { commonStore } from 'Store'; import { observer } from 'mobx-react'; - import Constant from 'json/constant.json'; interface Props { diff --git a/src/ts/component/util/media/audio.tsx b/src/ts/component/util/media/audio.tsx index 7aface5fb5..cf504f6da7 100644 --- a/src/ts/component/util/media/audio.tsx +++ b/src/ts/component/util/media/audio.tsx @@ -100,9 +100,9 @@ class MediaAudio extends React.Component<Props> { this.audioNode = el.get(0) as HTMLAudioElement; if (el.length) { - el.on('canplay timeupdate', () => { this.onTimeUpdate(); }); - el.on('play', () => { this.onPlay(); }); - el.on('ended pause', () => { this.onPause(); }); + el.on('canplay timeupdate', () => this.onTimeUpdate()); + el.on('play', () => this.onPlay()); + el.on('ended pause', () => this.onPause()); }; }; diff --git a/src/ts/component/util/media/video.tsx b/src/ts/component/util/media/video.tsx index ed3fe09028..5cdc06abc5 100644 --- a/src/ts/component/util/media/video.tsx +++ b/src/ts/component/util/media/video.tsx @@ -46,9 +46,9 @@ class MediaVideo extends React.Component<Props> { const node = $(this.node); const video = node.find('video'); - video.on('play', () => { this.onPlay(); }); - video.on('pause', () => { this.onPause(); }); - video.on('ended', () => { this.onEnded(); }); + video.on('play', () => this.onPlay()); + video.on('pause', () => this.onPause()); + video.on('ended', () => this.onEnded()); }; unbind () { diff --git a/src/ts/component/util/pager.tsx b/src/ts/component/util/pager.tsx index e4ba5d663b..80530b1b68 100644 --- a/src/ts/component/util/pager.tsx +++ b/src/ts/component/util/pager.tsx @@ -37,7 +37,7 @@ class Pager extends React.Component<Props> { }; const Item = (item) => ( - <div className={'pageItem ' + (item.id == page ? 'active' : '')} onClick={() => { this.onChange(item.id); }}> + <div className={'pageItem ' + (item.id == page ? 'active' : '')} onClick={() => this.onChange(item.id)}> {item.id} </div> ); @@ -79,15 +79,15 @@ class Pager extends React.Component<Props> { if (items.length > 1) { return ( <div className={[ 'pager', (isShort ? 'isShort' : '') ].join(' ')}> - {isShort ? <Icon className={[ 'arrow', 'end', 'left', (page == 1 ? 'disabled' : '') ].join(' ')} onClick={() => { this.onChange(1); }} /> : ''} - <Icon className={[ 'arrow', 'left', (page == 1 ? 'disabled' : '') ].join(' ')} onClick={() => { this.onChange(page - 1); }} /> + {isShort ? <Icon className={[ 'arrow', 'end', 'left', (page == 1 ? 'disabled' : '') ].join(' ')} onClick={() => this.onChange(1)} /> : ''} + <Icon className={[ 'arrow', 'left', (page == 1 ? 'disabled' : '') ].join(' ')} onClick={() => this.onChange(page - 1)} /> {startPage} {list} {endPage} - <Icon className={[ 'arrow', 'right', (page == pages ? 'disabled' : '') ].join(' ')} onClick={() => { this.onChange(page + 1); }} /> - {isShort ? <Icon className={[ 'arrow', 'end', 'right', (page == pages ? 'disabled' : '') ].join(' ')} onClick={() => { this.onChange(pages); }} /> : ''} + <Icon className={[ 'arrow', 'right', (page == pages ? 'disabled' : '') ].join(' ')} onClick={() => this.onChange(page + 1)} /> + {isShort ? <Icon className={[ 'arrow', 'end', 'right', (page == pages ? 'disabled' : '') ].join(' ')} onClick={() => this.onChange(pages)} /> : ''} </div> ); } else { diff --git a/src/ts/component/util/progress.tsx b/src/ts/component/util/progress.tsx index 706131b25c..265e652e04 100644 --- a/src/ts/component/util/progress.tsx +++ b/src/ts/component/util/progress.tsx @@ -98,8 +98,8 @@ const Progress = observer(class Progress extends React.Component { keyboard.setDragging(true); win.off('mousemove.progress mouseup.progress'); - win.on('mousemove.progress', (e: any) => { this.onDragMove(e); }); - win.on('mouseup.progress', (e: any) => { this.onDragEnd(e); }); + win.on('mousemove.progress', e => this.onDragMove(e)); + win.on('mouseup.progress', e => this.onDragEnd(e)); }; onDragMove (e: any) { diff --git a/src/ts/component/widget/index.tsx b/src/ts/component/widget/index.tsx index 434f6a1b16..617f6ffc07 100644 --- a/src/ts/component/widget/index.tsx +++ b/src/ts/component/widget/index.tsx @@ -422,8 +422,8 @@ const WidgetIndex = observer(class WidgetIndex extends React.Component<Props> { subIds: Constant.menuIds.widget, vertical: I.MenuDirection.Center, horizontal: I.MenuDirection.Right, - onOpen: () => { node.addClass('active'); }, - onClose: () => { node.removeClass('active'); }, + onOpen: () => node.addClass('active'), + onClose: () => node.removeClass('active'), data: { ...block.content, target: object, diff --git a/src/ts/component/widget/list/index.tsx b/src/ts/component/widget/list/index.tsx index d28b663ec5..541c95efdc 100644 --- a/src/ts/component/widget/list/index.tsx +++ b/src/ts/component/widget/list/index.tsx @@ -45,7 +45,7 @@ const WidgetList = observer(class WidgetList extends React.Component<Props, Stat const { targetBlockId } = block.content; const { isLoading } = this.state; const rootId = this.getRootId(); - const views = dbStore.getViews(rootId, BLOCK_ID).map(it => ({ ...it, name: it.name || UtilObject.defaultName('Page') })); + const views = dbStore.getViews(rootId, BLOCK_ID).map(it => ({ ...it, name: it.name || translate('defaultNamePage') })); const subId = dbStore.getSubId(rootId, BLOCK_ID); const { total } = dbStore.getMeta(subId, ''); const isSelect = !isPreview || !UtilCommon.isPlatformMac(); @@ -98,7 +98,7 @@ const WidgetList = observer(class WidgetList extends React.Component<Props, Stat height={height} deferredMeasurmentCache={this.cache} rowCount={length} - rowHeight={({ index }) => this.getRowHeight(items[index])} + rowHeight={({ index }) => this.getRowHeight(items[index], index)} rowRenderer={rowRenderer} onRowsRendered={onRowsRendered} overscanRowCount={LIMIT} @@ -239,7 +239,7 @@ const WidgetList = observer(class WidgetList extends React.Component<Props, Stat this.cache = new CellMeasurerCache({ fixedWidth: true, - defaultHeight: i => this.getRowHeight(items[i]), + defaultHeight: i => this.getRowHeight(items[i], i), keyMapper: i => items[i], }); }; @@ -439,16 +439,16 @@ const WidgetList = observer(class WidgetList extends React.Component<Props, Stat let height = 0; - items.forEach((item) => { - height += this.getRowHeight(item); + items.forEach((item, index) => { + height += this.getRowHeight(item, index); }); return height; }; - getRowHeight (item: any) { + getRowHeight (item: any, index: number) { if (item && item.isSection) { - return HEIGHT_COMPACT; + return index ? HEIGHT_COMPACT + 12 : HEIGHT_COMPACT; }; return this.props.isCompact ? HEIGHT_COMPACT : HEIGHT_LIST; }; diff --git a/src/ts/component/widget/list/item.tsx b/src/ts/component/widget/list/item.tsx index 0fa7ee5d4a..fc33cfa137 100644 --- a/src/ts/component/widget/list/item.tsx +++ b/src/ts/component/widget/list/item.tsx @@ -178,8 +178,8 @@ const WidgetListItem = observer(class WidgetListItem extends React.Component<Pro const menuParam: any = { className: 'fixed', classNameWrap: 'fromSidebar', - onOpen: () => { node.addClass('active'); }, - onClose: () => { node.removeClass('active'); }, + onOpen: () => node.addClass('active'), + onClose: () => node.removeClass('active'), data: { route: 'Widget', objectIds: [ id ], @@ -204,10 +204,8 @@ const WidgetListItem = observer(class WidgetListItem extends React.Component<Pro UtilObject.setIcon(id, icon, ''); }; - onUpload (hash: string) { - const { id } = this.props; - - UtilObject.setIcon(id, '', hash); + onUpload (objectId: string) { + UtilObject.setIcon(this.props.id, '', objectId); }; onCheckbox () { diff --git a/src/ts/component/widget/space.tsx b/src/ts/component/widget/space.tsx index 7caeef58d9..6b60c3a964 100644 --- a/src/ts/component/widget/space.tsx +++ b/src/ts/component/widget/space.tsx @@ -47,8 +47,8 @@ const WidgetSpace = observer(class WidgetSpace extends React.Component<I.WidgetC C.WorkspaceSetInfo(commonStore.space, { iconImage: '' }); }; - onUpload (hash: string) { - C.WorkspaceSetInfo(commonStore.space, { iconImage: hash }); + onUpload (objectId: string) { + C.WorkspaceSetInfo(commonStore.space, { iconImage: objectId }); }; }); diff --git a/src/ts/component/widget/tree/index.tsx b/src/ts/component/widget/tree/index.tsx index a09b837548..d82515ab4d 100644 --- a/src/ts/component/widget/tree/index.tsx +++ b/src/ts/component/widget/tree/index.tsx @@ -102,7 +102,7 @@ const WidgetTree = observer(class WidgetTree extends React.Component<I.WidgetCom height={height} deferredMeasurmentCache={this.cache} rowCount={nodes.length} - rowHeight={HEIGHT} + rowHeight={({ index }) => this.getRowHeight(nodes[index], index)} rowRenderer={rowRenderer} onRowsRendered={onRowsRendered} overscanRowCount={LIMIT} @@ -187,7 +187,7 @@ const WidgetTree = observer(class WidgetTree extends React.Component<I.WidgetCom this.cache = new CellMeasurerCache({ fixedWidth: true, - defaultHeight: HEIGHT, + defaultHeight: i => this.getRowHeight(nodes[i], i), keyMapper: i => (nodes[i] || {}).id, }); @@ -383,12 +383,31 @@ const WidgetTree = observer(class WidgetTree extends React.Component<I.WidgetCom analytics.event('OpenSidebarObject'); }; + getTotalHeight () { + const nodes = this.loadTree(); + + let height = 0; + + nodes.forEach((node, index) => { + height += this.getRowHeight(node, index); + }); + + return height; + }; + + getRowHeight (node: any, index: number) { + if (node && node.isSection) { + return index ? HEIGHT + 12 : HEIGHT; + }; + return HEIGHT; + }; + resize () { const { parent, isPreview } = this.props; const nodes = this.loadTree(); const node = $(this.node); const length = nodes.length; - const css: any = { height: HEIGHT * length + 8, paddingBottom: '' }; + const css: any = { height: this.getTotalHeight() + 8, paddingBottom: '' }; if (isPreview) { const head = $(`#widget-${parent.id} .head`); diff --git a/src/ts/component/widget/tree/item.tsx b/src/ts/component/widget/tree/item.tsx index b23066eaba..b3e56e973f 100644 --- a/src/ts/component/widget/tree/item.tsx +++ b/src/ts/component/widget/tree/item.tsx @@ -153,8 +153,8 @@ const TreeItem = observer(class Node extends React.Component<Props> { const menuParam: any = { className: 'fixed', classNameWrap: 'fromSidebar', - onOpen: () => { node.addClass('active'); }, - onClose: () => { node.removeClass('active'); }, + onOpen: () => node.addClass('active'), + onClose: () => node.removeClass('active'), data: { route: 'Widget', objectIds: [ id ], @@ -195,10 +195,8 @@ const TreeItem = observer(class Node extends React.Component<Props> { UtilObject.setIcon(id, icon, ''); }; - onUpload (hash: string) { - const { id } = this.props; - - UtilObject.setIcon(id, '', hash); + onUpload (objectId: string) { + UtilObject.setIcon(this.props.id, '', objectId); }; onCheckbox () { diff --git a/src/ts/docs/help/whatsNew.ts b/src/ts/docs/help/whatsNew.ts index b85f5f38fd..f801a4e6a0 100644 --- a/src/ts/docs/help/whatsNew.ts +++ b/src/ts/docs/help/whatsNew.ts @@ -1,4 +1,5 @@ import { I, keyboard } from 'Lib'; +import Url from 'json/url.json'; const cmd = keyboard.cmdSymbol(); const alt = keyboard.altSymbol(); @@ -11,8 +12,8 @@ const h3 = (t: string) => block(I.TextStyle.Header3, t); const text = (t: string) => block(I.TextStyle.Paragraph, t); const bullet = (t: string) => block(I.TextStyle.Bulleted, t); const div = () => ({ type: I.BlockType.Div, style: I.DivStyle.Dot }); -const video = (src: string, c?: string) => text(`<video src="${src}" controls class="c70 ${c || ''}" />`); -const img = (src: string, c?: string) => text(`<img src="${src}" class="c70 ${c || ''}" />`); +const video = (src: string, c?: string) => text(`<video src="${Url.cdn}/img/help/${src}" controls class="c70 ${c || ''}" />`); +const img = (src: string, c?: string) => text(`<img src="${Url.cdn}/img/help/${src}" class="c70 ${c || ''}" />`); const link = (url: string, t: string) => `<a href="${url}">${t}</a>`; export default [ @@ -24,17 +25,17 @@ export default [ h2(`💎 Highlights of this Release:`), h3(`Quick Capture Updates`), - img('./img/help/38/1.png'), + img('38/1.png'), text(`Having introduced a new quick capture menu in our previous release, we've now added additional refinements to help you customize it to your workflows. By right-clicking your most-used object types in your quick capture menu, you now have the option to 'pin' them in the order you prefer. You can also change your default object type or directly delete objects from this menu.`), h3(`More! And More! And More Embeds!`), - video('./img/help/38/2.mp4'), + video('38/2.mp4'), text(`We heard you loud & clear, more embeds are desired! With this release you’ll now have access to the following embed blocks:`), bullet(`Twitter posts`), bullet(`Facebook posts`), bullet(`Telegram messages`), bullet(`Figma public documents`), - bullet(`Open street maps`), + bullet(`OpenStreetMap`), bullet(`Github gist`), bullet(`Graphviz diagrams`), bullet(`CodePen`), @@ -48,11 +49,11 @@ export default [ text(`We’d like to thank our first ANY Experience contributors, @Hexara7777 and @ChristianHaake for submitting five new experiences to the gallery! Between Zen systems, PARA systems and meeting notes, we’re so excited to have your help enriching the Experiences in the Gallery. `), h3(`Added resize functionality to PDF and Embed Blocks`), - video('./img/help/38/3.mp4'), + video('38/3.mp4'), text(`Embed and PDF blocks can now be resized, similarly to image blocks.`), h3(`UX Improvements for Featured Relations`), - img(`./img/help/38/4.png`), + img(`38/4.png`), text(`To help you better make use of your featured relations, empty-state featured relations now display the relation name so you know what they refer to. Clicking the relation will open the relation selection dropdown - either in the object’s relations panel or directly in the editor.s`), h3(`System Notifications are Displayed when Window is Not in Focus`), @@ -155,39 +156,39 @@ export default [ h2(`💎 Highlights of this Release:`), h3(`Introducing: The ANY Experience Gallery`), - img('./img/help/37/1.png'), + img('37/1.png'), text(`For all of you who’ve longingly admired the various setups others have shared in our ${link('https://community.anytype.io/c/gallery/27/none', 'community showcase')}, or for those of you who’ve created incredible setups of your own that you’ve wished to share, the wait is over.`), text(`Introducing: The ANY Experience gallery, a marketplace of use cases, templates, and setups where any member of our community can upload their own experience, or import an experience created by others. To browse the gallery, ${link('https://gallery.any.coop/', 'click here')} (we’ve kickstarted the process with a few experiences of our own). If you’d like to contribute your own experience to the gallery, you can follow the instructions ${link('https://github.com/orgs/anyproto/discussions/123', 'here')}.`), h3(`Embed Blocks`), - video('./img/help/37/2.mp4'), + video('37/2.mp4'), text(`Now live! Simply type /embed in the editor to pull up a menu of currently supported embeds. These include: Mermaid diagrams, Youtube videos, Miro boards, Google Maps, and several more.`), h3(`Backlinks MVP`), - img('./img/help/37/3.png'), + img('37/3.png'), text(`Another highly-requested feature we’re thrilled to deliver with this release, is the first iteration of backlinks. Backlinks and forward links have been implemented as relations, and can be found in the relations panel of any object. `), text(`By default, if an object already has backlinks, the backlinks will be displayed as a featured relation, indicating the number of backlinks and - when clicked the linked objects. If an object has no backlinks, the relation will not be featured, but can be located in your relations panel.`), h3(`Configurable Self-hosting & Local-Only Mode`), - video('./img/help/37/4.mp4'), + video('37/4.mp4'), text(`The final feature in the highlight reel of this release is configurable settings for self-hosting and local-only mode for your data. To change your sync settings, log out of your account and tap the settings wheel in the top right of the window. There, you’ll see options to choose Self-hosting or Local-only.`), h2(`⚡ Quality-of-Life Improvements:`), h3(`New Object Creation Menu`), - img('./img/help/37/5.png'), + img('37/5.png'), text(`When right-clicking the plus-button from the navigation menu, you’ll be presented with a menu of standard types, plus your most recently-used Types. In this way, we hope to reduce the number of clicks needed to create objects of a specific type, especially for those of you who love custom object types.`), h3(`Object Creation from Widget`), - img('./img/help/37/6.png'), + img('37/6.png'), text(`When hovering over any widget in your sidebar, you’ll see a new plus button next to the widget settings button. By pressing it, you can add any new object to the target widget.`), h3(`Local Graph Mode`), - img('./img/help/37/7.png'), + img('37/7.png'), text(`When selecting an object in the graph, you’ll have an option in the graph settings menu to toggle on ${hl('Local Graph')}, which will display only the selected object and its linked objects, rather than your entire graph.`), h3(`Widgets can now be created from object 3-dots menu`), - video('./img/help/37/8.mp4'), + video('37/8.mp4'), text(`Any object can now be transformed into a widget simply by clicking the three-dots menu and selecting the first option: Create Widget.`), h3(`Settings pages added to global search`), @@ -222,29 +223,29 @@ export default [ h2(`💎 Highlights of this Release:`), h3(`Multi-Spaces are Here!`), - video('./img/help/36/1.mp4'), + video('36/1.mp4'), text(`Spaces were first introduced in June of this year as a container for your graph of objects. From today's release onwards, you'll be able to level up your space game by creating separate spaces, each with their own graph of objects, widget sidebar, and eventually - privacy settings.`), text(`Simply click your profile picture to create new spaces, or navigate between existing ones. Use the space management menu at the top of your sidebar to customize your space settings or delete your space. For now, your account is limited to 10 spaces.`), h3(`Calendar View for Sets & Collections`), - video('./img/help/36/3.mp4'), + video('36/3.mp4'), text(`You asked, we listened - the most popular feature request from our forums is now live! Calendar view has been added as a new view option to sets and collections. To display objects in your calendar, you must select a Date relation to group your objects such as: Creation Date, Due Date, or any custom date relation.`), h2(`⚡ Quality-of-Life Improvements:`), h3(`Widget Creation via Drag n' Drop`), - video('./img/help/36/4.mp4'), + video('36/4.mp4'), text(`As a quick solution for creating new widgets, you can now drag & drop linked and mentioned objects from your editor, or objects displayed in sets and collections, directly into the sidebar. `), h3(`New Template Picker in Object Creation Flow`), - img('./img/help/36/5.png'), + img('36/5.png'), text(`Upon creating any new object, you'll no longer see a popup window to prompt template selection. Rather, your default template will be applied. If you wish to change it, you can use the template picker on the top of the editor, which will disappear once you begin adding content to the body of the object.`), h3(`Search function added to Sets & Collections`), text(`Using the new search button in sets and collections (the magnifying glass next to the filter menu), you can now search for objects whose names match your search terms.`), h3(`Updated Default Template Selection Flow for Sets & Collections`), - img('./img/help/36/6.png'), + img('36/6.png'), text(`The selection menu for default templates according to set & collection views has been moved from the view settings menu. To select your default template, click the down caret arrow next to the ‘New' button and choose the template you'd like to apply to the view using the three-dots menu.`), h3(`Onboarding Updates`), @@ -270,7 +271,7 @@ export default [ h2(`💎 Highlights of this Release:`), h3(`Create & Edit Templates from Sets & Collections`), - video(`./img/help/35/1-templates.mp4`), + video(`35/1-templates.mp4`), text(`Finally, template creation on-the-fly is here! From today's release onward, you no longer need to visit the Library to create and edit your templates. Using the ‘Show templates' button in any Set or Collection, you can open, edit, and create new templates for immediate use.`), h3(`Updates to Notion Import`), @@ -279,14 +280,14 @@ export default [ h2(`⚡ Quality-of-Life Improvements:`), h3(`Read-only & Restore-from-Bin Enabled for Deleted Objects`), - video(`./img/help/35/2-restore.mp4`), + video(`35/2-restore.mp4`), text(`You can now open the content of deleted objects in read-only mode. Once opened, you'll see a banner that allows you to restore the object, without needing to visit the Bin to do so. `), h3(`Edit Object Icons in Mentioned & Linked Objects`), text(`It's now possible to edit the icons of Objects which are referenced via links or mentions in your editor, including checking or unchecking tasks.`), h3(`Link to Website is Now First Option When Adding Links to Text Blocks`), - img(`./img/help/35/3-menu.png`), + img(`35/3-menu.png`), text(`To simplify the process of adding web links to text blocks, inputting a URL as a text block link will bring Link to Website to the top of the menu. Thanks, ${link(`https://community.anytype.io/t/change-the-layout-of-link-in-font-settings/9757`, `gdbb`)}!`), h3(`Logout Button Added to Profile Settings Sidebar`), @@ -296,7 +297,7 @@ export default [ text(`Strategic Writing has been added as a use case to the onboarding selection, focusing on collecting, developing, and thoughtfully presenting written ideas in Anytype.`), h3(`Redesign of Set Control Menus`), - img(`./img/help/35/4-set.png`), + img(`35/4-set.png`), text(`We've updated the design of the View settings menu with options for renaming the view and selecting the default template for the set. In addition, current settings can be previewed from the menu including layout, applied filters, and applied sorts.`), h3(`Default Object Type Now Selectable in Collections & Sets-by-Relation`), @@ -344,7 +345,7 @@ export default [ h2(`💎 Highlights of this Release:`), h3(`Introduction of Localized Interfaces`), - img('./img/help/34/1.png', 'screen'), + img('34/1.png', 'screen'), text(`With the help of our linguistically gifted community, we're thrilled to bring you the very first iteration of a localized interface. Anytype desktop is now available in 14 languages! To change your interface language, jump to Settings > Preferences and select the language of your choosing.`), text(`Please note that all translations from the English language are community-contributed. If you notice any errors, you're free to submit your corrections ${link(`https://community.anytype.io/t/localization-launch/10269/13`, `using this platform`)}. Any updates will be shipped in the successive release.`), text(`Don't see your language? Feel free to ${link(`https://github.com/orgs/anyproto/discussions/45`, `start contributing your own translations`)}!`), @@ -352,9 +353,9 @@ export default [ h3(`Introduction of Blank Templates & Default Template Selection`), text(`If you ever wished you could bypass automatic template application when creating objects, a "blank" template has now been added to all types, with the exception of Type: Note. This blank template cannot be deleted or modified in any way.`), - img('./img/help/34/2.png', 'screen'), + img('34/2.png', 'screen'), text(`Meanwhile, it's now possible to choose a default template for each type. From the types page, click the newly-added three-dots menu for the template, and click on the menu option ${hl(`Set as default`)}.`), - img('./img/help/34/3.png', 'screen'), + img('34/3.png', 'screen'), text(`This template will now be applied each time you create an object from sets or collections, though you can customize the template according to each set view. When creating objects from the ${hl(`+`)} button or ${hl(`/`)} command menu, you will still be presented with a panel of templates to choose from.`), h2(`⚡ Quality-of-Life Improvements:`), @@ -362,7 +363,7 @@ export default [ bullet(`<b>Batch updating of object type now possible from Set & Collection</b><br/> If you select several objects of the same type, you'll see a new menu option to ${hl(`Change type`)}, which we hope will reduce the need to update types object-by-object.`), bullet(`<b>Widgets now available for recently edited & recently opened objects</b><br/> - ${img(`./img/help/34/4.png`, `screen`)}<br/> + ${img(`34/4.png`, `screen`)}<br/> Depending on whether you prefer to define your recent objects according to recently modified or opened date, you can now choose the corresponding widget. Please note that recently opened widgets are device-specific and therefore will not sync across your devices due to the decentralized nature of the application.`), bullet(`<b>Newly created set & collection views now copy settings from currently open view</b><br/> Each time you create a new view in your sets or collections, your current view settings - including filters & sorts - will be automatically copied to the new view`), @@ -400,7 +401,7 @@ export default [ bullet(`<b>Redesigned onboarding & login experience</b>`), - video(`./img/help/33/onboarding.mp4`), + video(`33/onboarding.mp4`), text(`We're calling this one feature, but it's really a whole series of features and designs wrapped into one experience that comprises everything from installation to login.`), text(`During the onboarding experience, new users are situated within the "Void" to understand where their space will be created.`), text(`From there, users receive supplemental education on the importance of protecting and backing up their recovery phrases. Finally, users are able to visualize their identity and personal space as two distinct entities.`), @@ -437,7 +438,7 @@ export default [ text(`More than 300 bugs, polishes, and features were merged into this one update, so we won't detail each and every one of them. Instead, in this month's What's New edition, we'll be focusing on the main changes you'll notice once you've installed the new app, and describing each in greater detail.`), h2(`Introduction of Private Spaces`), - video(`./img/help/32/1-spaces.mp4`), + video(`32/1-spaces.mp4`), text(`Upon opening this version you'll notice a new addition to your account: that of ${hl(`Space`)}. Your space can be customized in terms of name, icon, and homepage, which you'll find by clicking on the settings wheel on the ${hl(`Space`)} button.`), text(`Your space homepage is the main page you'll see, each time you open Anytype. You can select any object or your graph as your space homepage. Clicking on the space widget in the top position of your sidebar will open your space settings. To return to your home page from anywhere in the app, you can use shortcut: ${hl(`${alt} + H`)}`), @@ -445,23 +446,23 @@ export default [ text(`While it won't be visible from the interface, this release brings the integration of our new Anysync protocol, a work which has been years in the making. For us, arriving here means showing the world that a local-first, p2p synced protocol with an E2E encrypted product built on top, is possible. We hope you'll find the syncing of your accounts between devices a smoother experience than before, and rest easy knowing that your data is absolutely yours.`), h2(`Introduction of Widgets`), - video(`./img/help/32/2-widgets.mp4`), + video(`32/2-widgets.mp4`), text(`Over the past months, we've thought long and hard about how to improve the navigation experience towards a more flexible approach. Enter: widgets, modular units which can be added or removed from your sidebar. Widgets allow you to quickly navigate to your objects and visualize the other objects they are linked to.`), text(`When creating widgets, keep in mind that a widget "source" can be any object which you've previously added to your graph, or a dynamic list of your "recent", "favorite", or "sets" objects - tabs which were available in the previous tab of your homescreen.`), text(`Widgets of any kind can be displayed as a link; meanwhile, widgets pointing to singular objects created with the editor can be displayed with "tree" appearance. Widgets pointing to sets, collections, recents, or favorites, can be displayed as a simple or compact list with all target objects inside.`), h2(`New navigation bar`), - video(`./img/help/32/3-navbar.mp4`), + video(`32/3-navbar.mp4`), text(`Many commands which were previously dispersed throughout the interface have now been condensed into one navigation bar, which is your home base for managing and moving about your anytype. The navigation bar will remain visible no matter where you are in the app, putting your graph, global search, and profile settings within easier reach.`), h2(`Collections`), - video(`./img/help/32/4-collections.mp4`), + video(`32/4-collections.mp4`), text(`With this update you'll also discover Collections, which work less like a filter (Sets) and more like a folder. Any object in your graph can be manually added to a collection, either by using the + New buttons in the collection itself, or by selection ‘Link to' from the target object's 3-dots menu.`), text(`Similarly with sets, you can visualize your collections based on four different views, and you can also sort & filter your collections based on object relations. Unlike sets however, adding an object to a given collection creates a new link in your graph.`), text(`To get you started on your Collections journey, you'll now see the option to turn any set into a collection of objects, as well as the menu option to create a collection when you hit the ‘plus' button. `), h2(`Protobuf Export & Import`), - img(`./img/help/32/export.png`, 'screen'), + img(`32/export.png`, 'screen'), text(`In case you would like to transfer objects between anytype accounts, protobuf export is now available on the object and account level. When sharing the object with another anytype user, simply share the exported file - which the other user can import directly as an object in their account. Separately, if for any reason you need to create a new account and wish to preserve all objects in your account, you can also make an export of all your objects by navigating to your Profile settings > Export.`), div(), @@ -476,24 +477,24 @@ export default [ h2(`💎 Highlights of this Release`), bullet(`<b>Inline Sets</b><br/>We've added a new block type - inline set. You can create an inline set using commands ${hl(`/inline`)} or ${hl(`/<viewtype>`)} to select gallery, grid, etc.<br/><br/>Once created, select an existing set as a source, or create a new one. Any changes you make to the inline set query, icon, or name will be synced with the source set. Meanwhile, views will not synced, but copied, which means you can tweak views to your current needs without worrying that your source set will be impacted.`), - video(`./img/help/31/1-inline-set.mp4`), + video(`31/1-inline-set.mp4`), bullet(`<b>Library Redesign</b><br/>Your control panel for managing types & relations got a facelift in 0.31.0. Descriptions have been removed and buttons have been updated for a lighter, cleaner look & feel.`), - img(`./img/help/31/2-library.png`, 'full screen'), + img(`31/2-library.png`, 'full screen'), h2(`⚡ Quality-of-Life Improvements`), bullet(`<b>Notion Import via API</b><br/>Here by popular demand: importing your files directly from Notion to Anytype! The new integration preserves relationships between parent-child pages as links between imported Objects. Follow the instructions from the ${hl(`Settings > Import > Notion > Learn more`)} section to set up your integration token and start importing your files to your space.`), - img(`./img/help/31/6-import.png`, 'full screen'), + img(`31/6-import.png`, 'full screen'), bullet(`<b>Graph redesign</b><br/>We've re-worked the graph to include Object previews-on-hover, Icons as nodes, and directional arrows. We will continue to expand our graph functionality in the coming few releases, so stay tuned for further updates.`), - img(`./img/help/31/3-graph.png`, 'full screen'), + img(`31/3-graph.png`, 'full screen'), bullet(`<b>Gallery view Playback</b><br/>Sets of audio & video files now permit playback from gallery view. Using Page cover in set by Video for example, will make cards playable as well.`), - video(`./img/help/31/5-set-playback.mp4`), + video(`31/5-set-playback.mp4`), bullet(`<b>Profile added to Settings</b><br/>You can now edit your profile name & picture from your account settings. Any changes made there will be immediately synced with your Profile object.`), - img(`./img/help/31/4-profile.png`, 'half screen'), + img(`31/4-profile.png`, 'half screen'), bullet(`<b>Upgrades to recovery phrase panel</b><br/>Buttons in the "Recovery Phrase" panel of your Settings menu now show "Hide" or "Show", depending on whether the phrase is blurred or not. Thanks, ${link('https://community.anytype.io/t/8029', 'sambouwer')}!`), @@ -522,29 +523,29 @@ export default [ h2(`💎 Highlights of this Release`), bullet(`<b>Type & Relation Deletion & Modification</b><br/>We've heard you loud & clear - starting with this update, it's now possible to remove & modify both pre-installed and custom-made Types & Relations from the Library. Any modifications will be reflected in Objects which have already used these Types & Relations.`), - video('./img/help/type-deletion.mp4'), + video('type-deletion.mp4'), bullet(`<b>Introduction of Marketplace</b><br/>In case you're wondering where all of those pre-installed Types & Relations have gone, they're now conveniently stored in the Marketplace for both existing & new users to install to your account (and eventually add your own). Access the Marketplace from the new "Marketplace" tab in the Library.`), - img('./img/help/marketplace.png', 'full screen'), + img('marketplace.png', 'full screen'), bullet(`<b>Set by Relation</b><br/>Sets are no longer just limited to Types! You can now create Sets by filtering for Objects which share a certain Relation. Quick hack for anyone who wants an overview of all Objects in their account: Create a Set by Relation: Creation Date, and... ta-da!`), - video('./img/help/set-relation.mp4'), + video('set-relation.mp4'), bullet(`<b>Everything as an Object</b><br/>...seriously, everything. Types & Relations are now their own Objects, meaning that it's possible to create Relations and Sets of Types and…Relations. While you may already start experimenting with these features in the Library by opening each Type/Relation individually, this update also unblocks other highly-requested features such as grouping and tuning relation values.`), h2(`⚡ Quality-of-Life Improvements`), bullet(`<b>Multi-select, delete & link from Graph</b><br/>Say goodbye to rogue Objects hanging around in your graph! It's now possible to right-click on Objects in the Graph to open a menu of operations, including Delete & Link. Hit ${hl(`Shift + Click`)} to multi-select and bulk-manage these Objects.`), bullet(`<b>Link-to Feature</b><br/>You now have an easy way to link Objects with each other, which doesn't require editor blocks. Use the "Link to" option in the Object 3-dots menu or in Graph to create direct links and quicker association between Objects.`), - img('./img/help/link-to.png', 'full screen'), + img('link-to.png', 'full screen'), bullet(`<b>Type creation on-the-fly (Desktop-only)</b><br/>It's now possible to create or install new Types in Editor without needing to visit the Library. Whether creating an Object for the first time or changing its Type, use the dropdown to turn your Objects into whatever's top of mind.`), - img('./img/help/type-creation.png', 'half screen'), + img('type-creation.png', 'half screen'), bullet(`<b>Kanban groups syncing cross-device</b><br/>Groups in Kanban are now correctly updating when changed from another device. Furthermore, if you add or delete any tags your Kanban will receive real-time updates!`), bullet(`<b>Block navigation via arrow keys</b><br/>Speed through document editing and review by jumping between blocks using your left and right arrow keys.`), bullet(`<b>Copy button next to Anytype version</b><br/>Bug reports just got that much easier - now, you can copy the version in one click by opening the Anytype → About Anytype window from the application menu.`), - img('./img/help/copy-version.png', 'half screen'), + img('copy-version.png', 'half screen'), bullet(`<b>Download button for image blocks</b><br/>Any image block in your editor now shows a download icon on hover, in case you would like to download and save images previously added to your Objects.`), - img('./img/help/image-download.png', 'half screen'), + img('image-download.png', 'half screen'), bullet(`<b>Design update: Link & Bookmark Blocks</b><br/>Link & bookmark blocks for URLs pasted from the web got a little facelift with this update - expect to see a small difference in font weights & favicons.`), bullet(`<b>Design update: Read-only Relations in Sets (Grid View)</b><br/>Relations which cannot be updated (for instance "Created by" or "Creation Date") now have a lock icon displayed to indicate that they cannot be edited.`), bullet(`<b>Toast notifications</b><br/>For greater clarity on actions you've taken in Anytype, we've introduced toast notifications for certain operations such as linking between Objects or installing new Types and Relations.`), - img('./img/help/toast.png', 'half screen'), + img('toast.png', 'half screen'), bullet(`<b>Link blocks in text mode previews</b><br/>It's now possible to further customize how linked Objects in text mode appear in your editor. Click the orange handle next to the link block and choose Preview to play around with Description, Type, and/or Content in your Object preview.`), h2(`🐛 Bug Fixes`), @@ -585,19 +586,19 @@ export default [ h2(`⚡ Quality-of-Life Improvements`), bullet(`Relations now updating automatically using drag & drop between columns from Kanban view`), - video('./img/help/kanban-dnd.mp4'), + video('kanban-dnd.mp4'), bullet(`Selection frame when selecting block is now visible`), - img('./img/help/selection.png', 'full screen'), + img('selection.png', 'full screen'), bullet(`When scrolling content of page opened inside popups, menus positions are now correctly updated`), bullet(`Added page overscrolling for better readability, so content now ends in the middle of the screen rather than the bottom`), bullet(`Added multilingual spellcheck support`), - img('./img/help/multi-lang.png', 'half screen'), + img('multi-lang.png', 'half screen'), bullet(`Updated in-page search design to include number of matching results and scrolling`), - img('./img/help/search.png', 'half screen'), + img('search.png', 'half screen'), bullet(`Updated toggle block design so toggles are default open when applying block style changes`), bullet(`Added possibility to open new windows from search interface when pressing ${hl(`${cmd} + Enter`)}`), bullet(`Simplified type-selection interface from + button Object creation flow to reduce friction in quick capture of thoughts & ideas`), - video('./img/help/type-selection.mp4'), + video('type-selection.mp4'), bullet(`Export settings are now saved from one export to another`), bullet(`In-app survey and logic was re-worked to reduce frequency and increase relevance towards new users, veteran users, and exiting users`), bullet(`New windows now open by default with a slight position shift so your windows aren't stacked on top of each other`), @@ -640,11 +641,11 @@ export default [ h2(`💎 Highlights of this Release`), text(`Kanban: Task management just got way easier with Kanban views for Sets. In this first iteration, you can group your Objects according to Relations: Status, Tag, or Checkbox. Dragging Objects between columns will automatically update the Relations`), - video('./img/help/kanban.mp4'), + video('kanban.mp4'), text(`Multi-window display: By simply holding ${hl(`${cmd}`)} and clicking on any Object in your workspace, you can now open it in a new window. Even better, drag and drop blocks between windows for some seriously efficient workflows`), - img('./img/help/multi-window.png', 'full'), + img('multi-window.png', 'full'), text(`Spellcheck: Your dreams of typo-free note taking just came true. Choose your input language by heading to ${hl(`Settings > Personalization > Spellcheck language`)} and - depending on your typing accuracy - get ready to see some corrections`), - img('./img/help/spellcheck.png', 'full'), + img('spellcheck.png', 'full'), h2(`🚀 Quality-of-life Improvements:`), bullet(`Previously-uploaded images now saved in Image Library: When selecting Object covers you can now choose from a library of any images you have uploaded to your workspace`), @@ -692,16 +693,16 @@ export default [ h2(`💎 Highlights of this Release`), text(`Simple tables are here! As one of our most popular feature requests, we're so excited to introduce simple tables across all platforms. From the editor, simply type ${hl(`/table`)} and customize the number of cells, column widths, and background colors to your liking. You can use shortcut ${hl(`/table{x}-{y}`)} to create table with ${hl(`X`)} rows and ${hl(`Y`)} columns as well.`), - video('./img/help/table.mp4'), + video('table.mp4'), text(`Bookmarks as Objects: To help keep track of links you've bookmarked around the web, you can now create Sets with Type: Bookmark, so you can view and sort them all in one place. Say goodbye to lost links forever!`), - img('./img/help/bookmark.png', 'full'), + img('bookmark.png', 'full'), text(`New ${hl(`Getting Started`)} Objects (New Users only): Upon registration, new users will see an updated ${hl(`Get Started`)} page and ${hl(`Advanced`)} page, with concise explanations of core concepts and a set of bookmarked demo videos for typical use cases.`), text(`For everyone else who's interested in honing your Anytype superpowers, check out our demo videos and let us know what other kind of content or use cases you'd like to see!`), h2(`🚀 Features & Enhancements`), bullet(`Text underline: The underline option is here. Underline away, friends!`), bullet(`Callout blocks: By using ${hl(`/callout`)} in our editor, you can now create Callout Blocks as a way to highlight specific bits of information, like this:`), - img('./img/help/callout.png', 'full'), + img('callout.png', 'full'), h2(`⚡ Quality-of-Life Improvements`), bullet(`Text letter spacings were corrected for improved readability`), @@ -768,7 +769,7 @@ export default [ h2(`Ludicrous-mode for Relations`), text(`Organizing, filtering, and focusing on certain objects just became faster with our new Relations menu.`), text(`By clicking the column name in Grid View, you can now directly sort and filter your objects according to the chosen relation. Moreover, with the new menu you can create and insert relations anywhere within a Set, allowing for greater flexibility.`), - video('./img/help/relation-menu.mp4'), + video('relation-menu.mp4'), text(`We hope these improvements unlock many new and novel use-cases for Anytype, and help our power-users all the more powerful. 🦸`), h2(`Other notable improvements`), @@ -1021,20 +1022,20 @@ export default [ h2(`Deletion`), text(`Say hello to our most incredible innovation since object creation: object deletion. Anytype now supports the permanent deleting of objects! 🥳 🗑♻️. Moving objects to the bin will remove them from navigation. From the bin, you can choose to select, delete, and restore your objects. <b>This action is irrevocable, so please be careful.</b> `), - img('./img/help/delete.png', 'full'), + img('delete.png', 'full'), text(`At present, only objects created inside Anytype can be deleted. Other files like media, and those that come with Anytype (types, relations) will be supported in future releases.`), h2(`New defaults`), text(`Speed and convenience are central to this update. Drafts have been replaced with a new default type, ${hl(`the Note`)}. Designed to capture thoughts quickly. You can now choose any type of object as your default type in Settings. An update we hope will provide you with even more customization and workflow options.`), - img('./img/help/note.png', 'full'), + img('note.png', 'full'), h2(`Sets creation`), text(`You can now create a Set from the dashboard, using the bottom-left + button, or even in-line using the ${hl(`/`)} menu. From there, you can choose which type of object your new Set is for. For example, viewing your current projects, or building a reading list of books.`), - video('./img/help/set-creation.mp4'), + video('set-creation.mp4'), h2(`Darkmode`), text(`Just in-time for winter, our long-awaited dark mode is here. This feature has graced our devices (and eyes) in recent years, and has really become a way of life for some. Night owls rejoice! To enable dark mode, simply open the Settings pane, navigate to other settings → theme → and choose Dark.`), - img('./img/help/dark-mode.png', 'full'), + img('dark-mode.png', 'full'), h2(`Fresh docs`), text(`We've launched a brand ${link('https://doc.anytype.io/d/', 'new hub')} for Anytype docs. You can find it in the ${hl(`+`)} menu and in the ${hl(`?`)} icon at the bottom-right of your screen. This is our first draft, and we look forward to your feedback!`), @@ -1108,17 +1109,17 @@ export default [ text(`Use the search function at the bottom of the panel to the right if you want to find a particular object. Matching objects will be highlighted in the network view.`), text(`To access the Graph Mode, look for the ${img('./img/icon/graph.svg', 'icon')} icon in the top-left corner from any opened object or just press ${hl(`⌘ + Option + O / Ctrl + Alt + O`)}.`), text(`What does your graph look like? Share it in the community!`), - img('./img/help/graph.png', 'full'), + img('graph.png', 'full'), h2(`LaTeX block`), text(`LaTeX is here! Have you been frustrated trying to work with LaTeX functions in other tools? With Anytype, you don't have to worry about errors ever again thanks to a real-time preview and example functions in the editor. You can write code and view the formula output at the same time. Now fully enjoy your studies using Anytype for your Math and Chemistry class notes!`), - img('./img/help/latex.png', 'full'), + img('latex.png', 'full'), h2(`List & Gallery views`), text(`Meet the new and highly-requested Views for Sets! To create a new view, click the <img src="./img/icon/plus.svg" class="icon" /> icon at the top-left of your Set (next to "All"), give it a name in the field at the top of the pop-up, then select the type of view you want (currently Grid, Gallery, or List, with more coming soon). After you create it, you can change options for the View by using the Customize View icon at the top-right of your set.`), text(`For Gallery views, the card image can be shown from the Attachment Relation or the object's cover image. You can set this in Customize View, and the selected image source will appear at the top of each gallery card. `), text(`You can also «right mouse» click on the view name to open options faster. `), - img('./img/help/gallery.png', 'full'), + img('gallery.png', 'full'), h2(`Enhancements`), bullet(`Tabs: We did some research and rearranged the tabs in Home in order of popularity. The Inbox tab was removed and will come back reimagined later. Recent tab is now called History and no longer contains archived objects.`), @@ -1153,11 +1154,11 @@ export default [ h2(`New features:`), h3(`Play that funky music, Anytype`), text(`You can now upload your favorite music with formats: ${hl(`.wav`)}, ${hl(`.mp3`)}, ${hl(`.ogg`)}, ${hl(`.m4a`)} and ${hl(`.flac`)} into a new media block. Audio files are available on canvas and as objects inside Anytype, which you can collect into sets.`), - img('./img/help/audioblock.png', 'full'), + img('audioblock.png', 'full'), h3(`Custom views for links and bookmarks`), text(`You can change the appearance of cards to make them yours. Links and cards can now show cover images, different icon sizes, and descriptions under the text.`), - img('./img/help/link-object.png', 'full'), + img('link-object.png', 'full'), h3(`Open attached files in Anytype`), text(`You can now open the attached files directly in Anytype instead of having to download them. So now you don't need to download files and then find them in the file system. They open just from Anytype! Thanks, ${link('https://community.anytype.io/d/51-open-attached-files-directly-instead-of-downloading-them', 'bzimor, reuseman')}`), @@ -1453,7 +1454,7 @@ export default [ h3(`Enhancements:`), bullet(`The page icon is now moving with the title, so you can make a page with a centered layout.`), - img('./img/help/centered.png', 'full'), + img('centered.png', 'full'), bullet(`We moved page cover controls position in a more convenient place.`), bullet(`Mentions now have the ability to break into a new line.`), bullet(`We have enabled dropping blocks into the page.`), @@ -1651,7 +1652,7 @@ export default [ h1(`Updates for 10 June, 2020`), text(`We value your time and develop a great timesaver for you — now you can transfer data from other sources into Anytype!`), text(`Open settings in the dashboard or use ${hl(`File → Import`)} in the System menu and try. You can import all your data from Notion with the same structure for now, later we will develop more sources.`), - img('./img/help/import.png', 'full'), + img('import.png', 'full'), text(`A friendly reminder. Without any imports, you can save note from another app or an article from Wikipedia, and store it forever on your computer. Just copy it there and paste into Anytype. <i>Voila!<i>`), text(`Please, write us what you think and what source you want to import in Anytype!`), @@ -1663,7 +1664,7 @@ export default [ text(`Now Anytype allows you to refer to any page right in your content.`), text(`Simply insert the ${hl(`@`)} sign and start typing the name of a page you want to refer to.`), text(`You can mention any page anywhere and it will build a relationship between pages. All mentions will be shown in the navigation panel. It's just a more convenient way to connect any pages inside Anytype. Hope you enjoy it and we look forward to your suggestions on how we could make it better.`), - text(`<img src="./img/help/mention.gif" class="full mention">`), + text(`<img src="mention.gif" class="full mention">`), div(), // --------------------------------------------// diff --git a/src/ts/interface/block/dataview.ts b/src/ts/interface/block/dataview.ts index c6f639dc3e..cd0e5d4cf6 100644 --- a/src/ts/interface/block/dataview.ts +++ b/src/ts/interface/block/dataview.ts @@ -113,10 +113,10 @@ export interface ViewComponent { isCollection?: boolean; className?: string; refCells?: any; + record?: any; onRef?(ref: any, id: string): void; loadData(viewId: string, offset: number, clear: boolean, callBack?: (message: any) => void): void; getRecords?(): string[]; - getRecord(id: string): any; getCoverObject?(id: string): any; getView?(): View; getSources?(): string[]; @@ -190,7 +190,6 @@ export interface Cell { idPrefix?: string; relation?: any; relationKey?: string; - recordId: string; viewType: I.ViewType; readonly?: boolean; canOpen?: boolean; @@ -207,8 +206,8 @@ export interface Cell { shortUrl?: boolean; menuClassName?: string; menuClassNameWrap?: string; + record?: any; getView?(): View; - getRecord(id: string): any; onChange?(value: any, callBack?: (message: any) => void): void; onClick?(e: any): void; onMouseEnter?(e: any): void; diff --git a/src/ts/interface/block/file.ts b/src/ts/interface/block/file.ts index 3db9225a95..1f6da3e52f 100644 --- a/src/ts/interface/block/file.ts +++ b/src/ts/interface/block/file.ts @@ -23,10 +23,7 @@ export enum FileState { }; export interface ContentFile { - hash: string; - name: string; - mime: string; - size: number; + targetObjectId: string; style: FileStyle; state: FileState; type: FileType; diff --git a/src/ts/lib/action.ts b/src/ts/lib/action.ts index 40e847b925..022dda1ff4 100644 --- a/src/ts/lib/action.ts +++ b/src/ts/lib/action.ts @@ -78,13 +78,13 @@ class Action { }; const { content } = block; - const { type, hash } = content; + const { type, targetObjectId } = content; - if (!hash) { + if (!targetObjectId) { return; }; - const url = block.isFileImage() ? commonStore.imageUrl(hash, 1000000) : commonStore.fileUrl(hash); + const url = block.isFileImage() ? commonStore.imageUrl(targetObjectId, 1000000) : commonStore.fileUrl(targetObjectId); Renderer.send('download', url); analytics.event('DownloadMedia', { type, route }); @@ -510,7 +510,7 @@ class Action { it.childrenIds = element.childrenIds; return it; }); - + C[cmd](rootId, blocks, range, (message: any) => { UtilCommon.clipboardCopy({ text: message.textSlot, diff --git a/src/ts/lib/api/command.ts b/src/ts/lib/api/command.ts index e3ad375773..6ce42093d4 100644 --- a/src/ts/lib/api/command.ts +++ b/src/ts/lib/api/command.ts @@ -247,7 +247,7 @@ export const FileDrop = (contextId: string, targetId: string, position: I.BlockP dispatcher.request(FileDrop.name, request, callBack); }; -export const FileUpload = (spaceId: string, url: string, path: string, type: I.FileType, callBack?: (message: any) => void) => { +export const FileUpload = (spaceId: string, url: string, path: string, type: I.FileType, details: any, callBack?: (message: any) => void) => { if (!url && !path) { return; }; @@ -258,14 +258,15 @@ export const FileUpload = (spaceId: string, url: string, path: string, type: I.F request.setUrl(url); request.setLocalpath(path); request.setType(type as number); + request.setDetails(Encode.struct(details)); dispatcher.request(FileUpload.name, request, callBack); }; -export const FileDownload = (hash: string, path: string, callBack?: (message: any) => void) => { +export const FileDownload = (objectId: string, path: string, callBack?: (message: any) => void) => { const request = new Rpc.File.Download.Request(); - request.setHash(hash); + request.setObjectid(objectId); request.setPath(path); dispatcher.request(FileDownload.name, request, callBack); diff --git a/src/ts/lib/api/dispatcher.ts b/src/ts/lib/api/dispatcher.ts index c67623d61d..40a0e99c3f 100644 --- a/src/ts/lib/api/dispatcher.ts +++ b/src/ts/lib/api/dispatcher.ts @@ -228,7 +228,7 @@ class Dispatcher { const info = data.getClientinfo(); const challenge = data.getChallenge(); - const win = window.open(UtilCommon.fixAsarPath('./challenge/index.html'), '', 'width=320,height=320'); + const win = window.open(UtilCommon.fixAsarPath('./challenge/index.html'), '', 'width=424,height=232,menubar=no,resizable=no,scrollbars=no,location=no,toolbar=no,frame=no'); win.addEventListener('load', () => win.postMessage({ challenge, @@ -238,7 +238,7 @@ class Dispatcher { window.setTimeout(() => { try { win.close(); } catch (e) { /**/ }; - }, 3000); + }, 5000); break; }; @@ -504,20 +504,8 @@ class Dispatcher { break; }; - if (data.hasName()) { - block.content.name = data.getName().getValue(); - }; - - if (data.hasHash()) { - block.content.hash = data.getHash().getValue(); - }; - - if (data.hasMime()) { - block.content.mime = data.getMime().getValue(); - }; - - if (data.hasSize()) { - block.content.size = data.getSize().getValue(); + if (data.hasTargetobjectid()) { + block.content.targetObjectId = data.getTargetobjectid().getValue(); }; if (data.hasType()) { diff --git a/src/ts/lib/api/mapper.ts b/src/ts/lib/api/mapper.ts index 75ef9a8e15..19fe698842 100644 --- a/src/ts/lib/api/mapper.ts +++ b/src/ts/lib/api/mapper.ts @@ -189,12 +189,9 @@ export const Mapper = { BlockFile: (obj: any) => { return { - hash: obj.getHash(), - name: obj.getName(), - type: obj.getType(), + targetObjectId: obj.getTargetobjectid(), style: obj.getStyle(), - mime: obj.getMime(), - size: obj.getSize(), + type: obj.getType(), addedAt: obj.getAddedat(), state: obj.getState(), }; @@ -574,6 +571,10 @@ export const Mapper = { return item; }, + BlockFeatured: () => { + return new Model.Block.Content.FeaturedRelations(); + }, + BlockLayout: (obj: any) => { const content = new Model.Block.Content.Layout(); @@ -600,13 +601,10 @@ export const Mapper = { BlockFile: (obj: any) => { const content = new Model.Block.Content.File(); - content.setHash(obj.hash); - content.setName(obj.name); content.setType(obj.type); - content.setMime(obj.mime); - content.setSize(obj.size); content.setAddedat(obj.addedAt); content.setState(obj.state); + content.setTargetobjectid(obj.targetObjectId); return content; }, diff --git a/src/ts/lib/api/response.ts b/src/ts/lib/api/response.ts index b379d72a95..5187ffc286 100644 --- a/src/ts/lib/api/response.ts +++ b/src/ts/lib/api/response.ts @@ -92,7 +92,8 @@ export const FileNodeUsage = (response: Rpc.File.NodeUsage.Response) => { export const FileUpload = (response: Rpc.File.Upload.Response) => { return { - hash: response.getHash(), + objectId: response.getObjectid(), + details: Decode.struct(response.getDetails()), }; }; @@ -418,7 +419,7 @@ export const UnsplashSearch = (response: Rpc.Unsplash.Search.Response) => { export const UnsplashDownload = (response: Rpc.Unsplash.Download.Response) => { return { - hash: response.getHash(), + objectId: response.getObjectid(), }; }; diff --git a/src/ts/lib/focus.ts b/src/ts/lib/focus.ts index 542164132c..c3da8043ba 100644 --- a/src/ts/lib/focus.ts +++ b/src/ts/lib/focus.ts @@ -82,7 +82,7 @@ class Focus { el.focus({ preventScroll: true }); if (node.hasClass('input')) { - window.setTimeout(() => { (el as HTMLInputElement).setSelectionRange(range.from, range.to); }); + window.setTimeout(() => (el as HTMLInputElement).setSelectionRange(range.from, range.to)); } else if (node.hasClass('editable')) { keyboard.setFocus(true); diff --git a/src/ts/lib/index.ts b/src/ts/lib/index.ts index c3ce17a445..2485b3c011 100644 --- a/src/ts/lib/index.ts +++ b/src/ts/lib/index.ts @@ -15,8 +15,8 @@ import UtilObject from './util/object'; import UtilMenu from './util/menu'; import UtilRouter from './util/router'; import UtilDate from './util/date'; -import UtilEmbed from './util/embed'; import UtilGraph from './util/graph'; +import UtilEmbed from './util/embed'; import { keyboard, Key } from './keyboard'; import { sidebar } from './sidebar'; @@ -34,33 +34,7 @@ import Survey from './survey'; import Preview from './preview'; import Highlight from './highlight'; import Animation from './animation'; -import Constant from 'json/constant.json'; - -import { commonStore } from 'Store'; - -/** - * - * @param key the key of the text as found in the json/text.json file - * @returns a piece of display text in the language of the user - * Defaults to the default lang set in constant.json (english) - */ -const translate = (key: string, force?: string): string => { - const lang = force || commonStore.interfaceLang; - const defaultData = require(`json/text.json`); - - let data = defaultData; - if (lang == Constant.default.interfaceLang) { - data = defaultData; - } else { - try { - data = require(`lib/json/lang/${lang}.json`); - } catch(e) { - data = defaultData; - }; - }; - - return data[key] || defaultData[key] || `⚠️${key}⚠️`; -}; +import { translate } from './translate'; export { keyboard, diff --git a/src/ts/lib/keyboard.ts b/src/ts/lib/keyboard.ts index 9c3cd37051..a9df8961b5 100644 --- a/src/ts/lib/keyboard.ts +++ b/src/ts/lib/keyboard.ts @@ -798,9 +798,6 @@ class Keyboard { }; onQuickCapture () { - - console.log('onQuickCapture', menuStore.isOpen('quickCapture')); - if (menuStore.isOpen('quickCapture')) { menuStore.close('quickCapture'); return; @@ -877,10 +874,6 @@ class Keyboard { return (this.isPopup() ? this.getPopupMatch() : this.match) || { params: {} }; }; - ctrlByPlatform (e: any) { - return UtilCommon.isPlatformMac() ? e.metaKey : e.ctrlKey; - }; - isMain () { return this.match?.params?.page == 'main'; }; diff --git a/src/ts/lib/mark.ts b/src/ts/lib/mark.ts index a18b9f89a8..9cee49eee9 100644 --- a/src/ts/lib/mark.ts +++ b/src/ts/lib/mark.ts @@ -490,7 +490,7 @@ class Mark { }; fromMarkdown (html: string, marks: I.Mark[], restricted: I.MarkType[], adjustMarks: boolean): { marks: I.Mark[], text: string, adjustMarks: boolean } { - const test = /[`\*_~\[]{1}/.test(html); + const test = /((^|\s)_|[`\*~\[]){1}/.test(html); const checked = marks.filter(it => [ I.MarkType.Code ].includes(it.type)); if (!test) { diff --git a/src/ts/lib/preview.ts b/src/ts/lib/preview.ts index 6d15bdcdd8..b3dc70c225 100644 --- a/src/ts/lib/preview.ts +++ b/src/ts/lib/preview.ts @@ -120,7 +120,7 @@ class Preview { node.css({ left: x, top: y }).addClass('show'); window.clearTimeout(this.timeout.delay); - this.timeout.delay = window.setTimeout(() => { this.delayTooltip = delay; }, 500); + this.timeout.delay = window.setTimeout(() => this.delayTooltip = delay, 500); this.delayTooltip = 100; }, this.delayTooltip); }; @@ -232,7 +232,7 @@ class Preview { toastShow (param: I.Toast) { const setTimeout = () => { window.clearTimeout(this.timeout.toast); - this.timeout.toast = window.setTimeout(() => { this.toastHide(false); }, Constant.delay.toast); + this.timeout.toast = window.setTimeout(() => this.toastHide(false), Constant.delay.toast); }; commonStore.toastSet(param); @@ -241,8 +241,8 @@ class Preview { setTimeout(); obj.off('mouseenter.toast mouseleave.toast'); - obj.on('mouseenter.toast', () => { window.clearTimeout(this.timeout.toast); }); - obj.on('mouseleave.toast', () => { setTimeout(); }); + obj.on('mouseenter.toast', () => window.clearTimeout(this.timeout.toast)); + obj.on('mouseleave.toast', () => setTimeout()); }; /** diff --git a/src/ts/lib/translate.ts b/src/ts/lib/translate.ts new file mode 100644 index 0000000000..0d6786adc1 --- /dev/null +++ b/src/ts/lib/translate.ts @@ -0,0 +1,26 @@ +import { commonStore } from 'Store'; +import Constant from 'json/constant.json'; + +/** + * + * @param key the key of the text as found in the json/text.json file + * @returns a piece of display text in the language of the user + * Defaults to the default lang set in constant.json (english) + */ +export const translate = (key: string, force?: string): string => { + const lang = force || commonStore.interfaceLang; + const defaultData = require(`json/text.json`); + + let data = defaultData; + if (lang == Constant.default.interfaceLang) { + data = defaultData; + } else { + try { + data = require(`lib/json/lang/${lang}.json`); + } catch(e) { + data = defaultData; + }; + }; + + return data[key] || defaultData[key] || `⚠️${key}⚠️`; +}; \ No newline at end of file diff --git a/src/ts/lib/util/data.ts b/src/ts/lib/util/data.ts index d6519eaa57..94c381b8c0 100644 --- a/src/ts/lib/util/data.ts +++ b/src/ts/lib/util/data.ts @@ -347,7 +347,6 @@ class UtilData { { operator: I.FilterOperator.And, relationKey: 'layout', condition: I.FilterCondition.Equal, value: I.ObjectLayout.Option }, ], sorts: [ - { relationKey: 'createdDate', type: I.SortType.Asc }, { relationKey: 'name', type: I.SortType.Asc }, ], noDeps: true, @@ -661,12 +660,12 @@ class UtilData { dbStore.metaSet(subId, '', { total: message.counters.total, keys }); }; - let details = []; const mapper = (it: any) => { - keys.forEach((k: string) => { it[k] = it[k] || ''; }); + keys.forEach(k => it[k] = it[k] || ''); return { id: it[idField], details: it }; }; + let details = []; details = details.concat(message.dependencies.map(mapper)); details = details.concat(message.records.map(mapper)); diff --git a/src/ts/lib/util/embed.ts b/src/ts/lib/util/embed.ts index baf09ff256..726097fa0e 100644 --- a/src/ts/lib/util/embed.ts +++ b/src/ts/lib/util/embed.ts @@ -216,6 +216,16 @@ class UtilEmbed { break; }; + case I.EmbedProcessor.GithubGist: { + const a = url.split('#'); + if (!a.length) { + break; + }; + + url = a[0]; + break; + }; + }; return url; @@ -232,44 +242,6 @@ class UtilEmbed { return pm[2] + ((tm && tm[2].length) ? `?start=${tm[2]}` : ''); }; - getEnvironmentContent (processor: I.EmbedProcessor): { html: string; libs: string[]} { - const libs = []; - - let html = ''; - switch (processor) { - case I.EmbedProcessor.Chart: { - html = `<canvas id="chart"></canvas>`; - libs.push('https://cdn.jsdelivr.net/npm/chart.js'); - break; - }; - - case I.EmbedProcessor.Twitter: { - libs.push('https://platform.twitter.com/widgets.js'); - break; - }; - - case I.EmbedProcessor.Reddit: { - libs.push('https://embed.reddit.com/widgets.js'); - break; - }; - - case I.EmbedProcessor.Instagram: { - libs.push('https://www.instagram.com/embed.js'); - break; - }; - - case I.EmbedProcessor.Codepen: { - libs.push('https://cpwebassets.codepen.io/assets/embed/ei.js'); - break; - }; - }; - - return { - html, - libs, - }; - }; - getLang (processor: I.EmbedProcessor) { switch (processor) { default: return 'html'; diff --git a/src/ts/lib/util/file.ts b/src/ts/lib/util/file.ts index 6684363210..f48b75b671 100644 --- a/src/ts/lib/util/file.ts +++ b/src/ts/lib/util/file.ts @@ -1,5 +1,6 @@ import loadImage from 'blueimp-load-image'; -import { UtilCommon } from 'Lib'; +import { UtilCommon, Relation } from 'Lib'; +import { commonStore } from 'Store'; import Constant from 'json/constant.json'; const SIZE_UNIT = 1024; @@ -30,10 +31,13 @@ class UtilFile { return UtilCommon.formatNumber(Number(UtilCommon.sprintf(`%0.2f`, ret))) + unit; }; - icon (obj: any): string { - const n = obj.name.split('.'); - const mime = String(obj.mime || obj.mimeType || obj.fileMimeType || '').toLowerCase(); - const e = String(obj.fileExt || n[n.length - 1] || '').toLowerCase(); + icon (object: any): string { + object = object || {}; + + const name = Relation.getStringValue(object.name); + const n = name.split('.'); + const mime = String(object.mime || object.mimeType || object.fileMimeType || '').toLowerCase(); + const e = String(object.fileExt || n[n.length - 1] || '').toLowerCase(); let t: string[] = []; let icon = 'other'; @@ -105,6 +109,16 @@ class UtilFile { return icon; }; + iconPath (object: any) { + const tp = commonStore.getThemePath(); + return `img/${tp}icon/file/${this.icon(object)}.svg`; + }; + + iconImage (object: any): string { + const tp = commonStore.getThemePath(); + return require(`img/${tp}icon/file/${this.icon(object)}.svg`).default; + }; + loadPreviewCanvas (file: any, param: any, success?: (canvas: any) => void) { if (!file) { return; diff --git a/src/ts/lib/util/graph.ts b/src/ts/lib/util/graph.ts index 9a31a331e9..a61c7857e8 100644 --- a/src/ts/lib/util/graph.ts +++ b/src/ts/lib/util/graph.ts @@ -20,7 +20,7 @@ class UtilGraph { }; case I.ObjectLayout.File: { - src = `img/icon/file/${UtilFile.icon(d)}.svg`; + src = UtilFile.iconPath(d); break; }; @@ -28,7 +28,7 @@ class UtilGraph { if (d.id) { src = commonStore.imageUrl(d.id, 100); } else { - src = `img/icon/file/${UtilFile.icon(d)}.svg`; + src = UtilFile.iconPath(d); }; break; }; diff --git a/src/ts/lib/util/menu.ts b/src/ts/lib/util/menu.ts index 105023dec1..85bd9b5cbf 100644 --- a/src/ts/lib/util/menu.ts +++ b/src/ts/lib/util/menu.ts @@ -81,7 +81,7 @@ class UtilMenu { { id: I.EmbedProcessor.Miro, name: 'Miro' }, { id: I.EmbedProcessor.Figma, name: 'Figma' }, { id: I.EmbedProcessor.Twitter, name: 'X (Twitter)' }, - { id: I.EmbedProcessor.OpenStreetMap, name: 'Open Street Map' }, + { id: I.EmbedProcessor.OpenStreetMap, name: 'OpenStreetMap' }, { id: I.EmbedProcessor.Facebook, name: 'Facebook' }, { id: I.EmbedProcessor.Instagram, name: 'Instagram' }, { id: I.EmbedProcessor.Telegram, name: 'Telegram' }, @@ -122,7 +122,7 @@ class UtilMenu { type: I.BlockType.Page, objectTypeId: type.id, iconEmoji: type.iconEmoji, - name: type.name || UtilObject.defaultName('Page'), + name: type.name || translate('defaultNamePage'), description: type.description, isObject: true, isHidden: type.isHidden, @@ -154,7 +154,7 @@ class UtilMenu { id: `object${i++}`, objectTypeId: type.id, iconEmoji: type.iconEmoji, - name: type.name || UtilObject.defaultName('Page'), + name: type.name || translate('defaultNamePage'), description: type.description, isObject: true, isHidden: type.isHidden, @@ -180,9 +180,10 @@ class UtilMenu { // Action menu getActions (param: any) { - const { hasText, hasFile, hasBookmark, hasTurnObject } = param; + const { rootId, blockId, hasText, hasFile, hasBookmark, hasDataview, hasTurnObject } = param; const cmd = keyboard.cmdSymbol(); - const items: any[] = [ + + let items: any[] = [ { id: 'remove', icon: 'remove', name: translate('commonDelete'), caption: 'Del' }, { id: 'copy', icon: 'copy', name: translate('commonDuplicate'), caption: `${cmd} + D` }, { id: 'move', icon: 'move', name: translate('commonMoveTo'), arrow: true }, @@ -198,30 +199,28 @@ class UtilMenu { }; if (hasFile) { - items.push({ id: 'download', icon: 'download', name: translate('commonDownload') }); - items.push({ id: 'openFileAsObject', icon: 'expand', name: translate('commonOpenObject') }); - //items.push({ id: 'rename', icon: 'rename', name: translate('libMenuRename') }); - //items.push({ id: 'replace', icon: 'replace', name: translate('libMenuReplace') }); + items = items.concat([ + { id: 'download', icon: 'download', name: translate('commonDownload') }, + { id: 'openAsObject', icon: 'expand', name: translate('commonOpenObject') }, + //{ id: 'rename', icon: 'rename', name: translate('libMenuRename') ), + //{ id: 'replace', icon: 'replace', name: translate('libMenuReplace') }, + ]); }; - if (hasBookmark) { - items.push({ id: 'openBookmarkAsObject', icon: 'expand', name: translate('commonOpenObject') }); + if (hasDataview) { + const isCollection = Dataview.isCollection(rootId, blockId); + const sourceName = isCollection ? translate('commonLCCollection') : translate('commonLCSet'); + + items.push({ id: 'dataviewSource', icon: 'source', name: UtilCommon.sprintf(translate('libMenuChangeSource'), sourceName), arrow: true }); + }; + + if (hasFile || hasBookmark || hasDataview) { + items.push({ id: 'openAsObject', icon: 'expand', name: translate('commonOpenObject') }); }; return items.map(it => ({ ...it, isAction: true })); }; - getDataviewActions (rootId: string, blockId: string) { - const isCollection = Dataview.isCollection(rootId, blockId); - const sourceName = isCollection ? 'collection' : 'set'; - - return [ - { id: 'dataviewSource', icon: 'source', name: UtilCommon.sprintf(translate('libMenuChangeSource'), sourceName), arrow: true }, - { id: 'openDataviewObject', icon: 'expand', name: UtilCommon.sprintf(translate('libMenuOpenSource'), sourceName) }, - //{ id: 'openDataviewFullscreen', icon: 'expand', name: translate('libMenuOpenFullscreen') } - ].map(it => ({ ...it, isAction: true })); - }; - getTextColors () { const items: any[] = [ { id: 'color-default', name: translate('commonDefault'), value: '', className: 'default', isTextColor: true } diff --git a/src/ts/lib/util/object.ts b/src/ts/lib/util/object.ts index 72ed85d29c..c928cd0790 100644 --- a/src/ts/lib/util/object.ts +++ b/src/ts/lib/util/object.ts @@ -208,7 +208,7 @@ class UtilObject { keyboard.setSource(null); historyPopup.pushMatch(param.data.matchPopup); - window.setTimeout(() => { popupStore.open('page', param); }, Constant.delay.popup); + window.setTimeout(() => popupStore.open('page', param), Constant.delay.popup); }; create (rootId: string, targetId: string, details: any, position: I.BlockPosition, templateId: string, fields: any, flags: I.ObjectFlag[], callBack?: (message: any) => void) { @@ -289,10 +289,6 @@ class UtilObject { C.ObjectSetDetails(rootId, [ { key: 'defaultTemplateId', value: id } ], callBack); }; - defaultName (key: string) { - return translate(`defaultName${key}`); - }; - name (object: any) { const { isDeleted, layout, snippet } = object; @@ -303,7 +299,7 @@ class UtilObject { if (layout == I.ObjectLayout.Note) { name = snippet || translate('commonEmpty'); } else { - name = object.name || this.defaultName('Page'); + name = object.name || translate('defaultNamePage'); }; return name; diff --git a/src/ts/lib/util/smile.ts b/src/ts/lib/util/smile.ts index 7e6634086c..0137fc14ec 100644 --- a/src/ts/lib/util/smile.ts +++ b/src/ts/lib/util/smile.ts @@ -73,7 +73,7 @@ class UtilSmile { const parts = String(colons || '').split('::'); const id = String(parts[0] || '').replace(/:/g, ''); - const prefix = UtilCommon.getGlobalConfig().emojiPrefix || './img/emoji/'; + const prefix = UtilCommon.getGlobalConfig().emojiUrl || './img/emoji/'; const item = this.data.emojis[id]; if (!item) { diff --git a/src/ts/model/block.ts b/src/ts/model/block.ts index b95c121aac..9977c0552e 100644 --- a/src/ts/model/block.ts +++ b/src/ts/model/block.ts @@ -475,18 +475,19 @@ class Block implements I.Block { return l; }; - getTargetObjectId () { + getTargetObjectId (): string { + let ret = ''; + switch (this.type) { - case I.BlockType.File: { - return this.content.hash; - }; case I.BlockType.Link: { - return this.content.targetBlockId; + ret = this.content.targetBlockId; }; default: { - return this.content.targetObjectId; + ret = this.content.targetObjectId; }; }; + + return String(ret || ''); }; }; diff --git a/src/ts/model/content/file.ts b/src/ts/model/content/file.ts index b213a78dfb..b3f3b2cfc8 100644 --- a/src/ts/model/content/file.ts +++ b/src/ts/model/content/file.ts @@ -3,28 +3,19 @@ import { observable, intercept, makeObservable } from 'mobx'; class BlockContentFile implements I.ContentFile { - hash = ''; - name = ''; - mime = ''; - size = 0; + targetObjectId = ''; type: I.FileType = I.FileType.None; style: I.FileStyle = I.FileStyle.Auto; state: I.FileState = I.FileState.Empty; constructor (props: I.ContentFile) { - this.hash = String(props.hash || ''); - this.name = String(props.name || ''); - this.mime = String(props.mime || ''); - this.size = Number(props.size) || 0; + this.targetObjectId = String(props.targetObjectId || ''); this.type = Number(props.type) || I.FileType.None; this.style = Number(props.style) || I.FileStyle.Auto; this.state = Number(props.state) || I.FileState.Empty; makeObservable(this, { - hash: observable, - name: observable, - mime: observable, - size: observable, + targetObjectId: observable, type: observable, style: observable, state: observable, diff --git a/src/ts/store/common.ts b/src/ts/store/common.ts index 88c7b75bac..3db70656e5 100644 --- a/src/ts/store/common.ts +++ b/src/ts/store/common.ts @@ -222,17 +222,12 @@ class CommonStore { this.gatewayUrl = v; }; - fileUrl (hash: string) { - hash = String(hash || ''); - - return `${this.gateway}/file/${hash}`; + fileUrl (id: string) { + return [ this.gateway, 'file', String(id || '') ].join('/'); }; - imageUrl (hash: string, width: number) { - hash = String(hash || ''); - width = Number(width) || 0; - - return `${this.gateway}/image/${hash}?width=${width}`; + imageUrl (id: string, width: number) { + return [ this.gateway, 'image', String(id || '') ].join('/') + `?width=${Number(width) || 0}`; }; progressSet (v: I.Progress) { @@ -395,13 +390,18 @@ class CommonStore { Renderer.send('setBackground', c); head.find('#link-prism').remove(); - if (c == 'dark') { + if (c) { head.append(`<link id="link-prism" rel="stylesheet" href="./css/theme/${c}/prism.css" />`); }; $(window).trigger('updateTheme'); }; + getThemePath () { + const c = this.getThemeClass(); + return c ? `theme/${c}/` : ''; + }; + nativeThemeSet (isDark: boolean) { this.nativeThemeIsDark = isDark; }; diff --git a/src/ts/store/detail.ts b/src/ts/store/detail.ts index 7dc1054bd4..f18e91e02c 100644 --- a/src/ts/store/detail.ts +++ b/src/ts/store/detail.ts @@ -229,7 +229,7 @@ class DetailStore { }; private mapCommon (object: any) { - object.name = Relation.getStringValue(object.name) || UtilObject.defaultName('Page'); + object.name = Relation.getStringValue(object.name) || translate('defaultNamePage'); object.snippet = Relation.getStringValue(object.snippet).replace(/\n/g, ' '); object.type = Relation.getStringValue(object.type); object.layout = Number(object.layout) || I.ObjectLayout.Page; diff --git a/tsconfig.json b/tsconfig.json index e2a52188a1..5bf18d1a42 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,8 +3,8 @@ "outDir": "./dist/", "sourceMap": true, "noImplicitAny": false, - "module": "ES2020", - "target": "es6", + "module": "esnext", + "target": "es2017", "jsx": "react", "resolveJsonModule": true, "moduleResolution": "Node", diff --git a/webpack.config.js b/webpack.config.js index 4370e33bdd..2bf7322377 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -106,4 +106,4 @@ module.exports = (env, argv) => { }), ], }; -}; +}; \ No newline at end of file