|
41 | 41 |
|
42 | 42 | $cloudID = \OC::$server->getUserSession()->getUser()->getCloudId(); |
43 | 43 | $url = 'https://nextcloud.com/federation#' . $cloudID; |
44 | | -$ownCloudLogoPath = \OC::$server->getURLGenerator()->imagePath('core', 'logo-icon.svg'); |
45 | | -$theme = \OC::$server->getThemingDefaults(); |
| 44 | +$logoPath = \OC::$server->getURLGenerator()->imagePath('core', 'logo-icon.svg'); |
| 45 | +$theme = \OC::$server->query("ThemingDefaults"); |
| 46 | +$color = $theme->getMailHeaderColor(); |
| 47 | +$textColor = "#ffffff"; |
| 48 | +if($theme instanceof \OCA\Theming\ThemingDefaults) { |
| 49 | + $logoPath = $theme->getLogo(); |
| 50 | + $util = \OC::$server->query("\OCA\Theming\Util"); |
| 51 | + if($util->invertTextColor($color)) { |
| 52 | + $textColor = "#000000"; |
| 53 | + } |
| 54 | +} |
| 55 | + |
46 | 56 |
|
47 | 57 | $tmpl = new OCP\Template('federatedfilesharing', 'settings-personal'); |
48 | 58 | $tmpl->assign('outgoingServer2serverShareEnabled', $federatedShareProvider->isOutgoingServer2serverShareEnabled()); |
49 | 59 | $tmpl->assign('message_with_URL', $l->t('Share with me through my #Nextcloud Federated Cloud ID, see %s', [$url])); |
50 | 60 | $tmpl->assign('message_without_URL', $l->t('Share with me through my #Nextcloud Federated Cloud ID', [$cloudID])); |
51 | | -$tmpl->assign('owncloud_logo_path', $ownCloudLogoPath); |
| 61 | +$tmpl->assign('logoPath', $logoPath); |
52 | 62 | $tmpl->assign('reference', $url); |
53 | 63 | $tmpl->assign('cloudId', $cloudID); |
54 | 64 | $tmpl->assign('showShareIT', !$isIE8); |
55 | | -$tmpl->assign('color', $theme->getMailHeaderColor()); |
| 65 | +$tmpl->assign('color', $color); |
| 66 | +$tmpl->assign('textColor', $textColor); |
56 | 67 |
|
57 | 68 | return $tmpl->fetchPage(); |
0 commit comments