Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
584afc3
add description option to hiding channels
Benjababe Oct 23, 2023
353df40
does channel id search
Benjababe Oct 23, 2023
e9fc20d
add tag tooltip
Benjababe Oct 23, 2023
21d1ec4
legacy support for hidden channels
Benjababe Oct 25, 2023
784a21e
update removeTag
Benjababe Oct 25, 2023
351ff8e
add parenthesis to id name
Benjababe Oct 25, 2023
d447377
add icon and id checking before requesting
Benjababe Oct 25, 2023
48b86ce
update id regex
Benjababe Oct 25, 2023
1903b6f
decouple channel hidden from tags
Benjababe Oct 25, 2023
25bfb90
update handling for legacy hidden channels
Benjababe Oct 25, 2023
a44ad48
remove tag description
Benjababe Oct 25, 2023
ad42cbc
formatting
Benjababe Oct 25, 2023
b19aed8
newline
Benjababe Oct 25, 2023
ec8163f
shorten retrieving hidden channels
Benjababe Oct 25, 2023
272866f
separate channel api requests
Benjababe Oct 25, 2023
83ed3c8
refractor ft-input-tags.js
Benjababe Oct 25, 2023
54615c1
replace secondaryName with preferredName for tags
Benjababe Oct 28, 2023
ee2f96d
unify hidden channel name/icon retrieval function
Benjababe Oct 28, 2023
370315d
remove tooltip from ft-input-tags
Benjababe Oct 28, 2023
d9e5223
auto update hidden channel if ID was used
Benjababe Oct 28, 2023
5eb4f7d
remove hiding channel by name
Benjababe Oct 28, 2023
d354523
i18n channels hidden disabled message
Benjababe Oct 28, 2023
0188dfa
run auto hidden channel id update once
Benjababe Oct 28, 2023
2d177bb
Update src/renderer/components/ft-input-tags/ft-input-tags.vue
Benjababe Nov 8, 2023
c31cb18
add text selection for ft tags
Benjababe Nov 8, 2023
09bc6d9
add ft-input-tags icon url
Benjababe Nov 8, 2023
7272fc4
fix icon link
Benjababe Nov 8, 2023
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
Prev Previous commit
Next Next commit
decouple channel hidden from tags
  • Loading branch information
Benjababe committed Oct 25, 2023
commit 1903b6f6590ede74ad1dc73c13a30610e28c7193
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import FtInputTags from '../../components/ft-input-tags/ft-input-tags.vue'
import FtFlexBox from '../ft-flex-box/ft-flex-box.vue'
import { invidiousGetChannelInfo } from '../../helpers/api/invidious'
import { getLocalChannel } from '../../helpers/api/local'
import { showToast } from '../../helpers/utils'

export default defineComponent({
name: 'PlayerSettings',
Expand Down Expand Up @@ -142,6 +143,9 @@ export default defineComponent({
handleChannelsHidden: function (value) {
this.updateChannelsHidden(JSON.stringify(value))
},
handleChannelsExists: function () {
showToast(this.$t('Settings.Distraction Free Settings.Hide Channels Already Exists'))
},
findChannelById: async function (id) {
try {
if (this.backendPreference === 'invidious') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@
:find-secondary-name="findChannelNameById"
:find-icon="findChannelIconById"
@change="handleChannelsHidden"
@already-exists="handleChannelsExists"
/>
</ft-flex-box>
</ft-settings-section>
Expand Down
11 changes: 5 additions & 6 deletions src/renderer/components/ft-input-tags/ft-input-tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { defineComponent } from 'vue'
import FtButton from '../ft-button/ft-button.vue'
import FtInput from '../ft-input/ft-input.vue'
import FtTooltip from '../ft-tooltip/ft-tooltip.vue'
import { showToast } from '../../helpers/utils'

export default defineComponent({
name: 'FtInputTags',
Expand Down Expand Up @@ -42,28 +41,28 @@ export default defineComponent({
},
findSecondaryName: {
type: Function,
default: async (_) => '',
default: (_) => '',
},
findIcon: {
type: Function,
default: async (_) => '',
default: (_) => '',
}
},
methods: {
updateTags: async function (text, _) {
updateTags: async function (text, _e) {
// text entered add tag and update tag list
const name = text.trim()

if (!this.tagList.some((tag) => tag.name === name)) {
// secondary name and icon assumes an api call may be used
// secondary name and icon searching allow api calls to be used
const secondaryName = await this.findSecondaryName(name) ?? ''
const icon = await this.findIcon(name) ?? ''

const newList = this.tagList.slice(0)
newList.push({ name, secondaryName, icon })
this.$emit('change', newList)
} else {
showToast(this.$t('Settings.Distraction Free Settings.Hide Channels Already Exists'))
this.$emit('already-exists')
}

// clear input boxes
Expand Down