Browse Source

文案等小调整;修复一处 hosts 选中高亮问题。

oldj 9 years ago
parent
commit
a788840c1c
8 changed files with 16 additions and 14843 deletions
  1. 1 1
      app/SH3/MacGap/SwitchHosts!-Info.plist
  2. 0 1
      app/SH3/public/index.html
  3. 0 14838
      app/SH3/public/js/main.js
  4. 1 1
      app/src/config.js
  5. 1 1
      app/src/lang.js
  6. 4 0
      app/src/main.js
  7. 7 0
      gulpfile.js
  8. 2 1
      package.json

+ 1 - 1
app/SH3/MacGap/SwitchHosts!-Info.plist

@@ -21,7 +21,7 @@
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>
-	<string>3428</string>
+	<string>3445</string>
 	<key>LSApplicationCategoryType</key>
 	<string>public.app-category.developer-tools</string>
 	<key>LSMinimumSystemVersion</key>

+ 0 - 1
app/SH3/public/index.html

@@ -141,7 +141,6 @@
 </div>
 <script src="js/jquery.min.js"></script>
 <script src="js/vue.min.js"></script>
-<!--<script src="../../../tmp/g_test.js"></script>-->
 <script src="js/main.js"></script>
 </body>
 </html>

File diff suppressed because it is too large
+ 0 - 14838
app/SH3/public/js/main.js


+ 1 - 1
app/src/config.js

@@ -7,7 +7,7 @@
 
 module.exports = {
     VERSION: '3.1.2'
-    , bundle_version: 3428
+    , bundle_version: 3445
     , url_chk_version: 'http://oldj.github.io/SwitchHosts/v.txt'
     , url_homepage: 'http://oldj.github.io/SwitchHosts/'
     , url_feedback: 'https://github.com/oldj/SwitchHosts/issues'

+ 1 - 1
app/src/lang.js

@@ -53,7 +53,7 @@ var languages = {
         , host_title: 'host 方案名'
         , host_title_cant_be_empty: 'Host 方案名不能为空!'
         , sys_host_title: '系统 Hosts'
-        , input_sudo_pswd: '请输入管理员密码'
+        , input_sudo_pswd: '请输入您的开机密码'
         , sudo_pswd: '密码'
         , del_host: '删除当前 host'
         , confirm_del: '确定要删除此 host 吗?'

+ 4 - 0
app/src/main.js

@@ -8,6 +8,9 @@
 /* global Vue */
 
 var config = require('./config');
+// $-FOR-TEST
+require('./g_test');
+// $-END
 //Vue.config.debug = true;
 var dnd = require('./vue_dnd');
 Vue.use(dnd);
@@ -279,6 +282,7 @@ var app = new Vue({
                 is_editable: false,
                 where: 'sys'
             };
+            this.$broadcast('current-host-change', this.current_host);
         },
         getShowHosts: function () {
             var list = [];

+ 7 - 0
gulpfile.js

@@ -16,6 +16,7 @@ const browserify = require('gulp-browserify');
 const header = require('gulp-header');
 // const stylus = require('gulp-stylus');
 const babel = require('gulp-babel');
+const replace = require('gulp-replace-task');
 const args = require('yargs').argv;
 const moment = require('moment');
 
@@ -99,6 +100,12 @@ gulp.task('js', ['ver'], function () {
         .pipe(babel({
             presets: ['es2015']
         }))
+        .pipe(gulpif(!IS_DEBUG, replace({
+            patterns: [{
+                match: /\/\/\s*\$-FOR-TEST[\s\S]*?\/\/\s*\$-END/ig,
+                replacement: ''
+            }]
+        })))
         .pipe(gulp.dest('tmp/'));
 
     s.on('end', () => {

+ 2 - 1
package.json

@@ -14,6 +14,7 @@
     "gulp-browserify": "~0.5.1",
     "gulp-header": "^1.7.1",
     "gulp-if": "~2.0.0",
+    "gulp-replace-task": "^0.11.0",
     "gulp-shell": "~0.5.1",
     "gulp-stylus": "~2.1.1",
     "gulp-uglify": "~1.5.1",
@@ -27,4 +28,4 @@
   },
   "author": "",
   "license": "ISC"
-}
+}

Some files were not shown because too many files changed in this diff