Skip to content

Commit

Permalink
Code cleanup in quickActions & createAndUpload
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalwengerter committed Mar 30, 2022
1 parent 7c31fb2 commit c40f9e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
21 changes: 4 additions & 17 deletions packages/web-app-files/src/components/AppBar/CreateAndUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
</template>

<script>
import { mapActions, mapGetters, mapState, mapMutations } from 'vuex'
import { mapActions, mapGetters, mapMutations } from 'vuex'
import pathUtil from 'path'
import Mixins from '../../mixins'
Expand Down Expand Up @@ -161,7 +161,6 @@ export default {
computed: {
...mapGetters(['getToken', 'capabilities', 'configuration', 'newFileHandlers', 'user']),
...mapGetters('Files', ['files', 'currentFolder', 'publicLinkPassword']),
...mapState('Files', ['areHiddenFilesShown']),
mimetypesAllowedForCreation() {
// we can't use `mapGetters` here because the External app doesn't exist in all deployments
Expand Down Expand Up @@ -257,21 +256,9 @@ export default {
}
},
methods: {
...mapActions('Files', [
'loadPreview',
'updateFileProgress',
'removeFilesFromTrashbin',
'loadIndicators'
]),
...mapActions(['openFile', 'showMessage', 'createModal', 'setModalInputErrorMessage']),
...mapMutations('Files', [
'UPSERT_RESOURCE',
'SET_HIDDEN_FILES_VISIBILITY',
'REMOVE_FILE',
'REMOVE_FILE_FROM_SEARCHED',
'SET_FILE_SELECTION',
'REMOVE_FILE_SELECTION'
]),
...mapActions('Files', ['updateFileProgress', 'loadIndicators']),
...mapActions(['showMessage', 'createModal', 'setModalInputErrorMessage']),
...mapMutations('Files', ['UPSERT_RESOURCE']),
...mapMutations(['SET_QUOTA']),
async onFileSuccess(event, file) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
v-oc-tooltip="action.label($gettext)"
:aria-label="action.label($gettext)"
appearance="raw"
class="oc-mr-xs quick-action-button"
class="oc-mr-xs quick-action-button oc-p-xs"
:class="`files-quick-action-${action.id}`"
@click="action.handler({ item, client: $client, store: $store, $gettext })"
>
<oc-icon :name="action.icon" fill-type="line" class="oc-flex" />
<oc-icon :name="action.icon" fill-type="line" />
</oc-button>
</div>
</template>
Expand Down Expand Up @@ -42,7 +42,6 @@ export default {

<style lang="scss">
.quick-action-button {
padding: calc(1.5 * var(--oc-space-xsmall)) !important;
&:hover {
background-color: var(--oc-color-background-muted) !important;
}
Expand Down

0 comments on commit c40f9e6

Please sign in to comment.