Skip to content

Commit

Permalink
1.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
niostack committed Sep 6, 2024
1 parent 1831025 commit 5c9c656
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 29 deletions.
18 changes: 7 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# Change Log
# 更新日志 / Change Log

- Add more network options for users to choose from
1. 优化大量任务时,软件卡顿的问题
Optimized the issue of software lag when handling a large number of tasks

## Improvements
2. 优化用户操作反馈
Improved user operation feedback

- Support more network for usdt payment
- Arbitrum One
- Avalanche C-Chain
- Optimism
- Polygon
- Solana
- TON
- X Layer
3. 修复OTG和USB混合连接模式下,设备无法连接的问题
Fixed the issue of devices unable to connect in mixed OTG and USB connection mode
3 changes: 2 additions & 1 deletion scripts/send-msg.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
process.env.URL = 'https://api.tikmatrix.com/download'
const chatId = process.env.CHAT_ID
const token = process.env.TOKEN
const tag = process.env.TAG
Expand All @@ -7,7 +8,7 @@ import TelegramBot from 'node-telegram-bot-api';
// 从CHANGELOG.md中读取版本更新说明
import fs from 'fs';
const changelog = fs.readFileSync('CHANGELOG.md', 'utf8');
const message = `A new release: ${tag} is available:\n ${changelog} Check it out at ${url}`
const message = `A new release: ${tag} is available:\n ${changelog}\n Check it out at ${url}`


