From 0003cf9873f39bb8fd0091336ac077bd0ae2aaf5 Mon Sep 17 00:00:00 2001 From: 3nt3 Date: Wed, 12 Oct 2022 20:04:33 +0200 Subject: [PATCH 1/4] Add the Cinny client Signed-off-by: 3nt3 --- images/client-icons/cinny.svg | 19 ++++++++ src/open/clients/cinny.js | 91 +++++++++++++++++++++++++++++++++++ src/open/clients/index.js | 22 +++++---- 3 files changed, 122 insertions(+), 10 deletions(-) create mode 100644 images/client-icons/cinny.svg create mode 100644 src/open/clients/cinny.js diff --git a/images/client-icons/cinny.svg b/images/client-icons/cinny.svg new file mode 100644 index 00000000..8701d67b --- /dev/null +++ b/images/client-icons/cinny.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/open/clients/cinny.js b/src/open/clients/cinny.js new file mode 100644 index 00000000..8e7dac3a --- /dev/null +++ b/src/open/clients/cinny.js @@ -0,0 +1,91 @@ +/* +Copyright 2020 The Matrix.org Foundation C.I.C. +Copyright 2022 3nt3 + +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, style } from "../types.js"; + +export class Cinny { + get id() { + return "cinny"; + } + get name() { + return "Cinny"; + } + get icon() { + return "images/client-icons/cinny.svg"; + } + get author() { + return "???"; + } + get homepage() { + return "https://cinny.in"; + } + get platforms() { + return [ + Platform.DesktopWeb, + Platform.Linux, + Platform.macOS, + Platform.Windows, + ]; + } + get description() { + return "A Matrix client focusing primarily on simple, elegant and secure interface. The main goal is to have an instant messaging application that is easy on people and has a modern touch."; + } + getMaturity(platform) { + return Maturity.Beta; + } + getDeepLink(platform, link) { + // cinny doesn't support deep links (?) + return; + } + canInterceptMatrixToLinks(platform) { + return false; + } + + getLinkInstructions(platform, link) { + switch (platform.kind) { + case Platform.DesktopWeb: + return [ + "Go to https://app.cinny.in", + "Click on '+' in the top left corner and paste the " + + (link.kind === LinkKind.User + ? "username" + : "identifier"), + ]; + default: + return [ + "Click on '+' in the top left corner and paste the " + + (link.kind === LinkKind.User + ? "username" + : "identifier"), + ]; + } + } + + getCopyString(platform, link) { + return link.identifier; + switch (link.kind) { + case LinkKind.User: + return `/invite ${link.identifier}`; + case LinkKind.Room: + return `/join ${link.identifier}`; + } + } + + getInstallLinks(platform) {} + + getPreferredWebInstance(link) {} +} diff --git a/src/open/clients/index.js b/src/open/clients/index.js index 5508c00f..a07c57b9 100644 --- a/src/open/clients/index.js +++ b/src/open/clients/index.js @@ -14,16 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */ -import {Element} from "./Element.js"; -import {Weechat} from "./Weechat.js"; -import {Nheko} from "./Nheko.js"; -import {Fractal} from "./Fractal.js"; -import {Quaternion} from "./Quaternion.js"; -import {Tensor} from "./Tensor.js"; -import {Fluffychat} from "./Fluffychat.js"; -import {NeoChat} from "./NeoChat.js"; -import {Syphon} from "./Syphon.js"; -import {Thunderbird} from "./Thunderbird.js"; +import { Element } from "./Element.js"; +import { Weechat } from "./Weechat.js"; +import { Nheko } from "./Nheko.js"; +import { Fractal } from "./Fractal.js"; +import { Quaternion } from "./Quaternion.js"; +import { Tensor } from "./Tensor.js"; +import { Fluffychat } from "./Fluffychat.js"; +import { NeoChat } from "./NeoChat.js"; +import { Syphon } from "./Syphon.js"; +import { Thunderbird } from "./Thunderbird.js"; +import { Cinny } from "./cinny.js"; export function createClients() { return [ @@ -37,5 +38,6 @@ export function createClients() { new NeoChat(), new Syphon(), new Thunderbird(), + new Cinny(), ]; } From 6f4c319486148c1b6969d824e6865702b6c27f3d Mon Sep 17 00:00:00 2001 From: 3nt3 Date: Fri, 14 Oct 2022 16:21:11 +0200 Subject: [PATCH 2/4] Implement suggested edits by thibaultamartin Signed-off-by: 3nt3 --- src/open/clients/{cinny.js => Cinny.js} | 40 +++++++------------------ src/open/clients/index.js | 22 +++++++------- 2 files changed, 22 insertions(+), 40 deletions(-) rename src/open/clients/{cinny.js => Cinny.js} (61%) diff --git a/src/open/clients/cinny.js b/src/open/clients/Cinny.js similarity index 61% rename from src/open/clients/cinny.js rename to src/open/clients/Cinny.js index 8e7dac3a..754474ed 100644 --- a/src/open/clients/cinny.js +++ b/src/open/clients/Cinny.js @@ -28,7 +28,7 @@ export class Cinny { return "images/client-icons/cinny.svg"; } get author() { - return "???"; + return "Copyright (c) 2021-present Ajay Bura (ajbura) and cinny contributors"; } get homepage() { return "https://cinny.in"; @@ -45,44 +45,26 @@ export class Cinny { return "A Matrix client focusing primarily on simple, elegant and secure interface. The main goal is to have an instant messaging application that is easy on people and has a modern touch."; } getMaturity(platform) { - return Maturity.Beta; - } - getDeepLink(platform, link) { - // cinny doesn't support deep links (?) - return; + return Maturity.Stable; } + + // cinny doesn't support deep links yet + getDeepLink(platform, link) {} + canInterceptMatrixToLinks(platform) { return false; } getLinkInstructions(platform, link) { - switch (platform.kind) { - case Platform.DesktopWeb: - return [ - "Go to https://app.cinny.in", - "Click on '+' in the top left corner and paste the " + - (link.kind === LinkKind.User - ? "username" - : "identifier"), - ]; - default: - return [ - "Click on '+' in the top left corner and paste the " + - (link.kind === LinkKind.User - ? "username" - : "identifier"), - ]; - } + return [ + "Click on '+' in the top left corner and paste the ", + style.code(`${link.identifier} `), + link.kind === LinkKind.User ? "username" : "identifier", + ]; } getCopyString(platform, link) { return link.identifier; - switch (link.kind) { - case LinkKind.User: - return `/invite ${link.identifier}`; - case LinkKind.Room: - return `/join ${link.identifier}`; - } } getInstallLinks(platform) {} diff --git a/src/open/clients/index.js b/src/open/clients/index.js index a07c57b9..f4b77483 100644 --- a/src/open/clients/index.js +++ b/src/open/clients/index.js @@ -14,17 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { Element } from "./Element.js"; -import { Weechat } from "./Weechat.js"; -import { Nheko } from "./Nheko.js"; -import { Fractal } from "./Fractal.js"; -import { Quaternion } from "./Quaternion.js"; -import { Tensor } from "./Tensor.js"; -import { Fluffychat } from "./Fluffychat.js"; -import { NeoChat } from "./NeoChat.js"; -import { Syphon } from "./Syphon.js"; -import { Thunderbird } from "./Thunderbird.js"; -import { Cinny } from "./cinny.js"; +import {Element} from "./Element.js"; +import {Weechat} from "./Weechat.js"; +import {Nheko} from "./Nheko.js"; +import {Fractal} from "./Fractal.js"; +import {Quaternion} from "./Quaternion.js"; +import {Tensor} from "./Tensor.js"; +import {Fluffychat} from "./Fluffychat.js"; +import {NeoChat} from "./NeoChat.js"; +import {Syphon} from "./Syphon.js"; +import {Thunderbird} from "./Thunderbird.js"; +import {Cinny} from "./Cinny.js" export function createClients() { return [ From 2927e8da7b75ae0b574a7a64f62f36be526131b3 Mon Sep 17 00:00:00 2001 From: 3nt3 Date: Fri, 14 Oct 2022 18:11:21 +0200 Subject: [PATCH 3/4] fix instructions Signed-off-by: 3nt3 --- src/open/clients/Cinny.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/open/clients/Cinny.js b/src/open/clients/Cinny.js index 754474ed..520474a3 100644 --- a/src/open/clients/Cinny.js +++ b/src/open/clients/Cinny.js @@ -57,7 +57,7 @@ export class Cinny { getLinkInstructions(platform, link) { return [ - "Click on '+' in the top left corner and paste the ", + "Click on '+' in the top left corner, then 'Join with address' and paste the ", style.code(`${link.identifier} `), link.kind === LinkKind.User ? "username" : "identifier", ]; From 008bc0d3c1478852c9b6319e11c260fcf189d93b Mon Sep 17 00:00:00 2001 From: 3nt3 Date: Sun, 30 Oct 2022 17:08:40 +0100 Subject: [PATCH 4/4] address things brought up in PR Signed-off-by: 3nt3 --- src/open/clients/Cinny.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/open/clients/Cinny.js b/src/open/clients/Cinny.js index 520474a3..67702759 100644 --- a/src/open/clients/Cinny.js +++ b/src/open/clients/Cinny.js @@ -28,7 +28,7 @@ export class Cinny { return "images/client-icons/cinny.svg"; } get author() { - return "Copyright (c) 2021-present Ajay Bura (ajbura) and cinny contributors"; + return "Copyright (c) 2021-present Ajay Bura (ajbura) and contributors"; } get homepage() { return "https://cinny.in"; @@ -57,7 +57,7 @@ export class Cinny { getLinkInstructions(platform, link) { return [ - "Click on '+' in the top left corner, then 'Join with address' and paste the ", + "While in Home, Click on '+' in the top left corner, then 'Join with address' and paste the ", style.code(`${link.identifier} `), link.kind === LinkKind.User ? "username" : "identifier", ];