Skip to content

Commit

Permalink
Merge pull request #13329 from vector-im/t3chguy/app_load4
Browse files Browse the repository at this point in the history
App load tweaks, improve error pages
  • Loading branch information
t3chguy authored Apr 30, 2020
2 parents ba6e1d9 + 711ba78 commit 33406d1
Show file tree
Hide file tree
Showing 19 changed files with 1,330 additions and 78 deletions.
1 change: 1 addition & 0 deletions __mocks__/cssMock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = "css-file-stub";
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@
"<rootDir>/node_modules/matrix-react-sdk/test/setupTests.js"
],
"moduleNameMapper": {
"\\.(css|scss)$": "<rootDir>/__mocks__/cssMock.js",
"\\.(gif|png|svg|ttf|woff2)$": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/imageMock.js",
"\\$webapp/i18n/languages.json": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/languages.json",
"^browser-request$": "<rootDir>/node_modules/matrix-react-sdk/__mocks__/browser-request.js",
Expand Down
101 changes: 101 additions & 0 deletions res/css/structures/ErrorView.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
/*
Copyright 2020 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// import font-size variables manually, ideally this scss would get loaded by the theme which has all variables in context
@import "../../../node_modules/matrix-react-sdk/res/css/_font-sizes.scss";

.mx_ErrorView {
background: #c5e0f7;
background: -moz-linear-gradient(top, #c5e0f7 0%, #ffffff 100%);
background: -webkit-linear-gradient(top, #c5e0f7 0%, #ffffff 100%);
background: linear-gradient(to bottom, #c5e0f7 0%, #ffffff 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#c5e0f7', endColorstr='#ffffff',GradientType=0 );
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
width: 100%;
min-height: 100%;
height: auto;
color: #000;

.mx_ErrorView_container {
max-width: 680px;
margin: auto;
}

.mx_Button {
border: 0;
border-radius: 4px;
font-size: $font-18px;
margin-left: 4px;
margin-right: 4px;
min-width: 80px;
background-color: #03B381;
color: #fff;
cursor: pointer;
padding: 12px 22px;
word-break: break-word;
text-decoration: none;
}

.mx_Center {
justify-content: center;
}

.mx_HomePage_header {
color: #2E2F32;
display: flex;
align-items: center;
justify-content: center;
}

font-size: $font-16px;
h1 {
font-size: $font-32px;
}
h2 {
font-size: $font-24px;
color: #000;
}

.mx_HomePage_col {
display: flex;
flex-direction: row;
}

.mx_HomePage_row {
flex: 1 1 0;
display: flex;
flex-direction: row;
flex-wrap: wrap;
}

.mx_HomePage_logo {
margin: auto 20px auto 0;
}

h1, h2 {
font-weight: 600;
margin-bottom: 32px;
}

.mx_Spacer {
margin-top: 24px;
}

.mx_FooterLink {
color: #368BD6;
text-decoration: none;
}
}
97 changes: 97 additions & 0 deletions res/themes/riot/img/download/apple.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
135 changes: 135 additions & 0 deletions res/themes/riot/img/download/fdroid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
70 changes: 70 additions & 0 deletions res/themes/riot/img/download/google.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/@types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ limitations under the License.
*/

import "matrix-react-sdk/src/@types/global"; // load matrix-react-sdk's type extensions first
import {Renderer} from "react-dom";
import type {Renderer} from "react-dom";

declare global {
interface Window {
Expand Down
Loading

0 comments on commit 33406d1

Please sign in to comment.