Skip to content

Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.

372 B
Raw Blame
import type { RouterConfig } from 'nuxt/schema'

export default <RouterConfig>{
  scrollBehavior(to, from, savedPosition) {
    if (savedPosition) {
      return savedPosition
    }

    if (to.name === 'slug') {
      return false
    }

    if (from.name === 'slug' && (to.path === '/photos' || to.path === '/')) {
      return false
    }

    return { top: 0 }
  },
}