diff --git a/www/data/images/icons.svg b/www/data/images/icons.svg index 669afb0..67ad55a 100644 --- a/www/data/images/icons.svg +++ b/www/data/images/icons.svg @@ -1,4 +1,7 @@ + + + @@ -18,4 +21,9 @@ + + + + + \ No newline at end of file diff --git a/www/internals/modules/programs.php b/www/internals/modules/programs.php index f28d707..ed01303 100644 --- a/www/internals/modules/programs.php +++ b/www/internals/modules/programs.php @@ -15,6 +15,14 @@ class Programs implements IWebsiteModule 'windowsstore', 'itunesstore', + 'docker', + + 'aur-bin', + 'aur-git', + 'homebrew', + 'homebrew-tap', + 'chocolatey', + 'homepage', 'wiki', 'alternativeto', @@ -138,6 +146,7 @@ class Programs implements IWebsiteModule $css = '?'; $svg = '?'; $direct = false; + $alert = null; if ($type === 'download') { $caption = 'Download'; $css = 'prgv_dl_download'; $svg = 'download'; } if ($type === 'github') { $caption = 'Github'; $css = 'prgv_dl_github'; $svg = 'github'; } @@ -151,6 +160,13 @@ class Programs implements IWebsiteModule if ($type === 'alternativeto') { $caption = 'AlternativeTo'; $css = 'prgv_dl_alternativeto'; $svg = 'alternativeto'; } if ($type === 'changelog') { $caption = 'Changelog'; $css = 'prgv_dl_changelog'; $svg = 'changelog'; } + if ($type === 'docker') { $caption = 'Docker'; $css = 'prgv_dl_docker'; $svg = 'docker'; } + if ($type === 'aur-bin') { $caption = 'AUR (bin)'; $css = 'prgv_dl_aur_bin'; $svg = 'arch'; } + if ($type === 'aur-git') { $caption = 'AUR (git)'; $css = 'prgv_dl_aur_git'; $svg = 'arch'; } + if ($type === 'homebrew') { $caption = 'Homebrew'; $css = 'prgv_dl_homebrew'; $svg = 'homebrew'; } + if ($type === 'homebrew-tap') { $caption = 'Homebrew'; $css = 'prgv_dl_homebrew'; $svg = 'homebrew'; } + if ($type === 'chocolatey') { $caption = 'Chocolatey'; $css = 'prgv_dl_chocolatey'; $svg = 'chocolatey'; } + if (is_array($urldata)) { $url = $urldata['url']; @@ -169,6 +185,12 @@ class Programs implements IWebsiteModule $url = Programs::getDirectDownloadURL($prog); } + if ($type === 'homebrew-tap') + { + $alert = $url; + $url = ''; + } + $result []= [ 'type' => $type, @@ -177,6 +199,7 @@ class Programs implements IWebsiteModule 'href' => $url, 'css' => $css, 'isdirect' => $direct, + 'alert' => $alert, ]; } @@ -238,7 +261,7 @@ class Programs implements IWebsiteModule if ($xurl['type']==='download' && $xurl['isdirect'] && !file_exists($this->getDirectDownloadPath($prog))) return ['result'=>'err', 'message' => 'Direct download not found ' . $prog['name']]; - if ($xurl['type']==='download' || $xurl['type']==='playstore' || $xurl['type']==='itunesstore') $isdl = true; + if (in_array($xurl['type'], ['download', 'playstore', 'itunesstore', 'docker', 'aur-bin', 'aur-git', 'homebrew', 'chocolatey'])) $isdl = true; } if (!$isdl) return ['result'=>'err', 'message' => 'No download link ' . $prog['name']]; diff --git a/www/pages/programs_view.php b/www/pages/programs_view.php index b725b7b..b73cfa5 100644 --- a/www/pages/programs_view.php +++ b/www/pages/programs_view.php @@ -49,12 +49,24 @@ $FRAME_OPTIONS->activeHeader = 'programs'; modules->Programs()->getURLs($prog) as $xurl) { - echo ''; - echo ''; - echo ''; - echo ''; - echo ''.$xurl['caption'].''; - echo ''; + if ($xurl['alert'] === null) + { + echo ''; + echo ''; + echo ''; + echo ''; + echo ''.$xurl['caption'].''; + echo ''; + } + else + { + echo ''; + echo ''; + echo ''; + echo ''; + echo ''.$xurl['caption'].''; + echo ''; + } } ?> diff --git a/www/statics/programs/__all.php b/www/statics/programs/__all.php index b8e4634..ed3fe0b 100644 --- a/www/statics/programs/__all.php +++ b/www/statics/programs/__all.php @@ -699,6 +699,7 @@ return [ 'github' => 'https://github.com/Mikescher/youtube-dl-viewer', 'download' => 'https://github.com/Mikescher/youtube-dl-viewer/releases', + 'docker' => 'https://hub.docker.com/r/mikescher/youtube-dl-viewer', ], 'extra_images' => [ @@ -750,6 +751,8 @@ return [ 'github' => 'https://github.com/Mikescher/better-docker-ps', 'download' => 'https://github.com/Mikescher/better-docker-ps/releases', + 'aur-bin' => 'https://aur.archlinux.org/packages/dops-bin', + 'aur-git' => 'https://aur.archlinux.org/packages/dops-git', ], ], @@ -769,6 +772,10 @@ return [ 'github' => 'https://github.com/Mikescher/firefox-sync-client', 'download' => 'https://github.com/Mikescher/firefox-sync-client/releases/latest', + 'aur-bin' => 'https://aur.archlinux.org/packages/ffsclient-bin', + 'aur-git' => 'https://aur.archlinux.org/packages/ffsclient-git', + 'homebrew-tap' => 'brew tap Mikescher/tap && brew install ffsclient', + 'chocolatey' => 'https://community.chocolatey.org/packages/ffsclient', ], ], ]; \ No newline at end of file