forked from akai/readest
This commit is contained in:
@@ -119,7 +119,7 @@ const ControlPanel: React.FC<SettingsPanelPanelProp> = ({ bookKey, onRegisterRes
|
||||
}, [animated]);
|
||||
|
||||
useEffect(() => {
|
||||
saveViewSettings(envConfig, bookKey, 'isEink', isEink, false, false);
|
||||
saveViewSettings(envConfig, bookKey, 'isEink', isEink);
|
||||
if (isEink) {
|
||||
getView(bookKey)?.renderer.setAttribute('eink', '');
|
||||
} else {
|
||||
|
||||
@@ -112,6 +112,7 @@ const getColorStyles = (
|
||||
invertImgColorInDark: boolean,
|
||||
themeCode: ThemeCode,
|
||||
backgroundTextureId: string,
|
||||
isEink: boolean,
|
||||
) => {
|
||||
const { bg, fg, primary, isDarkMode } = themeCode;
|
||||
const colorStyles = `
|
||||
@@ -142,7 +143,7 @@ const getColorStyles = (
|
||||
}
|
||||
a:any-link {
|
||||
${overrideColor ? `color: ${primary};` : isDarkMode ? `color: lightblue;` : ''}
|
||||
text-decoration: none;
|
||||
text-decoration: ${isEink ? 'underline' : 'none'};
|
||||
}
|
||||
body.pbg {
|
||||
${isDarkMode ? `background-color: ${bg} !important;` : ''}
|
||||
@@ -526,6 +527,7 @@ export const getStyles = (viewSettings: ViewSettings, themeCode?: ThemeCode) =>
|
||||
viewSettings.invertImgColorInDark!,
|
||||
themeCode,
|
||||
viewSettings.backgroundTextureId,
|
||||
viewSettings.isEink,
|
||||
);
|
||||
const translationStyles = getTranslationStyles(viewSettings.showTranslateSource!);
|
||||
const userStylesheet = viewSettings.userStylesheet!;
|
||||
|
||||
Reference in New Issue
Block a user