Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/main/store/module/preferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export default new Store<PreferencesStore>({
trailingComma: 'none',
semi: false,
singleQuote: true,
theme: 'github'
theme: 'chrome',
highlightLine: false,
highlightGutter: false
}
}
})
4 changes: 3 additions & 1 deletion src/renderer/components/editor/TheEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ const init = async () => {
printMargin: false,
tabSize: appStore.editor.tabSize,
wrap: appStore.editor.wrap,
showInvisibles: appStore.editor.showInvisibles
showInvisibles: appStore.editor.showInvisibles,
highlightGutterLine: appStore.editor.highlightGutter,
highlightActiveLine: appStore.editor.highlightLine
})

setValue()
Expand Down
12 changes: 12 additions & 0 deletions src/renderer/components/preferences/EditorPreferences.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@
name="showInvisibles"
/>
</AppFormItem>
<AppFormItem label="Highlight Line">
<AppCheckbox
v-model="appStore.editor.highlightLine"
name="showInvisibles"
/>
</AppFormItem>
<AppFormItem label="Highlight Gutter">
<AppCheckbox
v-model="appStore.editor.highlightGutter"
name="showInvisibles"
/>
</AppFormItem>
<h4>Prettier</h4>
<AppFormItem label="Trailing Comma">
<AppSelect
Expand Down
1 change: 1 addition & 0 deletions src/renderer/components/ui/form/AppForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
display: flex;
flex-flow: column;
gap: var(--spacing-md);
margin-bottom: var(--spacing-md);
}
</style>
2 changes: 1 addition & 1 deletion src/renderer/components/ui/form/AppFormItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ defineProps<Props>()
<style lang="scss" scoped>
.form-item {
display: grid;
grid-template-columns: 120px 1fr;
grid-template-columns: 150px 1fr;
.inner {
display: flex;
flex-flow: column;
Expand Down
1 change: 0 additions & 1 deletion src/renderer/components/ui/menu/AppMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ provide('items', items.value)
<style lang="scss" scoped>
.menu {
width: 100%;
height: 300px;
display: grid;
grid-template-columns: 150px 1fr;
gap: var(--spacing-sm);
Expand Down
4 changes: 3 additions & 1 deletion src/renderer/store/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ const EDITOR_DEFAULTS: EditorSettings = {
trailingComma: 'none',
semi: false,
singleQuote: true,
theme: 'chrome'
theme: 'chrome',
highlightLine: false,
highlightGutter: false
}

export const useAppStore = defineStore('app', {
Expand Down
15 changes: 3 additions & 12 deletions src/shared/types/main/store.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type { EditorSettings } from '../renderer/store/app'

export interface AppStore {
bounds: object
selectedFolderId?: string
Expand All @@ -10,20 +12,9 @@ export interface AppStore {
notifySupport: boolean
}

interface Editor {
fontFamily: string
fontSize: number
showInvisibles: boolean
tabSize: number
wrap: string
trailingComma: 'all' | 'none' | 'es5'
semi: boolean
singleQuote: boolean
theme: string
}
export interface PreferencesStore {
storagePath: string
backupPath: string
editor: Editor
editor: EditorSettings
theme: string
}
2 changes: 2 additions & 0 deletions src/shared/types/renderer/store/app.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export interface EditorSettings {
semi: boolean
singleQuote: boolean
theme: ThemeEditor
highlightLine: boolean
highlightGutter: boolean
}

export interface State {
Expand Down