Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
niostack committed Sep 25, 2024
1 parent 9b0959d commit 11ab8e6
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 71 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# 更新日志 / Change Log

1. 为了方便试用, 增加了GitHub认证功能, 成功激活GitHub认证功能,可以永久免费连接5个设备
To facilitate trial use, GitHub authentication has been added. Successfully activating GitHub authentication allows permanent free connection of up to 5 devices
1. 修复已知BUG / Fix known bugs
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"package": {
"productName": "TikMatrix",
"version": "1.7.5"
"version": "1.7.6"
},
"tauri": {
"allowlist": {
Expand Down
10 changes: 5 additions & 5 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<div class="flex flex-row items-start bg-base-300 h-screen w-screen">
<Sidebar />
<!-- <Toast /> -->
<ManageDevices />
</div>

Expand Down Expand Up @@ -103,7 +102,6 @@ import TrainSettings from './components/group/TrainSettings.vue'
import PublishSettings from './components/group/PublishSettings.vue'
import { inject } from 'vue'
import * as util from './utils'
// import Toast from './components/Toast.vue'
import { invoke } from "@tauri-apps/api/tauri";
import { window as tauriWindow } from "@tauri-apps/api"
import { TauriEvent } from "@tauri-apps/api/event"
Expand Down Expand Up @@ -147,7 +145,6 @@ export default {
ManagePostBots,
ManageEditBots,
Miniremote,
// Toast,
BuyLicense,
TrainSettings,
PublishSettings
Expand Down Expand Up @@ -301,12 +298,13 @@ export default {
this.is_updating = false
return;
}
this.check_file_update('tiktok-agent(6/6)', this.remote_version.agent_version, url, (updated) => {
this.check_file_update('tiktok-agent(6/6)', this.remote_version.agent_version, url, async (updated) => {
this.is_updating = false
if (updated) {
invoke("grant_agent_permission");
invoke("start_agent");
}
await message(this.$t('updateServiceSuccess'));
}, () => {
invoke("stop_agent");
});
Expand Down Expand Up @@ -387,13 +385,15 @@ export default {
this.$emitter.on('downloadOcr', () => {
this.download_ocr()
});
this.$emitter.on('updateService', () => {
this.check_update()
});
listen("reload", async () => {
if (this.is_updating) {
return;
}
window.location.reload();
});
this.check_update();
}
}
</script>
6 changes: 5 additions & 1 deletion src/components/General.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@
@click="$emitter.emit('downloadOcr')">
<font-awesome-icon icon="fa fa-download" class="h-3 w-3" />{{ $t('downloadOcr') }}
</button>

<button
class="btn btn-sm bg-blue-500 hover:bg-blue-300 border-0 text-white text-xs block font-normal ml-1 mb-1 min-w-max"
@click="$emitter.emit('updateService')">
<font-awesome-icon icon="fa fa-cloud-arrow-down" class="h-3 w-3" />{{ $t('updateService') }}
</button>
<dialog ref="proxy_dialog" class="modal">
<div class="modal-box">
<h3 class="font-bold text-lg">{{ $t('proxyServer') }}</h3>
Expand Down
32 changes: 0 additions & 32 deletions src/components/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,6 @@ export default {
setTimeout(() => {
this.adb_command(['install', '-r', '-t', '-g', work_path + 'bin/com.github.tikmatrix.apk'])
this.adb_command(['install', '-r', '-t', '-g', work_path + 'bin/com.github.tikmatrix.test.apk'])
this.$emitter.emit('showToast', this.$t('initSuccess'))
}, 3000)
},
Expand All @@ -605,12 +604,7 @@ export default {
serials: this.selection,
})
.then(res => {
console.log(res)
this.$emitter.emit('showToast', `${res.data} ${this.$t('taskCreated')}`)
})
.catch(err => {
console.log(err)
})
},
publish(addProductLink) {
Expand All @@ -624,13 +618,9 @@ export default {
add_product_link: addProductLink ? 1 : 0
})
.then(res => {
console.log(res)
this.$emitter.emit('showToast', `${res.data} ${this.$t('taskCreated')}`)
})
.catch(err => {
console.log(err)
})
},
message() {
if (this.selection.length == 0) {
Expand All @@ -643,13 +633,9 @@ export default {
serials: this.selection,
})
.then(res => {
console.log(res)
this.$emitter.emit('showToast', `${res.data} ${this.$t('taskCreated')}`)
})
.catch(err => {
console.log(err)
})
},
share(postUrl) {
if (this.selection.length == 0) {
Expand All @@ -663,12 +649,7 @@ export default {
post_url: postUrl
})
.then(res => {
console.log(res)
this.$emitter.emit('showToast', `${res.data} ${this.$t('taskCreated')}`)
})
.catch(err => {
console.log(err)
})
},
stop_task() {
Expand All @@ -683,9 +664,6 @@ export default {
.then(res => {
this.$emitter.emit('showToast', this.$t('commandSendSuccess'))
})
.catch(err => {
console.log(err)
})
},
send_keycode(keycode) {
this.$emitter.emit('eventData', JSON.stringify({
Expand Down Expand Up @@ -722,13 +700,9 @@ export default {
target_username: targetUsername
})
.then(res => {
console.log(res)
this.$emitter.emit('showToast', `${res.data} ${this.$t('taskCreated')}`)
})
.catch(err => {
console.log(err)
})
},
follow(targetUsername) {
if (this.selection.length == 0) {
Expand All @@ -742,13 +716,9 @@ export default {
target_username: targetUsername
})
.then(res => {
console.log(res)
this.$emitter.emit('showToast', `${res.data} ${this.$t('taskCreated')}`)
})
.catch(err => {
console.log(err)
})
},
async copyFromPhone() {
Expand Down Expand Up @@ -858,12 +828,10 @@ export default {
this.send_screen_mode(mode)
});
document.addEventListener('copy', () => {
console.log('复制事件被触发');
this.copyFromPhone()
});
document.addEventListener('paste', () => {
console.log('粘贴事件被触发');
this.pasteToPhone()
});
this.get_menus()
Expand Down
29 changes: 0 additions & 29 deletions src/components/Toast.vue

This file was deleted.

6 changes: 5 additions & 1 deletion src/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,9 +429,13 @@ export const i18n = createI18n({
githubAuthFailureMessage: 'GitHub authorization failed. Please try again.',
githubAuthErrorMessage: 'An error occurred during GitHub authorization.',
left_days: 'Left Days',
unlicensed: 'Unlicensed'
unlicensed: 'Unlicensed',
updateService: 'Update Service',
updateServiceSuccess: 'Update Service Success'
},
'zh-CN': {
updateServiceSuccess: '更新服务成功',
updateService: '更新服务',
unlicensed: '未授权',
left_days: '剩余天数',
githubAuth: 'GitHub 认证',
Expand Down

0 comments on commit 11ab8e6

Please sign in to comment.