improved user experience for novice user(including support for standalone aria2c and ytdl binaries);support for snap installation;close #19
This commit is contained in:
@@ -1,25 +1,38 @@
|
||||
<?php
|
||||
$aria2_running = $_['aria2_running'];
|
||||
$youtube_installed = $_['youtube_installed'];
|
||||
$aria2_installed = $_['aria2_installed'];
|
||||
|
||||
extract($_);
|
||||
$permission_error = sprintf("aria2 is installed but not executable.Please execute command sudo chmod 755 %s", $aria2_bin);
|
||||
if ($youtube_installed && !$youtube_executable) {
|
||||
$ytb_error = sprintf("youtube-dl is installed but not executable.Please execute command sudo chmod 755 %s", $youtube_bin);
|
||||
} else if (!$youtube_installed && !$youtube_executable) {
|
||||
$ytb_error = "youtube-dl is not installed!";
|
||||
}
|
||||
?>
|
||||
<div id="app-navigation">
|
||||
<?php if ($ncd_hide_errors): ?>
|
||||
<?php if (isset($ytb_error)): ?>
|
||||
<div data-error-message="<?php print $l->t($ytb_error);?>"></div>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
|
||||
<div class="app-navigation-new" id="search-download" data-inputbox="form-input-wrapper">
|
||||
<button type="button" class="icon-add">
|
||||
<?php print($l->t('Download & Search'));?>
|
||||
</button>
|
||||
</div>
|
||||
<div class="app-navigation-new" id="start-aria2">
|
||||
<?php if ($aria2_installed): ?>
|
||||
<?php if ($aria2_installed && $aria2_executable): ?>
|
||||
<button type="button" class="icon-power"
|
||||
data-aria2="<?php $aria2_running ? print $l->t('on') : print $l->t('off');?>">
|
||||
<?php $aria2_running ? print $l->t('Stop Aria2') : print $l->t('Start Aria2');?>
|
||||
</button>
|
||||
</button>
|
||||
<?php elseif ($aria2_installed && !$aria2_executable): ?>
|
||||
<button type="button" class="icon-power notinstalled" data-error-message="<?php print $l->t($permission_error);?>">
|
||||
<?php print $l->t("aria2c is installed but not executable");?>
|
||||
</button>
|
||||
<?php else: ?>
|
||||
<button type="button" class="icon-power notinstalled">
|
||||
<?php print $l->t('Aria2 is not installed!');?>
|
||||
<?php print $l->t("aria2c is not installed!");?>
|
||||
</button>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user