Skip to content

Commit

Permalink
Refactor private link handling
Browse files Browse the repository at this point in the history
  • Loading branch information
JammingBen committed Oct 10, 2022
1 parent dc8a92e commit 7b21533
Show file tree
Hide file tree
Showing 12 changed files with 139 additions and 232 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -584,15 +584,15 @@ export default defineComponent({
parseInt(this.share.permissions),
this.highlightedFile.isFolder,
this.hasPublicLinkEditing,
true,
this.hasPublicLinkAliasSupport,
!!link.password
)
}
return LinkShareRoles.list(
this.highlightedFile.isFolder,
this.hasPublicLinkEditing,
true,
this.hasPublicLinkAliasSupport,
!!link.password
)
}
Expand Down
2 changes: 0 additions & 2 deletions packages/web-app-files/src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import App from './App.vue'
import Favorites from './views/Favorites.vue'
import FilesDrop from './views/FilesDrop.vue'
import PrivateLink from './views/PrivateLink.vue'
import SharedWithMe from './views/shares/SharedWithMe.vue'
import SharedWithOthers from './views/shares/SharedWithOthers.vue'
import SharedViaLink from './views/shares/SharedViaLink.vue'
Expand Down Expand Up @@ -94,7 +93,6 @@ export default {
App,
Favorites,
FilesDrop,
PrivateLink,
SearchResults,
Shares: {
SharedViaLink,
Expand Down
6 changes: 1 addition & 5 deletions packages/web-app-files/src/router/deprecated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import VueRouter, { RouteConfig, Route, Location, RouteMeta } from 'vue-router'
import { createLocationSpaces } from './spaces'
import { createLocationShares } from './shares'
import { createLocationCommon } from './common'
import { createLocationOperations } from './operations'
import { createLocationPublic } from './public'
import { isLocationActive as isLocationActiveNoCompat } from './utils'
import { createLocationTrash } from './trash'
Expand Down Expand Up @@ -90,10 +89,7 @@ export const buildRoutes = (): RouteConfig[] =>
},
{
path: '/private-link/:fileId',
meta: {
auth: false
},
redirect: (to) => createLocationOperations('files-operations-resolver-private-link', to)
redirect: (to) => ({ name: 'resolvePrivateLink', params: { fileId: to.params.fileId } })
},
{
path: '/public-link/:token',
Expand Down
8 changes: 0 additions & 8 deletions packages/web-app-files/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ import {
createLocationCommon
} from './common'
import { buildRoutes as buildDeprecatedRoutes, isLocationActive } from './deprecated'
import {
buildRoutes as buildOperationsRoutes,
createLocationOperations,
isLocationOperationsActive
} from './operations'
import {
buildRoutes as buildPublicRoutes,
createLocationPublic,
Expand Down Expand Up @@ -45,7 +40,6 @@ const buildRoutes = (components: RouteComponents): RouteConfig[] => [
...buildSharesRoutes(components),
...buildPublicRoutes(components),
...buildSpacesRoutes(components),
...buildOperationsRoutes(components),
...buildTrashRoutes(components),
...buildDeprecatedRoutes()
]
Expand All @@ -54,9 +48,7 @@ export {
createLocationCommon,
createLocationShares,
createLocationSpaces,
createLocationOperations,
createLocationPublic,
isLocationOperationsActive,
isLocationCommonActive,
isLocationSharesActive,
isLocationSpacesActive,
Expand Down
25 changes: 0 additions & 25 deletions packages/web-app-files/src/router/operations.ts

This file was deleted.

99 changes: 0 additions & 99 deletions packages/web-app-files/src/views/PrivateLink.vue

This file was deleted.

79 changes: 0 additions & 79 deletions packages/web-runtime/src/pages/resolveAliasLink.vue

This file was deleted.

Loading

0 comments on commit 7b21533

Please sign in to comment.