From 4dac9bc1b88cc5389b8bda11a94e7bcbce43ab95 Mon Sep 17 00:00:00 2001 From: Erik Johnston <erikj@matrix.org> Date: Mon, 2 Nov 2015 23:47:04 +0000 Subject: [PATCH 1/3] Use relative rather than absolute paths for icons --- vector/index.html | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/vector/index.html b/vector/index.html index d893523e..d8646679 100644 --- a/vector/index.html +++ b/vector/index.html @@ -4,26 +4,26 @@ <meta charset="utf-8"> <title>Vector</title> <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="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="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="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="152x152" href="/icons/apple-touch-icon-152x152.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/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-16x16.png" sizes="16x16"> - <link rel="manifest" href="/icons/manifest.json"> - <link rel="shortcut icon" href="/icons/favicon.ico"> + <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="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="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="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="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/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-16x16.png" sizes="16x16"> + <link rel="manifest" href="icons/manifest.json"> + <link rel="shortcut icon" href="icons/favicon.ico"> <meta name="apple-mobile-web-app-title" content="Vector"> <meta name="application-name" content="Vector"> <meta name="msapplication-TileColor" content="#da532c"> - <meta name="msapplication-TileImage" content="/icons/mstile-144x144.png"> - <meta name="msapplication-config" content="/icons/browserconfig.xml"> + <meta name="msapplication-TileImage" content="icons/mstile-144x144.png"> + <meta name="msapplication-config" content="icons/browserconfig.xml"> <meta name="theme-color" content="#ffffff"> </head> <body style="height: 100%;"> From 942659df0dbe5754f53fe6084af4302d3ae0ff4f Mon Sep 17 00:00:00 2001 From: David Baker <dave@matrix.org> Date: Wed, 4 Nov 2015 14:15:57 +0000 Subject: [PATCH 2/3] Work around the bug where some channels have no name from the js sdk which was causing vector to exception and never load. --- src/skins/vector/views/molecules/RoomTile.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/skins/vector/views/molecules/RoomTile.js b/src/skins/vector/views/molecules/RoomTile.js index 82616b5a..ece48043 100644 --- a/src/skins/vector/views/molecules/RoomTile.js +++ b/src/skins/vector/views/molecules/RoomTile.js @@ -56,7 +56,8 @@ module.exports = React.createClass({ name = this.props.room.getMember(MatrixClientPeg.get().credentials.userId).events.member.getSender(); } 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 From fdf79d709eacf1176be7a9ff87867dd0c1ae7b76 Mon Sep 17 00:00:00 2001 From: Steven Hammerton <steven.hammerton@openmarket.com> Date: Fri, 6 Nov 2015 11:22:59 +0000 Subject: [PATCH 3/3] Replace CAS login with token login --- src/vector/index.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/vector/index.js b/src/vector/index.js index 29886197..45d69001 100644 --- a/src/vector/index.js +++ b/src/vector/index.js @@ -65,14 +65,21 @@ function parseQsFromFragment(location) { return {}; } +function parseQs(location) { + return qs.parse(location.search.substring(1)); +} + // Here, we do some crude URL analysis to allow // deep-linking. We only support registration // deep-links in this example. 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)); - } else if (location.hash.indexOf('#/login/cas') == 0) { - window.matrixChat.showScreen('cas_login', parseQsFromFragment(location)); } else { window.matrixChat.showScreen(location.hash.substring(2)); }