Skip to content

Commit

Permalink
Show if a photo has GPS info or not
Browse files Browse the repository at this point in the history
  • Loading branch information
GeniJaho committed Jan 21, 2025
1 parent 874510e commit 7547be3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
5 changes: 5 additions & 0 deletions resources/js/Components/LocationIcon.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<template>
<span class="flex items-center justify-center bg-gray-50 w-8 h-8 rounded-full">
<i class="fas fa-location-dot text-green-700"></i>
</span>
</template>
6 changes: 5 additions & 1 deletion resources/js/Pages/Photos/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import ToggleInput from "@/Components/ToggleInput.vue";
import InputLabel from "@/Components/InputLabel.vue";
import DropdownLink from "@/Components/DropdownLink.vue";
import BulkRemoveItemsAndTags from "@/Pages/Photos/Partials/BulkRemoveItemsAndTags.vue";
import LocationIcon from "@/Components/LocationIcon.vue";
const props = defineProps({
photos: Object,
Expand Down Expand Up @@ -325,7 +326,10 @@ const exportData = (format) => {

<ZoomIcon @click="zoomedImage = photo" class="absolute top-0 left-0"/>

<TaggedIcon v-if="photo.items_exists" class="absolute top-2 right-2" />
<div class="absolute top-2 right-2 flex gap-2">
<LocationIcon v-if="photo.latitude && photo.longitude"/>
<TaggedIcon v-if="photo.items_exists"/>
</div>

<ConfirmDeleteButton
v-if="! isSelecting"
Expand Down
6 changes: 5 additions & 1 deletion resources/js/Pages/Photos/Show.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import ZoomIcon from "@/Components/ZoomIcon.vue";
import Modal from "@/Components/Modal.vue";
import VueMagnifier from '@websitebeaver/vue-magnifier';
import '@websitebeaver/vue-magnifier/styles.css';
import LocationIcon from "@/Components/LocationIcon.vue";
const props = defineProps({
photoId: Number,
Expand Down Expand Up @@ -292,7 +293,10 @@ const adjustZoomLevelWithMouseWheel = (event) => {

<ZoomIcon @click="zoomedPhoto = true" class="absolute top-0 left-0" />

<TaggedIcon v-if="photo.photo_items.length" class="absolute top-2 right-2" />
<div class="absolute top-2 right-2 flex gap-2">
<LocationIcon v-if="photo.latitude && photo.longitude"/>
<TaggedIcon v-if="photo.photo_items.length"/>
</div>

<ConfirmDeleteButton
@delete="deletePhoto"
Expand Down

0 comments on commit 7547be3

Please sign in to comment.