-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into feat/player-move-subtitles-up-when-co…
…ntrol-bar-is-shown
- Loading branch information
Showing
61 changed files
with
3,164 additions
and
15,495 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Build | |
on: | ||
push: | ||
branches: | ||
- '*' | ||
- '**' | ||
|
||
jobs: | ||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
// Copyright (C) 2017-2023 Smart code 203358507 | ||
|
||
const React = require('react'); | ||
const { useTranslation } = require('react-i18next'); | ||
const Button = require('stremio/common/Button'); | ||
const ModalDialog = require('stremio/common/ModalDialog'); | ||
const useEvents = require('./useEvents'); | ||
const styles = require('./styles'); | ||
const { default: Icon } = require('@stremio/stremio-icons/react'); | ||
|
||
const EventModal = () => { | ||
const { t } = useTranslation(); | ||
|
||
const { events, pullEvents, dismissEvent } = useEvents(); | ||
|
||
const modal = React.useMemo(() => { | ||
return events?.modal?.type === 'Ready' ? | ||
events.modal.content | ||
: | ||
null; | ||
}, [events]); | ||
|
||
const onClose = React.useCallback(() => { | ||
modal?.id && dismissEvent(modal.id); | ||
}, [modal]); | ||
|
||
React.useEffect(() => { | ||
pullEvents(); | ||
}, []); | ||
|
||
return ( | ||
modal !== null ? | ||
<ModalDialog className={styles['event-modal']} onCloseRequest={onClose}> | ||
{ | ||
modal.imageUrl ? | ||
<img className={styles['image']} src={modal.imageUrl} /> | ||
: | ||
null | ||
} | ||
<div className={styles['info-container']}> | ||
<div className={styles['title-container']}> | ||
{ | ||
modal.title ? | ||
<div className={styles['title']}>{modal.title}</div> | ||
: | ||
null | ||
} | ||
{ | ||
modal.message ? | ||
<div className={styles['label']}>{modal.message}</div> | ||
: | ||
null | ||
} | ||
</div> | ||
{ | ||
modal?.addon?.name ? | ||
<div className={styles['addon-container']}> | ||
<Icon className={styles['icon']} name={'addons'} /> | ||
<div className={styles['name']}> | ||
{ modal.addon.name } | ||
</div> | ||
</div> | ||
: | ||
null | ||
} | ||
{ | ||
modal?.addon?.manifestUrl ? | ||
<Button className={styles['action-button']} href={`#/addons?addon=${encodeURIComponent(modal.addon.manifestUrl)}`} onClick={onClose}> | ||
<div className={styles['button-label']}> | ||
{ t('INSTALL_ADDON') } | ||
</div> | ||
</Button> | ||
: | ||
modal.externalUrl ? | ||
<Button className={styles['action-button']} href={modal.externalUrl} target={'_blank'}> | ||
<div className={styles['button-label']}> | ||
{ t('LEARN_MORE') } | ||
</div> | ||
</Button> | ||
: | ||
null | ||
} | ||
</div> | ||
</ModalDialog> | ||
: | ||
null | ||
); | ||
}; | ||
|
||
module.exports = EventModal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Copyright (C) 2017-2023 Smart code 203358507 | ||
|
||
const EventModal = require('./EventModal'); | ||
|
||
module.exports = EventModal; |
Oops, something went wrong.