mirror of
https://github.com/documize/community.git
synced 2025-07-25 08:09:43 +02:00
Replace showNotificaiton() calls
This commit is contained in:
parent
9235c183c5
commit
74e9699e1e
4 changed files with 9 additions and 15 deletions
|
@ -145,13 +145,13 @@ export default Component.extend({
|
||||||
if (data.authProvider === constants.AuthProvider.Keycloak) {
|
if (data.authProvider === constants.AuthProvider.Keycloak) {
|
||||||
this.get('onSync')().then((response) => {
|
this.get('onSync')().then((response) => {
|
||||||
if (response.isError) {
|
if (response.isError) {
|
||||||
this.showNotification(response.message);
|
console.log(response.message); // eslint-disable-line no-console
|
||||||
data.authProvider = constants.AuthProvider.Documize;
|
data.authProvider = constants.AuthProvider.Documize;
|
||||||
this.get('onSave')(data).then(() => {
|
this.get('onSave')(data).then(() => {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (data.authProvider === this.get('appMeta.authProvider')) {
|
if (data.authProvider === this.get('appMeta.authProvider')) {
|
||||||
this.showNotification(response.message);
|
console.log(response.message); // eslint-disable-line no-console
|
||||||
} else {
|
} else {
|
||||||
this.get('onChange')(data);
|
this.get('onChange')(data);
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,7 +177,6 @@ export default Component.extend(SectionMixin, NotifierMixin, {
|
||||||
}, function (error) {
|
}, function (error) {
|
||||||
self.set('busy', false);
|
self.set('busy', false);
|
||||||
self.set('authenticated', false);
|
self.set('authenticated', false);
|
||||||
self.showNotification("Unable to fetch repositories");
|
|
||||||
console.log(error); // eslint-disable-line no-console
|
console.log(error); // eslint-disable-line no-console
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -202,7 +201,7 @@ export default Component.extend(SectionMixin, NotifierMixin, {
|
||||||
}, function (error) {
|
}, function (error) {
|
||||||
self.set('busy', false);
|
self.set('busy', false);
|
||||||
self.set('authenticated', false);
|
self.set('authenticated', false);
|
||||||
self.showNotification("Unable to fetch owners");
|
console.log("Unable to fetch owners"); // eslint-disable-line no-console
|
||||||
console.log(error); // eslint-disable-line no-console
|
console.log(error); // eslint-disable-line no-console
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -51,11 +51,7 @@ export default Component.extend(SectionMixin, NotifierMixin, {
|
||||||
},
|
},
|
||||||
|
|
||||||
displayError(reason) {
|
displayError(reason) {
|
||||||
if (netUtil.isAjaxAccessError(reason)) {
|
console.log(reason); // eslint-disable-line no-console
|
||||||
// this.showNotification(`Unable to authenticate`);
|
|
||||||
} else {
|
|
||||||
// this.showNotification(`Something went wrong, try again!`);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
@ -181,7 +177,7 @@ export default Component.extend(SectionMixin, NotifierMixin, {
|
||||||
}, function (reason) { // eslint-disable-line no-unused-vars
|
}, function (reason) { // eslint-disable-line no-unused-vars
|
||||||
self.set('authenticated', false);
|
self.set('authenticated', false);
|
||||||
self.set('waiting', false);
|
self.set('waiting', false);
|
||||||
// self.showNotification(`Something went wrong, try again!`);
|
console.log(reason); // eslint-disable-line no-console
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ export default Component.extend(SectionMixin, NotifierMixin, TooltipMixin, {
|
||||||
Trello.deauthorize();
|
Trello.deauthorize();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, function (error) {
|
}, function (error) {
|
||||||
console.log(error); // eslint-disable-line no-console
|
console.log(error); // eslint-disable-line no-console
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -138,7 +138,7 @@ export default Component.extend(SectionMixin, NotifierMixin, TooltipMixin, {
|
||||||
}, function (error) { //jshint ignore: line
|
}, function (error) { //jshint ignore: line
|
||||||
self.set('busy', false);
|
self.set('busy', false);
|
||||||
self.set('authenticated', false);
|
self.set('authenticated', false);
|
||||||
self.showNotification("Unable to fetch board lists");
|
console.log("Unable to fetch board lists"); // eslint-disable-line no-console
|
||||||
console.log(error); // eslint-disable-line no-console
|
console.log(error); // eslint-disable-line no-console
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -199,14 +199,13 @@ export default Component.extend(SectionMixin, NotifierMixin, TooltipMixin, {
|
||||||
}, function (error) { //jshint ignore: line
|
}, function (error) { //jshint ignore: line
|
||||||
self.set('busy', false);
|
self.set('busy', false);
|
||||||
self.set('authenticated', false);
|
self.set('authenticated', false);
|
||||||
self.showNotification("Unable to fetch boards");
|
console.log("Unable to fetch boards"); // eslint-disable-line no-console
|
||||||
console.log(error); // eslint-disable-line no-console
|
console.log(error); // eslint-disable-line no-console
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
error: function (error) {
|
error: function (error) {
|
||||||
self.set('busy', false);
|
self.set('busy', false);
|
||||||
self.set('authenticated', false);
|
self.set('authenticated', false);
|
||||||
self.showNotification("Unable to authenticate");
|
|
||||||
console.log(error); // eslint-disable-line no-console
|
console.log(error); // eslint-disable-line no-console
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -247,4 +246,4 @@ export default Component.extend(SectionMixin, NotifierMixin, TooltipMixin, {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue