mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-12 05:17:28 -08:00
feat: Switch owner subview to all subview if has shared resources (#4672)
This commit is contained in:
parent
753f4c9a7d
commit
e3e17e5dac
|
@ -103,7 +103,7 @@
|
|||
</ul>
|
||||
<n8n-text color="text-base" size="medium" v-else>
|
||||
{{ $locale.baseText(`${resourceKey}.noResults`) }}
|
||||
<template v-if="!hasFilters && isOwnerSubview && resourcesNotOwned.length > 0">
|
||||
<template v-if="shouldSwitchToAllSubview">
|
||||
<span v-if="!filters.search">
|
||||
({{ $locale.baseText(`${resourceKey}.noResults.switchToShared.preamble`) }}
|
||||
<n8n-link @click="setOwnerSubview(false)">{{$locale.baseText(`${resourceKey}.noResults.switchToShared.link`) }}</n8n-link>)
|
||||
|
@ -275,6 +275,9 @@ export default mixins(
|
|||
return resource.ownedBy && resource.ownedBy.id !== this.usersStore.currentUser?.id;
|
||||
});
|
||||
},
|
||||
shouldSwitchToAllSubview(): boolean {
|
||||
return !this.hasFilters && this.isOwnerSubview && this.resourcesNotOwned.length > 0;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async onMounted() {
|
||||
|
@ -369,6 +372,11 @@ export default mixins(
|
|||
sortBy() {
|
||||
this.sendSortingTelemetry();
|
||||
},
|
||||
loading(value) {
|
||||
if (!value && this.shouldSwitchToAllSubview) {
|
||||
this.isOwnerSubview = false;
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue