mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Merge pull request #55718 from nextcloud/chore/remove-oca-sharing-external-link-actions
chore!(files_sharing): remove deprecated `OCA.Sharing.ExternalLinkActions`
This commit is contained in:
commit
5aa1f5bb84
14 changed files with 10 additions and 83 deletions
|
|
@ -192,16 +192,6 @@
|
|||
:file-info="fileInfo"
|
||||
:share="share" />
|
||||
|
||||
<!-- external legacy sharing via url (social...) -->
|
||||
<NcActionLink
|
||||
v-for="({ icon, url, name }, actionIndex) in externalLegacyLinkActions"
|
||||
:key="actionIndex"
|
||||
:href="url(shareLink)"
|
||||
:icon="icon"
|
||||
target="_blank">
|
||||
{{ name }}
|
||||
</NcActionLink>
|
||||
|
||||
<NcActionButton
|
||||
v-if="!isEmailShareType && canReshare"
|
||||
class="new-share-link"
|
||||
|
|
@ -268,7 +258,6 @@ import { toRaw } from 'vue'
|
|||
import NcActionButton from '@nextcloud/vue/components/NcActionButton'
|
||||
import NcActionCheckbox from '@nextcloud/vue/components/NcActionCheckbox'
|
||||
import NcActionInput from '@nextcloud/vue/components/NcActionInput'
|
||||
import NcActionLink from '@nextcloud/vue/components/NcActionLink'
|
||||
import NcActions from '@nextcloud/vue/components/NcActions'
|
||||
import NcActionSeparator from '@nextcloud/vue/components/NcActionSeparator'
|
||||
import NcActionText from '@nextcloud/vue/components/NcActionText'
|
||||
|
|
@ -301,7 +290,6 @@ export default {
|
|||
NcActionButton,
|
||||
NcActionCheckbox,
|
||||
NcActionInput,
|
||||
NcActionLink,
|
||||
NcActionText,
|
||||
NcActionSeparator,
|
||||
NcAvatar,
|
||||
|
|
@ -352,7 +340,6 @@ export default {
|
|||
// Are we waiting for password/expiration date
|
||||
pending: false,
|
||||
|
||||
ExternalLegacyLinkActions: OCA.Sharing.ExternalLinkActions.state,
|
||||
ExternalShareActions: OCA.Sharing.ExternalShareActions.state,
|
||||
externalShareActions: getSidebarInlineActions(),
|
||||
|
||||
|
|
@ -593,16 +580,6 @@ export default {
|
|||
return t('files_sharing', 'Copy public link of "{title}"', { title: this.title })
|
||||
},
|
||||
|
||||
/**
|
||||
* External additionnai actions for the menu
|
||||
*
|
||||
* @deprecated use OCA.Sharing.ExternalShareActions
|
||||
* @return {Array}
|
||||
*/
|
||||
externalLegacyLinkActions() {
|
||||
return this.ExternalLegacyLinkActions.actions
|
||||
},
|
||||
|
||||
/**
|
||||
* Additional actions for the menu
|
||||
*
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import ShareVariant from '@mdi/svg/svg/share-variant.svg?raw'
|
|||
import { getCSPNonce } from '@nextcloud/auth'
|
||||
import { n, t } from '@nextcloud/l10n'
|
||||
import Vue from 'vue'
|
||||
import ExternalLinkActions from './services/ExternalLinkActions.js'
|
||||
import ExternalShareActions from './services/ExternalShareActions.js'
|
||||
import ShareSearch from './services/ShareSearch.js'
|
||||
import TabSections from './services/TabSections.js'
|
||||
|
|
@ -19,7 +18,6 @@ if (!window.OCA.Sharing) {
|
|||
window.OCA.Sharing = {}
|
||||
}
|
||||
Object.assign(window.OCA.Sharing, { ShareSearch: new ShareSearch() })
|
||||
Object.assign(window.OCA.Sharing, { ExternalLinkActions: new ExternalLinkActions() })
|
||||
Object.assign(window.OCA.Sharing, { ExternalShareActions: new ExternalShareActions() })
|
||||
Object.assign(window.OCA.Sharing, { ShareTabSections: new TabSections() })
|
||||
|
||||
|
|
|
|||
|
|
@ -1,48 +0,0 @@
|
|||
/**
|
||||
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
|
||||
import logger from './logger.ts'
|
||||
|
||||
export default class ExternalLinkActions {
|
||||
_state
|
||||
|
||||
constructor() {
|
||||
// init empty state
|
||||
this._state = {}
|
||||
|
||||
// init default values
|
||||
this._state.actions = []
|
||||
logger.debug('OCA.Sharing.ExternalLinkActions initialized')
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the state
|
||||
*
|
||||
* @readonly
|
||||
* @memberof ExternalLinkActions
|
||||
* @return {object} the data state
|
||||
*/
|
||||
get state() {
|
||||
return this._state
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a new action for the link share
|
||||
* Mostly used by the social sharing app.
|
||||
*
|
||||
* @param {object} action new action component to register
|
||||
* @return {boolean}
|
||||
*/
|
||||
registerAction(action) {
|
||||
logger.warn('OCA.Sharing.ExternalLinkActions is deprecated, use `registerSidebarAction` from `@nextcloud/sharing` instead')
|
||||
|
||||
if (typeof action === 'object' && action.icon && action.name && action.url) {
|
||||
this._state.actions.push(action)
|
||||
return true
|
||||
}
|
||||
logger.error('Invalid action provided', action)
|
||||
return false
|
||||
}
|
||||
}
|
||||
2
dist/1960-1960.js
vendored
2
dist/1960-1960.js
vendored
File diff suppressed because one or more lines are too long
1
dist/1960-1960.js.map
vendored
1
dist/1960-1960.js.map
vendored
File diff suppressed because one or more lines are too long
1
dist/1960-1960.js.map.license
vendored
1
dist/1960-1960.js.map.license
vendored
|
|
@ -1 +0,0 @@
|
|||
1960-1960.js.license
|
||||
2
dist/4247-4247.js
vendored
Normal file
2
dist/4247-4247.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/4247-4247.js.map
vendored
Normal file
1
dist/4247-4247.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/4247-4247.js.map.license
vendored
Symbolic link
1
dist/4247-4247.js.map.license
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
4247-4247.js.license
|
||||
4
dist/files_sharing-files_sharing_tab.js
vendored
4
dist/files_sharing-files_sharing_tab.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_sharing-files_sharing_tab.js.map
vendored
2
dist/files_sharing-files_sharing_tab.js.map
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue