Merge pull request #239 from aaronraimist/install-links

Add new install links for Quaternion, Nheko, and FluffyChat
This commit is contained in:
Thibault Martin 2022-05-19 09:43:34 +02:00 committed by GitHub
commit eefb744467
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 9 deletions

View File

@ -11,7 +11,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import { Maturity, Platform, LinkKind, FlathubLink, AppleStoreLink, PlayStoreLink, WebsiteLink } from "../types.js"; import { Maturity, Platform, LinkKind, FlathubLink, AppleStoreLink, PlayStoreLink, FDroidLink, WebsiteLink } from "../types.js";
/** /**
* Information on how to deep link to a given matrix client. * Information on how to deep link to a given matrix client.
@ -44,8 +44,14 @@ export class Fluffychat {
getInstallLinks(platform) { getInstallLinks(platform) {
switch (platform) { switch (platform) {
case Platform.iOS: return [new AppleStoreLink("fluffychat", "id1551469600")]; case Platform.iOS: return [new AppleStoreLink("fluffychat", "id1551469600")];
case Platform.Android: return [new PlayStoreLink("chat.fluffy.fluffychat")]; case Platform.Android: return [
case Platform.Linux: return [new FlathubLink("im.fluffychat.Fluffychat")]; new PlayStoreLink("chat.fluffy.fluffychat"),
new FDroidLink('chat.fluffy.fluffychat'),
];
case Platform.Linux: return [
new FlathubLink("im.fluffychat.Fluffychat"),
new WebsiteLink("https://fluffychat.im"),
];
default: return [new WebsiteLink("https://fluffychat.im")]; default: return [new WebsiteLink("https://fluffychat.im")];
} }
} }

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import {Maturity, Platform, LinkKind, FlathubLink, style} from "../types.js"; import {Maturity, Platform, LinkKind, FlathubLink, WebsiteLink, style} from "../types.js";
/** /**
* Information on how to deep link to a given matrix client. * Information on how to deep link to a given matrix client.
@ -72,8 +72,12 @@ export class Nheko {
} }
getInstallLinks(platform) { getInstallLinks(platform) {
if (platform === Platform.Linux) { switch (platform) {
return [new FlathubLink("io.github.NhekoReborn.Nheko")]; case Platform.Linux: return [
new FlathubLink("io.github.NhekoReborn.Nheko"),
new WebsiteLink("https://github.com/Nheko-Reborn/nheko/releases/latest"),
];
default: return [new WebsiteLink("https://github.com/Nheko-Reborn/nheko/releases/latest")];
} }
} }

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import {Maturity, Platform, LinkKind, FlathubLink, style} from "../types.js"; import {Maturity, Platform, LinkKind, FlathubLink, WebsiteLink, style} from "../types.js";
export class Quaternion { export class Quaternion {
get id() { return "quaternion"; } get id() { return "quaternion"; }
@ -43,8 +43,12 @@ export class Quaternion {
} }
getInstallLinks(platform) { getInstallLinks(platform) {
if (platform === Platform.Linux) { switch (platform) {
return [new FlathubLink("com.github.quaternion")]; case Platform.Linux: return [
new FlathubLink("com.github.quaternion"),
new WebsiteLink("https://github.com/quotient-im/Quaternion/releases/latest"),
];
default: return [new WebsiteLink("https://github.com/quotient-im/Quaternion/releases/latest")];
} }
} }