Merge branch 'develop' into matthew/orderable-roomlist

This commit is contained in:
Matthew Hodgson 2015-11-07 17:29:18 +00:00
commit 07200d7953
3 changed files with 29 additions and 21 deletions

View File

@ -236,7 +236,8 @@ var RoomTile = React.createClass({
name = this.props.room.getMember(myUserId).events.member.getSender(); name = this.props.room.getMember(myUserId).events.member.getSender();
} }
else { else {
name = this.props.room.name; // XXX: We should never display raw room IDs, but sometimes the room name js sdk gives is undefined
name = this.props.room.name || this.props.room.roomId;
} }
name = name.replace(":", ":\u200b"); // add a zero-width space to allow linewrapping after the colon name = name.replace(":", ":\u200b"); // add a zero-width space to allow linewrapping after the colon

View File

@ -65,14 +65,21 @@ function parseQsFromFragment(location) {
return {}; return {};
} }
function parseQs(location) {
return qs.parse(location.search.substring(1));
}
// Here, we do some crude URL analysis to allow // Here, we do some crude URL analysis to allow
// deep-linking. We only support registration // deep-linking. We only support registration
// deep-links in this example. // deep-links in this example.
function routeUrl(location) { function routeUrl(location) {
if (location.hash.indexOf('#/register') == 0) { var params = parseQs(location);
var loginToken = params.loginToken;
if (loginToken) {
window.matrixChat.showScreen('token_login', parseQs(location));
}
else if (location.hash.indexOf('#/register') == 0) {
window.matrixChat.showScreen('register', parseQsFromFragment(location)); window.matrixChat.showScreen('register', parseQsFromFragment(location));
} else if (location.hash.indexOf('#/login/cas') == 0) {
window.matrixChat.showScreen('cas_login', parseQsFromFragment(location));
} else { } else {
window.matrixChat.showScreen(location.hash.substring(2)); window.matrixChat.showScreen(location.hash.substring(2));
} }

View File

@ -4,26 +4,26 @@
<meta charset="utf-8"> <meta charset="utf-8">
<title>Vector</title> <title>Vector</title>
<link href='fonts/MyriadPro.css' rel='stylesheet' type='text/css'> <link href='fonts/MyriadPro.css' rel='stylesheet' type='text/css'>
<link rel="apple-touch-icon" sizes="57x57" href="/icons/apple-touch-icon-57x57.png"> <link rel="apple-touch-icon" sizes="57x57" href="icons/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/icons/apple-touch-icon-60x60.png"> <link rel="apple-touch-icon" sizes="60x60" href="icons/apple-touch-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/icons/apple-touch-icon-72x72.png"> <link rel="apple-touch-icon" sizes="72x72" href="icons/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/icons/apple-touch-icon-76x76.png"> <link rel="apple-touch-icon" sizes="76x76" href="icons/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/icons/apple-touch-icon-114x114.png"> <link rel="apple-touch-icon" sizes="114x114" href="icons/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/icons/apple-touch-icon-120x120.png"> <link rel="apple-touch-icon" sizes="120x120" href="icons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/icons/apple-touch-icon-144x144.png"> <link rel="apple-touch-icon" sizes="144x144" href="icons/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/icons/apple-touch-icon-152x152.png"> <link rel="apple-touch-icon" sizes="152x152" href="icons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon-180x180.png"> <link rel="apple-touch-icon" sizes="180x180" href="icons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" href="/icons/favicon-32x32.png" sizes="32x32"> <link rel="icon" type="image/png" href="icons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/icons/android-chrome-192x192.png" sizes="192x192"> <link rel="icon" type="image/png" href="icons/android-chrome-192x192.png" sizes="192x192">
<link rel="icon" type="image/png" href="/icons/favicon-96x96.png" sizes="96x96"> <link rel="icon" type="image/png" href="icons/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="/icons/favicon-16x16.png" sizes="16x16"> <link rel="icon" type="image/png" href="icons/favicon-16x16.png" sizes="16x16">
<link rel="manifest" href="/icons/manifest.json"> <link rel="manifest" href="icons/manifest.json">
<link rel="shortcut icon" href="/icons/favicon.ico"> <link rel="shortcut icon" href="icons/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Vector"> <meta name="apple-mobile-web-app-title" content="Vector">
<meta name="application-name" content="Vector"> <meta name="application-name" content="Vector">
<meta name="msapplication-TileColor" content="#da532c"> <meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileImage" content="/icons/mstile-144x144.png"> <meta name="msapplication-TileImage" content="icons/mstile-144x144.png">
<meta name="msapplication-config" content="/icons/browserconfig.xml"> <meta name="msapplication-config" content="icons/browserconfig.xml">
<meta name="theme-color" content="#ffffff"> <meta name="theme-color" content="#ffffff">
</head> </head>
<body style="height: 100%;"> <body style="height: 100%;">