Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add video batch selection mode #4198

Open
wants to merge 41 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
90eb014
Implement base styling for top nav buttons and label
kommunarr Sep 10, 2023
1f7e689
Refactor video dropdown options and event handling to be utility func…
kommunarr Sep 11, 2023
9194e03
Separate history-add and history-remove actions
kommunarr Sep 11, 2023
68c4d11
Implement selected objects being stored in Vuex state
kommunarr Sep 11, 2023
7558f62
Add plural labels & top nav select mode state variable integration
kommunarr Sep 11, 2023
98ad330
Implement & update ft-list-video selectMode state update & dropdown l…
kommunarr Sep 11, 2023
45abc20
Update favorites icon watch styling with select mode enabled
kommunarr Sep 11, 2023
be8fb08
Update Select Mode to include save/unsave and count
kommunarr Sep 11, 2023
13d4b96
Include count in most labels when possible
kommunarr Sep 11, 2023
356e038
Update label and add back ft-video-list needed functions
kommunarr Sep 11, 2023
1e47a00
Implement Select Mode set to disabled on route change
kommunarr Sep 11, 2023
78f9aeb
Update additional video dropdown labels to include count
kommunarr Sep 12, 2023
76d5020
Update certain toasts to use
kommunarr Sep 12, 2023
4790d42
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr Sep 12, 2023
3d7d888
Implement settings navIcon styling improvement
kommunarr Sep 12, 2023
b1cfb74
Fix selection addition/removal logic
kommunarr Sep 12, 2023
2bfd207
Put .stop modifier on FtIconButton click/keydown events
kommunarr Sep 12, 2023
5ddf7f5
Implement selected video styling
kommunarr Sep 12, 2023
36f847d
Update logic determining whether to display video is selected or not …
kommunarr Sep 12, 2023
87010b9
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr Sep 12, 2023
f449a19
Remove videos from selection onDestroy
kommunarr Sep 13, 2023
a815284
Refactor away isSelectedInSelectMode value to prevent negative count bug
kommunarr Sep 13, 2023
ff316eb
Implement ctrl+A behavior for videos in Select Mode
kommunarr Sep 13, 2023
4ba6d0d
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr Sep 14, 2023
7b40fec
Refactor counts to be stored outside of utils class
kommunarr Sep 14, 2023
5bb15e9
Disable element selection when Select Mode is enabled
kommunarr Sep 14, 2023
35ddf5f
De-selects all after Ctrl+A is pressed in Select Mode
kommunarr Sep 14, 2023
ad9f9ec
Implement safeguard on Vue very rarely not updating styling on 1-2 vi…
kommunarr Sep 14, 2023
047ff72
Implement mouse dragging selection for making multiple selections easier
kommunarr Sep 17, 2023
a32c685
Standardize labels to use 'Selection Mode' verbiage
kommunarr Sep 17, 2023
2f8fe7f
Updates labels to be 'Video Selection Mode' while only video selectio…
kommunarr Sep 17, 2023
2b23046
Implement missing 'More Options' label & adjust new dropdown-position
kommunarr Sep 17, 2023
29f272d
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr Sep 25, 2023
5b13d8d
Institute cap of 15 on videos that can be opened at once
kommunarr Sep 26, 2023
b0d40b7
Prevent ft-icon-button dropdown mousedown events from bubbling up
kommunarr Sep 26, 2023
f9a73e6
Update selectionModeSelections data object to be reactive
kommunarr Sep 26, 2023
02da93d
Implement select mode enabled styling
kommunarr Oct 21, 2023
b6a3dd3
Implement functional channel hiding/unhiding on Selection Mode dropdown
kommunarr Nov 21, 2023
74f14ea
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr Nov 22, 2023
24e2887
Merge branch 'development' of github.com:FreeTubeApp/FreeTube into fe…
kommunarr Jan 2, 2024
509da87
Resolve 'locale name' label issue
kommunarr Jan 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions _scripts/ProcessLocalesPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ class ProcessLocalesPlugin {
}
}

