From 280fcee01cdcb1a98f9edd20e285d99103170768 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Fri, 5 Aug 2022 10:06:11 -0400 Subject: [PATCH] Run eslint fix --- src/components/ClientDetails.tsx | 47 +- src/components/PlatformIcon.tsx | 18 +- src/data/clients.ts | 755 ++++++++++++++++++------------- src/pages/clients.tsx | 52 ++- 4 files changed, 484 insertions(+), 388 deletions(-) diff --git a/src/components/ClientDetails.tsx b/src/components/ClientDetails.tsx index 034c817c..8aec4b41 100644 --- a/src/components/ClientDetails.tsx +++ b/src/components/ClientDetails.tsx @@ -7,33 +7,17 @@ import './ClientDetails.css'; const ClientTypeBadge = ({ clientType }: { clientType: ClientType }) => { if (clientType === ClientType.Official) { - return ( - - Official - - ); + return Official; } else if (clientType === ClientType.ThirdParty) { - return ( - - Third Party - - ); + return Third Party; } }; const LicenseTypeBadge = ({ licenseType }: { licenseType: LicenseType }) => { if (licenseType === LicenseType.OpenSource) { - return ( - - Open Source - - ); + return Open Source; } else if (licenseType === LicenseType.Proprietary) { - return ( - - Proprietary - - ); + return Proprietary; } }; @@ -49,35 +33,20 @@ const ClientDetails = ({ client }: { client: Client }) => (
{client.platforms.map((platform, index) => ( - + ))}
-
- {client.description} -
+
{client.description}
{client.secondaryLinks?.map(({ id, url, name }) => ( - + {name} ))}
{client.primaryLinks.map(({ id, url, name }) => ( - + {name} ))} diff --git a/src/components/PlatformIcon.tsx b/src/components/PlatformIcon.tsx index eed705f3..e04bcc8c 100644 --- a/src/components/PlatformIcon.tsx +++ b/src/components/PlatformIcon.tsx @@ -1,4 +1,14 @@ -import { Amazonfiretv, Android, Appletv, Discord, Ios, Kodi, Lg, Roku, Sailfishos } from '@icons-pack/react-simple-icons'; +import { + Amazonfiretv, + Android, + Appletv, + Discord, + Ios, + Kodi, + Lg, + Roku, + Sailfishos +} from '@icons-pack/react-simple-icons'; import clsx from 'clsx'; import React from 'react'; @@ -11,9 +21,9 @@ const PlatformIcon = ({ size, className = '' }: { - platform: Platform, - size: string | number, - className?: string + platform: Platform; + size: string | number; + className?: string; }) => { className = clsx(className, 'fill--white'); diff --git a/src/data/clients.ts b/src/data/clients.ts index e51dc096..2771b21e 100644 --- a/src/data/clients.ts +++ b/src/data/clients.ts @@ -30,23 +30,23 @@ export enum Platform { } type Link = { - id: string, - name: string, - url: string -} + id: string; + name: string; + url: string; +}; export type Client = { - id: string, - name: string, - description: string, - clientType: ClientType, - deviceTypes: Array, - licenseType: LicenseType, - platforms: Array, - primaryLinks: Array, - secondaryLinks?: Array, - recommended?: boolean -} + id: string; + name: string; + description: string; + clientType: ClientType; + deviceTypes: Array; + licenseType: LicenseType; + platforms: Array; + primaryLinks: Array; + secondaryLinks?: Array; + recommended?: boolean; +}; export const Clients: Array = [ { @@ -57,20 +57,25 @@ export const Clients: Array = [ deviceTypes: [DeviceType.Desktop], licenseType: LicenseType.OpenSource, platforms: [Platform.Desktop], - primaryLinks: [{ - id: 'flathub', - name: 'Flathub (Linux)', - url: 'https://flathub.org/apps/details/com.github.iwalton3.jellyfin-media-player' - }, { - id: 'gh-downloads', - name: 'GitHub Downloads', - url: 'https://github.com/jellyfin/jellyfin-media-player/releases' - }], - secondaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/jellyfin/jellyfin-media-player' - }], + primaryLinks: [ + { + id: 'flathub', + name: 'Flathub (Linux)', + url: 'https://flathub.org/apps/details/com.github.iwalton3.jellyfin-media-player' + }, + { + id: 'gh-downloads', + name: 'GitHub Downloads', + url: 'https://github.com/jellyfin/jellyfin-media-player/releases' + } + ], + secondaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/jellyfin/jellyfin-media-player' + } + ], recommended: true }, { @@ -81,20 +86,25 @@ export const Clients: Array = [ deviceTypes: [DeviceType.Desktop], licenseType: LicenseType.OpenSource, platforms: [Platform.Desktop], - primaryLinks: [{ - id: 'flathub', - name: 'Flathub (Linux)', - url: 'https://flathub.org/apps/details/com.github.iwalton3.jellyfin-mpv-shim' - }, { - id: 'gh-downloads', - name: 'GitHub Downloads', - url: 'https://github.com/jellyfin/jellyfin-mpv-shim/releases' - }], - secondaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/jellyfin/jellyfin-mpv-shim' - }] + primaryLinks: [ + { + id: 'flathub', + name: 'Flathub (Linux)', + url: 'https://flathub.org/apps/details/com.github.iwalton3.jellyfin-mpv-shim' + }, + { + id: 'gh-downloads', + name: 'GitHub Downloads', + url: 'https://github.com/jellyfin/jellyfin-mpv-shim/releases' + } + ], + secondaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/jellyfin/jellyfin-mpv-shim' + } + ] }, { id: 'jellyamp', @@ -104,16 +114,20 @@ export const Clients: Array = [ deviceTypes: [DeviceType.Desktop], licenseType: LicenseType.OpenSource, platforms: [Platform.Desktop], - primaryLinks: [{ - id: 'gh-downloads', - name: 'GitHub Downloads', - url: 'https://github.com/m0ngr31/jellyamp/releases' - }], - secondaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/m0ngr31/jellyamp' - }] + primaryLinks: [ + { + id: 'gh-downloads', + name: 'GitHub Downloads', + url: 'https://github.com/m0ngr31/jellyamp/releases' + } + ], + secondaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/m0ngr31/jellyamp' + } + ] }, { id: 'preserve', @@ -123,20 +137,25 @@ export const Clients: Array = [ deviceTypes: [DeviceType.Desktop], licenseType: LicenseType.OpenSource, platforms: [Platform.Browser, Platform.Desktop], - primaryLinks: [{ - id: 'browser', - name: 'Open in Browser', - url: 'https://preserveplayer.com/' - }, { - id: 'gl-downloads', - name: 'GitLab Downloads', - url: 'https://gitlab.com/tonyfinn/preserve/-/releases' - }], - secondaryLinks: [{ - id: 'gitlab', - name: 'GitLab', - url: 'https://gitlab.com/tonyfinn/preserve' - }] + primaryLinks: [ + { + id: 'browser', + name: 'Open in Browser', + url: 'https://preserveplayer.com/' + }, + { + id: 'gl-downloads', + name: 'GitLab Downloads', + url: 'https://gitlab.com/tonyfinn/preserve/-/releases' + } + ], + secondaryLinks: [ + { + id: 'gitlab', + name: 'GitLab', + url: 'https://gitlab.com/tonyfinn/preserve' + } + ] }, { id: 'sonixd', @@ -146,62 +165,77 @@ export const Clients: Array = [ deviceTypes: [DeviceType.Desktop], licenseType: LicenseType.OpenSource, platforms: [Platform.Desktop], - primaryLinks: [{ - id: 'install', - name: 'Installation Guide', - url: 'https://github.com/jeffvli/sonixd#install' - }], - secondaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/jeffvli/sonixd' - }] + primaryLinks: [ + { + id: 'install', + name: 'Installation Guide', + url: 'https://github.com/jeffvli/sonixd#install' + } + ], + secondaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/jeffvli/sonixd' + } + ] }, { id: 'tauon-music-box', name: 'Tauon Music Box', - description: 'A modern streamlined music player for desktop with a minimal interface that\'s packed with features!', + description: "A modern streamlined music player for desktop with a minimal interface that's packed with features!", clientType: ClientType.ThirdParty, deviceTypes: [DeviceType.Desktop], licenseType: LicenseType.OpenSource, platforms: [Platform.Desktop], - primaryLinks: [{ - id: 'flathub', - name: 'Flathub (Linux)', - url: 'https://flathub.org/apps/details/com.github.taiko2k.tauonmb' - }, { - id: 'install', - name: 'Installation Guide', - url: 'https://github.com/Taiko2k/TauonMusicBox#download-and-install-dizzy' - }], - secondaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/Taiko2k/TauonMusicBox' - }, { - id: 'tauon', - name: 'Website', - url: 'https://tauonmusicbox.rocks' - }] + primaryLinks: [ + { + id: 'flathub', + name: 'Flathub (Linux)', + url: 'https://flathub.org/apps/details/com.github.taiko2k.tauonmb' + }, + { + id: 'install', + name: 'Installation Guide', + url: 'https://github.com/Taiko2k/TauonMusicBox#download-and-install-dizzy' + } + ], + secondaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/Taiko2k/TauonMusicBox' + }, + { + id: 'tauon', + name: 'Website', + url: 'https://tauonmusicbox.rocks' + } + ] }, { id: 'jellycon', name: 'JellyCon', - description: 'A lightweight Kodi add-on that lets you browse and play media files directly from your Jellyfin server within the Kodi interface.', + description: + 'A lightweight Kodi add-on that lets you browse and play media files directly from your Jellyfin server within the Kodi interface.', clientType: ClientType.Official, deviceTypes: [DeviceType.Desktop, DeviceType.Mobile, DeviceType.TV], licenseType: LicenseType.OpenSource, platforms: [Platform.Kodi], - primaryLinks: [{ - id: 'install', - name: 'Installation Guide', - url: 'https://github.com/jellyfin/jellycon#installation' - }], - secondaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/jellyfin/jellycon' - }], + primaryLinks: [ + { + id: 'install', + name: 'Installation Guide', + url: 'https://github.com/jellyfin/jellycon#installation' + } + ], + secondaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/jellyfin/jellycon' + } + ], recommended: true }, { @@ -212,16 +246,20 @@ export const Clients: Array = [ deviceTypes: [DeviceType.Desktop, DeviceType.Mobile, DeviceType.TV], licenseType: LicenseType.OpenSource, platforms: [Platform.Kodi], - primaryLinks: [{ - id: 'install', - name: 'Installation Guide', - url: 'https://docs.jellyfin.org/general/clients/kodi.html' - }], - secondaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/jellyfin/jellyfin-kodi' - }] + primaryLinks: [ + { + id: 'install', + name: 'Installation Guide', + url: 'https://docs.jellyfin.org/general/clients/kodi.html' + } + ], + secondaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/jellyfin/jellyfin-kodi' + } + ] }, { id: 'jellyfin-android', @@ -231,24 +269,30 @@ export const Clients: Array = [ deviceTypes: [DeviceType.Mobile], licenseType: LicenseType.OpenSource, platforms: [Platform.Android], - primaryLinks: [{ - id: 'fdroid', - name: 'F-Droid', - url: 'https://f-droid.org/en/packages/org.jellyfin.mobile/' - }, { - id: 'amazon-store', - name: 'Amazon Appstore', - url: 'https://www.amazon.com/gp/aw/d/B081RFTTQ9' - }, { - id: 'play-store', - name: 'Play Store', - url: 'https://play.google.com/store/apps/details?id=org.jellyfin.mobile' - }], - secondaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/jellyfin/jellyfin-android' - }], + primaryLinks: [ + { + id: 'fdroid', + name: 'F-Droid', + url: 'https://f-droid.org/en/packages/org.jellyfin.mobile/' + }, + { + id: 'amazon-store', + name: 'Amazon Appstore', + url: 'https://www.amazon.com/gp/aw/d/B081RFTTQ9' + }, + { + id: 'play-store', + name: 'Play Store', + url: 'https://play.google.com/store/apps/details?id=org.jellyfin.mobile' + } + ], + secondaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/jellyfin/jellyfin-android' + } + ], recommended: true }, { @@ -259,63 +303,79 @@ export const Clients: Array = [ deviceTypes: [DeviceType.Mobile], licenseType: LicenseType.OpenSource, platforms: [Platform.IOS], - primaryLinks: [{ - id: 'apple-store', - name: 'App Store', - url: 'https://apps.apple.com/us/app/jellyfin-mobile/id1480192618?mt=8' - }], - secondaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/jellyfin/jellyfin-expo' - }], + primaryLinks: [ + { + id: 'apple-store', + name: 'App Store', + url: 'https://apps.apple.com/us/app/jellyfin-mobile/id1480192618?mt=8' + } + ], + secondaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/jellyfin/jellyfin-expo' + } + ], recommended: true }, { id: 'findroid', name: 'Findroid', - description: 'A third-party Android application for Jellyfin that provides a native user interface to browse and play movies and series.', + description: + 'A third-party Android application for Jellyfin that provides a native user interface to browse and play movies and series.', clientType: ClientType.ThirdParty, deviceTypes: [DeviceType.Mobile], licenseType: LicenseType.OpenSource, platforms: [Platform.Android], - primaryLinks: [{ - id: 'izzy-fdroid', - name: 'IzzyOnDroid', - url: 'https://apt.izzysoft.de/fdroid/index/apk/dev.jdtech.jellyfin' - }, { - id: 'play-store', - name: 'Play Store', - url: 'https://play.google.com/store/apps/details?id=dev.jdtech.jellyfin' - }], - secondaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/jarnedemeulemeester/findroid' - }] + primaryLinks: [ + { + id: 'izzy-fdroid', + name: 'IzzyOnDroid', + url: 'https://apt.izzysoft.de/fdroid/index/apk/dev.jdtech.jellyfin' + }, + { + id: 'play-store', + name: 'Play Store', + url: 'https://play.google.com/store/apps/details?id=dev.jdtech.jellyfin' + } + ], + secondaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/jarnedemeulemeester/findroid' + } + ] }, { id: 'gelli', name: 'Gelli', - description: 'A native music player for Android devices with transcoding support, gapless playback, favorites, playlists, and many other features.', + description: + 'A native music player for Android devices with transcoding support, gapless playback, favorites, playlists, and many other features.', clientType: ClientType.ThirdParty, deviceTypes: [DeviceType.Mobile], licenseType: LicenseType.OpenSource, platforms: [Platform.Android], - primaryLinks: [{ - id: 'gh-downloads', - name: 'GitHub Downloads', - url: 'https://github.com/dkanada/gelli/releases' - }, { - id: 'fdroid', - name: 'F-Droid', - url: 'https://f-droid.org/packages/com.dkanada.gramophone/' - }], - secondaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/dkanada/gelli' - }] + primaryLinks: [ + { + id: 'gh-downloads', + name: 'GitHub Downloads', + url: 'https://github.com/dkanada/gelli/releases' + }, + { + id: 'fdroid', + name: 'F-Droid', + url: 'https://f-droid.org/packages/com.dkanada.gramophone/' + } + ], + secondaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/dkanada/gelli' + } + ] }, { id: 'finamp', @@ -325,24 +385,30 @@ export const Clients: Array = [ deviceTypes: [DeviceType.Mobile], licenseType: LicenseType.OpenSource, platforms: [Platform.Android, Platform.IOS], - primaryLinks: [{ - id: 'fdroid', - name: 'F-Droid', - url: 'https://f-droid.org/packages/com.unicornsonlsd.finamp/' - }, { - id: 'play-store', - name: 'Play Store', - url: 'https://play.google.com/store/apps/details?id=com.unicornsonlsd.finamp' - }, { - id: 'app-store', - name: 'App Store', - url: 'https://apps.apple.com/us/app/finamp/id1574922594' - }], - secondaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/UnicornsOnLSD/finamp' - }] + primaryLinks: [ + { + id: 'fdroid', + name: 'F-Droid', + url: 'https://f-droid.org/packages/com.unicornsonlsd.finamp/' + }, + { + id: 'play-store', + name: 'Play Store', + url: 'https://play.google.com/store/apps/details?id=com.unicornsonlsd.finamp' + }, + { + id: 'app-store', + name: 'App Store', + url: 'https://apps.apple.com/us/app/finamp/id1574922594' + } + ], + secondaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/UnicornsOnLSD/finamp' + } + ] }, { id: 'sailfin', @@ -352,16 +418,20 @@ export const Clients: Array = [ deviceTypes: [DeviceType.Mobile], licenseType: LicenseType.OpenSource, platforms: [Platform.SailfishOS], - primaryLinks: [{ - id: 'open-repos', - name: 'OpenRepos', - url: 'https://openrepos.net/content/ahappyhuman/sailfin' - }], - secondaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/heartfin/harbour-sailfin' - }] + primaryLinks: [ + { + id: 'open-repos', + name: 'OpenRepos', + url: 'https://openrepos.net/content/ahappyhuman/sailfin' + } + ], + secondaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/heartfin/harbour-sailfin' + } + ] }, { id: 'yatse', @@ -371,16 +441,20 @@ export const Clients: Array = [ deviceTypes: [DeviceType.Mobile], licenseType: LicenseType.Proprietary, platforms: [Platform.Android], - primaryLinks: [{ - id: 'play-store', - name: 'Play Store', - url: 'https://play.google.com/store/apps/details?id=org.leetzone.android.yatsewidgetfree' - }], - secondaryLinks: [{ - id: 'yatse', - name: 'Website', - url: 'https://yatse.tv/' - }] + primaryLinks: [ + { + id: 'play-store', + name: 'Play Store', + url: 'https://play.google.com/store/apps/details?id=org.leetzone.android.yatsewidgetfree' + } + ], + secondaryLinks: [ + { + id: 'yatse', + name: 'Website', + url: 'https://yatse.tv/' + } + ] }, { id: 'jellyfin-androidtv', @@ -390,20 +464,25 @@ export const Clients: Array = [ deviceTypes: [DeviceType.TV], licenseType: LicenseType.OpenSource, platforms: [Platform.AndroidTV, Platform.FireOS], - primaryLinks: [{ - id: 'amazon-store', - name: 'Amazon Appstore', - url: 'https://www.amazon.com/gp/aw/d/B07TX7Z725' - }, { - id: 'play-store', - name: 'Play Store', - url: 'https://play.google.com/store/apps/details?id=org.jellyfin.androidtv' - }], - secondaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/jellyfin/jellyfin-androidtv' - }], + primaryLinks: [ + { + id: 'amazon-store', + name: 'Amazon Appstore', + url: 'https://www.amazon.com/gp/aw/d/B07TX7Z725' + }, + { + id: 'play-store', + name: 'Play Store', + url: 'https://play.google.com/store/apps/details?id=org.jellyfin.androidtv' + } + ], + secondaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/jellyfin/jellyfin-androidtv' + } + ], recommended: true }, { @@ -414,16 +493,20 @@ export const Clients: Array = [ deviceTypes: [DeviceType.TV], licenseType: LicenseType.OpenSource, platforms: [Platform.Roku], - primaryLinks: [{ - id: 'roku-store', - name: 'Channel Store', - url: 'https://channelstore.roku.com/details/592369/jellyfin' - }], - secondaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/jellyfin/jellyfin-roku' - }], + primaryLinks: [ + { + id: 'roku-store', + name: 'Channel Store', + url: 'https://channelstore.roku.com/details/592369/jellyfin' + } + ], + secondaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/jellyfin/jellyfin-roku' + } + ], recommended: true }, { @@ -434,20 +517,25 @@ export const Clients: Array = [ deviceTypes: [DeviceType.TV], licenseType: LicenseType.OpenSource, platforms: [Platform.WebOS], - primaryLinks: [{ - id: 'jf-blog', - name: 'Older webOS Versions', - url: '/posts/webos-july2022' - }, { - id: 'lg-store', - name: 'Content Store - webOS 6+', - url: 'https://us.lgappstv.com/main/tvapp/detail?appId=1030579' - }], - secondaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/jellyfin/jellyfin-webos' - }], + primaryLinks: [ + { + id: 'jf-blog', + name: 'Older webOS Versions', + url: '/posts/webos-july2022' + }, + { + id: 'lg-store', + name: 'Content Store - webOS 6+', + url: 'https://us.lgappstv.com/main/tvapp/detail?appId=1030579' + } + ], + secondaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/jellyfin/jellyfin-webos' + } + ], recommended: true }, { @@ -458,16 +546,20 @@ export const Clients: Array = [ deviceTypes: [DeviceType.Mobile, DeviceType.TV], licenseType: LicenseType.Proprietary, platforms: [Platform.IOS, Platform.TVOS], - primaryLinks: [{ - id: 'apple-store', - name: 'App Store', - url: 'https://apps.apple.com/app/id1136220934?mt=8' - }], - secondaryLinks: [{ - id: 'website', - name: 'Website', - url: 'https://firecore.com/infuse' - }], + primaryLinks: [ + { + id: 'apple-store', + name: 'App Store', + url: 'https://apps.apple.com/app/id1136220934?mt=8' + } + ], + secondaryLinks: [ + { + id: 'website', + name: 'Website', + url: 'https://firecore.com/infuse' + } + ], recommended: true }, { @@ -478,16 +570,20 @@ export const Clients: Array = [ deviceTypes: [], licenseType: LicenseType.OpenSource, platforms: [], - primaryLinks: [{ - id: 'install', - name: 'Installation Guide', - url: 'https://jellyfin.org/docs/general/clients/mopidy.html' - }], - secondaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/jellyfin/mopidy-jellyfin' - }] + primaryLinks: [ + { + id: 'install', + name: 'Installation Guide', + url: 'https://jellyfin.org/docs/general/clients/mopidy.html' + } + ], + secondaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/jellyfin/mopidy-jellyfin' + } + ] }, { id: 'volumio', @@ -497,11 +593,13 @@ export const Clients: Array = [ deviceTypes: [], licenseType: LicenseType.OpenSource, platforms: [], - primaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/patrickkfkan/volumio-jellyfin' - }] + primaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/patrickkfkan/volumio-jellyfin' + } + ] }, { id: 'discord-music', @@ -511,16 +609,20 @@ export const Clients: Array = [ deviceTypes: [], licenseType: LicenseType.OpenSource, platforms: [Platform.Discord], - primaryLinks: [{ - id: 'install', - name: 'Installation Guide', - url: 'https://github.com/kgt1/jellyfin-discord-music-bot#getting-started' - }], - secondaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/kgt1/jellyfin-discord-music-bot' - }] + primaryLinks: [ + { + id: 'install', + name: 'Installation Guide', + url: 'https://github.com/kgt1/jellyfin-discord-music-bot#getting-started' + } + ], + secondaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/kgt1/jellyfin-discord-music-bot' + } + ] }, { id: 'jellycli', @@ -530,16 +632,20 @@ export const Clients: Array = [ deviceTypes: [], licenseType: LicenseType.OpenSource, platforms: [], - primaryLinks: [{ - id: 'gh-downloads', - name: 'GitHub Downloads', - url: 'https://github.com/tryffel/jellycli/releases' - }], - secondaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/tryffel/jellycli' - }] + primaryLinks: [ + { + id: 'gh-downloads', + name: 'GitHub Downloads', + url: 'https://github.com/tryffel/jellycli/releases' + } + ], + secondaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/tryffel/jellycli' + } + ] }, { id: 'jftui', @@ -549,16 +655,20 @@ export const Clients: Array = [ deviceTypes: [], licenseType: LicenseType.OpenSource, platforms: [], - primaryLinks: [{ - id: 'install', - name: 'Installation Guide', - url: 'https://github.com/Aanok/jftui#installation' - }], - secondaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/Aanok/jftui' - }] + primaryLinks: [ + { + id: 'install', + name: 'Installation Guide', + url: 'https://github.com/Aanok/jftui#installation' + } + ], + secondaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/Aanok/jftui' + } + ] }, { id: 'web-scrobbler', @@ -568,19 +678,24 @@ export const Clients: Array = [ deviceTypes: [], licenseType: LicenseType.OpenSource, platforms: [Platform.Browser], - primaryLinks: [{ - id: 'install', - name: 'Installation Guide', - url: 'https://github.com/web-scrobbler/web-scrobbler#installation' - }], - secondaryLinks: [{ - id: 'github', - name: 'GitHub', - url: 'https://github.com/web-scrobbler/web-scrobbler' - }, { - id: 'website', - name: 'Website', - url: 'https://web-scrobbler.com' - }] + primaryLinks: [ + { + id: 'install', + name: 'Installation Guide', + url: 'https://github.com/web-scrobbler/web-scrobbler#installation' + } + ], + secondaryLinks: [ + { + id: 'github', + name: 'GitHub', + url: 'https://github.com/web-scrobbler/web-scrobbler' + }, + { + id: 'website', + name: 'Website', + url: 'https://web-scrobbler.com' + } + ] } ]; diff --git a/src/pages/clients.tsx b/src/pages/clients.tsx index ee05323e..1530f246 100644 --- a/src/pages/clients.tsx +++ b/src/pages/clients.tsx @@ -6,10 +6,10 @@ import ClientDetails from '../components/ClientDetails'; import { Clients, DeviceType, Platform } from '../data/clients'; type ClientFilter = { - recommended: boolean, - deviceType?: DeviceType, - platform?: Platform -} + recommended: boolean; + deviceType?: DeviceType; + platform?: Platform; +}; export default function Plugins() { const [filter, setFilter] = useState({ @@ -28,8 +28,10 @@ export default function Plugins() { role='button' tabIndex={0} className={clsx('pills__item', { 'pills__item--active': filter.recommended })} - onClick={() => { setFilter({ ...filter, recommended: true }); }} - onKeyUp={keyEvent => { + onClick={() => { + setFilter({ ...filter, recommended: true }); + }} + onKeyUp={(keyEvent) => { if (keyEvent.key === 'Enter') { setFilter({ ...filter, recommended: true }); } @@ -42,8 +44,10 @@ export default function Plugins() { role='button' tabIndex={0} className={clsx('pills__item', { 'pills__item--active': !filter.recommended })} - onClick={() => { setFilter({ ...filter, recommended: false }); }} - onKeyUp={keyEvent => { + onClick={() => { + setFilter({ ...filter, recommended: false }); + }} + onKeyUp={(keyEvent) => { if (keyEvent.key === 'Enter') { setFilter({ ...filter, recommended: false }); } @@ -53,27 +57,25 @@ export default function Plugins() { - { - Clients.filter(client => { - let result = true; + {Clients.filter((client) => { + let result = true; - if (filter.recommended) { - result = result && !!client.recommended; - } + if (filter.recommended) { + result = result && !!client.recommended; + } - if (typeof filter.deviceType !== 'undefined') { - result = result && client.deviceTypes.includes(filter.deviceType); - } + if (typeof filter.deviceType !== 'undefined') { + result = result && client.deviceTypes.includes(filter.deviceType); + } - if (typeof filter.platform !== 'undefined') { - result = result && client.platforms.includes(filter.platform); - } + if (typeof filter.platform !== 'undefined') { + result = result && client.platforms.includes(filter.platform); + } - return result; - }).map(client => ( - - )) - } + return result; + }).map((client) => ( + + ))}