Skip to content

Commit

Permalink
support timeline in albums and album
Browse files Browse the repository at this point in the history
  • Loading branch information
ildyria committed Nov 20, 2024
1 parent 84dbcf4 commit a3e349e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions resources/js/layouts/PhotoLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { useJustify } from "./useJustify";
import { useMasonry } from "./useMasonry";
import { useGrid } from "./useGrid";
import AlbumService from "@/services/album-service";
import TimelineService from "@/services/timeline-service";

export function useLayouts(
config: App.Http.Resources.GalleryConfigs.PhotoLayoutConfig,
Expand Down Expand Up @@ -63,9 +64,16 @@ export function useGetLayoutConfig() {
});
}

function loadLayoutTimeline() {
TimelineService.init().then((data) => {
layout.value = data.data.photo_layout;
});
}

return {
layout,
layoutConfig,
loadLayoutConfig,
loadLayoutTimeline,
};
}

0 comments on commit a3e349e

Please sign in to comment.