Skip to content

Commit

Permalink
Version 0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Paxa committed Feb 6, 2018
1 parent da16c0e commit 05a80ee
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 38 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
== Version 0.7.1

* Feature: Updating values in table
* Show NULL as “NULL”
* Fix CSV export, save more then 500 rows
* Better text for deletting rows (Thanks to @nickheiner-usds)
* Support Upper case for table names, columns, indexes
* Reduce content pagination to 200
* Add “Create Database” in top menu
* Add refreshing mat. view
* Fix renaming tables
* Skip alert when pg native exception not compiled
* Fix reset zoom & reload
* Update readme and contributing guide
* More async/await

== Version 0.7.0 (22-oct-2017)
Expand Down
7 changes: 4 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
You gonna need any, not too old, version of nodejs and npm. Ruby (already installed in Mac), command line tools from Apple for compiling Postgres native extension.

npm install
rake rebuild_ext
npm run rebuild_ext

## Run from source code:

Expand All @@ -30,8 +30,9 @@ As a workaround, before creating package need to delete developer dependecies fr
# make sure you have ran "rake rebuild_ext"
# delete "devDependencies" from package.json
npm prune
npm install electron-packager@10.1.1
sudo npm install -g electron@1.7.10
npm install -g electron-packager@10.1.1
npm install -g requireg
sudo npm install -g electron@1.7.12
node packager.js
rake build_dmg
```
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Postbird is PostgreSQL GUI client for macOS, written in JavaScript, runs with El

## Download

**Version 0.7.0**
**Version 0.7.1**

[Postbird-0.7.0.dmg](https://github.com/Paxa/postbird/releases/download/0.7.0/Postbird-0.7.0.dmg) - OS X 10.9+ 64bit
[Postbird-0.7.1.dmg](https://github.com/Paxa/postbird/releases/download/0.7.1/Postbird-0.7.1.dmg) - OS X 10.9+ 64bit


## Development
Expand Down
1 change: 0 additions & 1 deletion app/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ $u.textContextMenu = function (element, currentWindow) {
};

$u.textareaAutoSize = function (element) {
console.log('textareaAutoSize', element);
function resize (event) {
event.target.style.height = 'auto';
event.target.style.height = event.target.scrollHeight+'px';
Expand Down
1 change: 0 additions & 1 deletion app/views/dialogs/edit_value.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class EditValue extends Dialog {
var input = this.content.find('[name=value]');

this.content.find('.value-is-null').on('change', event => {
console.log('value-is-null', event.target.checked);
if (event.target.checked) {
valueBeforeNull = input.val();
input.val("").prop('disabled', true);
Expand Down
2 changes: 1 addition & 1 deletion app/views/pane.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Pane {
//with(this) {
var exec = el.getAttribute('exec');
if (!exec.match(/\(.*\)/)) exec = exec + '()';
console.log('EXEC', `this.${exec}`);
//console.log('EXEC', `this.${exec}`);
eval(`this.${exec}`);
//}
});
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Postbird",
"main": "main.js",
"version": "0.7.0",
"version": "0.7.1",
"repository": "https://github.com/Paxa/postbird",
"license": "MIT",
"scripts": {
Expand All @@ -22,7 +22,7 @@
},
"dependencies": {
"colors": "^1.1.2",
"csv-stringify": "^2.0.0",
"csv-stringify": "^2.0.1",
"electron-window-state": "4.1.1",
"eventemitter2": "5.0.1",
"is-electron-renderer": "^2.0.1",
Expand Down
5 changes: 3 additions & 2 deletions packager.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var packageJson = require('./package.json');
var child_process = require('child_process');

var opts = {
electronVersion: '1.7.9',
electronVersion: '1.7.12',
dir: '.',
arch: 'x64',
platform: 'darwin',
Expand All @@ -25,7 +25,8 @@ var opts = {
'node_modules/pug/test',
'node_modules/pug-lexer/test',
'node_modules/pug-parser/test',
'node_modules/pug-linker/test'
'node_modules/pug-linker/test',
'node_modules/uglify-js'
],
asar: false,
afterCopy: [(buildPath, electronVersion, platform, arch, callback) => {
Expand Down
50 changes: 26 additions & 24 deletions views/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -619,69 +619,71 @@ pug_html = pug_html + "\n \u003Cbutton class=\"cancel\"\u003E";
;pug_debug_line = 4;pug_debug_filename = "views\u002Fdialogs\u002Fedit_procedure.jade";
pug_html = pug_html + "Close\u003C\u002Fbutton\u003E\n\u003C\u002Fp\u003E";}.call(this,"proc" in locals_for_with?locals_for_with.proc:typeof proc!=="undefined"?proc:undefined));} catch (err) {pug.rethrow(err, pug_debug_filename, pug_debug_line, pug_debug_sources[pug_debug_filename]);};return pug_html;};
exports["dialogs/edit_procedure"].content = "textarea.editor= proc.source\n\np.buttons.close-btn\n button.cancel Close";
exports["dialogs/edit_value"] = function template(pug, locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_debug_filename, pug_debug_line;try {var pug_debug_sources = {"views\u002Fdialogs\u002Fedit_value.jade":"form\n - valueIsNull = fieldType.is_nullable && value === null\n\n p\n if fieldType.data_type == \"integer\" || fieldType.udt_name == \"float8\"\n input.number-value(name=\"value\" type=\"number\" value=value disabled=valueIsNull)\n else if fieldType.udt_name == \"timestamp\" || fieldType.udt_name == \"timestamptz\" || fieldType.udt_name == \"date\" || fieldType.udt_name == \"timetz\"\n input.date-value(name=\"value\" type=\"text\" value=editDateFormat(value, fieldType.udt_name) disabled=valueIsNull)\n else if fieldType.udt_name == \"bool\"\n select(name=\"value\" disabled=valueIsNull)\n option(value=\"true\" selected=value) true\n option(value=\"false\" selected=(value === false) ) false\n else\n if fieldType.udt_name == \"json\" || fieldType.udt_name == \"jsonb\"\n - value = JSON.stringify(value, null, 2)\n textarea(name=\"value\" placeholder=fieldType.column_default disabled=valueIsNull)= value\n\n if fieldType.is_nullable\n label\n = \"Null\"\n input.value-is-null(type=\"checkbox\" name=\"value_is_null\" value=\"true\" checked=valueIsNull )\n\n p.buttons\n button.ok Update\n button.cancel Cancel\n"};
;var locals_for_with = (locals || {});(function (JSON, editDateFormat, fieldType, value, valueIsNull) {var pug_indent = [];
exports["dialogs/edit_value"] = function template(pug, locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_debug_filename, pug_debug_line;try {var pug_debug_sources = {"views\u002Fdialogs\u002Fedit_value.jade":"form\n - valueIsNull = fieldType.is_nullable && value === null\n\n p\n - numericTypes = ['bigint', 'integer', 'real', 'smallint', 'double precision', 'numeric', 'decimal']\n if fieldType.data_type == \"integer\" || numericTypes.includes(fieldType.udt_name) || numericTypes.includes(fieldType.data_type)\n input.number-value(name=\"value\" type=\"number\" value=value disabled=valueIsNull)\n else if fieldType.udt_name == \"timestamp\" || fieldType.udt_name == \"timestamptz\" || fieldType.udt_name == \"date\" || fieldType.udt_name == \"timetz\"\n input.date-value(name=\"value\" type=\"text\" value=editDateFormat(value, fieldType.udt_name) disabled=valueIsNull)\n else if fieldType.udt_name == \"bool\"\n select(name=\"value\" disabled=valueIsNull)\n option(value=\"true\" selected=value) true\n option(value=\"false\" selected=(value === false) ) false\n else\n if fieldType.udt_name == \"json\" || fieldType.udt_name == \"jsonb\"\n - value = JSON.stringify(value, null, 2)\n textarea(name=\"value\" placeholder=fieldType.column_default disabled=valueIsNull)= value\n\n if fieldType.is_nullable\n label\n = \"Null\"\n input.value-is-null(type=\"checkbox\" name=\"value_is_null\" value=\"true\" checked=valueIsNull )\n\n p.buttons\n button.ok Update\n button.cancel Cancel\n"};
;var locals_for_with = (locals || {});(function (JSON, editDateFormat, fieldType, numericTypes, value, valueIsNull) {var pug_indent = [];
;pug_debug_line = 1;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "\n\u003Cform\u003E";
;pug_debug_line = 2;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
valueIsNull = fieldType.is_nullable && value === null
;pug_debug_line = 4;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "\n \u003Cp\u003E";
;pug_debug_line = 5;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
if (fieldType.data_type == "integer" || fieldType.udt_name == "float8") {
numericTypes = ['bigint', 'integer', 'real', 'smallint', 'double precision', 'numeric', 'decimal']
;pug_debug_line = 6;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
if (fieldType.data_type == "integer" || numericTypes.includes(fieldType.udt_name) || numericTypes.includes(fieldType.data_type)) {
;pug_debug_line = 7;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "\n \u003Cinput" + (" class=\"number-value\""+" name=\"value\" type=\"number\""+pug.attr("value", value, true, false)+pug.attr("disabled", valueIsNull, true, false)) + "\u002F\u003E";
}
else
if (fieldType.udt_name == "timestamp" || fieldType.udt_name == "timestamptz" || fieldType.udt_name == "date" || fieldType.udt_name == "timetz") {
;pug_debug_line = 8;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
;pug_debug_line = 9;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "\n \u003Cinput" + (" class=\"date-value\""+" name=\"value\" type=\"text\""+pug.attr("value", editDateFormat(value, fieldType.udt_name), true, false)+pug.attr("disabled", valueIsNull, true, false)) + "\u002F\u003E";
}
else
if (fieldType.udt_name == "bool") {
;pug_debug_line = 10;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "\n \u003Cselect" + (" name=\"value\""+pug.attr("disabled", valueIsNull, true, false)) + "\u003E";
;pug_debug_line = 11;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "\n \u003Cselect" + (" name=\"value\""+pug.attr("disabled", valueIsNull, true, false)) + "\u003E";
;pug_debug_line = 12;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "\n \u003Coption" + (" value=\"true\""+pug.attr("selected", value, true, false)) + "\u003E";
;pug_debug_line = 11;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "true\u003C\u002Foption\u003E";
;pug_debug_line = 12;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "true\u003C\u002Foption\u003E";
;pug_debug_line = 13;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "\n \u003Coption" + (" value=\"false\""+pug.attr("selected", (value === false), true, false)) + "\u003E";
;pug_debug_line = 12;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
;pug_debug_line = 13;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "false\u003C\u002Foption\u003E\n \u003C\u002Fselect\u003E";
}
else {
;pug_debug_line = 14;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
if (fieldType.udt_name == "json" || fieldType.udt_name == "jsonb") {
;pug_debug_line = 15;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
if (fieldType.udt_name == "json" || fieldType.udt_name == "jsonb") {
;pug_debug_line = 16;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
value = JSON.stringify(value, null, 2)
}
;pug_debug_line = 16;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
;pug_debug_line = 17;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "\n \u003Ctextarea" + (" name=\"value\""+pug.attr("placeholder", fieldType.column_default, true, false)+pug.attr("disabled", valueIsNull, true, false)) + "\u003E";
;pug_debug_line = 16;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
;pug_debug_line = 17;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + (pug.escape(null == (pug_interp = value) ? "" : pug_interp)) + "\u003C\u002Ftextarea\u003E";
}
pug_html = pug_html + "\n \u003C\u002Fp\u003E";
;pug_debug_line = 18;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
if (fieldType.is_nullable) {
;pug_debug_line = 19;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "\n \u003Clabel\u003E";
if (fieldType.is_nullable) {
;pug_debug_line = 20;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + (pug.escape(null == (pug_interp = "Null") ? "" : pug_interp));
pug_html = pug_html + "\n \u003Clabel\u003E";
;pug_debug_line = 21;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + (pug.escape(null == (pug_interp = "Null") ? "" : pug_interp));
;pug_debug_line = 22;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "\n \u003Cinput" + (" class=\"value-is-null\""+" type=\"checkbox\" name=\"value_is_null\" value=\"true\""+pug.attr("checked", valueIsNull, true, false)) + "\u002F\u003E\n \u003C\u002Flabel\u003E";
}
;pug_debug_line = 23;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "\n \u003Cp class=\"buttons\"\u003E";
;pug_debug_line = 24;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "\n \u003Cp class=\"buttons\"\u003E";
;pug_debug_line = 25;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "\n \u003Cbutton class=\"ok\"\u003E";
;pug_debug_line = 24;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "Update\u003C\u002Fbutton\u003E";
;pug_debug_line = 25;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "Update\u003C\u002Fbutton\u003E";
;pug_debug_line = 26;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "\n \u003Cbutton class=\"cancel\"\u003E";
;pug_debug_line = 25;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "Cancel\u003C\u002Fbutton\u003E\n \u003C\u002Fp\u003E\n\u003C\u002Fform\u003E";}.call(this,"JSON" in locals_for_with?locals_for_with.JSON:typeof JSON!=="undefined"?JSON:undefined,"editDateFormat" in locals_for_with?locals_for_with.editDateFormat:typeof editDateFormat!=="undefined"?editDateFormat:undefined,"fieldType" in locals_for_with?locals_for_with.fieldType:typeof fieldType!=="undefined"?fieldType:undefined,"value" in locals_for_with?locals_for_with.value:typeof value!=="undefined"?value:undefined,"valueIsNull" in locals_for_with?locals_for_with.valueIsNull:typeof valueIsNull!=="undefined"?valueIsNull:undefined));} catch (err) {pug.rethrow(err, pug_debug_filename, pug_debug_line, pug_debug_sources[pug_debug_filename]);};return pug_html;};
exports["dialogs/edit_value"].content = "form\n - valueIsNull = fieldType.is_nullable && value === null\n\n p\n if fieldType.data_type == \"integer\" || fieldType.udt_name == \"float8\"\n input.number-value(name=\"value\" type=\"number\" value=value disabled=valueIsNull)\n else if fieldType.udt_name == \"timestamp\" || fieldType.udt_name == \"timestamptz\" || fieldType.udt_name == \"date\" || fieldType.udt_name == \"timetz\"\n input.date-value(name=\"value\" type=\"text\" value=editDateFormat(value, fieldType.udt_name) disabled=valueIsNull)\n else if fieldType.udt_name == \"bool\"\n select(name=\"value\" disabled=valueIsNull)\n option(value=\"true\" selected=value) true\n option(value=\"false\" selected=(value === false) ) false\n else\n if fieldType.udt_name == \"json\" || fieldType.udt_name == \"jsonb\"\n - value = JSON.stringify(value, null, 2)\n textarea(name=\"value\" placeholder=fieldType.column_default disabled=valueIsNull)= value\n\n if fieldType.is_nullable\n label\n = \"Null\"\n input.value-is-null(type=\"checkbox\" name=\"value_is_null\" value=\"true\" checked=valueIsNull )\n\n p.buttons\n button.ok Update\n button.cancel Cancel\n";
;pug_debug_line = 26;pug_debug_filename = "views\u002Fdialogs\u002Fedit_value.jade";
pug_html = pug_html + "Cancel\u003C\u002Fbutton\u003E\n \u003C\u002Fp\u003E\n\u003C\u002Fform\u003E";}.call(this,"JSON" in locals_for_with?locals_for_with.JSON:typeof JSON!=="undefined"?JSON:undefined,"editDateFormat" in locals_for_with?locals_for_with.editDateFormat:typeof editDateFormat!=="undefined"?editDateFormat:undefined,"fieldType" in locals_for_with?locals_for_with.fieldType:typeof fieldType!=="undefined"?fieldType:undefined,"numericTypes" in locals_for_with?locals_for_with.numericTypes:typeof numericTypes!=="undefined"?numericTypes:undefined,"value" in locals_for_with?locals_for_with.value:typeof value!=="undefined"?value:undefined,"valueIsNull" in locals_for_with?locals_for_with.valueIsNull:typeof valueIsNull!=="undefined"?valueIsNull:undefined));} catch (err) {pug.rethrow(err, pug_debug_filename, pug_debug_line, pug_debug_sources[pug_debug_filename]);};return pug_html;};
exports["dialogs/edit_value"].content = "form\n - valueIsNull = fieldType.is_nullable && value === null\n\n p\n - numericTypes = ['bigint', 'integer', 'real', 'smallint', 'double precision', 'numeric', 'decimal']\n if fieldType.data_type == \"integer\" || numericTypes.includes(fieldType.udt_name) || numericTypes.includes(fieldType.data_type)\n input.number-value(name=\"value\" type=\"number\" value=value disabled=valueIsNull)\n else if fieldType.udt_name == \"timestamp\" || fieldType.udt_name == \"timestamptz\" || fieldType.udt_name == \"date\" || fieldType.udt_name == \"timetz\"\n input.date-value(name=\"value\" type=\"text\" value=editDateFormat(value, fieldType.udt_name) disabled=valueIsNull)\n else if fieldType.udt_name == \"bool\"\n select(name=\"value\" disabled=valueIsNull)\n option(value=\"true\" selected=value) true\n option(value=\"false\" selected=(value === false) ) false\n else\n if fieldType.udt_name == \"json\" || fieldType.udt_name == \"jsonb\"\n - value = JSON.stringify(value, null, 2)\n textarea(name=\"value\" placeholder=fieldType.column_default disabled=valueIsNull)= value\n\n if fieldType.is_nullable\n label\n = \"Null\"\n input.value-is-null(type=\"checkbox\" name=\"value_is_null\" value=\"true\" checked=valueIsNull )\n\n p.buttons\n button.ok Update\n button.cancel Cancel\n";
exports["dialogs/export_file"] = function template(pug, locals) {var pug_html = "", pug_mixins = {}, pug_interp;var pug_debug_filename, pug_debug_line;try {var pug_debug_sources = {"views\u002Fdialogs\u002Fexport_file.jade":"header\n = \"Exporting database '\"\n b= database\n = \"'\"\n\nform\n p.save-to-file\n = \"Save to file:\"\n input(type=\"text\" name=\"export_to_file\" readonly placeholder=\"click to select file...\")\n p\n label\n = \"Export structure\"\n input(type=\"checkbox\" name=\"export_structure\" checked)\n p\n label\n = \"Export data\"\n input(type=\"checkbox\" name=\"export_data\" checked)\n\n p\n label\n = \"Objects ownership\"\n input(type=\"checkbox\" name=\"objects_ownership\")\n\n code.result\n\n p.buttons\n button.ok Start\n button.cancel Cancel\n p.buttons.close-btn.is-hidden\n button.cancel Close"};
;var locals_for_with = (locals || {});(function (database) {var pug_indent = [];
;pug_debug_line = 1;pug_debug_filename = "views\u002Fdialogs\u002Fexport_file.jade";
Expand Down
3 changes: 2 additions & 1 deletion views/dialogs/edit_value.jade
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ form
- valueIsNull = fieldType.is_nullable && value === null

p
if fieldType.data_type == "integer" || fieldType.udt_name == "float8"
- numericTypes = ['bigint', 'integer', 'real', 'smallint', 'double precision', 'numeric', 'decimal']
if fieldType.data_type == "integer" || numericTypes.includes(fieldType.udt_name) || numericTypes.includes(fieldType.data_type)
input.number-value(name="value" type="number" value=value disabled=valueIsNull)
else if fieldType.udt_name == "timestamp" || fieldType.udt_name == "timestamptz" || fieldType.udt_name == "date" || fieldType.udt_name == "timetz"
input.date-value(name="value" type="text" value=editDateFormat(value, fieldType.udt_name) disabled=valueIsNull)
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ css@^2.0.0:
source-map-resolve "^0.3.0"
urix "^0.1.0"

csv-stringify@^2.0.0:
csv-stringify@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/csv-stringify/-/csv-stringify-2.0.1.tgz#bba2a1e1129818bb3e6712914ec3c84d45a9d8c0"
dependencies:
Expand Down

0 comments on commit 05a80ee

Please sign in to comment.