Skip to content

Commit

Permalink
Add system dark mode detection for Vue apps #11624 (#11667)
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls authored Dec 3, 2024
1 parent b9dc94f commit 3050821
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions arches/app/templates/base-root.htm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@
gtag('config', '{{app_settings.GOOGLE_ANALYTICS_TRACKING_ID}}');
</script>
{% endif %}
<script>
const darkModeToggleState = localStorage.getItem("arches-dark");
if (
darkModeToggleState === "true" ||
(darkModeToggleState === null &&
window.matchMedia("(prefers-color-scheme: dark)").matches)
) {
document.documentElement.classList.add("arches-dark");
}
</script>
<title>
{% block title %}{% endblock title %}
</title>
Expand Down
1 change: 1 addition & 0 deletions releases/8.0.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Arches 8.0.0 Release Notes
- Make node aliases not nullable [#10437](https://github.com/archesproject/arches/issues/10437)
- Concepts API no longer responds with empty body for error conditions [#11519](https://github.com/archesproject/arches/issues/11519)
- Removes sample index from new projects, updates test coverage behavior [#11591](https://github.com/archesproject/arches/issues/11519)
- Add system dark mode detection for Vue apps [#11624](https://github.com/archesproject/arches/issues/11624)
- Make number datatype node values searchable in the main search [#11619](https://github.com/archesproject/arches/issues/11619)
- Prevent navigation to a new browser tab when clicking Manage link in index.htm [#11635](https://github.com/archesproject/arches/issues/11635)
- Add support for tile sort order to the bulk data manager [#11638](https://github.com/archesproject/arches/pull/11638)
Expand Down

0 comments on commit 3050821

Please sign in to comment.