mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 22:30:15 +00:00
No more codemirror ld-json, fixed sidebar footer css overflow, added bracket closing
This commit is contained in:
parent
d58edf1d25
commit
b97a0ef7a9
@ -54,7 +54,7 @@ class Toast extends Component {
|
||||
// Fade the notification in
|
||||
setTimeout(() => this.setState({visible: true}), 1000);
|
||||
|
||||
trackEvent('Notification', 'Shown', notification.key);
|
||||
trackEvent('Notification', 'Shown', notification.key, {nonInteraction: true});
|
||||
};
|
||||
|
||||
_loadSeen () {
|
||||
|
@ -30,6 +30,7 @@ import 'codemirror/addon/display/autorefresh';
|
||||
import 'codemirror/addon/search/search';
|
||||
import 'codemirror/addon/search/searchcursor';
|
||||
import 'codemirror/addon/edit/matchbrackets';
|
||||
import 'codemirror/addon/edit/closebrackets';
|
||||
import 'codemirror/addon/search/matchesonscrollbar';
|
||||
import 'codemirror/addon/search/matchesonscrollbar.css';
|
||||
import 'codemirror/addon/fold/foldgutter';
|
||||
@ -56,6 +57,7 @@ const BASE_CODEMIRROR_OPTIONS = {
|
||||
lint: true,
|
||||
tabSize: 4,
|
||||
matchBrackets: true,
|
||||
autoCloseBrackets: true,
|
||||
indentUnit: 4,
|
||||
indentWithTabs: true,
|
||||
gutters: [
|
||||
@ -227,12 +229,6 @@ class Editor extends Component {
|
||||
|
||||
// Strip of charset if there is one
|
||||
options.mode = options.mode ? options.mode.split(';')[0] : 'text/plain';
|
||||
|
||||
if (this._isJSON(options.mode)) {
|
||||
// set LD JSON because it highlights the keys a different color
|
||||
options.mode = {name: 'javascript', jsonld: true}
|
||||
}
|
||||
|
||||
Object.keys(options).map(key => {
|
||||
this.codeMirror.setOption(key, options[key]);
|
||||
});
|
||||
|
@ -190,10 +190,6 @@
|
||||
color: lighten(@surprise, 5);
|
||||
}
|
||||
|
||||
.cm-s-default span.cm-property, .cm-s-default span.cm-attribute {
|
||||
color: lighten(@success, 5);
|
||||
}
|
||||
|
||||
.cm-s-default span.cm-keyword {
|
||||
color: #f92672;
|
||||
}
|
||||
@ -206,6 +202,10 @@
|
||||
color: lighten(@notice, 5);
|
||||
}
|
||||
|
||||
.cm-s-default span.cm-property, .cm-s-default span.cm-attribute {
|
||||
color: lighten(@success, 5);
|
||||
}
|
||||
|
||||
.cm-s-default span.cm-variable {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
@ -354,10 +354,13 @@
|
||||
.sidebar__footer {
|
||||
height: @line-height-xs;
|
||||
border-top: 1px solid @hl-md;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.sidebar__footer > button,
|
||||
.sidebar__footer .dropdown > button {
|
||||
background: red;
|
||||
font-size: @font-size-sm;
|
||||
padding: @padding-xs @padding-md;
|
||||
height: 100%;
|
||||
|
@ -95,7 +95,7 @@
|
||||
"dependencies": {
|
||||
"analytics-node": "^2.1.0",
|
||||
"classnames": "^2.2.3",
|
||||
"codemirror": "^5.18.2",
|
||||
"codemirror": "^5.22.0",
|
||||
"electron-context-menu": "^0.4.0",
|
||||
"electron-cookies": "^1.1.0",
|
||||
"electron-squirrel-startup": "^1.0.0",
|
||||
|
Loading…
Reference in New Issue
Block a user