fix(mobile): exclude all for views
This commit is contained in:
parent
12ce75e44e
commit
69d70750be
|
|
@ -2,22 +2,26 @@ import type { ViewDefinition as ViewDefinitionBase } from "@follow/constants"
|
|||
import { FeedViewType, views as viewsBase } from "@follow/constants"
|
||||
|
||||
import { AnnouncementCuteFiIcon } from "../icons/announcement_cute_fi"
|
||||
import { BubbleCuteFiIcon } from "../icons/bubble_cute_fi"
|
||||
import { MicCuteFiIcon } from "../icons/mic_cute_fi"
|
||||
import { PaperCuteFiIcon } from "../icons/paper_cute_fi"
|
||||
import { PicCuteFiIcon } from "../icons/pic_cute_fi"
|
||||
import { TwitterCuteFiIcon } from "../icons/twitter_cute_fi"
|
||||
import { ThoughtCuteFiIcon } from "../icons/thought_cute_fi"
|
||||
import { VideoCuteFiIcon } from "../icons/video_cute_fi"
|
||||
|
||||
interface ViewDefinitionExtended {
|
||||
icon: React.FC<{ color?: string; height?: number; width?: number }>
|
||||
}
|
||||
// @ts-expect-error FIXME
|
||||
|
||||
const extendMap: Record<FeedViewType, ViewDefinitionExtended> = {
|
||||
[FeedViewType.All]: {
|
||||
icon: BubbleCuteFiIcon,
|
||||
},
|
||||
[FeedViewType.Articles]: {
|
||||
icon: PaperCuteFiIcon,
|
||||
},
|
||||
[FeedViewType.SocialMedia]: {
|
||||
icon: TwitterCuteFiIcon,
|
||||
icon: ThoughtCuteFiIcon,
|
||||
},
|
||||
[FeedViewType.Pictures]: {
|
||||
icon: PicCuteFiIcon,
|
||||
|
|
@ -35,10 +39,12 @@ const extendMap: Record<FeedViewType, ViewDefinitionExtended> = {
|
|||
|
||||
export interface ViewDefinition extends Omit<ViewDefinitionBase, "icon">, ViewDefinitionExtended {}
|
||||
|
||||
export const views: ViewDefinition[] = viewsBase.map((view) => {
|
||||
const extendedView = extendMap[view.view]
|
||||
return {
|
||||
...view,
|
||||
...extendedView,
|
||||
}
|
||||
})
|
||||
export const views: ViewDefinition[] = viewsBase
|
||||
.filter((view) => view.view !== FeedViewType.All)
|
||||
.map((view) => {
|
||||
const extendedView = extendMap[view.view]
|
||||
return {
|
||||
...view,
|
||||
...extendedView,
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
import * as React from "react"
|
||||
import Svg, { Path } from "react-native-svg"
|
||||
|
||||
interface BubbleCuteFiIconProps {
|
||||
width?: number
|
||||
height?: number
|
||||
color?: string
|
||||
}
|
||||
|
||||
export const BubbleCuteFiIcon = ({
|
||||
width = 24,
|
||||
height = 24,
|
||||
color = "#10161F",
|
||||
}: BubbleCuteFiIconProps) => {
|
||||
return (
|
||||
<Svg width={width} height={height} fill="none" viewBox="0 0 24 24">
|
||||
<Path
|
||||
d="M15.34 3.046c-.698.089-1.527.406-2.148.822a5.725 5.725 0 0 0-1.198 1.148c-.311.417-.685 1.18-.814 1.664a4.974 4.974 0 0 0 .337 3.5c.521 1.063 1.297 1.827 2.379 2.344 1.566.747 3.437.594 4.928-.405.405-.271 1.024-.89 1.295-1.295 1.164-1.739 1.164-3.909 0-5.648-.271-.405-.89-1.024-1.295-1.295a5.07 5.07 0 0 0-3.484-.835M6.433 11.04a4.383 4.383 0 0 0-1.718.682c-.326.22-.773.667-.993.993a4.848 4.848 0 0 0-.609 1.347c-.126.509-.126 1.367 0 1.876a4.211 4.211 0 0 0 1.064 1.885 4.211 4.211 0 0 0 1.885 1.064c.509.126 1.367.126 1.876 0a4.211 4.211 0 0 0 1.885-1.064 4.211 4.211 0 0 0 1.064-1.885c.126-.509.126-1.367 0-1.876a4.211 4.211 0 0 0-1.064-1.885 4.186 4.186 0 0 0-1.865-1.057c-.386-.094-1.175-.136-1.525-.08m9.07 4a3.033 3.033 0 0 0-2.205 1.7c-.226.481-.277.714-.277 1.26s.051.779.277 1.26a2.905 2.905 0 0 0 1.442 1.444 2.873 2.873 0 0 0 2.52 0 2.925 2.925 0 0 0 1.444-1.444c.183-.387.296-.867.296-1.26 0-.86-.446-1.781-1.127-2.329a3.668 3.668 0 0 0-1.117-.574c-.265-.073-.986-.106-1.253-.057"
|
||||
fill={color}
|
||||
fillRule="evenodd"
|
||||
/>
|
||||
</Svg>
|
||||
)
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
import * as React from "react"
|
||||
import Svg, { Path } from "react-native-svg"
|
||||
|
||||
interface DanmakuCuteFiIconProps {
|
||||
width?: number
|
||||
height?: number
|
||||
color?: string
|
||||
}
|
||||
|
||||
export const DanmakuCuteFiIcon = ({
|
||||
width = 24,
|
||||
height = 24,
|
||||
color = "#10161F",
|
||||
}: DanmakuCuteFiIconProps) => {
|
||||
return (
|
||||
<Svg width={width} height={height} fill="none" viewBox="0 0 24 24">
|
||||
<Path
|
||||
d="M4.503 3.042a3.045 3.045 0 0 0-2.191 1.662c-.308.64-.288.335-.299 4.436-.009 3.138-.003 3.658.043 3.53a1.05 1.05 0 0 1 .455-.539l.189-.111 3.217-.011c3.632-.012 3.469-.025 3.783.289a.983.983 0 0 1 0 1.404c-.313.313-.152.301-3.764.289l-3.198-.011-.195-.1a1.035 1.035 0 0 1-.486-.545c-.09-.244-.056 2.113.035 2.421a3.098 3.098 0 0 0 1.648 1.948c.479.226.864.296 1.642.296h.613l.012.91c.013.903.014.912.125 1.137.131.269.321.447.626.587.284.131.691.139.962.019.1-.044.953-.659 1.898-1.367L11.334 18h3.449c3.904 0 3.843.004 4.477-.296a2.925 2.925 0 0 0 1.444-1.444c.307-.65.296-.427.296-5.76s.011-5.11-.296-5.76a2.94 2.94 0 0 0-1.408-1.428c-.658-.317.056-.289-7.676-.297-3.806-.003-7.009.009-7.117.027M7.34 7.066c.369.126.66.538.66.934s-.291.808-.66.934c-.276.094-2.399.098-2.662.005a.986.986 0 0 1-.547-.45C4.036 8.328 4.02 8.256 4.02 8s.016-.328.111-.489c.061-.103.173-.236.25-.294.264-.202.352-.213 1.602-.215.981-.002 1.193.008 1.357.064m12 0c.369.126.66.538.66.934 0 .242-.119.521-.299.701-.317.317-.038.299-4.703.299-4.514 0-4.321.009-4.624-.222a1.19 1.19 0 0 1-.243-.289c-.095-.161-.111-.233-.111-.489s.016-.328.111-.489c.125-.213.318-.375.539-.454.122-.043.94-.054 4.313-.055 3.773-.002 4.181.004 4.357.064m-4 5c.369.126.66.538.66.934s-.291.808-.66.934c-.276.094-2.399.098-2.662.005a.986.986 0 0 1-.547-.45c-.095-.161-.111-.233-.111-.489s.016-.328.111-.489c.061-.103.173-.236.25-.294.264-.202.352-.213 1.602-.215.981-.002 1.193.008 1.357.064"
|
||||
fill={color}
|
||||
fillRule="evenodd"
|
||||
/>
|
||||
</Svg>
|
||||
)
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
import * as React from "react"
|
||||
import Svg, { Path } from "react-native-svg"
|
||||
|
||||
interface MailCuteReIconProps {
|
||||
width?: number
|
||||
height?: number
|
||||
color?: string
|
||||
}
|
||||
|
||||
export const MailCuteReIcon = ({
|
||||
width = 24,
|
||||
height = 24,
|
||||
color = "#10161F",
|
||||
}: MailCuteReIconProps) => {
|
||||
return (
|
||||
<Svg width={width} height={height} fill="none" viewBox="0 0 24 24">
|
||||
<Path
|
||||
d="M6.825 3.564c-1.86.102-2.934.495-3.85 1.411-.939.939-1.304 1.964-1.413 3.965-.054.983-.054 5.137 0 6.12.109 2.001.474 3.026 1.413 3.965.939.939 1.964 1.304 3.965 1.413.983.054 9.117.055 10.12.001 1.282-.068 2.108-.242 2.84-.6a3.935 3.935 0 0 0 1.208-.892c.866-.912 1.229-1.972 1.331-3.887.052-.983.052-5.137 0-6.12-.068-1.282-.242-2.108-.6-2.84a4.27 4.27 0 0 0-2.13-2.033c-.7-.3-1.425-.439-2.649-.505-.89-.049-9.338-.047-10.235.002m9.135 1.955c1.453.039 1.906.08 2.46.22.448.114.766.263.999.469l.181.159-1.95 1.624c-3.154 2.628-3.828 3.145-4.556 3.496-.4.192-.818.312-1.094.312-.266 0-.685-.116-1.057-.292-.751-.356-1.325-.796-4.613-3.533L4.4 6.367l.18-.159c.234-.206.551-.355 1-.469.541-.137 1.047-.186 2.26-.217 1.639-.043 6.589-.044 8.12-.003M5.279 9.702c3.256 2.709 3.955 3.228 4.924 3.663 1.237.556 2.357.556 3.594 0 .981-.44 1.697-.975 5.063-3.781l1.52-1.267.029.131c.057.256.116 3.271.092 4.672-.04 2.308-.117 3.085-.37 3.72-.132.333-.234.482-.536.788-.42.424-1.004.659-1.915.77-1.298.159-10.062.159-11.36 0-1.05-.128-1.612-.387-2.109-.973-.301-.354-.508-.936-.607-1.705-.088-.694-.135-3.62-.086-5.431.025-.94.056-1.768.069-1.84.019-.114.031-.124.087-.08.036.028.758.628 1.605 1.333"
|
||||
fill={color}
|
||||
fillRule="evenodd"
|
||||
/>
|
||||
</Svg>
|
||||
)
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
import * as React from "react"
|
||||
import Svg, { Path } from "react-native-svg"
|
||||
|
||||
interface Music2CuteFiIconProps {
|
||||
width?: number
|
||||
height?: number
|
||||
color?: string
|
||||
}
|
||||
|
||||
export const Music2CuteFiIcon = ({
|
||||
width = 24,
|
||||
height = 24,
|
||||
color = "#10161F",
|
||||
}: Music2CuteFiIconProps) => {
|
||||
return (
|
||||
<Svg width={width} height={height} fill="none" viewBox="0 0 24 24">
|
||||
<Path
|
||||
fill={color}
|
||||
fillRule="evenodd"
|
||||
d="m14 10.72 1.885-.628c.978-.326 2.078-.612 2.85-1.335a4 4 0 0 0 .899-1.248c.442-.961.366-2.094.366-3.125 0-.614.075-1.306-.204-1.876a2 2 0 0 0-1.53-1.103c-.577-.077-1.148.168-1.683.347-1.113.37-1.88.625-2.497 1.068a5 5 0 0 0-1.862 2.584C11.989 6.16 12 7.009 12 8.27v5.488a4.5 4.5 0 1 0 2 3.742z"
|
||||
clipRule="evenodd"
|
||||
/>
|
||||
</Svg>
|
||||
)
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
import * as React from "react"
|
||||
import Svg, { Path } from "react-native-svg"
|
||||
|
||||
interface Plugin2CuteReIconProps {
|
||||
width?: number
|
||||
height?: number
|
||||
color?: string
|
||||
}
|
||||
|
||||
export const Plugin2CuteReIcon = ({
|
||||
width = 24,
|
||||
height = 24,
|
||||
color = "#10161F",
|
||||
}: Plugin2CuteReIconProps) => {
|
||||
return (
|
||||
<Svg width={width} height={height} fill="none" viewBox="0 0 24 24">
|
||||
<Path
|
||||
d="M10.002 2.041c-1.207.168-2.251.992-2.719 2.146-.184.453-.223.672-.223 1.263V6h-.64c-1.033.001-1.569.111-2.26.464A3.978 3.978 0 0 0 2.464 8.16c-.392.765-.475 1.244-.456 2.6.015 1.053.029 1.116.297 1.378.368.358.734.409 1.326.187.235-.089.401-.125.569-.125.81 0 1.429.756 1.266 1.546-.126.612-.581 1.005-1.206 1.044-.239.015-.328 0-.612-.104-.414-.152-.629-.185-.837-.129-.25.067-.534.28-.67.5l-.121.197-.012 1.464c-.016 1.945.035 2.3.456 3.122a3.978 3.978 0 0 0 1.696 1.696c.82.42 1.18.473 3.099.456 1.609-.013 1.6-.012 1.88-.297.348-.355.399-.721.182-1.326-.114-.319-.129-.405-.112-.639.044-.62.438-1.071 1.045-1.196.768-.158 1.48.392 1.537 1.188.017.244.003.324-.114.648-.217.6-.165.969.184 1.325.264.269.326.282 1.379.297 1.356.019 1.835-.064 2.6-.456a3.978 3.978 0 0 0 1.696-1.696c.353-.691.463-1.226.464-2.26v-.64l.55-.001c.591 0 .813-.039 1.263-.222a3.522 3.522 0 0 0 2.072-2.337c.121-.455.121-1.305 0-1.76a3.522 3.522 0 0 0-2.072-2.337c-.45-.183-.672-.222-1.263-.222L18 10.06v-.14c0-.077-.027-.313-.058-.525-.222-1.469-1.266-2.705-2.697-3.192A5.5 5.5 0 0 0 14.08 6h-.14v-.55c0-.591-.039-.81-.223-1.263-.412-1.015-1.306-1.808-2.329-2.066a4.505 4.505 0 0 0-1.386-.08m1.133 2.113c.293.145.562.416.709.715.08.161.094.253.095.591.001.395-.001.405-.189.803-.166.35-.19.435-.19.66.001.328.125.607.363.81.275.236.445.267 1.456.267.959 0 1.166.03 1.551.225.265.135.708.575.84.835.185.366.201.476.226 1.58.023.982.031 1.072.111 1.22.196.365.55.578.965.579.215.001.309-.026.655-.184.222-.102.495-.197.608-.211a1.474 1.474 0 0 1 1.514.828c.119.241.131.3.131.628s-.012.387-.131.628c-.148.3-.416.568-.718.716-.161.08-.253.094-.591.095-.394.001-.406-.002-.808-.189-.352-.164-.444-.19-.66-.19a1.034 1.034 0 0 0-.805.363c-.253.295-.267.399-.267 1.948 0 1.493-.017 1.649-.229 2.066-.133.263-.575.703-.841.838-.277.14-.615.225-.898.225H13.8v-.256c0-1.395-.971-2.674-2.361-3.11-.262-.082-.379-.094-.939-.094-.559 0-.678.012-.94.094-.797.248-1.527.822-1.922 1.51-.261.454-.438 1.101-.438 1.6V20h-.732c-1.052 0-1.381-.105-1.872-.596-.491-.491-.596-.82-.596-1.872V16.8l.27-.001c.338-.001.884-.12 1.242-.27.975-.41 1.744-1.381 1.929-2.434.073-.414.032-1.197-.081-1.555-.245-.78-.824-1.511-1.504-1.902-.454-.261-1.101-.438-1.6-.438H4v-.232c0-.795.529-1.542 1.316-1.856.215-.086.287-.091 1.804-.111 1.523-.02 1.586-.024 1.74-.107.52-.282.717-.859.482-1.414-.333-.785-.312-.71-.293-1.077.02-.397.109-.618.359-.902.305-.348.686-.507 1.159-.487.249.01.358.037.568.14"
|
||||
fill={color}
|
||||
fillRule="evenodd"
|
||||
/>
|
||||
</Svg>
|
||||
)
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
import * as React from "react"
|
||||
import Svg, { Path } from "react-native-svg"
|
||||
|
||||
interface ThoughtCuteFiIconProps {
|
||||
width?: number
|
||||
height?: number
|
||||
color?: string
|
||||
}
|
||||
|
||||
export const ThoughtCuteFiIcon = ({
|
||||
width = 24,
|
||||
height = 24,
|
||||
color = "#10161F",
|
||||
}: ThoughtCuteFiIconProps) => {
|
||||
return (
|
||||
<Svg width={width} height={height} fill="none" viewBox="0 0 24 24">
|
||||
<Path
|
||||
d="M12.367 2.92a4.433 4.433 0 0 0-2.472 1.171c-.507.481-.788.874-1.062 1.488-.091.205-.128.246-.24.275-1.009.255-1.687.625-2.313 1.264a4.463 4.463 0 0 0-.888 4.917c.314.71.834 1.345 1.518 1.851.48.356.804.679 1.177 1.175.661.878 1.304 1.363 2.233 1.689.513.179.837.23 1.46.229.608-.002.801-.033 1.503-.244.936-.28 1.089-.3 2.557-.334 1.274-.03 1.358-.036 1.712-.136a4.475 4.475 0 0 0 3.257-3.805c.043-.374.056-.412.196-.58.225-.269.537-.808.675-1.166.232-.602.295-.949.296-1.634 0-.549-.012-.671-.111-1.06-.404-1.59-1.611-2.827-3.164-3.243a5.672 5.672 0 0 0-.921-.14c-.971-.074-1.375-.218-1.997-.71-.613-.486-1.271-.804-1.949-.943-.382-.079-1.131-.111-1.467-.064M4.46 16.044c-.96.135-1.846.728-2.218 1.486-.757 1.54.385 3.206 2.355 3.437 1.65.194 3.17-.78 3.371-2.158.245-1.68-1.492-3.049-3.508-2.765"
|
||||
fill={color}
|
||||
fillRule="evenodd"
|
||||
/>
|
||||
</Svg>
|
||||
)
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
import * as React from "react"
|
||||
import Svg, { Path } from "react-native-svg"
|
||||
|
||||
interface ToolCuteReIconProps {
|
||||
width?: number
|
||||
height?: number
|
||||
color?: string
|
||||
}
|
||||
|
||||
export const ToolCuteReIcon = ({
|
||||
width = 24,
|
||||
height = 24,
|
||||
color = "#10161F",
|
||||
}: ToolCuteReIconProps) => {
|
||||
return (
|
||||
<Svg width={width} height={height} fill="none" viewBox="0 0 24 24">
|
||||
<Path
|
||||
d="m8.64 2.425-.454.078c-.448.074-.746.214-1.031.486-.648.616-.717 1.624-.167 2.422.057.082.713.71 1.457 1.394 1.076.989 1.362 1.273 1.391 1.381.029.102.014.254-.061.624a4.643 4.643 0 0 1-.147.585c-.087.178-.233.243-.792.353-.467.092-.561.1-.666.056-.075-.031-.599-.569-1.352-1.388C5.969 7.493 5.515 7.03 5.35 6.92c-1.057-.706-2.476-.197-2.784 1-.205.799-.207 2.004-.006 2.929a7.033 7.033 0 0 0 3.683 4.775 6.929 6.929 0 0 0 3.654.733c.478-.036 1.193-.157 1.406-.238a.586.586 0 0 1 .137-.039c.019 0 .92 1.045 2.001 2.323 1.518 1.792 2.036 2.377 2.269 2.562.77.612 1.791.911 2.73.798.932-.112 1.668-.463 2.287-1.09.741-.751 1.1-1.682 1.061-2.753-.033-.937-.303-1.643-.898-2.351-.098-.116-1.213-1.087-2.478-2.157-2.25-1.905-2.3-1.949-2.277-2.069.012-.068.069-.339.125-.603.375-1.753-.016-3.708-1.05-5.26-.43-.645-1.253-1.468-1.89-1.89a7.287 7.287 0 0 0-2.56-1.072c-.331-.069-.59-.09-1.22-.1-.44-.006-.845-.003-.9.007m1.64 2.041c1.764.308 3.288 1.613 3.85 3.294.21.629.25.893.249 1.64-.002.65-.011.738-.13 1.225-.22.898-.149 1.421.279 2.046.071.103 1.035.948 2.427 2.126 1.27 1.075 2.367 2.02 2.437 2.1.271.309.417.715.413 1.151-.008.829-.527 1.477-1.355 1.693a1.719 1.719 0 0 1-1.505-.347c-.084-.07-1.032-1.165-2.105-2.433-1.073-1.267-2.012-2.351-2.086-2.406-.589-.445-1.217-.547-2.074-.336-.648.159-1.162.204-1.696.148-1.055-.11-1.894-.446-2.706-1.086-1.128-.888-1.796-2.216-1.864-3.701-.013-.286-.008-.577.011-.647l.035-.127 1.036 1.127c.57.62 1.135 1.212 1.256 1.315.255.218.691.441 1.008.516.533.126 1.639-.009 2.36-.288.532-.205.968-.597 1.262-1.132.164-.298.215-.47.358-1.194.108-.549.127-1.017.056-1.358-.063-.299-.317-.815-.522-1.059-.096-.114-.678-.67-1.294-1.235a41.618 41.618 0 0 1-1.133-1.061c-.032-.084.896-.065 1.433.029"
|
||||
fill={color}
|
||||
fillRule="evenodd"
|
||||
/>
|
||||
</Svg>
|
||||
)
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
import * as React from "react"
|
||||
import Svg, { Path } from "react-native-svg"
|
||||
|
||||
interface VideoCuteReIconProps {
|
||||
width?: number
|
||||
height?: number
|
||||
color?: string
|
||||
}
|
||||
|
||||
export const VideoCuteReIcon = ({
|
||||
width = 24,
|
||||
height = 24,
|
||||
color = "#10161F",
|
||||
}: VideoCuteReIconProps) => {
|
||||
return (
|
||||
<Svg width={width} height={height} fill="none" viewBox="0 0 24 24">
|
||||
<Path
|
||||
stroke={color}
|
||||
strokeWidth={2}
|
||||
d="M2.5 11.5c0-3.771 0-5.657 1.172-6.828C4.843 3.5 6.729 3.5 10.5 3.5h3c3.771 0 5.657 0 6.828 1.172C21.5 5.843 21.5 7.729 21.5 11.5v1c0 3.771 0 5.657-1.172 6.828C19.157 20.5 17.271 20.5 13.5 20.5h-3c-3.771 0-5.657 0-6.828-1.172C2.5 18.157 2.5 16.271 2.5 12.5z"
|
||||
/>
|
||||
<Path
|
||||
stroke={color}
|
||||
strokeWidth={2}
|
||||
d="M11.905 9.51c-.95-.51-1.426-.764-1.908-.486s-.499.817-.532 1.896a31.063 31.063 0 0 0 0 1.95c.034 1.077.05 1.614.533 1.893.482.278.956.023 1.904-.486a31.97 31.97 0 0 0 1.696-.98c.912-.564 1.368-.847 1.369-1.403 0-.557-.456-.84-1.368-1.406a31.033 31.033 0 0 0-1.694-.978Z"
|
||||
/>
|
||||
</Svg>
|
||||
)
|
||||
}
|
||||
Loading…
Reference in New Issue