Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
mycard
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
syntax_j
mycard
Commits
bb7407a5
Commit
bb7407a5
authored
Mar 29, 2014
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0.0.4
parent
a3e0ab1a
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
395 additions
and
74 deletions
+395
-74
app/candy/index.html
app/candy/index.html
+2
-0
app/css/app.css
app/css/app.css
+78
-2
app/css/app.styl
app/css/app.styl
+77
-3
app/index.html
app/index.html
+74
-16
app/js/controllers.coffee
app/js/controllers.coffee
+44
-1
app/js/controllers.js
app/js/controllers.js
+67
-2
app/js/controllers.map
app/js/controllers.map
+1
-1
app/js/maotama.coffee
app/js/maotama.coffee
+4
-10
app/js/maotama.js
app/js/maotama.js
+11
-14
app/js/maotama.map
app/js/maotama.map
+1
-1
app/js/tunnel.coffee
app/js/tunnel.coffee
+9
-6
app/js/tunnel.js
app/js/tunnel.js
+12
-12
app/js/tunnel.map
app/js/tunnel.map
+1
-1
app/partials/app_show.html
app/partials/app_show.html
+10
-5
app/tunnel_servers.json
app/tunnel_servers.json
+4
-0
No files found.
app/candy/index.html
View file @
bb7407a5
...
...
@@ -67,6 +67,8 @@ $(document).ready(function () {
parent
.
postMessage
({
type
:
'
presence
'
,
from
:
args
.
from
,
stanza
:
$
(
'
<div />
'
).
append
(
args
.
stanza
).
html
()},
'
*
'
)
});
Candy
.
View
.
Template
.
Login
.
form
=
'
<form method="post" id="login-form" class="login-form">
'
+
'
<input type="hidden" id="username" name="username" value="
'
+
url
.
param
(
'
jid
'
)
+
'
"/>
'
+
'
<input type="hidden" id="password" name="password" value="
'
+
url
.
param
(
'
password
'
)
+
'
"/>
'
+
'
<input type="submit" class="button" value="重新连接" /></form>
'
});
</script>
</head>
...
...
app/css/app.css
View file @
bb7407a5
html
,
body
,
#
wrapper
,
.
wrapper
,
.sidebar
,
#right_wrapper
,
#right_top_wrapper
{
...
...
@@ -52,6 +52,7 @@ iframe,
}
#avatar
{
max-height
:
34px
;
margin
:
-7px
8px
-7px
0
;
}
#username
{
margin
:
0
5px
0
5px
;
...
...
@@ -83,7 +84,7 @@ iframe,
margin-top
:
6px
;
}
#cloud_wrapper
{
width
:
2
2
0px
;
width
:
2
4
0px
;
}
.bootstrap-switch
{
float
:
right
;
...
...
@@ -172,3 +173,78 @@ iframe,
.modal
{
overflow-y
:
auto
;
}
#signin
{
background-color
:
#eee
;
}
.form-signin
{
max-width
:
330px
;
padding
:
15px
;
margin
:
0
auto
;
}
.form-signin
.form-signin-heading
,
.form-signin
.checkbox
{
margin-bottom
:
10px
;
}
.form-signin
.checkbox
{
font-weight
:
normal
;
}
.form-signin
.form-control
{
position
:
relative
;
height
:
auto
;
-webkit-box-sizing
:
border-box
;
-moz-box-sizing
:
border-box
;
box-sizing
:
border-box
;
padding
:
10px
;
font-size
:
16px
;
}
.form-signin
.form-control
:focus
{
z-index
:
2
;
}
.form-signin
input
[
type
=
"email"
]
{
margin-bottom
:
-1px
;
border-bottom-right-radius
:
0
;
border-bottom-left-radius
:
0
;
}
.form-signin
input
[
type
=
"password"
]
{
margin-bottom
:
10px
;
border-top-left-radius
:
0
;
border-top-right-radius
:
0
;
}
#footer
{
position
:
absolute
;
bottom
:
0
;
height
:
35px
;
width
:
100%
;
border-top
:
1px
solid
#e5e5e5
;
overflow
:
hidden
;
background-color
:
#fff
;
}
.footer
{
padding
:
0
44px
;
padding-top
:
7px
;
font-size
:
0.85em
;
white-space
:
nowrap
;
}
.footer
ul
{
float
:
left
;
max-width
:
80%
;
padding
:
0
;
}
.footer
ul
li
{
color
:
#737373
;
display
:
inline
;
padding
:
0
;
padding-right
:
1.5em
;
}
.footer
.lang-chooser
{
font-size
:
13px
;
height
:
24px
;
line-height
:
24px
;
}
.footer
a
{
color
:
#737373
;
}
.footer
.lang-chooser-wrap
{
float
:
right
;
display
:
inline
;
}
app/css/app.styl
View file @
bb7407a5
//布局
html, body,
#
wrapper, .sidebar, #right_wrapper, #right_top_wrapper
html, body,
.
wrapper, .sidebar, #right_wrapper, #right_top_wrapper
height 100%
#right_top_wrapper
padding-bottom 207px
...
...
@@ -32,6 +32,7 @@ a, button, input, span, p, li, td, th, h1, h2, h3, h4, h5, h6, iframe, .bootstra
//导航栏
#avatar
max-height 34px
margin: -7px 8px -7px 0
#username
margin 0 5px 0 5px
...
...
@@ -68,7 +69,7 @@ a, button, input, span, p, li, td, th, h1, h2, h3, h4, h5, h6, iframe, .bootstra
.cloud
margin-top 6px
#cloud_wrapper
width 2
2
0px
width 2
4
0px
.bootstrap-switch
float right
margin 10px 20px 0 0
...
...
@@ -175,4 +176,77 @@ a, button, input, span, p, li, td, th, h1, h2, h3, h4, h5, h6, iframe, .bootstra
//modal
.modal
overflow-y: auto;
\ No newline at end of file
overflow-y: auto;
//登录
#signin {
background-color: #eee;
}
.form-signin {
max-width: 330px;
padding: 15px;
margin: 0 auto;
}
.form-signin .form-signin-heading,
.form-signin .checkbox {
margin-bottom: 10px;
}
.form-signin .checkbox {
font-weight: normal;
}
.form-signin .form-control {
position: relative;
height: auto;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 10px;
font-size: 16px;
}
.form-signin .form-control:focus {
z-index: 2;
}
.form-signin input[type="email"] {
margin-bottom: -1px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.form-signin input[type="password"] {
margin-bottom: 10px;
border-top-left-radius: 0;
border-top-right-radius: 0;
}
#footer
position: absolute;
bottom: 0;
height: 35px;
width: 100%;
border-top: 1px solid #e5e5e5;
overflow: hidden;
background-color white
.footer
padding: 0 44px;
padding-top: 7px;
font-size: .85em;
white-space: nowrap;
ul
float: left;
max-width: 80%;
padding: 0;
li
color: #737373;
display: inline;
padding: 0;
padding-right: 1.5em;
.lang-chooser
font-size: 13px;
height: 24px;
line-height: 24px;
a
color: #737373;
.lang-chooser-wrap
float: right;
display: inline;
app/index.html
View file @
bb7407a5
...
...
@@ -31,24 +31,37 @@
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
</button>
<a
class=
"navbar-brand"
href=
"
#
"
>
毛玉
</a>
<a
class=
"navbar-brand"
href=
"
javascript:;
"
>
毛玉
</a>
</div>
<div
class=
"navbar-collapse collapse"
>
<ul
class=
"nav navbar-nav navbar-left"
>
<li><a
href=
"
#
"
>
首页
</a></li>
<li
class=
"active"
><a
href=
"
#
"
>
游戏
</a></li>
<li
class=
"disabled"
><a
href=
"
#
"
>
漫画
</a></li>
<li
class=
"disabled"
><a
href=
"
#
"
>
音乐
</a></li>
<li
class=
"disabled"
><a
href=
"
#
"
>
图书
</a></li>
<ul
class=
"nav navbar-nav navbar-left"
ng-if=
"current_user"
>
<li><a
href=
"
javascript:;
"
>
首页
</a></li>
<li
class=
"active"
><a
href=
"
javascript:;
"
>
游戏
</a></li>
<li
class=
"disabled"
><a
href=
"
javascript:;
"
>
漫画
</a></li>
<li
class=
"disabled"
><a
href=
"
javascript:;
"
>
音乐
</a></li>
<li
class=
"disabled"
><a
href=
"
javascript:;
"
>
图书
</a></li>
</ul>
<div
class=
"navbar-form navbar-right"
>
<img
id=
"avatar"
src=
"https://lh6.googleusercontent.com/-eRxRGjDvkvY/AAAAAAAAAAI/AAAAAAAAeGg/HetZCuangp8/s46-c-k-no/photo.jpg"
>
<a
id=
"username"
>
zh99998
</a>
<ul
class=
"nav navbar-nav navbar-left"
ng-if=
"!current_user"
>
<li
class=
"active"
><a
href=
"javascript:;"
>
登录
</a></li>
<li><a
href=
"https://moeid.my-card.in/users/sign_up?app=moeid"
target=
"_blank"
>
注册
</a></li>
</ul>
<ul
class=
"nav navbar-nav navbar-right"
ng-if=
"current_user"
>
<li
class=
"dropdown"
>
<a
id=
"username"
href=
"javascript:;"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
>
<img
id=
"avatar"
src=
"https://lh6.googleusercontent.com/-eRxRGjDvkvY/AAAAAAAAAAI/AAAAAAAAeGg/HetZCuangp8/s46-c-k-no/photo.jpg"
>
{{current_user.name}}
<b
class=
"caret"
></b>
</a>
<ul
class=
"dropdown-menu"
>
<li><a
href=
"javascript:;"
ng-click=
"sign_out()"
ng-controller=
"UserController"
>
退出登录
</a></li>
</ul>
</li>
</ul>
<div
class=
"navbar-form navbar-right"
ng-if=
"!current_user"
>
<a
href=
"https://moeid.my-card.in/users/sign_up?app=moeid"
target=
"_blank"
type=
"button"
class=
"btn btn-success"
>
注册
</a>
</div>
<form
class=
"navbar-form navbar-left"
>
<
!--<
form class="navbar-form navbar-left">
<input type="text" class="form-control" placeholder="搜索...">
</form>
</form>
-->
</div>
</div>
<div
id=
"window_controls"
>
...
...
@@ -58,7 +71,8 @@
<a
id=
"window_control_close"
class=
"window-control"
><img
src=
"img/close.png"
></a>
</div>
</div>
<div
id=
"wrapper"
>
<div
class=
"wrapper"
id=
"wrapper"
ng-show=
"current_user"
>
<div
class=
"col-sm-3 col-md-2 sidebar"
ng-controller=
"AppsListController"
>
<ul
class=
"nav nav-sidebar"
>
<li
ng-repeat=
"app in apps"
ng-class=
"active(app.id)"
>
...
...
@@ -66,7 +80,7 @@
</li>
</ul>
</div>
<div
id=
"right_wrapper"
class=
"col-md-10"
>
<div
id=
"right_wrapper"
class=
"col-md-10"
ng-controller=
"UserController"
>
<div
id=
"right_top_wrapper"
class=
"row"
>
<div
class=
"main_wrapper"
>
<div
class=
"main"
ng-view
></div>
...
...
@@ -89,11 +103,55 @@
</div>
</div>
<div
class=
"row"
>
<iframe
id=
"candy"
src=
"candy/index.html?bosh=http://localhost:5280/http-bind&jid=毛玉测试@my-card.in&password=123456
"
nwdisable
></iframe>
<iframe
id=
"candy"
ng-src=
"{{candy_url()}}
"
nwdisable
></iframe>
</div>
</div>
</div>
<div
class=
"wrapper"
id=
"signin"
ng-show=
"!current_user"
ng-controller=
"UserController"
>
<div
class=
"container"
>
<form
class=
"form-signin"
role=
"form"
ng-init=
"user.remember_me=true"
>
<h2
class=
"form-signin-heading"
>
登录
</h2>
<input
type=
"text"
class=
"form-control"
ng-model=
"user.name"
placeholder=
"用户名"
required
autofocus
>
<input
type=
"password"
class=
"form-control"
ng-model=
"user.password"
placeholder=
"密码"
required
>
<label
class=
"checkbox"
>
<input
type=
"checkbox"
value=
"remember-me"
ng-model=
"user.remember_me"
>
记住密码
</label>
<button
class=
"btn btn-lg btn-primary btn-block"
type=
"submit"
ng-click=
"sign_in(user)"
ng-disabled=
"signing"
>
登录
</button>
</form>
</div>
<!-- /container -->
<div
id=
"footer"
>
<div
class=
"footer content clearfix"
>
<ul
id=
"footer-list"
>
<li>
毛玉
</li>
<li>
<a
href=
"javascript:;"
>
隐私权和服务条款
</a>
</li>
<li>
<a
href=
"javascript:;"
>
帮助
</a>
</li>
</ul>
<div
id=
"lang-vis-control"
style=
"display: inline;"
>
<span
id=
"lang-chooser-wrap"
class=
"lang-chooser-wrap"
>
<label
for=
"lang-chooser"
><img
src=
"https://ssl.gstatic.com/images/icons/ui/common/universal_language_settings-21.png"
alt=
"更改语言"
></label>
<select
id=
"lang-chooser"
class=
"lang-chooser"
name=
"lang-chooser"
>
<option
value=
"zh-CN"
selected=
"selected"
>
简体中文
</option>
</select>
</span>
</div>
</div>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
...
...
app/js/controllers.coffee
View file @
bb7407a5
...
...
@@ -8,11 +8,13 @@ rmdir = require 'rmdir'
gui
=
require
'nw.gui'
Datastore
=
require
'nw_nedb'
tunnel
=
require
'./js/tunnel'
db
=
apps
:
new
Datastore
({
filename
:
path
.
join
(
gui
.
App
.
dataPath
,
'apps.db'
),
autoload
:
true
})
local
:
new
Datastore
({
filename
:
path
.
join
(
gui
.
App
.
dataPath
,
'local.db'
),
autoload
:
true
})
profile
:
new
Datastore
({
filename
:
path
.
join
(
gui
.
App
.
dataPath
,
'profile.db'
),
autoload
:
true
})
user
:
new
Datastore
({
filename
:
path
.
join
(
gui
.
App
.
dataPath
,
'user.db'
),
autoload
:
true
})
angular
.
module
(
'maotama.controllers'
,
[])
.
controller
'AppsListController'
,
[
'$scope'
,
'$routeParams'
,
'$http'
,
'$location'
,
(
$scope
,
$routeParams
,
$http
,
$location
)
->
$scope
.
orderProp
=
'id'
;
...
...
@@ -41,6 +43,7 @@ angular.module('maotama.controllers', [])
"active"
]
.
controller
'AppsShowController'
,
[
'$scope'
,
'$routeParams'
,
(
$scope
,
$routeParams
)
->
$scope
.
tunnel_servers
=
require
'./tunnel_servers.json'
db
.
apps
.
findOne
{
id
:
$routeParams
.
app_id
},
(
err
,
doc
)
->
throw
err
if
err
$scope
.
app
=
doc
...
...
@@ -207,6 +210,46 @@ angular.module('maotama.controllers', [])
else
'locked'
$scope
.
tunnel
=
(
server
=
$scope
.
tunnel_servers
[
0
])
->
$scope
.
runtime
.
tunnel_server
=
server
$scope
.
runtime
.
tunneling
=
true
$scope
.
runtime
.
tunnel
=
null
tunnel
.
listen
10800
,
server
.
url
,
(
address
)
->
$scope
.
runtime
.
tunneling
=
false
$scope
.
runtime
.
tunnel
=
address
$scope
.
$digest
()
]
.
controller
'UserController'
,
[
'$scope'
,
'$rootScope'
,
'$http'
,
(
$scope
,
$rootScope
,
$http
)
->
db
.
user
.
findOne
{},
(
err
,
doc
)
->
$rootScope
.
current_user
=
doc
$scope
.
$digest
()
$scope
.
sign_in
=
(
user
)
->
$scope
.
signing
=
true
$http
.
get
'http://my-card.in/users/me.json'
,
params
:
user
.
success
(
data
)
->
$scope
.
signing
=
false
if
data
==
'true'
$rootScope
.
current_user
=
{
name
:
user
.
name
password
:
user
.
password
}
if
user
.
remember_me
db
.
user
.
update
{},
user
,
{
upsert
:
true
},
(
err
)
->
throw
err
if
err
else
alert
'登录失败'
$scope
.
sign_out
=
()
->
$rootScope
.
current_user
=
null
db
.
user
.
remove
{},
(
err
)
->
throw
err
if
err
$scope
.
candy_url
=
()
->
"candy/index.html?bosh=http://localhost:5280/http-bind&jid=
#{
encodeURIComponent
$rootScope
.
current_user
.
name
}
@my-card.in&password=
#{
encodeURIComponent
$rootScope
.
current_user
.
password
}
"
if
$rootScope
.
current_user
]
\ No newline at end of file
app/js/controllers.js
View file @
bb7407a5
// Generated by CoffeeScript 1.7.1
(
function
()
{
var
Datastore
,
child_process
,
crypto
,
db
,
fs
,
gui
,
mkdirp
,
path
,
rmdir
;
var
Datastore
,
child_process
,
crypto
,
db
,
fs
,
gui
,
mkdirp
,
path
,
rmdir
,
tunnel
;
path
=
require
(
'
path
'
);
...
...
@@ -18,6 +18,8 @@
Datastore
=
require
(
'
nw_nedb
'
);
tunnel
=
require
(
'
./js/tunnel
'
);
db
=
{
apps
:
new
Datastore
({
filename
:
path
.
join
(
gui
.
App
.
dataPath
,
'
apps.db
'
),
...
...
@@ -30,6 +32,10 @@
profile
:
new
Datastore
({
filename
:
path
.
join
(
gui
.
App
.
dataPath
,
'
profile.db
'
),
autoload
:
true
}),
user
:
new
Datastore
({
filename
:
path
.
join
(
gui
.
App
.
dataPath
,
'
user.db
'
),
autoload
:
true
})
};
...
...
@@ -83,6 +89,7 @@
}
]).
controller
(
'
AppsShowController
'
,
[
'
$scope
'
,
'
$routeParams
'
,
function
(
$scope
,
$routeParams
)
{
$scope
.
tunnel_servers
=
require
(
'
./tunnel_servers.json
'
);
db
.
apps
.
findOne
({
id
:
$routeParams
.
app_id
},
function
(
err
,
doc
)
{
...
...
@@ -317,13 +324,71 @@
}
return
$scope
.
app
.
achievements
[
category
].
items
[
index
];
};
return
$scope
.
achievement_locked
=
function
(
category
,
index
)
{
$scope
.
achievement_locked
=
function
(
category
,
index
)
{
if
(
$scope
.
profile
.
achievements
[
category
][
index
])
{
return
''
;
}
else
{
return
'
locked
'
;
}
};
return
$scope
.
tunnel
=
function
(
server
)
{
if
(
server
==
null
)
{
server
=
$scope
.
tunnel_servers
[
0
];
}
$scope
.
runtime
.
tunnel_server
=
server
;
$scope
.
runtime
.
tunneling
=
true
;
$scope
.
runtime
.
tunnel
=
null
;
return
tunnel
.
listen
(
10800
,
server
.
url
,
function
(
address
)
{
$scope
.
runtime
.
tunneling
=
false
;
$scope
.
runtime
.
tunnel
=
address
;
return
$scope
.
$digest
();
});
};
}
]).
controller
(
'
UserController
'
,
[
'
$scope
'
,
'
$rootScope
'
,
'
$http
'
,
function
(
$scope
,
$rootScope
,
$http
)
{
db
.
user
.
findOne
({},
function
(
err
,
doc
)
{
$rootScope
.
current_user
=
doc
;
return
$scope
.
$digest
();
});
$scope
.
sign_in
=
function
(
user
)
{
$scope
.
signing
=
true
;
return
$http
.
get
(
'
http://my-card.in/users/me.json
'
,
{
params
:
user
}).
success
(
function
(
data
)
{
$scope
.
signing
=
false
;
if
(
data
===
'
true
'
)
{
$rootScope
.
current_user
=
{
name
:
user
.
name
,
password
:
user
.
password
};
if
(
user
.
remember_me
)
{
return
db
.
user
.
update
({},
user
,
{
upsert
:
true
},
function
(
err
)
{
if
(
err
)
{
throw
err
;
}
});
}
}
else
{
return
alert
(
'
登录失败
'
);
}
});
};
$scope
.
sign_out
=
function
()
{
$rootScope
.
current_user
=
null
;
return
db
.
user
.
remove
({},
function
(
err
)
{
if
(
err
)
{
throw
err
;
}
});
};
return
$scope
.
candy_url
=
function
()
{
if
(
$rootScope
.
current_user
)
{
return
"
candy/index.html?bosh=http://localhost:5280/http-bind&jid=
"
+
(
encodeURIComponent
(
$rootScope
.
current_user
.
name
))
+
"
@my-card.in&password=
"
+
(
encodeURIComponent
(
$rootScope
.
current_user
.
password
));
}
};
}
]);
...
...
app/js/controllers.map
View file @
bb7407a5
This diff is collapsed.
Click to expand it.
app/js/maotama.coffee
View file @
bb7407a5
...
...
@@ -4,7 +4,7 @@ crypto = require 'crypto'
gui
=
require
'nw.gui'
win
=
gui
.
Window
.
get
();
#win.showDevTools() #debug
win
.
showDevTools
()
if
"--dev"
in
gui
.
App
.
argv
$
(
'#window_control_minimize'
).
click
->
win
.
minimize
()
...
...
@@ -24,15 +24,6 @@ win.on 'unmaximize', ->
$
(
'.switch'
).
bootstrapSwitch
();
$
(
'#cloud_popover'
).
popover
()
tunnel
=
require
'./js/tunnel'
$
(
'.main_wrapper'
).
on
'click'
,
'#cloud_button'
,
->
this
.
disabled
=
true
tunnel
.
listen
10800
,
"127.0.0.1"
,
(
address
)
->
$
(
'#cloud_address'
).
attr
'value'
,
address
$
(
'#cloud_button'
).
hide
()
$
(
'#cloud_wrapper'
).
removeClass
(
'hide'
)
$
(
'#cloud_address'
).
focus
();
$
(
'#cloud_address'
).
select
();
$
(
'.main_wrapper'
).
on
'click'
,
'#cloud_address'
,
->
$
(
'#cloud_address'
).
select
();
$
(
'.main_wrapper'
).
on
'click'
,
'#app_add'
,
->
...
...
@@ -44,6 +35,9 @@ $('.main_wrapper').on 'click','#app_add', ->
angular
.
element
(
this
).
scope
().
add
(
chooser
.
val
())
chooser
.
trigger
(
'click'
);
win
.
on
'new-win-policy'
,
(
frame
,
url
,
policy
)
->
gui
.
Shell
.
openExternal
(
url
);
policy
.
ignore
()
#用户
pre_load_photo
=
(
jid
,
name
,
domain
)
->
switch
domain
...
...
app/js/maotama.js
View file @
bb7407a5
// Generated by CoffeeScript 1.7.1
(
function
()
{
var
crypto
,
gui
,
path
,
pre_load_photo
,
tunnel
,
win
;
var
crypto
,
gui
,
path
,
pre_load_photo
,
win
,
__indexOf
=
[].
indexOf
||
function
(
item
)
{
for
(
var
i
=
0
,
l
=
this
.
length
;
i
<
l
;
i
++
)
{
if
(
i
in
this
&&
this
[
i
]
===
item
)
return
i
;
}
return
-
1
;
};
path
=
require
(
'
path
'
);
...
...
@@ -10,6 +11,10 @@
win
=
gui
.
Window
.
get
();
if
(
__indexOf
.
call
(
gui
.
App
.
argv
,
"
--dev
"
)
>=
0
)
{
win
.
showDevTools
();
}
$
(
'
#window_control_minimize
'
).
click
(
function
()
{
return
win
.
minimize
();
});
...
...
@@ -40,19 +45,6 @@
$
(
'
#cloud_popover
'
).
popover
();
tunnel
=
require
(
'
./js/tunnel
'
);
$
(
'
.main_wrapper
'
).
on
(
'
click
'
,
'
#cloud_button
'
,
function
()
{
this
.
disabled
=
true
;
return
tunnel
.
listen
(
10800
,
"
127.0.0.1
"
,
function
(
address
)
{
$
(
'
#cloud_address
'
).
attr
(
'
value
'
,
address
);
$
(
'
#cloud_button
'
).
hide
();
$
(
'
#cloud_wrapper
'
).
removeClass
(
'
hide
'
);
$
(
'
#cloud_address
'
).
focus
();
return
$
(
'
#cloud_address
'
).
select
();
});
});
$
(
'
.main_wrapper
'
).
on
(
'
click
'
,
'
#cloud_address
'
,
function
()
{
return
$
(
'
#cloud_address
'
).
select
();
});
...
...
@@ -69,6 +61,11 @@
return
chooser
.
trigger
(
'
click
'
);
});
win
.
on
(
'
new-win-policy
'
,
function
(
frame
,
url
,
policy
)
{
gui
.
Shell
.
openExternal
(
url
);
return
policy
.
ignore
();
});
pre_load_photo
=
function
(
jid
,
name
,
domain
)
{
var
hash
;
switch
(
domain
)
{
...
...
app/js/maotama.map
View file @
bb7407a5
This diff is collapsed.
Click to expand it.
app/js/tunnel.coffee
View file @
bb7407a5
...
...
@@ -5,14 +5,17 @@ WebSocketClient = require("nw_websocket").client
puncher
=
null
socket
=
null
punching
=
{}
_connection
=
null
listen
=
(
port
,
address
=
'127.0.0.1'
,
callback
)
->
listen
=
(
port
,
url
,
callback
)
->
_connection
.
close
()
if
_connection
client
=
new
WebSocketClient
()
client
.
on
"connectFailed"
,
(
error
)
->
console
.
log
"Connect Error: "
+
error
.
toString
()
return
client
.
on
"connect"
,
(
connection
)
->
_connection
=
connection
console
.
log
"正在分配端口"
connection
.
on
"error"
,
(
error
)
->
console
.
log
error
...
...
@@ -41,12 +44,12 @@ listen = (port, address='127.0.0.1', callback)->
else
throw
'unknown message'
console
.
log
"正在连接服务器"
client
.
connect
"ws://115.29.191.63:10800/"
,
"shinkirou"
client
.
connect
url
,
"shinkirou"
exports
.
listen
=
(
port
,
address
=
'127.0.0.1'
,
callback
)
->
exports
.
listen
=
(
port
,
url
,
callback
)
->
if
puncher
listen
(
port
,
address
,
callback
)
listen
(
port
,
url
,
callback
)
else
try
#test if i can create raw socket
...
...
@@ -54,7 +57,7 @@ exports.listen = (port, address='127.0.0.1', callback)->
protocol
:
raw
.
Protocol
.
UDP
#success
puncher
=
require
'./puncher'
listen
(
port
,
address
,
callback
)
listen
(
port
,
url
,
callback
)
catch
e
#failed, need elevate
#FUCK UAC.
...
...
@@ -72,7 +75,7 @@ exports.listen = (port, address='127.0.0.1', callback)->
autoAcceptConnections
:
true
wsServer
.
on
'connect'
,
(
connection
)
->
listen
(
port
,
address
,
callback
)
listen
(
port
,
url
,
callback
)
puncher
=
(
local_port
,
remote_port
,
remote_address
)
->
connection
.
sendUTF
"
#{
local_port
}
#{
remote_port
}
#{
remote_address
}
"
...
...
app/js/tunnel.js
View file @
bb7407a5
// Generated by CoffeeScript 1.7.1
(
function
()
{
var
WebSocketClient
,
listen
,
path
,
puncher
,
punching
,
raw
,
socket
;
var
WebSocketClient
,
listen
,
path
,
puncher
,
punching
,
raw
,
socket
,
_connection
;
path
=
require
(
'
path
'
);
...
...
@@ -14,16 +14,19 @@
punching
=
{};
listen
=
function
(
port
,
address
,
callback
)
{
_connection
=
null
;
listen
=
function
(
port
,
url
,
callback
)
{
var
client
;
if
(
address
==
null
)
{
address
=
'
127.0.0.1
'
;
if
(
_connection
)
{
_connection
.
close
()
;
}
client
=
new
WebSocketClient
();
client
.
on
(
"
connectFailed
"
,
function
(
error
)
{
console
.
log
(
"
Connect Error:
"
+
error
.
toString
());
});
client
.
on
(
"
connect
"
,
function
(
connection
)
{
_connection
=
connection
;
console
.
log
(
"
正在分配端口
"
);
connection
.
on
(
"
error
"
,
function
(
error
)
{
return
console
.
log
(
error
);
...
...
@@ -57,23 +60,20 @@
});
});
console
.
log
(
"
正在连接服务器
"
);
return
client
.
connect
(
"
ws://115.29.191.63:10800/
"
,
"
shinkirou
"
);
return
client
.
connect
(
url
,
"
shinkirou
"
);
};
exports
.
listen
=
function
(
port
,
address
,
callback
)
{
exports
.
listen
=
function
(
port
,
url
,
callback
)
{
var
WebSocketServer
,
e
,
http
,
server
,
wsServer
;
if
(
address
==
null
)
{
address
=
'
127.0.0.1
'
;
}
if
(
puncher
)
{
return
listen
(
port
,
address
,
callback
);
return
listen
(
port
,
url
,
callback
);
}
else
{
try
{
socket
=
raw
.
createSocket
({
protocol
:
raw
.
Protocol
.
UDP
});
puncher
=
require
(
'
./puncher
'
);
return
listen
(
port
,
address
,
callback
);
return
listen
(
port
,
url
,
callback
);
}
catch
(
_error
)
{
e
=
_error
;
WebSocketServer
=
require
(
'
nw_websocket
'
).
server
;
...
...
@@ -93,7 +93,7 @@
autoAcceptConnections
:
true
});
return
wsServer
.
on
(
'
connect
'
,
function
(
connection
)
{
listen
(
port
,
address
,
callback
);
listen
(
port
,
url
,
callback
);
puncher
=
function
(
local_port
,
remote_port
,
remote_address
)
{
return
connection
.
sendUTF
(
""
+
local_port
+
"
"
+
remote_port
+
"
"
+
remote_address
);
};
...
...
app/js/tunnel.map
View file @
bb7407a5
...
...
@@ -6,5 +6,5 @@
"tunnel.coffee"
],
"names": [],
"mappings": ";AAAA;AAAA,MAAA,
6DAAA;;AAAA,EAAA,IAAA,GAAO,OAAA,CAAQ,MAAR,CAAP,CAAA;;AAAA,EACA,GAAA,GAAM,OAAA,CAAQ,eAAR,CADN,CAAA;;AA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qBAAA,QAAA,CAAS,KAAT,EAAA;aADiE;UAAA,CAAnE,EAF+B;QAAA,CAAjC,CAJA,CAAA;AAAA,QASA,QAAA,GAAe,IAAA,eAAA,CACb;AAAA,UAAA,UAAA,EAAY,MAAZ;AAAA,UACA,qBAAA,EAAuB,IADvB;SADa,CATf,CAAA;eAaA,QAAQ,CAAC,EAAT,CAAY,SAAZ,EAAuB,SAAC,UAAD,GAAA;AACrB,UAAA,MAAA,CAAO,IAAP,EAAa,GAAb,EAAkB,QAAlB,CAAA,CAAA;AAAA,UACA,OAAA,GAAU,SAAC,UAAD,EAAa,WAAb,EAA0B,cAA1B,GAAA;mBACR,UAAU,CAAC,OAAX,CAAmB,EAAA,GAAE,UAAF,GAAc,GAAd,GAAgB,WAAhB,GAA6B,GAA7B,GAA+B,cAAlD,EADQ;UAAA,CADV,CAAA;iBAIA,UAAU,CAAC,EAAX,CAAc,OAAd,EAAuB,SAAC,UAAD,EAAa,WAAb,GAAA;AACrB,YAAA,QAAA,CAAS,KAAT,CAAA,CAAA;AAAA,YACA,MAAM,CAAC,KAAP,CAAA,CADA,CAAA;mBAEA,OAAA,GAAU,KAHW;UAAA,CAAvB,EALqB;QAAA,CAAvB,EAvBF;OAHF;KAFe;EAAA,CAhD
jB,CAAA;AAAA"
}
\ No newline at end of file
app/partials/app_show.html
View file @
bb7407a5
...
...
@@ -9,11 +9,16 @@
<span
class=
"glyphicon glyphicon-plus"
></span>
添加
</button>
<div
id=
"cloud_wrapper"
class=
"cloud input-group pull-right hide"
ng-if=
"local.installation"
>
<span
class=
"input-group-addon"
><span
class=
"glyphicon glyphicon-cloud"
></span></span>
<input
id=
"cloud_address"
type=
"text"
class=
"form-control"
value=
"255.255.255.255:65535"
>
<div
id=
"cloud_wrapper"
class=
"cloud input-group pull-right"
ng-if=
"runtime.tunnel"
>
<div
class=
"input-group-btn"
>
<button
type=
"button"
class=
"btn btn-default dropdown-toggle"
data-toggle=
"dropdown"
><span
class=
"tunnel_server_name"
>
{{runtime.tunnel_server.name}}
</span>
<span
class=
"caret"
></span></button>
<ul
class=
"dropdown-menu"
>
<li
ng-repeat=
"server in tunnel_servers"
><a
href=
"#"
ng-click=
"tunnel(server);$event.preventDefault()"
>
{{server.name}}
</a></li>
</ul>
</div>
<input
id=
"cloud_address"
type=
"text"
class=
"form-control"
ng-value=
"runtime.tunnel"
>
</div>
<button
id=
"cloud_button"
type=
"button"
class=
"cloud btn btn-default pull-right"
ng-if=
"local.installation && app.network"
>
<button
id=
"cloud_button"
type=
"button"
class=
"cloud btn btn-default pull-right"
ng-if=
"local.installation && app.network
&& !runtime.tunnel"
ng-disabled=
"runtime.tunneling"
ng-click=
"tunnel()
"
>
<span
class=
"glyphicon glyphicon-cloud"
></span>
反重力场
</button>
</h1>
...
...
@@ -142,7 +147,7 @@
<h4
class=
"modal-title"
id=
"app_uninstall_modal_label"
>
卸载 {{app.name}}
</h4>
</div>
<div
class=
"modal-body"
>
确认卸载?
继续将会删除你的 {{app.name}},以及同一目录内的所有文件,
确认卸载?
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
取消
</button>
...
...
app/tunnel_servers.json
0 → 100644
View file @
bb7407a5
[
{
"id"
:
1
,
"name"
:
"杭州"
,
"url"
:
"ws://115.29.191.63:10800/"
},
{
"id"
:
2
,
"name"
:
"北京"
,
"url"
:
"ws://122.0.65.69:10800/"
}
]
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment