Skip to content

Commit

Permalink
fix copy
Browse files Browse the repository at this point in the history
  • Loading branch information
ildyria committed Nov 9, 2024
1 parent 36c96b9 commit 98ca856
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
9 changes: 4 additions & 5 deletions resources/js/components/forms/photo/PhotoCopyDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
</div>
</div>
<div v-else>
<div class="p-9" v-if="error_no_target">
<div class="p-9" v-if="error_no_target === false">
<span class="font-bold">
{{ question }}
</span>
<SearchTargetAlbum :album-id="parentId" @selected="selected" @no-target="error_no_target = true" />
<SearchTargetAlbum :album-id="undefined" @selected="selected" @no-target="error_no_target = true" />
</div>
<div v-else class="p-9">
<p class="text-center text-muted-color">{{ "No album to copy to." }}</p>
Expand Down Expand Up @@ -96,14 +96,13 @@ function execute() {
PhotoService.copy(destination_id.value, photoCopiedIds).then(() => {
toast.add({
severity: "success",
summary: "Photo moved",
summary: "Photo copied",
life: 3000,
});
// Clear the cache for the current album and the destination album
// Clear the cache for the destination album
AlbumService.clearCache(destination_id.value);
emits("copy");
// Todo emit that we moved things.
});
}
</script>
1 change: 1 addition & 0 deletions resources/js/components/headers/AlbumHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
v-model:visible="isCreateAlbumOpen"
v-model:parent-id="props.album.id"
@close="isCreateAlbumOpen = false"
key="create_album_modal"
/>
<Toolbar class="w-full border-0 h-14" v-if="album">
<template #start>
Expand Down
4 changes: 2 additions & 2 deletions resources/js/components/headers/AlbumsHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<ImportFromServer v-if="canUpload" v-model:visible="isImportFromServerOpen" />
<ImportFromLink v-if="canUpload" v-model:visible="isImportFromLinkOpen" :parent-id="null" />
<DropBox v-if="canUpload" v-model:visible="isImportFromDropboxOpen" :album-id="null" />
<AlbumCreateDialog v-if="canUpload" v-model:visible="isCreateAlbumOpen" :parent-id="null" />
<AlbumCreateTagDialog v-if="canUpload" v-model:visible="isCreateTagAlbumOpen" />
<AlbumCreateDialog v-if="canUpload" v-model:visible="isCreateAlbumOpen" :parent-id="null" key="create_album_modal" />
<AlbumCreateTagDialog v-if="canUpload" v-model:visible="isCreateTagAlbumOpen" key="create_tag_album_modal" />
<Toolbar
class="w-full border-0 h-14"
:pt:root:class="'flex-nowrap relative'"
Expand Down
6 changes: 3 additions & 3 deletions resources/js/router/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Photo from "@/views/gallery-panels/Photo.vue";
const Landing = () => import("@/views/Landing.vue");
const Frame = () => import("@/views/gallery-panels/Frame.vue");
const Search = () => import("@/views/gallery-panels/Search.vue");
const Map = () => import("@/views/gallery-panels/Map.vue");
const MapView = () => import("@/views/gallery-panels/Map.vue");
const Permissions = () => import("@/views/Permissions.vue");
const Users = () => import("@/views/Users.vue");
const Sharing = () => import("@/views/Sharing.vue");
Expand Down Expand Up @@ -53,12 +53,12 @@ const routes_ = [
{
name: "map",
path: "/map",
component: Map,
component: MapView,
},
{
name: "map-with-album",
path: "/map/:albumid",
component: Map,
component: MapView,
props: true,
},
{
Expand Down

0 comments on commit 98ca856

Please sign in to comment.