mirror of
https://github.com/CzBiX/qb-web.git
synced 2026-04-14 10:19:48 +08:00
allow torrents to force start (button, api, locale)
This commit is contained in:
@@ -121,6 +121,10 @@ class Api {
|
||||
return this.actionTorrents('resume', hashes);
|
||||
}
|
||||
|
||||
public setForceStartTorrents(hashes: string[]) {
|
||||
return this.actionTorrents('setForceStart', hashes, {value:'true'});
|
||||
}
|
||||
|
||||
public reannounceTorrents(hashes: string[]) {
|
||||
return this.actionTorrents('reannounce', hashes);
|
||||
}
|
||||
|
||||
@@ -33,6 +33,16 @@
|
||||
>
|
||||
<v-icon>mdi-pause</v-icon>
|
||||
</v-btn>
|
||||
|
||||
<v-btn
|
||||
icon
|
||||
@click="forceStartTorrents"
|
||||
:title="$t('force_start')"
|
||||
:disabled="!hasSelected"
|
||||
>
|
||||
<v-icon>mdi-play-speed</v-icon>
|
||||
</v-btn>
|
||||
|
||||
<v-divider
|
||||
vertical
|
||||
inset
|
||||
@@ -466,6 +476,10 @@ export default class Torrents extends Vue {
|
||||
await api.resumeTorrents(this.selectedHashes);
|
||||
}
|
||||
|
||||
async forceStartTorrents() {
|
||||
await api.setForceStartTorrents(this.selectedHashes);
|
||||
}
|
||||
|
||||
async pauseTorrents() {
|
||||
await api.pauseTorrents(this.selectedHashes);
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ export default {
|
||||
todo: 'To Do',
|
||||
resume: 'Resume',
|
||||
pause: 'Pause',
|
||||
force_start: 'Force Start',
|
||||
info: 'Info',
|
||||
reset: 'Reset',
|
||||
login: 'Login',
|
||||
@@ -142,4 +143,4 @@ export default {
|
||||
inactive: 'Inactive',
|
||||
errored: 'Errored',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ export default {
|
||||
todo: '待办',
|
||||
resume: '恢复',
|
||||
pause: '暂停',
|
||||
force_start: '强制继续',
|
||||
info: '信息',
|
||||
reset: '重置',
|
||||
login: '登录',
|
||||
@@ -142,4 +143,4 @@ export default {
|
||||
inactive: '空闲',
|
||||
errored: '错误',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user