mirror of
https://github.com/garraflavatra/rolens.git
synced 2025-01-18 13:07:58 +00:00
Update shortcuts (fixes #51)
This commit is contained in:
parent
e53019a4b0
commit
ce9934faa7
26
INSTALL.md
26
INSTALL.md
@ -23,28 +23,4 @@ If you have Node.js installed, just download the source from GitHub, and run `./
|
||||
|
||||
## Advanced build
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Rolens is written in Go, so you should download the Go compiler from [the download page](https://go.dev/dl/). The minimum version required is 1.18. You can confirm whether it's installed correctly by running `go version` and checking that it outputs something similar to `go1.18.2`.
|
||||
|
||||
Furthermore, you need to have [Wails ^3.1](https://wails.io/docs/gettingstarted/installation) installed: `go install github.com/wailsapp/wails/v2/cmd/wails@latest`. Wails may have platform-specific dependencies; you can consult `wails doctor` to find out what dependencies Wails needs and how to install them.
|
||||
|
||||
In order to compile the frontend, [Node.js](https://nodejs.org/en/download) ^16.0 and the [npm](https://npmjs.com) package manager ^8.0 (included in Node.js) are required. To confirm the installed versions of those tools, execute `node -v` and `npm -v`.
|
||||
|
||||
### Download source
|
||||
|
||||
To obtain a copy of the source code, do either of the following:
|
||||
|
||||
* Download a tarball or zip archive from the [release page](https://github.com/garraflavatra/rolens/releases/latest). Make sure you download the source archive, and not a pre-compiled binary.
|
||||
* Or clone [the Git repository](https://github.com/garraflavatra/rolens): `git clone https://github.com/garraflavatra/rolens.git`.
|
||||
|
||||
### Compile
|
||||
|
||||
`cd` into the root directory of the source code and run either:
|
||||
|
||||
* `wails build` to generate an executable for your platform.
|
||||
* `wails build -nsis` to generate an [NSIS installer](https://nsis.sourceforge.io/Main_Page) for Windows. This requires that you have NSIS installed on your machine.
|
||||
|
||||
The generated binary will live in `build/bin`. You may want to run the installer (Windows) or move the app to the Applications folder (Mac).
|
||||
|
||||
If Wails complains that there are too many open files, you can try to increase the maximum number of open files using [`ulimit -f 1024`](https://www.man7.org/linux/man-pages/man1/ulimit.1p.html) (or whichever value) on *nix systems.
|
||||
Please see the [advanced build documentation](https://garraflavatra.github.io/rolens/development/advanced-build/) for a more profound insight in the build procedure.
|
||||
|
33
docs/development/advanced-build.md
Normal file
33
docs/development/advanced-build.md
Normal file
@ -0,0 +1,33 @@
|
||||
---
|
||||
title: Advanced build process
|
||||
parent: Development
|
||||
order: 10
|
||||
---
|
||||
|
||||
If you just want to install Rolens, please refer to the [installation document](https://garraflavatra.github.io/rolens/installation/). You can read this guide to get a detailed overview of the build procedure.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
Rolens is written in Go, so you should download the Go compiler from [the download page](https://go.dev/dl/). The minimum version required is 1.18. You can confirm whether it's installed correctly by running `go version` and checking that it outputs something similar to `go1.18.2`.
|
||||
|
||||
Furthermore, you need to have [Wails ^3.1](https://wails.io/docs/gettingstarted/installation) installed: `go install github.com/wailsapp/wails/v2/cmd/wails@latest`. Wails may have platform-specific dependencies; you can consult `wails doctor` to find out what dependencies Wails needs and how to install them.
|
||||
|
||||
In order to compile the frontend, [Node.js](https://nodejs.org/en/download) ^16.0 and the [npm](https://npmjs.com) package manager ^8.0 (included in Node.js) are required. To confirm the installed versions of those tools, execute `node -v` and `npm -v`.
|
||||
|
||||
### Download source
|
||||
|
||||
To obtain a copy of the source code, do either of the following:
|
||||
|
||||
* Download a tarball or zip archive from the [release page](https://github.com/garraflavatra/rolens/releases/latest). Make sure you download the source archive, and not a pre-compiled binary.
|
||||
* Or clone [the Git repository](https://github.com/garraflavatra/rolens): `git clone https://github.com/garraflavatra/rolens.git`.
|
||||
|
||||
### Compile
|
||||
|
||||
`cd` into the root directory of the source code and run either:
|
||||
|
||||
* `wails build` to generate an executable for your platform.
|
||||
* `wails build -nsis` to generate an [NSIS installer](https://nsis.sourceforge.io/Main_Page) for Windows. This requires that you have NSIS installed on your machine.
|
||||
|
||||
The generated binary will live in `build/bin`. You may want to run the installer (Windows) or move the app to the Applications folder (Mac).
|
||||
|
||||
If Wails complains that there are too many open files, you can try to increase the maximum number of open files using [`ulimit -f 1024`](https://www.man7.org/linux/man-pages/man1/ulimit.1p.html) (or whichever value) on *nix systems.
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Build directory
|
||||
parent: Development
|
||||
order: 50
|
||||
order: 30
|
||||
---
|
||||
|
||||
{% filecontent "../build/README.md", 2 %}
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Logfiles
|
||||
parent: User guide
|
||||
order: 120
|
||||
parent: Development
|
||||
order: 40
|
||||
---
|
||||
|
||||
Rolens keeps track of log-worthy events and logs them in its log directory.
|
@ -4,6 +4,8 @@ parent: User guide
|
||||
order: 30
|
||||
---
|
||||
|
||||
## Shortcuts
|
||||
|
||||
You can use the following shortcuts when you have opened a collection.
|
||||
|
||||
{% render "shortcuts", shortcuts: shortcuts.collections %}
|
||||
{% render "shortcuts", shortcuts: shortcuts["Managing collections"] %}
|
||||
|
@ -2,5 +2,10 @@
|
||||
title: Databases
|
||||
parent: User guide
|
||||
order: 20
|
||||
stub: true
|
||||
---
|
||||
|
||||
## Shortcuts
|
||||
|
||||
You can use the following shortcuts when you have opened a database.
|
||||
|
||||
{% render "shortcuts", shortcuts: shortcuts["Managing databases"] %}
|
||||
|
@ -2,5 +2,10 @@
|
||||
title: Managing hosts
|
||||
parent: User guide
|
||||
order: 10
|
||||
stub: true
|
||||
---
|
||||
|
||||
## Shortcuts
|
||||
|
||||
You can use the following shortcuts to manage hosts and connections.
|
||||
|
||||
{% render "shortcuts", shortcuts: shortcuts["Connecting to hosts"] %}
|
||||
|
12
docs/user-guide/shortcuts.liquid
Normal file
12
docs/user-guide/shortcuts.liquid
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
title: Shortcut reference
|
||||
parent: User guide
|
||||
order: 900
|
||||
---
|
||||
|
||||
<p>You can use the following shortcuts to manage hosts and connections.</p>
|
||||
|
||||
{% for item in shortcuts %}
|
||||
<h2>{{ item[0] }}</h2>
|
||||
{% render "shortcuts", shortcuts: item[1] %}
|
||||
{% endfor %}
|
@ -5,7 +5,7 @@
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
|
||||
export let collection;
|
||||
export let query = undefined;
|
||||
export let query = {};
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
const exportInfo = { ...query, viewKey: collection.viewKey };
|
||||
|
@ -38,10 +38,10 @@
|
||||
});
|
||||
|
||||
EventsOn('ui.coll.new', () => $hostTree[activeHostKey]?.databases[activeDbKey]?.newCollection());
|
||||
EventsOn('ui.coll.export', () => $hostTree[activeHostKey]?.databases[activeDbKey]?.collections[activeCollKey]?.export());
|
||||
EventsOn('ui.coll.truncate', () => $hostTree[activeHostKey]?.databases[activeDbKey]?.collections[activeCollKey]?.truncate());
|
||||
EventsOn('ui.coll.drop', () => $hostTree[activeHostKey]?.databases[activeDbKey]?.collections[activeCollKey]?.drop());
|
||||
EventsOn('ui.coll.tab', tab => collTab = tab);
|
||||
|
||||
</script>
|
||||
|
||||
<div class="tree">
|
||||
|
@ -41,11 +41,11 @@ func (a *App) Menu() *menu.Menu {
|
||||
appMenu.Append(menu.EditMenu())
|
||||
}
|
||||
|
||||
aboutMenu.AddText("Quit Rolens", keys.CmdOrCtrl("q"), func(cd *menu.CallbackData) { wailsRuntime.Quit(a.ctx) })
|
||||
aboutMenu.AddText("Quit Rolens", keys.CmdOrCtrl("Q"), func(cd *menu.CallbackData) { wailsRuntime.Quit(a.ctx) })
|
||||
|
||||
hostMenu := appMenu.AddSubmenu("Host")
|
||||
hostMenu.AddText("New…", nil, menuCallbackEmit(a, "ui.host.new"))
|
||||
hostMenu.AddText("Edit host…", nil, menuCallbackEmit(a, "ui.host.edit"))
|
||||
hostMenu.AddText("New…", keys.OptionOrAlt("C"), menuCallbackEmit(a, "ui.host.new"))
|
||||
hostMenu.AddText("Edit host…", keys.OptionOrAlt("H"), menuCallbackEmit(a, "ui.host.edit"))
|
||||
hostMenu.AddSeparator()
|
||||
hostMenu.AddText("Server status", nil, menuCallbackEmit(a, "ui.host.tab", "status"))
|
||||
hostMenu.AddText("System info", nil, menuCallbackEmit(a, "ui.host.tab", "systemInfo"))
|
||||
@ -54,7 +54,7 @@ func (a *App) Menu() *menu.Menu {
|
||||
hostMenu.AddText("Remove host…", nil, menuCallbackEmit(a, "ui.host.remove"))
|
||||
|
||||
dbMenu := appMenu.AddSubmenu("Database")
|
||||
dbMenu.AddText("New…", nil, menuCallbackEmit(a, "ui.db.new"))
|
||||
dbMenu.AddText("New…", keys.OptionOrAlt("D"), menuCallbackEmit(a, "ui.db.new"))
|
||||
dbMenu.AddSeparator()
|
||||
dbMenu.AddText("Database statistics", nil, menuCallbackEmit(a, "ui.db.tab", "stats"))
|
||||
dbMenu.AddText("Shell", nil, menuCallbackEmit(a, "ui.db.tab", "shell"))
|
||||
@ -63,22 +63,23 @@ func (a *App) Menu() *menu.Menu {
|
||||
dbMenu.AddText("Drop…", nil, menuCallbackEmit(a, "ui.db.drop"))
|
||||
|
||||
collMenu := appMenu.AddSubmenu("Collection")
|
||||
collMenu.AddText("New…", nil, menuCallbackEmit(a, "ui.coll.new"))
|
||||
collMenu.AddText("New…", keys.OptionOrAlt("T"), menuCallbackEmit(a, "ui.coll.new"))
|
||||
collMenu.AddSeparator()
|
||||
collMenu.AddText("Collection statistics", nil, menuCallbackEmit(a, "ui.coll.tab", "stats"))
|
||||
collMenu.AddText("Find", nil, menuCallbackEmit(a, "ui.coll.tab", "find"))
|
||||
collMenu.AddText("Insert", nil, menuCallbackEmit(a, "ui.coll.tab", "insert"))
|
||||
collMenu.AddText("Update", nil, menuCallbackEmit(a, "ui.coll.tab", "update"))
|
||||
collMenu.AddText("Remove", nil, menuCallbackEmit(a, "ui.coll.tab", "remove"))
|
||||
collMenu.AddText("Indexes", nil, menuCallbackEmit(a, "ui.coll.tab", "indexes"))
|
||||
collMenu.AddText("Aggregate", nil, menuCallbackEmit(a, "ui.coll.tab", "aggregate"))
|
||||
collMenu.AddText("Shell", nil, menuCallbackEmit(a, "ui.coll.tab", "shell"))
|
||||
collMenu.AddText("Collection statistics", keys.Combo("S", keys.CmdOrCtrlKey, keys.ShiftKey), menuCallbackEmit(a, "ui.coll.tab", "stats"))
|
||||
collMenu.AddText("Find", keys.Combo("F", keys.CmdOrCtrlKey, keys.ShiftKey), menuCallbackEmit(a, "ui.coll.tab", "find"))
|
||||
collMenu.AddText("Insert", keys.Combo("I", keys.CmdOrCtrlKey, keys.ShiftKey), menuCallbackEmit(a, "ui.coll.tab", "insert"))
|
||||
collMenu.AddText("Update", keys.Combo("P", keys.CmdOrCtrlKey, keys.ShiftKey), menuCallbackEmit(a, "ui.coll.tab", "update"))
|
||||
collMenu.AddText("Remove", keys.Combo("R", keys.CmdOrCtrlKey, keys.ShiftKey), menuCallbackEmit(a, "ui.coll.tab", "remove"))
|
||||
collMenu.AddText("Indexes", keys.Combo("X", keys.CmdOrCtrlKey, keys.ShiftKey), menuCallbackEmit(a, "ui.coll.tab", "indexes"))
|
||||
collMenu.AddText("Aggregate", keys.Combo("A", keys.CmdOrCtrlKey, keys.ShiftKey), menuCallbackEmit(a, "ui.coll.tab", "aggregate"))
|
||||
collMenu.AddText("Shell", keys.Combo("H", keys.CmdOrCtrlKey, keys.ShiftKey), menuCallbackEmit(a, "ui.coll.tab", "shell"))
|
||||
collMenu.AddSeparator()
|
||||
collMenu.AddText("Export…", keys.OptionOrAlt("E"), menuCallbackEmit(a, "ui.coll.exort"))
|
||||
collMenu.AddText("Truncate…", nil, menuCallbackEmit(a, "ui.coll.truncate"))
|
||||
collMenu.AddText("Drop…", nil, menuCallbackEmit(a, "ui.coll.drop"))
|
||||
|
||||
helpMenu := appMenu.AddSubmenu("Help")
|
||||
helpMenu.AddText("User guide", nil, menuCallbackOpenURL(a, "https://garraflavatra.github.io/rolens/user-guide/"))
|
||||
helpMenu.AddText("User guide", keys.CmdOrCtrl("/"), menuCallbackOpenURL(a, "https://garraflavatra.github.io/rolens/user-guide/"))
|
||||
helpMenu.AddText("Website", nil, menuCallbackOpenURL(a, "https://garraflavatra.github.io/rolens/"))
|
||||
helpMenu.AddText("Discussion board", nil, menuCallbackOpenURL(a, "https://github.com/garraflavatra/rolens/discussions"))
|
||||
helpMenu.AddSeparator()
|
||||
|
@ -1,14 +1,22 @@
|
||||
{
|
||||
"collections": [
|
||||
{ "description": "Open Stats panel", "option": true, "ctrl": true, "symbol": "H", "link": "/user-guide/collections/stats/" },
|
||||
{ "description": "Open Find panel", "option": true, "ctrl": true, "symbol": "F", "link": "/user-guide/collections/find/" },
|
||||
{ "description": "Open Insert panel", "option": true, "ctrl": true, "symbol": "I", "link": "/user-guide/collections/insert/" },
|
||||
{ "description": "Open Update panel", "option": true, "ctrl": true, "symbol": "U", "link": "/user-guide/collections/update/" },
|
||||
{ "description": "Open Remove panel", "option": true, "ctrl": true, "symbol": "R", "link": "/user-guide/collections/remove/" },
|
||||
{ "description": "Open Indexes panel", "option": true, "ctrl": true, "symbol": "X", "link": "/user-guide/collections/indexes/" },
|
||||
{ "description": "Open Aggregate panel", "option": true, "ctrl": true, "symbol": "A", "link": "/user-guide/collections/aggregate/" }
|
||||
"Connecting to hosts": [
|
||||
{ "description": "Create a new host", "option": true, "symbol": "C", "link": "/user-guide/hosts/" },
|
||||
{ "description": "Edit host", "option": true, "symbol": "H", "link": "/user-guide/hosts/" }
|
||||
],
|
||||
"preferences": [
|
||||
"Managing databases": [
|
||||
{ "description": "Create a new database", "option": true, "symbol": "D", "link": "/user-guide/databases/" }
|
||||
],
|
||||
"Managing collections": [
|
||||
{ "description": "Open collection statistics", "shift": true, "ctrl": true, "symbol": "S", "link": "/user-guide/collections/stats/" },
|
||||
{ "description": "Open find panel", "shift": true, "ctrl": true, "symbol": "F", "link": "/user-guide/collections/find/" },
|
||||
{ "description": "Open insert panel", "shift": true, "ctrl": true, "symbol": "I", "link": "/user-guide/collections/insert/" },
|
||||
{ "description": "Open update panel", "shift": true, "ctrl": true, "symbol": "P", "link": "/user-guide/collections/update/" },
|
||||
{ "description": "Open remove panel", "shift": true, "ctrl": true, "symbol": "R", "link": "/user-guide/collections/remove/" },
|
||||
{ "description": "Show indexes", "shift": true, "ctrl": true, "symbol": "X", "link": "/user-guide/collections/indexes/" },
|
||||
{ "description": "Aggregate", "shift": true, "ctrl": true, "symbol": "A", "link": "/user-guide/collections/aggregate/" },
|
||||
{ "description": "Open shell", "shift": true, "ctrl": true, "symbol": "H", "link": "/user-guide/collections/aggregate/" }
|
||||
],
|
||||
"Preferences": [
|
||||
{ "description": "Open preferences", "ctrl": true, "symbol": ",", "link": "/user-guide/preferences/" }
|
||||
]
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{%- if shortcut.shift -%}<kbd>⇧</kbd>{%- endif -%}
|
||||
{%- if shortcut.option -%}<kbd>⌥</kbd>{%- endif -%}
|
||||
{%- if shortcut.ctrl -%}<kbd>⌘</kbd>{%- endif -%}
|
||||
{%- if shortcut.symbol -%}<kbd>{{ shortcut.symbol }}</kbd>{%- endif -%}
|
||||
{%- if shortcut.symbol -%}<kbd>{{ shortcut.symbol | upcase }}</kbd>{%- endif -%}
|
||||
|
@ -294,3 +294,12 @@ article {
|
||||
stroke: none;
|
||||
}
|
||||
}
|
||||
|
||||
// PRINT
|
||||
|
||||
@media print {
|
||||
main > aside,
|
||||
article footer > p:not(:last-child) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user