Skip to content

Commit

Permalink
Small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan committed Aug 11, 2023
1 parent 0762d11 commit 741ef40
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
13 changes: 12 additions & 1 deletion packages/web-app-files/src/components/Search/Preview.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<oc-button
:class="{ 'disabled': resource.processing }"
:type="resource.isFolder ? 'router-link' : 'button'"
justify-content="left"
class="files-search-preview oc-flex oc-width-1-1"
:class="{ 'files-search-preview-disabled': resource.processing }"
appearance="raw"
v-bind="attrs"
v-on="listeners"
Expand Down Expand Up @@ -206,3 +206,14 @@ export default defineComponent({
}
})
</script>

<style lang="scss" scoped>
.files-search-preview {
&-disabled {
pointer-events: none;
background-color: var(--oc-color-background-muted);
opacity: 0.7;
filter: grayscale(0.6);
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,15 @@ export default defineComponent({
return this.items.slice(0, this.showMoreToggleCount)
},
disabledResourceItems() {
/*
* Only show disabled items in accepted shares table, as this is the only view where file actions are possible
* but might fail due to processing state.
* Accepting or denying shares is possible anyway.
*/
if (this.shareStatus !== ShareStatus.accepted) {
return []
}
return this.resourceItems
.filter((resource) => resource.processing === true)
.map((resource) => resource.id)
Expand Down
6 changes: 0 additions & 6 deletions packages/web-app-search/src/portals/SearchBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -594,12 +594,6 @@ export default defineComponent({
background-color: var(--oc-color-background-highlight);
}
}
&.preview .disabled {
pointer-events: none;
background-color: var(--oc-color-background-muted);
opacity: 0.7;
filter: grayscale(0.6);
}
}
}
}
Expand Down

0 comments on commit 741ef40

Please sign in to comment.