2018-06-13 14:16:49 +03:00
< ? php
/**
* @ copyright Copyright ( c ) 2018 John Molakvoæ < skjnldsv @ protonmail . com >
2019-09-03 16:49:27 +03:00
* @ copyright Copyright ( c ) 2019 Janis Köhr < janiskoehr @ icloud . com >
2018-06-13 14:16:49 +03:00
*
2020-03-31 11:49:10 +03:00
* @ author Christoph Wurst < christoph @ winzerhof - wurst . at >
2019-12-03 21:57:53 +03:00
* @ author Greta Doci < gretadoci @ gmail . com >
* @ author Jan - Christoph Borchardt < hey @ jancborchardt . net >
* @ author Janis Köhr < janis . koehr @ novatec - gmbh . de >
2020-03-31 11:49:10 +03:00
* @ author Joas Schilling < coding @ schilljs . com >
2019-12-03 21:57:53 +03:00
* @ author John Molakvoæ ( skjnldsv ) < skjnldsv @ protonmail . com >
2018-06-13 14:16:49 +03:00
*
* @ license GNU AGPL version 3 or any later version
*
* This program is free software : you can redistribute it and / or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation , either version 3 of the
* License , or ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU Affero General Public License for more details .
*
* You should have received a copy of the GNU Affero General Public License
* along with this program . If not , see < http :// www . gnu . org / licenses />.
*
*/
namespace OCA\Accessibility ;
use OCP\IL10N ;
use OCP\IURLGenerator ;
class AccessibilityProvider {
/** @var string */
protected $appName ;
/** @var IURLGenerator */
private $urlGenerator ;
/** @var IL10N */
private $l ;
/**
* Account constructor .
*
* @ param string $appName
* @ param IURLGenerator $urlGenerator
* @ param IL10N $l
*/
public function __construct ( string $appName ,
IURLGenerator $urlGenerator ,
IL10N $l ) {
$this -> appName = $appName ;
$this -> urlGenerator = $urlGenerator ;
$this -> l = $l ;
}
public function getThemes () {
2020-03-26 11:30:18 +03:00
return [
2018-06-13 14:16:49 +03:00
[
2019-08-30 12:23:09 +03:00
'id' => 'dark' ,
2018-06-13 14:16:49 +03:00
'img' => $this -> urlGenerator -> imagePath ( $this -> appName , 'theme-dark.jpg' ),
2019-07-05 15:34:21 +03:00
'title' => $this -> l -> t ( 'Dark theme' ),
2020-02-12 17:34:00 +03:00
'enableLabel' => $this -> l -> t ( 'Enable dark theme' ),
2018-07-17 12:33:39 +03:00
'text' => $this -> l -> t ( 'A dark theme to ease your eyes by reducing the overall luminosity and brightness. It is still under development, so please report any issues you may find.' )
2018-06-13 14:16:49 +03:00
]
2020-03-26 11:30:18 +03:00
];
2018-06-13 14:16:49 +03:00
}
2019-08-30 12:23:09 +03:00
public function getHighContrast () {
2019-09-03 10:30:25 +03:00
return [
2019-08-30 12:23:09 +03:00
'id' => 'highcontrast' ,
2019-09-03 15:09:44 +03:00
'img' => $this -> urlGenerator -> imagePath ( $this -> appName , 'mode-highcontrast.jpg' ),
'title' => $this -> l -> t ( 'High contrast mode' ),
2020-02-12 17:34:00 +03:00
'enableLabel' => $this -> l -> t ( 'Enable high contrast mode' ),
2019-09-03 15:09:44 +03:00
'text' => $this -> l -> t ( 'A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased.' )
2019-09-03 10:30:25 +03:00
];
2019-08-30 12:23:09 +03:00
}
2018-06-13 14:16:49 +03:00
public function getFonts () {
2020-03-26 11:30:18 +03:00
return [
2018-06-13 14:16:49 +03:00
[
2018-06-21 10:28:28 +03:00
'id' => 'fontdyslexic' ,
2018-06-13 14:16:49 +03:00
'img' => $this -> urlGenerator -> imagePath ( $this -> appName , 'font-opendyslexic.jpg' ),
'title' => $this -> l -> t ( 'Dyslexia font' ),
2020-02-12 17:34:00 +03:00
'enableLabel' => $this -> l -> t ( 'Enable dyslexia font' ),
2019-01-24 20:55:58 +03:00
'text' => $this -> l -> t ( 'OpenDyslexic is a free typeface/font designed to mitigate some of the common reading errors caused by dyslexia.' )
2018-06-13 14:16:49 +03:00
]
2020-03-26 11:30:18 +03:00
];
2018-06-13 14:16:49 +03:00
}
2018-07-17 12:33:39 +03:00
}