style: update code block padding and topic position

This commit is contained in:
kangfenmao 2024-11-30 12:01:00 +08:00
parent 8de1197557
commit 06ae4328ea
2 changed files with 3 additions and 3 deletions

View File

@ -60,7 +60,7 @@ export const SyntaxHighlighterProvider: React.FC<PropsWithChildren> = ({ childre
await highlighter.loadLanguage(language as BundledLanguage) await highlighter.loadLanguage(language as BundledLanguage)
console.log(`Loaded language: ${language}`) console.log(`Loaded language: ${language}`)
} else { } else {
return `<pre><code>${code}</code></pre>` return `<pre style="padding: 10px"><code>${code}</code></pre>`
} }
} }
@ -70,7 +70,7 @@ export const SyntaxHighlighterProvider: React.FC<PropsWithChildren> = ({ childre
}) })
} catch (error) { } catch (error) {
console.warn(`Error highlighting code for language '${language}':`, error) console.warn(`Error highlighting code for language '${language}':`, error)
return `<pre><code>${code}</code></pre>` return `<pre style="padding: 10px"><code>${code}</code></pre>`
} }
} }

View File

@ -53,7 +53,7 @@ const initialState: SettingsState = {
theme: ThemeMode.auto, theme: ThemeMode.auto,
windowStyle: 'transparent', windowStyle: 'transparent',
fontSize: 14, fontSize: 14,
topicPosition: 'left', topicPosition: 'right',
showTopicTime: false, showTopicTime: false,
pasteLongTextAsFile: false, pasteLongTextAsFile: false,
clickAssistantToShowTopic: false, clickAssistantToShowTopic: false,