Merge branch 'develop' into matthew/dharma

This commit is contained in:
Bruno Windels 2018-09-21 12:55:40 +02:00
commit 23569705b4
25 changed files with 775 additions and 155 deletions

View File

@ -1,3 +1,74 @@
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 outside 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)
* Support new server notices format
Changes in [0.16.1](https://github.com/vector-im/riot-web/releases/tag/v0.16.1) (2018-08-20)
============================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.16.1-rc.1...v0.16.1)
* No changes since rc.1
Changes in [0.16.1-rc.1](https://github.com/vector-im/riot-web/releases/tag/v0.16.1-rc.1) (2018-08-16)
======================================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.16.0...v0.16.1-rc.1)
* Update from Weblate.
[\#7178](https://github.com/vector-im/riot-web/pull/7178)
* CSS for MAU warning bar
[\#7152](https://github.com/vector-im/riot-web/pull/7152)
* CSS for user limit error
[\#7139](https://github.com/vector-im/riot-web/pull/7139)
* Unpin sanitize-html
[\#7132](https://github.com/vector-im/riot-web/pull/7132)
* Pin sanitize-html to 0.18.2
[\#7129](https://github.com/vector-im/riot-web/pull/7129)
Changes in [0.16.0](https://github.com/vector-im/riot-web/releases/tag/v0.16.0) (2018-07-30)
============================================================================================
[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.16.0-rc.2...v0.16.0)

View File

@ -241,18 +241,6 @@ apps using React.
After creating a new component you must run `npm run reskindex` to regenerate
the `component-index.js` for the app (used in future for skinning)
**However, as of July 2016 this layering abstraction is broken due to rapid
development on Riot forcing `matrix-react-sdk` to move fast at the expense of
maintaining a clear abstraction between the two.** Hacking on Riot inevitably
means hacking equally on `matrix-react-sdk`, and there are bits of
`matrix-react-sdk` behaviour incorrectly residing in the `riot-web` project
(e.g. matrix-react-sdk specific CSS), and a bunch of Riot specific behaviour
in the `matrix-react-sdk` (grep for `vector` / `riot`). This separation problem will be
solved asap once development on Riot (and thus matrix-react-sdk) has
stabilised. Until then, the two projects should basically be considered as a
single unit. In particular, `matrix-react-sdk` issues are currently filed
against `riot-web` in github.
Please note that Riot is intended to run correctly without access to the public
internet. So please don't depend on resources (JS libs, CSS, images, fonts)
hosted by external CDNs or servers but instead please package all dependencies

View File

@ -2,7 +2,7 @@
"name": "riot-web",
"productName": "Riot",
"main": "src/electron-main.js",
"version": "0.16.0",
"version": "0.16.4",
"description": "A feature-rich client for Matrix.org",
"author": "Vector Creations Ltd.",
"dependencies": {

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "riot-web",
"version": "0.15.6",
"version": "0.16.4-rc.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -2,7 +2,7 @@
"name": "riot-web",
"productName": "Riot",
"main": "electron_app/src/electron-main.js",
"version": "0.16.0",
"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.7",
"matrix-react-sdk": "0.13.0",
"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",
@ -122,7 +122,7 @@
"minimist": "^1.2.0",
"mkdirp": "^0.5.1",
"mocha": "^2.4.5",
"parallelshell": "^3.0.2",
"parallelshell": "3.0.1",
"postcss-extend": "^1.0.5",
"postcss-import": "^9.0.0",
"postcss-loader": "^1.2.2",
@ -144,7 +144,7 @@
"build": {
"appId": "im.riot.app",
"category": "Network",
"electronVersion": "2.0.5",
"electronVersion": "2.0.8",
"//asar=false": "https://github.com/electron-userland/electron-builder/issues/675",
"asar": false,
"dereference": true,

View File

@ -77,6 +77,7 @@ $focus-brightness: 125%;
// red warning colour
$warning-color: #F69E98;
$warning-bg-color: #DF2A8B;
$info-bg-color: #2A9EDF;
$mention-user-pill-bg-color: #ff0064;
$other-user-pill-bg-color: rgba(0, 0, 0, 0.1);

View File

@ -24,10 +24,12 @@ const INCLUDE_LANGS = [
{'value': 'fr', 'label': 'Français'},
{'value': 'gl', 'label': 'Galego'},
{'value': 'hu', 'label': 'Magyar'},
{'value': 'it', 'label': 'Italiano'},
{'value': 'ko', 'label': '한국어'},
{'value': 'lv', 'label': 'Latviešu'},
{'value': 'nb_NO', 'label': 'Norwegian Bokmål'},
{'value': 'nl', 'label': 'Nederlands'},
{'value': 'nn', 'label': 'Norsk Nynorsk'},
{'value': 'pl', 'label': 'Polski'},
{'value': 'pt', 'label': 'Português'},
{'value': 'pt_BR', 'label': 'Português do Brasil'},

View File

@ -3,5 +3,6 @@
"Dismiss": "تجاهل",
"Riot is not supported on mobile web. Install the app?": "رايوت غير مدعوم في وضعية الويب على الهاتف. هل تريد تثبيت التطبيق ؟",
"Riot Desktop on %(platformName)s": "الواجهة المكتبية لرايوت على %(platformName)s",
"Unknown device": "جهاز مجهول"
"Unknown device": "جهاز مجهول",
"%(appName)s via %(browserName)s on %(osName)s": "%(appName)s عبر %(browserName)s على %(osName)s"
}

View File

@ -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"
}

View File

@ -34,5 +34,6 @@
"Dev chat for the Riot/Web dev team": "Conversaciones del equipo de desarrollo de Riot/Web",
"Dev chat for the Dendrite dev team": "Conversaciones del equipo de desarrollo de Dendrite",
"Lots of rooms already exist in Matrix, linked to existing networks (Slack, IRC, Gitter etc) or independent. Check out the directory!": "Muchas salas ya están disponibles en Matrix, enlazadas a redes existentes (Slack, IRC, Gitter, etc) o independientes. ¡Revisa el directorio!",
"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.": "Puedes usar las opciones del servidor personalizado para acceder a otros servidores Matrix especificando su URL. <br/> Esto te permite usar Riot con una cuenta Matrix existente en un servidor doméstico distinto. <br/><br/>También puedes establecer un servidor de identidad personalizado pero no podrás invitar a otros usuarios usando su dirección de correo electrónico, y tampoco ser invitado por el tuyo."
"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.": "Puedes usar las opciones del servidor personalizado para acceder a otros servidores Matrix especificando su URL. <br/> Esto te permite usar Riot con una cuenta Matrix existente en un servidor doméstico distinto. <br/><br/>También puedes establecer un servidor de identidad personalizado pero no podrás invitar a otros usuarios usando su dirección de correo electrónico, y tampoco ser invitado por el tuyo.",
"Co-ordination for Riot translators": "Co-odinación de traductores de Riot"
}

View File

@ -34,6 +34,6 @@
"Dev chat for the Riot/Web dev team": "Csevegés a Riot/Web fejlesztői csapatával fejlesztőknek",
"Dev chat for the Dendrite dev team": "Csevegés a Dendrite fejlesztői csapatával fejlesztőknek",
"Lots of rooms already exist in Matrix, linked to existing networks (Slack, IRC, Gitter etc) or independent. Check out the directory!": "Már sok szoba van a Matrixon: más hálózatokkal (Slack, IRC, Gitter stb.) összekapcsolt és függetlenek szobák is. Nézd meg a szobajegyzéket!",
"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.": "Bejelentkezhetsz más Matrix szerverre is az egyedi szerverbeállításoknál megadott másik szerver URL-jével.<br/>Így használhatod a Riotot egy már máshol meglévő Matrix fiókkal is.<br/><br/>Beállíthatsz egyéni identitásszervert is, de akkor nem tudsz más felhasználókat e-mail címmel meghívni, illetve ők sem tudnak téged.",
"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.": "Bejelentkezhetsz más Matrix szerverre is az egyedi szerverbeállításoknál megadott Matrix szerver URL-jével.<br/>Így használhatod a Riotot egy már máshol meglévő Matrix fiókkal is.<br/><br/>Beállíthatsz egyéni identitásszervert is, de akkor nem tudsz más felhasználókat e-mail címmel meghívni, illetve ők sem tudnak téged.",
"Co-ordination for Riot translators": "Koordináció Riot fordítók számára"
}

View File

@ -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"
}

View File

@ -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?",

39
src/i18n/strings/ka.json Normal file
View File

@ -0,0 +1,39 @@
{
"Riot is not supported on mobile web. Install the app?": "Riot ვებსაიტს არ აქვს მხარდაჭერა მობილური მოწყობილობებისთვის. გსურთ აპლიკაციის დაყენება?",
"Riot Desktop on %(platformName)s": "Riot Desktop-ი %(platformName)s-ზე",
"Unknown device": "უცნობი მოწყობილობა",
"%(appName)s via %(browserName)s on %(osName)s": "%(appName)s-ი %(browserName)s-ით %(osName)s-იდან",
"You need to be using HTTPS to place a screen-sharing call.": "ეკრანის გაზიარების ფუნქციის მქონე ზარისთვის საჭიროა, იყენებდეთ HTTPS-ს.",
"Custom Server Options": "პერსონალიზებული სერვერის პარამეტრები",
"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.": "სხვა Matrix სერვერებზე შესასვლელად შეგიძლიათ გამოიყენოთ პერსონალიზებული სერვერის პარამეტრები განსხვავებული მთავარი სერვერის URL-ის მითითებით <br/>ეს გაძლევთ საშუალებას, გამოიყენოთ Riot-ი არსებულ Matrix ანგარიშით სხვა მთავარ სერვერზე.<br/><br/>თქვენ ასევე შეგიძლიათ დააყენოთ პერსონალიზებული იდენტუროის სერვერი, მაგრამ თქვენ ვერ მოიწვევთ მომხმარებლებს ელფოსტის მისამართით და თავად თქვენ ვერ მოგიწვევენ ელფოსტის მისამართით.",
"Dismiss": "უარის თქმა",
"powered by Matrix": "Matrix-ზე დაფუძნებული",
"Welcome to Riot.im": "კეთილი იყოს თქვენი მობრძანება Riot.im-ზე",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "დეცენტრალიზებული, დაშიფრული ჩატი &amp; კოლაბორაცია, დაფუძნებული [matrix]-ზე",
"Search the room directory": "მოძებნა ოთახის სიაში",
"Lots of rooms already exist in Matrix, linked to existing networks (Slack, IRC, Gitter etc) or independent. Check out the directory!": "მრავალი ოთახი უკვე არსებობს Matrix-ში, რომლებიც არიან დაკავშირებული არსებულ ქსელებთან (Slack, IRC, Glitter და ა.შ) ან დამოუკიდებელი. შეამოწმეთ სია!",
"Chat with Riot Bot": "ისაუბრეთ Riot-ის Bot-თან",
"Get started with some tips from Riot Bot!": "დაიწყეთ რჩევებით Riot-ის Bot-ისგან!",
"General discussion about Matrix and Riot": "ზოგადი დისკუსია Matrix-სა და Riot-ზე",
"Discussion of all things Matrix!": "დისკუსია ყველაფერზე, რაც ეხება Matrix-ს!",
"Riot/Web &amp; Desktop chat": "Riot/ვებ-ისა &amp; Desktop-ის ჩატი",
"Riot/iOS &amp; matrix-ios-sdk chat": "Riot/iOS-ისა &amp; matrix-ios-sdk-ის ჩატი",
"Riot/Android &amp; matrix-android-sdk chat": "Riot/ანდროიდისა &amp; matrix-android-sdk-ის ჩატი",
"Matrix technical discussions": "Matrix-ის ტექნიკური დისკუსიები",
"Running Matrix services": "Matrix-ის სერვისების გამოყენება",
"Community-run support for Synapse": "საზოგადოებისმიერი მხარდაჭერა Synapse-ისთვის",
"Admin support for Dendrite": "ადმინისტრატორის მხარდაჭერა Dendrite-ისთვის",
"Announcements about Synapse releases": "განცხადებები Synapse-ის გამოშვებებთან დაკავშირებით",
"Support for those using and running matrix-appservice-irc": "მხარდაჭერა მათთვის, ვინც იყენებს matrix-appservice-irc-ს",
"Building services on Matrix": "სერვისების Matrix-ზე დაფუძნებით გამომუშავება",
"Support for those using the Matrix spec": "მხარდაჭერა Matrix სპეციფიკაციების გამოყენებასთან დაკავშირებულ კითხვებზე",
"Design and implementation of E2E in Matrix": "პირით-პირამდე დაშიფვრის დაგეგმვა და შესრულება",
"Implementing VR services with Matrix": "VR სერვისების Matrix-ით შესრულება",
"Implementing VoIP services with Matrix": "VoIP სერვისების Matrix-ით შესრულება",
"Discussion of the Identity Service API": "იდენტიფიკაციის სერვისის API-ს დისკუსია",
"Support for those using, running and writing other bridges": "მხარდაჭერა მათთვის, ვინც იყენებს და წერს სხვა ხიდებს",
"Contributing code to Matrix and Riot": "Matrix-ის და Riot-ის გამომუშავებაში მონაწილეობის მიღება",
"Dev chat for the Riot/Web dev team": "დეველოპერების ჩატი Riot/ვებ დეველოპერების გუნდთან",
"Dev chat for the Dendrite dev team": "დეველოპერების ჩატი Dendrite-ის დეველოპერების გუნდთან",
"Co-ordination for Riot translators": "კოორდინაცია Riot-ის მთარგმნელებისთვის"
}

View File

@ -1,7 +1,7 @@
{
"Custom Server Options": "사용자 지정 서버 설정",
"Dismiss": "없애기",
"powered by Matrix": "Matrix의 지원을 받고 있어요",
"powered by Matrix": "Matrix의 지원을 받고 있습니다",
"Riot Desktop on %(platformName)s": "%(platformName)s PC용 Riot",
"Riot is not supported on mobile web. Install the app?": "”Riot은 모바일 사이트를 지원하지 않습니다. 앱을 설치하시겠어요?",
"Unknown device": "알 수 없는 장치",

View File

@ -1,38 +1,39 @@
{
"Unknown device": "Nežinomas įrenginys",
"powered by Matrix": "palaikomas Matrix",
"powered by Matrix": "veikia su Matrix",
"Welcome to Riot.im": "Sveiki atvykę į Riot.im",
"Chat with Riot Bot": "Kalbėtis su Riot robotu",
"General discussion about Matrix and Riot": "Bendros diskusijos apie Matrix ir Riot",
"Matrix technical discussions": "Matrix techninės diskusijos",
"Riot is not supported on mobile web. Install the app?": "Riot nėra palaikoma naršant svetainėje mobiliaisiais įrenginiais. Įdiegti programėlę?",
"Riot Desktop on %(platformName)s": "Riot Desktop, %(platformName)s",
"Riot Desktop on %(platformName)s": "Riot Desktop, naudojant %(platformName)s",
"%(appName)s via %(browserName)s on %(osName)s": "%(appName)s per %(browserName)s, naudojant %(osName)s",
"You need to be using HTTPS to place a screen-sharing call.": "Norint skambinti su ekrano bendrinimo funkcija būtina naudoti HTTPS.",
"Custom Server Options": "Pasirinktiniai serverio nustatymai",
"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.": "Norėdami jungtis prie kito nei Matrix serverio galite pasirinktinio serverio nustatymuose nurodyti kito serverio URL adresą.<br/>Ši funkcija leis naudoti Riot su esama Matrix serverio paskyrą kituose serveriuose.<br/><br/>Taip pat galite nurodyti pasirinktinį identifikavimo serverį, bet tuomet negalėsite kviesti kitų vartotojų el. paštu ar jie jūsų.",
"Dismiss": "Nutraukti",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Decentralizuotas, šifruotas čatas; bendradarbiavimas palaikomas [matrix]",
"Custom Server Options": "Tinkinto serverio parametrai",
"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.": "Norėdami prisijungti prie kito nei Matrix serverio, galite naudoti tinkinto serverio parametrus ir nurodyti kito serverio URL adresą.<br/>Tai leis jums naudoti Riot su esama Matrix paskyra kituose serveriuose.<br/><br/>Taip pat galite nustatyti tinkintą tapatybės serverį, tačiau tuomet negalėsite pakviesti kitus naudotojus pagal el. paštą, o taip pat ir jie negalės pakviesti jūsų.",
"Dismiss": "Atmesti",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Decentralizuoti, šifruoti pokalbiai ir bendradarbiavimas, veikiantis su [matrix]",
"Search the room directory": "Ieškoti kambarių kataloge",
"Lots of rooms already exist in Matrix, linked to existing networks (Slack, IRC, Gitter etc) or independent. Check out the directory!": "Daugybė kambarių yra prisijungę prie Matrix, kurie yra susieti su egzistuojančiais tinklais (Slack, IRC, Gitter etc) arba nepriklausomi. Patikrinkite kambarių katalogą!",
"Get started with some tips from Riot Bot!": "Pradėkite su patarimais nuo Riot roboto!",
"Discussion of all things Matrix!": "Diskusijos apie viską Matrix!",
"Riot/Web &amp; Desktop chat": "Riot/Web &amp; Darbalaukio čatas",
"Riot/iOS &amp; matrix-ios-sdk chat": "Riot/iOS &amp; matrix-ios-sdk chat",
"Riot/Android &amp; matrix-android-sdk chat": "Riot/Android &amp; matrix-android-sdk chat",
"Running Matrix services": "Vykdant Matrix servisus",
"Community-run support for Synapse": "Bendruomenės Synapse palaikymas",
"Admin support for Dendrite": "Administratoriaus Dendrite palaikymas",
"Announcements about Synapse releases": "Pranešimai apie Synapse naujinimus",
"Support for those using and running matrix-appservice-irc": "Palaikymas skirtas matrix-appservice-irc naudotojams",
"Building services on Matrix": "Servisų kūrimas ant Matrix",
"Support for those using the Matrix spec": "Palaikymas skirtas Matrix spec",
"Design and implementation of E2E in Matrix": "E2E dizainas ir įgyvendinimas Matrix'e",
"Implementing VR services with Matrix": "VR serviso įgyvendinimas su Matrix",
"Implementing VoIP services with Matrix": "VoIP serviso įgyvendinimas su Matrix",
"Discussion of the Identity Service API": "Diskusijos apie identifikavimo serviso API",
"Support for those using, running and writing other bridges": "Palaikymas skirtas tiems kas naudoja kitus tiltus",
"Contributing code to Matrix and Riot": "Contributing code to Matrix and Riot",
"Dev chat for the Riot/Web dev team": "Kūrėjų čatas Riot/Web dev team",
"Dev chat for the Dendrite dev team": "Kūrėjų čatas Dendrite dev team"
"Lots of rooms already exist in Matrix, linked to existing networks (Slack, IRC, Gitter etc) or independent. Check out the directory!": "Daugybė kambarių jau yra Matrix, susieti prie esamų tinklų (Slack, IRC, Gitter ir t.t.) arba nepriklausomi. Pasižvalgykite kataloge!",
"Get started with some tips from Riot Bot!": "Pradėkite darbo pradžią nuo Riot roboto patarimų!",
"Discussion of all things Matrix!": "Diskusijos apie viską, kas susiję su Matrix!",
"Riot/Web &amp; Desktop chat": "Pokalbiai apie Riot/Web ir Desktop",
"Riot/iOS &amp; matrix-ios-sdk chat": "Pokalbiai apie Riot/iOS ir matrix-ios-sdk",
"Riot/Android &amp; matrix-android-sdk chat": "Pokalbiai apie Riot/Android ir matrix-android-sdk",
"Running Matrix services": "Matrix paslaugų paleidimas",
"Community-run support for Synapse": "Su Synapse susijęs bendruomenės palaikymas",
"Admin support for Dendrite": "Dendrite administratorių palaikymas",
"Announcements about Synapse releases": "Skelbimai apie Synapse laidas",
"Support for those using and running matrix-appservice-irc": "Palaikymas skirtas besinaudojantiems ir prižiūrintiems matrix-appservice-irc",
"Building services on Matrix": "Paslaugų kūrimas, naudojant Matrix",
"Support for those using the Matrix spec": "Palaikymas skirtas besinaudojantiems Matrix specifikacija",
"Design and implementation of E2E in Matrix": "E2E dizainas ir įgyvendinimas ties Matrix",
"Implementing VR services with Matrix": "VR paslaugų įgyvendinimas ties Matrix",
"Implementing VoIP services with Matrix": "VoIP paslaugų įgyvendinimas ties Matrix",
"Discussion of the Identity Service API": "Diskusijos apie tapatybės paslaugos API",
"Support for those using, running and writing other bridges": "Palaikymas skirtas besinaudojantiems, prižiūrintiems ar kuriantiems kitus tinklų tiltus",
"Contributing code to Matrix and Riot": "Matrix ir Riot kodo plėtojimas",
"Dev chat for the Riot/Web dev team": "Kūrėjų pokalbiai, skirti Riot/Web kūrėjų komandai",
"Dev chat for the Dendrite dev team": "Kūrėjų pokalbiai, skirti Dendrite kūrėjų komandai",
"Co-ordination for Riot translators": "Koordinavimas Riot vertėjams"
}

View File

@ -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 &amp; collaboration powered by [matrix]": "Desentralisert, kryptert nettprat &amp; 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"
}

39
src/i18n/strings/nn.json Normal file
View File

@ -0,0 +1,39 @@
{
"Riot is not supported on mobile web. Install the app?": "Riot er ikkja støtta på mobilnettlesare. Last æppen inn?",
"Riot Desktop on %(platformName)s": "Riot på Skrivebord for %(platformName)s",
"Unknown device": "Ukjend eining",
"%(appName)s via %(browserName)s on %(osName)s": "%(appName)s gjennom %(browserName)s på %(osName)s",
"You need to be using HTTPS to place a screen-sharing call.": "Du må bruka HTTPS for å ha ei samtale med skjermdeling.",
"Dismiss": "Avvis",
"powered by Matrix": "Matrixdriven",
"Welcome to Riot.im": "Velkomen til Riot.im",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Desentralisert, kryptert nettprat &amp; 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",
"Get started with some tips from Riot Bot!": "Kom i gang med nokre råd frå Riot Bot!",
"General discussion about Matrix and Riot": "Allmenn meiningsutveksling om Matrix og Riot",
"Discussion of all things Matrix!": "Meiningsutveksling om alt som gjeld Matrix!",
"Riot/Web &amp; Desktop chat": "Riot/Web &amp; Skrivebordsprat",
"Riot/iOS &amp; matrix-ios-sdk chat": "Riot/iOS &amp; matrix-ios-sdk-prat",
"Riot/Android &amp; matrix-android-sdk chat": "Riot/Android &amp; matrix-android-sdk-prat",
"Matrix technical discussions": "Teknisk meiningsutveksling om Matrix",
"Running Matrix services": "Å køyra Matrix-tenestar",
"Community-run support for Synapse": "Samfunnsdriven støtte for Synapse",
"Admin support for Dendrite": "Administratorstøtte for Dendrite",
"Announcements about Synapse releases": "Kunngjeringar om Synapse-utgåver",
"Support for those using and running matrix-appservice-irc": "Støtte for dei som brukar og køyrar matrix-appleservice-irc",
"Building services on Matrix": "Byggingstenester på Matrix",
"Support for those using the Matrix spec": "Støtte for dei som brukar Matrix-specen",
"Design and implementation of E2E in Matrix": "E2E-oppbygging og -implementering på Matrix",
"Implementing VR services with Matrix": "Implementering av VR-tenester med Matrix",
"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": "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 epost, eller å sjølv verta boden inn med epost."
}

View File

@ -8,12 +8,12 @@
"Unknown device": "Nieznane urządzenie",
"You need to be using HTTPS to place a screen-sharing call.": "Musisz używać bezpiecznego protokołu HTTPS aby użyć połączenia współdzielenia ekranu.",
"Welcome to Riot.im": "Witamy w Riot.im",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Zdecentralizowany, szyfrowany czat &amp; współpraca wspierana przez [matrix]",
"Search the room directory": "Wyszukaj katalog pokojów",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Zdecentralizowany, szyfrowany czat &amp; współpraca oparta na [matrix]",
"Search the room directory": "Przeszukaj katalog pokojów",
"Chat with Riot Bot": "Rozmowa z Botem Riota",
"Get started with some tips from Riot Bot!": "Rozpocznij z wskazówkami Riot Bota!",
"General discussion about Matrix and Riot": "Generalna rozmowa o Matrix i Riot",
"Discussion of all things Matrix!": "Rozmowa o wszystkim Matrixowym!",
"General discussion about Matrix and Riot": "Ogólna rozmowa o Matrix i Riot",
"Discussion of all things Matrix!": "Rozmowa o wszystkich sprawach Matrixowych!",
"Matrix technical discussions": "Dyskusje techniczne Matrixa",
"Riot/Web &amp; Desktop chat": "Czat o Riot/Web i Desktop",
"Riot/iOS &amp; matrix-ios-sdk chat": "Czat o Riot/iOS i matrix-ios-sdk",
@ -29,8 +29,8 @@
"Implementing VR services with Matrix": "Implementowanie usług wirtualnej rzeczywistości w oparciu o Matrix",
"Implementing VoIP services with Matrix": "Implementowanie usług telefonii internetowej VoIP w oparciu o Matrix",
"Discussion of the Identity Service API": "Dyskusja na temat API Identity Service",
"Support for those using, running and writing other bridges": "Wsparcie dla używających, zapewniających i piszących inne mosty",
"Contributing code to Matrix and Riot": "Wspieranie rozwoju Matrix i Riot",
"Support for those using, running and writing other bridges": "Wsparcie dla używających, utrzymujących i piszących inne mosty",
"Contributing code to Matrix and Riot": "Współtworzenie kodu do Matrix lub Riot",
"Dev chat for the Riot/Web dev team": "Czat deweloperów zespołu Riot/Web",
"Dev chat for the Dendrite dev team": "Czat deweloperów zespołu Dendrite",
"Lots of rooms already exist in Matrix, linked to existing networks (Slack, IRC, Gitter etc) or independent. Check out the directory!": "Matrix ma wiele, już działających pokoi, połączonych z istniejącymi sieciami, takimi jak Slack, IRC lub Gitter, a także wiele zupełnie niezależnych. Możesz przejrzeć je wszystkie w spisie pokoi!",

View File

@ -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 &amp; collaboration powered by [matrix]": "Dağıtık , şifreli sohbet &amp; işbirliği ile Matrix tarafından desteklenmektedir",
"Welcome to Riot.im": "Riot.im'e hoş geldiniz",
"Decentralised, encrypted chat &amp; collaboration powered by [matrix]": "Merkezsiz, şifreli sohbet &amp; 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 &amp; Desktop chat": "Riot/Web &amp; Masaüstü sohbet",
@ -19,19 +19,21 @@
"Riot/Android &amp; matrix-android-sdk chat": "Riot/Android &amp; 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
View 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;
}

View File

@ -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();
});
import React from 'react';
// add React and ReactPerf to the global namespace, to make them easier to
// access via the console
global.React = require("react");
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();
}} />,

File diff suppressed because one or more lines are too long

View 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();

View File

@ -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).
@ -129,10 +131,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',