diff --git a/apps/readest-app/src/app/reader/components/settings/MiscPanel.tsx b/apps/readest-app/src/app/reader/components/settings/MiscPanel.tsx index 56490fe0..3a695495 100644 --- a/apps/readest-app/src/app/reader/components/settings/MiscPanel.tsx +++ b/apps/readest-app/src/app/reader/components/settings/MiscPanel.tsx @@ -18,11 +18,13 @@ const MiscPanel: React.FC<{ bookKey: string }> = ({ bookKey }) => { const [animated, setAnimated] = useState(viewSettings.animated!); const [isDisableClick, setIsDisableClick] = useState(viewSettings.disableClick!); const [draftStylesheet, setDraftStylesheet] = useState(viewSettings.userStylesheet!); + const [draftStylesheetSaved, setDraftStylesheetSaved] = useState(true); const [error, setError] = useState(null); const handleUserStylesheetChange = (e: React.ChangeEvent) => { const cssInput = e.target.value; setDraftStylesheet(cssInput); + setDraftStylesheetSaved(false); try { const { isValid, error } = cssValidate(cssInput); @@ -48,6 +50,7 @@ const MiscPanel: React.FC<{ bookKey: string }> = ({ bookKey }) => { }); setDraftStylesheet(formattedCSS); + setDraftStylesheetSaved(true); viewSettings.userStylesheet = formattedCSS; setViewSettings(bookKey, viewSettings); @@ -93,7 +96,7 @@ const MiscPanel: React.FC<{ bookKey: string }> = ({ bookKey }) => {

{_('Animation')}

-
+
{_('Paging Animation')} @@ -110,7 +113,7 @@ const MiscPanel: React.FC<{ bookKey: string }> = ({ bookKey }) => {

{_('Behavior')}

-
+
{_('Disable Click-to-Flip')} @@ -127,7 +130,9 @@ const MiscPanel: React.FC<{ bookKey: string }> = ({ bookKey }) => {

{_('Custom CSS')}

-
+