patchworks 0.3.0

Git-style visual diffs for SQLite databases. Inspect, compare, snapshot, and generate SQL migrations.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Shared workspace chrome helpers.

use egui::Ui;

use crate::state::workspace::WorkspaceView;

/// Renders central view toggles.
pub fn render_view_switcher(ui: &mut Ui, active_view: &mut WorkspaceView) {
    ui.selectable_value(active_view, WorkspaceView::Table, "Table");
    ui.selectable_value(active_view, WorkspaceView::Diff, "Diff");
    ui.selectable_value(active_view, WorkspaceView::SchemaDiff, "Schema");
    ui.selectable_value(active_view, WorkspaceView::Snapshots, "Snapshots");
    ui.selectable_value(active_view, WorkspaceView::SqlExport, "SQL Export");
}