Merge branch 'main' into dev
This commit is contained in:
		
						commit
						8d9c3cc4fe
					
				
					 9 changed files with 210 additions and 185 deletions
				
			
		|  | @ -2,10 +2,14 @@ | |||
| - Huge refactor, along with some improved documentation | ||||
| - Custom emotes now show in the sidebar profile display | ||||
| - Infinite scrolling notifications | ||||
| - Notifications now show content warnings instead of plain content | ||||
| - Notifications now show content warnings where applicable | ||||
| - Notifications now show custom emoji | ||||
| - Notifications now show post media | ||||
| - Boosts now reflect the visibility of the original post | ||||
| - Added compose box, and the ability to create posts | ||||
| - Added ability to delete posts | ||||
| - Added button to delete own posts | ||||
| - Rewrote Campfire URLs so they can be viewed anonymously | ||||
| - Improved UI tweaks | ||||
| 
 | ||||
| # Campfire v0.3.0 | ||||
| - Added notifications view | ||||
|  |  | |||
							
								
								
									
										327
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							
							
						
						
									
										327
									
								
								package-lock.json
									
										
									
										generated
									
									
									
								
							|  | @ -1,21 +1,18 @@ | |||
| { | ||||
|     "name": "campfire-client", | ||||
|     "version": "0.3.0", | ||||
|     "version": "0.4.0", | ||||
|     "lockfileVersion": 3, | ||||
|     "requires": true, | ||||
|     "packages": { | ||||
|         "": { | ||||
|             "name": "campfire-client", | ||||
|             "version": "0.3.0", | ||||
|             "version": "0.4.0", | ||||
|             "license": "GPL-3.0", | ||||
|             "dependencies": { | ||||
|                 "typescript": "^5.5.3" | ||||
|             }, | ||||
|             "devDependencies": { | ||||
|                 "@poppanator/sveltekit-svg": "^4.2.1", | ||||
|                 "@sveltejs/adapter-auto": "^3.2.2", | ||||
|                 "@sveltejs/adapter-static": "^3.0.2", | ||||
|                 "@sveltejs/kit": "^2.5.17", | ||||
|                 "@sveltejs/kit": "^2.16.0", | ||||
|                 "@sveltejs/vite-plugin-svelte": "^3.1.1", | ||||
|                 "svelte": "^4.2.18", | ||||
|                 "vite": "^5.3.1" | ||||
|  | @ -480,9 +477,9 @@ | |||
|             } | ||||
|         }, | ||||
|         "node_modules/@polka/url": { | ||||
|             "version": "1.0.0-next.25", | ||||
|             "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.25.tgz", | ||||
|             "integrity": "sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==", | ||||
|             "version": "1.0.0-next.28", | ||||
|             "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.28.tgz", | ||||
|             "integrity": "sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==", | ||||
|             "dev": true, | ||||
|             "license": "MIT" | ||||
|         }, | ||||
|  | @ -529,9 +526,9 @@ | |||
|             "dev": true | ||||
|         }, | ||||
|         "node_modules/@rollup/rollup-android-arm-eabi": { | ||||
|             "version": "4.18.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", | ||||
|             "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", | ||||
|             "version": "4.31.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.31.0.tgz", | ||||
|             "integrity": "sha512-9NrR4033uCbUBRgvLcBrJofa2KY9DzxL2UKZ1/4xA/mnTNyhZCWBuD8X3tPm1n4KxcgaraOYgrFKSgwjASfmlA==", | ||||
|             "cpu": [ | ||||
|                 "arm" | ||||
|             ], | ||||
|  | @ -543,9 +540,9 @@ | |||
|             ] | ||||
|         }, | ||||
|         "node_modules/@rollup/rollup-android-arm64": { | ||||
|             "version": "4.18.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", | ||||
|             "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", | ||||
|             "version": "4.31.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.31.0.tgz", | ||||
|             "integrity": "sha512-iBbODqT86YBFHajxxF8ebj2hwKm1k8PTBQSojSt3d1FFt1gN+xf4CowE47iN0vOSdnd+5ierMHBbu/rHc7nq5g==", | ||||
|             "cpu": [ | ||||
|                 "arm64" | ||||
|             ], | ||||
|  | @ -557,9 +554,9 @@ | |||
|             ] | ||||
|         }, | ||||
|         "node_modules/@rollup/rollup-darwin-arm64": { | ||||
|             "version": "4.18.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", | ||||
|             "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==", | ||||
|             "version": "4.31.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.31.0.tgz", | ||||
|             "integrity": "sha512-WHIZfXgVBX30SWuTMhlHPXTyN20AXrLH4TEeH/D0Bolvx9PjgZnn4H677PlSGvU6MKNsjCQJYczkpvBbrBnG6g==", | ||||
|             "cpu": [ | ||||
|                 "arm64" | ||||
|             ], | ||||
|  | @ -571,9 +568,9 @@ | |||
|             ] | ||||
|         }, | ||||
|         "node_modules/@rollup/rollup-darwin-x64": { | ||||
|             "version": "4.18.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", | ||||
|             "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", | ||||
|             "version": "4.31.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.31.0.tgz", | ||||
|             "integrity": "sha512-hrWL7uQacTEF8gdrQAqcDy9xllQ0w0zuL1wk1HV8wKGSGbKPVjVUv/DEwT2+Asabf8Dh/As+IvfdU+H8hhzrQQ==", | ||||
|             "cpu": [ | ||||
|                 "x64" | ||||
|             ], | ||||
|  | @ -584,10 +581,38 @@ | |||
|                 "darwin" | ||||
|             ] | ||||
|         }, | ||||
|         "node_modules/@rollup/rollup-freebsd-arm64": { | ||||
|             "version": "4.31.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.31.0.tgz", | ||||
|             "integrity": "sha512-S2oCsZ4hJviG1QjPY1h6sVJLBI6ekBeAEssYKad1soRFv3SocsQCzX6cwnk6fID6UQQACTjeIMB+hyYrFacRew==", | ||||
|             "cpu": [ | ||||
|                 "arm64" | ||||
|             ], | ||||
|             "dev": true, | ||||
|             "license": "MIT", | ||||
|             "optional": true, | ||||
|             "os": [ | ||||
|                 "freebsd" | ||||
|             ] | ||||
|         }, | ||||
|         "node_modules/@rollup/rollup-freebsd-x64": { | ||||
|             "version": "4.31.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.31.0.tgz", | ||||
|             "integrity": "sha512-pCANqpynRS4Jirn4IKZH4tnm2+2CqCNLKD7gAdEjzdLGbH1iO0zouHz4mxqg0uEMpO030ejJ0aA6e1PJo2xrPA==", | ||||
|             "cpu": [ | ||||
|                 "x64" | ||||
|             ], | ||||
|             "dev": true, | ||||
|             "license": "MIT", | ||||
|             "optional": true, | ||||
|             "os": [ | ||||
|                 "freebsd" | ||||
|             ] | ||||
|         }, | ||||
|         "node_modules/@rollup/rollup-linux-arm-gnueabihf": { | ||||
|             "version": "4.18.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", | ||||
|             "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", | ||||
|             "version": "4.31.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.31.0.tgz", | ||||
|             "integrity": "sha512-0O8ViX+QcBd3ZmGlcFTnYXZKGbFu09EhgD27tgTdGnkcYXLat4KIsBBQeKLR2xZDCXdIBAlWLkiXE1+rJpCxFw==", | ||||
|             "cpu": [ | ||||
|                 "arm" | ||||
|             ], | ||||
|  | @ -599,9 +624,9 @@ | |||
|             ] | ||||
|         }, | ||||
|         "node_modules/@rollup/rollup-linux-arm-musleabihf": { | ||||
|             "version": "4.18.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", | ||||
|             "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", | ||||
|             "version": "4.31.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.31.0.tgz", | ||||
|             "integrity": "sha512-w5IzG0wTVv7B0/SwDnMYmbr2uERQp999q8FMkKG1I+j8hpPX2BYFjWe69xbhbP6J9h2gId/7ogesl9hwblFwwg==", | ||||
|             "cpu": [ | ||||
|                 "arm" | ||||
|             ], | ||||
|  | @ -613,9 +638,9 @@ | |||
|             ] | ||||
|         }, | ||||
|         "node_modules/@rollup/rollup-linux-arm64-gnu": { | ||||
|             "version": "4.18.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", | ||||
|             "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", | ||||
|             "version": "4.31.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.31.0.tgz", | ||||
|             "integrity": "sha512-JyFFshbN5xwy6fulZ8B/8qOqENRmDdEkcIMF0Zz+RsfamEW+Zabl5jAb0IozP/8UKnJ7g2FtZZPEUIAlUSX8cA==", | ||||
|             "cpu": [ | ||||
|                 "arm64" | ||||
|             ], | ||||
|  | @ -627,9 +652,9 @@ | |||
|             ] | ||||
|         }, | ||||
|         "node_modules/@rollup/rollup-linux-arm64-musl": { | ||||
|             "version": "4.18.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", | ||||
|             "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", | ||||
|             "version": "4.31.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.31.0.tgz", | ||||
|             "integrity": "sha512-kpQXQ0UPFeMPmPYksiBL9WS/BDiQEjRGMfklVIsA0Sng347H8W2iexch+IEwaR7OVSKtr2ZFxggt11zVIlZ25g==", | ||||
|             "cpu": [ | ||||
|                 "arm64" | ||||
|             ], | ||||
|  | @ -640,10 +665,24 @@ | |||
|                 "linux" | ||||
|             ] | ||||
|         }, | ||||
|         "node_modules/@rollup/rollup-linux-loongarch64-gnu": { | ||||
|             "version": "4.31.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.31.0.tgz", | ||||
|             "integrity": "sha512-pMlxLjt60iQTzt9iBb3jZphFIl55a70wexvo8p+vVFK+7ifTRookdoXX3bOsRdmfD+OKnMozKO6XM4zR0sHRrQ==", | ||||
|             "cpu": [ | ||||
|                 "loong64" | ||||
|             ], | ||||
|             "dev": true, | ||||
|             "license": "MIT", | ||||
|             "optional": true, | ||||
|             "os": [ | ||||
|                 "linux" | ||||
|             ] | ||||
|         }, | ||||
|         "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { | ||||
|             "version": "4.18.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", | ||||
|             "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", | ||||
|             "version": "4.31.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.31.0.tgz", | ||||
|             "integrity": "sha512-D7TXT7I/uKEuWiRkEFbed1UUYZwcJDU4vZQdPTcepK7ecPhzKOYk4Er2YR4uHKme4qDeIh6N3XrLfpuM7vzRWQ==", | ||||
|             "cpu": [ | ||||
|                 "ppc64" | ||||
|             ], | ||||
|  | @ -655,9 +694,9 @@ | |||
|             ] | ||||
|         }, | ||||
|         "node_modules/@rollup/rollup-linux-riscv64-gnu": { | ||||
|             "version": "4.18.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", | ||||
|             "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", | ||||
|             "version": "4.31.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.31.0.tgz", | ||||
|             "integrity": "sha512-wal2Tc8O5lMBtoePLBYRKj2CImUCJ4UNGJlLwspx7QApYny7K1cUYlzQ/4IGQBLmm+y0RS7dwc3TDO/pmcneTw==", | ||||
|             "cpu": [ | ||||
|                 "riscv64" | ||||
|             ], | ||||
|  | @ -669,9 +708,9 @@ | |||
|             ] | ||||
|         }, | ||||
|         "node_modules/@rollup/rollup-linux-s390x-gnu": { | ||||
|             "version": "4.18.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", | ||||
|             "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", | ||||
|             "version": "4.31.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.31.0.tgz", | ||||
|             "integrity": "sha512-O1o5EUI0+RRMkK9wiTVpk2tyzXdXefHtRTIjBbmFREmNMy7pFeYXCFGbhKFwISA3UOExlo5GGUuuj3oMKdK6JQ==", | ||||
|             "cpu": [ | ||||
|                 "s390x" | ||||
|             ], | ||||
|  | @ -683,9 +722,9 @@ | |||
|             ] | ||||
|         }, | ||||
|         "node_modules/@rollup/rollup-linux-x64-gnu": { | ||||
|             "version": "4.18.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", | ||||
|             "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", | ||||
|             "version": "4.31.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.31.0.tgz", | ||||
|             "integrity": "sha512-zSoHl356vKnNxwOWnLd60ixHNPRBglxpv2g7q0Cd3Pmr561gf0HiAcUBRL3S1vPqRC17Zo2CX/9cPkqTIiai1g==", | ||||
|             "cpu": [ | ||||
|                 "x64" | ||||
|             ], | ||||
|  | @ -697,9 +736,9 @@ | |||
|             ] | ||||
|         }, | ||||
|         "node_modules/@rollup/rollup-linux-x64-musl": { | ||||
|             "version": "4.18.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", | ||||
|             "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", | ||||
|             "version": "4.31.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.31.0.tgz", | ||||
|             "integrity": "sha512-ypB/HMtcSGhKUQNiFwqgdclWNRrAYDH8iMYH4etw/ZlGwiTVxBz2tDrGRrPlfZu6QjXwtd+C3Zib5pFqID97ZA==", | ||||
|             "cpu": [ | ||||
|                 "x64" | ||||
|             ], | ||||
|  | @ -711,9 +750,9 @@ | |||
|             ] | ||||
|         }, | ||||
|         "node_modules/@rollup/rollup-win32-arm64-msvc": { | ||||
|             "version": "4.18.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", | ||||
|             "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", | ||||
|             "version": "4.31.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.31.0.tgz", | ||||
|             "integrity": "sha512-JuhN2xdI/m8Hr+aVO3vspO7OQfUFO6bKLIRTAy0U15vmWjnZDLrEgCZ2s6+scAYaQVpYSh9tZtRijApw9IXyMw==", | ||||
|             "cpu": [ | ||||
|                 "arm64" | ||||
|             ], | ||||
|  | @ -725,9 +764,9 @@ | |||
|             ] | ||||
|         }, | ||||
|         "node_modules/@rollup/rollup-win32-ia32-msvc": { | ||||
|             "version": "4.18.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", | ||||
|             "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", | ||||
|             "version": "4.31.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.31.0.tgz", | ||||
|             "integrity": "sha512-U1xZZXYkvdf5MIWmftU8wrM5PPXzyaY1nGCI4KI4BFfoZxHamsIe+BtnPLIvvPykvQWlVbqUXdLa4aJUuilwLQ==", | ||||
|             "cpu": [ | ||||
|                 "ia32" | ||||
|             ], | ||||
|  | @ -739,9 +778,9 @@ | |||
|             ] | ||||
|         }, | ||||
|         "node_modules/@rollup/rollup-win32-x64-msvc": { | ||||
|             "version": "4.18.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", | ||||
|             "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", | ||||
|             "version": "4.31.0", | ||||
|             "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.31.0.tgz", | ||||
|             "integrity": "sha512-ul8rnCsUumNln5YWwz0ted2ZHFhzhRRnkpBZ+YRuHoRAlUji9KChpOUOndY7uykrPEPXVbHLlsdo6v5yXo/TXw==", | ||||
|             "cpu": [ | ||||
|                 "x64" | ||||
|             ], | ||||
|  | @ -776,25 +815,23 @@ | |||
|             } | ||||
|         }, | ||||
|         "node_modules/@sveltejs/kit": { | ||||
|             "version": "2.5.17", | ||||
|             "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.5.17.tgz", | ||||
|             "integrity": "sha512-wiADwq7VreR3ctOyxilAZOfPz3Jiy2IIp2C8gfafhTdQaVuGIHllfqQm8dXZKADymKr3uShxzgLZFT+a+CM4kA==", | ||||
|             "version": "2.16.0", | ||||
|             "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.16.0.tgz", | ||||
|             "integrity": "sha512-S9i1ZWKqluzoaJ6riYnEdbe+xJluMTMkhABouBa66GaWcAyCjW/jAc0NdJQJ/DXyK1CnP5quBW25e99MNyvLxA==", | ||||
|             "dev": true, | ||||
|             "hasInstallScript": true, | ||||
|             "license": "MIT", | ||||
|             "dependencies": { | ||||
|                 "@types/cookie": "^0.6.0", | ||||
|                 "cookie": "^0.6.0", | ||||
|                 "devalue": "^5.0.0", | ||||
|                 "esm-env": "^1.0.0", | ||||
|                 "devalue": "^5.1.0", | ||||
|                 "esm-env": "^1.2.2", | ||||
|                 "import-meta-resolve": "^4.1.0", | ||||
|                 "kleur": "^4.1.5", | ||||
|                 "magic-string": "^0.30.5", | ||||
|                 "mrmime": "^2.0.0", | ||||
|                 "sade": "^1.8.1", | ||||
|                 "set-cookie-parser": "^2.6.0", | ||||
|                 "sirv": "^2.0.4", | ||||
|                 "tiny-glob": "^0.2.9" | ||||
|                 "sirv": "^3.0.0" | ||||
|             }, | ||||
|             "bin": { | ||||
|                 "svelte-kit": "svelte-kit.js" | ||||
|  | @ -803,9 +840,9 @@ | |||
|                 "node": ">=18.13" | ||||
|             }, | ||||
|             "peerDependencies": { | ||||
|                 "@sveltejs/vite-plugin-svelte": "^3.0.0", | ||||
|                 "@sveltejs/vite-plugin-svelte": "^3.0.0 || ^4.0.0-next.1 || ^5.0.0", | ||||
|                 "svelte": "^4.0.0 || ^5.0.0-next.0", | ||||
|                 "vite": "^5.0.3" | ||||
|                 "vite": "^5.0.3 || ^6.0.0" | ||||
|             } | ||||
|         }, | ||||
|         "node_modules/@sveltejs/vite-plugin-svelte": { | ||||
|  | @ -867,9 +904,9 @@ | |||
|             "license": "MIT" | ||||
|         }, | ||||
|         "node_modules/@types/estree": { | ||||
|             "version": "1.0.5", | ||||
|             "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", | ||||
|             "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", | ||||
|             "version": "1.0.6", | ||||
|             "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", | ||||
|             "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", | ||||
|             "dev": true, | ||||
|             "license": "MIT" | ||||
|         }, | ||||
|  | @ -1066,9 +1103,9 @@ | |||
|             } | ||||
|         }, | ||||
|         "node_modules/devalue": { | ||||
|             "version": "5.0.0", | ||||
|             "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.0.0.tgz", | ||||
|             "integrity": "sha512-gO+/OMXF7488D+u3ue+G7Y4AA3ZmUnB3eHJXmBTgNHvr4ZNzl36A0ZtG+XCRNYCkYx/bFmw4qtkoFLa+wSrwAA==", | ||||
|             "version": "5.1.1", | ||||
|             "resolved": "https://registry.npmjs.org/devalue/-/devalue-5.1.1.tgz", | ||||
|             "integrity": "sha512-maua5KUiapvEwiEAe+XnlZ3Rh0GD+qI1J/nb9vrJc3muPXvcF/8gXYTWF76+5DAqHyDUtOIImEuo0YKE9mshVw==", | ||||
|             "dev": true, | ||||
|             "license": "MIT" | ||||
|         }, | ||||
|  | @ -1184,9 +1221,9 @@ | |||
|             } | ||||
|         }, | ||||
|         "node_modules/esm-env": { | ||||
|             "version": "1.0.0", | ||||
|             "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.0.0.tgz", | ||||
|             "integrity": "sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==", | ||||
|             "version": "1.2.2", | ||||
|             "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.2.2.tgz", | ||||
|             "integrity": "sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==", | ||||
|             "dev": true, | ||||
|             "license": "MIT" | ||||
|         }, | ||||
|  | @ -1215,20 +1252,6 @@ | |||
|                 "node": "^8.16.0 || ^10.6.0 || >=11.0.0" | ||||
|             } | ||||
|         }, | ||||
|         "node_modules/globalyzer": { | ||||
|             "version": "0.1.0", | ||||
|             "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", | ||||
|             "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==", | ||||
|             "dev": true, | ||||
|             "license": "MIT" | ||||
|         }, | ||||
|         "node_modules/globrex": { | ||||
|             "version": "0.1.2", | ||||
|             "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", | ||||
|             "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", | ||||
|             "dev": true, | ||||
|             "license": "MIT" | ||||
|         }, | ||||
|         "node_modules/import-meta-resolve": { | ||||
|             "version": "4.1.0", | ||||
|             "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.1.0.tgz", | ||||
|  | @ -1312,9 +1335,9 @@ | |||
|             "license": "MIT" | ||||
|         }, | ||||
|         "node_modules/nanoid": { | ||||
|             "version": "3.3.7", | ||||
|             "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", | ||||
|             "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", | ||||
|             "version": "3.3.8", | ||||
|             "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", | ||||
|             "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", | ||||
|             "dev": true, | ||||
|             "funding": [ | ||||
|                 { | ||||
|  | @ -1356,9 +1379,9 @@ | |||
|             } | ||||
|         }, | ||||
|         "node_modules/picocolors": { | ||||
|             "version": "1.0.1", | ||||
|             "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", | ||||
|             "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", | ||||
|             "version": "1.1.1", | ||||
|             "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", | ||||
|             "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", | ||||
|             "dev": true, | ||||
|             "license": "ISC" | ||||
|         }, | ||||
|  | @ -1375,9 +1398,9 @@ | |||
|             } | ||||
|         }, | ||||
|         "node_modules/postcss": { | ||||
|             "version": "8.4.38", | ||||
|             "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", | ||||
|             "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", | ||||
|             "version": "8.5.1", | ||||
|             "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.1.tgz", | ||||
|             "integrity": "sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==", | ||||
|             "dev": true, | ||||
|             "funding": [ | ||||
|                 { | ||||
|  | @ -1395,22 +1418,22 @@ | |||
|             ], | ||||
|             "license": "MIT", | ||||
|             "dependencies": { | ||||
|                 "nanoid": "^3.3.7", | ||||
|                 "picocolors": "^1.0.0", | ||||
|                 "source-map-js": "^1.2.0" | ||||
|                 "nanoid": "^3.3.8", | ||||
|                 "picocolors": "^1.1.1", | ||||
|                 "source-map-js": "^1.2.1" | ||||
|             }, | ||||
|             "engines": { | ||||
|                 "node": "^10 || ^12 || >=14" | ||||
|             } | ||||
|         }, | ||||
|         "node_modules/rollup": { | ||||
|             "version": "4.18.0", | ||||
|             "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", | ||||
|             "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", | ||||
|             "version": "4.31.0", | ||||
|             "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.31.0.tgz", | ||||
|             "integrity": "sha512-9cCE8P4rZLx9+PjoyqHLs31V9a9Vpvfo4qNcs6JCiGWYhw2gijSetFbH6SSy1whnkgcefnUwr8sad7tgqsGvnw==", | ||||
|             "dev": true, | ||||
|             "license": "MIT", | ||||
|             "dependencies": { | ||||
|                 "@types/estree": "1.0.5" | ||||
|                 "@types/estree": "1.0.6" | ||||
|             }, | ||||
|             "bin": { | ||||
|                 "rollup": "dist/bin/rollup" | ||||
|  | @ -1420,22 +1443,25 @@ | |||
|                 "npm": ">=8.0.0" | ||||
|             }, | ||||
|             "optionalDependencies": { | ||||
|                 "@rollup/rollup-android-arm-eabi": "4.18.0", | ||||
|                 "@rollup/rollup-android-arm64": "4.18.0", | ||||
|                 "@rollup/rollup-darwin-arm64": "4.18.0", | ||||
|                 "@rollup/rollup-darwin-x64": "4.18.0", | ||||
|                 "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", | ||||
|                 "@rollup/rollup-linux-arm-musleabihf": "4.18.0", | ||||
|                 "@rollup/rollup-linux-arm64-gnu": "4.18.0", | ||||
|                 "@rollup/rollup-linux-arm64-musl": "4.18.0", | ||||
|                 "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", | ||||
|                 "@rollup/rollup-linux-riscv64-gnu": "4.18.0", | ||||
|                 "@rollup/rollup-linux-s390x-gnu": "4.18.0", | ||||
|                 "@rollup/rollup-linux-x64-gnu": "4.18.0", | ||||
|                 "@rollup/rollup-linux-x64-musl": "4.18.0", | ||||
|                 "@rollup/rollup-win32-arm64-msvc": "4.18.0", | ||||
|                 "@rollup/rollup-win32-ia32-msvc": "4.18.0", | ||||
|                 "@rollup/rollup-win32-x64-msvc": "4.18.0", | ||||
|                 "@rollup/rollup-android-arm-eabi": "4.31.0", | ||||
|                 "@rollup/rollup-android-arm64": "4.31.0", | ||||
|                 "@rollup/rollup-darwin-arm64": "4.31.0", | ||||
|                 "@rollup/rollup-darwin-x64": "4.31.0", | ||||
|                 "@rollup/rollup-freebsd-arm64": "4.31.0", | ||||
|                 "@rollup/rollup-freebsd-x64": "4.31.0", | ||||
|                 "@rollup/rollup-linux-arm-gnueabihf": "4.31.0", | ||||
|                 "@rollup/rollup-linux-arm-musleabihf": "4.31.0", | ||||
|                 "@rollup/rollup-linux-arm64-gnu": "4.31.0", | ||||
|                 "@rollup/rollup-linux-arm64-musl": "4.31.0", | ||||
|                 "@rollup/rollup-linux-loongarch64-gnu": "4.31.0", | ||||
|                 "@rollup/rollup-linux-powerpc64le-gnu": "4.31.0", | ||||
|                 "@rollup/rollup-linux-riscv64-gnu": "4.31.0", | ||||
|                 "@rollup/rollup-linux-s390x-gnu": "4.31.0", | ||||
|                 "@rollup/rollup-linux-x64-gnu": "4.31.0", | ||||
|                 "@rollup/rollup-linux-x64-musl": "4.31.0", | ||||
|                 "@rollup/rollup-win32-arm64-msvc": "4.31.0", | ||||
|                 "@rollup/rollup-win32-ia32-msvc": "4.31.0", | ||||
|                 "@rollup/rollup-win32-x64-msvc": "4.31.0", | ||||
|                 "fsevents": "~2.3.2" | ||||
|             } | ||||
|         }, | ||||
|  | @ -1460,9 +1486,9 @@ | |||
|             "license": "MIT" | ||||
|         }, | ||||
|         "node_modules/sirv": { | ||||
|             "version": "2.0.4", | ||||
|             "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", | ||||
|             "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", | ||||
|             "version": "3.0.0", | ||||
|             "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.0.tgz", | ||||
|             "integrity": "sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg==", | ||||
|             "dev": true, | ||||
|             "license": "MIT", | ||||
|             "dependencies": { | ||||
|  | @ -1471,13 +1497,13 @@ | |||
|                 "totalist": "^3.0.0" | ||||
|             }, | ||||
|             "engines": { | ||||
|                 "node": ">= 10" | ||||
|                 "node": ">=18" | ||||
|             } | ||||
|         }, | ||||
|         "node_modules/source-map-js": { | ||||
|             "version": "1.2.0", | ||||
|             "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", | ||||
|             "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", | ||||
|             "version": "1.2.1", | ||||
|             "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", | ||||
|             "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", | ||||
|             "dev": true, | ||||
|             "license": "BSD-3-Clause", | ||||
|             "engines": { | ||||
|  | @ -1485,9 +1511,9 @@ | |||
|             } | ||||
|         }, | ||||
|         "node_modules/svelte": { | ||||
|             "version": "4.2.18", | ||||
|             "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.18.tgz", | ||||
|             "integrity": "sha512-d0FdzYIiAePqRJEb90WlJDkjUEx42xhivxN8muUBmfZnP+tzUgz12DJ2hRJi8sIHCME7jeK1PTMgKPSfTd8JrA==", | ||||
|             "version": "4.2.19", | ||||
|             "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.19.tgz", | ||||
|             "integrity": "sha512-IY1rnGr6izd10B0A8LqsBfmlT5OILVuZ7XsI0vdGPEvuonFV7NYEUK4dAkm9Zg2q0Um92kYjTpS1CAP3Nh/KWw==", | ||||
|             "dev": true, | ||||
|             "license": "MIT", | ||||
|             "dependencies": { | ||||
|  | @ -1549,17 +1575,6 @@ | |||
|                 "url": "https://opencollective.com/svgo" | ||||
|             } | ||||
|         }, | ||||
|         "node_modules/tiny-glob": { | ||||
|             "version": "0.2.9", | ||||
|             "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", | ||||
|             "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==", | ||||
|             "dev": true, | ||||
|             "license": "MIT", | ||||
|             "dependencies": { | ||||
|                 "globalyzer": "0.1.0", | ||||
|                 "globrex": "^0.1.2" | ||||
|             } | ||||
|         }, | ||||
|         "node_modules/totalist": { | ||||
|             "version": "3.0.1", | ||||
|             "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", | ||||
|  | @ -1570,28 +1585,16 @@ | |||
|                 "node": ">=6" | ||||
|             } | ||||
|         }, | ||||
|         "node_modules/typescript": { | ||||
|             "version": "5.5.3", | ||||
|             "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", | ||||
|             "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", | ||||
|             "bin": { | ||||
|                 "tsc": "bin/tsc", | ||||
|                 "tsserver": "bin/tsserver" | ||||
|             }, | ||||
|             "engines": { | ||||
|                 "node": ">=14.17" | ||||
|             } | ||||
|         }, | ||||
|         "node_modules/vite": { | ||||
|             "version": "5.3.1", | ||||
|             "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.1.tgz", | ||||
|             "integrity": "sha512-XBmSKRLXLxiaPYamLv3/hnP/KXDai1NDexN0FpkTaZXTfycHvkRHoenpgl/fvuK/kPbB6xAgoyiryAhQNxYmAQ==", | ||||
|             "version": "5.4.11", | ||||
|             "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", | ||||
|             "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", | ||||
|             "dev": true, | ||||
|             "license": "MIT", | ||||
|             "dependencies": { | ||||
|                 "esbuild": "^0.21.3", | ||||
|                 "postcss": "^8.4.38", | ||||
|                 "rollup": "^4.13.0" | ||||
|                 "postcss": "^8.4.43", | ||||
|                 "rollup": "^4.20.0" | ||||
|             }, | ||||
|             "bin": { | ||||
|                 "vite": "bin/vite.js" | ||||
|  | @ -1610,6 +1613,7 @@ | |||
|                 "less": "*", | ||||
|                 "lightningcss": "^1.21.0", | ||||
|                 "sass": "*", | ||||
|                 "sass-embedded": "*", | ||||
|                 "stylus": "*", | ||||
|                 "sugarss": "*", | ||||
|                 "terser": "^5.4.0" | ||||
|  | @ -1627,6 +1631,9 @@ | |||
|                 "sass": { | ||||
|                     "optional": true | ||||
|                 }, | ||||
|                 "sass-embedded": { | ||||
|                     "optional": true | ||||
|                 }, | ||||
|                 "stylus": { | ||||
|                     "optional": true | ||||
|                 }, | ||||
|  |  | |||
|  | @ -1,6 +1,6 @@ | |||
| { | ||||
|     "name": "campfire-client", | ||||
|     "version": "0.3.0", | ||||
|     "version": "0.4.0", | ||||
|     "description": "social media for the galaxy-wide-web! 🌌", | ||||
|     "private": true, | ||||
|     "type": "module", | ||||
|  | @ -18,7 +18,7 @@ | |||
|         "@poppanator/sveltekit-svg": "^4.2.1", | ||||
|         "@sveltejs/adapter-auto": "^3.2.2", | ||||
|         "@sveltejs/adapter-static": "^3.0.2", | ||||
|         "@sveltejs/kit": "^2.5.17", | ||||
|         "@sveltejs/kit": "^2.16.0", | ||||
|         "@sveltejs/vite-plugin-svelte": "^3.1.1", | ||||
|         "svelte": "^4.2.18", | ||||
|         "vite": "^5.3.1" | ||||
|  |  | |||
|  | @ -149,6 +149,7 @@ export async function getStreamingHealth(host) { | |||
|  * @param {string} host - The domain of the target server. | ||||
|  * @param {string} token - The application token. | ||||
|  * @param {string} min_id - If provided, only shows notifications after this ID. | ||||
|  * @param {string} max_id - If provided, only shows notifications before this ID. | ||||
|  * @param {string} limit - The maximum number of notifications to retrieve (default 40). | ||||
|  * @param {string} types - A list of notification types to filter to. | ||||
|  */ | ||||
|  |  | |||
|  | @ -8,6 +8,7 @@ import { parsePost } from '$lib/post.js'; | |||
| import { parseAccount } from '$lib/account.js'; | ||||
| 
 | ||||
| const prefix = app_name + '_notif_'; | ||||
| const notification_limit = 40; | ||||
| 
 | ||||
| export const notifications = writable([]); | ||||
| export const unread_notif_count = writable(load("unread_count")); | ||||
|  | @ -41,29 +42,29 @@ function load(name) { | |||
|     return data ? data : false; | ||||
| } | ||||
| 
 | ||||
| let loading; | ||||
| export async function getNotifications(min_id, max_id) { | ||||
|     if (loading) return; // no spamming!!
 | ||||
|     loading = true; | ||||
| 
 | ||||
|     const notif_data = await api.getNotifications( | ||||
|     const new_notifications = await api.getNotifications( | ||||
|         get(server).host, | ||||
|         get(app).token, | ||||
|         min_id, | ||||
|         max_id, | ||||
|         notification_limit, | ||||
|     ); | ||||
| 
 | ||||
|     if (!notif_data) { | ||||
|     if (!new_notifications) { | ||||
|         console.error(`Failed to retrieve notifications.`); | ||||
|         loading = false; | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     for (let i in notif_data) { | ||||
|         let notif = notif_data[i]; | ||||
|     for (let i in new_notifications) { | ||||
|         let notif = new_notifications[i]; | ||||
|         notif.accounts = [ await parseAccount(notif.account) ]; | ||||
|         if (get(notifications).length > 0) { | ||||
|             let prev = get(notifications)[get(notifications).length - 1]; | ||||
| 
 | ||||
|         const _notifications = get(notifications); | ||||
|         if (_notifications.length > 0) { | ||||
|             let prev = _notifications[_notifications.length - 1]; | ||||
| 
 | ||||
|             if (notif.type === prev.type) { | ||||
|                 if (prev.status && notif.status && prev.status.id === notif.status.id) { | ||||
|                     notifications.update(notifications => { | ||||
|  | @ -74,8 +75,8 @@ export async function getNotifications(min_id, max_id) { | |||
|                 } | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         notif.status = notif.status ? await parsePost(notif.status, 0, false) : null; | ||||
|         notifications.update(notifications => [...notifications, notif]); | ||||
|     } | ||||
|     loading = false; | ||||
| } | ||||
|  |  | |||
|  | @ -55,8 +55,8 @@ | |||
|         left: 0; | ||||
|         z-index: 100; | ||||
|          | ||||
|         background-color: rgba(0,0,0,0.2); | ||||
|         backdrop-filter: blur(32px) saturate(1.25); | ||||
|         background-color: rgba(0,0,0,0.5); | ||||
|         backdrop-filter: blur(10px) saturate(1.25); | ||||
|         user-select: none; | ||||
| 
 | ||||
|         animation: modal_bg .15s cubic-bezier(0.22, 1, 0.36, 1); | ||||
|  | @ -75,10 +75,12 @@ | |||
|             background-color: rgba(0,0,0,0); | ||||
|             backdrop-filter: blur(0px) saturate(1.0); | ||||
|         } | ||||
|         /* | ||||
|         to { | ||||
|             background-color: rgba(0,0,0,0.2); | ||||
|             backdrop-filter: blur(32px) saturate(1.25); | ||||
|             background-color: rgba(0,0,0,0.5); | ||||
|             backdrop-filter: blur(10px) saturate(1.25); | ||||
|         } | ||||
|         */ | ||||
|     } | ||||
| 
 | ||||
|     @keyframes modal_pop_up { | ||||
|  | @ -92,4 +94,4 @@ | |||
|             transform: translateY(0px) scale(1); | ||||
|         } | ||||
|     } | ||||
| </style> | ||||
| </style> | ||||
|  |  | |||
|  | @ -106,7 +106,7 @@ | |||
|                     {data.status.warning} | ||||
|                 </div> | ||||
|             {:else} | ||||
|                 {@html data.status.html} | ||||
|                 {@html data.status.rich_text} | ||||
|             {/if} | ||||
| 
 | ||||
|             {#if data.status.media && data.status.media.length > 0} | ||||
|  | @ -148,6 +148,7 @@ | |||
|         text-decoration: inherit; | ||||
|         color: inherit; | ||||
|         transition: background-color .1s; | ||||
|         cursor: pointer; | ||||
|     } | ||||
| 
 | ||||
|     .notification:hover { | ||||
|  |  | |||
|  | @ -87,6 +87,7 @@ | |||
|         padding: 16px; | ||||
|         border-radius: 8px; | ||||
|         transition: background-color .1s; | ||||
|         cursor: pointer; | ||||
|     } | ||||
|      | ||||
|     .post:not(.focused) { | ||||
|  |  | |||
|  | @ -7,17 +7,25 @@ | |||
| 
 | ||||
|     if (!$account) goto("/"); | ||||
| 
 | ||||
|     getNotifications().then(notif_data => { | ||||
|         if (notif_data && notif_data.constructor === Array) { | ||||
|             last_read_notif_id.set(notif_data[0].id); | ||||
|     getNotifications().then(() => { | ||||
|         if ($notifications.length > 0) { | ||||
|             last_read_notif_id.set($notifications[0].id); | ||||
|         } | ||||
|         unread_notif_count.set(0); | ||||
|     }); | ||||
| 
 | ||||
|     let notif_lock = true; // `true` means "open" | ||||
|     document.addEventListener("scroll", () => { | ||||
|         if (!notif_lock) return; | ||||
|         if ($account && $page.url.pathname !== "/notifications") return; | ||||
| 
 | ||||
|         if (window.innerHeight + window.scrollY >= document.body.offsetHeight - 2048) { | ||||
|             let max_id = $notifications.length > 0 ? $notifications[$notifications.length - 1].id : null; | ||||
|             getNotifications(null, max_id); | ||||
| 
 | ||||
|             notif_lock = false; | ||||
|             getNotifications(null, max_id).then(() => { | ||||
|                 notif_lock = true; | ||||
|             }); | ||||
|         } | ||||
|     }); | ||||
| </script> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue