checkpoint 7
This commit is contained in:
parent
98eaa919ad
commit
859844bcf4
15 changed files with 813 additions and 53 deletions
10
asset-api/.editorconfig
Normal file
10
asset-api/.editorconfig
Normal file
|
@ -0,0 +1,10 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
|
||||
[*.{js,json,yml}]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
4
asset-api/.gitattributes
vendored
Normal file
4
asset-api/.gitattributes
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
/.yarn/** linguist-vendored
|
||||
/.yarn/releases/* binary
|
||||
/.yarn/plugins/**/* binary
|
||||
/.pnp.* binary linguist-generated
|
13
asset-api/.gitignore
vendored
Normal file
13
asset-api/.gitignore
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
.yarn/*
|
||||
!.yarn/patches
|
||||
!.yarn/plugins
|
||||
!.yarn/releases
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
||||
|
||||
# Swap the comments on the following lines if you wish to use zero-installs
|
||||
# In that case, don't forget to run `yarn config set enableGlobalCache false`!
|
||||
# Documentation here: https://yarnpkg.com/features/caching#zero-installs
|
||||
|
||||
#!.yarn/cache
|
||||
.pnp.*
|
1
asset-api/README.md
Normal file
1
asset-api/README.md
Normal file
|
@ -0,0 +1 @@
|
|||
# asset-api
|
13
asset-api/index.js
Normal file
13
asset-api/index.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
import Fastify from "fastify";
|
||||
|
||||
const ASSET_API_LANDING_MESSAGE = "asset-api v1.0.0"
|
||||
|
||||
const fastify = new Fastify({
|
||||
logger: true,
|
||||
})
|
||||
|
||||
fastify.get("/", async (request, reply) => {
|
||||
return ASSET_API_LANDING_MESSAGE
|
||||
})
|
||||
|
||||
fastify.listen({ port: 3001 })
|
13
asset-api/package.json
Normal file
13
asset-api/package.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"name": "asset-api",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"packageManager": "yarn@4.3.0",
|
||||
"dependencies": {
|
||||
"fastify": "^4.28.0",
|
||||
"uuid": "^10.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "node index.js"
|
||||
}
|
||||
}
|
549
asset-api/yarn.lock
Normal file
549
asset-api/yarn.lock
Normal file
|
@ -0,0 +1,549 @@
|
|||
# This file is generated by running "yarn install" inside your project.
|
||||
# Manual changes might be lost - proceed with caution!
|
||||
|
||||
__metadata:
|
||||
version: 8
|
||||
cacheKey: 10c0
|
||||
|
||||
"@fastify/ajv-compiler@npm:^3.5.0":
|
||||
version: 3.5.0
|
||||
resolution: "@fastify/ajv-compiler@npm:3.5.0"
|
||||
dependencies:
|
||||
ajv: "npm:^8.11.0"
|
||||
ajv-formats: "npm:^2.1.1"
|
||||
fast-uri: "npm:^2.0.0"
|
||||
checksum: 10c0/d10df76b7016984bf70bc6aca99962468ec43e0be5772d4aa3a7735ae78be44fdbcb2c078fe0cfdffec076080dfb7cbdbf4b729e52b168039477126f9d023af0
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@fastify/error@npm:^3.3.0, @fastify/error@npm:^3.4.0":
|
||||
version: 3.4.1
|
||||
resolution: "@fastify/error@npm:3.4.1"
|
||||
checksum: 10c0/1f1a0faa8c86639afb6f4bd47a9cdc1f0f20ce0d6944340fbdec8218aaba91dc9cae9ed78e24e61bceb782a867efda2b9a6320091f00dcbb896d9c8a9bdf5f96
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@fastify/fast-json-stringify-compiler@npm:^4.3.0":
|
||||
version: 4.3.0
|
||||
resolution: "@fastify/fast-json-stringify-compiler@npm:4.3.0"
|
||||
dependencies:
|
||||
fast-json-stringify: "npm:^5.7.0"
|
||||
checksum: 10c0/513ef296f5ed682f7a460cfa6c5fb917a32fc540111b873c9937f944558e021492b18f30f9fd8dd20db252381a4428adbcc9f03a077f16c86d02f081eb490c7b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@fastify/merge-json-schemas@npm:^0.1.0":
|
||||
version: 0.1.1
|
||||
resolution: "@fastify/merge-json-schemas@npm:0.1.1"
|
||||
dependencies:
|
||||
fast-deep-equal: "npm:^3.1.3"
|
||||
checksum: 10c0/7979ce12724f7b98aea06f0bb9afb20dd869f0ff6fc697517135cbb54e0a36b062cbb38ec176fe43d1fc455576839240df8f33533939ace2d64a6218a6e6b9c1
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"abort-controller@npm:^3.0.0":
|
||||
version: 3.0.0
|
||||
resolution: "abort-controller@npm:3.0.0"
|
||||
dependencies:
|
||||
event-target-shim: "npm:^5.0.0"
|
||||
checksum: 10c0/90ccc50f010250152509a344eb2e71977fbf8db0ab8f1061197e3275ddf6c61a41a6edfd7b9409c664513131dd96e962065415325ef23efa5db931b382d24ca5
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"abstract-logging@npm:^2.0.1":
|
||||
version: 2.0.1
|
||||
resolution: "abstract-logging@npm:2.0.1"
|
||||
checksum: 10c0/304879d9babcf6772260e5ddde632e6428e1f42f7a7a116d4689e97ad813a20e0ec2dd1e0a122f3617557f40091b9ca85735de4b48c17a2041268cb47b3f8ef1
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ajv-formats@npm:^2.1.1":
|
||||
version: 2.1.1
|
||||
resolution: "ajv-formats@npm:2.1.1"
|
||||
dependencies:
|
||||
ajv: "npm:^8.0.0"
|
||||
peerDependencies:
|
||||
ajv: ^8.0.0
|
||||
peerDependenciesMeta:
|
||||
ajv:
|
||||
optional: true
|
||||
checksum: 10c0/e43ba22e91b6a48d96224b83d260d3a3a561b42d391f8d3c6d2c1559f9aa5b253bfb306bc94bbeca1d967c014e15a6efe9a207309e95b3eaae07fcbcdc2af662
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ajv-formats@npm:^3.0.1":
|
||||
version: 3.0.1
|
||||
resolution: "ajv-formats@npm:3.0.1"
|
||||
dependencies:
|
||||
ajv: "npm:^8.0.0"
|
||||
peerDependencies:
|
||||
ajv: ^8.0.0
|
||||
peerDependenciesMeta:
|
||||
ajv:
|
||||
optional: true
|
||||
checksum: 10c0/168d6bca1ea9f163b41c8147bae537e67bd963357a5488a1eaf3abe8baa8eec806d4e45f15b10767e6020679315c7e1e5e6803088dfb84efa2b4e9353b83dd0a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ajv@npm:^8.0.0, ajv@npm:^8.10.0, ajv@npm:^8.11.0":
|
||||
version: 8.16.0
|
||||
resolution: "ajv@npm:8.16.0"
|
||||
dependencies:
|
||||
fast-deep-equal: "npm:^3.1.3"
|
||||
json-schema-traverse: "npm:^1.0.0"
|
||||
require-from-string: "npm:^2.0.2"
|
||||
uri-js: "npm:^4.4.1"
|
||||
checksum: 10c0/6fc38aa8fd4fbfaa7096ac049e48c0cb440db36b76fef2d7d5b7d92b102735670d055d412d19176c08c9d48eaa9d06661b67e59f04943dc71ab1551e0484f88c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"asset-api@workspace:.":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "asset-api@workspace:."
|
||||
dependencies:
|
||||
fastify: "npm:^4.28.0"
|
||||
uuid: "npm:^10.0.0"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"atomic-sleep@npm:^1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "atomic-sleep@npm:1.0.0"
|
||||
checksum: 10c0/e329a6665512736a9bbb073e1761b4ec102f7926cce35037753146a9db9c8104f5044c1662e4a863576ce544fb8be27cd2be6bc8c1a40147d03f31eb1cfb6e8a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"avvio@npm:^8.3.0":
|
||||
version: 8.3.2
|
||||
resolution: "avvio@npm:8.3.2"
|
||||
dependencies:
|
||||
"@fastify/error": "npm:^3.3.0"
|
||||
fastq: "npm:^1.17.1"
|
||||
checksum: 10c0/280767ca1259cac1e78fc75ee4f1f6a735914e045015b1ac4c0ce9c5b0933edcb7e9a31fb286a479e51e56562b352dcfa35941e6f555edd341ed5d355e36e4ac
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"base64-js@npm:^1.3.1":
|
||||
version: 1.5.1
|
||||
resolution: "base64-js@npm:1.5.1"
|
||||
checksum: 10c0/f23823513b63173a001030fae4f2dabe283b99a9d324ade3ad3d148e218134676f1ee8568c877cd79ec1c53158dcf2d2ba527a97c606618928ba99dd930102bf
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"buffer@npm:^6.0.3":
|
||||
version: 6.0.3
|
||||
resolution: "buffer@npm:6.0.3"
|
||||
dependencies:
|
||||
base64-js: "npm:^1.3.1"
|
||||
ieee754: "npm:^1.2.1"
|
||||
checksum: 10c0/2a905fbbcde73cc5d8bd18d1caa23715d5f83a5935867c2329f0ac06104204ba7947be098fe1317fbd8830e26090ff8e764f08cd14fefc977bb248c3487bcbd0
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"cookie@npm:^0.6.0":
|
||||
version: 0.6.0
|
||||
resolution: "cookie@npm:0.6.0"
|
||||
checksum: 10c0/f2318b31af7a31b4ddb4a678d024514df5e705f9be5909a192d7f116cfb6d45cbacf96a473fa733faa95050e7cff26e7832bb3ef94751592f1387b71c8956686
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"event-target-shim@npm:^5.0.0":
|
||||
version: 5.0.1
|
||||
resolution: "event-target-shim@npm:5.0.1"
|
||||
checksum: 10c0/0255d9f936215fd206156fd4caa9e8d35e62075d720dc7d847e89b417e5e62cf1ce6c9b4e0a1633a9256de0efefaf9f8d26924b1f3c8620cffb9db78e7d3076b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"events@npm:^3.3.0":
|
||||
version: 3.3.0
|
||||
resolution: "events@npm:3.3.0"
|
||||
checksum: 10c0/d6b6f2adbccbcda74ddbab52ed07db727ef52e31a61ed26db9feb7dc62af7fc8e060defa65e5f8af9449b86b52cc1a1f6a79f2eafcf4e62add2b7a1fa4a432f6
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"fast-content-type-parse@npm:^1.1.0":
|
||||
version: 1.1.0
|
||||
resolution: "fast-content-type-parse@npm:1.1.0"
|
||||
checksum: 10c0/882bf990fa5d64be1825ce183818db43900ece0d7ef184cb9409bae8ed1001acbe536a657b1496382cb3e308e71ab39cc399bbdae70cba1745eecaeca4e55384
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"fast-decode-uri-component@npm:^1.0.1":
|
||||
version: 1.0.1
|
||||
resolution: "fast-decode-uri-component@npm:1.0.1"
|
||||
checksum: 10c0/039d50c2e99d64f999c3f2126c23fbf75a04a4117e218a149ca0b1d2aeb8c834b7b19d643b9d35d4eabce357189a6a94085f78cf48869e6e26cc59b036284bc3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"fast-deep-equal@npm:^3.1.3":
|
||||
version: 3.1.3
|
||||
resolution: "fast-deep-equal@npm:3.1.3"
|
||||
checksum: 10c0/40dedc862eb8992c54579c66d914635afbec43350afbbe991235fdcb4e3a8d5af1b23ae7e79bef7d4882d0ecee06c3197488026998fb19f72dc95acff1d1b1d0
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"fast-json-stringify@npm:^5.7.0, fast-json-stringify@npm:^5.8.0":
|
||||
version: 5.16.0
|
||||
resolution: "fast-json-stringify@npm:5.16.0"
|
||||
dependencies:
|
||||
"@fastify/merge-json-schemas": "npm:^0.1.0"
|
||||
ajv: "npm:^8.10.0"
|
||||
ajv-formats: "npm:^3.0.1"
|
||||
fast-deep-equal: "npm:^3.1.3"
|
||||
fast-uri: "npm:^2.1.0"
|
||||
json-schema-ref-resolver: "npm:^1.0.1"
|
||||
rfdc: "npm:^1.2.0"
|
||||
checksum: 10c0/03d12097eb054dbfd585b494a5ff37f7fca5e68fd167029b91156423cc78eb854ff40c6fa6cc6f56305dabc4616836b7dbbddd05c3fed306444b751b428544f1
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"fast-querystring@npm:^1.0.0":
|
||||
version: 1.1.2
|
||||
resolution: "fast-querystring@npm:1.1.2"
|
||||
dependencies:
|
||||
fast-decode-uri-component: "npm:^1.0.1"
|
||||
checksum: 10c0/e8223273a9b199722f760f5a047a77ad049a14bd444b821502cb8218f5925e3a5fffb56b64389bca73ab2ac6f1aa7aebbe4e203e5f6e53ff5978de97c0fde4e3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"fast-redact@npm:^3.1.1":
|
||||
version: 3.5.0
|
||||
resolution: "fast-redact@npm:3.5.0"
|
||||
checksum: 10c0/7e2ce4aad6e7535e0775bf12bd3e4f2e53d8051d8b630e0fa9e67f68cb0b0e6070d2f7a94b1d0522ef07e32f7c7cda5755e2b677a6538f1e9070ca053c42343a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"fast-uri@npm:^2.0.0, fast-uri@npm:^2.1.0":
|
||||
version: 2.4.0
|
||||
resolution: "fast-uri@npm:2.4.0"
|
||||
checksum: 10c0/300453cfe2f7d5ec16be0f2c8dc5b280edbaca59440b2deb4ab56ac0f584637179e9ee7539d0b70ef0fce9608245ebfa75307c84fa4829b1065c3b7ef7dcf706
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"fastify@npm:^4.28.0":
|
||||
version: 4.28.0
|
||||
resolution: "fastify@npm:4.28.0"
|
||||
dependencies:
|
||||
"@fastify/ajv-compiler": "npm:^3.5.0"
|
||||
"@fastify/error": "npm:^3.4.0"
|
||||
"@fastify/fast-json-stringify-compiler": "npm:^4.3.0"
|
||||
abstract-logging: "npm:^2.0.1"
|
||||
avvio: "npm:^8.3.0"
|
||||
fast-content-type-parse: "npm:^1.1.0"
|
||||
fast-json-stringify: "npm:^5.8.0"
|
||||
find-my-way: "npm:^8.0.0"
|
||||
light-my-request: "npm:^5.11.0"
|
||||
pino: "npm:^9.0.0"
|
||||
process-warning: "npm:^3.0.0"
|
||||
proxy-addr: "npm:^2.0.7"
|
||||
rfdc: "npm:^1.3.0"
|
||||
secure-json-parse: "npm:^2.7.0"
|
||||
semver: "npm:^7.5.4"
|
||||
toad-cache: "npm:^3.3.0"
|
||||
checksum: 10c0/24307900a5ef5b8d6357d3cec40abf621859b8f6e3a046bfc5a45ec7fedec42c51bde0bb3c5913f7badd91d5d69a485e1f3e0e2310483103fabc472cb0e122cd
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"fastq@npm:^1.17.1":
|
||||
version: 1.17.1
|
||||
resolution: "fastq@npm:1.17.1"
|
||||
dependencies:
|
||||
reusify: "npm:^1.0.4"
|
||||
checksum: 10c0/1095f16cea45fb3beff558bb3afa74ca7a9250f5a670b65db7ed585f92b4b48381445cd328b3d87323da81e43232b5d5978a8201bde84e0cd514310f1ea6da34
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"find-my-way@npm:^8.0.0":
|
||||
version: 8.2.0
|
||||
resolution: "find-my-way@npm:8.2.0"
|
||||
dependencies:
|
||||
fast-deep-equal: "npm:^3.1.3"
|
||||
fast-querystring: "npm:^1.0.0"
|
||||
safe-regex2: "npm:^3.1.0"
|
||||
checksum: 10c0/f0f0370215f7b693729483481cd8c642a2e42e7ec7296f099faf46c523a3cac2bcafc24229dc971f87def36c5fa1fdf7f08a7238144affd2ab3c57f75b9aaca6
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"forwarded@npm:0.2.0":
|
||||
version: 0.2.0
|
||||
resolution: "forwarded@npm:0.2.0"
|
||||
checksum: 10c0/9b67c3fac86acdbc9ae47ba1ddd5f2f81526fa4c8226863ede5600a3f7c7416ef451f6f1e240a3cc32d0fd79fcfe6beb08fd0da454f360032bde70bf80afbb33
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ieee754@npm:^1.2.1":
|
||||
version: 1.2.1
|
||||
resolution: "ieee754@npm:1.2.1"
|
||||
checksum: 10c0/b0782ef5e0935b9f12883a2e2aa37baa75da6e66ce6515c168697b42160807d9330de9a32ec1ed73149aea02e0d822e572bca6f1e22bdcbd2149e13b050b17bb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ipaddr.js@npm:1.9.1":
|
||||
version: 1.9.1
|
||||
resolution: "ipaddr.js@npm:1.9.1"
|
||||
checksum: 10c0/0486e775047971d3fdb5fb4f063829bac45af299ae0b82dcf3afa2145338e08290563a2a70f34b732d795ecc8311902e541a8530eeb30d75860a78ff4e94ce2a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"json-schema-ref-resolver@npm:^1.0.1":
|
||||
version: 1.0.1
|
||||
resolution: "json-schema-ref-resolver@npm:1.0.1"
|
||||
dependencies:
|
||||
fast-deep-equal: "npm:^3.1.3"
|
||||
checksum: 10c0/aa89d88108c0109ae35b913c89c132fb50c00f3b99fc8a8309b524b9e3a6a77414f19a6a35a1253871462984cbabc74279ebbd9bf103c6629fb7b37c9fb59bcf
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"json-schema-traverse@npm:^1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "json-schema-traverse@npm:1.0.0"
|
||||
checksum: 10c0/71e30015d7f3d6dc1c316d6298047c8ef98a06d31ad064919976583eb61e1018a60a0067338f0f79cabc00d84af3fcc489bd48ce8a46ea165d9541ba17fb30c6
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"light-my-request@npm:^5.11.0":
|
||||
version: 5.13.0
|
||||
resolution: "light-my-request@npm:5.13.0"
|
||||
dependencies:
|
||||
cookie: "npm:^0.6.0"
|
||||
process-warning: "npm:^3.0.0"
|
||||
set-cookie-parser: "npm:^2.4.1"
|
||||
checksum: 10c0/460117f30e09c2eec3a62e6ba4264111a28b881fdd0ea79493ed889ebf69a56482d603f0685a0e2930b5ec53205d28c46f3cdf13d7888914852eb7c4dac83285
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"on-exit-leak-free@npm:^2.1.0":
|
||||
version: 2.1.2
|
||||
resolution: "on-exit-leak-free@npm:2.1.2"
|
||||
checksum: 10c0/faea2e1c9d696ecee919026c32be8d6a633a7ac1240b3b87e944a380e8a11dc9c95c4a1f8fb0568de7ab8db3823e790f12bda45296b1d111e341aad3922a0570
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"pino-abstract-transport@npm:^1.2.0":
|
||||
version: 1.2.0
|
||||
resolution: "pino-abstract-transport@npm:1.2.0"
|
||||
dependencies:
|
||||
readable-stream: "npm:^4.0.0"
|
||||
split2: "npm:^4.0.0"
|
||||
checksum: 10c0/b4ab59529b7a91f488440147fc58ee0827a6c1c5ca3627292339354b1381072c1a6bfa9b46d03ad27872589e8477ecf74da12cf286e1e6b665ac64a3b806bf07
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"pino-std-serializers@npm:^7.0.0":
|
||||
version: 7.0.0
|
||||
resolution: "pino-std-serializers@npm:7.0.0"
|
||||
checksum: 10c0/73e694d542e8de94445a03a98396cf383306de41fd75ecc07085d57ed7a57896198508a0dec6eefad8d701044af21eb27253ccc352586a03cf0d4a0bd25b4133
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"pino@npm:^9.0.0":
|
||||
version: 9.2.0
|
||||
resolution: "pino@npm:9.2.0"
|
||||
dependencies:
|
||||
atomic-sleep: "npm:^1.0.0"
|
||||
fast-redact: "npm:^3.1.1"
|
||||
on-exit-leak-free: "npm:^2.1.0"
|
||||
pino-abstract-transport: "npm:^1.2.0"
|
||||
pino-std-serializers: "npm:^7.0.0"
|
||||
process-warning: "npm:^3.0.0"
|
||||
quick-format-unescaped: "npm:^4.0.3"
|
||||
real-require: "npm:^0.2.0"
|
||||
safe-stable-stringify: "npm:^2.3.1"
|
||||
sonic-boom: "npm:^4.0.1"
|
||||
thread-stream: "npm:^3.0.0"
|
||||
bin:
|
||||
pino: bin.js
|
||||
checksum: 10c0/5fbd226ff7dab0961232b5aa5eca0530cdc5bb29f6bf17d929e42239293b1a587a26cc311db6abc1090c9dd57e8f7b031eae341b41d00d4a642b4f1736474c80
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"process-warning@npm:^3.0.0":
|
||||
version: 3.0.0
|
||||
resolution: "process-warning@npm:3.0.0"
|
||||
checksum: 10c0/60f3c8ddee586f0706c1e6cb5aa9c86df05774b9330d792d7c8851cf0031afd759d665404d07037e0b4901b55c44a423f07bdc465c63de07d8d23196bb403622
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"process@npm:^0.11.10":
|
||||
version: 0.11.10
|
||||
resolution: "process@npm:0.11.10"
|
||||
checksum: 10c0/40c3ce4b7e6d4b8c3355479df77aeed46f81b279818ccdc500124e6a5ab882c0cc81ff7ea16384873a95a74c4570b01b120f287abbdd4c877931460eca6084b3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"proxy-addr@npm:^2.0.7":
|
||||
version: 2.0.7
|
||||
resolution: "proxy-addr@npm:2.0.7"
|
||||
dependencies:
|
||||
forwarded: "npm:0.2.0"
|
||||
ipaddr.js: "npm:1.9.1"
|
||||
checksum: 10c0/c3eed999781a35f7fd935f398b6d8920b6fb00bbc14287bc6de78128ccc1a02c89b95b56742bf7cf0362cc333c61d138532049c7dedc7a328ef13343eff81210
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"punycode@npm:^2.1.0":
|
||||
version: 2.3.1
|
||||
resolution: "punycode@npm:2.3.1"
|
||||
checksum: 10c0/14f76a8206bc3464f794fb2e3d3cc665ae416c01893ad7a02b23766eb07159144ee612ad67af5e84fa4479ccfe67678c4feb126b0485651b302babf66f04f9e9
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"quick-format-unescaped@npm:^4.0.3":
|
||||
version: 4.0.4
|
||||
resolution: "quick-format-unescaped@npm:4.0.4"
|
||||
checksum: 10c0/fe5acc6f775b172ca5b4373df26f7e4fd347975578199e7d74b2ae4077f0af05baa27d231de1e80e8f72d88275ccc6028568a7a8c9ee5e7368ace0e18eff93a4
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"readable-stream@npm:^4.0.0":
|
||||
version: 4.5.2
|
||||
resolution: "readable-stream@npm:4.5.2"
|
||||
dependencies:
|
||||
abort-controller: "npm:^3.0.0"
|
||||
buffer: "npm:^6.0.3"
|
||||
events: "npm:^3.3.0"
|
||||
process: "npm:^0.11.10"
|
||||
string_decoder: "npm:^1.3.0"
|
||||
checksum: 10c0/a2c80e0e53aabd91d7df0330929e32d0a73219f9477dbbb18472f6fdd6a11a699fc5d172a1beff98d50eae4f1496c950ffa85b7cc2c4c196963f289a5f39275d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"real-require@npm:^0.2.0":
|
||||
version: 0.2.0
|
||||
resolution: "real-require@npm:0.2.0"
|
||||
checksum: 10c0/23eea5623642f0477412ef8b91acd3969015a1501ed34992ada0e3af521d3c865bb2fe4cdbfec5fe4b505f6d1ef6a03e5c3652520837a8c3b53decff7e74b6a0
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"require-from-string@npm:^2.0.2":
|
||||
version: 2.0.2
|
||||
resolution: "require-from-string@npm:2.0.2"
|
||||
checksum: 10c0/aaa267e0c5b022fc5fd4eef49d8285086b15f2a1c54b28240fdf03599cbd9c26049fee3eab894f2e1f6ca65e513b030a7c264201e3f005601e80c49fb2937ce2
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ret@npm:~0.4.0":
|
||||
version: 0.4.3
|
||||
resolution: "ret@npm:0.4.3"
|
||||
checksum: 10c0/93e4e81cf393ebbafa1a26816e0b22ad0e2539c10e267d46ce8754c3f385b7aa839772ee1f83fdd2487b43d1081f29af41a19160e85456311f6f1778e14ba66b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"reusify@npm:^1.0.4":
|
||||
version: 1.0.4
|
||||
resolution: "reusify@npm:1.0.4"
|
||||
checksum: 10c0/c19ef26e4e188f408922c46f7ff480d38e8dfc55d448310dfb518736b23ed2c4f547fb64a6ed5bdba92cd7e7ddc889d36ff78f794816d5e71498d645ef476107
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"rfdc@npm:^1.2.0, rfdc@npm:^1.3.0":
|
||||
version: 1.4.1
|
||||
resolution: "rfdc@npm:1.4.1"
|
||||
checksum: 10c0/4614e4292356cafade0b6031527eea9bc90f2372a22c012313be1dcc69a3b90c7338158b414539be863fa95bfcb2ddcd0587be696841af4e6679d85e62c060c7
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"safe-buffer@npm:~5.2.0":
|
||||
version: 5.2.1
|
||||
resolution: "safe-buffer@npm:5.2.1"
|
||||
checksum: 10c0/6501914237c0a86e9675d4e51d89ca3c21ffd6a31642efeba25ad65720bce6921c9e7e974e5be91a786b25aa058b5303285d3c15dbabf983a919f5f630d349f3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"safe-regex2@npm:^3.1.0":
|
||||
version: 3.1.0
|
||||
resolution: "safe-regex2@npm:3.1.0"
|
||||
dependencies:
|
||||
ret: "npm:~0.4.0"
|
||||
checksum: 10c0/5e5e7f9f116ddfd324b1fdc65ad4470937eebc8883d34669ce8c5afbda64f1954e5e4c2e754ef6281e5f6762e0b8c4e20fb9eec4d47355526f8cc1f6a9764624
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"safe-stable-stringify@npm:^2.3.1":
|
||||
version: 2.4.3
|
||||
resolution: "safe-stable-stringify@npm:2.4.3"
|
||||
checksum: 10c0/81dede06b8f2ae794efd868b1e281e3c9000e57b39801c6c162267eb9efda17bd7a9eafa7379e1f1cacd528d4ced7c80d7460ad26f62ada7c9e01dec61b2e768
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"secure-json-parse@npm:^2.7.0":
|
||||
version: 2.7.0
|
||||
resolution: "secure-json-parse@npm:2.7.0"
|
||||
checksum: 10c0/f57eb6a44a38a3eeaf3548228585d769d788f59007454214fab9ed7f01fbf2e0f1929111da6db28cf0bcc1a2e89db5219a59e83eeaec3a54e413a0197ce879e4
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"semver@npm:^7.5.4":
|
||||
version: 7.6.2
|
||||
resolution: "semver@npm:7.6.2"
|
||||
bin:
|
||||
semver: bin/semver.js
|
||||
checksum: 10c0/97d3441e97ace8be4b1976433d1c32658f6afaff09f143e52c593bae7eef33de19e3e369c88bd985ce1042c6f441c80c6803078d1de2a9988080b66684cbb30c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"set-cookie-parser@npm:^2.4.1":
|
||||
version: 2.6.0
|
||||
resolution: "set-cookie-parser@npm:2.6.0"
|
||||
checksum: 10c0/739da029f0e56806a103fcd5501d9c475e19e77bd8274192d7ae5c374ae714a82bba9a7ac00b0330a18227c5644b08df9e442240527be578f5a6030f9bb2bb80
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"sonic-boom@npm:^4.0.1":
|
||||
version: 4.0.1
|
||||
resolution: "sonic-boom@npm:4.0.1"
|
||||
dependencies:
|
||||
atomic-sleep: "npm:^1.0.0"
|
||||
checksum: 10c0/7b467f2bc8af7ff60bf210382f21c59728cc4b769af9b62c31dd88723f5cc472752d2320736cc366acc7c765ddd5bec3072c033b0faf249923f576a7453ba9d3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"split2@npm:^4.0.0":
|
||||
version: 4.2.0
|
||||
resolution: "split2@npm:4.2.0"
|
||||
checksum: 10c0/b292beb8ce9215f8c642bb68be6249c5a4c7f332fc8ecadae7be5cbdf1ea95addc95f0459ef2e7ad9d45fd1064698a097e4eb211c83e772b49bc0ee423e91534
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"string_decoder@npm:^1.3.0":
|
||||
version: 1.3.0
|
||||
resolution: "string_decoder@npm:1.3.0"
|
||||
dependencies:
|
||||
safe-buffer: "npm:~5.2.0"
|
||||
checksum: 10c0/810614ddb030e271cd591935dcd5956b2410dd079d64ff92a1844d6b7588bf992b3e1b69b0f4d34a3e06e0bd73046ac646b5264c1987b20d0601f81ef35d731d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"thread-stream@npm:^3.0.0":
|
||||
version: 3.1.0
|
||||
resolution: "thread-stream@npm:3.1.0"
|
||||
dependencies:
|
||||
real-require: "npm:^0.2.0"
|
||||
checksum: 10c0/c36118379940b77a6ef3e6f4d5dd31e97b8210c3f7b9a54eb8fe6358ab173f6d0acfaf69b9c3db024b948c0c5fd2a7df93e2e49151af02076b35ada3205ec9a6
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"toad-cache@npm:^3.3.0":
|
||||
version: 3.7.0
|
||||
resolution: "toad-cache@npm:3.7.0"
|
||||
checksum: 10c0/7dae2782ee20b22c9798bb8b71dec7ec6a0091021d2ea9dd6e8afccab6b65b358fdba49a02209fac574499702e2c000660721516c87c2538d1b2c0ba03e8c0c3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"uri-js@npm:^4.4.1":
|
||||
version: 4.4.1
|
||||
resolution: "uri-js@npm:4.4.1"
|
||||
dependencies:
|
||||
punycode: "npm:^2.1.0"
|
||||
checksum: 10c0/4ef57b45aa820d7ac6496e9208559986c665e49447cb072744c13b66925a362d96dd5a46c4530a6b8e203e5db5fe849369444440cb22ecfc26c679359e5dfa3c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"uuid@npm:^10.0.0":
|
||||
version: 10.0.0
|
||||
resolution: "uuid@npm:10.0.0"
|
||||
bin:
|
||||
uuid: dist/bin/uuid
|
||||
checksum: 10c0/eab18c27fe4ab9fb9709a5d5f40119b45f2ec8314f8d4cf12ce27e4c6f4ffa4a6321dc7db6c515068fa373c075b49691ba969f0010bf37f44c37ca40cd6bf7fe
|
||||
languageName: node
|
||||
linkType: hard
|
|
@ -1,5 +1,63 @@
|
|||
export type Entry = SongEntry | AlbumEntry | EventEntry | MemoryEntry | FeelingEntry | EnvironmentEntry | DateEntry;
|
||||
export const TITLED_ENTRIES = ["event", "environment", "memory"];
|
||||
|
||||
export type KnownFeeling = "relaxed" | "afraid" | "angry" | "bad" | "bored" | "confused" | "excited" | "fine" | "happy" | "hurt" | "in love" | "mad" | "nervous" | "okay" | "sad" | "scared" | "shy" | "sleepy" | "active" | "surprised" | "tired" | "upset" | "worried";
|
||||
|
||||
export type Entry = {
|
||||
id: string,
|
||||
base: SongEntry | AlbumEntry | EventEntry | MemoryEntry | FeelingEntry | EnvironmentEntry | DateEntry,
|
||||
creationDate: Date,
|
||||
feelings: (KnownFeeling | {
|
||||
identifier: string,
|
||||
description: string,
|
||||
backgroundColor: string,
|
||||
textColor: string,
|
||||
})[],
|
||||
title?: string,
|
||||
description?: string,
|
||||
};
|
||||
|
||||
export type UniversalID = {
|
||||
provider: string,
|
||||
id: string,
|
||||
}
|
||||
|
||||
export type SongEntry = {
|
||||
kind: "song"
|
||||
kind: "song",
|
||||
artist: string,
|
||||
title: string,
|
||||
link: string[],
|
||||
id: UniversalID[],
|
||||
}
|
||||
|
||||
export type AlbumEntry = {
|
||||
kind: "album",
|
||||
artist: string,
|
||||
title: string,
|
||||
link: string[],
|
||||
id: UniversalID[],
|
||||
}
|
||||
|
||||
export type EventEntry = {
|
||||
kind: "event",
|
||||
}
|
||||
|
||||
export type MemoryEntry = {
|
||||
kind: "memory",
|
||||
}
|
||||
|
||||
export type FeelingEntry = {
|
||||
kind: "feeling",
|
||||
}
|
||||
|
||||
export type EnvironmentEntry = {
|
||||
kind: "environment",
|
||||
location?: string | {
|
||||
latitude: number,
|
||||
longitude: number,
|
||||
},
|
||||
}
|
||||
|
||||
export type DateEntry = {
|
||||
kind: "date",
|
||||
referencedDate: Date,
|
||||
}
|
|
@ -1,9 +1,85 @@
|
|||
<script>
|
||||
<script lang="ts">
|
||||
import type { Entry } from "$lib/entry";
|
||||
import { account } from "$lib/stores";
|
||||
import ExternalLink from "./ExternalLink.svelte";
|
||||
import FeelingPill from "./FeelingPill.svelte";
|
||||
import Memory from "./Memory.svelte";
|
||||
import MemoryDescription from "./MemoryDescription.svelte";
|
||||
import Entries from "./Entries.svelte";
|
||||
|
||||
const MOCK_ENTRIES: Entry[] = [
|
||||
{
|
||||
id: "0",
|
||||
creationDate: new Date("2024-04-13"),
|
||||
feelings: ["active", "happy"],
|
||||
base: {
|
||||
kind: "song",
|
||||
id: [{ provider: "spotify", id: "53mChDyESfwn9Dz8poHRf6" }],
|
||||
link: ["https://open.spotify.com/track/53mChDyESfwn9Dz8poHRf6"],
|
||||
title: "Taking What's Not Yours",
|
||||
artist: "TV Girl",
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "1",
|
||||
creationDate: new Date("2024-04-13"),
|
||||
feelings: [],
|
||||
base: {
|
||||
kind: "album",
|
||||
id: [{ provider: "spotify", id: "1d2PspdXmwrBEcOtquCvzT" }],
|
||||
link: ["https://open.spotify.com/album/1d2PspdXmwrBEcOtquCvzT"],
|
||||
title: "CHASER",
|
||||
artist: "femtanyl",
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
creationDate: new Date("2024-04-26"),
|
||||
feelings: ["excited"],
|
||||
title: "SalmorejoTech 2024",
|
||||
description: "SalmorejoTech is a great tech-event. I met some people and everything went great! :)",
|
||||
base: {
|
||||
kind: "event",
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
creationDate: new Date("2024-06-26"),
|
||||
feelings: ["happy", "relaxed"],
|
||||
//title: "At the sunflower field with Ms. Violet",
|
||||
title: "Playing Minecraft with Mr. Pablo",
|
||||
//description: "Ms. Violet is my friend, she is a great friend. We spent a good time at the sunflower field. I am lucky to have a friend like her.",
|
||||
description: "Mr. Pablo is my friend, she is a great friend. We spent a good time playing Minecraft. I am lucky to have a friend like him.",
|
||||
base: {
|
||||
kind: "memory",
|
||||
}
|
||||
},
|
||||
{
|
||||
id: "4",
|
||||
creationDate: new Date("2024-01-01"),
|
||||
feelings: ["excited", "nervous"],
|
||||
description: "New Year, New me! I'm really excited about what's going to happen this year, lots of changes. Changes may be scary, but they usually are for good!",
|
||||
base: {
|
||||
kind: "feeling",
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "5",
|
||||
creationDate: new Date("2024-04-28"),
|
||||
feelings: ["happy", "relaxed"],
|
||||
title: "The park",
|
||||
description: "The park is a really chill place where I can go and relax for a bit before going to work.",
|
||||
base: {
|
||||
kind: "environment",
|
||||
},
|
||||
},
|
||||
{
|
||||
id: "6",
|
||||
creationDate: new Date("2024-04-28"),
|
||||
feelings: ["happy"],
|
||||
description: "This day has been a great day! I've talked with my friends.",
|
||||
base: {
|
||||
kind: "date",
|
||||
referencedDate: new Date("2024-04-27"),
|
||||
}
|
||||
}
|
||||
]
|
||||
</script>
|
||||
|
||||
<div class="mt-3.5 justify-center flex ">
|
||||
|
@ -33,47 +109,14 @@
|
|||
<a class="rounded-lg bg-violet-700 text-white px-3 py-2 text-center hover:bg-violet-800 focus:ring-4 focus:ring-violet-300" href="/memory/new">+ Add a memory</a>
|
||||
</div>
|
||||
<div class="mt-3.5 flex flex-col gap-1">
|
||||
<Memory kind="song" date={new Date("2024-04-13")}>
|
||||
<ExternalLink href="https://open.spotify.com/track/53mChDyESfwn9Dz8poHRf6">TV Girl ‐ Taking what's not yours</ExternalLink>
|
||||
<div slot="extended">
|
||||
<FeelingPill feeling="active"/>
|
||||
<FeelingPill feeling="happy"/>
|
||||
|
||||
<MemoryDescription>
|
||||
Taking what's not yours is a song that I really like because it talks of things that I find interesting.
|
||||
</MemoryDescription>
|
||||
</div>
|
||||
</Memory>
|
||||
<Memory kind="album" date={new Date("2024-04-13")}>
|
||||
<ExternalLink href="https://open.spotify.com/album/1d2PspdXmwrBEcOtquCvzT">femtanyl ‐ CHASER</ExternalLink>
|
||||
</Memory>
|
||||
<Memory kind="event" title="SalmorejoTech 2024" date={new Date("2024-04-26")}>
|
||||
<div slot="extended">
|
||||
<FeelingPill feeling="excited"/>
|
||||
|
||||
<MemoryDescription>SalmorejoTech is a great tech-event. I met some people and everything went great! :)</MemoryDescription>
|
||||
</div>
|
||||
</Memory>
|
||||
<Memory kind="memory" title="At the sunflower field with Ms. Violet" date={new Date("2024-06-26")}>
|
||||
<MemoryDescription slot="extended">Ms. Violet is my friend, she is a great friend. We spent a good time at the sunflower field. I am lucky to have a friend like her.</MemoryDescription>
|
||||
</Memory>
|
||||
<Memory kind="feeling" date={new Date("2024-01-01")}>
|
||||
<FeelingPill feeling="excited"/>
|
||||
<MemoryDescription slot="extended">New Year, New me! I'm really excited about what's going to happen this year, lots of changes. Changes may be scary, but they usually are for good!</MemoryDescription>
|
||||
</Memory>
|
||||
<Memory kind="environment" title="The park" date={new Date("2024-04-28")}>
|
||||
<Entries entries={MOCK_ENTRIES}/>
|
||||
<!--
|
||||
<Entry kind="date" date={new Date("2024-04-28")}>
|
||||
<div slot="extended">
|
||||
<FeelingPill feeling="happy"/>
|
||||
<FeelingPill feeling="relaxed"/>
|
||||
<MemoryDescription>The park is a really chill place where I can go and relax for a bit before going to work.</MemoryDescription>
|
||||
<EntryDescription>This day has been a great day! I've talked with my friends.</EntryDescription>
|
||||
</div>
|
||||
</Memory>
|
||||
<Memory kind="date" date={new Date("2024-04-28")}>
|
||||
<div slot="extended">
|
||||
<FeelingPill feeling="happy"/>
|
||||
<MemoryDescription>This day has been a great day! I've talked with my friends.</MemoryDescription>
|
||||
</div>
|
||||
</Memory>
|
||||
</Entry>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
51
identity-web/src/routes/dashboard/Entries.svelte
Normal file
51
identity-web/src/routes/dashboard/Entries.svelte
Normal file
|
@ -0,0 +1,51 @@
|
|||
<script lang="ts">
|
||||
import { type Entry as EntryType, TITLED_ENTRIES } from "$lib/entry";
|
||||
import ExternalLink from "./utils/ExternalLink.svelte";
|
||||
import FeelingPill from "./utils/FeelingPill.svelte";
|
||||
import Entry from "./utils/Entry.svelte";
|
||||
import EntryDescription from "./utils/EntryDescription.svelte";
|
||||
|
||||
export let entries: EntryType[]
|
||||
</script>
|
||||
|
||||
{#each entries as entry (entry.id)}
|
||||
<Entry kind={entry.base.kind} creationDate={entry.creationDate} title={entry.base.kind === "date" ? entry.base.referencedDate.toLocaleDateString() : entry.title}>
|
||||
<div slot="contracted">
|
||||
{#if entry.base.kind === "song" || entry.base.kind === "album"}
|
||||
<ExternalLink href={entry.base.link[0]}>{entry.base.artist} ‐ {entry.base.title}</ExternalLink>
|
||||
{/if}
|
||||
|
||||
{#if entry.base.kind === "feeling"}
|
||||
<div class="flex gap-1">
|
||||
{#each entry.feelings as feeling}
|
||||
{#if typeof feeling === "string"}
|
||||
<FeelingPill feeling={feeling}/>
|
||||
{:else}
|
||||
<FeelingPill feeling={feeling.identifier} bgColor={feeling.backgroundColor} textColor={feeling.textColor}/>
|
||||
{/if}
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div slot="extended">
|
||||
<div class="flex gap-1 mb-2">
|
||||
{#each entry.feelings as feeling}
|
||||
{#if typeof feeling === "string"}
|
||||
<FeelingPill feeling={feeling}/>
|
||||
{:else}
|
||||
<FeelingPill feeling={feeling.identifier} bgColor={feeling.backgroundColor} textColor={feeling.textColor}/>
|
||||
{/if}
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
{#if entry.base.kind === "song" || entry.base.kind === "album"}
|
||||
<ExternalLink href={entry.base.link[0]}>{entry.base.artist} ‐ {entry.base.title}</ExternalLink>
|
||||
{/if}
|
||||
|
||||
{#if entry.description != null}
|
||||
<EntryDescription>{entry.description}</EntryDescription>
|
||||
{/if}
|
||||
</div>
|
||||
</Entry>
|
||||
{/each}
|
|
@ -1,9 +1,10 @@
|
|||
<script lang="ts">
|
||||
import MemoryKind from "./MemoryKind.svelte";
|
||||
import { TITLED_ENTRIES } from "$lib/entry";
|
||||
import EntryKind from "./EntryKind.svelte";
|
||||
|
||||
export let date: Date;
|
||||
export let creationDate: Date;
|
||||
export let kind: "song" | "album" | "event" | "feeling" | "environment" | "date" | "memory";
|
||||
export let title: string | null = kind === "date" ? date.toLocaleDateString() : null;
|
||||
export let title: string | undefined;
|
||||
|
||||
export let isExtended = false;
|
||||
|
||||
|
@ -13,7 +14,7 @@
|
|||
if (isExtended) {
|
||||
cardClass += " flex-col gap-1.5"
|
||||
} else {
|
||||
if (["event", "environment", "memory"].includes(kind)) {
|
||||
if (TITLED_ENTRIES.includes(kind)) {
|
||||
cardClass += " flex-col"
|
||||
} else {
|
||||
cardClass += " gap-4 items-center"
|
||||
|
@ -28,23 +29,27 @@
|
|||
<div class={cardClass()}>
|
||||
<button on:click={() => isExtended = !isExtended}>
|
||||
<div class="flex items-center gap-2.5">
|
||||
<MemoryKind kind={kind}/>
|
||||
<EntryKind kind={kind}/>
|
||||
{#if title != null && isExtended}
|
||||
<time datetime={date.toISOString()}>{date.toLocaleDateString()}</time>
|
||||
<span>Created at: <time datetime={creationDate.toISOString()}>{creationDate.toLocaleDateString()}</time></span>
|
||||
{:else if title != null}
|
||||
<h2 class="text-xl text-left font-semibold">{title}</h2>
|
||||
{:else if isExtended}
|
||||
<time datetime={date.toISOString()}>{date.toLocaleDateString()}</time>
|
||||
<span>Created at: <time datetime={creationDate.toISOString()}>{creationDate.toLocaleDateString()}</time></span>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{#if title != null && isExtended}
|
||||
<h2 class="text-xl text-left font-semibold">{title}</h2>
|
||||
<h2 class="text-xl text-left font-semibold mt-2">{title}</h2>
|
||||
{/if}
|
||||
</button>
|
||||
|
||||
<slot/>
|
||||
|
||||
{#if !isExtended}
|
||||
<slot name="contracted"/>
|
||||
{/if}
|
||||
|
||||
{#if isExtended}
|
||||
<slot name="extended"/>
|
||||
{/if}
|
Loading…
Reference in a new issue