feat(desktop): add settings schema and integrate settings service #1824
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes that primarily focus on replacing the
posts
schema with a newsettings
schema and integrating it throughout the codebase. Additionally, it introduces a newPlatformType
to differentiate between desktop and web platforms. Below are the most important changes:Schema and Database Changes:
posts
schema with a newsettings
schema in the database configuration files (apps/desktop/src/database/db.main.ts
,apps/desktop/src/database/db.renderer.ts
). [1] [2] [3]posts
schema file and added a newsettings
schema file with various settings attributes (apps/desktop/src/database/schemas/posts.ts
,apps/desktop/src/database/schemas/settings.ts
). [1] [2]Service and Configuration Updates:
useSettingsService
to manage settings in the database and update the store (apps/desktop/src/database/services/SettingsService.ts
).createWindow
function to use settings from the database for window dimensions and theme (apps/desktop/src/main/index.ts
). [1] [2] [3]Platform Type Integration:
PlatformType
type to differentiate between desktop and web platforms (packages/types/base.ts
).PlatformType
and conditionally render settings based on the platform (apps/desktop/src/renderer/src/main.ts
,apps/web/src/main.ts
,packages/ui/src/components/SettingsView.vue
). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]Miscellaneous:
tsconfig.web.json
files (apps/desktop/electron.vite.config.ts
,apps/desktop/tsconfig.web.json
). [1] [2]apps/web/src/database/services/SettingsService.ts
,packages/ui/src/stores/useSettingsStore.ts
). [1] [2]