Skip to content

Commit d20f005

Browse files
committed
apply electron & cleanup old app files
1 parent 5dbfb24 commit d20f005

111 files changed

Lines changed: 312 additions & 10368 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

browser/main/Components/CodeEditor.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var React = require('react/addons')
22

3-
var ace = require('ace')
3+
var ace = window.ace
44
var CodeEditor = React.createClass({
55
propTypes: {
66
code: React.PropTypes.string,

browser/main/Components/CodeViewer.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var React = require('react/addons')
22

3-
var ace = require('ace')
3+
var ace = window.ace
44
var CodeViewer = React.createClass({
55
propTypes: {
66
code: React.PropTypes.string,

browser/main/Containers/MainContainer.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ module.exports = React.createClass({
1313
this.unsubscribe()
1414
},
1515
onListen: function (res) {
16+
if (res == null || res.status == null) {
17+
return
18+
}
19+
1620
if (res.status === 'loggedIn' || res.status === 'registered') {
1721
var user = res.data
1822
var planet = user.Planets.length > 0 ? user.Planets[0] : null

browser/main/index.electron.html

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,48 @@
44
<title>CodeXen</title>
55

66
<link rel="stylesheet" href="../vendor/fontawesome/css/font-awesome.min.css" media="screen" title="no title" charset="utf-8">
7+
<link rel="shortcut icon" href="favicon.ico">
8+
<link rel="stylesheet" href="style.css">
9+
<script>
10+
if (!Object.assign) {
11+
Object.defineProperty(Object, 'assign', {
12+
enumerable: false,
13+
configurable: true,
14+
writable: true,
15+
value: function(target) {
16+
'use strict';
17+
if (target === undefined || target === null) {
18+
throw new TypeError('Cannot convert first argument to object');
19+
}
20+
21+
var to = Object(target);
22+
for (var i = 1; i < arguments.length; i++) {
23+
var nextSource = arguments[i];
24+
if (nextSource === undefined || nextSource === null) {
25+
continue;
26+
}
27+
nextSource = Object(nextSource);
728

29+
var keysArray = Object.keys(Object(nextSource));
30+
for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
31+
var nextKey = keysArray[nextIndex];
32+
var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
33+
if (desc !== undefined && desc.enumerable) {
34+
to[nextKey] = nextSource[nextKey];
35+
}
36+
}
37+
}
38+
return to;
39+
}
40+
});
41+
}
42+
</script>
843
</head>
944
<body>
1045
<div id="content"></div>
46+
<script src="../ace/src-min/ace.js"></script>
1147
<script>
12-
require('node-jsx').install({ harmony: true, extension: '.jsx' });
48+
require('node-jsx').install({ harmony: true, extension: '.jsx' })
1349
require('./index.jsx')
1450
</script>
1551
</body>

browser/main/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,6 @@
5151
<div id="content"></div>
5252
<script src="http://localhost:8090/webpack-dev-server.js"></script>
5353
<script type="text/javascript" src="http://localhost:8090/assets/main.js"></script>
54+
<script type="text/javascript" src="http://localhost:8090/assets/main-style.js"></script>
5455
</body>
5556
</html>

browser/main/index.jsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
require('../styles/main/index.styl')
2-
require('react-select/dist/default.css')
3-
41
var React = require('react/addons')
52

63
var ReactRouter = require('react-router')

browser/main/style.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
require('../styles/main/index.styl')
2+
require('react-select/dist/default.css')
Lines changed: 260 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,260 @@
1+
/**
2+
* React Select
3+
* ============
4+
* Created by Jed Watson and Joss Mackison for KeystoneJS, http://www.keystonejs.com/
5+
* https://twitter.com/jedwatson https://twitter.com/jossmackison https://twitter.com/keystonejs
6+
* MIT License: https://github.com/keystonejs/react-select
7+
*/
8+
.Select {
9+
position: relative;
10+
}
11+
.Select-control {
12+
position: relative;
13+
overflow: hidden;
14+
background-color: #ffffff;
15+
border: 1px solid #cccccc;
16+
border-color: #d9d9d9 #cccccc #b3b3b3;
17+
border-radius: 4px;
18+
box-sizing: border-box;
19+
color: #333333;
20+
cursor: default;
21+
outline: none;
22+
padding: 8px 52px 8px 10px;
23+
transition: all 200ms ease;
24+
}
25+
.Select-control:hover {
26+
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
27+
}
28+
.is-searchable.is-open > .Select-control {
29+
cursor: text;
30+
}
31+
.is-open > .Select-control {
32+
border-bottom-right-radius: 0;
33+
border-bottom-left-radius: 0;
34+
background: #ffffff;
35+
border-color: #b3b3b3 #cccccc #d9d9d9;
36+
}
37+
.is-open > .Select-control > .Select-arrow {
38+
border-color: transparent transparent #999999;
39+
border-width: 0 5px 5px;
40+
}
41+
.is-searchable.is-focused:not(.is-open) > .Select-control {
42+
cursor: text;
43+
}
44+
.is-focused:not(.is-open) > .Select-control {
45+
border-color: #0088cc #0099e6 #0099e6;
46+
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 5px -1px rgba(0, 136, 204, 0.5);
47+
}
48+
.Select-placeholder {
49+
color: #aaaaaa;
50+
padding: 8px 52px 8px 10px;
51+
position: absolute;
52+
top: 0;
53+
left: 0;
54+
right: -15px;
55+
max-width: 100%;
56+
overflow: hidden;
57+
text-overflow: ellipsis;
58+
white-space: nowrap;
59+
}
60+
.has-value > .Select-control > .Select-placeholder {
61+
color: #333333;
62+
}
63+
.Select-input > input {
64+
cursor: default;
65+
background: none transparent;
66+
box-shadow: none;
67+
height: auto;
68+
border: 0 none;
69+
font-family: inherit;
70+
font-size: inherit;
71+
margin: 0;
72+
padding: 0;
73+
outline: none;
74+
display: inline-block;
75+
-webkit-appearance: none;
76+
}
77+
.is-focused .Select-input > input {
78+
cursor: text;
79+
}
80+
.Select-control:not(.is-searchable) > .Select-input {
81+
outline: none;
82+
}
83+
.Select-loading {
84+
-webkit-animation: Select-animation-spin 400ms infinite linear;
85+
-o-animation: Select-animation-spin 400ms infinite linear;
86+
animation: Select-animation-spin 400ms infinite linear;
87+
width: 16px;
88+
height: 16px;
89+
box-sizing: border-box;
90+
border-radius: 50%;
91+
border: 2px solid #cccccc;
92+
border-right-color: #333333;
93+
display: inline-block;
94+
position: relative;
95+
margin-top: -8px;
96+
position: absolute;
97+
right: 30px;
98+
top: 50%;
99+
}
100+
.has-value > .Select-control > .Select-loading {
101+
right: 46px;
102+
}
103+
.Select-clear {
104+
color: #999999;
105+
cursor: pointer;
106+
display: inline-block;
107+
font-size: 16px;
108+
padding: 6px 10px;
109+
position: absolute;
110+
right: 17px;
111+
top: 0;
112+
}
113+
.Select-clear:hover {
114+
color: #c0392b;
115+
}
116+
.Select-clear > span {
117+
font-size: 1.1em;
118+
}
119+
.Select-arrow-zone {
120+
content: " ";
121+
display: block;
122+
position: absolute;
123+
right: 0;
124+
top: 0;
125+
bottom: 0;
126+
width: 30px;
127+
cursor: pointer;
128+
}
129+
.Select-arrow {
130+
border-color: #999999 transparent transparent;
131+
border-style: solid;
132+
border-width: 5px 5px 0;
133+
content: " ";
134+
display: block;
135+
height: 0;
136+
margin-top: -ceil(2.5px);
137+
position: absolute;
138+
right: 10px;
139+
top: 14px;
140+
width: 0;
141+
cursor: pointer;
142+
}
143+
.Select-menu-outer {
144+
border-bottom-right-radius: 4px;
145+
border-bottom-left-radius: 4px;
146+
background-color: #ffffff;
147+
border: 1px solid #cccccc;
148+
border-top-color: #e6e6e6;
149+
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
150+
box-sizing: border-box;
151+
margin-top: -1px;
152+
max-height: 200px;
153+
position: absolute;
154+
top: 100%;
155+
width: 100%;
156+
z-index: 1000;
157+
-webkit-overflow-scrolling: touch;
158+
}
159+
.Select-menu {
160+
max-height: 198px;
161+
overflow-y: auto;
162+
}
163+
.Select-option {
164+
box-sizing: border-box;
165+
color: #666666;
166+
cursor: pointer;
167+
display: block;
168+
padding: 8px 10px;
169+
}
170+
.Select-option:last-child {
171+
border-bottom-right-radius: 4px;
172+
border-bottom-left-radius: 4px;
173+
}
174+
.Select-option.is-focused {
175+
background-color: #f2f9fc;
176+
color: #333333;
177+
}
178+
.Select-option.is-disabled {
179+
color: #cccccc;
180+
cursor: not-allowed;
181+
}
182+
.Select-noresults {
183+
box-sizing: border-box;
184+
color: #999999;
185+
cursor: default;
186+
display: block;
187+
padding: 8px 10px;
188+
}
189+
.Select.is-multi .Select-control {
190+
padding: 2px 52px 2px 3px;
191+
}
192+
.Select.is-multi .Select-input {
193+
vertical-align: middle;
194+
border: 1px solid transparent;
195+
margin: 2px;
196+
padding: 3px 0;
197+
}
198+
.Select-item {
199+
background-color: #f2f9fc;
200+
border-radius: 2px;
201+
border: 1px solid #c9e6f2;
202+
color: #0088cc;
203+
display: inline-block;
204+
font-size: 1em;
205+
margin: 2px;
206+
}
207+
.Select-item-icon,
208+
.Select-item-label {
209+
display: inline-block;
210+
vertical-align: middle;
211+
}
212+
.Select-item-label {
213+
cursor: default;
214+
border-bottom-right-radius: 2px;
215+
border-top-right-radius: 2px;
216+
padding: 3px 5px;
217+
}
218+
.Select-item-label .Select-item-label__a {
219+
color: #0088cc;
220+
cursor: pointer;
221+
}
222+
.Select-item-icon {
223+
cursor: pointer;
224+
border-bottom-left-radius: 2px;
225+
border-top-left-radius: 2px;
226+
border-right: 1px solid #c9e6f2;
227+
padding: 2px 5px 4px;
228+
}
229+
.Select-item-icon:hover,
230+
.Select-item-icon:focus {
231+
background-color: #ddeff7;
232+
color: #0077b3;
233+
}
234+
.Select-item-icon:active {
235+
background-color: #c9e6f2;
236+
}
237+
.Select.is-multi.is-disabled .Select-item {
238+
background-color: #f2f2f2;
239+
border: 1px solid #d9d9d9;
240+
color: #888888;
241+
}
242+
.Select.is-multi.is-disabled .Select-item-icon {
243+
cursor: not-allowed;
244+
border-right: 1px solid #d9d9d9;
245+
}
246+
.Select.is-multi.is-disabled .Select-item-icon:hover,
247+
.Select.is-multi.is-disabled .Select-item-icon:focus,
248+
.Select.is-multi.is-disabled .Select-item-icon:active {
249+
background-color: #f2f2f2;
250+
}
251+
@keyframes Select-animation-spin {
252+
to {
253+
transform: rotate(1turn);
254+
}
255+
}
256+
@-webkit-keyframes Select-animation-spin {
257+
to {
258+
-webkit-transform: rotate(1turn);
259+
}
260+
}

browser/styles/main/components/SideNavigator.styl

Whitespace-only changes.

browser/styles/mixins/marked.styl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
marked()
2-
line-height 1.2em
32
hr
43
border-top none
54
border-bottom solid 1px borderColor
@@ -24,6 +23,9 @@ marked()
2423
margin 2.33em auto
2524
h1, h2, h3, h4, h5, h6
2625
font-weight bold
26+
line-height 1.2em
27+
p
28+
line-height 1.2em
2729
img
2830
max-width 100%
2931
strong
@@ -63,6 +65,7 @@ marked()
6365
border solid 1px borderColor
6466
border-radius 5px
6567
margin 0.5em 0
68+
overflow-x auto
6669
&>code
6770
padding 0
6871
border none

0 commit comments

Comments
 (0)