-
{{ name }}
-
- {{ photoCount }} {{ photoCount === 1 ? 'photo' : 'photos' }}
-
+
+
{{ name }}
+
+
+ {{ statusText }}
+
+
+ synced {{ lastSync }}
+ ·
+ {{ nextSync }}
+
+
+ {{ photoCount }} {{ photoCount === 1 ? 'photo' : 'photos' }}
+
+
@@ -74,6 +79,8 @@ const props = defineProps<{
orientation: 'landscape' | 'portrait'
thumbnailUrl?: string
photoCount?: number
+ lastSync?: string | null
+ nextSync?: string | null
}>()
defineEmits<{ 'add-photo': [deviceId: number]; edit: [deviceId: number] }>()
@@ -83,30 +90,58 @@ const previewStyle = computed(() =>
? { aspectRatio: props.orientation === 'portrait' ? '3/5' : '5/3' }
: {}
)
+
+const statusText = computed(() => {
+ switch (props.status) {
+ case 'ok': return 'Online'
+ case 'sync-fail': return 'Sync issue'
+ case 'offline': return 'Offline'
+ }
+})