From e5743471f44cda00330f25677433e867c5dd2000 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 4 Dec 2020 19:34:44 +0100 Subject: [PATCH] add Nheko and Fractal --- images/client-icons/fractal.png | Bin 0 -> 8796 bytes images/client-icons/nheko.svg | 155 ++++++++++++++++++++++++++++++++ images/flathub-badge.svg | 62 +++++++++++++ src/open/clients/Fractal.js | 51 +++++++++++ src/open/clients/Nheko.js | 53 +++++++++++ src/open/types.js | 19 +++- 6 files changed, 339 insertions(+), 1 deletion(-) create mode 100644 images/client-icons/fractal.png create mode 100644 images/client-icons/nheko.svg create mode 100644 images/flathub-badge.svg create mode 100644 src/open/clients/Fractal.js create mode 100644 src/open/clients/Nheko.js diff --git a/images/client-icons/fractal.png b/images/client-icons/fractal.png new file mode 100644 index 0000000000000000000000000000000000000000..e60c89c98878256859f41e0667183cccf6de2d68 GIT binary patch literal 8796 zcmd^Fg3>&}Q^f&iJ*%ZTq##VN7b{i?5P+BY#riZQA=i5ssNS^OL*g=$E5SN(nfnSu^ z6`_};o~46QwT6vp0kNASAnYvpeDM$0!Maj?6-VjX##3)1tM)Rv;I6T^`cZmqc0^jlasL(U6@^HoHI&{WQS2Y=_BLQKNK&yuTI zxL~8Wnfli(^9Z+vlK58f@58vrWOW%Y8sQ8UVqSFX0()xpi@v`jP%{0)F_r!pkj~63 zCF@aB-B%)~&nC4TCeJSa*40q^3bUk4`}+A5GOZjmt(QDg!{mx}icRGCY-tUDJ)x(k zj-RgoY=nDVd!%5Ob_YyM|EKxGDVL{kLE$rLoJHrvYQhPv<3N!~h;iKEyXf3%caJ|& zb?uTHfwoRxgbRZ8wckrl5M=MOoQ!3$iYQ*NzYW0)E+iZ~?=z<2Ke^n`OxqO(9+?Zp zsfAEgWrIBrmjsqWb@(s*tsy1Ey{kX$Nju22R&^ANIsE+DrNFT@&je&YP~@*ZH0qt( z`=fYwS2X0cxPJ>(X_M>>6)mL8!0eM`vue~(+K%VelkH2|v20VQbj}GRr9+GSenn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)xZ!(%S42zIcGz<;&hSaTOC7bssUFOS}T9{VD3 z-r?1yg)zGQ)=OM+216Uv4iflZ2HBf%!4W1kV??pT9B&KV5ey=9P|8#v(L`EzcZT#V z3^;>%bd27aLcA7k!cr=%l+-19w2tDut{PjEn@zxjm; z&^=cjA9}-;BbTH4W%Sgd-%DDE%v-#fG_dK=&H8ERTUENCQW3#VGG% z{h6&^yX*mubn*d?LD6NLRIy%1MfQeyAqS;8Pgf2-um1vkoeEy+&XTzM+(Y`$&u3E; zVjMqyaS2UgP?gNYA@ZIqy#6v64iM)1>Y$+d6#+udk{O1$&Az{M!Ud^Xe%E&abKGc; z#g+pGBDlcvyZ@B~;h1quei|ZxoQaxtpmTG_3hHsx3mh>ReLM?rs`{wK3G7M*vzwO&w&QpMcq# zN3FsnJj94SP?LMK4Bjab;+I?xq+tT+qKe`+Nh>~V#mCVrA(7Vn+dUQw;uH1S%IqJ- zXNgZxlRRF$-Z&*XTGW`*(g4Os7NP@{&IN4KD1cbt1H5MMnGoC2FEgpNT6yd&GN0iC z$-@Y~YZ;*Uo8hGI@XG#aZ!q8?g+1V5J|n<$!~uR#SnsTk&&%YH04Ec4OfHD}U<@_- z^~`|5{>g7Wx2Lb6ac}znJx+Bj3osL6qHBRPPf8zcnovh(+_}n&>OblZZ3*w7`jXlR zZY>{GQ&w{#k6GqmgS5ay+}Joo+wplQ#pHVr49|oA)hE=P9KVZ6EgS4n7ah5w>Gr{m z_wlCY)dyr9UzXpIRNQ0D*8>+hl2W5j0(~I1Hs7>;5ZU?$oCHBrQc#z#k+q2YKPw#> A`v3p{ literal 0 HcmV?d00001 diff --git a/images/client-icons/nheko.svg b/images/client-icons/nheko.svg new file mode 100644 index 0000000..ce3ec40 --- /dev/null +++ b/images/client-icons/nheko.svg @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/images/flathub-badge.svg b/images/flathub-badge.svg new file mode 100644 index 0000000..ad3b04a --- /dev/null +++ b/images/flathub-badge.svg @@ -0,0 +1,62 @@ + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/open/clients/Fractal.js b/src/open/clients/Fractal.js new file mode 100644 index 0000000..be51744 --- /dev/null +++ b/src/open/clients/Fractal.js @@ -0,0 +1,51 @@ +/* +Copyright 2020 The Matrix.org Foundation C.I.C. + +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 {Maturity, Platform, LinkKind, FlathubLink} from "../types.js"; + +/** + * Information on how to deep link to a given matrix client. + */ +export class Fractal { + get id() { return "fractal"; } + getName(platform) { return "Fractal"; } + get icon() { return "images/client-icons/fractal.png"; } + get author() { return "Daniel Garcia Moreno"; } + get homepage() { return "https://gitlab.gnome.org/GNOME/fractal"; } + get platforms() { return [Platform.Linux]; } + get description() { return 'Fractal is a Matrix Client written in Rust'; } + getMaturity(platform) { return Maturity.Beta; } + getDeepLink(platform, link) {} + canInterceptMatrixToLinks(platform) { return false; } + + getLinkInstructions(platform, link) { + if (link.kind === LinkKind.User || link.kind === LinkKind.Room) { + return "Click the '+' button in the top right and paste the identifier"; + } + } + + getCopyString(platform, link) { + if (link.kind === LinkKind.User || link.kind === LinkKind.Room) { + return link.identifier; + } + } + + getInstallLinks(platform) { + if (platform === Platform.Linux) { + return [new FlathubLink("org.gnome.Fractal")]; + } + } +} diff --git a/src/open/clients/Nheko.js b/src/open/clients/Nheko.js new file mode 100644 index 0000000..064f6bd --- /dev/null +++ b/src/open/clients/Nheko.js @@ -0,0 +1,53 @@ +/* +Copyright 2020 The Matrix.org Foundation C.I.C. + +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 {Maturity, Platform, LinkKind, FlathubLink} from "../types.js"; + +/** + * Information on how to deep link to a given matrix client. + */ +export class Nheko { + get id() { return "nheko"; } + getName(platform) { return "Nheko"; } + get icon() { return "images/client-icons/nheko.svg"; } + get author() { return "mujx, red_sky, deepbluev7, Konstantinos Sideris"; } + get homepage() { return "https://github.com/Nheko-Reborn/nheko"; } + get platforms() { return [Platform.Windows, Platform.macOS, Platform.Linux]; } + get description() { return 'A native desktop app for Matrix that feels more like a mainstream chat app.'; } + getMaturity(platform) { return Maturity.Beta; } + getDeepLink(platform, link) {} + canInterceptMatrixToLinks(platform) { return false; } + + getLinkInstructions(platform, link) { + switch (link.kind) { + case LinkKind.User: return `Type /invite ${link.identifier}`; + case LinkKind.Room: return `Type /join ${link.identifier}`; + } + } + + getCopyString(platform, link) { + switch (link.kind) { + case LinkKind.User: return `/invite ${link.identifier}`; + case LinkKind.Room: return `/join ${link.identifier}`; + } + } + + getInstallLinks(platform) { + if (platform === Platform.Linux) { + return [new FlathubLink("io.github.NhekoReborn.Nheko")]; + } + } +} diff --git a/src/open/types.js b/src/open/types.js index 443d769..52472d6 100644 --- a/src/open/types.js +++ b/src/open/types.js @@ -74,6 +74,23 @@ export class FDroidLink { } } +export class FlathubLink { + constructor(appId) { + this._appId = appId; + } + + createInstallURL(link) { + return `https://flathub.org/apps/details/${encodeURIComponent(this._appId)}`; + } + + get channelId() { + return "flathub"; + } + + get description() { + return "Get it on Flathub"; + } +} export class WebsiteLink { constructor(url) { @@ -91,4 +108,4 @@ export class WebsiteLink { get description() { return `Download from ${new URL(this._url).hostname}`; } -} \ No newline at end of file +}