fixed channel publish css and errors

This commit is contained in:
bill bittner 2017-11-09 17:46:50 -08:00
parent a6181d60b6
commit 432e05e830
5 changed files with 9 additions and 8 deletions

View file

@ -74,7 +74,7 @@ body, .flex-container--column {
/* TEXT */
body, button, input, textarea, label, select, option {
body, button, input, textarea, label, select, option, #channel-publish-in-progress > p, #channel-publish-done > p {
font-family: 'Lekton', monospace;
font-size: large;
}

View file

@ -1,11 +1,14 @@
// display the content that shows channel creation has started
function showChannelCreateInProgressDisplay () {
const publishChannelForm = document.getElementById('publish-channel-form');
publishChannelForm.hidden = true;
const inProgress = document.getElementById('channel-publish-in-progress');
const channelProgressBar = document.getElementById('create-channel-progress-bar');
publishChannelForm.hidden = true;
inProgress.hidden = false;
createProgressBar(document.getElementById('create-channel-progress-bar'), 12);
createProgressBar(channelProgressBar, 12);
}
// display the content that shows channle creation is done
function showChannelCreateDoneDisplay() {
const inProgress = document.getElementById('channel-publish-in-progress');
inProgress.hidden=true;
@ -38,7 +41,6 @@ function publishNewChannel (event) {
if (window.location.pathname === '/') {
// remove old channel and replace with new one & select it
replaceChannelOptionInPublishChannelSelect();
// remove old channel and replace with new one & select it
replaceChannelOptionInNavBarChannelSelect();
} else {
window.location = '/';
@ -47,7 +49,7 @@ function publishNewChannel (event) {
.catch(error => {
if (error.name === 'ChannelNameError' || error.name === 'ChannelPasswordError'){
const channelNameErrorDisplayElement = document.getElementById('input-error-channel-name');
showError(channelNameErrorDisplayElement, error.message);
validationFunctions.showError(channelNameErrorDisplayElement, error.message);
} else {
console.log('signup failure:', error);
showChannelCreationError('Unfortunately, Spee.ch encountered an error while creating your channel. Please let us know in slack!');

View file

@ -151,7 +151,7 @@ function copyToClipboard(event){
try {
document.execCommand('copy');
} catch (err) {
showError(errorElement, 'Oops, unable to copy');
validationFunctions.showError(errorElement, 'Oops, unable to copy');
}
}

View file

@ -38,7 +38,6 @@ var validationFunctions = {
},
// validation function that checks to make sure the claim name is valid
validateClaimName: function (name) {
console.log('validating the claim name');
// ensure a name was entered
if (name.length < 1) {
throw new NameError("You must enter a name for your url");

View file

@ -76,7 +76,7 @@
// hide the login and new channel forms
loginToChannelTool.hidden = true;
createChannelTool.hidden = true;
hideError(document.getElementById('input-error-channel-select'));
validationFunctions.hideError(document.getElementById('input-error-channel-select'));
}
// update url
updateUrl(selectedChannel);