wuyi 1 месяц назад
Родитель
Сommit
2667798362
3 измененных файлов с 33 добавлено и 8 удалено
  1. 2 2
      index.html
  2. 15 0
      public/favicon.svg
  3. 16 6
      src/views/ScanView.vue

+ 2 - 2
index.html

@@ -2,9 +2,9 @@
 <html lang="">
   <head>
     <meta charset="UTF-8">
-    <link rel="icon" href="/favicon.ico">
+    <link rel="icon" type="image/svg+xml" href="/favicon.svg">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>宠物门户</title>
+    <title>Emergency QR</title>
   </head>
   <body>
     <div id="app"></div>

+ 15 - 0
public/favicon.svg

@@ -0,0 +1,15 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
+  <g id="qrcode" fill="#06b6d4">
+    <path d="M12.38,3.88v7h7v-7Zm5.5,5.5h-4v-4h4Z"/>
+    <path d="M3.88,10.88h7v-7h-7Zm1.5-5.5h4v4h-4Z"/>
+    <path d="M3.88,19.38h7v-7h-7Zm1.5-5.5h4v4h-4Z"/>
+    <rect x="12.38" y="12.38" width="1.75" height="1.75"/>
+    <rect x="15.88" y="12.38" width="1.75" height="1.75"/>
+    <rect x="14.13" y="14.13" width="1.75" height="1.75"/>
+    <rect x="17.63" y="14.13" width="1.75" height="1.75"/>
+    <rect x="12.38" y="15.88" width="1.75" height="1.75"/>
+    <rect x="15.88" y="15.88" width="1.75" height="1.75"/>
+    <rect x="14.13" y="17.63" width="1.75" height="1.75"/>
+    <rect x="17.63" y="17.63" width="1.75" height="1.75"/>
+  </g>
+</svg>

+ 16 - 6
src/views/ScanView.vue

@@ -136,6 +136,11 @@ const resetForm = (source = null) => {
 
 const setDocumentTitle = () => {
   if (typeof document === 'undefined') return
+  // 如果没有二维码或没有详情,只显示 Emergency QR
+  if (!qrCode.value || !qrDetail.value) {
+    document.title = 'Emergency QR'
+    return
+  }
   const defaultName = DEFAULT_NAME_BY_TYPE[qrType.value] || DEFAULT_NAME_BY_TYPE.person
   const name = profile.value?.name || defaultName
   document.title = `${name} | Emergency QR`
@@ -576,10 +581,12 @@ onMounted(() => {
                         <div class="flex h-8 w-8 items-center justify-center rounded-full bg-amber-100">
                           <i class="pi pi-info-circle text-sm text-amber-600" />
                         </div>
-                        <p class="text-xs font-medium uppercase tracking-wider text-slate-500">{{ isPerson ? 'Additional notes' : isGoods ? 'Item notes' : 'Extra description' }}</p>
+                        <p class="text-xs font-medium uppercase tracking-wider text-slate-500">{{ isPerson ? 'Additional
+                          notes' : isGoods ? 'Item notes' : 'Extra description' }}</p>
                       </div>
                       <p class="mt-3 whitespace-pre-wrap text-sm leading-relaxed text-slate-700">
-                        {{ isPerson ? (profile?.specialNote || 'No extra details') : (profile?.remark || 'No extra details') }}
+                        {{ isPerson ? (profile?.specialNote || 'No extra details') : (profile?.remark || 'No extra
+                        details') }}
                       </p>
                     </div>
                   </div>
@@ -766,7 +773,9 @@ onMounted(() => {
             </div>
 
             <label class="block space-y-2 text-sm">
-              <span class="text-slate-500">{{ isPerson ? 'Additional notes / health tips' : isGoods ? 'Item notes' : 'Extra remarks' }}</span>
+              <span class="text-slate-500">{{ isPerson ? 'Additional notes / health tips' : isGoods ? 'Item notes' :
+                'Extra
+                remarks' }}</span>
               <textarea v-if="isPerson" v-model="formData.specialNote" rows="4"
                 class="w-full rounded-2xl border border-slate-200 px-4 py-3"
                 placeholder="e.g. allergies, medical needs, carried items" />
@@ -803,8 +812,8 @@ onMounted(() => {
     <LocationPicker v-model="showLocationDialog" :initial-location="formData.location" @save="handleSaveLocation" />
 
     <!-- Location preview dialog (read-only) -->
-    <LocationPicker v-model="showLocationViewDialog" :initial-location="profile?.location"
-      :closable="true" :readonly="true" />
+    <LocationPicker v-model="showLocationViewDialog" :initial-location="profile?.location" :closable="true"
+      :readonly="true" />
 
     <!-- Maintenance code dialog -->
     <Dialog v-model:visible="showMaintenanceDialog" modal :closable="!isFirstFill" :closeOnEscape="!isFirstFill"
@@ -819,7 +828,8 @@ onMounted(() => {
               {{ isFirstFill ? 'Verification required for first use' : 'Verification required to edit' }}
             </h3>
             <p class="text-sm text-slate-500">
-              {{ isFirstFill ? 'Enter the maintenance code that came with the QR tag.' : 'Enter the maintenance code to unlock editing.' }}
+              {{ isFirstFill ? 'Enter the maintenance code that came with the QR tag.' : 'Enter the maintenance code to
+              unlock editing.' }}
             </p>
           </div>
         </div>