From 553f13fb04284c8cd8e064f58c27736e36fc957b Mon Sep 17 00:00:00 2001 From: LianaHus Date: Wed, 3 Apr 2019 13:59:29 +0200 Subject: [PATCH 1/7] capital later for Gist --- src/app/ui/landing-page/landing-page.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/ui/landing-page/landing-page.js b/src/app/ui/landing-page/landing-page.js index 8e3b3790bd..02e7871512 100644 --- a/src/app/ui/landing-page/landing-page.js +++ b/src/app/ui/landing-page/landing-page.js @@ -82,7 +82,7 @@ export class LandingPage extends ApiFactory { description: ``, payload: () => { this.alert(`-imported from gist-`) } }, - { label: 'Import from gist', + { label: 'Import from Gist', type: `callback`, description: ``, payload: () => { From b32ad8aa8c4a0677e9057b75765391fedf29398b Mon Sep 17 00:00:00 2001 From: LianaHus Date: Wed, 3 Apr 2019 14:41:23 +0200 Subject: [PATCH 2/7] remove buttom line of tabs --- src/app/files/file-explorer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/files/file-explorer.js b/src/app/files/file-explorer.js index b569d105ee..97707c211d 100644 --- a/src/app/files/file-explorer.js +++ b/src/app/files/file-explorer.js @@ -432,7 +432,7 @@ fileExplorer.prototype.packageFiles = function (filesProvider, callback) { content = '// this line is added to create a gist. Empty file is not allowed.' } if (error) cb(error) - else { + else {gi ret[path] = { content } cb() } From d6d52eec51be0e272a68db69d8ba3cf0b19837d5 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Wed, 3 Apr 2019 20:06:25 +0200 Subject: [PATCH 3/7] style fixes --- src/app/files/file-explorer.js | 2 +- src/app/files/styles/file-explorer-styles.js | 2 +- src/app/panels/styles/terminal-styles.js | 5 ++--- src/app/panels/tab-proxy.js | 4 ++-- src/app/panels/terminal.js | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/app/files/file-explorer.js b/src/app/files/file-explorer.js index 97707c211d..b569d105ee 100644 --- a/src/app/files/file-explorer.js +++ b/src/app/files/file-explorer.js @@ -432,7 +432,7 @@ fileExplorer.prototype.packageFiles = function (filesProvider, callback) { content = '// this line is added to create a gist. Empty file is not allowed.' } if (error) cb(error) - else {gi + else { ret[path] = { content } cb() } diff --git a/src/app/files/styles/file-explorer-styles.js b/src/app/files/styles/file-explorer-styles.js index daff4e19ca..19af1a39d6 100644 --- a/src/app/files/styles/file-explorer-styles.js +++ b/src/app/files/styles/file-explorer-styles.js @@ -19,7 +19,7 @@ var css = csjs` padding : 4px; } .newFile { - padding-right : 5px; + padding-right : 10px; } .newFile i { cursor : pointer; diff --git a/src/app/panels/styles/terminal-styles.js b/src/app/panels/styles/terminal-styles.js index 0466c2c4a5..184e127ab5 100644 --- a/src/app/panels/styles/terminal-styles.js +++ b/src/app/panels/styles/terminal-styles.js @@ -13,7 +13,6 @@ var css = csjs` .bar { display : flex; min-height : 3em; - padding : 2px; z-index : 3; } .menu { @@ -35,7 +34,7 @@ var css = csjs` } .toggleTerminal { margin-right : 20px; - margin-left : 20px; + margin-left : 4px; font-size : 14px; font-weight : bold; cursor : pointer; @@ -138,7 +137,7 @@ var css = csjs` display : flex; justify-content : center; align-items : center; - font-size : 10px; + font-size : 14px; } .dragbarHorizontal { position : absolute; diff --git a/src/app/panels/tab-proxy.js b/src/app/panels/tab-proxy.js index d83f8be086..995e68d717 100644 --- a/src/app/panels/tab-proxy.js +++ b/src/app/panels/tab-proxy.js @@ -107,8 +107,8 @@ export class TabProxy { ` let tabsbar = yo` -
-
+
+
diff --git a/src/app/panels/terminal.js b/src/app/panels/terminal.js index 741529a23f..6cf8587a40 100644 --- a/src/app/panels/terminal.js +++ b/src/app/panels/terminal.js @@ -143,7 +143,7 @@ class Terminal {
${self._view.dropdown}
- +
From d5f65ba5aa9771b018e1abc28a24d87fbecd5282 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Wed, 3 Apr 2019 20:35:22 +0200 Subject: [PATCH 4/7] tab style --- src/app/panels/tab-proxy.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/panels/tab-proxy.js b/src/app/panels/tab-proxy.js index 995e68d717..48d40549cc 100644 --- a/src/app/panels/tab-proxy.js +++ b/src/app/panels/tab-proxy.js @@ -107,9 +107,9 @@ export class TabProxy {
` let tabsbar = yo` -
-
- +
+
+ From b21f84459223bb7b3be959ffe264ed4d48d5fcf8 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Thu, 4 Apr 2019 12:41:24 +0200 Subject: [PATCH 5/7] added ctrl +- to editor --- src/app/editor/editor.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/app/editor/editor.js b/src/app/editor/editor.js index 797304dfcf..83fd681783 100644 --- a/src/app/editor/editor.js +++ b/src/app/editor/editor.js @@ -101,6 +101,35 @@ class Editor { // Unmap ctrl-t & ctrl-f this.editor.commands.bindKeys({ 'ctrl-t': null }) + + // shortcuts for "Ctrl-"" and "Ctrl+"" to increase/decrease font size of the editor + this.editor.commands.addCommand({ + name: 'increasefontsizeEqual', + bindKey: {win: 'Ctrl-=', mac: 'Command-='}, + exec: (editor) => { + this.editorFontSize(1) + }, + readOnly: true + }) + + this.editor.commands.addCommand({ + name: 'increasefontsizePlus', + bindKey: {win: 'Ctrl-+', mac: 'Command-+'}, + exec: (editor) => { + this.editorFontSize(1) + }, + readOnly: true + }) + + this.editor.commands.addCommand({ + name: 'decreasefontsize', + bindKey: {win: 'Ctrl--', mac: 'Command--'}, + exec: (editor) => { + this.editorFontSize(-1) + }, + readOnly: true + }) + this.editor.setShowPrintMargin(false) this.editor.resize(true) From 2a0e009ece44793ab8b6fa74ced2da044b3bf558 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Thu, 4 Apr 2019 13:10:23 +0200 Subject: [PATCH 6/7] removed +- from ui. adjust layout --- src/app/components/swap-panel-component.js | 6 +++--- src/app/editor/editor.js | 5 ++++- src/app/panels/styles/terminal-styles.js | 3 ++- src/app/panels/tab-proxy.js | 12 ++---------- src/app/panels/terminal.js | 2 +- 5 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/app/components/swap-panel-component.js b/src/app/components/swap-panel-component.js index 47c433bbb0..3431fe2cc6 100644 --- a/src/app/components/swap-panel-component.js +++ b/src/app/components/swap-panel-component.js @@ -77,7 +77,7 @@ const css = csjs` } .plugItIn { display : none; - height: calc(100% - 50px); + height : 100%; } .plugItIn > div { overflow-y : auto; @@ -95,8 +95,8 @@ const css = csjs` text-transform: uppercase; } .swapitHeader { - height: 50px; - padding-top: 16px; + height: 35px; + padding-top: 10px; padding-left: 27px; } ` diff --git a/src/app/editor/editor.js b/src/app/editor/editor.js index 83fd681783..2750ecdd40 100644 --- a/src/app/editor/editor.js +++ b/src/app/editor/editor.js @@ -276,7 +276,10 @@ class Editor { * @param {number} incr The amount of pixels to add to the font. */ editorFontSize (incr) { - this.editor.setFontSize(this.editor.getFontSize() + incr) + let newSize = this.editor.getFontSize() + incr + if (newSize >= 6) { + this.editor.setFontSize(newSize) + } } /** diff --git a/src/app/panels/styles/terminal-styles.js b/src/app/panels/styles/terminal-styles.js index 184e127ab5..58d91cc8fc 100644 --- a/src/app/panels/styles/terminal-styles.js +++ b/src/app/panels/styles/terminal-styles.js @@ -34,7 +34,8 @@ var css = csjs` } .toggleTerminal { margin-right : 20px; - margin-left : 4px; + margin-left : 2px; + margin-top : 2px; font-size : 14px; font-weight : bold; cursor : pointer; diff --git a/src/app/panels/tab-proxy.js b/src/app/panels/tab-proxy.js index 48d40549cc..23b6f76167 100644 --- a/src/app/panels/tab-proxy.js +++ b/src/app/panels/tab-proxy.js @@ -102,18 +102,12 @@ export class TabProxy { this._view.filetabs.canAdd = false this._view.tabs = yo` -
+
${this._view.filetabs}
` let tabsbar = yo` -
-
- - - - -
+
${this._view.tabs}
` @@ -138,8 +132,6 @@ export class TabProxy { return false }) - function increase () { self.editor.editorFontSize(1) } - function decrease () { self.editor.editorFontSize(-1) } return tabsbar } } diff --git a/src/app/panels/terminal.js b/src/app/panels/terminal.js index 6cf8587a40..21b6aa2c09 100644 --- a/src/app/panels/terminal.js +++ b/src/app/panels/terminal.js @@ -120,7 +120,7 @@ class Terminal { ` self._view.icon = yo` ` + class="btn btn-secondary align-items-center ${css.toggleTerminal} fa fa-angle-double-down">` self._view.dragbar = yo`
` self._view.dropdown = self._components.dropdown.render() From 1e78f453280aabdd0b35946d54e833c0867dbc91 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Thu, 4 Apr 2019 14:41:44 +0200 Subject: [PATCH 7/7] border for terminal (temprorary) --- src/app/panels/terminal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/panels/terminal.js b/src/app/panels/terminal.js index 21b6aa2c09..808fd912f7 100644 --- a/src/app/panels/terminal.js +++ b/src/app/panels/terminal.js @@ -158,7 +158,7 @@ class Terminal {
` self._view.el = yo` -
+
${self._view.bar} ${self._view.term}