flammarion 0.1.10pre1 → 0.1.10pre2

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,7 +11,8 @@ app.on 'ready', ->
11
11
  webPreferences:
12
12
  nodeIntegration: false
13
13
  webSecurity: false
14
- icon:"icon.png"
14
+ preload:preload
15
+ icon:path.resolve(path.join(__dirname, "icon.png"))
15
16
  preload:preload
16
17
  main_window.loadURL(process.argv[2])
17
18
  main_window.setMenu(null)
@@ -18,9 +18,10 @@
18
18
  height: parseInt(process.argv[4]) || 600,
19
19
  webPreferences: {
20
20
  nodeIntegration: false,
21
- webSecurity: false
21
+ webSecurity: false,
22
+ preload: preload
22
23
  },
23
- icon: "icon.png",
24
+ icon: path.resolve(path.join(__dirname, "icon.png")),
24
25
  preload: preload
25
26
  });
26
27
  main_window.loadURL(process.argv[2]);
@@ -1,10 +1,12 @@
1
- window.$remote = require('remote')
2
-
3
- webFrame = require('web-frame')
1
+ try
2
+ window.$remote = require('remote')
3
+ webFrame = require('web-frame')
4
+ catch error
5
+ window.$remote = require('electron').remote
6
+ {webFrame} = require('electron')
4
7
 
5
8
  try
6
9
  spellcheck = require('spellchecker')
7
-
8
10
  webFrame.setSpellCheckProvider("en-US", true, {
9
11
  spellCheck: (text) ->
10
12
  return !spellcheck.isMisspelled(text)
@@ -15,3 +17,5 @@ catch error
15
17
  window.onkeyup = (e) ->
16
18
  if e.ctrlKey and e.keyCode is 70
17
19
  window.show_search_bar()
20
+ if e.ctrlKey and e.shiftKey and e.keyCode is 73
21
+ $remote.getCurrentWindow().toggleDevTools()
@@ -2,9 +2,14 @@
2
2
  (function() {
3
3
  var error, spellcheck, webFrame;
4
4
 
5
- window.$remote = require('remote');
6
-
7
- webFrame = require('web-frame');
5
+ try {
6
+ window.$remote = require('remote');
7
+ webFrame = require('web-frame');
8
+ } catch (_error) {
9
+ error = _error;
10
+ window.$remote = require('electron').remote;
11
+ webFrame = require('electron').webFrame;
12
+ }
8
13
 
9
14
  try {
10
15
  spellcheck = require('spellchecker');
@@ -20,7 +25,10 @@
20
25
 
21
26
  window.onkeyup = function(e) {
22
27
  if (e.ctrlKey && e.keyCode === 70) {
23
- return window.show_search_bar();
28
+ window.show_search_bar();
29
+ }
30
+ if (e.ctrlKey && e.shiftKey && e.keyCode === 73) {
31
+ return $remote.getCurrentWindow().toggleDevTools();
24
32
  }
25
33
  };
26
34
 
@@ -1,3 +1,3 @@
1
1
  module Flammarion
2
- VERSION = "0.1.10pre1"
2
+ VERSION = "0.1.10pre2"
3
3
  end
@@ -7806,12 +7806,20 @@ window.font_awesome_list = ["glass","music","search","envelope-o","heart","star"
7806
7806
  element.append(option);
7807
7807
  }
7808
7808
  }
7809
+ if (data.value) {
7810
+ element.val(data.value);
7811
+ }
7809
7812
  element.change((function(_this) {
7810
7813
  return function(e) {
7811
- var val;
7814
+ var error, val;
7812
7815
  val = element.find('option:selected').text();
7813
7816
  if (element.find('option:selected')[0].value) {
7814
- val = $.parseJSON(element.find('option:selected')[0].value);
7817
+ try {
7818
+ val = $.parseJSON(element.find('option:selected')[0].value);
7819
+ } catch (_error) {
7820
+ error = _error;
7821
+ val = element.find('option:selected')[0].value;
7822
+ }
7815
7823
  }
7816
7824
  return _this.__parent.send({
7817
7825
  id: data.id,
@@ -420,12 +420,20 @@ return"undefined"!=typeof b&&""!==b&&b in a.jsEscapeMap?(d=a.jsEscapeMap[b],e=a.
420
420
  element.append(option);
421
421
  }
422
422
  }
423
+ if (data.value) {
424
+ element.val(data.value);
425
+ }
423
426
  element.change((function(_this) {
424
427
  return function(e) {
425
- var val;
428
+ var error, val;
426
429
  val = element.find('option:selected').text();
427
430
  if (element.find('option:selected')[0].value) {
428
- val = $.parseJSON(element.find('option:selected')[0].value);
431
+ try {
432
+ val = $.parseJSON(element.find('option:selected')[0].value);
433
+ } catch (_error) {
434
+ error = _error;
435
+ val = element.find('option:selected')[0].value;
436
+ }
429
437
  }
430
438
  return _this.__parent.send({
431
439
  id: data.id,
@@ -621,6 +621,9 @@ Railscasts-like style (c) Visoft, Inc. (Damien White)
621
621
  #dialog > #content > .full-button {
622
622
  height: 1em;
623
623
  }
624
+ #dialog > #content pre {
625
+ font-family: Menlo, Consolas, monospace;
626
+ }
624
627
 
625
628
  body {
626
629
  background-color: #1d1f21;
@@ -44,3 +44,6 @@
44
44
  #dialog > #content > .full-button {
45
45
  height: 1em;
46
46
  }
47
+ #dialog > #content pre {
48
+ font-family: Menlo, Consolas, monospace;
49
+ }
@@ -129,10 +129,14 @@ $.extend WSClient.prototype.actions,
129
129
  option = $("<option>#{k}</option>")
130
130
  option.val(JSON.stringify(v))
131
131
  element.append(option)
132
+ element.val(data.value) if data.value
132
133
  element.change (e) =>
133
134
  val = element.find('option:selected').text()
134
135
  if element.find('option:selected')[0].value
135
- val = $.parseJSON(element.find('option:selected')[0].value)
136
+ try
137
+ val = $.parseJSON(element.find('option:selected')[0].value)
138
+ catch error
139
+ val = element.find('option:selected')[0].value
136
140
  @__parent.send({
137
141
  id:data.id
138
142
  action:'callback'
@@ -30,3 +30,5 @@
30
30
  overflow auto
31
31
  & > .full-button
32
32
  height 1em
33
+ & pre
34
+ font-family $main-font
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flammarion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10pre1
4
+ version: 0.1.10pre2
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-08-06 00:00:00.000000000 Z
12
+ date: 2016-08-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rubame