mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
* refactor(editor): Turn showMessage mixin to composable (#6081) * refactor(editor): move $getExecutionError from showMessages mixin to pushConnection (it is used there only) * refactor(editor): resolve showMessage mixin methods * fix(editor): use composable instead of mixin * fix(editor): resolve conflicts * fix(editor): replace clearAllStickyNotifications * fix(editor): replace confirmMessage * fix(editor): replace confirmMessage * fix(editor): replace confirmMessage * fix(editor): remove last confirmMessage usage * fix(editor): remove $prompt usage * fix(editor): remove $show methods * fix(editor): lint fix * fix(editor): lint fix * fix(editor): fixes after review * fix(editor): Fix external hook call in App * fix(editor): mixins & composables * fix: add pushConnection setup composables to components as well * fix(editor): mixins & composables * fix(editor): mixins & composables * fix: add void on non-await async calls * fix: fix close without connecting confirmation * fix: remove .only --------- Co-authored-by: Alex Grozav <alex@grozav.com>
This commit is contained in:
@@ -81,17 +81,17 @@
|
||||
|
||||
<script lang="ts">
|
||||
import type { IUser, IUserListAction } from '@/Interface';
|
||||
import mixins from 'vue-typed-mixins';
|
||||
import { showMessage } from '@/mixins/showMessage';
|
||||
import { defineComponent } from 'vue';
|
||||
import { useMessage } from '@/composables';
|
||||
import { mapStores } from 'pinia';
|
||||
import { useUsersStore } from '@/stores/users.store';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { useUIStore } from '@/stores/ui.store';
|
||||
import { useCredentialsStore } from '@/stores/credentials.store';
|
||||
import { useUsageStore } from '@/stores/usage.store';
|
||||
import { EnterpriseEditionFeature, VIEWS } from '@/constants';
|
||||
import { EnterpriseEditionFeature, MODAL_CONFIRM, VIEWS } from '@/constants';
|
||||
|
||||
export default mixins(showMessage).extend({
|
||||
export default defineComponent({
|
||||
name: 'CredentialSharing',
|
||||
props: [
|
||||
'credential',
|
||||
@@ -101,6 +101,11 @@ export default mixins(showMessage).extend({
|
||||
'credentialPermissions',
|
||||
'modalBus',
|
||||
],
|
||||
setup() {
|
||||
return {
|
||||
...useMessage(),
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapStores(useCredentialsStore, useUsersStore, useUsageStore, useUIStore, useSettingsStore),
|
||||
usersListActions(): IUserListAction[] {
|
||||
@@ -148,21 +153,22 @@ export default mixins(showMessage).extend({
|
||||
const user = this.usersStore.getUserById(userId);
|
||||
|
||||
if (user) {
|
||||
const confirm = await this.confirmMessage(
|
||||
const confirm = await this.confirm(
|
||||
this.$locale.baseText('credentialEdit.credentialSharing.list.delete.confirm.message', {
|
||||
interpolate: { name: user.fullName || '' },
|
||||
}),
|
||||
this.$locale.baseText('credentialEdit.credentialSharing.list.delete.confirm.title'),
|
||||
null,
|
||||
this.$locale.baseText(
|
||||
'credentialEdit.credentialSharing.list.delete.confirm.confirmButtonText',
|
||||
),
|
||||
this.$locale.baseText(
|
||||
'credentialEdit.credentialSharing.list.delete.confirm.cancelButtonText',
|
||||
),
|
||||
{
|
||||
confirmButtonText: this.$locale.baseText(
|
||||
'credentialEdit.credentialSharing.list.delete.confirm.confirmButtonText',
|
||||
),
|
||||
cancelButtonText: this.$locale.baseText(
|
||||
'credentialEdit.credentialSharing.list.delete.confirm.cancelButtonText',
|
||||
),
|
||||
},
|
||||
);
|
||||
|
||||
if (confirm) {
|
||||
if (confirm === MODAL_CONFIRM) {
|
||||
this.$emit(
|
||||
'change',
|
||||
this.credentialData.sharedWith.filter((sharee: IUser) => {
|
||||
|
||||
Reference in New Issue
Block a user