瀏覽代碼

fix: guest location dot matches ghost place style (gold gradient)

neyrogovnarik 1 月之前
父節點
當前提交
7583384780

+ 1 - 0
frontend/src/components/MapView.tsx

@@ -58,6 +58,7 @@ export default function MapView() {
             provider.setCenter(pos.coords.latitude, pos.coords.longitude)
             provider.addMarker('_user_location', pos.coords.latitude, pos.coords.longitude, {
               type: 'location',
+              ghost: !user,
             })
           },
           () => {},

+ 8 - 4
frontend/src/lib/map.ts

@@ -31,11 +31,15 @@ function createIcon(type: string, size: number, ghost?: boolean): L.DivIcon {
     : MARKER_COLORS[type] || '#3b82f6'
 
   if (type === 'location') {
+    const locStyle = ghost
+      ? `width:30px;height:30px;background:radial-gradient(circle, rgba(255, 215, 0, 0.9) 0%, rgba(255, 215, 0, 0.3) 50%, rgba(255, 215, 0, 0) 70%);border-radius:50%;box-shadow:0 0 20px rgba(255, 215, 0, 0.4);pointer-events:none`
+      : `width:12px;height:12px;background:#3b82f6;border-radius:50%;border:3px solid white;box-shadow:0 0 0 4px rgba(59,130,246,0.3)`
+    const size = ghost ? 30 : 20
     return L.divIcon({
       className: '',
-      iconSize: [20, 20],
-      iconAnchor: [10, 10],
-      html: `<div style="width:12px;height:12px;background:#3b82f6;border-radius:50%;border:3px solid white;box-shadow:0 0 0 4px rgba(59,130,246,0.3)"></div>`,
+      iconSize: [size, size],
+      iconAnchor: [size / 2, size / 2],
+      html: `<div style="${locStyle}"></div>`,
     })
   }
 
@@ -117,7 +121,7 @@ export function createLeafletMapProvider(): MapProvider {
       const type = options?.type || 'place'
       const size = type === 'visitor' || type === 'location' ? 12 : 32
       const icon = createIcon(type, size, ghost)
-      const interactive = !ghost && type !== 'location'
+      const interactive = !ghost
       const marker = L.marker([lat, lng], { icon, interactive }).addTo(map)
 
       if (options?.title && !ghost) {

+ 5 - 10
obsidian_data/Photoplaces_data/.obsidian/workspace.json

@@ -11,14 +11,10 @@
             "id": "3d01ec58e39ece45",
             "type": "leaf",
             "state": {
-              "type": "markdown",
-              "state": {
-                "file": "architecture-overview.md",
-                "mode": "source",
-                "source": false
-              },
-              "icon": "lucide-file",
-              "title": "architecture-overview"
+              "type": "graph",
+              "state": {},
+              "icon": "lucide-git-fork",
+              "title": "Граф"
             }
           }
         ]
@@ -94,7 +90,6 @@
             "state": {
               "type": "backlink",
               "state": {
-                "file": "Добро пожаловать.md",
                 "collapseAll": false,
                 "extraContext": false,
                 "sortOrder": "alphabetical",
@@ -104,7 +99,7 @@
                 "unlinkedCollapsed": true
               },
               "icon": "links-coming-in",
-              "title": "Обратные ссылки для Добро пожаловать"
+              "title": "Обратные ссылки"
             }
           },
           {