1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-19 04:49:37 +02:00

feat: Remove email field from user details response and enhance frontend user display

This commit is contained in:
Sean Morley 2025-02-01 15:10:25 -05:00
parent c1807826d0
commit 7d71c84fd2
8 changed files with 55 additions and 411 deletions

View file

@ -3,6 +3,7 @@ import os
from .models import Adventure, AdventureImage, ChecklistItem, Collection, Note, Transportation, Checklist, Visit, Category, Attachment
from rest_framework import serializers
from main.utils import CustomModelSerializer
from users.serializers import CustomUserDetailsSerializer
class AdventureImageSerializer(CustomModelSerializer):
@ -80,15 +81,16 @@ class AdventureSerializer(CustomModelSerializer):
attachments = AttachmentSerializer(many=True, read_only=True)
category = CategorySerializer(read_only=False, required=False)
is_visited = serializers.SerializerMethodField()
user = serializers.SerializerMethodField()
class Meta:
model = Adventure
fields = [
'id', 'user_id', 'name', 'description', 'rating', 'activity_types', 'location',
'is_public', 'collection', 'created_at', 'updated_at', 'images', 'link', 'longitude',
'latitude', 'visits', 'is_visited', 'category', 'attachments'
'latitude', 'visits', 'is_visited', 'category', 'attachments', 'user'
]
read_only_fields = ['id', 'created_at', 'updated_at', 'user_id', 'is_visited']
read_only_fields = ['id', 'created_at', 'updated_at', 'user_id', 'is_visited', 'user']
def validate_category(self, category_data):
if isinstance(category_data, Category):
@ -127,6 +129,10 @@ class AdventureSerializer(CustomModelSerializer):
)
return category
def get_user(self, obj):
user = obj.user_id
return CustomUserDetailsSerializer(user).data
def get_is_visited(self, obj):
current_date = timezone.now().date()
for visit in obj.visits.all():

View file

@ -128,7 +128,7 @@ USE_L10N = True
USE_TZ = True
unParsedFrontenedUrl = getenv('FRONTEND_URL', 'http://localhost:3000')
FRONTEND_URL = unParsedFrontenedUrl.replace("'", "").replace('"', '')
FRONTEND_URL = unParsedFrontenedUrl.translate(str.maketrans('', '', '\'"'))
SESSION_COOKIE_SAMESITE = None

View file

@ -118,5 +118,7 @@ class CustomUserDetailsSerializer(UserDetailsSerializer):
# Remove `pk` field from the response
representation.pop('pk', None)
# Remove the email field
representation.pop('email', None)
return representation

View file

@ -1,7 +1,7 @@
services:
web:
#build: ./frontend/
image: ghcr.io/seanmorley15/adventurelog-frontend:latest
build: ./frontend/
#image: ghcr.io/seanmorley15/adventurelog-frontend:latest
container_name: adventurelog-frontend
restart: unless-stopped
environment:
@ -25,8 +25,8 @@ services:
- postgres_data:/var/lib/postgresql/data/
server:
#build: ./backend/
image: ghcr.io/seanmorley15/adventurelog-backend:latest
build: ./backend/
#image: ghcr.io/seanmorley15/adventurelog-backend:latest
container_name: adventurelog-backend
restart: unless-stopped
environment:
@ -38,7 +38,7 @@ services:
- DJANGO_ADMIN_USERNAME=admin
- DJANGO_ADMIN_PASSWORD=admin
- DJANGO_ADMIN_EMAIL=admin@example.com
- PUBLIC_URL=http://localhost:8016 # Match the outward port, used for the creation of image urls
- PUBLIC_URL='http://localhost:8016' # Match the outward port, used for the creation of image urls
- CSRF_TRUSTED_ORIGINS=http://localhost:8016,http://localhost:8015 # Comma separated list of trusted origins for CSRF
- DEBUG=False
- FRONTEND_URL=http://localhost:8015 # Used for email generation. This should be the url of the frontend

View file

