node-share: fix UI redirect

pull/474/head
Varun Patil 2023-03-10 09:45:24 -08:00
parent 4e6a2a1329
commit b94e055abc
3 changed files with 11 additions and 1 deletions

View File

@ -768,6 +768,7 @@ export default defineComponent({
data = await dav.getTagsData();
} else if (dav.isSingleItem()) {
data = await dav.getSingleItemData();
this.$router.replace(utils.getViewerRoute(data[0]!.detail[0]));
} else {
// Try the cache
try {

View File

@ -319,6 +319,11 @@ export default defineComponent({
);
},
/** Allow closing the viewer */
allowClose(): boolean {
return !this.editorOpen && !dav.isSingleItem();
},
/** Get date taken string */
currentDateTaken(): string | null {
const date = this.currentPhoto?.imageInfo?.datetaken;
@ -427,9 +432,12 @@ export default defineComponent({
bgOpacity: 1,
appendToEl: this.$refs.inner as HTMLElement,
preload: [2, 2],
clickToCloseNonZoomable: false,
bgClickAction: "toggle-controls",
clickToCloseNonZoomable: false,
pinchToClose: this.allowClose,
closeOnVerticalDrag: this.allowClose,
easing: "cubic-bezier(.49,.85,.55,1)",
showHideAnimationType: "zoom",
showAnimationDuration: 250,

View File

@ -12,6 +12,7 @@ export async function getSingleItemData(): Promise<IDay[]> {
return [];
}
singleItem.key = singleItem.fileid;
return [
{
dayid: singleItem.dayid,