-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Added a search button in the filter modal #6938
base: development
Are you sure you want to change the base?
Added a search button in the filter modal #6938
Conversation
I'm having trouble implementing the shift key functionality to open search results in a new window. The current implementation ive added detects the shift key press and tries to use ipcRenderer to send a 'createNewWindow' message (similar to how it's done in top-nav.vue) but it's not working. The normal search (without shift) works fine. Has anyone successfully implemented this behavior in other components? Any guidance would be much appreciated |
@@ -248,7 +256,28 @@ watch(searchFilterValueChanged, (value) => { | |||
function hideSearchFilters() { | |||
store.dispatch('hideSearchFilters') | |||
} | |||
function searchWithFilters() { | |||
const queryTextElement = document.querySelector('.searchInput input') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, you shouldn't use document.querySelector
. The appropriate way to do this would be to add a value to the utils store for the search query and pull it from there. Perhaps under searchSettings
:
FreeTube/src/renderer/store/modules/utils.js
Lines 46 to 52 in 1d1920f
searchSettings: { | |
sortBy: 'relevance', | |
time: '', | |
type: 'all', | |
duration: '', | |
features: [], | |
}, |
Head branch was pushed to by a user without write access
Updated PR has requested changes however i still could not get shift+click to open a new tab in the search filters view |
@@ -56,7 +56,7 @@ | |||
text-color="var(--text-with-main-color)" | |||
@click="hideSearchFilters" | |||
/> | |||
<!-- Added: Search button with same styling as close button --> | |||
|
|||
<FtButton | |||
:label="$t('Search')" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
localize the label
@@ -79,9 +79,18 @@ import FtButton from '../ft-button/ft-button.vue' | |||
import FtCheckboxList from '../FtCheckboxList/FtCheckboxList.vue' | |||
|
|||
import store from '../../store/index' | |||
import { useRouter } from 'vue-router' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why import it but never use it?
The |
The reason it works on the
where the event is being passed through, but on the
The event is not passed through. Additionally, you should use the |
Title
This adds the feature "apply button to search filters modal"
Pull Request Type
Related issue
#6194
Closes: #6194
Description
Added a new function that uses the same openInternnalPath function used by main search, a button, and a gap for the new button improvements. Tested functionality using console logs and trial-and-error. No known issues.
Screenshots
Testing
Pull request tested
Tested using console logs and trial-and-error to verify functionality.
No ramifications remaining
Desktop
Additional context
No additional context.