Skip to content

Commit

Permalink
feat: support no-cut mode (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenpt0809 committed Dec 2, 2024
1 parent 3669c59 commit 97473e3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ declare module 'vue' {
NProgress: typeof import('naive-ui')['NProgress']
NSelect: typeof import('naive-ui')['NSelect']
NSpace: typeof import('naive-ui')['NSpace']
NSwitch: typeof import('naive-ui')['NSwitch']
NText: typeof import('naive-ui')['NText']
NUpload: typeof import('naive-ui')['NUpload']
NUploadDragger: typeof import('naive-ui')['NUploadDragger']
Expand Down
11 changes: 11 additions & 0 deletions src/views/Start.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ const notification = useNotification()
const dialog = useDialog()
const message = useMessage()
const sliceEnabled = ref(false)
interface pendingTask {
key: string
create_at: string
Expand Down Expand Up @@ -113,6 +115,7 @@ function submitTasks(taskKeys: DataTableRowKey[]): void {
encode_param: encodeParam.value,
script: script.value,
video_key: key.toString(),
slice: sliceEnabled.value,
})
.then((res) => {
if (res.success) {
Expand Down Expand Up @@ -204,6 +207,14 @@ function deleteTasks(taskKeys: DataTableRowKey[]): void {
<NSpace justify="space-between">
<NGradientText size="18" type="warning"> Pending </NGradientText>
<NSpace>
<n-switch v-model:value="sliceEnabled" size="large">
<template #checked>
On Slicing
</template>
<template #unchecked>
Off Slicing
</template>
</n-switch>
<NButton type="error" @click="deleteTasks(checkedRowKeys)"> Delete </NButton>
<NButton type="primary" @click="submitTasks(checkedRowKeys)"> RUN </NButton>
</NSpace>
Expand Down

0 comments on commit 97473e3

Please sign in to comment.