Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvements #2655

Merged
merged 2 commits into from
Nov 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
3 changes: 2 additions & 1 deletion resources/js/components/headers/AlbumHeader.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<template>
<UploadPanel v-if="canUpload" @refresh="refresh" />
<UploadPanel v-if="canUpload" @refresh="refresh" key="upload_modal" />
<DropBox v-if="canUpload" v-model:visible="isImportFromDropboxOpen" :album-id="props.album.id" />
<ImportFromLink v-if="canUpload" v-model:visible="isImportFromLinkOpen" :parent-id="props.album.id" @refresh="refresh" />
<AlbumCreateDialog
v-if="canUpload && props.config.is_model_album"
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
6 changes: 3 additions & 3 deletions resources/js/components/headers/AlbumsHeader.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<template>
<LoginModal v-if="props.user.id === null" v-model:visible="is_login_open" @logged-in="refresh" @open-webauthn="isWebAuthnOpen = true" />
<WebauthnModal v-if="props.user.id === null && !isWebAuthnUnavailable" v-model:visible="isWebAuthnOpen" @logged-in="refresh" />
<UploadPanel v-if="canUpload" @refresh="refresh" />
<UploadPanel v-if="canUpload" @refresh="refresh" key="upload_modal" />
<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
31 changes: 16 additions & 15 deletions resources/js/router/routes.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import Diagnostics from "@/views/Diagnostics.vue";
import Jobs from "@/views/Jobs.vue";
import Landing from "@/views/Landing.vue";
import Maintenance from "@/views/Maintenance.vue";
import Profile from "@/views/Profile.vue";
import Settings from "@/views/Settings.vue";
import Sharing from "@/views/Sharing.vue";
import Users from "@/views/Users.vue";
import Album from "@/views/gallery-panels/Album.vue";
import Albums from "@/views/gallery-panels/Albums.vue";
import Photo from "@/views/gallery-panels/Photo.vue";
import Search from "@/views/gallery-panels/Search.vue";
import Permissions from "@/views/Permissions.vue";
import Frame from "@/views/gallery-panels/Frame.vue";
import Map from "@/views/gallery-panels/Map.vue";
import Statistics from "@/views/Statistics.vue";

const Landing = () => import("@/views/Landing.vue");
const Frame = () => import("@/views/gallery-panels/Frame.vue");
const Search = () => import("@/views/gallery-panels/Search.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");
const Settings = () => import("@/views/Settings.vue");
const Profile = () => import("@/views/Profile.vue");
const Maintenance = () => import("@/views/Maintenance.vue");
const Diagnostics = () => import("@/views/Diagnostics.vue");
const Statistics = () => import("@/views/Statistics.vue");
const Jobs = () => import("@/views/Jobs.vue");

const routes_ = [
{
Expand Down Expand Up @@ -52,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