Changed highcontrast from array (theme) to object (flag/filter)

Signed-off-by: Janis Köhr <janis.koehr@novatec-gmbh.de>
This commit is contained in:
Janis Köhr 2019-09-03 09:30:25 +02:00
parent 05ef7725e2
commit 9872154e01
No known key found for this signature in database
GPG Key ID: AC5C634CEF63743A
5 changed files with 7 additions and 9 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -65,14 +65,12 @@ class AccessibilityProvider {
}
public function getHighContrast() {
return array(
[
return [
'id' => 'highcontrast',
'img' => $this->urlGenerator->imagePath($this->appName, 'theme-highcontrast.jpg'),
'title' => $this->l->t('High contrast theme'),
'text' => $this->l->t('A high contrast theme to ease your navigation. Visual quality will be reduced but clarity will be increased.')
]
);
];
}
public function getFonts() {

View File

@ -114,7 +114,7 @@ class ConfigController extends OCSController {
}
$themes = $this->accessibilityProvider->getThemes();
$highcontrast = $this->accessibilityProvider->getHighContrast();
$highcontrast = array($this->accessibilityProvider->getHighContrast());
$fonts = $this->accessibilityProvider->getFonts();
$availableOptions = array_map(function($option) {

View File

@ -5,8 +5,8 @@
<p v-html="descriptionDetail" />
<div class="preview-list">
<preview v-for="preview in highcontrast" :preview="preview"
:key="preview.id" :selected="selected.highcontrast"
<preview :preview="highcontrast"
:key="highcontrast.id" :selected="selected.highcontrast"
v-on:select="selectHighContrast"></preview>
<preview v-for="preview in themes" :preview="preview"
:key="preview.id" :selected="selected.theme"