Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexAndBear committed Jun 18, 2024
1 parent 65731e7 commit 0fb1630
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { isLocationTrashActive } from '../../../router'
import { eventBus } from '../../../services/eventBus'
import { SideBarEventTopics } from '../../sideBar'
import { computed, unref } from 'vue'
import { computed } from 'vue'
import { useGettext } from 'vue3-gettext'
import { useIsAppWrapperActive, useIsFilesAppActive } from '../helpers'
import { useRouter } from '../../router'
import { FileAction } from '../types'
import { useResourcesStore } from '../../piniaStores'
Expand All @@ -13,8 +12,6 @@ export const useFileActionsShowDetails = () => {
const resourcesStore = useResourcesStore()

const { $gettext } = useGettext()
const isFilesAppActive = useIsFilesAppActive()
const isAppWrapperActive = useIsAppWrapperActive()

const actions = computed((): FileAction[] => [
{
Expand All @@ -26,10 +23,6 @@ export const useFileActionsShowDetails = () => {
// we don't have details in the trashbin, yet.
// remove trashbin route rule once we have them.
isVisible: ({ resources }) => {
if (!unref(isFilesAppActive) && !unref(isAppWrapperActive)) {
return false
}

if (isLocationTrashActive(router, 'files-trash-generic')) {
return false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { isLocationTrashActive } from '../../../router'
import { ShareResource } from '@ownclouders/web-client'
import { eventBus } from '../../../services'
import { SideBarEventTopics } from '../../sideBar'
import { computed, unref } from 'vue'
import { computed } from 'vue'
import { useGettext } from 'vue3-gettext'
import { useIsAppWrapperActive, useIsFilesAppActive } from '../helpers'
import { useIsFilesAppActive } from '../helpers'
import { useRouter } from '../../router'
import { FileAction, FileActionOptions } from '../types'
import { useCanShare } from '../../shares'
Expand All @@ -14,7 +14,6 @@ export const useFileActionsShowShares = () => {
const router = useRouter()
const { $gettext } = useGettext()
const isFilesAppActive = useIsFilesAppActive()
const isAppWrapperActive = useIsAppWrapperActive()
const { canShare } = useCanShare()
const resourcesStore = useResourcesStore()

Expand All @@ -30,11 +29,6 @@ export const useFileActionsShowShares = () => {
label: () => $gettext('Share'),
handler,
isVisible: ({ space, resources }) => {
// sidebar is currently only available inside files app
if (!unref(isFilesAppActive) && !unref(isAppWrapperActive)) {
return false
}

if (isLocationTrashActive(router, 'files-trash-generic')) {
return false
}
Expand Down
1 change: 0 additions & 1 deletion packages/web-pkg/src/composables/actions/helpers/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from './useIsSearchActive'
export * from './useFileActionsDeleteResources'
export * from './useIsFilesAppActive'
export * from './useIsAppWrapperActive'

This file was deleted.

0 comments on commit 0fb1630

Please sign in to comment.