Skip to content

Commit

Permalink
v1.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
niostack committed Jul 10, 2024
1 parent 96ab39a commit cb1c4c1
Show file tree
Hide file tree
Showing 17 changed files with 39 additions and 58 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Changelog

修复无法创建分组的bug
Fix bug that can't create group
支持自定义图片数量的图文类型的tiktok发布
Support custom number of images in tiktok post
Binary file modified src-tauri/bin/apk/com.github.tikmatrix.apk
Binary file not shown.
Binary file modified src-tauri/bin/apk/com.github.tikmatrix.test.apk
Binary file not shown.
Binary file modified src-tauri/bin/script/script.exe
Binary file not shown.
Binary file modified src-tauri/bin/script/tiktok-agent.exe
Binary file not shown.
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": "tiktok-matrix",
"version": "1.5.1"
"version": "1.5.2"
},
"tauri": {
"allowlist": {
Expand Down
1 change: 0 additions & 1 deletion src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ const api = {
scan_tcp: '/agent/api/tcp_scan',
stop_task: '/agent/api/stop_task',
menus: '/api/menus',
get_and_use_one_material: '/api/material/get_and_use_one',
get_accounts_by_device: '/api/account_by_device',
get_group_by_id: '/api/group/get_by_id',
move_to_group: '/api/device/move_to_group',
Expand Down
3 changes: 2 additions & 1 deletion src/components/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ export default {
train_duration: 0,
min_duration: 10,
max_duration: 30,
topic: ''
topic: '',
image_count: 2
})
.then(() => {
this.newGroupName = ''
Expand Down
22 changes: 0 additions & 22 deletions src/components/device/LeftBars.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,29 +116,7 @@ export default {
},
methods: {
post() {
this.$service.get_and_use_one_material({
group_id: this.group.id
}).then(res => {
let titles = this.group.title.split("\n");
let ramdomTitle = ''
if (titles.length > 0) {
ramdomTitle = Math.floor(Math.random() * titles.length);
}
let video = res.data.name
this.$emitter.emit('scriptEventData', {
name: 'publish', args: [
'0',
video,
ramdomTitle,
''
]
})
}).catch(err => {
})
},
get_group_by_id() {
if (this.device.group_id == 0) {
return;
Expand Down
2 changes: 1 addition & 1 deletion src/components/device/Miniremote.vue
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export default {
// max size
this.scrcpy.send(max_size)
// control
this.scrcpy.send('true')
this.scrcpy.send(this.big ? 'false' : 'true')
//fps
this.scrcpy.send(this.big ? 30 : 15)
Expand Down
32 changes: 19 additions & 13 deletions src/components/group/EditGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,21 +118,25 @@
<input class="border-2 border-gray-300 p-2 rounded col-span-1" v-model="publish_time6"
placeholder="00:00" />
</div>
<!-- <div class="grid grid-cols-4 w-full items-center gap-2 mb-2">
<div class="grid grid-cols-4 w-full items-center gap-2 mb-2">
<label class="font-bold text-right col-span-1">{{ $t('publishType') }}:</label>
<div class="col-span-2 flex items-center gap-4">
<div class="flex items-center">
<input type="radio" id="selfMade" value="1" v-model="mygroup.publish_type"
class="form-radio text-blue-500 h-4 w-4">
<label for="selfMade" class="ml-2">{{ $t('selfMade') }}</label>
</div>
<div class="flex items-center">
<input type="radio" id="aiMade" value="2" v-model="mygroup.publish_type"
class="form-radio text-blue-500 h-4 w-4">
<label for="aiMade" class="ml-2">{{ $t('aiMade') }}</label>
</div>
<div class="flex items-center">
<input type="radio" id="video" value="0" v-model="mygroup.publish_type"
class="form-radio text-blue-500 h-4 w-4">
<label for="video" class="ml-2">{{ $t('video') }}</label>
</div>
<div class="flex items-center">
<input type="radio" id="image" value="1" v-model="mygroup.publish_type"
class="form-radio text-blue-500 h-4 w-4">
<label for="image" class="ml-2">{{ $t('image') }}</label>
</div>
<div class="flex items-center" v-if="mygroup.publish_type == 1">
<input class="border-2 border-gray-300 p-2 rounded col-span-1 input-sm" v-model="mygroup.image_count"
:placeholder="$t('imageCount')" type="number" />
</div>
</div>
</div> -->
</div>

<div class="grid grid-cols-4 w-full items-center gap-2 mb-2">
<label class="font-bold text-right col-span-1">{{ $t('titles') }}:</label>
Expand Down Expand Up @@ -181,6 +185,7 @@ export default {
mygroup: {
auto_train: 0,
auto_publish: 0,
image_count: 2,
},
train_time1: '',
train_time2: '',
Expand Down Expand Up @@ -235,7 +240,8 @@ export default {
min_duration: Number(group.min_duration),
max_duration: Number(group.max_duration),
topic: group.topic,
comment: group.comment
comment: group.comment,
image_count: Number(group.image_count),
})
.then(() => {
this.$emitter.emit('closePageDialog', {})
Expand Down
2 changes: 1 addition & 1 deletion src/components/group/ManageGroups.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export default {
like_probable: Number(group.like_probable),
collect_probable: Number(group.collect_probable),
train_duration: Number(group.train_duration),
topic: group.topic
topic: group.topic,
})
.then(() => {
this.showMoal = false
Expand Down
5 changes: 1 addition & 4 deletions src/components/material/ManageMaterials.vue
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export default {
multiple: true, // 是否允许多选文件
directory: false, // 是否选择目录
filters: [ // 文件过滤器
{ name: 'Video Files', extensions: ['mp4'] },
{ name: 'Video Files', extensions: ['mp4', 'jpg', 'png'] },
]
});
Expand All @@ -220,9 +220,6 @@ export default {
.then(() => {
this.get_materials()
})
.catch(err => {
})
},
fission() {
Expand Down
8 changes: 4 additions & 4 deletions src/components/publishJob/ManagePublishJobs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<th>{{ $t('startTime') }}</th>
<th>{{ $t('status') }}</th>
<!-- <th>{{ $t('remark') }}</th> -->
<th>{{ $t('material') }}</th>
<!-- <th>{{ $t('material') }}</th> -->
<th>{{ $t('username') }}</th>
<th>{{ $t('device') }}</th>
<th>{{ $t('group') }}</th>
Expand All @@ -40,15 +40,15 @@
<div class="badge badge-error" v-else-if="publish_job.status == '3'">{{ $t('failed') }}</div>
</td>
<!-- <td>{{ publish_job.remark }}</td> -->
<td>
<!-- <td>
<template v-if="publish_job.material.endsWith('.mp4') || publish_job.material.endsWith('.webm')">
<video :src="`${$config.apiUrl}/${publish_job.material}`"
class="w-[100px] h-[100px] max-w-none"></video>
</template>
<template v-else>
<template v-else>
<img :src="`${$config.apiUrl}/${publish_job.material}`" class="w-[100px] h-[100px] max-w-none" />
</template>
</td>
</td> -->
<td>
<a class="link link-primary" :href="`https://www.tiktok.com/${publish_job.username}`"
target="_blank">{{
Expand Down
6 changes: 6 additions & 0 deletions src/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,14 @@ export const i18n = createI18n({
onlyOneDeviceSelected: 'Only One Device Selected',
openDownloadDir: 'Open Download Dir',
operating: 'Operating',
image: 'Image',
video: 'Video',
imageCount: 'Image Count',
},
'zh-CN': {
imageCount: '图片数量',
image: '图片',
video: '视频',
operating: '操作中',
openDownloadDir: '打开下载目录',
onlyOneDeviceSelected: '只能选择一个设备',
Expand Down
8 changes: 1 addition & 7 deletions src/service/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -582,13 +582,7 @@ export function get_menus() {
url: api.menus
})
}
export function get_and_use_one_material({ group_id }) {
return request({
method: 'get',
params: { group_id },
url: api.get_and_use_one_material
})
}

export function get_accounts_by_device({ device }) {
return request({
method: 'get',
Expand Down
2 changes: 1 addition & 1 deletion tiktok-agent

0 comments on commit cb1c4c1

Please sign in to comment.