@ -16,7 +16,6 @@
"@event-calendar/day-grid": "^3.7.1",
"@event-calendar/time-grid": "^3.7.1",
"@iconify-json/mdi": "^1.1.67",
"@sveltejs/adapter-auto": "^3.2.2",
"@sveltejs/adapter-node": "^5.2.0",
"@sveltejs/adapter-vercel": "^5.4.1",
"@sveltejs/kit": "^2.8.3",
@ -47,7 +46,6 @@
"psl": "^1.15.0",
"qrcode": "^1.5.4",
"svelte-i18n": "^4.0.1",
"svelte-maplibre": "^0.9.8",
"tsparticles": "^3.7.1"
"svelte-maplibre": "^0.9.8"
}
}

398
frontend/pnpm-lock.yaml generated
View file

@ -35,9 +35,6 @@ importers:
svelte-maplibre:
specifier: ^0.9.8
version: 0.9.8(svelte@4.2.19)
tsparticles:
specifier: ^3.7.1
version: 3.7.1
devDependencies:
'@event-calendar/core':
specifier: ^3.7.1
@ -51,9 +48,6 @@ importers:
'@iconify-json/mdi':
specifier: ^1.1.67
version: 1.1.67
'@sveltejs/adapter-auto':
specifier: ^3.2.2
version: 3.2.2(@sveltejs/kit@2.8.3(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.19)(vite@5.4.12(@types/node@22.5.4)))(svelte@4.2.19)(vite@5.4.12(@types/node@22.5.4)))
'@sveltejs/adapter-node':
specifier: ^5.2.0
version: 5.2.0(@sveltejs/kit@2.8.3(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.19)(vite@5.4.12(@types/node@22.5.4)))(svelte@4.2.19)(vite@5.4.12(@types/node@22.5.4)))
@ -741,11 +735,6 @@ packages:
cpu: [x64]
os: [win32]
'@sveltejs/adapter-auto@3.2.2':
resolution: {integrity: sha512-Mso5xPCA8zgcKrv+QioVlqMZkyUQ5MjDJiEPuG/Z7cV/5tmwV7LmcVWk5tZ+H0NCOV1x12AsoSpt/CwFwuVXMA==}
peerDependencies:
'@sveltejs/kit': ^2.0.0
'@sveltejs/adapter-node@5.2.0':
resolution: {integrity: sha512-HVZoei2078XSyPmvdTHE03VXDUD0ytTvMuMHMQP0j6zX4nPDpCcKrgvU7baEblMeCCMdM/shQvstFxOJPQKlUQ==}
peerDependencies:
@ -785,147 +774,6 @@ packages:
peerDependencies:
tailwindcss: '>=3.0.0 || insiders'
'@tsparticles/basic@3.7.1':
resolution: {integrity: sha512-oJMJ3qzYUROYaOEsaFXkVynxT2OTWBXbQ9MNc1bJi/bVc1VOU44VN7X/KmiZjD+w1U+Qalk6BeVvDRwpFshblw==}
'@tsparticles/engine@3.7.1':
resolution: {integrity: sha512-GYzBgq/oOE9YJdOL1++MoawWmYg4AvVct6CIrJGx84ZRb3U2owYmLsRGabYl0qX1CWWOvUG569043RJmyp/vQA==}
'@tsparticles/interaction-external-attract@3.7.1':
resolution: {integrity: sha512-cpnMsFJ7ZJNKccpQvskKvSs1ofknByHE6FGqbEb17ij7HqvbECQOCOVKHPFnYipHe14cXor/Cd+nVisRcTASoQ==}
'@tsparticles/interaction-external-bounce@3.7.1':
resolution: {integrity: sha512-npvU9Qt6WDonjezHqi+hWM44ga2Oh5yXdr8eSoJpvuHZrCP7rIdRSz5XseHouO1bMS9DbXk86sx4qwrhB5w58w==}
'@tsparticles/interaction-external-bubble@3.7.1':
resolution: {integrity: sha512-WdbYL46lMfuf2g5kfVB1hhhxRBtEXDvnwz8PJwLKurSThL/27bqsqysyXsMzXtLByXUneGhtJTj4D5I5RYdgjA==}
'@tsparticles/interaction-external-connect@3.7.1':
resolution: {integrity: sha512-hqx0ANIbjLIz/nxmk0LvqANBiNLLmVybbCA7N+xDHtEORvpKjNlKEvMz6Razocl6vRjoHZ/olSwcxIG84dh/cg==}
'@tsparticles/interaction-external-grab@3.7.1':
resolution: {integrity: sha512-JMYpFW+7YvkpK5MYlt4Ec3Gwb5ZxS7RLVL8IRUSd5yJOw25husPTYg+FQywxrt5WhKe+tPsCAYo+uGIbTTHi9w==}
'@tsparticles/interaction-external-pause@3.7.1':
resolution: {integrity: sha512-Kkp+7sCe24hawH0XvS1V6UCCuHfMvpLK7oseqSam9Gt4SyGrFvaqIXxkjXhRhn9MysJyKFPBV4/dtBM1HR9p6A==}
'@tsparticles/interaction-external-push@3.7.1':
resolution: {integrity: sha512-4VoaR5jvXgQdB7irtq4uSZYr5c+D6TBTVEnLVpBfJhUs6jhw6mgN5g7yp5izIYkK0AlcO431MHn8dvJacvRLDw==}
'@tsparticles/interaction-external-remove@3.7.1':
resolution: {integrity: sha512-FRBW7U7zD5MkO6/b7e8iSMk/UTtRLY2XiIVFZNsKri3Re3yPpvZzzd5tl2YlYGQlg1Xc+K8SJYMQQA3PtgQ/Tg==}
'@tsparticles/interaction-external-repulse@3.7.1':
resolution: {integrity: sha512-mwM06dVmg2FEvHMQsPOfRBQWACbjf3qnelODkqI9DSVxQ0B8DESP4BYNXyraFGYv00YiPzRv5Xy/uejHdbsQUA==}
'@tsparticles/interaction-external-slow@3.7.1':
resolution: {integrity: sha512-CfCAs3kUQC3pLOj0dbzn5AolQyBHgjxORLdfnYBhepvFV1BXB+4ytChRfXBzjykBPI6U+rCnw5Fk/vVjAroSFA==}
'@tsparticles/interaction-external-trail@3.7.1':
resolution: {integrity: sha512-M7lNQUWP15m8YIDP/JZcZAXaVJLqdwpBs0Uv9F6dU6jsnNXwwHFVFZ+1icrnlbgl9k/Ehhodbdo5weE7GHhQhQ==}
'@tsparticles/interaction-particles-attract@3.7.1':
resolution: {integrity: sha512-UABbBORKaiItAT8vR0t4ye2H3VE6/Ah4zcylBlnq0Jd5yDkyP4rnkwhicaY6y4Zlfwyx+0PWdAC4f/ziFAyObg==}
'@tsparticles/interaction-particles-collisions@3.7.1':
resolution: {integrity: sha512-0GY9++Gn2KXViyeifXWkH7a2UO5+uRwyS1rDeTN8eleyiq2j9zQf4xztZEIft8T0hTetq2rkWxQ92j2kev6NVA==}
'@tsparticles/interaction-particles-links@3.7.1':
resolution: {integrity: sha512-BxCXAAOBNmEvlyOQzwprryW8YdtMIop2v4kgSCff5MCtDwYWoQIfzaQlWbBAkD9ey6BoF8iMjhBUaY1MnDecTA==}
'@tsparticles/move-base@3.7.1':
resolution: {integrity: sha512-LPtMHwJHhzwfRIcSAk814fY9NcRiICwaEbapaJSYyP1DwscSXqOWoyAEWwzV9hMgAcPdsED6nGeg8RCXGm58lw==}
'@tsparticles/move-parallax@3.7.1':
resolution: {integrity: sha512-B40azo6EJyMdI+kmIxpqWDaObPwODTYLDCikzkZ73n5tS6OhFUlkz81Scfo+g1iGTdryKFygUKhVGcG1EFuA5g==}
'@tsparticles/plugin-absorbers@3.7.1':
resolution: {integrity: sha512-3s+fILLV1tdKOq/bXwfoxFVbzkWwXpdWTC2C0QIP6BFwDSQqV5txluiLEf7SCf8C5etQ6dstEnOgVbdzK7+eWA==}
'@tsparticles/plugin-easing-quad@3.7.1':
resolution: {integrity: sha512-nSwKCRe6C/noCi3dyZlm1GiQGask0aXdWDuS36b82iwzwQ01cBTXeXR25mLr4fsfMLFfYAZXyBxEMMpw3rkSiw==}
'@tsparticles/plugin-emitters-shape-circle@3.7.1':
resolution: {integrity: sha512-eBwktnGROkiyCvtrSwdPpoRbIjQgV/Odq//0dw8D+qUdnox6dNzzhJjz8L2LAA2kQZBqtdBqV2kcx3w5ZdqoEQ==}
'@tsparticles/plugin-emitters-shape-square@3.7.1':
resolution: {integrity: sha512-nvGBsRLrkiz6Q38TJRl8Y/eu9i1ChQ9oorQydLBok+iZ6MefuOj39iYsAOkD1w9yRVrFWKHG6CR1mmJUniz/HA==}
'@tsparticles/plugin-emitters@3.7.1':
resolution: {integrity: sha512-WV5Uwxp/Ckqv5kZynTj6mj13jYbQCArNLFv8ks+zjdlteoyT5EhQl4rg+TalaySCb1zCd6Fu2Scp35l3JJgbnw==}
'@tsparticles/plugin-hex-color@3.7.1':
resolution: {integrity: sha512-7xu3MV8EdNNejjYyEmrq5fCDdYAcqz/9VatLpnwtwR5Q5t2qI0tD4CrcGaFfC/rTAVJacfiJe02UV/hlj03KKA==}
'@tsparticles/plugin-hsl-color@3.7.1':
resolution: {integrity: sha512-zzAI1CuoCMBJhgeYZ5Rq42nGbPg35ZzIs11eQegjsWG5Msm5QKSj60qPzERnoUcCc4HCKtIWP7rYMz6h3xpoEg==}
'@tsparticles/plugin-rgb-color@3.7.1':
resolution: {integrity: sha512-taEraTpCYR6jpjflqBL95tN0zFU8JrAChXTt8mxVn7gddxoNMHI/LGymEPRCweLukwV6GQyAGOkeGEdWDPtYTA==}
'@tsparticles/shape-circle@3.7.1':
resolution: {integrity: sha512-kmOWaUuFwuTtcCFYjuyJbdA5qDqWdGsharLalYnIczkLu2c1I8jJo/OmGePKhWn62ocu7mqKMomfElkIcw2AsA==}
'@tsparticles/shape-emoji@3.7.1':
resolution: {integrity: sha512-mX18c/xhYVljS/r5Xbowzclw+1YwhtWoQFOOfkmjjZppA+RjgcwSKLvH6E20PaH1yVTjBOfSF+3POKpwsULzTg==}
'@tsparticles/shape-image@3.7.1':
resolution: {integrity: sha512-eDzfkQhqLY6fb9QH2Vo9TGfdJBFFpYnojhxQxc7IdzIwOFMD3JK4B52RVl9oowR+rNE8dNp6P2L+eMAF4yld0g==}
'@tsparticles/shape-line@3.7.1':
resolution: {integrity: sha512-lMPYApUpg7avxmYPfHHr4dQepZSNn/g0Q1/g2+lnTi8ZtUBiCZ2WMVy9R3GOzyozbnzigLQ6AJRnOpsUZV7H4g==}
'@tsparticles/shape-polygon@3.7.1':
resolution: {integrity: sha512-5FrRfpYC3qnvV2nXBLE4Q0v+SMNWJO8xgzh6MBFwfptvqH4EOrqc/58eS5x0jlf+evwf9LjPgeGkOTcwaHHcYQ==}
'@tsparticles/shape-square@3.7.1':
resolution: {integrity: sha512-7VCqbRwinjBZ+Ryme27rOtl+jKrET8qDthqZLrAoj3WONBqyt+R9q6SXAJ9WodqEX68IBvcluqbFY5qDZm8iAQ==}
'@tsparticles/shape-star@3.7.1':
resolution: {integrity: sha512-3G4oipioyWKLEQYT11Sx3k6AObu3dbv/A5LRqGGTQm5IR6UACa+INwykZYI0a+MdJJMb83E0e4Fn3hlZbi0/8w==}
'@tsparticles/shape-text@3.7.1':
resolution: {integrity: sha512-aU1V9O8uQQBlL0jGFh9Q0b5vQ1Ji6Oo5ptyyj5yJ5uP/ZU00L0Vhk4DNyLXpaU0+H6OBoPpCqnvEsZBB9/HmCQ==}
'@tsparticles/slim@3.7.1':
resolution: {integrity: sha512-OtJEhud2KleX7OxiG2r/VYriHNIwTpFm3sPFy4EOJzAD0EW7KZoKXGpGn5gwGI1NWeB0jso92yNTrTC2ZTW0qw==}
'@tsparticles/updater-color@3.7.1':
resolution: {integrity: sha512-QimV3yn17dcdJx7PpTwLtw9BhkQ0q8qFF035OdcZpnynBPAO/hg0zvSMpMGoeuDVFH02wWBy4h2/BYCv6wh6Sw==}
'@tsparticles/updater-destroy@3.7.1':
resolution: {integrity: sha512-krXNoMDKyeyE/ZjQh3LVjrLYivFefQOQ9i+B7RpMe7x4h+iRgpB6npTCqidGQ82+hZ8G6xfQ9ToduebWwK4JGg==}
'@tsparticles/updater-life@3.7.1':
resolution: {integrity: sha512-NY5gUrgO5AsARNC0usP9PKahXf7JCxbP/H1vzTfA0SJw4veANfWTldOvhIlcm2CHVP5P1b827p0hWsBHECwz7A==}
'@tsparticles/updater-opacity@3.7.1':
resolution: {integrity: sha512-YcyviCooTv7SAKw7sxd84CfJqZ7dYPSdYZzCpedV6TKIObRiwLqXlyLXQGJ3YltghKQSCSolmVy8woWBCDm1qA==}
'@tsparticles/updater-out-modes@3.7.1':
resolution: {integrity: sha512-Cb5sWquRtUYLSiFpmBjjYKRdpNV52diCo9+qMtK1oVlldDBhUwqO+1TQjdlaA2yl5DURlY9ZfOHXvY+IT7CHCw==}
'@tsparticles/updater-roll@3.7.1':
resolution: {integrity: sha512-gHLRqpTGVGPJBEAIPUiYVembIn5bcaTXXxsUJEM/IN+GIOvj2uZZGZ4r2aFTA6WugqEbJsJdblDSvMfouyz7Ug==}
'@tsparticles/updater-rotate@3.7.1':
resolution: {integrity: sha512-toVHwl+h6SvtA8dyxSA2kMH2QdDA71vehuAa+HoRqf1y06h5kxyYiMKZFHCqDJ6lFfRPs47MjrC9dD2bDz14MQ==}
'@tsparticles/updater-size@3.7.1':
resolution: {integrity: sha512-+Y0H0PnDJVIsJ+zHTyubYu1jtRFmVnY1dAv3VCjScIDw6bcpL/ol+HrtHTGIX0WbMyUfjCyALfAoaXi/Wm8VcQ==}
'@tsparticles/updater-stroke-color@3.7.1':
resolution: {integrity: sha512-VHhQkCNuxjx/Hy7A+g0Yijb24T0+wQ3jNsF/yfrR9dEdZWSBiimZLvV1bilPdAeEtieAJTAZo2VNhcD1snF0iQ==}
'@tsparticles/updater-tilt@3.7.1':
resolution: {integrity: sha512-pSOXoXPre1VPKC5nC5GW0L9jw63w1dVdsDdggEau7MP9xO7trko9L/KyayBX12Y4Ief1ca12Incxxr67hw7GGA==}
'@tsparticles/updater-twinkle@3.7.1':
resolution: {integrity: sha512-maRTqPbeZcxBK6s1ry+ih71qSVaitfP1KTrAKR38v26GMwyO6z+zYV2bu9WTRt21FRFAoxlMLWxNu21GtQoXDA==}
'@tsparticles/updater-wobble@3.7.1':
resolution: {integrity: sha512-YIlNg4L0w4egQJhPLpgcvcfv9+X621+cQsrdN9sSmajxhhwtEQvQUvFUzGTcvpjVi+GcBNp0t4sCKEzoP8iaYw==}
'@types/cookie@0.6.0':
resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==}
@ -2234,9 +2082,6 @@ packages:
tslib@2.6.3:
resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==}
tsparticles@3.7.1:
resolution: {integrity: sha512-NNkOYIo01eHpDuaJxDCGgcLEMZKEJTCN/XPVCLg7VxgEWN19rjXpDnDguISxadS8GSFPws7hpGgbeDDAm3MX+Q==}
type-detect@4.0.8:
resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==}
engines: {node: '>=4'}
@ -2875,11 +2720,6 @@ snapshots:
'@rollup/rollup-win32-x64-msvc@4.31.0':
optional: true
'@sveltejs/adapter-auto@3.2.2(@sveltejs/kit@2.8.3(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.19)(vite@5.4.12(@types/node@22.5.4)))(svelte@4.2.19)(vite@5.4.12(@types/node@22.5.4)))':
dependencies:
'@sveltejs/kit': 2.8.3(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.19)(vite@5.4.12(@types/node@22.5.4)))(svelte@4.2.19)(vite@5.4.12(@types/node@22.5.4))
import-meta-resolve: 4.1.0
'@sveltejs/adapter-node@5.2.0(@sveltejs/kit@2.8.3(@sveltejs/vite-plugin-svelte@3.1.1(svelte@4.2.19)(vite@5.4.12(@types/node@22.5.4)))(svelte@4.2.19)(vite@5.4.12(@types/node@22.5.4)))':
dependencies:
'@rollup/plugin-commonjs': 26.0.1(rollup@4.24.0)
@ -2946,228 +2786,6 @@ snapshots:
postcss-selector-parser: 6.0.10
tailwindcss: 3.4.4
'@tsparticles/basic@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/move-base': 3.7.1
'@tsparticles/plugin-hex-color': 3.7.1
'@tsparticles/plugin-hsl-color': 3.7.1
'@tsparticles/plugin-rgb-color': 3.7.1
'@tsparticles/shape-circle': 3.7.1
'@tsparticles/updater-color': 3.7.1
'@tsparticles/updater-opacity': 3.7.1
'@tsparticles/updater-out-modes': 3.7.1
'@tsparticles/updater-size': 3.7.1
'@tsparticles/engine@3.7.1': {}
'@tsparticles/interaction-external-attract@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/interaction-external-bounce@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/interaction-external-bubble@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/interaction-external-connect@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/interaction-external-grab@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/interaction-external-pause@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/interaction-external-push@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/interaction-external-remove@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/interaction-external-repulse@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/interaction-external-slow@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/interaction-external-trail@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/interaction-particles-attract@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/interaction-particles-collisions@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/interaction-particles-links@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/move-base@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/move-parallax@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/plugin-absorbers@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/plugin-easing-quad@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/plugin-emitters-shape-circle@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/plugin-emitters': 3.7.1
'@tsparticles/plugin-emitters-shape-square@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/plugin-emitters': 3.7.1
'@tsparticles/plugin-emitters@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/plugin-hex-color@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/plugin-hsl-color@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/plugin-rgb-color@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/shape-circle@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/shape-emoji@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/shape-image@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/shape-line@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/shape-polygon@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/shape-square@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/shape-star@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/shape-text@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/slim@3.7.1':
dependencies:
'@tsparticles/basic': 3.7.1
'@tsparticles/engine': 3.7.1
'@tsparticles/interaction-external-attract': 3.7.1
'@tsparticles/interaction-external-bounce': 3.7.1
'@tsparticles/interaction-external-bubble': 3.7.1
'@tsparticles/interaction-external-connect': 3.7.1
'@tsparticles/interaction-external-grab': 3.7.1
'@tsparticles/interaction-external-pause': 3.7.1
'@tsparticles/interaction-external-push': 3.7.1
'@tsparticles/interaction-external-remove': 3.7.1
'@tsparticles/interaction-external-repulse': 3.7.1
'@tsparticles/interaction-external-slow': 3.7.1
'@tsparticles/interaction-particles-attract': 3.7.1
'@tsparticles/interaction-particles-collisions': 3.7.1
'@tsparticles/interaction-particles-links': 3.7.1
'@tsparticles/move-parallax': 3.7.1
'@tsparticles/plugin-easing-quad': 3.7.1
'@tsparticles/shape-emoji': 3.7.1
'@tsparticles/shape-image': 3.7.1
'@tsparticles/shape-line': 3.7.1
'@tsparticles/shape-polygon': 3.7.1
'@tsparticles/shape-square': 3.7.1
'@tsparticles/shape-star': 3.7.1
'@tsparticles/updater-life': 3.7.1
'@tsparticles/updater-rotate': 3.7.1
'@tsparticles/updater-stroke-color': 3.7.1
'@tsparticles/updater-color@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/updater-destroy@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/updater-life@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/updater-opacity@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/updater-out-modes@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/updater-roll@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/updater-rotate@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/updater-size@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/updater-stroke-color@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/updater-tilt@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/updater-twinkle@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/updater-wobble@3.7.1':
dependencies:
'@tsparticles/engine': 3.7.1
'@types/cookie@0.6.0': {}
'@types/estree@1.0.6': {}
@ -4539,22 +4157,6 @@ snapshots:
tslib@2.6.3: {}
tsparticles@3.7.1:
dependencies:
'@tsparticles/engine': 3.7.1
'@tsparticles/interaction-external-trail': 3.7.1
'@tsparticles/plugin-absorbers': 3.7.1
'@tsparticles/plugin-emitters': 3.7.1
'@tsparticles/plugin-emitters-shape-circle': 3.7.1
'@tsparticles/plugin-emitters-shape-square': 3.7.1
'@tsparticles/shape-text': 3.7.1
'@tsparticles/slim': 3.7.1
'@tsparticles/updater-destroy': 3.7.1
'@tsparticles/updater-roll': 3.7.1
'@tsparticles/updater-tilt': 3.7.1
'@tsparticles/updater-twinkle': 3.7.1
'@tsparticles/updater-wobble': 3.7.1
type-detect@4.0.8: {}
type@2.7.3: {}

