Commit Graph

31 Commits (bad6f14af620548c890ef16609a3a685941b7aca)

Author SHA1 Message Date
kyoto7250 bad6f14af6
adding help and README for exit pop up key (#144) 2 years ago
Takayuki Maeda 36b1da0afa
Create PropertiesComponent and redesign layout (#128)
* create properties component

* refactor app.rs

* add a test for checking if gobang has overlappted keys

* add keys for switching tabs to properties

* fix tab

* add serialize

* update record_table

* add properties group

* use serialize only in tests

* remove alias

* remove query field
3 years ago
Takayuki Maeda 4bcd4802fc
Add SQL Editor component (#84)
* syntax text

* add sql editor

* remove sytaxx_text module

* remove sytax_text

* add a focus above key

* add a event for movining focus and table component

* add syntax text component

* add a key for executing queries

* add completion

* add reserved words

* update completion when key is delete or left/right

* use reserved words in where clause

* editor

* add a macro for debugging

* stop inserting a new line in the sentence

* remove run key

* enter to execute a query

* fix tests for stateful paragraph

* change const to let
3 years ago
Takayuki Maeda 78d1297452
Refactor filter components (#114)
* prevent cursor from sticking out of paragraph

* define StatefulDrawableComponent

* use database filter component

* fix event order
3 years ago
Takayuki Maeda 950992df8d
Enable to change database tree width (#99)
* add a border width

* add a left_chunk_percentage field

* add keys for extending widget width

* fix completion pop-ups so that they do not protrude from frame

* use expand_or_shorten_widget_width

* handle extend shorten widget width event after component events

* add tests

* add command description

* add tests

* change commands help order

* fix extend_or_shorten_widget_width help

* change left_chunk_percentage to left_main_chunk_percentage
3 years ago
Takayuki Maeda 6615a235a7
Filter completion (#88)
* create completion component

* add move_up/down

* fix variable name

* pass config

* create debug component

* remov set

* add reserved words

* remove equal

* allow dead code

* always reset offset

* apply completion candidates correctly

* implement selected_candidate, word

* fix clippy warnings

* complete

* add tests for complete

* fix variable name

* fmt

* add tests for `filterd_candidates`

* add "IN" to reserved words

* remove "IN"

* add test cases

* add debug_assertions

* return complete directly

* add s

* make input field private

* update gobang.gif
3 years ago
Takayuki Maeda f42ebafe68
Enter to expand database tree (#85)
* enter to expand database tree

* always check if the key is enter

* return current_selection

* fix clippy warnings
3 years ago
Takayuki Maeda 4a3d32cf9b fix clippy warnings 3 years ago
Takayuki Maeda 6bc3afef12 move table_status under table 3 years ago
Takayuki Maeda ba3dcaad69 add queries for SQLit 3 years ago
Takayuki Maeda ae639a3da2
get indexes (#46) 3 years ago
Takayuki Maeda 1d7d6b48dc
get foreign keys (#44) 3 years ago
Takayuki Maeda 2a0abf65cb
Add constraints tab (#41)
* get constraints

* replace / with .

* add constraint tab

* return TableRow

* remove comment column

* fix clippy warnings
3 years ago
Takayuki Maeda d493f46875
Use command for clipboard instead of copypasta (#36)
* use copy command instead of copypasta

* remove a step for installing dependencies

* rename copy_string to copy_to_clipboard
3 years ago
Takayuki Maeda 5da6b1b796
Support PostgreSQL (#35)
* move utils into database module

* draw help in connections view

* support postgres

* add table_schema field

* implement Pool for Postgres

* fix database tree for postgres

* add tests for selection_top, bottom

* fix clippy warnings

* remove unused function

* get schema

* fix clippy warnings

* show user defined types

* fix cell with when selecting far right cell

* split tests into tree functions

* convert TEXT[] to Vec<String>

* add prefix

* remove column pattern matching
3 years ago
Takayuki Maeda 8f26ffed09
Highlight filter keywords (#34)
* highlight filter keywords

* remove src from gitignore

* move tree_nav

* remove unneeded line

* refactor databases component

* fix variable names

* update gobang.gif

* add scroll_up_down_multiple_lines command help

* add tests for tree_item_to_span
3 years ago
Takayuki Maeda 07b2b5090f
Add key config (#33)
* implement key config

* use key config in help component

* use key config in databases component

* use key config in error component

* use key config in connections component

* set commands

* use database/table as a table component name

* fix a test for get_text

* use key config in tab component

* fix function name

* add focus_connections key

* use quit exit key
3 years ago
Takayuki Maeda 3c00d78326
Implement Help component (#32)
* implement help compoment

* fix database filter

* add column types

* fix clippy warnings

* help scrolling

* panic if type is not implemented yet

* not panic but return error

* add decimal

* add a test for get_text

* fix clippy warnings
3 years ago
Takayuki Maeda c768ffd461
Refactor Table component (#31)
* fix table component field names

* refactor function name

* add a test for is_number_column

* fix variable names

* make some fields private
3 years ago
Takayuki Maeda 7e8291be22
Select multiple cells (#30)
* select multiple cells

* define `expand_selected_area_x`, `expand_selected_area_y`

* make some table component fields private

* fix keymap

* fix a cell selection bug in page 2 and after

* add tests for `is_selected_cell` and `selected_cells`

* select cells while scrolling right

* calculate the number of cells considering cell spacing

* add tests for expand_selected_area

* add comments

* implement `reset`

* fix clippy warnings
3 years ago
Takayuki Maeda 98ca815c68
Filter records (#24)
* filter records

* refactor components event

* fix scrollbar style

* remove unneeded doc

* fix event order and table filter cursor

* fix and enhance databases filter
3 years ago
Takayuki Maeda a9f918b53d
add error component (#19) 3 years ago
Takayuki Maeda 0ebb39f3cd
Implement TableValue component (#17)
* use table value component

* add todo

* add linux target_os

* add default features for copypasta

* fix clippy warnings

* update gobang.gif
3 years ago
Takayuki Maeda f221e817a3
Refactor components (#12)
* add logger

* add shift key

* implement record table reset function

* fix style

* ignore gobang.log

* use table component

* remove doc

* pass focused as an argument

* remove unused enums

* create table component

* use databases component

* use query component

* remove unused fields

* use query component

* use connections component

* remove unused struct

* use tab component

* use table status component

* remove unneeded return type

* update gobang.gif
3 years ago
Takayuki Maeda acac235c6e
Implement DatabaseTree (#10)
* remove unused functions

* remove unused functions

* use databasetree

* update gobang.gif

* refactor

* remove unused dependencies

* fix header's and row's default style
3 years ago
Takayuki Maeda 8ca65cafa4
Implement structure tab (#9)
* implement structure tab

* fix border colors

* remove margin
3 years ago
Takayuki Maeda b8c36b5f94
implement query widget (#8) 3 years ago
Takayuki Maeda 4b26b71a38
Refactor handlers (#3)
* fix workflows

* remove a unused function

* initialize record table state every time specifying table

* add a crates.io badge

* close pool if exists

* remove unneeded lines

* change gobang.gif

* fix layout

* update gobang.gif

* refactor `utils::get_records`

* refactor handlers

* change gobang.gif

* fix clippy warnings
3 years ago
Takayuki Maeda 1daec68bb2 Merge branch 'main' of github.com:TaKO8Ki/gobang 3 years ago
Takayuki Maeda 82b47a1c78
Architecture (#1)
* layout

* architecture

* implement side-scrolling

* implement util functions

* use user config

* use config conn

* remove cache

* fix user config

* add useful functions

* remov mut

* cargo clippy --fix

* cargo fmt

* implement some handlers

* add gif

* chang gif
3 years ago
Takayuki Maeda a101eeb702 layout 3 years ago