-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
To provide a quick way of executing certain actions, we have implemented quick actions. Every extension can define own quick action by creating an object called quickActions and exporting it. Quick actions are then displayed in the actions column inside of the files list.
- Loading branch information
Showing
18 changed files
with
218 additions
and
186 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<template> | ||
<div> | ||
<oc-button | ||
v-for="action in actions" | ||
:id="`files-quick-action-${action.id}`" | ||
:key="action.label" | ||
:aria-label="$gettext(action.label)" | ||
variation="raw" | ||
@click.native.stop=" | ||
action.handler({ item, client: $client, capabilities, alert: showMessage }) | ||
" | ||
> | ||
<oc-icon :name="action.icon" aria-hidden="true" size="small" class="uk-flex" /> | ||
</oc-button> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { mapGetters, mapActions } from 'vuex' | ||
export default { | ||
name: 'QuickActions', | ||
props: { | ||
actions: { | ||
type: Object, | ||
required: true | ||
}, | ||
item: { | ||
type: Object, | ||
required: true | ||
} | ||
}, | ||
computed: { | ||
...mapGetters(['capabilities']) | ||
}, | ||
methods: { | ||
...mapActions(['showMessage']) | ||
} | ||
} | ||
</script> |
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.