diff --git a/usr/lib/hosts-switch/hosts-switch.py b/usr/lib/hosts-switch/hosts-switch.py
index 93e0d0a..a006579 100755
--- a/usr/lib/hosts-switch/hosts-switch.py
+++ b/usr/lib/hosts-switch/hosts-switch.py
@@ -6,7 +6,8 @@ gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk, GLib, Gio, GObject, GdkPixbuf
-from webengine.gtk3 import WebEngine, create_setting, create_hmr_server
+from we.gtk3 import WebEngine, create_setting, create_hmr_server
+# from webengine.gtk3 import WebEngine, create_setting, create_hmr_server
from _window import Window
APP_ID = 'fun.wkit.hosts-switch'
diff --git a/usr/lib/hosts-switch/webapp/app.js b/usr/lib/hosts-switch/webapp/app.js
index 7ff2e36..925c1b6 100644
--- a/usr/lib/hosts-switch/webapp/app.js
+++ b/usr/lib/hosts-switch/webapp/app.js
@@ -34,7 +34,7 @@ createApp({
}
},
render() {
- return html` `
+ return html` `
}
})
.use(store)
diff --git a/usr/lib/hosts-switch/webapp/components/home.js b/usr/lib/hosts-switch/webapp/components/home.js
index 75c442e..a30d54f 100644
--- a/usr/lib/hosts-switch/webapp/components/home.js
+++ b/usr/lib/hosts-switch/webapp/components/home.js
@@ -99,7 +99,7 @@ class Home extends Component {
async mounted() {
window.foo = this
-
+ native.proxy.enable('http://127.0.0.1:8888')
let writable = await checkPermission()
if (writable) {
@@ -113,6 +113,9 @@ class Home extends Component {
}
addRecord() {
+ location.href = 'https://www.ipaddress.my/'
+ return
+
if (this.$store.activeDomain) {
this.$store.records.push({
record: '',
diff --git a/usr/lib/hosts-switch/webapp/utils/index.js b/usr/lib/hosts-switch/webapp/utils/index.js
index ceb8c1e..bb362d9 100644
--- a/usr/lib/hosts-switch/webapp/utils/index.js
+++ b/usr/lib/hosts-switch/webapp/utils/index.js
@@ -6,8 +6,6 @@
import { nextTick } from 'wkit'
-await native.init()
-
const APP_CONFIG_DIR = `${native.env.CONFIG_DIR}/hosts-switch`
const HOST_FILE = `${APP_CONFIG_DIR}/host.cache`
const LOCK_FILE = `${APP_CONFIG_DIR}/lock`