-
Notifications
You must be signed in to change notification settings - Fork 27
/
index.html
130 lines (126 loc) · 5.92 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<!doctype html>
<html ng-app='app'>
<head>
<meta charset="utf-8">
<meta name="author" content="nihgwu">
<title>{{ 'NAME' | translate }}</title>
<link rel="stylesheet" href="bower_components/angular-toggle-switch/angular-toggle-switch.css" />
<link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.css" />
<link rel="stylesheet" href="css/style.css" />
</head>
<body ng-controller="AppCtrl">
<!-- Header -->
<header id="header">
<div id="toolbar">
<button ng-click="debug()" class="fa fa-terminal"></button>
<!--button ng-click="setting()" class="fa fa-gear"></button-->
<button ng-click="close()" class="fa fa-close"></button>
</div>
<img id="logo" src="img/icon.png" />
<div id="title">
<h4>{{ 'NAME' | translate }}</h4>
<span>{{ 'DESCRIPTION' | translate }}</span>
</div>
</header>
<!-- Content -->
<section id="container">
<div id="detail">
<div class="control-group">
<label>{{ 'SERVER_NAME' | translate }}</label>
<input ng-dblclick="edit()" ng-model="current.name" ng-readonly="!editing" placeholder="服务器名称">
<button ng-click="expand()" ng-class="expanded?'focus':''" class="fa fa-chevron-right btn-expand"></button>
</div>
<div class="control-group">
<label>{{ 'SERVER_IP' | translate }}</label>
<input ng-model="current.ip" ng-disabled="!editing" placeholder="服务器IP">
</div>
<div class="control-group">
<label>{{ 'SERVER_PORT' | translate }}</label>
<input ng-model="current.port" ng-disabled="!editing" number-mask="000000" placeholder="服务器端口">
</div>
<div class="control-group">
<label>{{ 'SERVER_PASSWORD' | translate }}</label>
<input ng-model="current.password" ng-disabled="!editing" type="password" placeholder="密码">
</div>
<div class="control-group">
<label>{{ 'SERVER_METHOD' | translate }}</label>
<div class="dropbox">
<select ng-change="method()" ng-model="current.method" ng-disabled="!editing" placeholder="加密方式" ng-options="method.value as method.text for method in methods">
</select>
</div>
</div>
<div class="control-group">
<label>{{ 'TIMEOUT' | translate }}</label>
<input ng-dblclick="edit()" ng-model="local.timeout" ng-readonly="!editing" number-mask="000000" placeholder="连接超时">
</div>
<div class="control-group">
<label>{{ 'LOCAL_PORT' | translate }}</label>
<input ng-dblclick="edit()" ng-model="local.localport" ng-readonly="!editing" number-mask="000000" placeholder="代理端口">
</div>
<div class="control-group">
<label></label>
<toggle-switch ng-model="running" ng-show="!editing" ng-click="toggle()" on-label="{{ 'BUTTON_START' | translate }}" off-label="{{ 'BUTTON_STOP' | translate }}"></toggle-switch>
<button ng-click="save()" ng-show="editing">{{ 'BUTTON_SAVE' | translate }}</button>
<button ng-click="cancel()" ng-show="editing">{{ 'BUTTON_CANCEL' | translate }}</button>
<!--button ng-click="start()" ng-show="!editing" ng-class="running?'focus':''">{{ 'BUTTON_START' | translate }}</button>
<button ng-click="stop()" ng-show="!editing">{{ 'BUTTON_STOP' | translate }}</button-->
</div>
</div>
<div id="list">
<ul>
<li ng-repeat="server in servers" ng-click="select($index)" ng-class="listyle($index)" ng-class-even="'even'">
<h4>{{server.name}}</h4>
<span>{{server.ip}}:{{server.port}}</span>
</li>
</ul>
<div class="toolbar">
<button ng-click="share()" class="fa fa-share-alt"></button>
<button ng-click="add()" class="fa fa-plus"></button>
<button ng-click="remove()" class="fa fa-minus"></button>
<button ng-click="up()" class="fa fa-arrow-up"></button>
<button ng-click="down()" class="fa fa-arrow-down"></button>
<button ng-click="language('en')" class="fa" style="margin-top:38px;">en</button>
<button ng-click="language('zh')" class="fa">中</button>
</div>
<button ng-click="import()">{{ 'BUTTON_IMPORT' | translate }}</button>
<input onchange="angular.element(this).scope().imported(this)" style="display:none;" id="import" type="file" accept=".json" />
<button ng-click="export()">{{ 'BUTTON_EXPORT' | translate }}</button>
<input style="display:none;" id="export" type="file" nwsaveas="config.json" />
</div>
<div id="share-wrap" ng-show="sharing">
<div id="share">
<div ng-bind-html="qrcode | html"></div>
<textarea readonly="readonly" rows="2">{{base64}}</textarea>
<button ng-click="copy()">{{ 'BUTTON_COPY' | translate }}</button>
<button ng-click="back()">{{ 'BUTTON_BACK' | translate }}</button>
</div>
</div>
</section>
<!-- Footer -->
<footer id="footer">
<div style="float: left;">{{ message | translate }}</div>
<div style="float: right; padding-right: 10px;">
<a href ng-click="feedback()">{{ 'FEEDBACK' | translate }}</a>
</div>
</footer>
<script type="text/javascript" src="bower_components/angular/angular.js"></script>
<script type="text/javascript" src="bower_components/angular-toggle-switch/angular-toggle-switch.js"></script>
<script type="text/javascript" src="bower_components/angular-translate/angular-translate.js"></script>
<script type="text/javascript" src="js/app.js"></script>
<script type="text/javascript" src="js/filters.js"></script>
<script type="text/javascript" src="js/directives.js"></script>
<script type="text/javascript" src="js/services.js"></script>
<script type="text/javascript" src="js/controllers.js"></script>
<!--script type="text/javascript">
var fs = require('fs');
fs.watch('./', function() {
//if (location)
// location.reload();
});
fs.watch('./js/', function() {
if (location)
location.reload();
});
</script-->
</body>
</html>