-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10341 from owncloud/remove-clipboard-from-files-s…
…tore Remove clipboard from files store
- Loading branch information
Showing
24 changed files
with
192 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 3 additions & 9 deletions
12
packages/web-app-files/src/composables/keyboardActions/useKeyboardTableActions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,11 @@ | ||
import { Key, KeyboardActions, ModifierKey, useMessages } from '@ownclouders/web-pkg' | ||
import { Key, KeyboardActions, ModifierKey, useClipboardStore } from '@ownclouders/web-pkg' | ||
import { useStore } from '@ownclouders/web-pkg' | ||
import { useGettext } from 'vue3-gettext' | ||
|
||
export const useKeyboardTableActions = (keyActions: KeyboardActions) => { | ||
const store = useStore() | ||
const messageStore = useMessages() | ||
const language = useGettext() | ||
const { copyResources } = useClipboardStore() | ||
|
||
keyActions.bindKeyAction({ modifier: ModifierKey.Ctrl, primary: Key.C }, () => { | ||
store.dispatch('Files/copySelectedFiles', { | ||
...language, | ||
resources: store.getters['Files/selectedFiles'], | ||
messageStore | ||
}) | ||
copyResources(store.getters['Files/selectedFiles']) | ||
}) | ||
} |
20 changes: 4 additions & 16 deletions
20
packages/web-app-files/src/composables/keyboardActions/useKeyboardTableSpaceActions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,25 @@ | ||
import { Key, KeyboardActions, ModifierKey, useMessages } from '@ownclouders/web-pkg' | ||
import { Key, KeyboardActions, ModifierKey, useClipboardStore } from '@ownclouders/web-pkg' | ||
import { SpaceResource } from '@ownclouders/web-client' | ||
import { useStore } from '@ownclouders/web-pkg' | ||
import { useGettext } from 'vue3-gettext' | ||
import { unref } from 'vue' | ||
import { useFileActionsPaste } from '@ownclouders/web-pkg' | ||
|
||
export const useKeyboardTableSpaceActions = (keyActions: KeyboardActions, space: SpaceResource) => { | ||
const store = useStore() | ||
const messageStore = useMessages() | ||
const language = useGettext() | ||
const { copyResources, cutResources } = useClipboardStore() | ||
|
||
const { actions: pasteFileActions } = useFileActionsPaste({ store }) | ||
const pasteFileAction = unref(pasteFileActions)[0].handler | ||
|
||
keyActions.bindKeyAction({ modifier: ModifierKey.Ctrl, primary: Key.C }, () => { | ||
store.dispatch('Files/copySelectedFiles', { | ||
...language, | ||
space: space, | ||
resources: store.getters['Files/selectedFiles'], | ||
messageStore | ||
}) | ||
copyResources(store.getters['Files/selectedFiles']) | ||
}) | ||
|
||
keyActions.bindKeyAction({ modifier: ModifierKey.Ctrl, primary: Key.V }, () => { | ||
pasteFileAction({ space: space }) | ||
}) | ||
|
||
keyActions.bindKeyAction({ modifier: ModifierKey.Ctrl, primary: Key.X }, () => { | ||
store.dispatch('Files/cutSelectedFiles', { | ||
...language, | ||
space: space, | ||
resources: store.getters['Files/selectedFiles'], | ||
messageStore | ||
}) | ||
cutResources(store.getters['Files/selectedFiles']) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
export * from './transfer' | ||
export * from './upload' | ||
export * from './types' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.