View file

@ -1,7 +1,6 @@
export type User = {
pk: number;
username: string;
email: string | null;
first_name: string | null;
last_name: string | null;
date_joined: string | null;
@ -41,6 +40,7 @@ export type Adventure = {
is_visited?: boolean;
category: Category | null;
attachments: Attachment[];
user: User
};
export type Country = {

View file

@ -12,6 +12,7 @@
import toGeoJSON from '@mapbox/togeojson';
import LightbulbOn from '~icons/mdi/lightbulb-on';
import Account from '~icons/mdi/account';
let geojson: any;
@ -221,6 +222,40 @@
</div>
</div>
<div class="grid gap-2">
<div class="flex items-center gap-2">
{#if adventure.user.profile_pic}
<div class="avatar">
<div class="w-8 rounded-full">
<img src={adventure.user.profile_pic} />
</div>
</div>
{:else}
<div class="avatar placeholder">
<div class="bg-neutral text-neutral-content w-8 rounded-full">
<span class="text-lg"
>{adventure.user.first_name
? adventure.user.first_name.charAt(0)
: adventure.user.username.charAt(0)}{adventure.user.last_name
? adventure.user.last_name.charAt(0)
: ''}</span
>
</div>
</div>
{/if}
<div>
{#if adventure.user.public_profile}
<a href={`/profile/${adventure.user.username}`} class="text-base font-medium">
{adventure.user.first_name || adventure.user.username}{' '}
{adventure.user.last_name}
</a>
{:else}
<span class="text-base font-medium">
{adventure.user.first_name || adventure.user.username}{' '}
{adventure.user.last_name}
</span>
{/if}
</div>
</div>
<div class="flex items-center gap-2">
<svg
xmlns="http://www.w3.org/2000/svg"
@ -241,6 +276,7 @@
>{adventure.is_public ? 'Public' : 'Private'}</span
>
</div>
{#if adventure.location}
<div class="flex items-center gap-2">
<svg