()
| 1871 | } |
| 1872 | |
| 1873 | async function handleSidePanelToggleChange() { |
| 1874 | if (!UI.sidePanelToggle) return; |
| 1875 | const enabled = UI.sidePanelToggle.checked; |
| 1876 | setSidePanelToggleState(enabled); |
| 1877 | |
| 1878 | try { |
| 1879 | await setStorageData({ |
| 1880 | [CONSTANTS.STORAGE_KEYS.SIDE_PANEL_ENABLED]: enabled, |
| 1881 | }); |
| 1882 | await setSidePanelActionBehavior(enabled); |
| 1883 | |
| 1884 | if (enabled) { |
| 1885 | await openFastDorkSidePanel(); |
| 1886 | showSuccessAnimation("Side panel enabled"); |
| 1887 | } else { |
| 1888 | showSuccessAnimation("Side panel disabled"); |
| 1889 | } |
| 1890 | } catch (error) { |
| 1891 | console.error("Could not update side panel setting:", error); |
| 1892 | await setStorageData({ |
| 1893 | [CONSTANTS.STORAGE_KEYS.SIDE_PANEL_ENABLED]: false, |
| 1894 | }).catch(() => {}); |
| 1895 | await setSidePanelActionBehavior(false); |
| 1896 | setSidePanelToggleState(false); |
| 1897 | showModal(error.message || "Could not open the side panel."); |
| 1898 | } |
| 1899 | } |
| 1900 | |
| 1901 | async function handleResetAllData() { |
| 1902 | const messageText = `Are you sure you want to reset ALL data (lists, settings, custom site configs) to defaults? This cannot be undone.`; |
nothing calls this directly
no test coverage detected