diff --git a/docs/images/shell.png b/docs/images/shell.png new file mode 100644 index 0000000..6cbbd8c Binary files /dev/null and b/docs/images/shell.png differ diff --git a/docs/user-guide/shell.md b/docs/user-guide/shell.md new file mode 100644 index 0000000..db23cc7 --- /dev/null +++ b/docs/user-guide/shell.md @@ -0,0 +1,15 @@ +--- +title: Shell +summary: "Write and execute MongoDB shell scripts within Rolens" +parent: User guide +order: 60 +stub: true +--- + +Rolens has a shell feature: it provides an editor for writing shell scripts and executing them against a local or external host, database, or even a single collection. You can find it under the _Shell_ tab. + +![The shell tab](/images/shell.png) + +## Requirements + +To use the script editor, you need to install the official [`mongosh` tool](https://www.mongodb.com/docs/mongodb-shell/) from MongoDB. You can [download it](https://www.mongodb.com/try/download/shell) from the MongoDB web site, or run `brew install mongosh` if you use a Mac. diff --git a/frontend/src/components/icon.svelte b/frontend/src/components/icon.svelte index 428552b..e53f38c 100644 --- a/frontend/src/components/icon.svelte +++ b/frontend/src/components/icon.svelte @@ -29,12 +29,16 @@ height: 13px; margin-right: 2px; } - :global(.button) svg { height: 13px; width: auto; vertical-align: bottom; } + :global(.blankstate .button) svg { + height: 17px; + vertical-align: -3px; + margin-right: 4px; + } { @@ -108,7 +118,17 @@
- {#if busy} + {#if !$environment.hasMongoShell} + + + + {:else if busy} {:else if result.errorTitle || result.errorDescription}