mirror of
https://github.com/BewlyBewly/BewlyBewly.git
synced 2025-04-14 13:15:29 +00:00
chore: add ranking page
This commit is contained in:
@@ -8,6 +8,7 @@ import { setupMomentMsgLstnr } from './moment'
|
||||
import { setupHistoryMsgLstnr } from './history'
|
||||
import { setupFavoriteMsgLstnr } from './favorite'
|
||||
import { setupWatchLaterMsgLstnr } from './watchLater'
|
||||
import { setupRankingMsgLstnr } from './ranking'
|
||||
|
||||
export function setupAllMsgLstnrs() {
|
||||
setupAuthMsgLstnr()
|
||||
@@ -20,4 +21,5 @@ export function setupAllMsgLstnrs() {
|
||||
setupFavoriteMsgLstnr()
|
||||
setupAnimeMsgLstnr()
|
||||
setupWatchLaterMsgLstnr()
|
||||
setupRankingMsgLstnr()
|
||||
}
|
||||
|
||||
15
src/background/messageListeners/ranking.ts
Normal file
15
src/background/messageListeners/ranking.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import browser from 'webextension-polyfill'
|
||||
|
||||
function handleMessage(message: any) {
|
||||
|
||||
}
|
||||
|
||||
function handleConnect() {
|
||||
browser.runtime.onMessage.removeListener(handleMessage)
|
||||
browser.runtime.onMessage.addListener(handleMessage)
|
||||
}
|
||||
|
||||
export function setupRankingMsgLstnr() {
|
||||
browser.runtime.onConnect.removeListener(handleConnect)
|
||||
browser.runtime.onConnect.addListener(handleConnect)
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
import ForYou from './components/ForYou.vue'
|
||||
import Following from './components/Following.vue'
|
||||
import Trending from './components/Trending.vue'
|
||||
import Ranking from './components/Ranking.vue'
|
||||
import emitter from '~/utils/mitt'
|
||||
import { settings } from '~/logic'
|
||||
|
||||
@@ -9,9 +10,9 @@ const handleBackToTop = inject('handleBackToTop') as () => void
|
||||
|
||||
const recommendContentKey = ref<string>(`recommendContent${Number(new Date())}`)
|
||||
const activatedPage = ref<'ForYou' | 'Following' | 'Trending'>('ForYou')
|
||||
const pages = { ForYou, Following, Trending }
|
||||
const pages = { ForYou, Following, Trending, Ranking }
|
||||
|
||||
const tabs = reactive<{ label: string; value: 'ForYou' | 'Following' | 'Trending' }[]>([
|
||||
const tabs = reactive<{ label: string; value: 'ForYou' | 'Following' | 'Trending' | 'Ranking' }[]>([
|
||||
{
|
||||
label: 'For you',
|
||||
value: 'ForYou',
|
||||
@@ -24,6 +25,10 @@ const tabs = reactive<{ label: string; value: 'ForYou' | 'Following' | 'Trending
|
||||
label: 'Trending',
|
||||
value: 'Trending',
|
||||
},
|
||||
{
|
||||
label: 'Ranking',
|
||||
value: 'Ranking',
|
||||
},
|
||||
])
|
||||
|
||||
watch(() => activatedPage.value, () => {
|
||||
|
||||
7
src/contentScripts/views/Home/components/Ranking.vue
Normal file
7
src/contentScripts/views/Home/components/Ranking.vue
Normal file
@@ -0,0 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
ranking
|
||||
</template>
|
||||
Reference in New Issue
Block a user