Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DigitalOcean OAuth UI #57

Merged
merged 1 commit into from
Mar 30, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 25 additions & 11 deletions src/server_manager/electron_app/digital_ocean_modifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,17 +234,31 @@ function updateUIForEmailVerification() {

function updateUIForOAuth() {
onceWindowOnload.then(() => {
// Remove minimum width so everything can fit inside our electron window.
$$('#aurora-container').forEach((el) => el.style.minWidth = '0');
// Fix word break of titles.
$$('h1').forEach((el) => el.style.wordBreak = 'normal');
// Hide nav-bar to remove welcome link.
hideBySelector('.nav-bar');
// Widen column so more text fits above-the-fold.
$$('div.small-8.columns.small-centered.u-textAlignCenter').forEach((el) => {
el.style.width = '100%';
el.style.padding = '20px';
});
const style = document.createElement('style');
style.innerHTML = `
/* Remove minimum width so everything can fit inside our electron window. */
#aurora-container, #aurora-container .nav_controls_v2 {
min-width: 0;
}
/* Set a reasonable padding. */
.fleets-container #aurora-container {
padding-bottom: 75px;
}
/* Widen column so more text fits above-the-fold. */
#aurora-container .aurora-body .small-8.columns.small-centered.u-textAlignCenter {
width: 100%;
padding: 20px;
}
/* Fix word break of titles. */
#aurora-container .aurora-body .small-8.columns.small-centered.u-textAlignCenter h1 {
word-break: normal;
}
/* Hide nav-bar and bottom container. */
.nav-bar, .cloud-container.nav-has-loaded {
display: none;
}
`;
document.body.appendChild(style);
const bannerText =
'Give Outline permission to use your DigitalOcean account. This will only be used to install the Outline server software.';
addDigitalOceanSignupBanner(bannerText);
Expand Down