Change: Make "View Source" a developer tool
Description
Viewing the raw JSON data for messages is rarely done in normal use by non-developers. Therefore I suggest that enabling this button's visibility is controlled by the "Developer Tools" switch in "Settings">"Developer Tools". This de-clutters the context menu for regular users.
This PR uses the "Developer Tools" switch to control the "View Source" button's visibility in context menus for messages and events.
Fixes #2352
Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [o] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [o] This change requires a documentation update
Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
great feature to be added, since this feature has been existing on element/schildichat for a long time now.
Preview: https://2368--pr-cinny.netlify.app ⚠️ Exercise caution. Use test accounts. ⚠️
Sorry for re-requesting, but the workflow wants another approval