Redesign 1 bcrypt #226

Merged
bones7242 merged 156 commits from redesign-1-bcrypt into master 2017-10-30 15:55:14 +01:00
2 changed files with 8 additions and 1 deletions
Showing only changes of commit 0e498ff91c - Show all commits

View file

@ -13,6 +13,11 @@ function showChannelCreateDoneDisplay() {
done.hidden = false;
}
function showChannelCreationError(msg) {
const inProgress = document.getElementById('channel-publish-in-progress');
inProgress.innerText = msg;
}
function publishNewChannel (event) {
const userName = document.getElementById('new-channel-name').value;
const password = document.getElementById('new-channel-password').value;
@ -42,11 +47,13 @@ function publishNewChannel (event) {
}
})
.catch(error => {
if (error.name === 'ChannelNameError' || error.name === 'ChannelPasswordError'){
const channelNameErrorDisplayElement = document.getElementById('input-error-channel-name');
showError(channelNameErrorDisplayElement, error.message);
} else {
console.log('signup failure:', error);
showChannelCreationError('Unfortunately, Spee.ch encountered an error while creating your channel :(');
}
})
}

View file

@ -210,7 +210,7 @@ function validateNewChannelSubmission(userName, password){
resolve();
} else {
console.log('channel is not available');
reject(new ChannelNameError('that channel name has already been taken'));
reject(new ChannelNameError('Sorry, that name is already taken'));
}
})
.catch( error => {