Compare commits
54 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f9c8235e1 | ||
|
|
8b0ae88987 | ||
|
|
d8aaae6d42 | ||
|
|
ce4c71ccfb | ||
|
|
d6406b48fd | ||
|
|
d5b42d99f2 | ||
|
|
42bac1620e | ||
|
|
09130582ad | ||
|
|
73239f5535 | ||
|
|
22abe5a815 | ||
|
|
736450e184 | ||
|
|
d10fda36af | ||
|
|
8639b2858b | ||
|
|
f47a9f93a5 | ||
|
|
52bbd8c764 | ||
|
|
8ef2eec504 | ||
|
|
1c5f16c332 | ||
|
|
e23195fd86 | ||
|
|
9c8ef4240c | ||
|
|
b59edf2690 | ||
|
|
daa3e1351b | ||
|
|
d00ca02c25 | ||
|
|
207106ea46 | ||
|
|
c150d97eaf | ||
|
|
6231cf3496 | ||
|
|
57999b460b | ||
|
|
e2bad5bdc8 | ||
|
|
5170635a1f | ||
|
|
1db5c64f3e | ||
|
|
9e4aa50567 | ||
|
|
2b91595aa9 | ||
|
|
2209059e84 | ||
|
|
b335da75db | ||
|
|
7cfda97b82 | ||
|
|
01f4e9b2a5 | ||
|
|
2bef30635c | ||
|
|
447c133d82 | ||
|
|
fbe6595b19 | ||
|
|
86b738dd79 | ||
|
|
b30fd9d3bf | ||
|
|
e54865b7ec | ||
|
|
2041b77b39 | ||
|
|
f7f21a006e | ||
|
|
51459ba2e2 | ||
|
|
a76908e2fd | ||
|
|
f79da66c36 | ||
|
|
8a64b47644 | ||
|
|
9a0690fb95 | ||
|
|
a3b1b1ec60 | ||
|
|
53b179b22b | ||
|
|
dcde74bc09 | ||
|
|
86a6f1e932 | ||
|
|
10ed13acc0 | ||
|
|
ccf52d3bff |
44
CHANGELOG.md
44
CHANGELOG.md
@@ -1,3 +1,47 @@
|
||||
Changes in [0.16.4](https://github.com/vector-im/riot-web/releases/tag/v0.16.4) (2018-09-10)
|
||||
============================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.16.4-rc.1...v0.16.4)
|
||||
|
||||
* No changes since rc.1
|
||||
|
||||
Changes in [0.16.4-rc.1](https://github.com/vector-im/riot-web/releases/tag/v0.16.4-rc.1) (2018-09-07)
|
||||
======================================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.16.3...v0.16.4-rc.1)
|
||||
|
||||
* Update from Weblate.
|
||||
[\#7296](https://github.com/vector-im/riot-web/pull/7296)
|
||||
* Fix config not loading & mobileguide script being loaded in riot
|
||||
[\#7288](https://github.com/vector-im/riot-web/pull/7288)
|
||||
* Instructions for installing mobile apps
|
||||
[\#7272](https://github.com/vector-im/riot-web/pull/7272)
|
||||
* Tidy up index.js
|
||||
[\#7265](https://github.com/vector-im/riot-web/pull/7265)
|
||||
|
||||
Changes in [0.16.3](https://github.com/vector-im/riot-web/releases/tag/v0.16.3) (2018-09-03)
|
||||
============================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.16.3-rc.2...v0.16.3)
|
||||
|
||||
* SECURITY FIX: This version (and release candidates) pull in an upstream security
|
||||
fix from electron to fix CVE-2018-15685. Electron users should update as soon as
|
||||
possible. Riot-web run outsiude of Electron is unaffected.
|
||||
|
||||
Changes in [0.16.3-rc.2](https://github.com/vector-im/riot-web/releases/tag/v0.16.3-rc.2) (2018-08-31)
|
||||
======================================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.16.3-rc.1...v0.16.3-rc.2)
|
||||
|
||||
* Update js-sdk to fix an exception causing the room list to become unresponsive.
|
||||
|
||||
Changes in [0.16.3-rc.1](https://github.com/vector-im/riot-web/releases/tag/v0.16.3-rc.1) (2018-08-30)
|
||||
======================================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.16.2...v0.16.3-rc.1)
|
||||
|
||||
* Update from Weblate.
|
||||
[\#7245](https://github.com/vector-im/riot-web/pull/7245)
|
||||
* Revert "Remove package-lock.json for now"
|
||||
[\#7128](https://github.com/vector-im/riot-web/pull/7128)
|
||||
* Remove package-lock.json for now
|
||||
[\#7115](https://github.com/vector-im/riot-web/pull/7115)
|
||||
|
||||
Changes in [0.16.2](https://github.com/vector-im/riot-web/releases/tag/v0.16.2) (2018-08-23)
|
||||
============================================================================================
|
||||
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.16.1...v0.16.2)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "riot-web",
|
||||
"productName": "Riot",
|
||||
"main": "src/electron-main.js",
|
||||
"version": "0.16.2",
|
||||
"version": "0.16.4",
|
||||
"description": "A feature-rich client for Matrix.org",
|
||||
"author": "Vector Creations Ltd.",
|
||||
"dependencies": {
|
||||
|
||||
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "riot-web",
|
||||
"version": "0.15.6",
|
||||
"version": "0.16.4-rc.1",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "riot-web",
|
||||
"productName": "Riot",
|
||||
"main": "electron_app/src/electron-main.js",
|
||||
"version": "0.16.2",
|
||||
"version": "0.16.4",
|
||||
"description": "A feature-rich client for Matrix.org",
|
||||
"author": "New Vector Ltd.",
|
||||
"repository": {
|
||||
@@ -64,8 +64,8 @@
|
||||
"gemini-scrollbar": "matrix-org/gemini-scrollbar#b302279",
|
||||
"gfm.css": "^1.1.1",
|
||||
"highlight.js": "^9.0.0",
|
||||
"matrix-js-sdk": "0.10.8",
|
||||
"matrix-react-sdk": "0.13.2",
|
||||
"matrix-js-sdk": "0.11.0",
|
||||
"matrix-react-sdk": "0.13.4",
|
||||
"modernizr": "^3.1.0",
|
||||
"prop-types": "^15.5.10",
|
||||
"react": "^15.6.0",
|
||||
@@ -144,7 +144,7 @@
|
||||
"build": {
|
||||
"appId": "im.riot.app",
|
||||
"category": "Network",
|
||||
"electronVersion": "2.0.7",
|
||||
"electronVersion": "2.0.8",
|
||||
"//asar=false": "https://github.com/electron-userland/electron-builder/issues/675",
|
||||
"asar": false,
|
||||
"dereference": true,
|
||||
|
||||
@@ -33,5 +33,7 @@
|
||||
"Lots of rooms already exist in Matrix, linked to existing networks (Slack, IRC, Gitter etc) or independent. Check out the directory!": "Lots of rooms already exist in Matrix, linked to existing networks (Slack, IRC, Gitter etc) or independent. Check out the directory!",
|
||||
"Riot/Android & matrix-android-sdk chat": "Riot/Android & matrix-android-sdk chat",
|
||||
"Riot/Web & Desktop chat": "Riot/Web & Desktop chat",
|
||||
"Riot/iOS & matrix-ios-sdk chat": "Riot/iOS & matrix-ios-sdk chat"
|
||||
"Riot/iOS & matrix-ios-sdk chat": "Riot/iOS & matrix-ios-sdk chat",
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different Home server URL.<br/>This allows you to use Riot with an existing Matrix account on a different home server.<br/><br/>You can also set a custom identity server but you won't be able to invite users by email address, or be invited by email address yourself.": "You can use the custom server options to sign into other Matrix servers by specifying a different Home server URL.<br/>This allows you to use Riot with an existing Matrix account on a different home server.<br/><br/>You can also set a custom identity server but you won't be able to invite users by email address, or be invited by email address yourself.",
|
||||
"Co-ordination for Riot translators": "Co-ordination for Riot translators"
|
||||
}
|
||||
|
||||
@@ -34,5 +34,6 @@
|
||||
"Dev chat for the Riot/Web dev team": "Obrolan Developer untuk tim developer Riot/Web",
|
||||
"Dev chat for the Dendrite dev team": "Obrolan Developer untuk tim developer Dendrite",
|
||||
"Lots of rooms already exist in Matrix, linked to existing networks (Slack, IRC, Gitter etc) or independent. Check out the directory!": "Banyak ruang sudah tersedia di Matrix, terhubung ke jaringan yang sudah ada (Slack, IRC, Gitter dls) atau independen. Cek direktori!",
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different Home server URL.<br/>This allows you to use Riot with an existing Matrix account on a different home server.<br/><br/>You can also set a custom identity server but you won't be able to invite users by email address, or be invited by email address yourself.": "Anda dapat menggunakan opsi lain untuk mendaftar pada server Matrix yang berbeda dengan memasukkan URL server yang sesuai. <br/>Hal ini memungkinkan anda untuk menggunakan Riot dengan akun matrix yang telah tersedia pada Home server yang berbeda.<br/><br/>Anda juga dapat melakukan pengubahan identitas server akan tetapi akan berakibat tidak dapat mengundang pengguna melalui email, atau diundang melalui email."
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different Home server URL.<br/>This allows you to use Riot with an existing Matrix account on a different home server.<br/><br/>You can also set a custom identity server but you won't be able to invite users by email address, or be invited by email address yourself.": "Anda dapat menggunakan opsi lain untuk mendaftar pada server Matrix yang berbeda dengan memasukkan URL server yang sesuai. <br/>Hal ini memungkinkan anda untuk menggunakan Riot dengan akun matrix yang telah tersedia pada Home server yang berbeda.<br/><br/>Anda juga dapat melakukan pengubahan identitas server akan tetapi akan berakibat tidak dapat mengundang pengguna melalui email, atau diundang melalui email.",
|
||||
"Co-ordination for Riot translators": "Koordinasi dengan penerjemah Riot"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"Custom Server Options": "Opzioni Server Personalizzate",
|
||||
"Dismiss": "Scarta",
|
||||
"Dismiss": "Chiudi",
|
||||
"powered by Matrix": "offerto da Matrix",
|
||||
"Riot Desktop on %(platformName)s": "Riot Desktop su %(platformName)s",
|
||||
"Riot is not supported on mobile web. Install the app?": "Riot non è supportato sul web mobile. Vuoi installare l'applicazione?",
|
||||
|
||||
@@ -1,4 +1,16 @@
|
||||
{
|
||||
"Custom Server Options": "Tilpassede serveralternativer",
|
||||
"powered by Matrix": "benytter seg av Matrix"
|
||||
"powered by Matrix": "benytter seg av Matrix",
|
||||
"Riot is not supported on mobile web. Install the app?": "Riot er ikke støttet av mobil-nettlesere. Ønsker De å innstalere appen?",
|
||||
"Riot Desktop on %(platformName)s": "Riot på skrivebordet er på %(platformName)s",
|
||||
"Unknown device": "Ukjent enhet",
|
||||
"%(appName)s via %(browserName)s on %(osName)s": "%(appName)s via %(browserName)s på %(osName)s",
|
||||
"You need to be using HTTPS to place a screen-sharing call.": "De er nødt til å benytte HTTPS for å kunne ha en samtale med skjermdeling.",
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different Home server URL.<br/>This allows you to use Riot with an existing Matrix account on a different home server.<br/><br/>You can also set a custom identity server but you won't be able to invite users by email address, or be invited by email address yourself.": "De kan benytte brukerdefinerte server-innstillinger for å kunne logge Dem inn på andre Matrix-servere ved å spesifisere en annen hjemmeserver-adresse. <br/> Dette tillater Dem til å bruke Riot med en eksisterende Matrix-konto på en annen hjemmeserver. <br/><br/> De kan i tillegg definere en egen hjemmeserver-identitet, men De kan da ikke invitere andre brukere via email, og De kan heller ikke bli invitert via email selv.",
|
||||
"Dismiss": "Avvis",
|
||||
"Welcome to Riot.im": "Velkommen skal De være til Riot.im",
|
||||
"Decentralised, encrypted chat & collaboration powered by [matrix]": "Desentralisert, kryptert nettprat & sammabeid drevet av [matrix]",
|
||||
"Search the room directory": "Søk i romutvalget",
|
||||
"Lots of rooms already exist in Matrix, linked to existing networks (Slack, IRC, Gitter etc) or independent. Check out the directory!": "Allerede finnes det alskens rom i Matrix, sammenkoblet til eksisterende nettverk (Slack, IRC, Gitter osv.) eller selvstendig. Dersom De formoder, kan De kikke på utvalget!",
|
||||
"Chat with Riot Bot": "Nettprat med Riot Bot"
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"Dismiss": "Avvis",
|
||||
"powered by Matrix": "Matrixdriven",
|
||||
"Welcome to Riot.im": "Velkomen til Riot.im",
|
||||
"Decentralised, encrypted chat & collaboration powered by [matrix]": "Desentralisert, enkryptert nettprat & samarbeid driven av [matrix]",
|
||||
"Decentralised, encrypted chat & collaboration powered by [matrix]": "Desentralisert, kryptert nettprat & samarbeid driven av [matrix]",
|
||||
"Search the room directory": "Søk i romutvalet",
|
||||
"Lots of rooms already exist in Matrix, linked to existing networks (Slack, IRC, Gitter etc) or independent. Check out the directory!": "Det finst allereie massevis av rom på Matrix, anten lenkja til nettverk som allereie finst (Slack, IRC, Gitter osv.) eller uavhengige. Tak ein titt på utvalet!",
|
||||
"Chat with Riot Bot": "Nettprat med Riot Bot",
|
||||
@@ -30,10 +30,10 @@
|
||||
"Implementing VoIP services with Matrix": "Implementering av VoIP-tenester med Matrix",
|
||||
"Discussion of the Identity Service API": "Meiningsutveksling om Identitetstenar-APIen",
|
||||
"Support for those using, running and writing other bridges": "Støtte for dei som brukar, køyrer og skriv andre bruer",
|
||||
"Contributing code to Matrix and Riot": "Å bidraga med kode til Matrix og Riot",
|
||||
"Contributing code to Matrix and Riot": "For å bidraga med kode til Matrix og Riot",
|
||||
"Dev chat for the Riot/Web dev team": "Utviklar-prat for Riot/Web-utviklargruppa",
|
||||
"Dev chat for the Dendrite dev team": "Utviklar-prat for Dendrite-utviklargruppa",
|
||||
"Co-ordination for Riot translators": "Samordning for Riot-omsetjare",
|
||||
"Custom Server Options": "Eigentenar-innstillingar",
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different Home server URL.<br/>This allows you to use Riot with an existing Matrix account on a different home server.<br/><br/>You can also set a custom identity server but you won't be able to invite users by email address, or be invited by email address yourself.": "Du kan bruka eigentenarinnstillingar til å logga inn på andre Matrixtenarar ved å oppgje ein annan Heimtenar-URL. <br/>Dette gjer at du kan bruka Riot med ein Matrixbrukar som allereie finst på ein annan heimtenar.<br/><br/>Du kan òg setja ein eigen identitetstenar men du kjem i so fall ikkje til å kunna byda brukare inn med email, eller å sjølv verta boden inn med email."
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different Home server URL.<br/>This allows you to use Riot with an existing Matrix account on a different home server.<br/><br/>You can also set a custom identity server but you won't be able to invite users by email address, or be invited by email address yourself.": "Du kan bruka eigentenarinnstillingar til å logga inn på andre Matrixtenarar ved å oppgje ein annan Heimtenar-URL. <br/>Dette gjer at du kan bruka Riot med ein Matrixbrukar som allereie finst på ein annan heimtenar.<br/><br/>Du kan òg setja ein eigen identitetstenar men du kjem i so fall ikkje til å kunna byda brukare inn med epost, eller å sjølv verta boden inn med epost."
|
||||
}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"%(appName)s via %(browserName)s on %(osName)s": "%(osName)s işletim sisteminde %(browserName)s ile %(appName)s",
|
||||
"Custom Server Options": "Özel Sunucu Seçenekleri",
|
||||
"Dismiss": "Uzaklaştır",
|
||||
"Custom Server Options": "Özelleştirilebilir Sunucu Seçenekleri",
|
||||
"Dismiss": "Kapat",
|
||||
"powered by Matrix": "Matrix tarafından desteklenmektedir",
|
||||
"Riot Desktop on %(platformName)s": "%(platformName)s platformunda Riot Masaüstü",
|
||||
"Riot is not supported on mobile web. Install the app?": "Riot mobil web'de desteklenmiyor . Uygulamayı yükle ?",
|
||||
"Unknown device": "Bilinmeyen aygıt",
|
||||
"You need to be using HTTPS to place a screen-sharing call.": "Ekran paylaşımlı arama yapmak için HTTPS kullanıyor olmalısınız.",
|
||||
"Welcome to Riot.im": "Riot.im'e Hoş Geldiniz",
|
||||
"Decentralised, encrypted chat & collaboration powered by [matrix]": "Dağıtık , şifreli sohbet & işbirliği ile Matrix tarafından desteklenmektedir",
|
||||
"Welcome to Riot.im": "Riot.im'e hoş geldiniz",
|
||||
"Decentralised, encrypted chat & collaboration powered by [matrix]": "Merkezsiz, şifreli sohbet & işbirliği ile Matrix tarafından desteklenmektedir",
|
||||
"Search the room directory": "Oda dizinini ara",
|
||||
"Chat with Riot Bot": "Riot Bot ile Sohbet Et",
|
||||
"Get started with some tips from Riot Bot!": "Bazı Riot Bot ipuçları ile başlayın !",
|
||||
"Chat with Riot Bot": "Riot Bot ile sohbet et",
|
||||
"Get started with some tips from Riot Bot!": "Riot Bot'tan bazı ipuçları ile başlayın!",
|
||||
"General discussion about Matrix and Riot": "Matrix ve Riot hakkında genel tartışma",
|
||||
"Discussion of all things Matrix!": "Matrix'in tüm tartışması!",
|
||||
"Riot/Web & Desktop chat": "Riot/Web & Masaüstü sohbet",
|
||||
@@ -19,19 +19,21 @@
|
||||
"Riot/Android & matrix-android-sdk chat": "Riot/Android & matrix-android-sdk sohbet",
|
||||
"Matrix technical discussions": "Matrix teknik tartışmalar",
|
||||
"Running Matrix services": "Çalışan Matrix hizmetleri",
|
||||
"Community-run support for Synapse": "Synapse için topluluk tarafından işlenen destek",
|
||||
"Admin support for Dendrite": "Dendrite için Admin desteği",
|
||||
"Community-run support for Synapse": "Synapse için topluluk tarafından işletilen destek",
|
||||
"Admin support for Dendrite": "Dendrite için yönetici desteği",
|
||||
"Announcements about Synapse releases": "Synapse sürümleri hakkında duyurular",
|
||||
"Support for those using and running matrix-appservice-irc": "matrix-appservice-irc kullanan ve çalıştıran kullanıcılar için destek",
|
||||
"Building services on Matrix": "Matrix üzerinde Yapı hizmetleri",
|
||||
"Building services on Matrix": "Matrix üzerinde yapı hizmetleri",
|
||||
"Support for those using the Matrix spec": "Matrix teknik özelliklerini kullananlar için destek",
|
||||
"Design and implementation of E2E in Matrix": "Matrix'te E2E ' nin Tasarım ve İmplementasyonu",
|
||||
"Implementing VR services with Matrix": "Matrix'te VR hizmetlerini implement etmek",
|
||||
"Implementing VoIP services with Matrix": "Matrix'te VoIP hizmetlerini implement etmek",
|
||||
"Discussion of the Identity Service API": "Kimlik Hizmet API ( Identity Service API ) Tartışması",
|
||||
"Design and implementation of E2E in Matrix": "Matrix'te E2E ' nin Tasarımı ve uyglamanması",
|
||||
"Implementing VR services with Matrix": "Matrix'te VR hizmetlerini uygulamak",
|
||||
"Implementing VoIP services with Matrix": "Matrix'te VoIP hizmetlerini uygulamak",
|
||||
"Discussion of the Identity Service API": "Kimlik Hizmet API ( Identity Service API ) tartışması",
|
||||
"Support for those using, running and writing other bridges": "Diğer köprüleri kullanan , çalıştıran ve yazanlar için destek",
|
||||
"Contributing code to Matrix and Riot": "Matrix ve Riot'a kod katkısı (contribution) sağla",
|
||||
"Dev chat for the Riot/Web dev team": "Riot/Web Geliştirici takımı için Geliştirici sohbeti",
|
||||
"Dev chat for the Dendrite dev team": "Dendrite Geliştirici Takımı için Geliştirici sohbeti",
|
||||
"Lots of rooms already exist in Matrix, linked to existing networks (Slack, IRC, Gitter etc) or independent. Check out the directory!": "Matrix'te varolan ağlara (Slack , IRC , Gitter vb.) bağlı ya da bağımsız bir çok oda var . Dizini kontrol edin!"
|
||||
"Contributing code to Matrix and Riot": "Matrix ve Riot'a kod katkısı sağlama",
|
||||
"Dev chat for the Riot/Web dev team": "Riot/Web Geliştirici takımı için geliştirici sohbeti",
|
||||
"Dev chat for the Dendrite dev team": "Dendrite geliştirici takımı için geliştirici sohbeti",
|
||||
"Lots of rooms already exist in Matrix, linked to existing networks (Slack, IRC, Gitter etc) or independent. Check out the directory!": "Matrix'te var olan ağalara bağlı (Slack , IRC , Gitter vb.) birçok oda var. Dizini kontrol edin!",
|
||||
"You can use the custom server options to sign into other Matrix servers by specifying a different Home server URL.<br/>This allows you to use Riot with an existing Matrix account on a different home server.<br/><br/>You can also set a custom identity server but you won't be able to invite users by email address, or be invited by email address yourself.": "Farklı bir ev sunucusu URL'sini belirterek diğer Matrix sunucularına oturum açmak için özel sunucu seçeneklerini kullanabilirsiniz.<br />Bu, Riot'u başka bir ev sunucusu üzerinde var olan Matrix hesabını kullanmanıza olanak sağlar. <br/><br/> Ayrıca özelleştirilebilir bir kimlik de ayarlayabilirsiniz, ama kullanıcılırı ve kendinizi e-posta adreslerinden davet edemeyeceksiniz.",
|
||||
"Co-ordination for Riot translators": "Riot çeviricileri için iş güdüm (koordinasyon)"
|
||||
}
|
||||
|
||||
67
src/vector/getconfig.js
Normal file
67
src/vector/getconfig.js
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
Copyright 2018 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 Promise from 'bluebird';
|
||||
import request from 'browser-request';
|
||||
|
||||
export async function getVectorConfig(relativeLocation) {
|
||||
if (relativeLocation === undefined) relativeLocation = '';
|
||||
if (relativeLocation !== '' && !relativeLocation.endsWith('/')) relativeLocation += '/';
|
||||
try {
|
||||
const configJson = await getConfig(`${relativeLocation}config.${document.domain}.json`);
|
||||
// 404s succeed with an empty json config, so check that there are keys
|
||||
if (Object.keys(configJson).length === 0) {
|
||||
throw new Error(); // throw to enter the catch
|
||||
}
|
||||
return configJson;
|
||||
} catch (e) {
|
||||
return await getConfig(relativeLocation + "config.json");
|
||||
}
|
||||
}
|
||||
|
||||
function getConfig(configJsonFilename) {
|
||||
let deferred = Promise.defer();
|
||||
|
||||
request(
|
||||
{ method: "GET", url: configJsonFilename },
|
||||
(err, response, body) => {
|
||||
if (err || response.status < 200 || response.status >= 300) {
|
||||
// Lack of a config isn't an error, we should
|
||||
// just use the defaults.
|
||||
// Also treat a blank config as no config, assuming
|
||||
// the status code is 0, because we don't get 404s
|
||||
// from file: URIs so this is the only way we can
|
||||
// not fail if the file doesn't exist when loading
|
||||
// from a file:// URI.
|
||||
if (response) {
|
||||
if (response.status == 404 || (response.status == 0 && body == '')) {
|
||||
deferred.resolve({});
|
||||
}
|
||||
}
|
||||
deferred.reject({err: err, response: response});
|
||||
return;
|
||||
}
|
||||
|
||||
// We parse the JSON ourselves rather than use the JSON
|
||||
// parameter, since this throws a parse error on empty
|
||||
// which breaks if there's no config.json and we're
|
||||
// loading from the filesystem (see above).
|
||||
deferred.resolve(JSON.parse(body));
|
||||
}
|
||||
);
|
||||
|
||||
return deferred.promise;
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
Copyright 2015, 2016 OpenMarket Ltd
|
||||
Copyright 2017 Vector Creations Ltd
|
||||
Copyright 2018 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.
|
||||
@@ -15,8 +16,6 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
// Require common CSS here; this will make webpack process it into bundle.css.
|
||||
// Our own CSS (which is themed) is imported via separate webpack entry points
|
||||
// in webpack.config.js
|
||||
@@ -25,36 +24,22 @@ require('gfm.css/gfm.css');
|
||||
require('highlight.js/styles/github.css');
|
||||
require('draft-js/dist/Draft.css');
|
||||
|
||||
const rageshake = require("matrix-react-sdk/lib/rageshake/rageshake");
|
||||
rageshake.init().then(() => {
|
||||
console.log("Initialised rageshake: See https://bugs.chromium.org/p/chromium/issues/detail?id=583193 to fix line numbers on Chrome.");
|
||||
rageshake.cleanup();
|
||||
}, (err) => {
|
||||
console.error("Failed to initialise rageshake: " + err);
|
||||
});
|
||||
|
||||
window.addEventListener('beforeunload', (e) => {
|
||||
console.log('riot-web closing');
|
||||
// try to flush the logs to indexeddb
|
||||
rageshake.flush();
|
||||
});
|
||||
|
||||
|
||||
// add React and ReactPerf to the global namespace, to make them easier to
|
||||
// access via the console
|
||||
global.React = require("react");
|
||||
import React from 'react';
|
||||
// add React and ReactPerf to the global namespace, to make them easier to
|
||||
// access via the console
|
||||
global.React = React;
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
global.Perf = require("react-addons-perf");
|
||||
global.Perf = require('react-addons-perf');
|
||||
}
|
||||
|
||||
var RunModernizrTests = require("./modernizr"); // this side-effects a global
|
||||
var ReactDOM = require("react-dom");
|
||||
var sdk = require("matrix-react-sdk");
|
||||
const PlatformPeg = require("matrix-react-sdk/lib/PlatformPeg");
|
||||
import RunModernizrTests from './modernizr'; // this side-effects a global
|
||||
import ReactDOM from 'react-dom';
|
||||
import sdk from 'matrix-react-sdk';
|
||||
import PlatformPeg from 'matrix-react-sdk/lib/PlatformPeg';
|
||||
sdk.loadSkin(require('../component-index'));
|
||||
var VectorConferenceHandler = require('matrix-react-sdk/lib/VectorConferenceHandler');
|
||||
import VectorConferenceHandler from 'matrix-react-sdk/lib/VectorConferenceHandler';
|
||||
import Promise from 'bluebird';
|
||||
var request = require('browser-request');
|
||||
import request from 'browser-request';
|
||||
import * as languageHandler from 'matrix-react-sdk/lib/languageHandler';
|
||||
// Also import _t directly so we can call it just `_t` as this is what gen-i18n.js expects
|
||||
import { _t } from 'matrix-react-sdk/lib/languageHandler';
|
||||
@@ -69,12 +54,29 @@ import SettingsStore, {SettingLevel} from "matrix-react-sdk/lib/settings/Setting
|
||||
import Tinter from 'matrix-react-sdk/lib/Tinter';
|
||||
import SdkConfig from "matrix-react-sdk/lib/SdkConfig";
|
||||
|
||||
var lastLocationHashSet = null;
|
||||
import rageshake from "matrix-react-sdk/lib/rageshake/rageshake";
|
||||
|
||||
var CallHandler = require("matrix-react-sdk/lib/CallHandler");
|
||||
CallHandler.setConferenceHandler(VectorConferenceHandler);
|
||||
import CallHandler from 'matrix-react-sdk/lib/CallHandler';
|
||||
|
||||
MatrixClientPeg.setIndexedDbWorkerScript(window.vector_indexeddb_worker_script);
|
||||
import {getVectorConfig} from './getconfig';
|
||||
|
||||
let lastLocationHashSet = null;
|
||||
|
||||
function initRageshake() {
|
||||
rageshake.init().then(() => {
|
||||
console.log("Initialised rageshake: See https://bugs.chromium.org/p/chromium/issues/detail?id=583193 to fix line numbers on Chrome.");
|
||||
|
||||
window.addEventListener('beforeunload', (e) => {
|
||||
console.log('riot-web closing');
|
||||
// try to flush the logs to indexeddb
|
||||
rageshake.flush();
|
||||
});
|
||||
|
||||
rageshake.cleanup();
|
||||
}, (err) => {
|
||||
console.error("Failed to initialise rageshake: " + err);
|
||||
});
|
||||
}
|
||||
|
||||
function checkBrowserFeatures(featureList) {
|
||||
if (!window.Modernizr) {
|
||||
@@ -100,11 +102,6 @@ function checkBrowserFeatures(featureList) {
|
||||
return featureComplete;
|
||||
}
|
||||
|
||||
var validBrowser = checkBrowserFeatures([
|
||||
"displaytable", "flexbox", "es5object", "es5function", "localstorage",
|
||||
"objectfit", "indexeddb", "webworkers",
|
||||
]);
|
||||
|
||||
// Parse the given window.location and return parameters that can be used when calling
|
||||
// MatrixChat.showScreen(screen, params)
|
||||
function getScreenFromLocation(location) {
|
||||
@@ -135,7 +132,7 @@ function onHashChange(ev) {
|
||||
|
||||
// This will be called whenever the SDK changes screens,
|
||||
// so a web page can update the URL bar appropriately.
|
||||
var onNewScreen = function(screen) {
|
||||
function onNewScreen(screen) {
|
||||
console.log("newscreen "+screen);
|
||||
var hash = '#/' + screen;
|
||||
lastLocationHashSet = hash;
|
||||
@@ -151,7 +148,7 @@ var onNewScreen = function(screen) {
|
||||
// If we're in electron, we should never pass through a file:// URL otherwise
|
||||
// the identity server will try to 302 the browser to it, which breaks horribly.
|
||||
// so in that instance, hardcode to use riot.im/app for now instead.
|
||||
var makeRegistrationUrl = function(params) {
|
||||
function makeRegistrationUrl(params) {
|
||||
let url;
|
||||
if (window.location.protocol === "file:") {
|
||||
url = 'https://riot.im/app/#/register';
|
||||
@@ -177,8 +174,6 @@ var makeRegistrationUrl = function(params) {
|
||||
return url;
|
||||
}
|
||||
|
||||
window.addEventListener('hashchange', onHashChange);
|
||||
|
||||
function getConfig(configJsonFilename) {
|
||||
let deferred = Promise.defer();
|
||||
|
||||
@@ -226,6 +221,12 @@ function onTokenLoginCompleted() {
|
||||
}
|
||||
|
||||
async function loadApp() {
|
||||
initRageshake();
|
||||
MatrixClientPeg.setIndexedDbWorkerScript(window.vector_indexeddb_worker_script);
|
||||
CallHandler.setConferenceHandler(VectorConferenceHandler);
|
||||
|
||||
window.addEventListener('hashchange', onHashChange);
|
||||
|
||||
await loadLanguage();
|
||||
|
||||
const fragparts = parseQsFromFragment(window.location);
|
||||
@@ -239,15 +240,7 @@ async function loadApp() {
|
||||
let configJson;
|
||||
let configError;
|
||||
try {
|
||||
try {
|
||||
configJson = await getConfig(`config.${document.domain}.json`);
|
||||
// 404s succeed with an empty json config, so check that there are keys
|
||||
if (Object.keys(configJson).length === 0) {
|
||||
throw new Error(); // throw to enter the catch
|
||||
}
|
||||
} catch (e) {
|
||||
configJson = await getConfig("config.json");
|
||||
}
|
||||
configJson = await getVectorConfig();
|
||||
} catch (e) {
|
||||
configError = e;
|
||||
}
|
||||
@@ -261,31 +254,13 @@ async function loadApp() {
|
||||
const preventRedirect = Boolean(fragparts.params.client_secret);
|
||||
|
||||
if (!preventRedirect) {
|
||||
if (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream) {
|
||||
// FIXME: ugly status hardcoding
|
||||
if (SettingsStore.getValue("theme") === 'status') {
|
||||
window.location = "https://status.im/join-riot.html";
|
||||
const isIos = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
|
||||
const isAndroid = /Android/.test(navigator.userAgent);
|
||||
if (isIos || isAndroid) {
|
||||
if (!document.cookie.split(';').some((c) => c.startsWith('mobile_redirect_to_guide'))) {
|
||||
window.location = "mobile_guide/";
|
||||
return;
|
||||
}
|
||||
else {
|
||||
if (confirm(_t("Riot is not supported on mobile web. Install the app?"))) {
|
||||
window.location = "https://itunes.apple.com/us/app/vector.im/id1083446067";
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (/Android/.test(navigator.userAgent)) {
|
||||
// FIXME: ugly status hardcoding
|
||||
if (SettingsStore.getValue("theme") === 'status') {
|
||||
window.location = "https://status.im/join-riot.html";
|
||||
return;
|
||||
}
|
||||
else {
|
||||
if (confirm(_t("Riot is not supported on mobile web. Install the app?"))) {
|
||||
window.location = "https://play.google.com/store/apps/details?id=im.vector.alpha";
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -325,17 +300,19 @@ async function loadApp() {
|
||||
}
|
||||
}
|
||||
|
||||
if (window.localStorage && window.localStorage.getItem('mx_accepts_unsupported_browser')) {
|
||||
console.log('User has previously accepted risks in using an unsupported browser');
|
||||
validBrowser = true;
|
||||
}
|
||||
const validBrowser = checkBrowserFeatures([
|
||||
"displaytable", "flexbox", "es5object", "es5function", "localstorage",
|
||||
"objectfit", "indexeddb", "webworkers",
|
||||
]);
|
||||
|
||||
const acceptInvalidBrowser = window.localStorage && window.localStorage.getItem('mx_accepts_unsupported_browser');
|
||||
|
||||
console.log("Vector starting at "+window.location);
|
||||
if (configError) {
|
||||
window.matrixChat = ReactDOM.render(<div className="error">
|
||||
Unable to load config file: please refresh the page to try again.
|
||||
</div>, document.getElementById('matrixchat'));
|
||||
} else if (validBrowser) {
|
||||
} else if (validBrowser || acceptInvalidBrowser) {
|
||||
const platform = PlatformPeg.get();
|
||||
platform.startUpdater();
|
||||
|
||||
@@ -362,7 +339,6 @@ async function loadApp() {
|
||||
window.matrixChat = ReactDOM.render(
|
||||
<CompatibilityPage onAccept={function() {
|
||||
if (window.localStorage) window.localStorage.setItem('mx_accepts_unsupported_browser', true);
|
||||
validBrowser = true;
|
||||
console.log("User accepts the compatibility risks.");
|
||||
loadApp();
|
||||
}} />,
|
||||
|
||||
386
src/vector/mobile_guide/index.html
Normal file
386
src/vector/mobile_guide/index.html
Normal file
File diff suppressed because one or more lines are too long
23
src/vector/mobile_guide/index.js
Normal file
23
src/vector/mobile_guide/index.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import {getVectorConfig} from '../getconfig';
|
||||
|
||||
function onBackToRiotClick() {
|
||||
document.cookie = 'mobile_redirect_to_guide=false;path=/';
|
||||
window.location.href = '../';
|
||||
}
|
||||
|
||||
async function initPage() {
|
||||
document.getElementById('back_to_riot_button').onclick = onBackToRiotClick;
|
||||
|
||||
const config = await getVectorConfig('..');
|
||||
let hsUrl;
|
||||
if (config && config['default_hs_url']) {
|
||||
hsUrl = config['default_hs_url'];
|
||||
}
|
||||
if (hsUrl && hsUrl !== 'https://matrix.org/') {
|
||||
document.getElementById('step2_container').style.display = 'block';
|
||||
document.getElementById('hs_url').innerHTML = hsUrl;
|
||||
document.getElementById('step_login_header').innerHTML= 'Step 3: Register or Log in';
|
||||
}
|
||||
}
|
||||
|
||||
initPage();
|
||||
@@ -13,6 +13,8 @@ module.exports = {
|
||||
"bundle": ["babel-polyfill", "./src/vector/index.js"],
|
||||
"indexeddb-worker": "./src/vector/indexeddb-worker.js",
|
||||
|
||||
"mobileguide": "./src/vector/mobile_guide/index.js",
|
||||
|
||||
// We ship olm.js as a separate lump of javascript. This makes it get
|
||||
// loaded via a separate <script/> tag in index.html (which loads it
|
||||
// into the browser global `Olm`, where js-sdk expects to find it).
|
||||
@@ -128,10 +130,16 @@ module.exports = {
|
||||
// bottom of <head> or the bottom of <body>, and I'm a bit scared
|
||||
// about moving them.
|
||||
inject: false,
|
||||
excludeChunks: ['mobileguide'],
|
||||
vars: {
|
||||
og_image_url: og_image_url,
|
||||
},
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
template: './src/vector/mobile_guide/index.html',
|
||||
filename: 'mobile_guide/index.html',
|
||||
chunks: ['mobileguide'],
|
||||
}),
|
||||
],
|
||||
devtool: 'source-map',
|
||||
|
||||
|
||||
Reference in New Issue
Block a user