mirror of
https://github.com/recloudstream/website.git
synced 2024-08-15 03:18:45 +00:00
use window.RepoApi when avaliable
This commit is contained in:
parent
bd6d994c6c
commit
8d257ca73d
1 changed files with 8 additions and 3 deletions
|
@ -29,8 +29,13 @@ const RepoCard = ({ url, isFirst }) => {
|
|||
autoFocus={isFirst}
|
||||
group={true}
|
||||
className="btn-primary"
|
||||
href={`cloudstreamrepo://${url.replace(/^https?:\/\//, "")}`}
|
||||
target="_blank"
|
||||
onClick={() => {
|
||||
if (window.RepoApi !== undefined) {
|
||||
window.RepoApi.installRepo(url)
|
||||
} else {
|
||||
window.open(`cloudstreamrepo://${url.replace(/^https?:\/\//, "")}`)
|
||||
}
|
||||
}}
|
||||
>Install</CompatBtn>
|
||||
<CompatBtn group={true}
|
||||
onClick={() => {
|
||||
|
|
Loading…
Reference in a new issue