clean up and new stings

This commit is contained in:
karl.hudgell 2020-09-07 15:29:33 +01:00
parent 600141c56f
commit ee9a4a2fb0
5 changed files with 24 additions and 7 deletions

View File

@ -56,5 +56,8 @@
"main-menu-item-10": "Change Watch DPI",
"set-dpi-message": "Enter New DPI Value:",
"default-dpi-is": "Default DPI is",
"current-dpi-is": "Current DPI is"
"current-dpi-is": "Current DPI is",
"usb-one-device": "Make sure ONLY your watch is connected",
"accept-authorisation": "Please select \"Always Allow\" for authorisation on watch",
"usb-not-connected": "Make sure your watch is not connected via USB"
}

View File

@ -24,8 +24,8 @@ module.exports = {
common.dualLog(element + ' - ' + result.stdout)
if (element === "data\\apps\\simpleweather_base.apk") {
await common.downloadFile('http://kithub.cf/Karl/MiWatchKleaner-APKs/raw/master/Others/simpleweather_split_config.armeabi_v7a.apk', './data/apps/simpleweather_split_config.armeabi_v7a.apk')
await common.downloadFile('http://kithub.cf/Karl/MiWatchKleaner-APKs/raw/master/Others/simpleweather_split_config.xhdpi.apk', './data/apps/simpleweather_split_config.xhdpi.apk')
await common.downloadFile('https://github.com/karl0ss/MiWatchKleaner-APKs/raw/master/Others/simpleweather_split_config.armeabi_v7a.apk', './data/apps/simpleweather_split_config.armeabi_v7a.apk')
await common.downloadFile('https://github.com/karl0ss/MiWatchKleaner-APKs/raw/master/Others/simpleweather_split_config.xhdpi.apk', './data/apps/simpleweather_split_config.xhdpi.apk')
await shellExec(adbRun + ' install-multiple "data\\apps\\simpleweather_base.apk" "data\\apps\\simpleweather_split_config.armeabi_v7a.apk" "data\\apps\\simpleweather_split_config.xhdpi.apk"').then(async function (result) {
common.log(result)
common.dualLog('simple-weather-activated-on-watch')
@ -154,6 +154,10 @@ module.exports = {
watchConnection: async (value) => {
Language.setActiveLang(globalVariables.language)
if (value.connection === "usb") {
common.dualLog(await Language.get('usb-one-device', 'whiteBright'))
await common.pause(2000)
common.dualLog(await Language.get('accept-authorisation', 'whiteBright'))
await common.pause(3000)
await module.exports.killAdbServer()
result = await shellExec(adbRun + ' devices')
console.log(result.stdout)
@ -171,7 +175,11 @@ module.exports = {
}
}
if (value.connection === "wifi") {
common.dualLog(await Language.get('usb-not-connected', 'whiteBright'))
await common.pause(2000)
const value = await inquirer.connectWifi();
common.dualLog(await Language.get('accept-authorisation', 'whiteBright'))
await common.pause(3000)
await module.exports.killAdbServer()
result = await shellExec(adbRun + ' connect ' + value.connectWifi)
logger.info("Connect Wifi Result " + result.stdout)

View File

@ -70,7 +70,7 @@ module.exports = {
},
getCompatibleAppsList: async () => {
let settings = { method: "Get" };
const response = await fetch("http://kithub.cf/Karl/MiWatchKleaner-APKs/raw/master/compatibleApps.json", settings)
const response = await fetch("https://raw.githubusercontent.com/karl0ss/MiWatchKleaner-APKs/master/compatibleApps.json", settings)
.then(res => res.json())
return response
},

7
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "miwatchkleaner",
"version": "3.1.2",
"version": "3.2.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -1242,6 +1242,11 @@
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw=="
},
"settings-store": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/settings-store/-/settings-store-1.4.1.tgz",
"integrity": "sha512-AJ7EYdaL9TksOStjablB/6EqOJN8ZW97Kp3Vi+YuPDoegRuCJvsbZolxoqHpgSFG2Jc8trQGF+0RPeN5My2G/A=="
},
"shell-exec": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/shell-exec/-/shell-exec-1.0.2.tgz",

View File

@ -10,7 +10,7 @@
},
"repository": {
"type": "git",
"url": "http://kithub.cf/Karl/MiWatchKleaner.git"
"url": "https://github.com/karl0ss/MiWatchKleaner.git"
},
"author": "Karl Hudgell",
"license": "ISC",
@ -28,6 +28,7 @@
"node-fetch": "^2.6.0",
"perfect-logger": "^2.0.1",
"pkg": "^4.4.7",
"settings-store": "^1.4.1",
"shell-exec": "^1.0.2",
"shelljs": "^0.8.4"
},