if (Object.prototype.hasOwnProperty.call(data, 'Locale Name')) {
delete data['Locale Name']
}

this.removeEmptyValues(data)

let filename = `${this.outputDir}/${locale}.json`
Expand Down
5 changes: 5 additions & 0 deletions src/renderer/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
block-size: 100%;
}

.selectionModeEnabled {
-webkit-user-select: none;
user-select: none;
}

.routerView {
flex: 1 1 0%;
margin-block: 18px;
Expand Down
14 changes: 14 additions & 0 deletions src/renderer/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ export default defineComponent({

externalLinkHandling: function () {
return this.$store.getters.getExternalLinkHandling
},

isSelectionModeEnabled: function () {
return this.$store.getters.getIsSelectionModeEnabled
}
},
watch: {
Expand Down Expand Up @@ -333,6 +337,15 @@ export default defineComponent({
}
break
}

if (this.isSelectionModeEnabled && (event.ctrlKey || event.metaKey)) {
switch (event.key) {
case 'A':
case 'a':
this.selectAllVideosInSelectionMode()
break
}
}
},

openAllLinksExternally: function () {
Expand Down Expand Up @@ -541,6 +554,7 @@ export default defineComponent({
'updateBaseTheme',
'updateMainColor',
'updateSecColor',
'selectAllVideosInSelectionMode',
'showOutlines',
'hideOutlines'
])
Expand Down
3 changes: 2 additions & 1 deletion src/renderer/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
id="app"
:class="{
hideOutlines: outlinesHidden,
isLocaleRightToLeft: isLocaleRightToLeft
isLocaleRightToLeft: isLocaleRightToLeft,
selectionModeEnabled: isSelectionModeEnabled
}"
>
<top-nav ref="topNav" />
Expand Down
7 changes: 6 additions & 1 deletion src/renderer/components/ft-icon-button/ft-icon-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
user-select: none;
}

.iconButton {
.iconButton.base-nav-icon {
inline-size: 1em;
block-size: 1em;
}

.iconButton:not(.base-nav-icon) {
border-radius: 50%;
cursor: pointer;
block-size: 1em;
Expand Down
20 changes: 11 additions & 9 deletions src/renderer/components/ft-icon-button/ft-icon-button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
:icon="icon"
:class="{
[theme]: true,
shadow: useShadow
shadow: useShadow,
navIcon: theme === 'base-nav-icon'
}"
:style="{
padding: padding + 'px',
Expand All @@ -15,10 +16,10 @@
tabindex="0"
role="button"
:aria-expanded="dropdownShown"
@click="handleIconClick"
@mousedown="handleIconMouseDown"
@keydown.enter.prevent="handleIconClick"
@keydown.space.prevent="handleIconClick"
@click.stop="handleIconClick"
@mousedown.stop="handleIconMouseDown"
@keydown.enter.stop.prevent="handleIconClick"
@keydown.space.stop.prevent="handleIconClick"
/>
<template
v-if="dropdownShown"
Expand All @@ -27,7 +28,7 @@
v-if="useModal"
:autosize="true"
:label="sanitizeForHtmlId(`iconButtonPrompt-${title}`)"
@click="dropdownShown = false"
@click.stop="dropdownShown = false"
>
<slot>
<ul
Expand Down Expand Up @@ -80,9 +81,10 @@
aria-selected="false"
:tabindex="option.type === 'divider' ? '-1' : '0'"
:class="option.type === 'divider' ? 'listItemDivider' : 'listItem'"
@click="handleDropdownClick({url: option.value, index: index}, $event)"
@keydown.enter="handleDropdownClick({url: option.value, index: index}, $event)"
@keydown.space="handleDropdownClick({url: option.value, index: index}, $event)"
@click.stop="handleDropdownClick({url: option.value, index: index}, $event)"
@mousedown.stop.prevent
@keydown.enter.stop="handleDropdownClick({url: option.value, index: index}, $event)"
@keydown.space.stop="handleDropdownClick({url: option.value, index: index}, $event)"
>
{{ option.type === 'divider' ? '' : option.label }}
</li>
Expand Down
Loading