Update view layouts and content

This commit is contained in:
manubo
2019-09-28 09:23:16 +02:00
parent 3ae8e6adf8
commit e8ab05295e
5 changed files with 39 additions and 51 deletions

View File

@@ -14,30 +14,33 @@ html {
#moco-bx-root { #moco-bx-root {
min-width: 516px; min-width: 516px;
h1 {
font-weight: normal;
line-height: 1.2;
margin-top: 1rem;
margin-bottom: 3rem;
}
.text-red { .text-red {
color: $red; color: $red;
} }
.text-secondary {
color: $gray-base;
}
.moco-bx-app-container { .moco-bx-app-container {
width: 324px; width: 324px;
padding: 3rem 6rem; padding: 3rem 6rem;
.moco-bx-logo__container { .moco-bx-logo__container {
display: flex;
justify-content: center;
margin-bottom: 3rem; margin-bottom: 3rem;
text-align: center; text-align: center;
img.moco-bx-logo { img.moco-bx-logo {
flex: 0 0 48px;
width: 48px; width: 48px;
height: 48px; height: 48px;
} }
h1 {
line-height: 48px;
margin: 0;
}
} }
.moco-bx-calendar { .moco-bx-calendar {
@@ -97,19 +100,12 @@ html {
margin-top: 3rem; margin-top: 3rem;
h1 { h1 {
font-weight: normal; margin-bottom: 0;
line-height: 1.2;
margin: 0;
} }
p { p {
margin-top: 0.6rem; margin-top: 0.6rem;
} }
.text-secondary {
color: $gray-base;
}
.timer { .timer {
margin-top: 2.5rem; margin-top: 2.5rem;
} }
@@ -130,35 +126,30 @@ html {
} }
.moco-bx-error-container { .moco-bx-error-container {
font-size: 18px;
line-height: 1.5; line-height: 1.5;
width: 420px; width: 420px;
padding: 3rem; padding: 3rem;
text-align: center; text-align: center;
h1 {
font-size: 35px;
font-weight: normal;
margin-top: 0;
line-height: 1.3;
}
img { img {
width: auto; margin-top: 1.5rem;
max-width: 100%; margin-bottom: 2rem;
width: 44%;
&.moco-bx-logo { &.moco-bx-logo {
width: 48px; width: 48px;
margin-bottom: 2rem; margin-bottom: 2rem;
} }
}
ol { &.firefox-addons {
text-align: left; margin-top: 0;
width: auto;
}
} }
button { button {
margin-top: 1.5rem; margin-top: 1.5rem;
margin-bottom: 1.5rem;
} }
} }
} }

View File

@@ -3,25 +3,23 @@ import settingsUrl from "images/settings.png"
const InvalidConfigurationError = () => ( const InvalidConfigurationError = () => (
<div className="moco-bx-error-container"> <div className="moco-bx-error-container">
<h1>Bitte Einstellungen aktualisieren</h1> <h1>MOCO verbinden</h1>
<ol> <p>
<li>Internetadresse eintragen</li> Dazu trägst Du in den Einstellungen Deine Account-Internetadresse und Deinen API-Schlüssel
<li>Persönlichen API-Schlüssel eintragen</li> ein.
</ol> </p>
<button
className="moco-bx-btn"
onClick={() => chrome.runtime.sendMessage({ type: "openOptions" })}
>
Einstellungen öffnen
</button>
<br />
<br />
<img <img
src={chrome.extension.getURL(settingsUrl)} src={chrome.extension.getURL(settingsUrl)}
alt="Browser extension configuration settings" alt="Browser extension configuration settings"
style={{ cursor: "pointer" }} style={{ cursor: "pointer" }}
onClick={() => chrome.runtime.sendMessage({ type: "openOptions" })} onClick={() => chrome.runtime.sendMessage({ type: "openOptions" })}
/> />
<button
className="moco-bx-btn"
onClick={() => chrome.runtime.sendMessage({ type: "openOptions" })}
>
Weiter zu den Einstellungen
</button>
</div> </div>
) )

View File

@@ -7,8 +7,6 @@ const UnknownError = ({ message = "Unbekannter Fehler" }) => (
<img className="moco-bx-logo" src={logo} alt="MOCO logo" /> <img className="moco-bx-logo" src={logo} alt="MOCO logo" />
<h1>Ups, es ist ein Fehler passiert!</h1> <h1>Ups, es ist ein Fehler passiert!</h1>
<p>Bitte überprüfe deine Internetverbindung.</p> <p>Bitte überprüfe deine Internetverbindung.</p>
<p>Wir wurden per Email benachrichtigt und untersuchen den Vorfall.</p>
<br />
<p>Fehlermeldung:</p> <p>Fehlermeldung:</p>
<pre>{message}</pre> <pre>{message}</pre>
</div> </div>

View File

@@ -6,7 +6,7 @@ import firefoxAddons from "images/firefox_addons.png"
const UpgradeRequiredError = () => ( const UpgradeRequiredError = () => (
<div className="moco-bx-error-container"> <div className="moco-bx-error-container">
<img className="moco-bx-logo" src={logo} alt="MOCO logo" /> <img className="moco-bx-logo" src={logo} alt="MOCO logo" />
<h1>Upgrade erforderlich</h1> <h1>Bitte aktualisieren</h1>
<p>Die installierte MOCO Browser-Erweiterung ist veraltet &mdash; bitte aktualisieren.</p> <p>Die installierte MOCO Browser-Erweiterung ist veraltet &mdash; bitte aktualisieren.</p>
{isChrome() ? ( {isChrome() ? (
<button <button
@@ -17,7 +17,6 @@ const UpgradeRequiredError = () => (
</button> </button>
) : ( ) : (
<> <>
<br />
<p>Unter folgender URL:</p> <p>Unter folgender URL:</p>
<img className="firefox-addons" src={firefoxAddons} alt="about:addons" /> <img className="firefox-addons" src={firefoxAddons} alt="about:addons" />
</> </>

View File

@@ -9,14 +9,16 @@ function getStyles(errorType) {
width: "516px", width: "516px",
height: height:
errorType === ERROR_UNAUTHORIZED errorType === ERROR_UNAUTHORIZED
? "834px" ? "590px"
: errorType === ERROR_UPGRADE_REQUIRED : errorType === ERROR_UPGRADE_REQUIRED
? isChrome() ? isChrome()
? "369px" ? "429px"
: "461px" : "472px"
: errorType === ERROR_UNKNOWN : errorType === ERROR_UNKNOWN
? "550px" ? "408px"
: "558px", : isChrome()
? "558px"
: "574px",
} }
} }