Skip to content

Commit

Permalink
fix: Adjust usage of @nextcloud/files to match with latest API changes
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux authored and artonge committed Nov 29, 2023
1 parent e7db815 commit 7464bde
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/actions/openGroupfolderAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import { translate as t } from '@nextcloud/l10n'
import type { Node } from '@nextcloud/files'

import { registerFileAction, FileAction } from '@nextcloud/files'
import { registerFileAction, FileAction, DefaultType } from '@nextcloud/files'

registerFileAction(new FileAction({
id: 'open-group-folders',
Expand All @@ -38,10 +38,10 @@ registerFileAction(new FileAction({
{ view: 'files' },
{ dir },
)
return null as any as boolean
return null as unknown as boolean
},

default: true,
default: DefaultType.DEFAULT,
// Before openFolderAction
order: -1000,
}))
10 changes: 8 additions & 2 deletions src/components/AclStateButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,18 @@
-->
<template>
<div v-if="readOnly">
<NcButton v-if="!isAllowed" v-tooltip="t('groupfolders', 'Denied')" :title="t('groupfolders', 'Denied')" :aria-label="t('groupfolders', 'Access denied')">
<NcButton v-if="!isAllowed"
v-tooltip="t('groupfolders', 'Denied')"
:title="t('groupfolders', 'Denied')"
:aria-label="t('groupfolders', 'Access denied')">
<template #icon>
<Cancel :size="16" />
</template>
</NcButton>
<NcButton v-else v-tooltip="t('groupfolders', 'Allowed')" :title="t('groupfolders', 'Allowed')" :aria-label="t('groupfolders', 'Access allowed')">
<NcButton v-else
v-tooltip="t('groupfolders', 'Allowed')"
:title="t('groupfolders', 'Allowed')"
:aria-label="t('groupfolders', 'Access allowed')">
<template #icon>
<Check :size="16" />
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/services/groupfolders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import type { DAVResultResponseProps, FileStat, ResponseDataDetailed } from 'webdav'

import { getCurrentUser } from '@nextcloud/auth'
import { File, Folder, Permission, parseWebdavPermissions } from '@nextcloud/files'
import { File, Folder, Permission } from '@nextcloud/files'
import { generateRemoteUrl, generateUrl } from '@nextcloud/router'

import client, { rootPath } from './client'
Expand Down

0 comments on commit 7464bde

Please sign in to comment.