fixed channel publish css and errors
This commit is contained in:
parent
a6181d60b6
commit
432e05e830
5 changed files with 9 additions and 8 deletions
|
@ -74,7 +74,7 @@ body, .flex-container--column {
|
||||||
|
|
||||||
/* TEXT */
|
/* 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-family: 'Lekton', monospace;
|
||||||
font-size: large;
|
font-size: large;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
|
// display the content that shows channel creation has started
|
||||||
function showChannelCreateInProgressDisplay () {
|
function showChannelCreateInProgressDisplay () {
|
||||||
const publishChannelForm = document.getElementById('publish-channel-form');
|
const publishChannelForm = document.getElementById('publish-channel-form');
|
||||||
publishChannelForm.hidden = true;
|
|
||||||
const inProgress = document.getElementById('channel-publish-in-progress');
|
const inProgress = document.getElementById('channel-publish-in-progress');
|
||||||
|
const channelProgressBar = document.getElementById('create-channel-progress-bar');
|
||||||
|
publishChannelForm.hidden = true;
|
||||||
inProgress.hidden = false;
|
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() {
|
function showChannelCreateDoneDisplay() {
|
||||||
const inProgress = document.getElementById('channel-publish-in-progress');
|
const inProgress = document.getElementById('channel-publish-in-progress');
|
||||||
inProgress.hidden=true;
|
inProgress.hidden=true;
|
||||||
|
@ -38,7 +41,6 @@ function publishNewChannel (event) {
|
||||||
if (window.location.pathname === '/') {
|
if (window.location.pathname === '/') {
|
||||||
// remove old channel and replace with new one & select it
|
// remove old channel and replace with new one & select it
|
||||||
replaceChannelOptionInPublishChannelSelect();
|
replaceChannelOptionInPublishChannelSelect();
|
||||||
// remove old channel and replace with new one & select it
|
|
||||||
replaceChannelOptionInNavBarChannelSelect();
|
replaceChannelOptionInNavBarChannelSelect();
|
||||||
} else {
|
} else {
|
||||||
window.location = '/';
|
window.location = '/';
|
||||||
|
@ -47,7 +49,7 @@ function publishNewChannel (event) {
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
if (error.name === 'ChannelNameError' || error.name === 'ChannelPasswordError'){
|
if (error.name === 'ChannelNameError' || error.name === 'ChannelPasswordError'){
|
||||||
const channelNameErrorDisplayElement = document.getElementById('input-error-channel-name');
|
const channelNameErrorDisplayElement = document.getElementById('input-error-channel-name');
|
||||||
showError(channelNameErrorDisplayElement, error.message);
|
validationFunctions.showError(channelNameErrorDisplayElement, error.message);
|
||||||
} else {
|
} else {
|
||||||
console.log('signup failure:', error);
|
console.log('signup failure:', error);
|
||||||
showChannelCreationError('Unfortunately, Spee.ch encountered an error while creating your channel. Please let us know in slack!');
|
showChannelCreationError('Unfortunately, Spee.ch encountered an error while creating your channel. Please let us know in slack!');
|
||||||
|
|
|
@ -151,7 +151,7 @@ function copyToClipboard(event){
|
||||||
try {
|
try {
|
||||||
document.execCommand('copy');
|
document.execCommand('copy');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
showError(errorElement, 'Oops, unable to copy');
|
validationFunctions.showError(errorElement, 'Oops, unable to copy');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,6 @@ var validationFunctions = {
|
||||||
},
|
},
|
||||||
// validation function that checks to make sure the claim name is valid
|
// validation function that checks to make sure the claim name is valid
|
||||||
validateClaimName: function (name) {
|
validateClaimName: function (name) {
|
||||||
console.log('validating the claim name');
|
|
||||||
// ensure a name was entered
|
// ensure a name was entered
|
||||||
if (name.length < 1) {
|
if (name.length < 1) {
|
||||||
throw new NameError("You must enter a name for your url");
|
throw new NameError("You must enter a name for your url");
|
||||||
|
|
|
@ -76,7 +76,7 @@
|
||||||
// hide the login and new channel forms
|
// hide the login and new channel forms
|
||||||
loginToChannelTool.hidden = true;
|
loginToChannelTool.hidden = true;
|
||||||
createChannelTool.hidden = true;
|
createChannelTool.hidden = true;
|
||||||
hideError(document.getElementById('input-error-channel-select'));
|
validationFunctions.hideError(document.getElementById('input-error-channel-select'));
|
||||||
}
|
}
|
||||||
// update url
|
// update url
|
||||||
updateUrl(selectedChannel);
|
updateUrl(selectedChannel);
|
||||||
|
|
Loading…
Reference in a new issue