Skip to content

Commit

Permalink
Revert interval select
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangao authored and zhangao committed Aug 25, 2023
1 parent bd322be commit 7c307f0
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 265 deletions.
3 changes: 2 additions & 1 deletion src/aliapi/dirfilelist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,7 @@ export default class AliDirFileList {
for (let i = 0, maxi = file_idList.length; i < maxi; i++) {
list.set(file_idList[i], { dirID: file_idList[i], size: 0 })
if (i > 0) postData = postData + ','
let id = file_idList[i].includes('root') ? 'root' : file_idList[i]
const data2 = {
body: {
drive_id: drive_id,
Expand All @@ -686,7 +687,7 @@ export default class AliDirFileList {
order_by: 'size DESC'
},
headers: { 'Content-Type': 'application/json' },
id: file_idList[i],
id: id,
method: 'POST',
url: '/file/search'
}
Expand Down
9 changes: 8 additions & 1 deletion src/aliapi/dirlist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,13 @@ export default class AliDirList {
for (let i = 0, maxi = dirList.length; i < maxi; i++) {
if (i > 0) postData = postData + ','
const query = 'type="folder" and ' + dirList[i].dirID
let id = dirList[i].dirID
.replaceAll('"', '')
.replaceAll(' ', '')
.replaceAll('-', '')
.replaceAll(':', '')
.replaceAll(',', '')
if (id.includes('root')) id = 'root'
const data2 = {
body: {
drive_id: drive_id,
Expand All @@ -273,7 +280,7 @@ export default class AliDirList {
fields: 'thumbnail'
},
headers: { 'Content-Type': 'application/json' },
id: dirList[i].dirID.replaceAll('"', '').replaceAll(' ', '').replaceAll('-', '').replaceAll(':', '').replaceAll(',', ''),
id: id,
method: 'POST',
url: '/file/search'
}
Expand Down
45 changes: 1 addition & 44 deletions src/down/DownDowned.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ const appStore = useAppStore()
const winStore = useWinStore()
const downedStore = useDownedStore()
const rangIsSelecting = ref(false)
const rangSelectID = ref('')
const rangSelectStart = ref('')
const rangSelectEnd = ref('')
const rangSelectFiles = ref<{ [k: string]: any }>({})
const keyboardStore = useKeyboardStore()
keyboardStore.$subscribe((_m: any, state: KeyboardState) => {
if (appStore.appTab != 'down' || appStore.GetAppTabMenu != 'DownedRight') return
Expand Down Expand Up @@ -71,22 +65,6 @@ const handleRightClick = (e: { event: MouseEvent; node: any }) => {
if (!downedStore.ListSelected.has(key)) downedStore.mMouseSelect(key, false, false)
onShowRightMenu('downedrightmenu', e.event.clientX, e.event.clientY)
}
const onSelectRangStart = () => {
onHideRightMenuScroll()
rangIsSelecting.value = !rangIsSelecting.value
rangSelectID.value = ''
rangSelectStart.value = ''
rangSelectEnd.value = ''
rangSelectFiles.value = {}
downedStore.mRefreshListDataShow(false)
}
const onSelectCancel = () => {
onHideRightMenuScroll()
downedStore.ListSelected.clear()
downedStore.ListFocusKey = ''
downedStore.mRefreshListDataShow(false)
}
</script>

<template>
Expand Down Expand Up @@ -135,28 +113,7 @@ const onSelectCancel = () => {
</a-button>
</AntdTooltip>
</div>
<div class='selectInfo'>{{ downedStore.ListDataSelectCountInfo }}</div>
<div style='margin: 0 2px'>
<AntdTooltip placement='rightTop'>
<a-button shape='square' type='text' tabindex='-1' class='qujian'
:status="rangIsSelecting ? 'danger' : 'normal'" title='Ctrl+Q' @click='onSelectRangStart'>
{{ rangIsSelecting ? '取消选择' : '区间选择' }}
</a-button>
<template #title>
<div>
第1步: 点击 区间选择 这个按钮
<br />
第2步: 鼠标点击一个文件
<br />
第3步: 移动鼠标点击另外一个文件
</div>
</template>
</AntdTooltip>
<a-button shape='square' v-if='!rangIsSelecting && downedStore.ListSelected.size > 0' type='text' tabindex='-1' class='qujian'
status='normal' @click='onSelectCancel'>
取消已选
</a-button>
</div>
<div class="selectInfo" style="min-width: 266px">{{ downedStore.ListDataSelectCountInfo }}</div>
</div>
<div class="toppanlist" @keydown.space.prevent="() => true">
<a-list
Expand Down
45 changes: 1 addition & 44 deletions src/down/DownDowning.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ const appStore = useAppStore()
const winStore = useWinStore()
const downingStore = useDowningStore()
const rangIsSelecting = ref(false)
const rangSelectID = ref('')
const rangSelectStart = ref('')
const rangSelectEnd = ref('')
const rangSelectFiles = ref<{ [k: string]: any }>({})
const keyboardStore = useKeyboardStore()
keyboardStore.$subscribe((_m: any, state: KeyboardState) => {
if (appStore.appTab != 'down' || appStore.GetAppTabMenu != 'DowningRight') return
Expand Down Expand Up @@ -74,22 +68,6 @@ const handleRightClick = (e: { event: MouseEvent; node: any }) => {
if (!downingStore.ListSelected.has(key)) downingStore.mMouseSelect(key, false, false)
onShowRightMenu('downingrightmenu', e.event.clientX, e.event.clientY)
}
const onSelectRangStart = () => {
onHideRightMenuScroll()
rangIsSelecting.value = !rangIsSelecting.value
rangSelectID.value = ''
rangSelectStart.value = ''
rangSelectEnd.value = ''
rangSelectFiles.value = {}
downingStore.mRefreshListDataShow(false)
}
const onSelectCancel = () => {
onHideRightMenuScroll()
downingStore.ListSelected.clear()
downingStore.ListFocusKey = ''
downingStore.mRefreshListDataShow(false)
}
</script>

<template>
Expand Down Expand Up @@ -159,28 +137,7 @@ const onSelectCancel = () => {
</a-button>
</AntdTooltip>
</div>
<div class='selectInfo'>{{ downingStore.ListDataSelectCountInfo }}</div>
<div style='margin: 0 2px'>
<AntdTooltip placement='rightTop'>
<a-button shape='square' type='text' tabindex='-1' class='qujian'
:status="rangIsSelecting ? 'danger' : 'normal'" title='Ctrl+Q' @click='onSelectRangStart'>
{{ rangIsSelecting ? '取消选择' : '区间选择' }}
</a-button>
<template #title>
<div>
第1步: 点击 区间选择 这个按钮
<br />
第2步: 鼠标点击一个文件
<br />
第3步: 移动鼠标点击另外一个文件
</div>
</template>
</AntdTooltip>
<a-button shape='square' v-if='!rangIsSelecting && downingStore.ListSelected.size > 0' type='text' tabindex='-1' class='qujian'
status='normal' @click='onSelectCancel'>
取消已选
</a-button>
</div>
<div class='selectInfo' style='min-width: 266px'>{{ downingStore.ListDataSelectCountInfo }}</div>
</div>
<div class='toppanlist' @keydown.space.prevent='() => true'>
<a-list
Expand Down
43 changes: 0 additions & 43 deletions src/down/DownUploaded.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ const appStore = useAppStore()
const winStore = useWinStore()
const uploadedStore = useUploadedStore()
const rangIsSelecting = ref(false)
const rangSelectID = ref('')
const rangSelectStart = ref('')
const rangSelectEnd = ref('')
const rangSelectFiles = ref<{ [k: string]: any }>({})
const keyboardStore = useKeyboardStore()
keyboardStore.$subscribe((_m: any, state: KeyboardState) => {
if (appStore.appTab != 'down' || appStore.GetAppTabMenu != 'UploadedRight') return
Expand Down Expand Up @@ -129,22 +123,6 @@ const onSelectFile = (item: IStateUploadTask | undefined, cmd: string) => {
}
}
}
const onSelectRangStart = () => {
onHideRightMenuScroll()
rangIsSelecting.value = !rangIsSelecting.value
rangSelectID.value = ''
rangSelectStart.value = ''
rangSelectEnd.value = ''
rangSelectFiles.value = {}
uploadedStore.mRefreshListDataShow(false)
}
const onSelectCancel = () => {
onHideRightMenuScroll()
uploadedStore.ListSelected.clear()
uploadedStore.ListFocusKey = 0
uploadedStore.mRefreshListDataShow(false)
}
</script>

<template>
Expand Down Expand Up @@ -195,27 +173,6 @@ const onSelectCancel = () => {
</AntdTooltip>
</div>
<div class="selectInfo">{{ uploadedStore.ListDataSelectCountInfo }}</div>
<div style='margin: 0 2px'>
<AntdTooltip placement='rightTop'>
<a-button shape='square' type='text' tabindex='-1' class='qujian'
:status="rangIsSelecting ? 'danger' : 'normal'" title='Ctrl+Q' @click='onSelectRangStart'>
{{ rangIsSelecting ? '取消选择' : '区间选择' }}
</a-button>
<template #title>
<div>
第1步: 点击 区间选择 这个按钮
<br />
第2步: 鼠标点击一个文件
<br />
第3步: 移动鼠标点击另外一个文件
</div>
</template>
</AntdTooltip>
<a-button shape='square' v-if='!rangIsSelecting && uploadedStore.ListSelected.size > 0' type='text' tabindex='-1' class='qujian'
status='normal' @click='onSelectCancel'>
取消已选
</a-button>
</div>

<div style="flex-grow: 1"></div>

Expand Down
44 changes: 0 additions & 44 deletions src/down/DownUploading.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ const appStore = useAppStore()
const winStore = useWinStore()
const uploadingStore = useUploadingStore()
const rangIsSelecting = ref(false)
const rangSelectID = ref('')
const rangSelectStart = ref('')
const rangSelectEnd = ref('')
const rangSelectFiles = ref<{ [k: string]: any }>({})
const menuShowDir = ref(false)
const menuShowTask = ref(false)
uploadingStore.$subscribe((_m: any, state: any) => {
Expand Down Expand Up @@ -60,23 +54,6 @@ const handleRightClick = (e: { event: MouseEvent; node: any }) => {
if (!uploadingStore.ListSelected.has(key)) uploadingStore.mMouseSelect(key, false, false)
onShowRightMenu('rightuploadingmenu', e.event.clientX, e.event.clientY)
}
const onSelectRangStart = () => {
onHideRightMenuScroll()
rangIsSelecting.value = !rangIsSelecting.value
rangSelectID.value = ''
rangSelectStart.value = ''
rangSelectEnd.value = ''
rangSelectFiles.value = {}
uploadingStore.mRefreshListDataShow(false)
}
const onSelectCancel = () => {
onHideRightMenuScroll()
uploadingStore.ListSelected.clear()
uploadingStore.ListFocusKey = 0
uploadingStore.mRefreshListDataShow(false)
}
</script>

<template>
Expand Down Expand Up @@ -130,27 +107,6 @@ const onSelectCancel = () => {
</AntdTooltip>
</div>
<div class="selectInfo">{{ uploadingStore.ListDataSelectCountInfo }}</div>
<div style='margin: 0 2px'>
<AntdTooltip placement='rightTop'>
<a-button shape='square' type='text' tabindex='-1' class='qujian'
:status="rangIsSelecting ? 'danger' : 'normal'" title='Ctrl+Q' @click='onSelectRangStart'>
{{ rangIsSelecting ? '取消选择' : '区间选择' }}
</a-button>
<template #title>
<div>
第1步: 点击 区间选择 这个按钮
<br />
第2步: 鼠标点击一个文件
<br />
第3步: 移动鼠标点击另外一个文件
</div>
</template>
</AntdTooltip>
<a-button shape='square' v-if='!rangIsSelecting && uploadingStore.ListSelected.size > 0' type='text' tabindex='-1' class='qujian'
status='normal' @click='onSelectCancel'>
取消已选
</a-button>
</div>

<div style="flex-grow: 1"></div>
<div class="cell tiquma">瞬时速度</div>
Expand Down
45 changes: 1 addition & 44 deletions src/down/m3u8/M3u8Downloaded.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,6 @@ const appStore = useAppStore()
const winStore = useWinStore()
const downedStore = useM3u8DownloadedStore()
const rangIsSelecting = ref(false)
const rangSelectID = ref('')
const rangSelectStart = ref('')
const rangSelectEnd = ref('')
const rangSelectFiles = ref<{ [k: string]: any }>({})
const keyboardStore = useKeyboardStore()
keyboardStore.$subscribe((_m: any, state: KeyboardState) => {
if (appStore.appTab != 'down' || appStore.GetAppTabMenu != 'DownedRight') return
Expand Down Expand Up @@ -63,22 +57,6 @@ const handleRightClick = (e: { event: MouseEvent; node: any }) => {
if (!downedStore.ListSelected.has(key)) downedStore.mMouseSelect(key, false, false)
onShowRightMenu('downedrightmenu', e.event.clientX, e.event.clientY)
}
const onSelectRangStart = () => {
onHideRightMenuScroll()
rangIsSelecting.value = !rangIsSelecting.value
rangSelectID.value = ''
rangSelectStart.value = ''
rangSelectEnd.value = ''
rangSelectFiles.value = {}
downedStore.mRefreshListDataShow(false)
}
const onSelectCancel = () => {
onHideRightMenuScroll()
downedStore.ListSelected.clear()
downedStore.ListFocusKey = ''
downedStore.mRefreshListDataShow(false)
}
</script>

<template>
Expand Down Expand Up @@ -127,28 +105,7 @@ const onSelectCancel = () => {
</a-button>
</AntdTooltip>
</div>
<div class="selectInfo">{{ downedStore.ListDataSelectCountInfo }}</div>
<div style='margin: 0 2px'>
<AntdTooltip placement='rightTop'>
<a-button shape='square' type='text' tabindex='-1' class='qujian'
:status="rangIsSelecting ? 'danger' : 'normal'" title='Ctrl+Q' @click='onSelectRangStart'>
{{ rangIsSelecting ? '取消选择' : '区间选择' }}
</a-button>
<template #title>
<div>
第1步: 点击 区间选择 这个按钮
<br />
第2步: 鼠标点击一个文件
<br />
第3步: 移动鼠标点击另外一个文件
</div>
</template>
</AntdTooltip>
<a-button shape='square' v-if='!rangIsSelecting && downedStore.ListSelected.size > 0' type='text' tabindex='-1' class='qujian'
status='normal' @click='onSelectCancel'>
取消已选
</a-button>
</div>
<div class="selectInfo" style="min-width: 266px">{{ downedStore.ListDataSelectCountInfo }}</div>
</div>
<div class="toppanlist" @keydown.space.prevent="() => true">
<a-list
Expand Down
Loading

0 comments on commit 7c307f0

Please sign in to comment.