mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Add ts config: importsNotUsedAsValues with corresponding eslint rule
This commit is contained in:
parent
1906f687fe
commit
7a248529bb
@ -30,6 +30,7 @@ module.exports = {
|
||||
'import/no-default-export': 'error',
|
||||
'import/no-named-default': 'off',
|
||||
|
||||
'@typescript-eslint/consistent-type-imports': 'error',
|
||||
'@typescript-eslint/member-delimiter-style': 'off',
|
||||
'@typescript-eslint/explicit-function-return-type': 'off',
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { readFileSync, existsSync } from 'fs'
|
||||
import { existsSync, readFileSync } from 'fs'
|
||||
|
||||
interface DevServerConfig {
|
||||
port?: number
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
import webpack from 'webpack'
|
||||
import exitHook from 'async-exit-hook'
|
||||
import webpack from 'webpack'
|
||||
|
||||
import webpackConfig from '../../webpack/webpack.dev'
|
||||
import { sendMessage } from './web-socket-server'
|
||||
import { defaultWatcherHandler } from './watcher-common'
|
||||
import { sendMessage } from './web-socket-server'
|
||||
|
||||
export const startCoreWatcher = () =>
|
||||
new Promise<void>(resolve => {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { startDevServer } from './server'
|
||||
import { startCoreWatcher } from './core-watcher'
|
||||
import { startDevServer } from './server'
|
||||
import { startWebSocketServer } from './web-socket-server'
|
||||
|
||||
startDevServer().then(server => {
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
import { Watching, Configuration, webpack } from 'webpack'
|
||||
import exitHook from 'async-exit-hook'
|
||||
import type { Configuration, Watching } from 'webpack'
|
||||
import { webpack } from 'webpack'
|
||||
|
||||
import { fromId } from '../../registry/lib/id'
|
||||
import { devServerConfig } from './config'
|
||||
import { defaultWatcherHandler } from './watcher-common'
|
||||
import { sendMessage } from './web-socket-server'
|
||||
import { devServerConfig } from './config'
|
||||
|
||||
export const watchers: { url: string; instance: Watching }[] = []
|
||||
export const parseRegistryUrl = (url: string) => {
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
import { createServer, Server } from 'http'
|
||||
import { Configuration } from 'webpack'
|
||||
import exitHook from 'async-exit-hook'
|
||||
import type { Server } from 'http'
|
||||
import { createServer } from 'http'
|
||||
import handler from 'serve-handler'
|
||||
import { devServerConfig } from './config'
|
||||
import type { Configuration } from 'webpack'
|
||||
|
||||
import { buildByEntry } from '../../registry/webpack/config'
|
||||
import { devServerConfig } from './config'
|
||||
import { parseRegistryUrl, startRegistryWatcher, watchers } from './registry-watcher'
|
||||
import { exitWebSocketServer } from './web-socket-server'
|
||||
import { watchers, parseRegistryUrl, startRegistryWatcher } from './registry-watcher'
|
||||
|
||||
export const startDevServer = () =>
|
||||
new Promise<Server>(resolve => {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Stats } from 'webpack'
|
||||
import type { Stats } from 'webpack'
|
||||
|
||||
export const defaultWatcherHandler = (
|
||||
initCallback: (result: Stats) => void,
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
import exitHook from 'async-exit-hook'
|
||||
import { Server } from 'http'
|
||||
import type { Server } from 'http'
|
||||
import { WebSocketServer } from 'ws'
|
||||
import { Payload } from './payload'
|
||||
|
||||
import type { Payload } from './payload'
|
||||
import { stopInstance, watchers } from './registry-watcher'
|
||||
|
||||
let server: WebSocketServer
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { FeedsCard } from '@/components/feeds/api'
|
||||
import type { FeedsCard } from '@/components/feeds/api'
|
||||
import { feedsUrls } from '@/core/utils/urls'
|
||||
|
||||
const entry = async () => {
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { FeedsCard, feedsCardTypes } from '@/components/feeds/api'
|
||||
import type { FeedsCard } from '@/components/feeds/api'
|
||||
import { feedsCardTypes } from '@/components/feeds/api'
|
||||
import { feedsUrls } from '@/core/utils/urls'
|
||||
|
||||
let enabled = true
|
||||
|
||||
@ -50,18 +50,20 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {
|
||||
import type {
|
||||
feedsCardsManager,
|
||||
FeedsCard,
|
||||
FeedsCardType,
|
||||
feedsCardTypes,
|
||||
forEachFeedsCard,
|
||||
RepostFeedsCard,
|
||||
} from '@/components/feeds/api'
|
||||
|
||||
import { feedsCardTypes, forEachFeedsCard } from '@/components/feeds/api'
|
||||
import { attributes } from '@/core/observer'
|
||||
import { getComponentSettings } from '@/core/settings'
|
||||
import { select } from '@/core/spin-query'
|
||||
import { attributes } from '@/core/observer'
|
||||
import { VIcon, TextBox, VButton } from '@/ui'
|
||||
import { FeedsFilterOptions } from '.'
|
||||
import { TextBox, VButton, VIcon } from '@/ui'
|
||||
|
||||
import type { FeedsFilterOptions } from '.'
|
||||
import { hasBlockedPattern } from './pattern'
|
||||
|
||||
const options = getComponentSettings('feedsFilter').options as FeedsFilterOptions
|
||||
@ -99,7 +101,7 @@ const sideCards: { [id: number]: SideCardType } = {
|
||||
displayName: '发布动态',
|
||||
},
|
||||
}
|
||||
let cardsManager: typeof import('@/components/feeds/api').feedsCardsManager
|
||||
let cardsManager: typeof feedsCardsManager
|
||||
const sideBlock = 'feeds-filter-side-block-'
|
||||
|
||||
export default Vue.extend({
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
import {
|
||||
defineOptionsMetadata,
|
||||
defineComponentMetadata,
|
||||
OptionsOfMetadata,
|
||||
} from '@/components/define'
|
||||
import type { OptionsOfMetadata } from '@/components/define'
|
||||
import { defineComponentMetadata, defineOptionsMetadata } from '@/components/define'
|
||||
import { feedsCardsManager } from '@/components/feeds/api'
|
||||
|
||||
import { feedsFilterPlugin } from './plugin'
|
||||
|
||||
const entry = async () => {
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
import { FeedsContentFilter } from '@/components/feeds/api'
|
||||
import type { FeedsContentFilter } from '@/components/feeds/api'
|
||||
import { getComponentSettings } from '@/core/settings'
|
||||
import { PluginMetadata } from '@/plugins/plugin'
|
||||
import { BlockableCard, hasBlockedPattern } from './pattern'
|
||||
import type { PluginMetadata } from '@/plugins/plugin'
|
||||
|
||||
import type { BlockableCard } from './pattern'
|
||||
import { hasBlockedPattern } from './pattern'
|
||||
|
||||
const bangumiFields = {
|
||||
username: 'title',
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { styledComponentEntry } from '@/components/styled-component'
|
||||
import { feedsUrlsWithoutDetail } from '@/core/utils/urls'
|
||||
import { feedsCardsManager } from '@/components/feeds/api'
|
||||
import { select } from '@/core/spin-query'
|
||||
import { styledComponentEntry } from '@/components/styled-component'
|
||||
import { childListSubtree } from '@/core/observer'
|
||||
import { select } from '@/core/spin-query'
|
||||
import { feedsUrlsWithoutDetail } from '@/core/utils/urls'
|
||||
|
||||
const entry = async () => {
|
||||
const { forEachFeedsCard } = await import('@/components/feeds/api')
|
||||
|
||||
@ -54,7 +54,9 @@
|
||||
import { addComponentListener, getComponentSettings } from '@/core/settings'
|
||||
import { descendingSort } from '@/core/utils/sort'
|
||||
import { DefaultWidget, VPopup } from '@/ui'
|
||||
import { Medal, Title, Badge, getMedalList, getTitleList } from './badge'
|
||||
|
||||
import type { Badge } from './badge'
|
||||
import { getMedalList, getTitleList, Medal, Title } from './badge'
|
||||
|
||||
const { options } = getComponentSettings('badgeHelper')
|
||||
export default Vue.extend({
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { getNumberValidator, getUID, none } from '@/core/utils'
|
||||
|
||||
import { autoMatchMedal } from './auto-match'
|
||||
|
||||
export const component = defineComponentMetadata({
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
<script lang="ts">
|
||||
import { select } from '@/core/spin-query'
|
||||
import { raiseEvent } from '@/core/utils'
|
||||
|
||||
import { originalTextAreaSelector, sendButtonSelector } from './original-elements'
|
||||
|
||||
let changeEventHook = false
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
import { waitForControlBar } from '@/components/live/live-control-bar'
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { waitForControlBar } from '@/components/live/live-control-bar'
|
||||
import { getUID } from '@/core/utils'
|
||||
import { liveUrls } from '@/core/utils/urls'
|
||||
|
||||
import { leftControllerSelector } from './original-elements'
|
||||
|
||||
const entry = async () => {
|
||||
|
||||
@ -9,10 +9,10 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { DefaultWidget } from '@/ui'
|
||||
import { getJson } from '@/core/ajax'
|
||||
import { Toast } from '@/core/toast'
|
||||
import { logError } from '@/core/utils/log'
|
||||
import { DefaultWidget } from '@/ui'
|
||||
|
||||
export default Vue.extend({
|
||||
components: {
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
import { waitForControlBar } from '@/components/live/live-control-bar'
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { waitForControlBar } from '@/components/live/live-control-bar'
|
||||
import { select as spinSelect } from '@/core/spin-query'
|
||||
import { addStyle, removeStyle } from '@/core/style'
|
||||
import { liveUrls } from '@/core/utils/urls'
|
||||
|
||||
import componentStyle from './gift-box.scss'
|
||||
|
||||
/**
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { toggleStyle } from '@/components/styled-component'
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { toggleStyle } from '@/components/styled-component'
|
||||
|
||||
export const component = defineComponentMetadata({
|
||||
...toggleStyle('alwaysShowDuration', () => import('./always-show-duration.scss')),
|
||||
|
||||
@ -13,9 +13,10 @@ import { addComponentListener } from '@/core/settings'
|
||||
import { getUID } from '@/core/utils'
|
||||
import { ascendingSort } from '@/core/utils/sort'
|
||||
import { registerAndGetData } from '@/plugins/data'
|
||||
|
||||
import { getBuiltInItems } from './built-in-items'
|
||||
import type { CustomNavbarItemInit } from './custom-navbar-item'
|
||||
import {
|
||||
CustomNavbarItemInit,
|
||||
CustomNavbarItem,
|
||||
CustomNavbarItems,
|
||||
CustomNavbarRenderedItems,
|
||||
|
||||
@ -57,8 +57,9 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { addComponentListener, removeComponentListener } from '@/core/settings'
|
||||
import CustomNavbarLink from './CustomNavbarLink.vue'
|
||||
|
||||
import { CustomNavbarItem } from './custom-navbar-item'
|
||||
import CustomNavbarLink from './CustomNavbarLink.vue'
|
||||
|
||||
const isOpenInNewTab = (item: CustomNavbarItem) => {
|
||||
const { name } = item
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
import { CustomNavbarItemInit } from './custom-navbar-item'
|
||||
import { messages } from './messages/messages'
|
||||
import { ranking } from './ranking/ranking'
|
||||
import { userInfo } from './user-info/user-info'
|
||||
import { logo } from './logo/logo'
|
||||
import type { CustomNavbarItemInit } from './custom-navbar-item'
|
||||
import { favorites } from './favorites/favorites'
|
||||
import { feeds } from './feeds/feeds'
|
||||
import { blanks } from './flexible-blank/flexible-blank'
|
||||
import { history } from './history/history'
|
||||
import { home } from './home/home'
|
||||
import { gamesIframe, livesIframe, mangaIframe } from './iframe/iframe'
|
||||
import { blanks } from './flexible-blank/flexible-blank'
|
||||
import { bangumi, music, drawing, shop, match } from './simple-links/simple-links'
|
||||
import { upload } from './upload/upload'
|
||||
import { logo } from './logo/logo'
|
||||
import { messages } from './messages/messages'
|
||||
import { ranking } from './ranking/ranking'
|
||||
import { search } from './search/search'
|
||||
import { feeds } from './feeds/feeds'
|
||||
import { bangumi, drawing, match, music, shop } from './simple-links/simple-links'
|
||||
import { subscriptions } from './subscriptions/subscriptions'
|
||||
import { upload } from './upload/upload'
|
||||
import { userInfo } from './user-info/user-info'
|
||||
import { watchlater } from './watchlater/watchlater'
|
||||
import { favorites } from './favorites/favorites'
|
||||
import { history } from './history/history'
|
||||
|
||||
const [blank1, blank2, blank3, blank4] = blanks
|
||||
export const getBuiltInItems = (): CustomNavbarItemInit[] => [
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
import { createPopper, Instance as Popper } from '@popperjs/core'
|
||||
import { VueModule, Executable } from '@/core/common-types'
|
||||
import { getComponentSettings, addComponentListener } from '@/core/settings'
|
||||
import type { Instance as Popper } from '@popperjs/core'
|
||||
import { createPopper } from '@popperjs/core'
|
||||
|
||||
import type { Executable, VueModule } from '@/core/common-types'
|
||||
import { addComponentListener, getComponentSettings } from '@/core/settings'
|
||||
|
||||
import type { CustomNavbarOptions } from '.'
|
||||
|
||||
export const CustomNavbarItems = 'customNavbar.items'
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { ComponentEntry } from '@/components/types'
|
||||
import type { ComponentEntry } from '@/components/types'
|
||||
import { addComponentListener } from '@/core/settings'
|
||||
import { isIframe, isNotHtml, matchUrlPattern, mountVueComponent } from '@/core/utils'
|
||||
|
||||
|
||||
@ -13,11 +13,13 @@
|
||||
</VDropdown>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { VDropdown } from '@/ui'
|
||||
import { getUID } from '@/core/utils'
|
||||
import { getJsonWithCredentials } from '@/core/ajax'
|
||||
import { getComponentSettings } from '@/core/settings'
|
||||
import { FavoritesFolder, notSelectedFolder } from './favorites-folder'
|
||||
import { getUID } from '@/core/utils'
|
||||
import { VDropdown } from '@/ui'
|
||||
|
||||
import type { FavoritesFolder } from './favorites-folder'
|
||||
import { notSelectedFolder } from './favorites-folder'
|
||||
|
||||
const navbarOptions = getComponentSettings('customNavbar').options
|
||||
export default Vue.extend({
|
||||
|
||||
@ -65,16 +65,17 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { VLoading, VEmpty, VIcon, VButton, TextBox, DpiImage, ScrollTrigger } from '@/ui'
|
||||
import { formatDate, formatDuration } from '@/core/utils/formatters'
|
||||
import { getUID } from '@/core/utils'
|
||||
import type { VideoCard } from '@/components/feeds/video-card'
|
||||
import { getJsonWithCredentials } from '@/core/ajax'
|
||||
import { logError } from '@/core/utils/log'
|
||||
import { VideoCard } from '@/components/feeds/video-card'
|
||||
import { getComponentSettings } from '@/core/settings'
|
||||
import { getUID } from '@/core/utils'
|
||||
import { formatDate, formatDuration } from '@/core/utils/formatters'
|
||||
import { logError } from '@/core/utils/log'
|
||||
import { DpiImage, ScrollTrigger, TextBox, VButton, VEmpty, VIcon, VLoading } from '@/ui'
|
||||
|
||||
import { popperMixin } from '../mixins'
|
||||
import { notSelectedFolder } from './favorites-folder'
|
||||
import FavoritesFolderSelect from './FavoritesFolderSelect.vue'
|
||||
import { popperMixin } from '../mixins'
|
||||
|
||||
/*
|
||||
新版收藏夹 API
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { getUID } from '@/core/utils'
|
||||
import { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
|
||||
import type { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
|
||||
const href = `https://space.bilibili.com/${getUID()}/favlist`
|
||||
export const favorites: CustomNavbarItemInit = {
|
||||
|
||||
@ -9,9 +9,10 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { TabControl, VIcon } from '@/ui'
|
||||
import { feedsCardTypes } from '@/components/feeds/api'
|
||||
import { getNotifyCount } from '@/components/feeds/notify'
|
||||
import { TabControl, VIcon } from '@/ui'
|
||||
|
||||
import { popperMixin } from '../mixins'
|
||||
import { tabs } from './tabs/tabs'
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
import type { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
|
||||
export const feeds: CustomNavbarItemInit = {
|
||||
name: 'feeds',
|
||||
|
||||
@ -12,9 +12,10 @@
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { feedsCardTypes } from '@/components/feeds/api'
|
||||
import { isNewID } from '@/components/feeds/notify'
|
||||
import { BangumiCard } from '@/components/feeds/bangumi-card'
|
||||
import type { BangumiCard } from '@/components/feeds/bangumi-card'
|
||||
import BangumiCardComponent from '@/components/feeds/BangumiCard.vue'
|
||||
import { isNewID } from '@/components/feeds/notify'
|
||||
|
||||
import { nextPageMixin } from './next-page'
|
||||
|
||||
export default Vue.extend({
|
||||
|
||||
@ -12,9 +12,10 @@
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { feedsCardTypes } from '@/components/feeds/api'
|
||||
import { isNewID } from '@/components/feeds/notify'
|
||||
import { ColumnCard } from '@/components/feeds/column-card'
|
||||
import type { ColumnCard } from '@/components/feeds/column-card'
|
||||
import ColumnCardComponent from '@/components/feeds/ColumnCard.vue'
|
||||
import { isNewID } from '@/components/feeds/notify'
|
||||
|
||||
import { nextPageMixin } from './next-page'
|
||||
|
||||
export default Vue.extend({
|
||||
|
||||
@ -16,9 +16,10 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { VLoading, VEmpty, DpiImage } from '@/ui'
|
||||
import { responsiveGetPages, getJsonWithCredentials } from '@/core/ajax'
|
||||
import { LiveFeedItem } from './live-feed-item'
|
||||
import { getJsonWithCredentials, responsiveGetPages } from '@/core/ajax'
|
||||
import { DpiImage, VEmpty, VLoading } from '@/ui'
|
||||
|
||||
import type { LiveFeedItem } from './live-feed-item'
|
||||
|
||||
export default Vue.extend({
|
||||
components: {
|
||||
|
||||
@ -30,11 +30,12 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { VideoCard } from '@/components/feeds/video-card'
|
||||
import { formatDuration, formatCount } from '@/core/utils/formatters'
|
||||
import { isNewID } from '@/components/feeds/notify'
|
||||
import { feedsCardTypes, groupVideoFeeds } from '@/components/feeds/api'
|
||||
import { isNewID } from '@/components/feeds/notify'
|
||||
import type { VideoCard } from '@/components/feeds/video-card'
|
||||
import VideoCardComponent from '@/components/feeds/VideoCard.vue'
|
||||
import { formatCount, formatDuration } from '@/core/utils/formatters'
|
||||
|
||||
import { nextPageMixin } from './next-page'
|
||||
|
||||
const formatPubTime = (pubTime: number) => {
|
||||
|
||||
@ -1,13 +1,9 @@
|
||||
import {
|
||||
getFeeds,
|
||||
FeedsCardType,
|
||||
applyContentFilter,
|
||||
isPreOrderedVideo,
|
||||
} from '@/components/feeds/api'
|
||||
import { descendingStringSort } from '@/core/utils/sort'
|
||||
import { logError } from '@/core/utils/log'
|
||||
import type { FeedsCardType } from '@/components/feeds/api'
|
||||
import { applyContentFilter, getFeeds, isPreOrderedVideo } from '@/components/feeds/api'
|
||||
import { setLatestID } from '@/components/feeds/notify'
|
||||
import { VLoading, VEmpty, ScrollTrigger } from '@/ui'
|
||||
import { logError } from '@/core/utils/log'
|
||||
import { descendingStringSort } from '@/core/utils/sort'
|
||||
import { ScrollTrigger, VEmpty, VLoading } from '@/ui'
|
||||
|
||||
/**
|
||||
* 获取用于支持顶栏动态无限滚动的Vue Mixin
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { TabMappings } from '@/ui/tab-mapping'
|
||||
import type { TabMappings } from '@/ui/tab-mapping'
|
||||
|
||||
export const tabs: TabMappings = [
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
import type { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
|
||||
const count = 4
|
||||
export const blanks: CustomNavbarItemInit[] = new Array(count).fill(0).map((_, index) => ({
|
||||
|
||||
@ -109,17 +109,19 @@ import { bilibiliApi, getJsonWithCredentials, postTextWithCredentials } from '@/
|
||||
import { formData, getCsrf } from '@/core/utils'
|
||||
import { descendingSort } from '@/core/utils/sort'
|
||||
import {
|
||||
VButton,
|
||||
VIcon,
|
||||
RadioButton,
|
||||
TextBox,
|
||||
VLoading,
|
||||
VEmpty,
|
||||
ScrollTrigger,
|
||||
DpiImage,
|
||||
RadioButton,
|
||||
ScrollTrigger,
|
||||
TextBox,
|
||||
VButton,
|
||||
VEmpty,
|
||||
VIcon,
|
||||
VLoading,
|
||||
} from '@/ui'
|
||||
|
||||
import { popperMixin } from '../mixins'
|
||||
import { types, TypeFilter, HistoryItem, getHistoryItems, group, HistoryType } from './types'
|
||||
import type { HistoryItem, TypeFilter } from './types'
|
||||
import { getHistoryItems, group, HistoryType, types } from './types'
|
||||
|
||||
export default Vue.extend({
|
||||
components: {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
import type { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
|
||||
const href = 'https://www.bilibili.com/account/history'
|
||||
export const history: CustomNavbarItemInit = {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { getJsonWithCredentials, bilibiliApi } from '@/core/ajax'
|
||||
import { bilibiliApi, getJsonWithCredentials } from '@/core/ajax'
|
||||
import { fixed } from '@/core/utils'
|
||||
import { formatDuration } from '@/core/utils/formatters'
|
||||
|
||||
|
||||
@ -30,7 +30,9 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { categories, Category } from '@/components/utils/categories/data'
|
||||
import type { Category } from '@/components/utils/categories/data'
|
||||
import { categories } from '@/components/utils/categories/data'
|
||||
|
||||
import { popperMixin } from '../mixins'
|
||||
|
||||
const clone = lodash.cloneDeep(categories)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
import type { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
|
||||
export const home: CustomNavbarItemInit = {
|
||||
name: 'home',
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
import type { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
|
||||
interface NavbarIframeConfig {
|
||||
src: string
|
||||
|
||||
@ -1,13 +1,11 @@
|
||||
import {
|
||||
defineComponentMetadata,
|
||||
defineOptionsMetadata,
|
||||
OptionsOfMetadata,
|
||||
} from '@/components/define'
|
||||
import { LaunchBarActionProvider } from '@/components/launch-bar/launch-bar-action'
|
||||
import { urlInclude, urlExclude } from './urls'
|
||||
import { entry } from './entry'
|
||||
import type { OptionsOfMetadata } from '@/components/define'
|
||||
import { defineComponentMetadata, defineOptionsMetadata } from '@/components/define'
|
||||
import type { LaunchBarActionProvider } from '@/components/launch-bar/launch-bar-action'
|
||||
import { getNumberValidator } from '@/core/utils'
|
||||
|
||||
import { entry } from './entry'
|
||||
import { urlExclude, urlInclude } from './urls'
|
||||
|
||||
const styleID = 'custom-navbar-style'
|
||||
const options = defineOptionsMetadata({
|
||||
hidden: {
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { addComponentListener } from '@/core/settings'
|
||||
import { getJson } from '@/core/ajax'
|
||||
import { addComponentListener } from '@/core/settings'
|
||||
import { VIcon } from '@/ui'
|
||||
|
||||
export default Vue.extend({
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
import type { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
|
||||
export const logo: CustomNavbarItemInit = {
|
||||
name: 'logo',
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { getJsonWithCredentials } from '@/core/ajax'
|
||||
|
||||
import { popperMixin } from '../mixins'
|
||||
|
||||
interface MessageEntry {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
import type { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
|
||||
const messagesUrl = 'https://message.bilibili.com/'
|
||||
export const messages: CustomNavbarItemInit = {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
import type { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
|
||||
const rankingUrl = 'https://www.bilibili.com/v/popular/rank/'
|
||||
export const ranking: CustomNavbarItemInit = {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
import type { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
|
||||
export const search: CustomNavbarItemInit = {
|
||||
name: 'search',
|
||||
|
||||
@ -12,8 +12,9 @@
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { getUID } from '@/core/utils'
|
||||
import { VIcon, VButton } from '@/ui'
|
||||
import { setTriggerElement, loadNavbarSettings, toggleNavbarSettings } from './vm'
|
||||
import { VButton, VIcon } from '@/ui'
|
||||
|
||||
import { loadNavbarSettings, setTriggerElement, toggleNavbarSettings } from './vm'
|
||||
|
||||
export default Vue.extend({
|
||||
components: {
|
||||
|
||||
@ -68,12 +68,14 @@
|
||||
</VPopup>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { SortableEvent } from 'sortablejs'
|
||||
import { VPopup, VIcon, VSlider, VLoading } from '@/ui'
|
||||
import type { SortableEvent } from 'sortablejs'
|
||||
|
||||
import { SortableJSLibrary } from '@/core/runtime-library'
|
||||
import { addComponentListener } from '@/core/settings'
|
||||
import { dqa } from '@/core/utils'
|
||||
import { SortableJSLibrary } from '@/core/runtime-library'
|
||||
import { getData } from '@/plugins/data'
|
||||
import { VIcon, VLoading, VPopup, VSlider } from '@/ui'
|
||||
|
||||
import { CustomNavbarItem, CustomNavbarRenderedItems } from '../custom-navbar-item'
|
||||
import { checkSequentialOrder, sortItems } from './orders'
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
import type { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
|
||||
interface SimpleLinkConfig {
|
||||
name: string
|
||||
|
||||
@ -4,9 +4,10 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { TabControl } from '@/ui'
|
||||
import { TabMappings, TabMapping } from '@/ui/tab-mapping'
|
||||
import { getUID } from '@/core/utils'
|
||||
import { TabControl } from '@/ui'
|
||||
import type { TabMapping, TabMappings } from '@/ui/tab-mapping'
|
||||
|
||||
import { popperMixin } from '../mixins'
|
||||
import { SubscriptionTypes } from './subscriptions'
|
||||
|
||||
|
||||
@ -41,10 +41,11 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { getJsonWithCredentials } from '@/core/ajax'
|
||||
import { getUID } from '@/core/utils'
|
||||
import { logError } from '@/core/utils/log'
|
||||
import { DpiImage, VLoading, VEmpty, VIcon, ScrollTrigger } from '@/ui'
|
||||
import { getJsonWithCredentials } from '@/core/ajax'
|
||||
import { DpiImage, ScrollTrigger, VEmpty, VIcon, VLoading } from '@/ui'
|
||||
|
||||
import { SubscriptionTypes } from './subscriptions'
|
||||
|
||||
enum SubscriptionStatus {
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { getUID } from '@/core/utils'
|
||||
import { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
|
||||
import type { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
|
||||
export enum SubscriptionTypes {
|
||||
Bangumi = 'bangumi',
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
import type { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
|
||||
export const upload: CustomNavbarItemInit = {
|
||||
name: 'upload',
|
||||
|
||||
@ -155,11 +155,12 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { getUID, getCsrf, formData } from '@/core/utils'
|
||||
import { formatCount } from '@/core/utils/formatters'
|
||||
import { logError } from '@/core/utils/log'
|
||||
import { getJsonWithCredentials, postTextWithCredentials } from '@/core/ajax'
|
||||
import { getUserInfo } from '@/core/user-info'
|
||||
import { formData, getCsrf, getUID } from '@/core/utils'
|
||||
import { formatCount } from '@/core/utils/formatters'
|
||||
import { logError } from '@/core/utils/log'
|
||||
|
||||
import { popperMixin } from '../mixins'
|
||||
|
||||
type PrivilegeType = 1 | 2
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { getUID } from '@/core/utils'
|
||||
import { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
|
||||
import type { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
|
||||
export const userInfo: CustomNavbarItemInit = {
|
||||
name: 'userInfo',
|
||||
|
||||
@ -50,15 +50,12 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import type { RawWatchlaterItem } from '@/components/video/watchlater'
|
||||
import { getWatchlaterList, toggleWatchlater, watchlaterList } from '@/components/video/watchlater'
|
||||
import { getComponentSettings } from '@/core/settings'
|
||||
import { formatDuration } from '@/core/utils/formatters'
|
||||
import {
|
||||
watchlaterList,
|
||||
getWatchlaterList,
|
||||
RawWatchlaterItem,
|
||||
toggleWatchlater,
|
||||
} from '@/components/video/watchlater'
|
||||
import { VLoading, VEmpty, TextBox, VButton, VIcon, DpiImage } from '@/ui'
|
||||
import { DpiImage, TextBox, VButton, VEmpty, VIcon, VLoading } from '@/ui'
|
||||
|
||||
import { popperMixin } from '../mixins'
|
||||
|
||||
interface WatchlaterCard {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
import type { CustomNavbarItemInit } from '../custom-navbar-item'
|
||||
|
||||
export const watchlater: CustomNavbarItemInit = {
|
||||
name: 'watchlater',
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { LifeCycleEventTypes } from '@/core/life-cycle'
|
||||
|
||||
import { darkExcludes } from '../dark-urls'
|
||||
|
||||
export const component = defineComponentMetadata({
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
|
||||
import { darkExcludes } from './dark-urls'
|
||||
|
||||
const changeDelay = 200
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
import {
|
||||
defineComponentMetadata,
|
||||
defineOptionsMetadata,
|
||||
OptionsOfMetadata,
|
||||
} from '@/components/define'
|
||||
import type { OptionsOfMetadata } from '@/components/define'
|
||||
import { defineComponentMetadata, defineOptionsMetadata } from '@/components/define'
|
||||
import { fullyLoaded } from '@/core/life-cycle'
|
||||
import { ComponentSettings, getComponentSettings } from '@/core/settings'
|
||||
import { Range } from '@/ui/range'
|
||||
import type { ComponentSettings } from '@/core/settings'
|
||||
import { getComponentSettings } from '@/core/settings'
|
||||
import type { Range } from '@/ui/range'
|
||||
|
||||
import { darkExcludes } from '../dark-urls'
|
||||
|
||||
class ScheduleTime {
|
||||
|
||||
@ -13,11 +13,12 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { VEmpty, VLoading } from '@/ui'
|
||||
import { enableHorizontalScroll } from '@/core/horizontal-scroll'
|
||||
import { addComponentListener } from '@/core/settings'
|
||||
import { VEmpty, VLoading } from '@/ui'
|
||||
|
||||
import { cleanUpScrollMask, setupScrollMask } from './scroll-mask'
|
||||
import VideoCardWrapper from './VideoCardWrapper.vue'
|
||||
import { setupScrollMask, cleanUpScrollMask } from './scroll-mask'
|
||||
|
||||
export default Vue.extend({
|
||||
components: {
|
||||
|
||||
@ -2,6 +2,7 @@ import { defineComponentMetadata } from '@/components/define'
|
||||
import { contentLoaded } from '@/core/life-cycle'
|
||||
import { addComponentListener } from '@/core/settings'
|
||||
import { getNumberValidator, mountVueComponent } from '@/core/utils'
|
||||
|
||||
import { homeUrls } from '../urls'
|
||||
|
||||
export const component = defineComponentMetadata({
|
||||
|
||||
@ -24,9 +24,10 @@
|
||||
<script lang="ts">
|
||||
import { addData } from '@/plugins/data'
|
||||
import { VButton, VIcon } from '@/ui'
|
||||
|
||||
import BlackRoomColored from './black-room.svg'
|
||||
import LiveColored from './live.svg'
|
||||
import TopicColored from './topic.svg'
|
||||
import BlackRoomColored from './black-room.svg'
|
||||
|
||||
addData('ui.icons', (icons: Record<string, string>) => {
|
||||
icons['live-colored'] = LiveColored
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { FreshLayoutItem } from '../fresh-layout-item'
|
||||
import type { FreshLayoutItem } from '../fresh-layout-item'
|
||||
|
||||
export const areas: FreshLayoutItem = {
|
||||
name: 'areas',
|
||||
|
||||
@ -52,7 +52,8 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { VButton, VIcon, DpiImage } from '@/ui'
|
||||
import { DpiImage, VButton, VIcon } from '@/ui'
|
||||
|
||||
import { getBlackboards } from './api'
|
||||
|
||||
export default Vue.extend({
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { FreshLayoutItem } from '../fresh-layout-item'
|
||||
import type { FreshLayoutItem } from '../fresh-layout-item'
|
||||
|
||||
export const blackboard: FreshLayoutItem = {
|
||||
name: 'blackboard',
|
||||
|
||||
@ -35,13 +35,14 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { ArrayContent } from '@/core/common-types'
|
||||
import type { ArrayContent } from '@/core/common-types'
|
||||
import { Reorder } from '@/core/reorder'
|
||||
import { ascendingSort } from '@/core/utils/sort'
|
||||
import { VButton, VIcon } from '@/ui'
|
||||
|
||||
import { freshHomeOptions } from '../../types'
|
||||
import { supportedCategories } from './filter'
|
||||
import { getContent } from './content/content'
|
||||
import { supportedCategories } from './filter'
|
||||
|
||||
const tabs = Object.entries(supportedCategories).map(([name, category]) => ({
|
||||
id: category.code as number,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { FreshLayoutItem } from '../fresh-layout-item'
|
||||
import type { FreshLayoutItem } from '../fresh-layout-item'
|
||||
|
||||
export const categories: FreshLayoutItem = {
|
||||
name: 'categories',
|
||||
|
||||
@ -20,10 +20,11 @@
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { applyContentFilter } from '@/components/feeds/api'
|
||||
|
||||
import SubHeader from '../../../SubHeader.vue'
|
||||
import RankList from './RankList.vue'
|
||||
import BangumiTimeline from './BangumiTimeline.vue'
|
||||
import { RankListCard } from './rank-list'
|
||||
import type { RankListCard } from './rank-list'
|
||||
import RankList from './RankList.vue'
|
||||
|
||||
const bangumiDataMap = {
|
||||
anime: {
|
||||
|
||||
@ -99,13 +99,14 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { DpiImage, VIcon, VEmpty, VLoading } from '@/ui'
|
||||
import { addComponentListener } from '@/core/settings'
|
||||
import { enableHorizontalScroll } from '@/core/horizontal-scroll'
|
||||
import { cssVariableMixin, requestMixin } from '../../../../mixin'
|
||||
import { rankListCssVars } from './rank-list'
|
||||
import { setupScrollMask, cleanUpScrollMask } from '../../../scroll-mask'
|
||||
import { getJsonWithCredentials } from '@/core/ajax'
|
||||
import { enableHorizontalScroll } from '@/core/horizontal-scroll'
|
||||
import { addComponentListener } from '@/core/settings'
|
||||
import { DpiImage, VEmpty, VIcon, VLoading } from '@/ui'
|
||||
|
||||
import { cssVariableMixin, requestMixin } from '../../../../mixin'
|
||||
import { cleanUpScrollMask, setupScrollMask } from '../../../scroll-mask'
|
||||
import { rankListCssVars } from './rank-list'
|
||||
|
||||
interface TimelineSeason {
|
||||
cover: string
|
||||
|
||||
@ -20,10 +20,11 @@
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { applyContentFilter } from '@/components/feeds/api'
|
||||
import { RankListCard } from './rank-list'
|
||||
|
||||
import SubHeader from '../../../SubHeader.vue'
|
||||
import type { RankListCard } from './rank-list'
|
||||
import RankList from './RankList.vue'
|
||||
import VideoSlides from './VideoSlides.vue'
|
||||
import SubHeader from '../../../SubHeader.vue'
|
||||
|
||||
/*
|
||||
TODO: 有几个区表面上是普通视频, 但内容走的还是番剧那套, 所以 RankList 也要换 API
|
||||
|
||||
@ -106,8 +106,9 @@
|
||||
<script lang="ts">
|
||||
import UpInfo from '@/components/feeds/UpInfo.vue'
|
||||
import { formatCount } from '@/core/utils/formatters'
|
||||
import { DpiImage, VIcon, VLoading, VEmpty, VButton } from '@/ui'
|
||||
import { requestMixin, cssVariableMixin } from '../../../../mixin'
|
||||
import { DpiImage, VButton, VEmpty, VIcon, VLoading } from '@/ui'
|
||||
|
||||
import { cssVariableMixin, requestMixin } from '../../../../mixin'
|
||||
import { rankListCssVars } from './rank-list'
|
||||
|
||||
export default Vue.extend({
|
||||
|
||||
@ -105,10 +105,11 @@
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { applyContentFilter } from '@/components/feeds/api'
|
||||
import { VideoCard } from '@/components/feeds/video-card'
|
||||
import type { VideoCard } from '@/components/feeds/video-card'
|
||||
import { getWatchlaterList, toggleWatchlater, watchlaterList } from '@/components/video/watchlater'
|
||||
import { formatDuration } from '@/core/utils/formatters'
|
||||
import { DpiImage, VButton, VIcon, VLoading, VEmpty } from '@/ui'
|
||||
import { DpiImage, VButton, VEmpty, VIcon, VLoading } from '@/ui'
|
||||
|
||||
import { cssVariableMixin, requestMixin } from '../../../../mixin'
|
||||
|
||||
export default Vue.extend({
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import { categories } from '@/components/utils/categories/data'
|
||||
|
||||
import supportedNames from './supported-names.json'
|
||||
|
||||
const excludedNames = [
|
||||
|
||||
@ -53,9 +53,10 @@
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { getVideoFeeds } from '@/components/feeds/api'
|
||||
import { VideoCard } from '@/components/feeds/video-card'
|
||||
import { ArrayContent } from '@/core/common-types'
|
||||
import type { VideoCard } from '@/components/feeds/video-card'
|
||||
import type { ArrayContent } from '@/core/common-types'
|
||||
import { VButton, VIcon } from '@/ui'
|
||||
|
||||
import VideoList from '../../VideoList.vue'
|
||||
|
||||
type FeedsApi = () => Promise<VideoCard[]>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { FreshLayoutItem } from '../fresh-layout-item'
|
||||
import type { FreshLayoutItem } from '../fresh-layout-item'
|
||||
|
||||
export const feeds: FreshLayoutItem = {
|
||||
name: 'feeds',
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Executable, VueModule, WithName } from '@/core/common-types'
|
||||
import type { Executable, VueModule, WithName } from '@/core/common-types'
|
||||
|
||||
export interface FreshLayoutItem extends WithName {
|
||||
component: Executable<VueModule>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import { registerAndGetData } from '@/plugins/data'
|
||||
|
||||
import { areas } from './areas/areas'
|
||||
import { blackboard } from './blackboard/blackboard'
|
||||
import { categories } from './categories/categories'
|
||||
|
||||
@ -23,9 +23,10 @@
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { VButton, VIcon } from '@/ui'
|
||||
import VideoList from '../../VideoList.vue'
|
||||
import { freshHomeOptions } from '../../types'
|
||||
|
||||
import { getTrendingVideos } from '../../../trending'
|
||||
import { freshHomeOptions } from '../../types'
|
||||
import VideoList from '../../VideoList.vue'
|
||||
|
||||
export default Vue.extend({
|
||||
components: {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { FreshLayoutItem } from '../fresh-layout-item'
|
||||
import type { FreshLayoutItem } from '../fresh-layout-item'
|
||||
|
||||
export const trending: FreshLayoutItem = {
|
||||
name: 'trending',
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { getComponentSettings } from '@/core/settings'
|
||||
import { FreshLayoutItemSettings } from './layouts/fresh-layout-item'
|
||||
|
||||
import type { FreshLayoutItemSettings } from './layouts/fresh-layout-item'
|
||||
|
||||
export const freshHomeOptions = getComponentSettings('freshHome').options as {
|
||||
layoutOptions: Record<string, FreshLayoutItemSettings>
|
||||
|
||||
@ -8,7 +8,8 @@
|
||||
<script lang="ts">
|
||||
import { addComponentListener } from '@/core/settings'
|
||||
import { TabControl } from '@/ui'
|
||||
import { TabMappings } from '@/ui/tab-mapping'
|
||||
import type { TabMappings } from '@/ui/tab-mapping'
|
||||
|
||||
import HomeRedesignBase from '../HomeRedesignBase.vue'
|
||||
import { minimalHomeOptions } from './options'
|
||||
import { MinimalHomeTabOption } from './types'
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
import { defineComponentMetadata, defineOptionsMetadata } from '@/components/define'
|
||||
import { contentLoaded } from '@/core/life-cycle'
|
||||
import { addComponentListener } from '@/core/settings'
|
||||
import { mountVueComponent, getNumberValidator } from '@/core/utils'
|
||||
import { getNumberValidator, mountVueComponent } from '@/core/utils'
|
||||
|
||||
import { homeUrls } from '../urls'
|
||||
import { MinimalHomeTabOption } from './types'
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { OptionsOfMetadata } from '@/components/define'
|
||||
import type { OptionsOfMetadata } from '@/components/define'
|
||||
import { getComponentSettings } from '@/core/settings'
|
||||
|
||||
import type { minimalHomeOptionsMetadata } from '.'
|
||||
|
||||
export const minimalHomeOptions =
|
||||
|
||||
@ -10,11 +10,12 @@
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { getVideoFeeds } from '@/components/feeds/api'
|
||||
import { VideoCard } from '@/components/feeds/video-card'
|
||||
import type { VideoCard } from '@/components/feeds/video-card'
|
||||
import VideoCardComponent from '@/components/feeds/VideoCard.vue'
|
||||
import { logError } from '@/core/utils/log'
|
||||
import { ascendingStringSort } from '@/core/utils/sort'
|
||||
import { VEmpty, ScrollTrigger } from '@/ui'
|
||||
import { ScrollTrigger, VEmpty } from '@/ui'
|
||||
|
||||
import MinimalHomeOperations from '../MinimalHomeOperations.vue'
|
||||
|
||||
export default Vue.extend({
|
||||
|
||||
@ -9,11 +9,12 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { VideoCard } from '@/components/feeds/video-card'
|
||||
import type { VideoCard } from '@/components/feeds/video-card'
|
||||
import VideoCardComponent from '@/components/feeds/VideoCard.vue'
|
||||
import { logError } from '@/core/utils/log'
|
||||
import { ascendingStringSort } from '@/core/utils/sort'
|
||||
import { VEmpty, VLoading } from '@/ui'
|
||||
|
||||
import { getTrendingVideos } from '../../trending'
|
||||
import MinimalHomeOperations from '../MinimalHomeOperations.vue'
|
||||
import { minimalHomeOptions } from '../options'
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import { applyContentFilter } from '@/components/feeds/api'
|
||||
import { VideoCard } from '@/components/feeds/video-card'
|
||||
import type { VideoCard } from '@/components/feeds/video-card'
|
||||
import { getJson, getJsonWithCredentials } from '@/core/ajax'
|
||||
import { getUID } from '@/core/utils'
|
||||
import { formatDuration, formatCount } from '@/core/utils/formatters'
|
||||
import { formatCount, formatDuration } from '@/core/utils/formatters'
|
||||
|
||||
export const getTrendingVideos = async (isPersonalized: boolean) => {
|
||||
const api = 'https://api.bilibili.com/x/web-interface/index/top/feed/rcmd'
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import { newSwitchComponentWrapper, defineSwitchMetadata } from '@/components/switch-options'
|
||||
|
||||
import { defineSwitchMetadata, newSwitchComponentWrapper } from '@/components/switch-options'
|
||||
import { addComponentListener, getComponentSettings } from '@/core/settings'
|
||||
import { sq } from '@/core/spin-query'
|
||||
import { addStyle } from '@/core/style'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { newSwitchComponentWrapper } from '@/components/switch-options'
|
||||
import { styledComponentEntry } from '@/components/styled-component'
|
||||
import { newSwitchComponentWrapper } from '@/components/switch-options'
|
||||
import { liveUrls } from '@/core/utils/urls'
|
||||
|
||||
export const component = newSwitchComponentWrapper({
|
||||
|
||||
@ -1,11 +1,8 @@
|
||||
import {
|
||||
defineComponentMetadata,
|
||||
defineOptionsMetadata,
|
||||
OptionsOfMetadata,
|
||||
} from '@/components/define'
|
||||
import { ComponentEntry } from '@/components/types'
|
||||
import { playerUrls } from '@/core/utils/urls'
|
||||
import type { OptionsOfMetadata } from '@/components/define'
|
||||
import { defineComponentMetadata, defineOptionsMetadata } from '@/components/define'
|
||||
import type { ComponentEntry } from '@/components/types'
|
||||
import { addComponentListener } from '@/core/settings'
|
||||
import { playerUrls } from '@/core/utils/urls'
|
||||
|
||||
const options = defineOptionsMetadata({
|
||||
highlight: {
|
||||
|
||||
@ -3,6 +3,7 @@ import { playerAgent } from '@/components/video/player-agent'
|
||||
import { videoChange } from '@/core/observer'
|
||||
import { addStyle } from '@/core/style'
|
||||
import { playerUrls } from '@/core/utils/urls'
|
||||
|
||||
import touchStyles from './double-click-control.scss'
|
||||
|
||||
const entry = async () => {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { defineComponentMetadata } from '@/components/define'
|
||||
import { videoAndBangumiUrls, liveUrls } from '@/core/utils/urls'
|
||||
import { liveUrls, videoAndBangumiUrls } from '@/core/utils/urls'
|
||||
|
||||
const setTouch = async (enable: boolean) => {
|
||||
if (!document.URL.startsWith('https://live.bilibili.com')) {
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { select } from '@/core/spin-query'
|
||||
import { addStyle, removeStyle } from '@/core/style'
|
||||
|
||||
import miniPlayerStyle from './mini-player.scss'
|
||||
|
||||
export const touchVideoMiniPlayer = async (enable: boolean) => {
|
||||
|
||||
@ -44,10 +44,12 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { ProgressBar, ProgressRing } from '@/ui'
|
||||
import { fixed } from '@/core/utils'
|
||||
import { formatPercent, formatDuration } from '@/core/utils/formatters'
|
||||
import { GesturePreviewParams, ProgressSeekMode } from './gesture-preview'
|
||||
import { formatDuration, formatPercent } from '@/core/utils/formatters'
|
||||
import { ProgressBar, ProgressRing } from '@/ui'
|
||||
|
||||
import type { GesturePreviewParams } from './gesture-preview'
|
||||
import { ProgressSeekMode } from './gesture-preview'
|
||||
import { Videoshot } from './videoshot'
|
||||
import { syncVolumeUI } from './volume'
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { playerAgent } from '@/components/video/player-agent'
|
||||
import { GesturePreviewParams, ProgressSeekMode } from './gesture-preview'
|
||||
|
||||
import type { GesturePreviewParams, ProgressSeekMode } from './gesture-preview'
|
||||
|
||||
export const entry = async () => {
|
||||
const { videoChange } = await import('@/core/observer')
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user