Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable28] build(deps): Bump @nextcloud/files from 3.0.0-beta.11 to 3.0.0 #2649

Merged
merged 4 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
extends: [
'@nextcloud',
'@nextcloud/eslint-config/typescript',
],
}
45,689 changes: 29,099 additions & 16,590 deletions package-lock.json

Large diffs are not rendered by default.

17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,29 @@
"devDependencies": {
"@babel/preset-react": "^7.23.3",
"@nextcloud/babel-config": "^1.0.0",
"@nextcloud/browserslist-config": "^2.3.0",
"@nextcloud/eslint-config": "^8.2.1",
"@nextcloud/browserslist-config": "^3.0.0",
"@nextcloud/eslint-config": "^8.3.0",
"@nextcloud/stylelint-config": "^2.3.1",
"@nextcloud/webpack-vue-config": "^5.5.1",
"@types/bootstrap": "^5.2.9",
"@types/jquery": "^3.5.27",
"@types/react": "^17.0.43",
"@types/react-dom": "^18.0.3",
"@types/webpack": "^4.41.26",
"@types/react-dom": "^17.0.0",
"@types/webpack": "^5.28.5",
"@types/webpack-env": "^1.18.4",
"clean-webpack-plugin": "^4.0.0",
"eslint-plugin-react": "^7.33.2",
"react-hot-loader": "4.13.1",
"ts-loader": "^9.5.1",
"typescript": "^4.9.5"
"typescript": "^5.0.2"
},
"dependencies": {
"@mdi/svg": "^7.3.67",
"@nextcloud/auth": "^2.2.1",
"@nextcloud/axios": "^2.4.0",
"@nextcloud/event-bus": "^3.1.0",
"@nextcloud/files": "^3.0.0-beta.11",
"@nextcloud/files": "^3.0.0",
"@nextcloud/initial-state": "^2.1.0",
"@nextcloud/l10n": "^2.1.0",
"@nextcloud/router": "^2.1.2",
"@nextcloud/vue": "^7.12.6",
Expand All @@ -47,11 +48,11 @@
"react-dom": "^17.0.2",
"react-flip-move": "^3.0.5",
"react-select": "^5.8.0",
"vue": "^2.7.13",
"vue": "^2.7.14",
"vue-click-outside": "^1.1.0",
"vue-material-design-icons": "^5.2.0",
"vue-template-compiler": "^2.7.14",
"webdav": "^5.3.0",
"whatwg-fetch": "^3.6.19"
}
}
}
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
55 changes: 28 additions & 27 deletions src/settings/AdminGroupSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@
*
*/

import * as React from 'react';
import Select from 'react-select';
import * as React from 'react'
import Select from 'react-select'

import { CLASS_NAME_ADMIN_DELEGATION } from '../Constants.js'
import { Component } from 'react';
import { getCurrentUser } from '@nextcloud/auth';
import { Group, Api, Circle } from './Api';
import { loadState } from '@nextcloud/initial-state';
import { Component } from 'react'
import { getCurrentUser } from '@nextcloud/auth'
import { Group, Api } from './Api'

interface AdminGroupSelectProps {
groups: Group[],
Expand All @@ -44,7 +43,7 @@ class AdminGroupSelect extends Component<AdminGroupSelectProps> {
delegatedAdminGroups: [],
}

constructor (props) {
constructor(props) {
super(props)
this.state.groups = props.groups
this.state.allGroups = props.allGroups
Expand All @@ -55,62 +54,64 @@ class AdminGroupSelect extends Component<AdminGroupSelectProps> {

componentDidMount() {
this.api.listGroups().then((groups) => {
this.setState({groups});
});
this.setState({ groups })
})
this.api.listDelegatedGroups(CLASS_NAME_ADMIN_DELEGATION).then((groups) => {
this.setState({delegatedAdminGroups: groups});
});
this.setState({ delegatedAdminGroups: groups })
})
}

updateDelegatedAdminGroups(options: {value: string, label: string}[]): void {
if (this.state.groups !== undefined) {
const groups = options.map(option => {
return this.state.groups.filter(g => g.gid === option.value)[0];
});
this.setState({delegatedAdminGroups: groups}, () => {
this.api.updateDelegatedGroups(this.state.delegatedAdminGroups, CLASS_NAME_ADMIN_DELEGATION);
});
return this.state.groups.filter(g => g.gid === option.value)[0]
})
this.setState({ delegatedAdminGroups: groups }, () => {
this.api.updateDelegatedGroups(this.state.delegatedAdminGroups, CLASS_NAME_ADMIN_DELEGATION)
})
}
}

render () {
render() {
const options = this.state.groups.map(group => {
return {
value: group.gid,
label: group.displayName
};
});
label: group.displayName,
}
})

/* @ts-expect-error Typescript error due to async react component */
return <Select
onChange={ this.updateDelegatedAdminGroups.bind(this) }
isDisabled={getCurrentUser() ? !getCurrentUser()!.isAdmin : true}
isMulti
value={this.state.delegatedAdminGroups.map(group => {
return {
value: group.gid,
label: group.displayName
};
label: group.displayName,
}
})}
className="delegated-admins-select"
options={options}
placeholder={t('groupfolders', 'Add group')}
styles={{
input: (provided) => ({
...provided,
height: '30'
height: '30',
}),
control: (provided) => ({
...provided,
backgroundColor: 'var(--color-main-background)'
backgroundColor: 'var(--color-main-background)',
}),
menu: (provided) => ({
...provided,
backgroundColor: 'var(--color-main-background)',
borderColor: 'var(--color-border, #888)'
})
borderColor: 'var(--color-border, #888)',
}),
}}
/>
}

}

export default AdminGroupSelect
export default AdminGroupSelect
Loading
Loading