-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugs: - Fix bug with tables page that prevented it from loading - Fix bug with displaying some kinds of data Improvements: - Use resizable splitter panes for Query tab - Allow changing between vertical/horizontal layout on query tab - Allow "minimizing" the sidebar for a smaller app size - Resizing: Rather than scaling whole app with a hack, we'll scale editor font size
- Loading branch information
1 parent
3d0b415
commit b694e46
Showing
36 changed files
with
839 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package Config | ||
|
||
import ( | ||
"context" | ||
"github.com/wailsapp/wails/v2/pkg/runtime" | ||
"wails_vue/backend/FileStore" | ||
) | ||
|
||
type PaneSize struct { | ||
Min float64 `json:"min"` | ||
Max float64 `json:"max"` | ||
Size float64 `json:"size"` | ||
} | ||
|
||
type Preferences struct { | ||
Ctx context.Context `json:"-"` | ||
|
||
EditorFontSize int `json:"editorFontSize"` | ||
QueryResultFontSize int `json:"queryResultFontSize"` | ||
|
||
PaneSizes []PaneSize `json:"paneSizes"` | ||
PanelLayout string `json:"panelLayout"` | ||
} | ||
|
||
func (p *Preferences) Setup() { | ||
p.PaneSizes = []PaneSize{ | ||
{Min: 10, Max: 100, Size: 90}, | ||
{Min: 10, Max: 100, Size: 10}, | ||
} | ||
p.EditorFontSize = 16 | ||
p.QueryResultFontSize = 14 | ||
p.PanelLayout = "horizontal" | ||
} | ||
|
||
func (p *Preferences) Update(data *Preferences) { | ||
p.EditorFontSize = data.EditorFontSize | ||
p.QueryResultFontSize = data.QueryResultFontSize | ||
p.PaneSizes = data.PaneSizes | ||
p.PanelLayout = data.PanelLayout | ||
|
||
err := FileStore.Save[Preferences](p) | ||
if err != nil { | ||
runtime.LogError(p.Ctx, err.Error()) | ||
} | ||
} | ||
func (p *Preferences) UpdatePaneSizes(panes []PaneSize) { | ||
p.PaneSizes = panes | ||
p.Update(p) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.