-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
231 additions
and
152 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Tauri Development Debug", | ||
"cargo": { | ||
"args": ["build", "--manifest-path=./src-tauri/Cargo.toml", "--no-default-features"] | ||
}, | ||
// task for the `beforeDevCommand` if used, must be configured in `.vscode/tasks.json` | ||
"preLaunchTask": "ui:dev" | ||
}, | ||
{ | ||
"type": "lldb", | ||
"request": "launch", | ||
"name": "Tauri Production Debug", | ||
"cargo": { | ||
"args": ["build", "--release", "--manifest-path=./src-tauri/Cargo.toml"] | ||
}, | ||
// task for the `beforeBuildCommand` if used, must be configured in `.vscode/tasks.json` | ||
"preLaunchTask": "ui:build" | ||
} | ||
] | ||
} |
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,25 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "ui:dev", | ||
"type": "shell", | ||
// `dev` keeps running in the background | ||
// ideally you should also configure a `problemMatcher` | ||
// see https://code.visualstudio.com/docs/editor/tasks#_can-a-background-task-be-used-as-a-prelaunchtask-in-launchjson | ||
"isBackground": true, | ||
// change this to your `beforeDevCommand`: | ||
"command": "cargo", | ||
"args": ["tauri", "dev"] | ||
}, | ||
{ | ||
"label": "ui:build", | ||
"type": "shell", | ||
// change this to your `beforeBuildCommand`: | ||
"command": "cargo", | ||
"args": ["tauri", "build"] | ||
} | ||
] | ||
} |
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
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 |
---|---|---|
@@ -1,2 +1,26 @@ | ||
use std::collections::HashMap; | ||
|
||
use serde::Serialize; | ||
use tauri::Result; | ||
|
||
#[derive(Default, Serialize)] | ||
pub struct QueryDetails { | ||
pub title: String, | ||
pub sql: String, | ||
} | ||
|
||
#[tauri::command] | ||
pub fn insert_query(key: String, sql: String) { | ||
todo!() | ||
} | ||
|
||
#[tauri::command] | ||
pub async fn select_queries() -> Result<HashMap<String, String>> { | ||
todo!() | ||
} | ||
|
||
#[tauri::command] | ||
pub async fn delete_query(key: String) { | ||
todo!() | ||
} | ||
|
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 |
---|---|---|
@@ -1,20 +1,20 @@ | ||
use std::vec; | ||
|
||
use crate::{ | ||
layout::layout, | ||
query_editor::query_editor, | ||
query_table::query_table, | ||
store::{db::DBStore, editor::EditorState, query::QueryState}, | ||
layout::layout, | ||
query_editor::query_editor, | ||
query_table::query_table, | ||
store::{db::DBStore, editor::EditorState, query::QueryState}, | ||
}; | ||
use leptos::*; | ||
|
||
pub fn app() -> impl IntoView { | ||
provide_context(DBStore::default()); | ||
provide_context(EditorState::default()); | ||
provide_context(QueryState::default()); | ||
provide_context(DBStore::default()); | ||
provide_context(EditorState::default()); | ||
provide_context(QueryState::default()); | ||
|
||
layout(Children::to_children(move || { | ||
Fragment::new(vec![query_editor().into_view(), query_table().into_view()]) | ||
})) | ||
layout(Children::to_children(move || { | ||
Fragment::new(vec![query_editor().into_view(), query_table().into_view()]) | ||
})) | ||
} | ||
|
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
Oops, something went wrong.