[PR #1814] [CLOSED] refactor(web): theme switch button #9225

Closed
opened 2026-02-05 14:00:49 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/1814
Author: @michelheusschen
Created: 2/21/2023
Status: Closed

Base: mainHead: refactor/web-theme-switch


📝 Commits (1)

  • cfcbcce refactor(web): theme switch button

📊 Changes

4 files changed (+51 additions, -61 deletions)

View changed files

📝 web/package-lock.json (+18 -0)
📝 web/package.json (+1 -0)
📝 web/src/lib/components/shared-components/theme-button.svelte (+22 -61)
web/src/lib/stores/preferences.store.ts (+10 -0)

📄 Description

Recently I ran into an issue where the theme switch button would disappear when navigating Photos > Sharing > Photos. When clicking the now empty button, both icons would appear. This PR fixes that issue, but given the way it was implemented the component has been refactored completely.

Using the new svelte-local-storage-store package, a preferences store is added that is persisted to localStorage. This store can also be used for managing future preferences.

The old theme preference of users will be lost when merging this PR.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/1814 **Author:** [@michelheusschen](https://github.com/michelheusschen) **Created:** 2/21/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `refactor/web-theme-switch` --- ### 📝 Commits (1) - [`cfcbcce`](https://github.com/immich-app/immich/commit/cfcbcceefd23cad5fe2a420e9432ab672897a45a) refactor(web): theme switch button ### 📊 Changes **4 files changed** (+51 additions, -61 deletions) <details> <summary>View changed files</summary> 📝 `web/package-lock.json` (+18 -0) 📝 `web/package.json` (+1 -0) 📝 `web/src/lib/components/shared-components/theme-button.svelte` (+22 -61) ➕ `web/src/lib/stores/preferences.store.ts` (+10 -0) </details> ### 📄 Description Recently I ran into an issue where the theme switch button would disappear when navigating Photos > Sharing > Photos. When clicking the now empty button, both icons would appear. This PR fixes that issue, but given the way it was implemented the component has been refactored completely. Using the new `svelte-local-storage-store` package, a preferences store is added that is persisted to localStorage. This store can also be used for managing future preferences. The old theme preference of users will be lost when merging this PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 14:00:49 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#9225