Skip to content

Commit

Permalink
publish 1.9.2
Browse files Browse the repository at this point in the history
  • Loading branch information
evs-chris committed Jul 25, 2024
1 parent f034f0c commit d5efa68
Show file tree
Hide file tree
Showing 5 changed files with 394 additions and 20 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## 1.9.2

2024-07-25

### Bugs

* The pg-difficult trigger will no longer be included in schemas.

### Features

* Query views now have a splitter between the sql and the results, allowing them to be resized.


## 1.9.1

2024-07-25
Expand Down
32 changes: 19 additions & 13 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<script src="./[email protected]/Window.js"></script>
<script src="./[email protected]/AppBar.js"></script>
<script src="./[email protected]/Shell.js"></script>
<script src="./[email protected]/Split.js"></script>
<script src="./[email protected]/Menu.js"></script>
<script src="./[email protected]/Popover.js"></script>
<script src="./[email protected]/Tabs.js"></script>
Expand Down Expand Up @@ -538,18 +539,20 @@ <h2 style="text-align: center;">
<button title="Download this query result as delimited text (csv/tsv)." on-click="@.downloadQuery(~/result)">Download</button>
{{/if}}
</div>
<div class="query">
<div class="query-text" as-tracked=`ace` as-ace="{ bind: '~/query', syntax: 'pgsql', theme: @style.theme == 'dark' ? 'tomorrow_night_eighties' : 'github', wrap: ~/editor.wrap, highlightActive: ~/editor.highlightActive, fontSize: '1em', font: 'monospace', printMargin: ~/editor.printMargin, keymode: ~/editor.keymode }" on-keydown="@event.ctrlKey && @event.key === 'Enter' ? @.runQuery(~/query) : true" />
<div class="result">
<data-table auto-titles no-wrap fixed-header allow-select=false on-init="@.set('@.table', $1)" items="{{~/result}}">
<bottom>
<div style="display:flex; justify-content: space-between;">
<span>{{#if !~/result.length && ~/affected != null}}{{~/affected}} rows affected.{{/if}} {{#unless ~/error}}{{~/result.length || 'No'}} rows{{#if ~/result.length}}, {{@.table.data.columns.length}} cols{{/if}}{{/unless}}</span>
<span>{{#if ~/runtime != null}}Completed in {{~/runtime}}ms{{/if}}</span>
</div>
</bottom>
</data-table>
</div>
<div class="query" style="position: relative;">
<split>
<div size=20 class="query-text" as-tracked=`ace` as-ace="{ bind: '~/query', syntax: 'pgsql', theme: @style.theme == 'dark' ? 'tomorrow_night_eighties' : 'github', wrap: ~/editor.wrap, highlightActive: ~/editor.highlightActive, fontSize: '1em', font: 'monospace', printMargin: ~/editor.printMargin, keymode: ~/editor.keymode }" on-keydown="@event.ctrlKey && @event.key === 'Enter' ? @.runQuery(~/query) : true" />
<div class="result">
<data-table auto-titles no-wrap fixed-header allow-select=false on-init="@.set('@.table', $1)" items="{{~/result}}">
<bottom>
<div style="display:flex; justify-content: space-between;">
<span>{{#if !~/result.length && ~/affected != null}}{{~/affected}} rows affected.{{/if}} {{#unless ~/error}}{{~/result.length || 'No'}} rows{{#if ~/result.length}}, {{@.table.data.columns.length}} cols{{/if}}{{/unless}}</span>
<span>{{#if ~/runtime != null}}Completed in {{~/runtime}}ms{{/if}}</span>
</div>
</bottom>
</data-table>
</div>
</split>
</div>
</script>

Expand Down Expand Up @@ -909,6 +912,7 @@ <h2 style="text-align: center;">
<option>typescript</option>
<option>ejs</option>
<option>handlebars</option>
<option>csharp</option>
</select></label>
</div>
<div style="flex-grow: 1;" as-ace="{ bind: 'pad.text', syntax: pad.syntax || 'plain_text', theme: @style.theme == 'dark' ? 'tomorrow_night_eighties' : 'github', wrap: ~/editor.wrap, highlightActive: ~/editor.highlightActive, fontSize: '1em', font: 'monospace', printMargin: ~/editor.printMargin, keymode: ~/editor.keymode }" />
Expand Down Expand Up @@ -980,7 +984,9 @@ <h2 style="text-align: center;">
{{/if}}
</tab>
<tab title="Query" no-pad>
{{>query}}
<div style="position: relative; height: 100%; flex-grow: 1; display: flex; flex-direction: column;">
{{>query}}
</div>
</tab>
<tab title="Reports" no-pad>
<div style="display: flex; height: 100%; margin-top: 2px;">
Expand Down
20 changes: 14 additions & 6 deletions docs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { Window } = RauiWindow;

registerOperator({ type: 'value', names: ['log'], apply: (_name, args) => console.log.apply(console, args) });

Ractive.use(RauiButton.plugin(), RauiForm.plugin({ includeStyle: true }), RauiShell.plugin(), RauiMenu.plugin(), RauiWindow.plugin(), RauiAppBar.plugin(), RauiTabs.plugin(), RauiTable.plugin({ includeGrid: true }), RauiVirtualList.plugin());
Ractive.use(RauiButton.plugin(), RauiForm.plugin({ includeStyle: true }), RauiShell.plugin(), RauiSplit.plugin(), RauiMenu.plugin(), RauiWindow.plugin(), RauiAppBar.plugin(), RauiTabs.plugin(), RauiTable.plugin({ includeGrid: true }), RauiVirtualList.plugin());

Ractive.perComponentStyleElements = true;

Expand Down Expand Up @@ -294,6 +294,10 @@ const app = globalThis.app = new App({
bg: '#dedede',
},
},
'raui.split.handle': {
bg: 'rgba(0, 0, 0, 0.1)',
fg: 'rgba(0, 0, 0, 0.4)',
},
});
} else if (v === 'dark') {
Ractive.styleSet({
Expand All @@ -310,7 +314,11 @@ const app = globalThis.app = new App({
header: {
bg: '#2a2a2a',
},
}
},
'raui.split.handle': {
bg: 'rgba(255, 255, 255, 0.1)',
fg: 'rgba(255, 255, 255, 0.4)',
},
});
}
},
Expand Down Expand Up @@ -701,9 +709,9 @@ Window.extendWith(Query, {
options: { title: 'Query', flex: true, close: true, width: '50em', height: '40em', resizable: true },
css: `
.query { flex-grow: 1; display: flex; flex-direction: column; overflow: hidden; }
.query .query-text { display: flex; min-height: 20%; }
.query .query-text { height: 100%; }
.query textarea { width: 100%; border: 0; outline: none; }
.query .result { display: flex; border-top: 1px solid; overflow: hidden; flex-grow: 1; }
.query .result { display: flex; border-top: 1px solid; overflow: hidden; flex-grow: 1; height: 100%; box-sizing: border-box; }
`,
on: {
init() {
Expand Down Expand Up @@ -1558,9 +1566,9 @@ Window.extendWith(HostExplore, {
return `div.host { background-color: ${data('raui.primary.bg') || '#fff'}; }
.filter-pane { background-color: ${data('raui.window.host.bg') || '#eee'}; height: 3.5em; }
.query { flex-grow: 1; display: flex; flex-direction: column; overflow: hidden; }
.query .query-text { display: flex; min-height: 20%; }
.query .query-text { height: 100%; }
.query textarea { width: 100%; border: 0; outline: none; }
.query .result { display: flex; border-top: 1px solid; overflow: hidden; flex-grow: 1; }
.query .result { display: flex; border-top: 1px solid; overflow: hidden; flex-grow: 1; height: 100%; box-sizing: border-box; }
.selected { background-color: rgba(128, 128, 128, 0.1); }
dd { white-space: pre-wrap; }
`;
Expand Down
Loading

0 comments on commit d5efa68

Please sign in to comment.