Merge branch 'develop' into release-v1.0.0

This commit is contained in:
J. Ryan Stinnett 2019-02-14 16:51:43 +00:00
commit b379a62753
19 changed files with 101 additions and 55 deletions

View file

@ -64,7 +64,7 @@ limitations under the License.
background-color: $tab-label-icon-bg-color;
mask-repeat: no-repeat;
mask-size: 16px;
width: 14px;
width: 16px;
height: 22px;
mask-position: center;
content: '';

View file

@ -31,10 +31,6 @@ limitations under the License.
mask-image: url('$(res)/img/feather-icons/home.svg');
}
li.mx_TopLeftMenu_icon_welcome::after {
mask-image: url('$(res)/img/feather-icons/gift.svg');
}
li.mx_TopLeftMenu_icon_settings::after {
mask-image: url('$(res)/img/feather-icons/settings.svg');
}

View file

@ -77,7 +77,8 @@ limitations under the License.
.mx_ImageView_cancel {
position: absolute;
top: 0px;
// hack for mx_Dialog having a top padding of 40px
top: 40px;
right: 0px;
padding: 35px;
cursor: pointer;

View file

@ -278,6 +278,10 @@ limitations under the License.
/* End to end encryption stuff */
.mx_EventTile_e2eIcon:hover {
opacity: 1;
}
.mx_EventTile_e2eIcon {
display: block;
position: absolute;
@ -289,6 +293,7 @@ limitations under the License.
mask-size: 14px;
mask-repeat: no-repeat;
mask-position: 0;
opacity: 0.2;
}
.mx_EventTile_e2eIcon_undecryptable, .mx_EventTile_e2eIcon_unverified {

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather feather-gift"><polyline points="20 12 20 22 4 22 4 12"></polyline><rect x="2" y="7" width="20" height="5"></rect><line x1="12" y1="22" x2="12" y2="7"></line><path d="M12 7H7.5a2.5 2.5 0 0 1 0-5C11 2 12 7 12 7z"></path><path d="M12 7h4.5a2.5 2.5 0 0 0 0-5C13 2 12 7 12 7z"></path></svg>

Before

Width:  |  Height:  |  Size: 482 B

View file

@ -31,6 +31,7 @@ import sessionStore from '../../stores/SessionStore';
import MatrixClientPeg from '../../MatrixClientPeg';
import SettingsStore from "../../settings/SettingsStore";
import RoomListStore from "../../stores/RoomListStore";
import { getHomePageUrl } from '../../utils/pages';
import TagOrderActions from '../../actions/TagOrderActions';
import RoomListActions from '../../actions/RoomListActions';
@ -459,17 +460,7 @@ const LoggedInView = React.createClass({
case PageTypes.HomePage:
{
const pagesConfig = this.props.config.embeddedPages;
let pageUrl = null;
if (pagesConfig) {
pageUrl = pagesConfig.homeUrl;
}
if (!pageUrl) {
// This is a deprecated config option for the home page
// (despite the name, given we also now have a welcome
// page, which is not the same).
pageUrl = this.props.config.welcomePageUrl;
}
const pageUrl = getHomePageUrl(this.props.config);
pageElement = <EmbeddedPage className="mx_HomePage"
url={pageUrl}
scrollbar={true}

View file

@ -40,6 +40,7 @@ import * as Lifecycle from '../../Lifecycle';
// LifecycleStore is not used but does listen to and dispatch actions
require('../../stores/LifecycleStore');
import PageTypes from '../../PageTypes';
import { getHomePageUrl } from '../../utils/pages';
import createRoom from "../../createRoom";
import KeyRequestHandler from '../../KeyRequestHandler';
@ -1198,8 +1199,12 @@ export default React.createClass({
} else {
if (MatrixClientPeg.get().isGuest()) {
dis.dispatch({action: 'view_welcome_page'});
} else {
} else if (getHomePageUrl(this.props.config)) {
dis.dispatch({action: 'view_home_page'});
} else {
this.firstSyncPromise.promise.then(() => {
dis.dispatch({action: 'view_next_room'});
});
}
}
},

View file

@ -211,6 +211,14 @@ module.exports = React.createClass({
// forget what we wanted, so don't overwrite the saved state unless
// this appears to be a user-initiated scroll.
if (sn.scrollTop != this._lastSetScroll) {
// when scrolling, we don't care about disappearing typing notifs shrinking the timeline
// this might cause the scrollbar to resize in case the max-height was not correct
// but that's better than ending up with a lot of whitespace at the bottom of the timeline.
// we need to above check because when showing the typing notifs, an onScroll event is also triggered
if (!this.isAtBottom()) {
this.clearBlockShrinking();
}
this._saveScrollState();
} else {
debuglog("Ignoring scroll echo");

View file

@ -26,7 +26,6 @@ export class TopLeftMenu extends React.Component {
constructor() {
super();
this.viewHomePage = this.viewHomePage.bind(this);
this.viewWelcomePage = this.viewWelcomePage.bind(this);
this.openSettings = this.openSettings.bind(this);
this.signIn = this.signIn.bind(this);
this.signOut = this.signOut.bind(this);
@ -67,9 +66,6 @@ export class TopLeftMenu extends React.Component {
return <div className="mx_TopLeftMenu">
{homePageSection}
<ul className="mx_TopLeftMenu_section">
<li className="mx_TopLeftMenu_icon_welcome" onClick={this.viewWelcomePage}>{_t("Welcome")}</li>
</ul>
<ul className="mx_TopLeftMenu_section">
<li className="mx_TopLeftMenu_icon_settings" onClick={this.openSettings}>{_t("Settings")}</li>
</ul>
@ -82,11 +78,6 @@ export class TopLeftMenu extends React.Component {
this.closeMenu();
}
viewWelcomePage() {
dis.dispatch({action: 'view_welcome_page'});
this.closeMenu();
}
openSettings() {
dis.dispatch({action: 'view_user_settings'});
this.closeMenu();

View file

@ -20,13 +20,11 @@ import { _t } from '../../../languageHandler';
export default (props) => {
const existingIssuesUrl = "https://github.com/vector-im/riot-web/issues" +
"?q=is%3Aopen+is%3Aissue+label%3Aredesign+sort%3Areactions-%2B1-desc";
const newIssueUrl = "https://github.com/vector-im/riot-web/issues/new" +
"?assignees=&labels=redesign&template=redesign_issue.md&title=";
"?q=is%3Aopen+is%3Aissue+sort%3Areactions-%2B1-desc";
const newIssueUrl = "https://github.com/vector-im/riot-web/issues/new";
const description1 =
_t("Thanks for testing the Riot Redesign. " +
"If you run into any bugs or visual issues, " +
_t("If you run into any bugs or have feedback you'd like to share, " +
"please let us know on GitHub.");
const description2 = _t("To help avoid duplicate issues, " +
"please <existingIssuesLink>view existing issues</existingIssuesLink> " +

View file

@ -73,12 +73,6 @@ export default class LazyRenderList extends React.Component {
}
}
shouldComponentUpdate(nextProps, nextState) {
const itemsChanged = nextProps.items !== this.props.items;
const rangeChanged = nextState.renderRange !== this.state.renderRange;
return itemsChanged || rangeChanged;
}
render() {
const {itemHeight, items, renderItem} = this.props;

View file

@ -126,6 +126,26 @@ export default class HelpSettingsTab extends React.Component {
);
}
_renderCredits() {
// Note: This is not translated because it is legal text.
// Also, &nbsp; is ugly but necessary.
return (
<div className='mx_SettingsTab_section'>
<span className='mx_SettingsTab_subheading'>{_t("Credits")}</span>
<ul>
<li>
The <a href="themes/riot/img/backgrounds/valley.jpg" rel="noopener" target="_blank">
default cover photo</a> is (C)&nbsp;
<a href="https://www.flickr.com/golan" rel="noopener" target="_blank">Jesús Roncero</a>&nbsp;
used under the terms of&nbsp;
<a href="https://creativecommons.org/licenses/by-sa/4.0/" rel="noopener" target="_blank">
CC-BY-SA 4.0</a>. No warranties are given.
</li>
</ul>
</div>
);
}
render() {
let faqText = _t('For help with using Riot, click <a>here</a>.', {}, {
'a': (sub) => <a href="https://about.riot.im/need-help/" rel='noopener' target='_blank'>{sub}</a>,
@ -211,6 +231,7 @@ export default class HelpSettingsTab extends React.Component {
</div>
</div>
{this._renderLegal()}
{this._renderCredits()}
<div className='mx_SettingsTab_section mx_HelpSettingsTab_versions'>
<span className='mx_SettingsTab_subheading'>{_t("Advanced")}</span>
<div className='mx_SettingsTab_subsectionText'>

View file

@ -686,7 +686,7 @@
"This setting cannot be changed later!": "Тази настройка не може да бъде променена по-късно!",
"Unknown error": "Неизвестна грешка",
"Incorrect password": "Неправилна парола",
"Deactivate Account": "Деактивация на профила",
"Deactivate Account": "Затвори акаунта",
"Deactivate my account": "Деактивирай моя профил",
"Device name": "Име на устройство",
"Device key": "Ключ на устройство",
@ -1185,7 +1185,7 @@
"Encrypting": "Шифроване",
"Encrypted, not sent": "Шифровано, неизпратено",
"Share Link to User": "Сподели връзка с потребител",
"Share room": "Сподели стая",
"Share room": "Сподели стаята",
"Share Room": "Споделяне на стая",
"Link to most recent message": "Създай връзка към най-новото съобщение",
"Share User": "Споделяне на потребител",
@ -1515,7 +1515,6 @@
"2018 theme": "Тема 2018",
"Account management": "Управление на акаунта",
"Deactivating your account is a permanent action - be careful!": "Деактивирането на акаунта е необратимо действие - внимавайте!",
"Deactivate Account": "Затвори акаунта",
"For help with using Riot, click <a>here</a>.": "За помощ при използването на Riot, кликнете <a>тук</a>.",
"For help with using Riot, click <a>here</a> or start a chat with our bot using the button below.": "За помощ при използването на Riot, кликнете <a>тук</a> или започнете чат с бота ни използвайки бутона по-долу.",
"Chat with Riot Bot": "Чати с Riot Bot",
@ -1762,5 +1761,7 @@
"Secure your backup with a passphrase": "Защитете резервното копие с парола",
"Confirm your passphrase": "Потвърдете паролата",
"Recovery key": "Ключ за възстановяване",
"Success!": "Успешно!"
"Success!": "Успешно!",
"Allow Peer-to-Peer for 1:1 calls": "Позволи използването на директна връзка (P2P) за 1:1 повиквания",
"Default theme": "Тема по подразбиране"
}

View file

@ -528,6 +528,7 @@
"Deactivating your account is a permanent action - be careful!": "Deactivating your account is a permanent action - be careful!",
"Deactivate Account": "Deactivate Account",
"Legal": "Legal",
"Credits": "Credits",
"For help with using Riot, click <a>here</a>.": "For help with using Riot, click <a>here</a>.",
"For help with using Riot, click <a>here</a> or start a chat with our bot using the button below.": "For help with using Riot, click <a>here</a> or start a chat with our bot using the button below.",
"Chat with Riot Bot": "Chat with Riot Bot",
@ -1106,7 +1107,7 @@
"Manually export keys": "Manually export keys",
"You'll lose access to your encrypted messages": "You'll lose access to your encrypted messages",
"Are you sure you want to sign out?": "Are you sure you want to sign out?",
"Thanks for testing the Riot Redesign. If you run into any bugs or visual issues, please let us know on GitHub.": "Thanks for testing the Riot Redesign. If you run into any bugs or visual issues, please let us know on GitHub.",
"If you run into any bugs or have feedback you'd like to share, please let us know on GitHub.": "If you run into any bugs or have feedback you'd like to share, please let us know on GitHub.",
"To help avoid duplicate issues, please <existingIssuesLink>view existing issues</existingIssuesLink> first (and add a +1) or <newIssueLink>create a new issue</newIssueLink> if you can't find it.": "To help avoid duplicate issues, please <existingIssuesLink>view existing issues</existingIssuesLink> first (and add a +1) or <newIssueLink>create a new issue</newIssueLink> if you can't find it.",
"Report bugs & give feedback": "Report bugs & give feedback",
"Go back": "Go back",
@ -1221,7 +1222,6 @@
"View Community": "View Community",
"Hide": "Hide",
"Sign in": "Sign in",
"Welcome": "Welcome",
"Login": "Login",
"powered by Matrix": "powered by Matrix",
"Robot check is currently unavailable on desktop - please use a <a>web browser</a>": "Robot check is currently unavailable on desktop - please use a <a>web browser</a>",

View file

@ -1078,5 +1078,6 @@
"%(count)s of your messages have not been sent.|one": "Viestiäsi ei lähetetty.",
"%(oldDisplayName)s changed their display name to %(displayName)s.": "%(oldDisplayName)s asetti näyttönimekseen %(displayName)s.",
"Learn more about how we use analytics.": "Lue lisää analytiikkakäytännöistämme.",
"There's no one else here! Would you like to <inviteText>invite others</inviteText> or <nowarnText>stop warning about the empty room</nowarnText>?": "Täällä ei ole muita! Haluaisitko <inviteText>kutsua muita</inviteText> tai <nowarnText>lopettaa tyhjästä huoneesta huomauttamisen</nowarnText>?"
"There's no one else here! Would you like to <inviteText>invite others</inviteText> or <nowarnText>stop warning about the empty room</nowarnText>?": "Täällä ei ole muita! Haluaisitko <inviteText>kutsua muita</inviteText> tai <nowarnText>lopettaa tyhjästä huoneesta huomauttamisen</nowarnText>?",
"The version of Riot.im": "Riot.im:n versio"
}

View file

@ -92,7 +92,7 @@
"Current password": "Mot de passe actuel",
"Curve25519 identity key": "Clé didentité Curve25519",
"/ddg is not a command": "/ddg n'est pas une commande",
"Deactivate Account": "Désactiver le compte",
"Deactivate Account": "Fermer le compte",
"Deactivate my account": "Désactiver mon compte",
"Decrypt %(text)s": "Déchiffrer %(text)s",
"Decryption error": "Erreur de déchiffrement",
@ -1526,7 +1526,6 @@
"2018 theme": "Thème 2018",
"Account management": "Gestion du compte",
"Deactivating your account is a permanent action - be careful!": "La désactivation du compte est une action permanente. Soyez prudent !",
"Deactivate Account": "Fermer le compte",
"For help with using Riot, click <a>here</a>.": "Pour obtenir de l'aide sur l'utilisation de Riot, cliquez <a>ici</a>.",
"For help with using Riot, click <a>here</a> or start a chat with our bot using the button below.": "Pour obtenir de l'aide sur l'utilisation de Riot, cliquez <a>ici</a> ou commencez une discussion avec notre bot en utilisant le bouton ci-dessous.",
"Start a chat with Riot Bot": "Commencer une discussion avec le bot Riot",
@ -1773,5 +1772,8 @@
"Secure your backup with a passphrase": "Protégez votre sauvegarde avec une phrase de passe",
"Confirm your passphrase": "Confirmez votre phrase de passe",
"Recovery key": "Clé de récupération",
"Success!": "Terminé !"
"Success!": "Terminé !",
"Allow Peer-to-Peer for 1:1 calls": "Autoriser les connexions pair-à-pair pour les appels individuels",
"Default theme": "Thème par défaut",
"Welcome": "Bienvenue"
}

View file

@ -113,7 +113,7 @@
"Custom": "Egyedi",
"Custom level": "Egyedi szint",
"/ddg is not a command": "/ddg nem egy parancs",
"Deactivate Account": "Fiók zárolása",
"Deactivate Account": "Fiók bezárása",
"Deactivate my account": "Fiókom felfüggesztése",
"Decline": "Elutasít",
"Decrypt %(text)s": "%(text)s visszafejtése",
@ -1525,7 +1525,6 @@
"2018 theme": "2018-as téma",
"Account management": "Fiók menedzsment",
"Deactivating your account is a permanent action - be careful!": "A fiók felfüggesztése végleges - légy óvatos!",
"Deactivate Account": "Fiók bezárása",
"For help with using Riot, click <a>here</a>.": "A Riot használatában való segítséghez kattints <a>ide</a>.",
"For help with using Riot, click <a>here</a> or start a chat with our bot using the button below.": "A Riot használatában való segítségér kattints <a>ide</a> vagy kezdj beszélgetni a botunkkal az alábbi gombra kattintva.",
"Start a chat with Riot Bot": "Csevegés kezdése a Riot Bottal",
@ -1773,5 +1772,8 @@
"Secure your backup with a passphrase": "Védd a mentést egy jelmondattal",
"Confirm your passphrase": "Erősítsd meg a jelmondatot",
"Recovery key": "Visszaállítási Kulcs",
"Success!": "Sikeres!"
"Success!": "Sikeres!",
"Allow Peer-to-Peer for 1:1 calls": "Ponttól-pontig kapcsolat engedélyezése az 1:1 hívásokban",
"Default theme": "Alapértelmezett stílus",
"Welcome": "Üdvözöllek"
}

View file

@ -324,12 +324,12 @@ export const SETTINGS = {
"pinMentionedRooms": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
displayName: _td("Pin rooms I'm mentioned in to the top of the room list"),
default: false,
default: true,
},
"pinUnreadRooms": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
displayName: _td("Pin unread rooms to the top of the room list"),
default: false,
default: true,
},
"enableWidgetScreenshots": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,

31
src/utils/pages.js Normal file
View file

@ -0,0 +1,31 @@
/*
Copyright 2019 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.
*/
export function getHomePageUrl(appConfig) {
const pagesConfig = appConfig.embeddedPages;
let pageUrl = null;
if (pagesConfig) {
pageUrl = pagesConfig.homeUrl;
}
if (!pageUrl) {
// This is a deprecated config option for the home page
// (despite the name, given we also now have a welcome
// page, which is not the same).
pageUrl = appConfig.welcomePageUrl;
}
return pageUrl;
}