Open diemelone opened 3 years ago
I definitely agree but the reason I haven't done it is because currently it generates error messages if two apps register the same settings section. I remember seeing a discussion about it a while back but now I can't seem to find it. I also don't know if it is possible to do a conditional registration, so the section only gets registered by breeze dark if it doesn't exist. I haven't had too much time to look into it but so far I haven't found a way to do it yet.
Ok, for the meantime I have a quick and dirty fix, without changing code (to avoid having to do this on every update) I just hid the accessibility theme from the users using the custom css app. If they don't know its there, they wont search. I guess changing the theme for every user should be possible via the preferences in the database
#accessibility .preview-list {
display: none;
}
Yeah, you can also do the following if you just want to hide the dark theme
#accessibility .preview-list .preview:nth-of-type(2) {
display: none;
}
I guess changing the theme for every user should be possible via the preferences in the database
You can do it with the occ command. The Accessibility has a theme
option that is either not present or set to dark so it just needs to be delete. The following shows which options are set for the Accessibility app
php occ user:setting UID accessibility
And to delete the theme option you can do this
php occ user:setting --delete UID accessibility theme
Of course replacing UID with the UID of a user
I also don't know if it is possible to do a conditional registration, so the section only gets registered by breeze dark if it doesn't exist.
Did you take a look at apps like quota warning, impersonate, mail, ... they all appear in the same admin setting section but if none is activated you cant see the section. Otherwise this could be a workaround: a dropdownlist of available setting sections for the admin to choose in which section breeze dark settings are located.
Did you take a look at apps like quota warning, impersonate, mail, ... they all appear in the same admin setting section but if none is activated you cant see the section.
There are some settings sections that are built-in to Nextcloud core which behave like that which these apps are using, but currently it doesn't seem like that functionality can be achieved when apps register their own sections.
Otherwise this could be a workaround: a dropdownlist of available setting sections for the admin to choose in which section breeze dark settings are located.
Sadly I don't think that is feasible based on how the system currently works.
Is there any way of manually creating the settings section to get it to work?
As far as I know settings sections has to be registered with code either in Nextcloud core or in an app, so no I don't believe so.
The accessibility site is still there, it is just hidden so I used the "external sites" app to create a new list item in this menu which leads to the accessibility setting: https://NC.tld/index.php/settings/user/accessibility
Sorry for the slow responses, I've been quite busy lately.
That's interesting and it seems like a reasonable workaround. Though it also provides a way to create a workaround in the app. One possibility would be adding the "Accessibility" settings section to the settings sidebar with javascript if it doesn't exists.
Describe the bug not accessible when the accessibility app is deactivated
To Reproduce
Expected behavior Setting should be accessible
Screenshots not needed
Setup (please complete the following information):
Additional context Breeze Dark should add the accessibility settingspage as well if it does not exist already. I deactivated the accessibility app because the native darkmode looks weird with my chosen primary color. I deactivated it for users not to have the same issues.