Switch from Vue.extend to defineComponent (#3066)

This commit is contained in:
absidue 2023-01-18 08:50:02 +01:00 committed by GitHub
parent 1e94d01ab2
commit 2cd8f0f2d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
78 changed files with 162 additions and 161 deletions

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import Vue, { defineComponent } from 'vue'
import { mapActions, mapMutations } from 'vuex'
import { ObserveVisibility } from 'vue-observe-visibility'
import FtFlexBox from './components/ft-flex-box/ft-flex-box.vue'
@ -18,7 +18,7 @@ let ipcRenderer = null
Vue.directive('observe-visibility', ObserveVisibility)
export default Vue.extend({
export default defineComponent({
name: 'App',
components: {
FtFlexBox,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtSettingsSection from '../ft-settings-section/ft-settings-section.vue'
import { mapActions, mapMutations } from 'vuex'
import FtButton from '../ft-button/ft-button.vue'
@ -18,7 +18,7 @@ import {
} from '../../helpers/utils'
import { invidiousAPICall } from '../../helpers/api/invidious'
export default Vue.extend({
export default defineComponent({
name: 'DataSettings',
components: {
'ft-settings-section': FtSettingsSection,

View File

@ -1,11 +1,11 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import FtSettingsSection from '../ft-settings-section/ft-settings-section.vue'
import FtToggleSwitch from '../ft-toggle-switch/ft-toggle-switch.vue'
import FtInputTags from '../../components/ft-input-tags/ft-input-tags.vue'
import FtFlexBox from '../ft-flex-box/ft-flex-box.vue'
export default Vue.extend({
export default defineComponent({
name: 'PlayerSettings',
components: {
'ft-settings-section': FtSettingsSection,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtSettingsSection from '../ft-settings-section/ft-settings-section.vue'
import FtFlexBox from '../ft-flex-box/ft-flex-box.vue'
import FtToggleSwitch from '../ft-toggle-switch/ft-toggle-switch.vue'
@ -9,7 +9,7 @@ import { mapActions } from 'vuex'
import { ipcRenderer } from 'electron'
import { IpcChannels } from '../../../constants'
export default Vue.extend({
export default defineComponent({
name: 'DownloadSettings',
components: {
'ft-settings-section': FtSettingsSection,

View File

@ -1,5 +1,5 @@
import fs from 'fs/promises'
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtSettingsSection from '../ft-settings-section/ft-settings-section.vue'
import FtFlexBox from '../ft-flex-box/ft-flex-box.vue'
import FtToggleSwitch from '../ft-toggle-switch/ft-toggle-switch.vue'
@ -7,7 +7,7 @@ import FtPrompt from '../ft-prompt/ft-prompt.vue'
import { pathExists } from '../../helpers/filesystem'
import { getUserDataPath } from '../../helpers/utils'
export default Vue.extend({
export default defineComponent({
name: 'ExperimentalSettings',
components: {
'ft-settings-section': FtSettingsSection,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import FtSettingsSection from '../ft-settings-section/ft-settings-section.vue'
import FtSelect from '../ft-select/ft-select.vue'
@ -6,7 +6,7 @@ import FtInput from '../ft-input/ft-input.vue'
import FtToggleSwitch from '../ft-toggle-switch/ft-toggle-switch.vue'
import FtFlexBox from '../ft-flex-box/ft-flex-box.vue'
export default Vue.extend({
export default defineComponent({
name: 'ExternalPlayerSettings',
components: {
'ft-settings-section': FtSettingsSection,

View File

@ -1,6 +1,6 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
export default Vue.extend({
export default defineComponent({
name: 'FtAgeRestricted',
props: {
contentTypeString: {

View File

@ -1,6 +1,6 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
export default Vue.extend({
export default defineComponent({
name: 'FtAutoGrid',
props: {
grid: {

View File

@ -1,6 +1,6 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
export default Vue.extend({
export default defineComponent({
name: 'FtButton',
props: {
label: {

View File

@ -1,5 +1,5 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
export default Vue.extend({
export default defineComponent({
name: 'FtCard'
})

View File

@ -1,7 +1,7 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { sanitizeForHtmlId } from '../../helpers/accessibility'
export default Vue.extend({
export default defineComponent({
name: 'FtChannelBubble',
props: {
channelName: {

View File

@ -1,8 +1,8 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtAutoGrid from '../ft-auto-grid/ft-auto-grid.vue'
import FtListLazyWrapper from '../ft-list-lazy-wrapper/ft-list-lazy-wrapper.vue'
export default Vue.extend({
export default defineComponent({
name: 'FtElementList',
components: {
'ft-auto-grid': FtAutoGrid,

View File

@ -1,5 +1,5 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
export default Vue.extend({
export default defineComponent({
name: 'FtFlexBox'
})

View File

@ -1,7 +1,7 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { sanitizeForHtmlId } from '../../helpers/accessibility'
export default Vue.extend({
export default defineComponent({
name: 'FtIconButton',
props: {
title: {

View File

@ -1,8 +1,8 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtInput from '../ft-input/ft-input.vue'
import FtTooltip from '../ft-tooltip/ft-tooltip.vue'
export default Vue.extend({
export default defineComponent({
name: 'FtInputTags',
components: {
'ft-input': FtInput,

View File

@ -1,8 +1,8 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtTooltip from '../ft-tooltip/ft-tooltip.vue'
import { mapActions } from 'vuex'
export default Vue.extend({
export default defineComponent({
name: 'FtInput',
components: {
'ft-tooltip': FtTooltip

View File

@ -1,8 +1,8 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { youtubeImageUrlToInvidious } from '../../helpers/api/invidious'
import { formatNumber } from '../../helpers/utils'
export default Vue.extend({
export default defineComponent({
name: 'FtListChannel',
props: {
data: {

View File

@ -1,6 +1,7 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { sanitizeForHtmlId, handleDropdownKeyboardEvent } from '../../helpers/accessibility'
export default Vue.extend({
export default defineComponent({
name: 'FtListDropdown',
props: {
title: {

View File

@ -1,9 +1,9 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtListVideo from '../ft-list-video/ft-list-video.vue'
import FtListChannel from '../ft-list-channel/ft-list-channel.vue'
import FtListPlaylist from '../ft-list-playlist/ft-list-playlist.vue'
export default Vue.extend({
export default defineComponent({
name: 'FtListLazyWrapper',
components: {
'ft-list-video': FtListVideo,

View File

@ -1,8 +1,8 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtIconButton from '../ft-icon-button/ft-icon-button.vue'
import { mapActions } from 'vuex'
export default Vue.extend({
export default defineComponent({
name: 'FtListPlaylist',
components: {
'ft-icon-button': FtIconButton

View File

@ -1,7 +1,7 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtListVideo from '../ft-list-video/ft-list-video.vue'
export default Vue.extend({
export default defineComponent({
name: 'FtListVideoLazy',
components: {
'ft-list-video': FtListVideo

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtIconButton from '../ft-icon-button/ft-icon-button.vue'
import { mapActions } from 'vuex'
import {
@ -11,7 +11,7 @@ import {
toDistractionFreeTitle
} from '../../helpers/utils'
export default Vue.extend({
export default defineComponent({
name: 'FtListVideo',
components: {
'ft-icon-button': FtIconButton

View File

@ -1,6 +1,6 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
export default Vue.extend({
export default defineComponent({
name: 'FtLoader',
props: {
fullscreen: {

View File

@ -1,6 +1,6 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
export default Vue.extend({
export default defineComponent({
name: 'FtNotificationBanner',
props: {
message: {

View File

@ -1,6 +1,6 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
export default Vue.extend({
export default defineComponent({
name: 'FtProfileBubble',
props: {
profileName: {

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import FtCard from '../../components/ft-card/ft-card.vue'
@ -9,7 +9,7 @@ import FtPrompt from '../../components/ft-prompt/ft-prompt.vue'
import { showToast } from '../../helpers/utils'
import { youtubeImageUrlToInvidious } from '../../helpers/api/invidious'
export default Vue.extend({
export default defineComponent({
name: 'FtProfileChannelList',
components: {
'ft-card': FtCard,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import FtCard from '../../components/ft-card/ft-card.vue'
import FtPrompt from '../../components/ft-prompt/ft-prompt.vue'
@ -9,7 +9,7 @@ import { MAIN_PROFILE_ID } from '../../../constants'
import { calculateColorLuminance, colors } from '../../helpers/colors'
import { showToast } from '../../helpers/utils'
export default Vue.extend({
export default defineComponent({
name: 'FtProfileEdit',
components: {
'ft-card': FtCard,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import FtCard from '../../components/ft-card/ft-card.vue'
@ -9,7 +9,7 @@ import FtSelect from '../ft-select/ft-select.vue'
import { showToast } from '../../helpers/utils'
import { youtubeImageUrlToInvidious } from '../../helpers/api/invidious'
export default Vue.extend({
export default defineComponent({
name: 'FtProfileFilterChannelsList',
components: {
'ft-card': FtCard,

View File

@ -1,11 +1,11 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import FtCard from '../../components/ft-card/ft-card.vue'
import FtIconButton from '../../components/ft-icon-button/ft-icon-button.vue'
import { showToast } from '../../helpers/utils'
export default Vue.extend({
export default defineComponent({
name: 'FtProfileSelector',
components: {
'ft-card': FtCard,

View File

@ -1,6 +1,6 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
export default Vue.extend({
export default defineComponent({
name: 'FtProgressBar',
computed: {
progressBarPercentage: function () {

View File

@ -1,10 +1,10 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtCard from '../../components/ft-card/ft-card.vue'
import FtFlexBox from '../../components/ft-flex-box/ft-flex-box.vue'
import FtButton from '../../components/ft-button/ft-button.vue'
import { sanitizeForHtmlId } from '../../helpers/accessibility'
export default Vue.extend({
export default defineComponent({
name: 'FtPrompt',
components: {
'ft-card': FtCard,

View File

@ -1,6 +1,6 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
export default Vue.extend({
export default defineComponent({
name: 'FtElementList',
props: {
title: {

View File

@ -1,8 +1,8 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtFlexBox from '../ft-flex-box/ft-flex-box.vue'
import FtRadioButton from '../ft-radio-button/ft-radio-button.vue'
export default Vue.extend({
export default defineComponent({
name: 'FtSearchFilters',
components: {
'ft-flex-box': FtFlexBox,

View File

@ -1,8 +1,8 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtTooltip from '../ft-tooltip/ft-tooltip.vue'
import { sanitizeForHtmlId } from '../../helpers/accessibility'
export default Vue.extend({
export default defineComponent({
name: 'FtSelect',
components: {
'ft-tooltip': FtTooltip

View File

@ -1,6 +1,6 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
export default Vue.extend({
export default defineComponent({
name: 'FtSettingsSection',
props: {
title: {

View File

@ -1,12 +1,11 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtFlexBox from '../ft-flex-box/ft-flex-box.vue'
import FtIconButton from '../ft-icon-button/ft-icon-button.vue'
import FtButton from '../ft-button/ft-button.vue'
import FtToggleSwitch from '../ft-toggle-switch/ft-toggle-switch.vue'
import { copyToClipboard, openExternalLink } from '../../helpers/utils'
export default Vue.extend({
export default defineComponent({
name: 'FtShareButton',
components: {
'ft-flex-box': FtFlexBox,

View File

@ -1,6 +1,6 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
export default Vue.extend({
export default defineComponent({
name: 'FtSlider',
props: {
label: {

View File

@ -1,9 +1,10 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import { colors } from '../../helpers/colors'
import FtSelect from '../ft-select/ft-select.vue'
import { sanitizeForHtmlId } from '../../helpers/accessibility'
export default Vue.extend({
export default defineComponent({
name: 'FtSponsorBlockCategory',
components: {
'ft-select': FtSelect

View File

@ -1,6 +1,6 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
export default Vue.extend({
export default defineComponent({
name: 'FtTimestampCatcher',
props: {
inputHtml: {

View File

@ -1,7 +1,7 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtToastEvents from './ft-toast-events.js'
export default Vue.extend({
export default defineComponent({
name: 'FtToast',
data: function () {
return {

View File

@ -1,7 +1,7 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtTooltip from '../ft-tooltip/ft-tooltip.vue'
export default Vue.extend({
export default defineComponent({
name: 'FtToggleSwitch',
components: {
'ft-tooltip': FtTooltip

View File

@ -1,8 +1,8 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
let idCounter = 0
export default Vue.extend({
export default defineComponent({
name: 'FtTooltip',
props: {
position: {

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import videojs from 'video.js'
@ -18,7 +18,7 @@ import { calculateColorLuminance, colors } from '../../helpers/colors'
import { pathExists } from '../../helpers/filesystem'
import { getPicturesPath, showSaveDialog, showToast } from '../../helpers/utils'
export default Vue.extend({
export default defineComponent({
name: 'FtVideoPlayer',
beforeRouteLeave: function () {
document.removeEventListener('keydown', this.keyboardShortcutHandler)

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions, mapMutations } from 'vuex'
import FtSettingsSection from '../ft-settings-section/ft-settings-section.vue'
import FtSelect from '../ft-select/ft-select.vue'
@ -10,7 +10,7 @@ import FtButton from '../ft-button/ft-button.vue'
import debounce from 'lodash.debounce'
import { showToast } from '../../helpers/utils'
export default Vue.extend({
export default defineComponent({
name: 'GeneralSettings',
components: {
'ft-settings-section': FtSettingsSection,

View File

@ -1,9 +1,9 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import FtSettingsSection from '../ft-settings-section/ft-settings-section.vue'
import FtToggleSwitch from '../ft-toggle-switch/ft-toggle-switch.vue'
export default Vue.extend({
export default defineComponent({
name: 'ParentalControlSettings',
components: {
'ft-settings-section': FtSettingsSection,

View File

@ -1,8 +1,8 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtCard from '../ft-card/ft-card.vue'
import FtInput from '../ft-input/ft-input.vue'
export default Vue.extend({
export default defineComponent({
name: 'PasswordDialog',
components: {
'ft-input': FtInput,

View File

@ -1,11 +1,11 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import FtSettingsSection from '../ft-settings-section/ft-settings-section.vue'
import FtInput from '../ft-input/ft-input.vue'
import FtFlexBox from '../ft-flex-box/ft-flex-box.vue'
import FtButton from '../ft-button/ft-button.vue'
export default Vue.extend({
export default defineComponent({
name: 'PasswordSettings',
components: {
'ft-settings-section': FtSettingsSection,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import FtSettingsSection from '../ft-settings-section/ft-settings-section.vue'
import FtSelect from '../ft-select/ft-select.vue'
@ -13,7 +13,7 @@ import { IpcChannels } from '../../../constants'
import path from 'path'
import { getPicturesPath } from '../../helpers/utils'
export default Vue.extend({
export default defineComponent({
name: 'PlayerSettings',
components: {
'ft-settings-section': FtSettingsSection,

View File

@ -1,8 +1,8 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtListDropdown from '../ft-list-dropdown/ft-list-dropdown.vue'
import { copyToClipboard, formatNumber, openExternalLink } from '../../helpers/utils'
export default Vue.extend({
export default defineComponent({
name: 'PlaylistInfo',
components: {
'ft-list-dropdown': FtListDropdown

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import FtSettingsSection from '../ft-settings-section/ft-settings-section.vue'
import FtButton from '../ft-button/ft-button.vue'
@ -8,7 +8,7 @@ import FtPrompt from '../ft-prompt/ft-prompt.vue'
import { MAIN_PROFILE_ID } from '../../../constants'
import { showToast } from '../../helpers/utils'
export default Vue.extend({
export default defineComponent({
name: 'PrivacySettings',
components: {
'ft-settings-section': FtSettingsSection,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import FtSettingsSection from '../ft-settings-section/ft-settings-section.vue'
import FtToggleSwitch from '../ft-toggle-switch/ft-toggle-switch.vue'
@ -14,7 +14,7 @@ import debounce from 'lodash.debounce'
import { IpcChannels } from '../../../constants'
import { showToast } from '../../helpers/utils'
export default Vue.extend({
export default defineComponent({
name: 'ProxySettings',
components: {
'ft-settings-section': FtSettingsSection,

View File

@ -1,6 +1,6 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
export default Vue.extend({
export default defineComponent({
name: 'SideNav',
data: function () {
return {

View File

@ -1,9 +1,9 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtFlexBox from '../ft-flex-box/ft-flex-box.vue'
import SideNavMoreOptions from '../side-nav-more-options/side-nav-more-options.vue'
import { youtubeImageUrlToInvidious } from '../../helpers/api/invidious'
export default Vue.extend({
export default defineComponent({
name: 'SideNav',
components: {
'ft-flex-box': FtFlexBox,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import FtSettingsSection from '../ft-settings-section/ft-settings-section.vue'
import FtToggleSwitch from '../ft-toggle-switch/ft-toggle-switch.vue'
@ -6,7 +6,7 @@ import FtInput from '../ft-input/ft-input.vue'
import FtFlexBox from '../ft-flex-box/ft-flex-box.vue'
import FtSponsorBlockCategory from '../ft-sponsor-block-category/ft-sponsor-block-category.vue'
export default Vue.extend({
export default defineComponent({
name: 'SponsorBlockSettings',
components: {
'ft-settings-section': FtSettingsSection,

View File

@ -1,9 +1,9 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import FtSettingsSection from '../ft-settings-section/ft-settings-section.vue'
import FtToggleSwitch from '../ft-toggle-switch/ft-toggle-switch.vue'
export default Vue.extend({
export default defineComponent({
name: 'SubscriptionSettings',
components: {
'ft-settings-section': FtSettingsSection,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import FtSettingsSection from '../ft-settings-section/ft-settings-section.vue'
import FtSelect from '../ft-select/ft-select.vue'
@ -8,7 +8,7 @@ import FtFlexBox from '../ft-flex-box/ft-flex-box.vue'
import FtPrompt from '../ft-prompt/ft-prompt.vue'
import { colors } from '../../helpers/colors'
export default Vue.extend({
export default defineComponent({
name: 'ThemeSettings',
components: {
'ft-settings-section': FtSettingsSection,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import FtInput from '../ft-input/ft-input.vue'
import FtSearchFilters from '../ft-search-filters/ft-search-filters.vue'
@ -10,7 +10,7 @@ import { openInternalPath, showToast } from '../../helpers/utils'
import { clearLocalSearchSuggestionsSession, getLocalSearchSuggestions } from '../../helpers/api/local'
import { invidiousAPICall } from '../../helpers/api/invidious'
export default Vue.extend({
export default defineComponent({
name: 'TopNav',
components: {
FtInput,

View File

@ -1,7 +1,7 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtCard from '../ft-card/ft-card.vue'
export default Vue.extend({
export default defineComponent({
name: 'WatchVideoChapters',
components: {
'ft-card': FtCard

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtCard from '../ft-card/ft-card.vue'
import FtLoader from '../../components/ft-loader/ft-loader.vue'
import FtSelect from '../../components/ft-select/ft-select.vue'
@ -13,7 +13,7 @@ import {
} from '../../helpers/utils'
import { invidiousGetCommentReplies, invidiousGetComments } from '../../helpers/api/invidious'
export default Vue.extend({
export default defineComponent({
name: 'WatchVideoComments',
components: {
'ft-card': FtCard,

View File

@ -1,9 +1,9 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtCard from '../ft-card/ft-card.vue'
import FtTimestampCatcher from '../ft-timestamp-catcher/ft-timestamp-catcher.vue'
import autolinker from 'autolinker'
export default Vue.extend({
export default defineComponent({
name: 'WatchVideoDescription',
components: {
'ft-card': FtCard,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import FtCard from '../ft-card/ft-card.vue'
import FtButton from '../ft-button/ft-button.vue'
@ -7,7 +7,7 @@ import FtShareButton from '../ft-share-button/ft-share-button.vue'
import { MAIN_PROFILE_ID } from '../../../constants'
import { formatNumber, openExternalLink, showToast } from '../../helpers/utils'
export default Vue.extend({
export default defineComponent({
name: 'WatchVideoInfo',
components: {
'ft-card': FtCard,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtLoader from '../ft-loader/ft-loader.vue'
import FtCard from '../ft-card/ft-card.vue'
import FtButton from '../ft-button/ft-button.vue'
@ -7,7 +7,7 @@ import autolinker from 'autolinker'
import { getRandomColorClass } from '../../helpers/colors'
import { getLocalVideoInfo, parseLocalTextRuns } from '../../helpers/api/local'
export default Vue.extend({
export default defineComponent({
name: 'WatchVideoLiveChat',
components: {
'ft-loader': FtLoader,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapMutations } from 'vuex'
import FtLoader from '../ft-loader/ft-loader.vue'
import FtCard from '../ft-card/ft-card.vue'
@ -7,7 +7,7 @@ import { copyToClipboard, showToast } from '../../helpers/utils'
import { getLocalPlaylist, parseLocalPlaylistVideo } from '../../helpers/api/local'
import { invidiousGetPlaylistInfo } from '../../helpers/api/invidious'
export default Vue.extend({
export default defineComponent({
name: 'WatchVideoPlaylist',
components: {
'ft-loader': FtLoader,

View File

@ -1,10 +1,10 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import FtCard from '../ft-card/ft-card.vue'
import FtListVideoLazy from '../ft-list-video-lazy/ft-list-video-lazy.vue'
import FtToggleSwitch from '../ft-toggle-switch/ft-toggle-switch.vue'
export default Vue.extend({
export default defineComponent({
name: 'WatchVideoRecommendations',
components: {
'ft-card': FtCard,

View File

@ -1,8 +1,8 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtCard from '../../components/ft-card/ft-card.vue'
import packageDetails from '../../../../package.json'
export default Vue.extend({
export default defineComponent({
name: 'About',
components: {
'ft-card': FtCard

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import FtCard from '../../components/ft-card/ft-card.vue'
import FtButton from '../../components/ft-button/ft-button.vue'
@ -18,7 +18,7 @@ import { copyToClipboard, formatNumber, showToast } from '../../helpers/utils'
import packageDetails from '../../../../package.json'
import { invidiousAPICall, invidiousGetChannelInfo, youtubeImageUrlToInvidious } from '../../helpers/api/invidious'
export default Vue.extend({
export default defineComponent({
name: 'Search',
components: {
'ft-card': FtCard,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent, nextTick } from 'vue'
import FtLoader from '../../components/ft-loader/ft-loader.vue'
import FtCard from '../../components/ft-card/ft-card.vue'
import FtFlexBox from '../../components/ft-flex-box/ft-flex-box.vue'
@ -6,7 +6,7 @@ import FtElementList from '../../components/ft-element-list/ft-element-list.vue'
import FtButton from '../../components/ft-button/ft-button.vue'
import FtInput from '../../components/ft-input/ft-input.vue'
export default Vue.extend({
export default defineComponent({
name: 'History',
components: {
'ft-loader': FtLoader,
@ -107,9 +107,9 @@ export default Vue.extend({
refreshPage: function() {
const scrollPos = window.scrollY || window.scrollTop || document.getElementsByTagName('html')[0].scrollTop
this.isLoading = true
Vue.nextTick(() => {
nextTick(() => {
this.isLoading = false
Vue.nextTick(() => {
nextTick(() => {
window.scrollTo(0, scrollPos)
})
})

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions, mapMutations } from 'vuex'
import FtLoader from '../../components/ft-loader/ft-loader.vue'
import FtCard from '../../components/ft-card/ft-card.vue'
@ -10,7 +10,7 @@ import { getLocalPlaylist, parseLocalPlaylistVideo } from '../../helpers/api/loc
import { extractNumberFromString } from '../../helpers/utils'
import { invidiousGetPlaylistInfo, youtubeImageUrlToInvidious } from '../../helpers/api/invidious'
export default Vue.extend({
export default defineComponent({
name: 'Playlist',
components: {
'ft-loader': FtLoader,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtLoader from '../../components/ft-loader/ft-loader.vue'
import FtCard from '../../components/ft-card/ft-card.vue'
import FtElementList from '../../components/ft-element-list/ft-element-list.vue'
@ -6,7 +6,7 @@ import FtIconButton from '../../components/ft-icon-button/ft-icon-button.vue'
import { invidiousAPICall } from '../../helpers/api/invidious'
export default Vue.extend({
export default defineComponent({
name: 'Popular',
components: {
'ft-loader': FtLoader,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapGetters } from 'vuex'
import FtLoader from '../../components/ft-loader/ft-loader.vue'
import FtProfileEdit from '../../components/ft-profile-edit/ft-profile-edit.vue'
@ -8,7 +8,7 @@ import { MAIN_PROFILE_ID } from '../../../constants'
import { calculateColorLuminance, getRandomColor } from '../../helpers/colors'
import { showToast } from '../../helpers/utils'
export default Vue.extend({
export default defineComponent({
name: 'ProfileEdit',
components: {
'ft-loader': FtLoader,

View File

@ -1,10 +1,10 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtCard from '../../components/ft-card/ft-card.vue'
import FtFlexBox from '../../components/ft-flex-box/ft-flex-box.vue'
import FtProfileBubble from '../../components/ft-profile-bubble/ft-profile-bubble.vue'
import FtButton from '../../components/ft-button/ft-button.vue'
export default Vue.extend({
export default defineComponent({
name: 'ProfileSettings',
components: {
'ft-card': FtCard,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtLoader from '../../components/ft-loader/ft-loader.vue'
import FtCard from '../../components/ft-card/ft-card.vue'
import FtElementList from '../../components/ft-element-list/ft-element-list.vue'
@ -6,7 +6,7 @@ import { copyToClipboard, searchFiltersMatch, showToast } from '../../helpers/ut
import { getLocalSearchContinuation, getLocalSearchResults } from '../../helpers/api/local'
import { invidiousAPICall } from '../../helpers/api/invidious'
export default Vue.extend({
export default defineComponent({
name: 'Search',
components: {
'ft-loader': FtLoader,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import GeneralSettings from '../../components/general-settings/general-settings.vue'
import ThemeSettings from '../../components/theme-settings/theme-settings.vue'
import PlayerSettings from '../../components/player-settings/player-settings.vue'
@ -15,7 +15,7 @@ import ExperimentalSettings from '../../components/experimental-settings/experim
import PasswordSettings from '../../components/password-settings/password-settings.vue'
import PasswordDialog from '../../components/password-dialog/password-dialog.vue'
export default Vue.extend({
export default defineComponent({
name: 'Settings',
components: {
'general-settings': GeneralSettings,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import FtButton from '../../components/ft-button/ft-button.vue'
import FtCard from '../../components/ft-card/ft-card.vue'
@ -9,7 +9,7 @@ import ytch from 'yt-channel-info'
import { showToast } from '../../helpers/utils'
import { invidiousGetChannelInfo, youtubeImageUrlToInvidious, invidiousImageUrlToInvidious } from '../../helpers/api/invidious'
export default Vue.extend({
export default defineComponent({
name: 'SubscribedChannels',
components: {
'ft-button': FtButton,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions, mapMutations } from 'vuex'
import FtLoader from '../../components/ft-loader/ft-loader.vue'
import FtCard from '../../components/ft-card/ft-card.vue'
@ -13,7 +13,7 @@ import { MAIN_PROFILE_ID } from '../../../constants'
import { calculatePublishedDate, copyToClipboard, showToast } from '../../helpers/utils'
import { invidiousAPICall } from '../../helpers/api/invidious'
export default Vue.extend({
export default defineComponent({
name: 'Subscriptions',
components: {
'ft-loader': FtLoader,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import FtCard from '../../components/ft-card/ft-card.vue'
import FtLoader from '../../components/ft-loader/ft-loader.vue'
import FtElementList from '../../components/ft-element-list/ft-element-list.vue'
@ -9,7 +9,7 @@ import { copyToClipboard, showToast } from '../../helpers/utils'
import { getLocalTrending } from '../../helpers/api/local'
import { invidiousAPICall } from '../../helpers/api/invidious'
export default Vue.extend({
export default defineComponent({
name: 'Trending',
components: {
'ft-card': FtCard,

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent, nextTick } from 'vue'
import FtCard from '../../components/ft-card/ft-card.vue'
import FtFlexBox from '../../components/ft-flex-box/ft-flex-box.vue'
import FtTooltip from '../../components/ft-tooltip/ft-tooltip.vue'
@ -7,7 +7,7 @@ import FtButton from '../../components/ft-button/ft-button.vue'
import FtElementList from '../../components/ft-element-list/ft-element-list.vue'
import FtInput from '../../components/ft-input/ft-input.vue'
export default Vue.extend({
export default defineComponent({
name: 'UserPlaylists',
components: {
'ft-card': FtCard,
@ -110,9 +110,9 @@ export default Vue.extend({
refreshPage: function() {
const scrollPos = window.scrollY || window.scrollTop || document.getElementsByTagName('html')[0].scrollTop
this.isLoading = true
Vue.nextTick(() => {
nextTick(() => {
this.isLoading = false
Vue.nextTick(() => {
nextTick(() => {
window.scrollTo(0, scrollPos)
})
})

View File

@ -1,4 +1,4 @@
import Vue from 'vue'
import { defineComponent } from 'vue'
import { mapActions } from 'vuex'
import fs from 'fs/promises'
import FtLoader from '../../components/ft-loader/ft-loader.vue'
@ -30,7 +30,7 @@ import {
} from '../../helpers/api/local'
import { invidiousGetVideoInformation, youtubeImageUrlToInvidious } from '../../helpers/api/invidious'
export default Vue.extend({
export default defineComponent({
name: 'Watch',
components: {
'ft-loader': FtLoader,