Add F-Droid

Signed-off-by: HouraisanNEET <HouraisanNEET@users.noreply.github.com>
This commit is contained in:
HouraisanNEET 2021-04-10 13:43:22 +08:00
parent bbee01117e
commit 665965a3a3
4 changed files with 5274 additions and 0 deletions

View File

@ -86,6 +86,8 @@ class ThemingDefaults extends \OC_Defaults {
private $iOSClientUrl;
/** @var string */
private $AndroidClientUrl;
/** @var string */
private $FDroidClientUrl;
/**
* ThemingDefaults constructor.
@ -125,6 +127,7 @@ class ThemingDefaults extends \OC_Defaults {
$this->iTunesAppId = parent::getiTunesAppId();
$this->iOSClientUrl = parent::getiOSClientUrl();
$this->AndroidClientUrl = parent::getAndroidClientUrl();
$this->FDroidClientUrl = parent::getFDroidClientUrl();
}
public function getName() {
@ -286,6 +289,12 @@ class ThemingDefaults extends \OC_Defaults {
return $this->config->getAppValue('theming', 'AndroidClientUrl', $this->AndroidClientUrl);
}
/**
* @return string
*/
public function getFDroidClientUrl() {
return $this->config->getAppValue('theming', 'FDroidClientUrl', $this->FDroidClientUrl);
}
/**
* @return array scss variables to overwrite

5242
core/img/f-droid.svg Normal file

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 167 KiB

View File

@ -47,6 +47,7 @@ class OC_Defaults {
private $defaultiOSClientUrl;
private $defaultiTunesAppId;
private $defaultAndroidClientUrl;
private $defaultFDroidClientUrl;
private $defaultDocBaseUrl;
private $defaultDocVersion;
private $defaultSlogan;
@ -64,6 +65,7 @@ class OC_Defaults {
$this->defaultiOSClientUrl = $config->getSystemValue('customclient_ios', 'https://geo.itunes.apple.com/us/app/nextcloud/id1125420102?mt=8');
$this->defaultiTunesAppId = $config->getSystemValue('customclient_ios_appid', '1125420102');
$this->defaultAndroidClientUrl = $config->getSystemValue('customclient_android', 'https://play.google.com/store/apps/details?id=com.nextcloud.client');
$this->defaultFDroidClientUrl = $config->getSystemValue('customclient_fdroid', 'https://f-droid.org/packages/com.nextcloud.client/');
$this->defaultDocBaseUrl = 'https://docs.nextcloud.com';
$this->defaultDocVersion = \OC_Util::getVersion()[0]; // used to generate doc links
$this->defaultColorPrimary = '#0082c9';
@ -151,6 +153,18 @@ class OC_Defaults {
}
}
/**
* Returns the URL to Google Play for the Android Client
* @return string URL
*/
public function getFDroidClientUrl() {
if ($this->themeExist('getFDroidClientUrl')) {
return $this->theme->getFDroidClientUrl();
} else {
return $this->defaultFDroidClientUrl;
}
}
/**
* Returns the documentation URL
* @return string URL

View File

@ -96,6 +96,15 @@ class Defaults {
return $this->defaults->getAndroidClientUrl();
}
/**
* link to the Android client on F-Droid
* @return string
* @since ?
*/
public function getFDroidClientUrl() {
return $this->defaults->getFDroidClientUrl();
}
/**
* base URL to the documentation of your ownCloud instance
* @return string