diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a2b8f73..749a3a8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,12 +29,14 @@ Missing/outdated strings: * `optionsMirroringCategoryDescription` * `optionsMirroringEnabled` * `optionsMirroringAppId` + * `popupMediaTypeAppNotFound` * `es` * `optionsMirroringCategoryName` * `optionsMirroringCategoryDescription` * `optionsMirroringEnabled` * `optionsMirroringAppId` + & `popupMediaTypeAppNotFound` * `nl` * `optionsBridgeBackupEnabled` @@ -45,6 +47,7 @@ Missing/outdated strings: * `optionsMirroringCategoryDescription` * `optionsMirroringEnabled` * `optionsMirroringAppId` + * `popupMediaTypeAppNotFound` ### NSIS Installer Localization diff --git a/ext/src/_locales/en/messages.json b/ext/src/_locales/en/messages.json index 3cccfc8..e1f8410 100755 --- a/ext/src/_locales/en/messages.json +++ b/ext/src/_locales/en/messages.json @@ -13,6 +13,10 @@ "message": "this site's app" , "description": "Receiver selector media type text for current site's sender application." } + , "popupMediaTypeAppNotFound": { + "message": "this site's app (not found)" + , "description": "Receiver selector media type text for current site's sender application if none found." + } , "popupMediaTypeAppMedia": { "message": "this media" , "description": "Receiver selector media type text for media casting." diff --git a/ext/src/ui/popup/index.tsx b/ext/src/ui/popup/index.tsx index 062b684..33fdd0a 100755 --- a/ext/src/ui/popup/index.tsx +++ b/ext/src/ui/popup/index.tsx @@ -149,6 +149,8 @@ class PopupApp extends Component<{}, PopupAppState> { const isSelectedMediaTypeAvailable = !!(this.state.availableMediaTypes & this.state.mediaType) + const isAppMediaTypeAvailable = !!(this.state.availableMediaTypes + & ReceiverSelectorMediaType.App); return ( @@ -163,10 +165,11 @@ class PopupApp extends Component<{}, PopupAppState> { + disabled={ !isAppMediaTypeAvailable }> { (this.state.requestedAppId && knownApps[this.state.requestedAppId]?.name) - ?? _("popupMediaTypeApp") } + ?? isAppMediaTypeAvailable + ? _("popupMediaTypeApp") + : _("popupMediaTypeAppNotFound") } { this.state.mirroringEnabled &&