mirror of
https://github.com/nextcloud/server.git
synced 2026-02-18 18:28:50 -05:00
Add global accessibility switch
Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
parent
bfee3167b3
commit
a39b3a3d84
6 changed files with 20 additions and 7 deletions
|
|
@ -63,7 +63,7 @@
|
|||
</template>
|
||||
</BreadCrumbs>
|
||||
|
||||
<NcButton v-if="filesListWidth >= 512"
|
||||
<NcButton v-if="filesListWidth >= 512 && enableGridView"
|
||||
:aria-label="gridViewButtonLabel"
|
||||
:title="gridViewButtonLabel"
|
||||
class="files-list__header-grid-button"
|
||||
|
|
@ -132,6 +132,7 @@ import { showError } from '@nextcloud/dialogs'
|
|||
import { translate, translatePlural } from '@nextcloud/l10n'
|
||||
import { Type } from '@nextcloud/sharing'
|
||||
import { UploadPicker } from '@nextcloud/upload'
|
||||
import { loadState } from '@nextcloud/initial-state'
|
||||
import { defineComponent } from 'vue'
|
||||
|
||||
import LinkIcon from 'vue-material-design-icons/Link.vue'
|
||||
|
|
@ -193,6 +194,9 @@ export default defineComponent({
|
|||
const uploaderStore = useUploaderStore()
|
||||
const userConfigStore = useUserConfigStore()
|
||||
const viewConfigStore = useViewConfigStore()
|
||||
|
||||
const enableGridView = (loadState('core', 'config', [])['enable_non-accessible_features'] ?? true)
|
||||
|
||||
return {
|
||||
filesStore,
|
||||
pathsStore,
|
||||
|
|
@ -200,6 +204,7 @@ export default defineComponent({
|
|||
uploaderStore,
|
||||
userConfigStore,
|
||||
viewConfigStore,
|
||||
enableGridView,
|
||||
}
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -2405,4 +2405,11 @@ $CONFIG = [
|
|||
* Defaults to ``false``
|
||||
*/
|
||||
'unified_search.enabled' => false,
|
||||
|
||||
/**
|
||||
* Enable features that are do respect accessibility standards yet.
|
||||
*
|
||||
* Defaults to ``true``
|
||||
*/
|
||||
'enable_non-accessible_features' => true,
|
||||
];
|
||||
|
|
|
|||
4
dist/files-main.js
vendored
4
dist/files-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-main.js.map
vendored
2
dist/files-main.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -179,7 +179,8 @@ class JSConfigHelper {
|
|||
'sharing.maxAutocompleteResults' => max(0, $this->config->getSystemValueInt('sharing.maxAutocompleteResults', Constants::SHARING_MAX_AUTOCOMPLETE_RESULTS_DEFAULT)),
|
||||
'sharing.minSearchStringLength' => $this->config->getSystemValueInt('sharing.minSearchStringLength', 0),
|
||||
'version' => implode('.', Util::getVersion()),
|
||||
'versionstring' => \OC_Util::getVersionString()
|
||||
'versionstring' => \OC_Util::getVersionString(),
|
||||
'enable_non-accessible_features' => $this->config->getSystemValueBool('enable_non-accessible_features', true),
|
||||
];
|
||||
|
||||
$array = [
|
||||
|
|
|
|||
|
|
@ -108,8 +108,8 @@ class TemplateLayout extends \OC_Template {
|
|||
|
||||
$this->initialState->provideInitialState('core', 'active-app', $this->navigationManager->getActiveEntry());
|
||||
$this->initialState->provideInitialState('core', 'apps', $this->navigationManager->getAll());
|
||||
|
||||
if ($this->config->getSystemValueBool('unified_search.enabled', false)) {
|
||||
|
||||
if ($this->config->getSystemValueBool('unified_search.enabled', false) || !$this->config->getSystemValueBool('enable_non-accessible_features', true)) {
|
||||
$this->initialState->provideInitialState('unified-search', 'limit-default', (int)$this->config->getAppValue('core', 'unified-search.limit-default', (string)SearchQuery::LIMIT_DEFAULT));
|
||||
$this->initialState->provideInitialState('unified-search', 'min-search-length', (int)$this->config->getAppValue('core', 'unified-search.min-search-length', (string)1));
|
||||
$this->initialState->provideInitialState('unified-search', 'live-search', $this->config->getAppValue('core', 'unified-search.live-search', 'yes') === 'yes');
|
||||
|
|
|
|||
Loading…
Reference in a new issue