// 创建一个机器人实例
Expand Down
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.3"
"version": "1.7.4"
},
"tauri": {
"allowlist": {
Expand Down
11 changes: 7 additions & 4 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

Expand Down Expand Up @@ -103,11 +103,11 @@ 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 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"
import { ask } from '@tauri-apps/api/dialog';
import { ask, message } from '@tauri-apps/api/dialog';
import BuyLicense from './components/settings/BuyLicense.vue'
import { listen } from '@tauri-apps/api/event';
import axios from 'axios'
Expand Down Expand Up @@ -147,7 +147,7 @@ export default {
ManagePostBots,
ManageEditBots,
Miniremote,
Toast,
// Toast,
BuyLicense,
TrainSettings,
PublishSettings
Expand Down Expand Up @@ -367,6 +367,9 @@ export default {
tauriWindow.getCurrent().close();
}
});
this.$emitter.on('showToast', async (text) => {
await message(text);
});
this.check_update();
this.$emitter.on('openDevice', (device) => {
this.device = device
Expand Down
10 changes: 7 additions & 3 deletions src/components/Pagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<div class="bg-base-100">
<div class="w-full flex items-center p-4">
<span class="font-bold p-2 text-sm">{{ $t('total') }}: {{ filteredItems.length }}</span>
<div class="join">

<div class="join" v-if="pageCount > 1">
<button class="join-item btn btn-sm" @click="prevPage" :disabled="currentPage === 1">{{ $t('previous')
}}</button>
<button class="join-item btn btn-disabled btn-sm">{{ currentPage }} / {{ pageCount }}</button>
Expand All @@ -14,7 +15,7 @@
<option v-for="size in [5, 10, 20, 50, 100]" :key="size" :value="size">{{ size }}</option>
</select> -->

<div class="relative ml-2">
<div class="relative ml-2" v-if="searchTerm">
<font-awesome-icon :icon="['fas', 'search']" class="absolute left-3 top-1/2 transform -translate-y-1/2" />
<input type="search" v-model="searchTerm" :placeholder="$t('enterTips')"
class="input input-bordered w-full max-w-xs pl-8 input-sm" />
Expand Down Expand Up @@ -55,12 +56,15 @@ export default {
searchKeys: {
type: Array,
required: true
},
pageSize: {
type: Number,
default: 10
}
},
data() {
return {
currentPage: 1,
pageSize: 10,
searchTerm: '',
searchGroup: '',
}
Expand Down
8 changes: 8 additions & 0 deletions src/components/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,14 @@ export default {
})
},
async initDevice() {
const yes = await ask(this.$t('initDeviceConfirm'), this.$t('confirm'));
if (!yes) {
return
}
if (this.selection.length == 0) {
this.$emitter.emit('showToast', this.$t('noDevicesSelected'))
return
}
let work_path = await appDataDir();
this.$emitter.emit('showToast', this.$t('initStart'))
this.adb_command(['uninstall', 'com.github.tikmatrix'])
Expand Down
37 changes: 28 additions & 9 deletions src/components/device/ManageDevices.vue
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
<template>
<div class="w-full h-screen overflow-y-auto">
<Pagination ref="device_panel" :items="devices" :searchKeys="['serial', 'account']" @refresh="refreshPage">
<Pagination ref="device_panel" :items="devices" :pageSize="30" @refresh="refreshPage">
<template v-slot:buttons>
<MyButton @click="$service.reset_all_index" label="resetIndex" icon="fa fa-refresh" />
<MyButton @click="$refs.scan_dialog.show()" label="scanTCPDevice" icon="fa-solid fa-network-wired" />
</template>
<template v-slot:default="slotProps">
<div class="flex flex-wrap gap-2 p-4">
<div class="flex flex-wrap gap-2 flex-1">
<div v-for="(device, _index) in devices" :key="device.serial">
<div v-for="(device, _index) in slotProps.items" :key="device.serial">
<Miniremote :device="device" :key="device.key" />
</div>
</div>
</div>

<div v-if="slotProps.items.length == 0" class="p-4">
<div role="alert" class="alert alert-error">
<svg xmlns="http://www.w3.org/2000/svg" class="stroke-current shrink-0 h-6 w-6" fill="none"
viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
</svg>
<span>{{ $t('no_devices_tips') }}</span>
<div class="flex flex-col items-center justify-center">
<div class="relative w-64 h-64">
<div class="absolute inset-0 border-4 border-gray-300 rounded-full"></div>
<div class="absolute inset-0 border-4 border-blue-500 rounded-full animate-ping"></div>
<div class="absolute inset-0 flex items-center justify-center">
<i class="fas fa-mobile-alt text-5xl text-gray-600"></i>
</div>
<div class="absolute top-1/2 left-1/2 w-1 h-32 bg-blue-500 origin-bottom animate-radar"></div>
</div>
<span class="mt-4 text-lg font-semibold text-gray-700">{{ $t('detecting_devices') }}</span>
</div>
</div>
</template>
Expand Down Expand Up @@ -156,3 +159,19 @@ export default {
}
}
</script>
<style scoped>
@keyframes radar-sweep {
from {
transform: translate(-50%, -100%) rotate(0deg);
}
to {
transform: translate(-50%, -100%) rotate(360deg);
}
}
.animate-radar {
animation: radar-sweep 3s linear infinite;
}
</style>
5 changes: 5 additions & 0 deletions src/components/device/Miniremote.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,19 @@
@focus="(event) => event.target.select()" @blur="updateIndex" />
</details>


<span :class="'text-xs' + (task_status == 'RUNNING' ? ' text-green-500' : ' text-red-500')" v-if="big"> -
{{
$t(task_status) }}</span>
</div>
<div class="justify-center items-center text-center">
<span :class="'mr-2 ' + (big ? 'text-sm font-bold' : 'text-xs')">{{ name }} </span>
<span class="text-xs font-sans font-bold mr-1">{{ device.connect_type == 0 ? 'USB' :
'TCP'
}}</span>
<span class="text-xs font-sans" v-if="big">FPS: {{ fps.toFixed(0) }}</span>
</div>

</div>
<button
class="btn bg-transparent hover:bg-transparent hover:text-red-500 text-gray-700 float-right border-0 p-4"
Expand Down
4 changes: 4 additions & 0 deletions src/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,12 @@ export const i18n = createI18n({
depositAddress: 'Deposit Address',
depositComment: 'Deposit Comment',
networkTips: 'Please select the appropriate network for your coin recharge, different networks have different fees!',
detecting_devices: 'Detecting devices...',
initDeviceConfirm: 'Initialize the device will reinstall the 2 TikMatrix App, are you sure to initialize?',
},
'zh-CN': {
initDeviceConfirm: '初始化设备将重新安装2个TikMatrix App, 确定要初始化吗?',
detecting_devices: '正在检测设备...',
networkTips: '请自己选择适合你的充币网络, 不同网络的手续费不同!',
depositNetwork: '充币网络',
depositAddress: '充币地址',
Expand Down

0 comments on commit 5c9c656

Please sign in to comment.