@funhub/platform 0.1.23 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons/right_arrow.mjs +2 -0
- package/dist/assets/images/Frame.mjs +2 -0
- package/dist/assets/images/marquee.mjs +2 -0
- package/dist/biz.d.mts +25 -1
- package/dist/biz.mjs +1 -1
- package/dist/common.mjs +1 -1
- package/dist/components/biz/basics/fullscreen-feed/index.mjs +1 -1
- package/dist/components/biz/basics/fullscreen-feed/runtime/client.mjs +1 -1
- package/dist/components/biz/basics/fullscreen-feed/runtime/post-slide.mjs +1 -1
- package/dist/components/biz/basics/fullscreen-feed/runtime/use-mixed-feed-controller.mjs +1 -1
- package/dist/components/biz/basics/fullscreen-feed/runtime/use-series-feed-controller.mjs +1 -1
- package/dist/components/biz/basics/fullscreen-feed/runtime/user-action.mjs +1 -1
- package/dist/components/biz/basics/logo/variants/basic-logo/runtime/client.mjs +1 -1
- package/dist/components/biz/basics/search/shared/components/search-box.mjs +1 -1
- package/dist/components/biz/basics/search/variants/simple-search/runtime/client.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.d.mts +0 -2
- package/dist/components/biz/business/banner/variants/basic-banner/inspector-schema.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/material.d.mts +0 -1
- package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.mjs +1 -1
- package/dist/components/biz/business/card-grid/variants/card-grid-2x3-infinite/runtime/client.mjs +1 -1
- package/dist/components/biz/business/card-grid/variants/card-grid-3x3-infinite/runtime/client.mjs +1 -1
- package/dist/components/biz/business/channel-list/channel-filter-dialog.mjs +2 -0
- package/dist/components/biz/business/channel-list/client.d.mts +8 -0
- package/dist/components/biz/business/channel-list/client.mjs +2 -0
- package/dist/components/biz/business/channel-list/default-props.mjs +2 -0
- package/dist/components/biz/business/channel-list/material.d.mts +16 -0
- package/dist/components/biz/business/channel-list/material.mjs +2 -0
- package/dist/components/biz/business/channel-list/schema.d.mts +23 -0
- package/dist/components/biz/business/channel-list/schema.mjs +2 -0
- package/dist/components/biz/business/comment/comment-item.mjs +1 -1
- package/dist/components/biz/business/comment/comment-list.mjs +1 -1
- package/dist/components/biz/business/comment/reply-detail.mjs +1 -1
- package/dist/components/biz/business/detail/detail-operate.mjs +1 -1
- package/dist/components/biz/business/detail/materials/registry.d.mts +4 -4
- package/dist/components/biz/business/detail/materials/video-detail-actions/schema.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info/schema.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title/schema.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-info-title-tags-episodes/schema.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-player/schema.d.mts +1 -1
- package/dist/components/biz/business/detail/materials/video-detail-recommend/client.mjs +1 -1
- package/dist/components/biz/business/detail/video-hero.mjs +1 -1
- package/dist/components/biz/business/fullscreen-feed/variants/shared/runtime-compat.mjs +1 -1
- package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -1
- package/dist/components/biz/business/index.d.mts +31 -1
- package/dist/components/biz/business/index.mjs +1 -1
- package/dist/components/biz/business/marquee/client.d.mts +16 -0
- package/dist/components/biz/business/marquee/client.mjs +2 -0
- package/dist/components/biz/business/marquee/index.d.mts +5 -0
- package/dist/components/biz/business/marquee/material.d.mts +24 -0
- package/dist/components/biz/business/marquee/material.mjs +2 -0
- package/dist/components/biz/business/marquee/schema.d.mts +33 -0
- package/dist/components/biz/business/marquee/schema.mjs +2 -0
- package/dist/components/biz/business/marquee/server.d.mts +11 -0
- package/dist/components/biz/business/marquee/server.mjs +2 -0
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/runtime/client.mjs +1 -1
- package/dist/components/biz/business/recommended-users/variants/basic-recommended-users/runtime/client.mjs +1 -1
- package/dist/components/biz/business/search-bar/variants/detail-search-bar/runtime/client.mjs +1 -1
- package/dist/components/biz/business/search-history/use-search-history.mjs +1 -1
- package/dist/components/biz/business/search-history2/client.d.mts +21 -0
- package/dist/components/biz/business/search-history2/client.mjs +2 -0
- package/dist/components/biz/business/search-history2/index.d.mts +5 -0
- package/dist/components/biz/business/search-history2/material.d.mts +15 -0
- package/dist/components/biz/business/search-history2/material.mjs +2 -0
- package/dist/components/biz/business/search-history2/schema.d.mts +21 -0
- package/dist/components/biz/business/search-history2/schema.mjs +2 -0
- package/dist/components/biz/business/search-history2/server.d.mts +11 -0
- package/dist/components/biz/business/search-history2/server.mjs +2 -0
- package/dist/components/biz/business/search-input/client.d.mts +19 -0
- package/dist/components/biz/business/search-input/client.mjs +2 -0
- package/dist/components/biz/business/search-input/index.d.mts +5 -0
- package/dist/components/biz/business/search-input/material.d.mts +14 -0
- package/dist/components/biz/business/search-input/material.mjs +2 -0
- package/dist/components/biz/business/search-input/schema.d.mts +19 -0
- package/dist/components/biz/business/search-input/schema.mjs +2 -0
- package/dist/components/biz/business/search-input/server.d.mts +11 -0
- package/dist/components/biz/business/search-input/server.mjs +2 -0
- package/dist/components/biz/business/shortcut-grid/client.d.mts +2 -2
- package/dist/components/biz/business/shortcut-grid/client.mjs +1 -1
- package/dist/components/biz/business/shortcut-grid/material.d.mts +12 -1
- package/dist/components/biz/business/shortcut-grid/material.mjs +1 -1
- package/dist/components/biz/business/shortcut-grid/schema.d.mts +13 -5
- package/dist/components/biz/business/shortcut-grid/schema.mjs +1 -1
- package/dist/components/biz/business/tab-bar/client.d.mts +13 -0
- package/dist/components/biz/business/tab-bar/client.mjs +2 -0
- package/dist/components/biz/business/tab-bar/index.d.mts +5 -0
- package/dist/components/biz/business/tab-bar/material.d.mts +21 -0
- package/dist/components/biz/business/tab-bar/material.mjs +2 -0
- package/dist/components/biz/business/tab-bar/schema.d.mts +27 -0
- package/dist/components/biz/business/tab-bar/schema.mjs +2 -0
- package/dist/components/biz/business/tab-bar/server.d.mts +11 -0
- package/dist/components/biz/business/tab-bar/server.mjs +2 -0
- package/dist/components/biz/business/text-recommend/client.d.mts +22 -0
- package/dist/components/biz/business/text-recommend/client.mjs +2 -0
- package/dist/components/biz/business/text-recommend/index.d.mts +5 -0
- package/dist/components/biz/business/text-recommend/material.d.mts +15 -0
- package/dist/components/biz/business/text-recommend/material.mjs +2 -0
- package/dist/components/biz/business/text-recommend/schema.d.mts +21 -0
- package/dist/components/biz/business/text-recommend/schema.mjs +2 -0
- package/dist/components/biz/business/text-recommend/server.d.mts +12 -0
- package/dist/components/biz/business/text-recommend/server.mjs +2 -0
- package/dist/components/biz/business/video-horizontal-list/client.d.mts +25 -0
- package/dist/components/biz/business/video-horizontal-list/client.mjs +2 -0
- package/dist/components/biz/business/video-horizontal-list/index.d.mts +5 -0
- package/dist/components/biz/business/video-horizontal-list/material.d.mts +18 -0
- package/dist/components/biz/business/video-horizontal-list/material.mjs +2 -0
- package/dist/components/biz/business/video-horizontal-list/schema.d.mts +21 -0
- package/dist/components/biz/business/video-horizontal-list/schema.mjs +2 -0
- package/dist/components/biz/business/video-horizontal-list/server.d.mts +12 -0
- package/dist/components/biz/business/video-horizontal-list/server.mjs +2 -0
- package/dist/components/biz/example/button/client.mjs +1 -1
- package/dist/components/biz/renderer/renderer.d.mts +1 -1
- package/dist/components/biz/renderer/renderer.mjs +1 -1
- package/dist/components/common/at-element/index.mjs +1 -1
- package/dist/components/common/blocked-dialog/blocked-dialog.mjs +1 -1
- package/dist/components/common/collection-popup/collection-create-modal.mjs +1 -1
- package/dist/components/common/delete-confirm-dialog/delete-confirm-dialog.mjs +1 -1
- package/dist/components/common/funhub-provider/funhub-provider.mjs +1 -1
- package/dist/components/common/header-nav/client.mjs +1 -1
- package/dist/components/common/info-card/card-header.mjs +1 -1
- package/dist/components/common/list/post-list/post-list.mjs +1 -1
- package/dist/components/common/list/user-activity-list/user-activity-list-actions.mjs +1 -1
- package/dist/components/common/list/user-activity-list/user-activity-list-item.mjs +1 -1
- package/dist/components/common/list/video-list/video-list.mjs +1 -1
- package/dist/components/common/popup-video/index.mjs +1 -1
- package/dist/components/common/series-episodes/index.mjs +1 -1
- package/dist/components/common/share-popup/share-popup.mjs +1 -1
- package/dist/components/common/tab-bar/index.mjs +1 -1
- package/dist/components/common/top-nav-bar/client.mjs +1 -1
- package/dist/components/common/video-player/index.mjs +2 -2
- package/dist/components/pages/(follow)/_components/interaction-tabs/index.mjs +1 -1
- package/dist/components/pages/(follow)/_components/user-list/index.mjs +1 -1
- package/dist/components/pages/(follow)/fans/page.mjs +1 -1
- package/dist/components/pages/(follow)/followed/page.mjs +1 -1
- package/dist/components/pages/collection-create/form.mjs +1 -1
- package/dist/components/pages/collection-detail/detail.mjs +1 -1
- package/dist/components/pages/feed-series/feed-series-client.mjs +1 -1
- package/dist/components/pages/feed-series/page.mjs +1 -1
- package/dist/components/pages/feedback/_components/feedback-form.mjs +1 -1
- package/dist/components/pages/fullscreen-feed/page.mjs +1 -1
- package/dist/components/pages/home/client.mjs +1 -1
- package/dist/components/pages/login/index.mjs +1 -1
- package/dist/components/pages/post-detail/post-detail-client.mjs +1 -1
- package/dist/components/pages/profile/_components/tabs/collect-tab/client.mjs +1 -1
- package/dist/components/pages/profile/_components/tabs/history-tab/client.mjs +1 -1
- package/dist/components/pages/profile/_components/tabs/like-tab/client.mjs +1 -1
- package/dist/components/pages/profile/_components/tabs/publish-tab/client.mjs +1 -1
- package/dist/components/pages/profile/_components/user-profile-container/client.mjs +1 -1
- package/dist/components/pages/profile/_components/user-profile-header/client.mjs +1 -1
- package/dist/components/pages/publish/components/collection-popup.mjs +1 -1
- package/dist/components/pages/publish/components/collection.mjs +1 -1
- package/dist/components/pages/publish/components/header.mjs +1 -1
- package/dist/components/pages/publish/page-client.mjs +1 -1
- package/dist/components/pages/search/hot-recommend.mjs +1 -1
- package/dist/components/pages/search/page-client.mjs +1 -1
- package/dist/components/pages/search/search-result/search-video-info.mjs +1 -1
- package/dist/components/pages/search/top-header.mjs +1 -1
- package/dist/components/pages/settings/_components/settings.mjs +1 -1
- package/dist/components/pages/user-follow/page.mjs +1 -1
- package/dist/components/pages/video-detail/page.mjs +1 -1
- package/dist/components/pages/video-detail/video-detail-client.mjs +1 -1
- package/dist/components/pages/video-list/video-list-client.mjs +1 -1
- package/dist/components/ui/image.d.mts +4 -4
- package/dist/hooks/use-content-operate.mjs +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/i18n/locales/en.mjs +1 -1
- package/dist/i18n/locales/zh-CN.mjs +1 -1
- package/dist/i18n.d.mts +1 -1
- package/dist/i18n.mjs +1 -1
- package/dist/materials.d.mts +8 -7
- package/dist/materials.mjs +1 -1
- package/dist/utils/schema/material.d.mts +1 -1
- package/dist/utils/share-manager.mjs +1 -1
- package/dist/utils.d.mts +4 -4
- package/dist/utils.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Button as e}from"../../../../../ui/button.mjs";import{useUserStore as t}from"../../../../../../store/modules/user-store.mjs";import{pInteractionBatchClearBrowse as n}from"../../../../../../service/generated/client.mjs";import{Box as r}from"../../../../../ui/box.mjs";import{Checkbox as i}from"../../../../../ui/checkbox.mjs";import{Tabs as a,TabsList as o,TabsTrigger as s}from"../../../../../ui/tabs.mjs";import{Text as c}from"../../../../../ui/text.mjs";import{
|
|
2
|
+
"use client";import{Button as e}from"../../../../../ui/button.mjs";import{useUserStore as t}from"../../../../../../store/modules/user-store.mjs";import{pInteractionBatchClearBrowse as n}from"../../../../../../service/generated/client.mjs";import{Box as r}from"../../../../../ui/box.mjs";import{Checkbox as i}from"../../../../../ui/checkbox.mjs";import{Tabs as a,TabsList as o,TabsTrigger as s}from"../../../../../ui/tabs.mjs";import{Text as c}from"../../../../../ui/text.mjs";import{useAppContext as ee}from"../../../../../../hooks/use-app-context/index.mjs";import{useMutation as te,usePaginated as l,useUpdateRequest as u}from"../../../../../../hooks/query/use-query.mjs";import{PostList as d}from"../../../../../common/list/post-list/post-list.mjs";import{VideoList as f}from"../../../../../common/list/video-list/video-list.mjs";import{getHistoryData as p,likeContentType as m}from"../../../utils.mjs";import{useEffect as h,useMemo as ne,useState as g}from"react";import{jsx as _,jsxs as v}from"react/jsx-runtime";import{toast as y}from"sonner";import{useTranslations as b}from"next-intl";import{parseAsString as x,useQueryState as S}from"nuqs";function C(e){let{detail:t}=e,{info:n,publish_time:r}=t;return{id:e.id,title:n.title||n.text||``,coverImage:n.cover_image_thumbnail||n.cover_image||n.cover_horizontal_image_thumbnail||void 0,publishTime:r}}function w(e){let{detail:t,content_play_progress:n}=e,{user_info:r,info:i,statics_cnt:a,publish_time:o,parent_content_info:s}=t;return{is_more_link:i.is_more_link,id:e.id,title:i.title||i.text||i.name||``,coverImage:i.cover_image_thumbnail||i.cover_image||i.cover_horizontal_image_thumbnail||``,duration:Number(i.video_duration??0),progress:n?.percent??0,seriesNum:n?.series_num,authorName:r.name,viewCount:i?.play_count??a?.browse_cnt??0,publishTime:o,type:s?.type}}function T(e,t,n){if(!e)return e;let r=0,i=e.pages.map(e=>({page:e,filteredList:(e.data?.list??[]).filter(e=>{let i=n(e)??``,a=t.has(i);return a&&(r+=1),!a})}));return{...e,pages:i.map(({page:e,filteredList:t})=>{if(!e.data)return e;let n=typeof e.data.total==`number`?Math.max(0,e.data.total-r):e.data.total;return{...e,data:{...e.data,list:t,total:n}}})}}const E=[`video`,`post`];function D({targetUserId:D,queryKeyPrefix:O}){let k=b(`components.pages.profile.components.tabs`),A=ee()===`renderer`,j=O??[],[M,N]=S(`historyTab`,x.withDefault(`video`)),P=ne(()=>E.includes(M)?M:`video`,[M]),[F,I]=g(!1),[L,R]=g(()=>new Set),z=t(e=>e.userId),B=u(),V=[...j,`user-history-video`],H=[...j,`user-history-post`],U=l({key:V,initialPageParam:1,async queryFn(e){return p({targetUserId:D,page:e,contentType:m.video})},options:{staleTime:0,enabled:A},getNextPageParam(e,t){if(!((e?.data?.list??[]).length===0||e?.data?.total===0))return t.length+1}}),W=l({key:H,initialPageParam:1,async queryFn(e){return p({targetUserId:D,page:e,contentType:m.post})},options:{staleTime:0,enabled:A},getNextPageParam(e,t){if(!((e?.data?.list??[]).length===0||e?.data?.total===0))return t.length+1}}),G=P===`video`?U:W,K=U.data?.pages.flatMap(e=>(e.data?.list??[]).map(w))??[],q=W.data?.pages.flatMap(e=>(e.data?.list??[]).map(C))??[],J=P===`video`?K:q,Y=new Set(J.map(e=>e.id)),X=P===`video`,{mutateAsync:re,isPending:Z}=te(async e=>await n({app_id:0,user_id:z,content_type:e.contentType,content_ids:e.contentIds})),ie=()=>{I(!F),R(new Set)};h(()=>{R(new Set)},[P]),h(()=>{M!==P&&N(P)},[P,M,N]);let Q=e=>{R(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},ae=()=>{L.size===Y.size&&Y.size>0?R(new Set):R(new Set(Y))},oe=async()=>{if(!(L.size===0||Z)){if(!z){y.error(k(`historyTab.pleaseLogin`));return}try{let e=Array.from(L),t=await re({contentIds:e,contentType:X?1:2});if(t.code===0){y.success(k(`historyTab.historyDeletedSuccess`));let t=new Set(e);B(X?V:H,e=>T(e,t,e=>e.id)),R(new Set),I(!1)}else y.error(t.message||k(`historyTab.deleteFailed`))}catch(e){console.error(`删除浏览记录失败`,e),y.error(k(`historyTab.operationFailed`))}}},$=async()=>{A&&await G.fetchNextPage()};return v(r,{children:[v(r,{className:`flex justify-between items-center`,children:[_(a,{value:P,onValueChange:e=>{N(e)},children:v(o,{variant:`tag`,children:[_(s,{value:`video`,className:`text-sm`,children:k(`historyTab.video`)}),_(s,{value:`post`,className:`text-sm`,children:k(`historyTab.posts`)})]})}),_(`button`,{onClick:ie,className:`text-sm text-text3`,children:k(F?`historyTab.cancel`:`historyTab.edit`)})]}),_(r,{className:`pt-2`,children:P===`video`?_(f,{showVideoProgress:!0,list:K,loading:G.isFetching,hasMore:G.hasNextPage??!1,loadMore:$,isEditMode:F,selectedIds:L,onToggleSelection:Q}):_(d,{list:q,loading:G.isFetching,hasMore:G.hasNextPage??!1,loadMore:$,isEditMode:F,selectedIds:L,onToggleSelection:Q})}),F&&v(r,{style:{bottom:`calc(56px + env(safe-area-inset-bottom, 0px))`},className:`flex fixed z-10 left-0 w-full items-center justify-between px-3 py-2 bg-bg1 `,children:[v(r,{className:`flex items-center gap-2`,children:[_(i,{checked:L.size===Y.size&&Y.size>0,onCheckedChange:ae}),_(c,{className:`text-sm text-text1`,children:k(`historyTab.selectAll`)})]}),_(e,{className:`rounded-full py-2.5 h-auto px-6.5`,variant:L.size>0?`default`:`outline`,disabled:L.size===0||Z,onClick:oe,children:k(Z?`historyTab.processing`:`historyTab.delete`)})]})]})}export{D as HistoryTab};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Button as e}from"../../../../../ui/button.mjs";import{useUserStore as t}from"../../../../../../store/modules/user-store.mjs";import{pInteractionUnifiedBatchLikeDislike as n}from"../../../../../../service/generated/client.mjs";import{Box as r}from"../../../../../ui/box.mjs";import{Checkbox as i}from"../../../../../ui/checkbox.mjs";import{Tabs as a,TabsList as o,TabsTrigger as s}from"../../../../../ui/tabs.mjs";import{Text as c}from"../../../../../ui/text.mjs";import{
|
|
2
|
+
"use client";import{Button as e}from"../../../../../ui/button.mjs";import{useUserStore as t}from"../../../../../../store/modules/user-store.mjs";import{pInteractionUnifiedBatchLikeDislike as n}from"../../../../../../service/generated/client.mjs";import{Box as r}from"../../../../../ui/box.mjs";import{Checkbox as i}from"../../../../../ui/checkbox.mjs";import{Tabs as a,TabsList as o,TabsTrigger as s}from"../../../../../ui/tabs.mjs";import{Text as c}from"../../../../../ui/text.mjs";import{useAppContext as l}from"../../../../../../hooks/use-app-context/index.mjs";import{useMutation as u,usePaginated as d,useUpdateRequest as f}from"../../../../../../hooks/query/use-query.mjs";import{PostList as p}from"../../../../../common/list/post-list/post-list.mjs";import{VideoList as m}from"../../../../../common/list/video-list/video-list.mjs";import{getLikeData as h,likeContentType as g}from"../../../utils.mjs";import{useEffect as _,useMemo as v,useState as y}from"react";import{jsx as b,jsxs as x}from"react/jsx-runtime";import{toast as S}from"sonner";import{useTranslations as C}from"next-intl";import{parseAsString as ee,useQueryState as te}from"nuqs";function ne(e,t,n){if(!e)return e;let r=0,i=e.pages.map(e=>({page:e,filteredList:(e.data?.list??[]).filter(e=>{let i=n(e)??``,a=t.has(i);return a&&(r+=1),!a})}));return{...e,pages:i.map(({page:e,filteredList:t})=>{if(!e.data)return e;let n=typeof e.data.total==`number`?Math.max(0,e.data.total-r):e.data.total;return{...e,data:{...e.data,list:t,total:n}}})}}function re(e){let{detail:t}=e,{info:n,publish_time:r}=t;return{id:e.id,title:n?.name||n?.text||n?.content||``,coverImage:n?.cover_image_thumbnail||n?.cover_image||n?.cover_horizontal_image_thumbnail||``,publishTime:r??0}}function w(e){let{detail:t}=e,{user_info:n,info:r,statics_cnt:i,publish_time:a,parent_content_info:o}=t;return{id:e.id,is_more_link:r?.is_more_link||!1,title:r?.name||r?.text||r?.content||``,coverImage:r?.cover_image_thumbnail||r?.cover_image||r?.cover_horizontal_image_thumbnail||``,duration:Number(r?.video_duration??0),progress:e.content_play_progress?.percent??0,seriesNum:e.content_play_progress?.series_num,authorName:n?.name||``,viewCount:r?.play_count??i?.browse_cnt??0,publishTime:a??0,type:o?.type}}const T=[`video`,`post`];function E({targetUserId:E,queryKeyPrefix:D,isMine:O=!1}){let k=C(`components.pages.profile.components.tabs`),A=l()===`renderer`,j=D??[],[M,N]=te(`likeTab`,ee.withDefault(`video`)),P=v(()=>T.includes(M)?M:`video`,[M]),[F,I]=y(!1),[L,R]=y(()=>new Set),z=t(e=>e.userId),B=f(),V=[...j,`user-like-video`],H=[...j,`user-like-post`],U=d({key:V,initialPageParam:1,async queryFn(e){return h({targetUserId:E,page:e,contentType:g.video})},options:{staleTime:0,enabled:A},getNextPageParam(e,t){if(typeof e?.data?.has_more==`boolean`)return e.data.has_more?t.length+1:void 0;if(!((e?.data?.list??[]).length===0||e?.data?.total===0))return t.length+1}}),W=d({key:H,options:{staleTime:0,enabled:A},initialPageParam:1,async queryFn(e){return h({targetUserId:E,page:e,contentType:g.post})},getNextPageParam(e,t){if(typeof e?.data?.has_more==`boolean`)return e.data.has_more?t.length+1:void 0;if(!((e?.data?.list??[]).length===0||e?.data?.total===0))return t.length+1}}),G=P===`video`?U:W,K=U.data?.pages.flatMap(e=>(e.data?.list??[]).map(w))??[],q=W.data?.pages.flatMap(e=>(e.data?.list??[]).map(re))??[],J=P===`video`?K:q,Y=new Set(J.map(e=>e.id)),X=P===`video`,{mutateAsync:ie,isPending:Z}=u(async e=>await n({app_id:0,user_id:z,action:`cancel_like`,content_ids:e,content_type:X?1:2})),ae=()=>{I(!F),R(new Set)};_(()=>{R(new Set)},[P]),_(()=>{M!==P&&N(P)},[P,M,N]);let Q=e=>{R(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},oe=()=>{L.size===Y.size&&Y.size>0?R(new Set):R(new Set(Y))},se=async()=>{if(!(L.size===0||Z)){if(!z){S.error(k(`likeTab.pleaseLogin`));return}try{let e=Array.from(L),t=await ie(e);if(t.code===0){S.success(k(`likeTab.unlikedSuccess`));let t=new Set(e);B(X?V:H,e=>ne(e,t,e=>e.id)),R(new Set),I(!1)}else S.error(t.message||k(`likeTab.unlikeFailed`))}catch(e){console.error(`取消点赞失败`,e),S.error(k(`likeTab.operationFailed`))}}},$=async()=>{A&&await G.fetchNextPage()};return x(r,{children:[x(r,{className:`flex justify-between items-center`,children:[b(a,{value:P,onValueChange:e=>{N(e)},children:x(o,{variant:`tag`,children:[b(s,{value:`video`,className:`text-sm`,children:k(`likeTab.video`)}),b(s,{value:`post`,className:`text-sm`,children:k(`likeTab.posts`)})]})}),O&&b(`button`,{onClick:ae,className:`text-sm text-text3`,children:k(F?`likeTab.cancel`:`likeTab.edit`)})]}),b(r,{className:`pt-2`,children:P===`video`?b(m,{list:K,loading:G.isFetching,hasMore:G.hasNextPage??!1,loadMore:$,isEditMode:F,selectedIds:L,showVideoProgress:!1,onToggleSelection:Q}):b(p,{list:q,loading:G.isFetching,hasMore:G.hasNextPage??!1,loadMore:$,isEditMode:F,selectedIds:L,onToggleSelection:Q})}),F&&x(r,{style:{bottom:`calc(56px + env(safe-area-inset-bottom, 0px))`},className:`flex fixed z-10 left-0 w-full items-center justify-between px-3 py-2 bg-bg1 `,children:[x(r,{className:`flex items-center gap-2`,children:[b(i,{checked:L.size===Y.size&&Y.size>0,onCheckedChange:oe}),b(c,{className:`text-sm text-text1`,children:k(`likeTab.selectAll`)})]}),b(e,{className:`rounded-full py-2.5 h-auto px-6.5`,variant:L.size>0?`default`:`outline`,disabled:L.size===0||Z,onClick:se,children:k(Z?`likeTab.processing`:`likeTab.delete`)})]})]})}export{E as LikeTab};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{pCommunityDeleteContent as e}from"../../../../../../service/generated/client.mjs";import{
|
|
2
|
+
"use client";import{pCommunityDeleteContent as e}from"../../../../../../service/generated/client.mjs";import{DeleteConfirmDialog as t}from"../../../../../common/delete-confirm-dialog/delete-confirm-dialog.mjs";import{useAppContext as n}from"../../../../../../hooks/use-app-context/index.mjs";import{useDeleteRequest as r,useMutation as i,usePaginated as a,useUpdateRequest as o}from"../../../../../../hooks/query/use-query.mjs";import{UserActivityList as s}from"../../../../../common/list/user-activity-list/user-activity-list.mjs";import{getPublishData as c}from"../../../utils.mjs";import{useState as l}from"react";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";import{toast as p}from"sonner";import{useTranslations as m}from"next-intl";function h(e,t,n){if(!e)return e;let r=0,i=e.pages.map(e=>({page:e,filteredList:(e.data?.list??[]).filter(e=>{let i=n(e)??``,a=t.has(i);return a&&(r+=1),!a})}));return{...e,pages:i.map(({page:e,filteredList:t})=>{if(!e.data)return e;let n=typeof e.data.total==`number`?Math.max(0,e.data.total-r):e.data.total;return{...e,data:{...e.data,list:t,total:n}}})}}function g({targetUserId:g,queryKeyPrefix:_,isMine:v=!1}){let y=m(`components.pages.profile.components.tabs`),b=n()===`renderer`,x=_??[],S=r(),C=o(),[w,T]=l(null),{mutateAsync:E,isPending:D}=i(async t=>await e({content_id:t})),{data:O,isFetching:k,fetchNextPage:A,hasNextPage:j}=a({key:[...x,`user-publish`],initialPageParam:1,async queryFn(e){return c({targetUserId:g,page:e})},options:{staleTime:0,enabled:b},getNextPageParam(e,t){let n=e?.data||{},r=n.list||[];if(typeof n.has_more==`boolean`)return n.has_more?t.length+1:void 0;if(!(r.length===0||n.total===0))return t.length+1}}),M=O?.pages.flatMap(e=>(e?.data||{}).list||[])??[];function N(e){T(e)}function P(){T(null)}async function F(){if(!(!w||D))try{await E(w);let e=new Set([w]);C([...x,`user-publish`],t=>h(t,e,e=>e.content_id)),p.success(y(`publishTab.deleteSuccess`)),T(null)}catch(e){console.error(`删除内容失败`,e),p.error(y(`publishTab.deleteFailed`))}}let I=M.map(e=>({...e,isDeleting:D&&w===e.content_id,onDelete:()=>N(e.content_id??``)})),L=async()=>{b&&await A()};function R(){S([...x,`user-publish`]),S(x)}function z(e){console.log(`分享到微信:`,e)}function B(e){console.log(`分享到QQ:`,e)}function V(e){console.log(`分享到朋友圈:`,e)}return f(u,{children:[d(s,{list:I,loading:k,hasMore:j,loadMore:L,canEdit:v,showGroupHeaders:!1,emptyText:y(`publishTab.emptyText`),onActionSuccess:R,onShareWeChat:z,onShareQQ:B,onShareMoments:V}),d(t,{open:!!w,onOpenChange:e=>!e&&P(),onCancel:P,onConfirm:F,isConfirming:D})]})}export{g as PublishTab};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{cn as e}from"../../../../../utils/cn.mjs";import{useUserStore as t}from"../../../../../store/modules/user-store.mjs";import{Box as n}from"../../../../ui/box.mjs";import{useLoginModalStore as r}from"../../../../../store/modules/login-modal-store.mjs";import{useEffect as
|
|
2
|
+
"use client";import{cn as e}from"../../../../../utils/cn.mjs";import{useUserStore as t}from"../../../../../store/modules/user-store.mjs";import{Box as n}from"../../../../ui/box.mjs";import{useLoginModalStore as r}from"../../../../../store/modules/login-modal-store.mjs";import{useRouter as i}from"next/navigation";import{useEffect as a,useMemo as o,useRef as s}from"react";import{jsx as c}from"react/jsx-runtime";import{parseAsString as l,useQueryState as u}from"nuqs";function d({id:d,cookieUserId:f,className:p,children:m}){let h=i(),g=s(null),_=s(!1),v=r(e=>e.isOpen),y=t(e=>e.isLogin),b=t(e=>e.userId),x=y&&!!b,S=b||f,C=d==null||!!d&&!!b&&d===b,w=C?S:d?String(d):void 0,[T]=u(`tab`,l.withDefault(`collect`)),E=o(()=>{let e=C?[`collect`,`publish`,`like`,`history`]:[`collect`,`publish`,`like`];return T&&e.includes(T)?T:e[0]},[C,T]),D=o(()=>`profile-scroll:${w||(C?`mine`:`guest`)}:${E}`,[C,E,w]);return a(()=>{if(v&&!x){_.current=!0;return}!v&&_.current&&(_.current=!1,x&&h.refresh())},[x,v,h]),a(()=>{if(typeof window>`u`)return;let e=g.current;if(!e)return;let t=window.sessionStorage.getItem(D),n=t?Number(t):0;Number.isFinite(n)&&n>0&&requestAnimationFrame(()=>{e.scrollTo({top:n})})},[D]),a(()=>{if(typeof window>`u`)return;let e=g.current;if(!e)return;let t=!1,n=()=>{t||(t=!0,requestAnimationFrame(()=>{window.sessionStorage.setItem(D,String(e.scrollTop)),t=!1}))};return e.addEventListener(`scroll`,n,{passive:!0}),()=>{e.removeEventListener(`scroll`,n)}},[D]),c(n,{ref:g,className:e(`profile-container w-full bg-bg1 flex flex-col h-full overflow-y-auto`,p),children:m})}export{d as UserProfileContainer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{cn as e}from"../../../../../utils/cn.mjs";import{Button as t}from"../../../../ui/button.mjs";import{useUserStore as n}from"../../../../../store/modules/user-store.mjs";import{gUserGetUserInfo as r,gUserViewUserInfo as i,pInteractionFollow as a,pInteractionUnfollow as o}from"../../../../../service/generated/client.mjs";import{Box as s}from"../../../../ui/box.mjs";import{Skeleton as c}from"../../../../ui/skeleton.mjs";import{Text as l}from"../../../../ui/text.mjs";import{
|
|
2
|
+
"use client";import{cn as e}from"../../../../../utils/cn.mjs";import{Button as t}from"../../../../ui/button.mjs";import{useUserStore as n}from"../../../../../store/modules/user-store.mjs";import{gUserGetUserInfo as r,gUserViewUserInfo as i,pInteractionFollow as a,pInteractionUnfollow as o}from"../../../../../service/generated/client.mjs";import{Box as s}from"../../../../ui/box.mjs";import{Skeleton as c}from"../../../../ui/skeleton.mjs";import{Text as l}from"../../../../ui/text.mjs";import{useAppContext as u}from"../../../../../hooks/use-app-context/index.mjs";import{useLoginModalStore as d}from"../../../../../store/modules/login-modal-store.mjs";import{useDeleteRequest as f,useMutation as p,useRequest as m,useUpdateRequest as h}from"../../../../../hooks/query/use-query.mjs";import{LeftArrowIcon as g}from"../../../../common/icons/left-arrow.mjs";import{SettingIcon as _}from"../../../../common/icons/setting.mjs";import{UserProfileAvatar as v}from"./user-profile-avatar.mjs";import{UserProfileCoverBackground as y}from"./user-profile-cover-background.mjs";import{useRouter as b}from"next/navigation";import{useMemo as ee}from"react";import{jsx as x,jsxs as S}from"react/jsx-runtime";import{toast as C}from"sonner";import{useTranslations as w}from"next-intl";import T from"next/link";const E=`https://guadd-sg-ccs-sing-dev.s3.ap-southeast-1.amazonaws.com/default/default_avatar.png`,D=`/images/mine/img_mine_head_bg.png`;function O({userId:e,currentUserId:n,isFollowing:r}){let i=w(`components.pages.profile`),{open:s}=d(),c=f(),l=h(),{mutateAsync:u,isPending:m}=p(async e=>a(e)),{mutateAsync:g,isPending:_}=p(async e=>o(e)),v=m||_;async function y(){if(!v){if(!n){s();return}try{if(r){let t=await g({app_id:0,follower_id:n,followee_id:e});t.code===0?(C.success(i(`client.unfollowSuccess`)),b(!1),c([`check-follow`,e]),c([`user-profile`,`profile`,e])):C.error(t.message||i(`client.unfollowFailed`))}else{let t=await u({app_id:0,follower_id:n,followee_id:e});t.code===0?(C.success(i(`client.followSuccess`)),b(!0),c([`check-follow`,e]),c([`user-profile`,`profile`,e])):C.error(t.message||i(`client.followFailed`))}}catch(e){console.error(`关注操作失败`,e),C.error(i(`client.operationFailed`))}}}function b(t){l([`user-profile`,`profile`,e],e=>!e||!e.data?e:{...e,data:{...e.data,is_following:t}})}return x(t,{variant:r?`outline`:`default`,className:`rounded-full disabled:opacity-100`,onClick:y,disabled:v,children:i(v?`client.processing`:r?`client.followed`:`client.follow`)})}function te({showBackButton:t=!0,className:n}){return S(s,{className:e(`flex flex-col relative`,n),children:[S(s,{className:`absolute top-0 p-3 z-10 flex items-center justify-between w-full`,children:[x(c,{className:e(`w-4 h-4 rounded-sm bg-muted`,{invisible:!t})}),x(c,{className:`w-4 h-4 rounded-sm bg-muted`})]}),x(s,{className:`h-33.75`,children:x(c,{className:`h-full w-full rounded-none bg-white/10`})}),S(s,{className:`flex-1 px-3`,children:[S(s,{className:`relative flex justify-end`,children:[x(c,{className:`!absolute bottom-3 left-0 w-22 h-22 rounded-full animate-none`}),S(s,{className:`flex divide-x divide-text1/5 py-4`,children:[S(s,{className:`px-4 flex flex-col items-center gap-1`,children:[x(c,{className:`w-8 h-4`}),x(c,{className:`w-10 h-3`})]}),S(s,{className:`px-4 flex flex-col items-center gap-1`,children:[x(c,{className:`w-8 h-4`}),x(c,{className:`w-10 h-3`})]}),S(s,{className:`px-4 flex flex-col items-center gap-1`,children:[x(c,{className:`w-8 h-4`}),x(c,{className:`w-10 h-3`})]})]})]}),S(s,{className:`flex items-center justify-between gap-1`,children:[x(c,{className:`h-6 w-26`}),x(c,{className:`h-9 w-20 rounded-full`})]}),x(c,{className:`h-4 w-2/3 mt-2`})]})]})}function k({id:a,showBackButton:o=!0,requireLogin:c=!1,cookieUserId:f,isEditorPreview:p=!1,className:h}){let C=w(`components.pages.profile`),k=w(`components.pages.profile.components`),A=u(),j=p||A===`editor`,M=!j,ne=b(),{open:N}=d(),{isLogin:re,userId:P,token:F}=n(),I=P||f,L=P,R=re&&!!P&&!!F,z=a==null||!!a&&!!L&&a===L,ie=!z&&!!a,B=z?[`user-profile`,`mine`]:[`user-profile`,`profile`,a],{data:V}=m(j?[`editor-preview`,...B]:B,()=>a?i({target_user_id:a,user_id:I||a}):r({user_id:a||I||``}),{staleTime:0,enabled:M&&(!!a||!!I)}),H=ee(()=>{let e=V?V.data:void 0;return e?{userId:e.user_id,isFollowing:e.is_following||!1,name:e.nick_name||`User${a??``}`,avatar:e.avatar||E,followingCnt:e.following_count??0,followersCnt:e.follower_count??0,likeCnt:e.like_count??0,signature:e.signature||``,background:e.bg_image||D}:{}},[a,V]),U=c&&z&&!R,W=!R&&ie,G=z&&R&&!U,K=!R,q={name:C(`client.welcomeToPlanet`),description:C(`client.exploreAdventures`),avatar:E,followingCnt:0,followersCnt:0,likeCnt:0,background:D};function J(){N()}function ae(){ne.back()}function Y(e){!z||R||(e.preventDefault(),e.stopPropagation(),N())}let oe=U?x(t,{className:`rounded-full`,size:`lg`,onClick:J,children:C(`client.loginNow`)}):W?x(t,{className:`rounded-full`,size:`lg`,onClick:J,children:C(`client.follow`)}):R?z?x(T,{href:`/edit`,children:x(t,{variant:`outline`,className:`rounded-full`,children:C(`client.editProfile`)})}):x(O,{userId:a||``,currentUserId:I,isFollowing:H?.isFollowing}):x(t,{className:`rounded-full`,size:`lg`,onClick:J,children:C(`client.loginNow`)}),X=U?q:H,Z=X.name||``,Q=X.description||X.signature||``,$=X.followingCnt??0,se=X.followersCnt??0,ce=X.likeCnt??0,le=X.avatar||``;return j?x(te,{showBackButton:o,className:h}):S(s,{className:e(`flex flex-col relative`,h),children:[S(s,{className:`absolute top-0 p-3 z-10 flex items-center justify-between w-full`,children:[x(`button`,{onClick:ae,className:e({invisible:!o}),children:x(g,{className:`w-4 h-4`})}),x(T,{href:`/settings`,className:e({invisible:!z}),children:x(_,{})})]}),x(y,{isMine:G,src:X.background,onUnauthorizedClick:K?J:void 0}),S(s,{className:`flex-1 px-3`,children:[S(s,{className:`relative flex justify-end`,children:[x(v,{isMine:G,src:le,alt:Z||`avatar`,onUnauthorizedClick:K?J:void 0}),S(s,{className:`flex divide-x divide-text1/5 py-4`,children:[x(T,{href:z?`/followed`:`/followed?user_id=${X.userId}`,onClick:Y,children:S(s,{className:`px-4 flex flex-col items-center`,children:[x(l,{className:`font-bold text-base`,children:$}),x(l,{className:`font-normal text-sm text-text1/66`,children:k(`userProfileHeader.follow`)})]})}),x(T,{href:z?`/fans`:`/fans?user_id=${X.userId}`,onClick:Y,children:S(s,{className:`px-4 flex flex-col items-center`,children:[x(l,{className:`font-bold text-base`,children:se}),x(l,{className:`font-normal text-sm text-text1/66`,children:k(`userProfileHeader.fans`)})]})}),S(s,{className:`px-4 flex flex-col items-center`,children:[x(l,{className:`font-bold text-base`,children:ce}),x(l,{className:`font-normal text-sm text-text1/66`,children:k(`userProfileHeader.likesReceived`)})]})]})]}),S(s,{className:`flex items-center justify-between gap-1`,children:[x(l,{as:`p`,className:`text-text1 text-xl line-clamp-2 font-bold`,children:Z}),oe]}),Q&&x(l,{as:`p`,className:`text-sm py-1 line-clamp-3 text-text1/66`,children:Q})]})]})}export{k as UserProfileHeaderClient};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{gCommunityGetUserCollections as e}from"../../../../service/generated/client.mjs";import{Box as t}from"../../../ui/box.mjs";import{InfiniteScroll as n}from"../../../ui/infinite-scroll.mjs";import{Text as r}from"../../../ui/text.mjs";import{usePaginated as
|
|
2
|
+
"use client";import{gCommunityGetUserCollections as e}from"../../../../service/generated/client.mjs";import{Box as t}from"../../../ui/box.mjs";import{InfiniteScroll as n}from"../../../ui/infinite-scroll.mjs";import{Text as r}from"../../../ui/text.mjs";import i from"../../../ui/popup.mjs";import{usePaginated as a}from"../../../../hooks/query/use-query.mjs";import{CollectionCard as o}from"./collection-card.mjs";import s from"../../../../assets/icons/publish/publish_add.mjs";import{useMemo as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{useTranslations as d}from"next-intl";function f({open:f,onOpenChange:p,onSelect:m}){let h=d(`components.pages.publish.components`),{data:g,fetchNextPage:_,hasNextPage:v}=a({key:[`publish`,`collection-list`,`popup`,20],queryFn:t=>e({page:t,page_size:20}),getNextPageParam:(e,t)=>{if(e.data?.data?.has_more)return t.length+1},options:{enabled:f},initialPageParam:1}),y=c(()=>{let e=g?.pages??[],t=[];for(let n of e){let e=n.data?.data?.collections??[];t.push(...e)}return t},[g?.pages]),b=(g?.pages?.length??0)>0;return u(i,{open:f,onOpenChange:p,className:`flex flex-col rounded-t-2xl bg-bg2 text-white`,children:[l(t,{className:`flex justify-center py-[16px]`,children:l(r,{className:`text-text1 text-[18px] font-bold`,children:h(`collectionPopup.syncToCollection`)})}),u(n,{className:`flex-1 overflow-y-auto px-3 h-[70vh]`,hasMore:!!v,loadMore:()=>_().then(()=>void 0),children:[y.map(e=>l(o,{className:`mb-3 w-full`,item:e,onClick:()=>{m(e),p(!1)},rightSlot:l(s,{width:18,height:18})},e.collection_id)),b&&y.length===0&&l(t,{className:`py-10 text-center text-sm text-white/50`,children:h(`collectionPopup.noCollections`)})]})]})}export{f as CollectionPopup};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{gCommunityGetUserCollections as e}from"../../../../service/generated/client.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import r from"../../../ui/legacy/button.mjs";import{useRequest as i}from"../../../../hooks/query/use-query.mjs";import a from"../../../../assets/icons/publish/publish_collection.mjs";import{CollectionCard as o}from"./collection-card.mjs";import{CollectionPopup as s}from"./collection-popup.mjs";import{useMemo as
|
|
2
|
+
"use client";import{gCommunityGetUserCollections as e}from"../../../../service/generated/client.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import r from"../../../ui/legacy/button.mjs";import{useRequest as i}from"../../../../hooks/query/use-query.mjs";import a from"../../../../assets/icons/publish/publish_collection.mjs";import{CollectionCard as o}from"./collection-card.mjs";import{CollectionPopup as s}from"./collection-popup.mjs";import{useRouter as c}from"next/navigation";import{useMemo as l,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{useTranslations as p}from"next-intl";function m({active:m,setActive:h}){let g=p(`components.pages.publish.components`),[_,v]=u([]),[y,b]=u(!1),x=c(),{data:S=[]}=i([`publish`,`collection-list`,`preview`,3],async()=>(await e({page:1,page_size:3})).data?.data?.collections??[]);function C(e){v(t=>t.some(t=>t.collection_id===e.collection_id)?t:[e,...t]),h(e.collection_id??``)}let w=l(()=>{let e=new Set,t=[];for(let n of[..._,...S]){let r=n.collection_id??``;if(!(!r||e.has(r))&&(e.add(r),t.push(n),t.length>=3))break}return t},[_,S]);return f(t,{children:[f(t,{className:`flex justify-between items-center px-[16px] py-[12px]`,children:[d(n,{className:`text-[14px] text-text1`,children:g(`collection.syncToCollection`)}),d(r,{type:`button`,className:`!text-[12px] text-theme5 bg-[rgba(253,76,94,.1)] rounded-[20px] w-[64px] h-[24px] px-[8px] py-[4px]`,onClick:()=>b(!0),children:g(`collection.moreCollections`)})]}),f(t,{className:`flex gap-[8px] px-[16px] pb-[12px] overflow-x-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden`,children:[w.map(e=>d(o,{item:e,active:e.collection_id===m,onClick:()=>h(e.collection_id===m?``:e.collection_id??``)},e.collection_id)),f(r,{className:`flex w-[226px] h-[70px] shrink-0 items-center gap-[12px] rounded-[8px] px-[12px] py-[10px] bg-bg1`,onClick:()=>x.push(`/collection/create?type=publish`),children:[d(a,{width:52,height:52}),d(t,{className:`flex flex-1 flex-col overflow-hidden gap-[4px]`,children:d(n,{className:`text-[14px] text-text2 text-left`,children:g(`collection.createCollection`)})})]})]}),d(s,{open:y,onOpenChange:b,onSelect:C})]})}export{m as Collection};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Button as e}from"../../../ui/button.mjs";import{Box as t}from"../../../ui/box.mjs";import n from"../../../../assets/icons/close.mjs";import{
|
|
2
|
+
"use client";import{Button as e}from"../../../ui/button.mjs";import{Box as t}from"../../../ui/box.mjs";import n from"../../../../assets/icons/close.mjs";import{useRouter as r}from"next/navigation";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{useTranslations as o}from"next-intl";function s({onPublish:s,isEmpty:c}){let l=o(`components.pages.publish.components`),u=r();return a(t,{className:`flex h-[60px] w-full items-center justify-between px-[16px]`,children:[i(e,{type:`button`,className:`p-3 text-text1 bg-transparent`,onClick:()=>u.back(),children:i(n,{className:`h-[16px] w-[16px]`})}),i(e,{className:`h-[32px] rounded-[8px] bg-linear-to-r from-[#FD4C5E] to-[#F05D19] px-[12px] text-[16px] text-white font-normal`,disabled:c,onClick:s,children:l(`header.publish`)})]})}export{s as PublishHeader};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{cn as e}from"../../../utils/cn.mjs";import{AlertDialog as t,AlertDialogAction as n,AlertDialogCancel as r,AlertDialogContent as ee,AlertDialogDescription as te,AlertDialogFooter as ne,AlertDialogHeader as re,AlertDialogTitle as
|
|
2
|
+
"use client";import{cn as e}from"../../../utils/cn.mjs";import{AlertDialog as t,AlertDialogAction as n,AlertDialogCancel as r,AlertDialogContent as ee,AlertDialogDescription as te,AlertDialogFooter as ne,AlertDialogHeader as re,AlertDialogTitle as i}from"../../ui/alert-dialog.mjs";import{getAtUserElement as ie}from"../../../utils/common.mjs";import ae from"../../../utils/event-bus.mjs";import{pCommunityPublishContent as oe}from"../../../service/generated/client.mjs";import{Box as se}from"../../ui/box.mjs";import ce from"../../ui/popup.mjs";import{useKeyboardOpen as a}from"../../../hooks/use-keyboard-open.mjs";import{useMediaPreview as o}from"../../common/media-preview/index.mjs";import{eventKey as s}from"../../../constants/event-key.mjs";import{UploadProgress as c}from"./components/upload-progress.mjs";import{ContactList as l}from"../../biz/business/contact/contact-list.mjs";import{Collection as u}from"./components/collection.mjs";import{MAX_MATERIAL_COUNT as d}from"./constants.mjs";import{filterAtUserNames as le}from"./utils/publish-utils.mjs";import{PublishEditor as ue}from"./components/editor.mjs";import{PublishHeader as de}from"./components/header.mjs";import{MaterialGrid as fe}from"./components/material-grid.mjs";import{Toolbar as pe}from"./components/toolbar.mjs";import{useFileUpload as me}from"./hooks/use-file-upload.mjs";import{useRouter as he}from"next/navigation";import{useCallback as f,useEffect as ge,useMemo as _e,useRef as p,useState as m}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";import{toast as _}from"sonner";import{useTranslations as v}from"next-intl";function y({className:y}={}){let b=v(`components.pages.publish`),ve=he(),x=p(null),[ye,S]=m(!1),[C,w]=m(`0`),{isOpen:T}=a(),[E,D]=m(null),[O,k]=m([]),[A,j]=m(``),[M,N]=m(``),[P,F]=m(``),[I,L]=m(0),[be,R]=m(``),[z,B]=m(``),[xe,V]=m(0),[H,U]=m(``),[W,G]=m([]),[Se,K]=m(!1),[Ce,q]=m(!1),[we,Te]=m(``),J=p(null);ge(()=>()=>{ae.emit(s.WAIT_LOADING_SHOW,{show:!1})},[]);let Y=f(e=>(Te(e),q(!0),new Promise(e=>{J.current=e})),[]),{selectFile:X}=me({onProgressUpdate:(e,t,n,r)=>{D(r>0?{currentFiles:e,totalFiles:t,currentTasks:n,totalTasks:r}:null)}}),Z=f(async()=>{if(A){if(!await Y(b(`pageClient.switchToPostConfirm`)))return;j(``),N(``),F(``),L(0),V(0),R(``),B(``)}if(O.length>=d){_.error(b(`pageClient.maxMaterialCount`));return}let e=await X(`material`,{maxMaterialCount:d-O.length});!e||e.type!==`material`||(e.errors.length>0&&_.error(e.errors.length===1?e.errors[0]:b(`pageClient.uploadFailedCount`,{count:e.errors.length})),e.items.length>0&&k(t=>[...t,...e.items].slice(0,d)))},[Y,O.length,X,B,N,F,k,R,L,V,j,b,A]),Ee=f(async()=>{if(O.length>0){if(!await Y(b(`pageClient.switchToVideoConfirm`)))return;k([])}let e=await X(`video`);!e||e.type!==`video`||(j(e.videoUrl),N(e.coverUrl),F(e.coverUrl),R(e.resolution),B(e.coverImageResolution),L(e.videoDuration),V(e.videoSize))},[Y,O.length,X,B,N,F,k,R,L,V,j,b]);function De(e){S(e)}function Oe(){S(!1)}let Q=_e(()=>(H.trim()===``||H.trim()===`<br>`)&&O.length===0&&!A,[H,O.length,A]),$=o(),ke=f(()=>{$.open(O.map(e=>({src:e.media_url,type:e.is_video?`video`:`image`,cover:e.cover_image})))},[O,$]),Ae=f(e=>{k(t=>t.filter((t,n)=>n!==e))},[k]),je=f(()=>{j(``),N(``),F(``),L(0),V(0),R(``),B(``)},[N,F,B,R,L,V,j]),Me=f(async()=>{let e=await X(`cover`);!e||e.type!==`cover`||(N(e.coverUrl),B(e.coverImageResolution))},[X,B,N]),Ne=f(e=>{S(!1),G(t=>[...t,e]),x.current?.restoreSelection();let t=`${ie(e)} `;x.current?.insertHtml(t)},[G]),Pe=f(()=>{x.current?.saveSelection(),S(!0)},[]);return g(se,{className:e(`relative min-h-screen max-w-full bg-bg2 overflow-hidden flex flex-col`,y),children:[h(de,{onPublish:async()=>{if(!Se){K(!0);try{if(Q){_.error(b(`pageClient.editContentFirst`));return}let e=H;if(e=e.replace(/<br>/g,``),!e&&O.length===0&&!A){_.error(b(`pageClient.editContentFirst`));return}let t=le(e,W),n={content:e,mentioned_users:t,collection_ids:C===`0`?[]:[C]};O.length>0?(n.medias=O.map(e=>(delete e.index,e)),n.type=1):A?(n.medias=[{media_url:A,is_video:!0,cover_image:M,video_resolution:be,cover_image_resolution:z,video_duration:I,video_size:xe}],n.type=2):n.type=3,await oe(n),_.success(b(`pageClient.publishSuccess`)),k([]),j(``),N(``),F(``),L(0),V(0),R(``),B(``),U(``),G([]),w(`0`),ve.back()}catch(e){console.error(e),_.error(b(`pageClient.publishFailed`))}finally{K(!1)}}},isEmpty:Q}),h(ue,{ref:x,content:H,onContentChange:U,atUsers:W,onAtUsersChange:G}),E&&h(c,{currentFiles:E.currentFiles,totalFiles:E.totalFiles,currentTasks:E.currentTasks,totalTasks:E.totalTasks}),(O.length>0||A)&&h(fe,{materialList:O,videoUrl:A,videoDuration:I,coverUrl:M,originCoverUrl:P,isKeyboardOpen:T,onMaterialDelete:Ae,onVideoDelete:je,onMaterialAdd:Z,onCoverClick:Me,onPreview:ke}),h(pe,{isKeyboardOpen:T,onMaterialClick:()=>void Z(),onVideoClick:()=>void Ee(),onAtUserClick:Pe}),h(u,{active:C,setActive:w}),h(t,{open:Ce,onOpenChange:e=>{q(e),e||(J.current?.(!1),J.current=null)},children:g(ee,{children:[g(re,{children:[h(i,{children:b(`pageClient.title`)}),h(te,{children:we})]}),g(ne,{children:[h(r,{onClick:()=>{q(!1),J.current?.(!1),J.current=null},children:b(`pageClient.cancel`)}),h(n,{onClick:()=>{q(!1),J.current?.(!0),J.current=null},children:b(`pageClient.resume`)})]})]})}),h(ce,{open:ye,onOpenChange:De,showCloseButton:!1,className:`w-full rounded-[8px] bg-bg2`,children:h(l,{onSelect:Ne,onClose:Oe})})]})}export{y as PublishPageClient};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{gCommunityGetHotContentList as t,gContentGetHotVideoList as n}from"../../../service/generated/client.mjs";import{Image as r}from"../../ui/image.mjs";import{Box as i}from"../../ui/box.mjs";import{Skeleton as a}from"../../ui/skeleton.mjs";import{Text as o}from"../../ui/text.mjs";import{
|
|
2
|
+
"use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{gCommunityGetHotContentList as t,gContentGetHotVideoList as n}from"../../../service/generated/client.mjs";import{Image as r}from"../../ui/image.mjs";import{Box as i}from"../../ui/box.mjs";import{Skeleton as a}from"../../ui/skeleton.mjs";import{Text as o}from"../../ui/text.mjs";import{getPostDetailPagePath as s}from"../../../utils/tools.mjs";import{useRequest as c}from"../../../hooks/query/use-query.mjs";import l from"../../common/at-element/index.mjs";import{useCardDecoration as u}from"../../../hooks/use-card-decoration.mjs";import d from"./style.module.mjs";import f from"../../ui/rate.mjs";import{memo as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{useTranslations as g}from"next-intl";import _ from"next/link";const v=p(({list:e})=>{let t=g(`components.pages.search`),{getCalculationScore:n}=u();return e.length===0?m(i,{className:`w-[324px] h-auto border rounded-[12px] shrink-0 p-[12px]`,style:{background:`linear-gradient( 156deg, rgba(254,201,207,0.5) 0%, rgba(254,201,207,0.1) 100%)`,borderColor:`rgba(255,119,131,0.2)`},children:h(i,{children:[m(o,{className:`leading-[26px] block text-theme5 text-[18px] font-bold`,children:t(`hotRecommend.hotVideosTitle`)}),h(`div`,{className:`flex flex-col gap-[8px]`,children:[m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`})]})]})}):h(i,{className:`w-[324px] h-auto border rounded-[12px] shrink-0 p-[12px]`,style:{background:`linear-gradient( 156deg, rgba(254,201,207,0.5) 0%, rgba(254,201,207,0.1) 100%)`,borderColor:`rgba(255,119,131,0.2)`},children:[m(o,{className:`leading-[26px] block text-theme5 text-[18px] font-bold`,children:t(`hotRecommend.hotVideosTitle`)}),e.map((e,t)=>h(_,{className:`w-full flex items-center justify-between mt-[12px] shrink-0`,href:s({id:e.video_id,contentType:0}),children:[h(i,{className:`w-[76px] h-[102px] rounded-[8px] overflow-hidden relative bg-bg2`,children:[m(r,{src:e.cover||``,fill:!0,alt:e.name||``,objectFit:`cover`}),m(i,{className:`w-[18px] h-[18px] rounded-tl-[8px] rounded-br-[8px] flex items-center justify-center overflow-hidden absolute left-0 top-0 z-[1]`,style:{background:t>2?`linear-gradient( 218deg, #909BB7 0%, #5D7198 100%)`:`linear-gradient( 175deg, #FD4C5E 0%, #F05D19 100%)`},children:m(o,{className:`text-[12px] leading-[12px] text-white`,children:t+1})})]}),h(i,{className:`flex-1 flex flex-col ml-[12px]`,children:[m(o,{className:`leading-[26px] text-text1 text-[18px] font-bold max-w-[200px] line-clamp-1 mb-[4px]`,children:e.name}),h(i,{className:`flex items-center`,style:{transform:`scale(0.6)`,transformOrigin:`left center`},children:[m(f,{allowHalf:!0,value:n({score:String(e.score??0)})}),m(o,{className:`ml-[8px] text-[24px] text-[#F59E0B] font-bold leading-[24px]`,children:e.score?(Number(e.score)/10).toFixed(1):0})]}),m(i,{className:`w-fit mt-[4px] h-[20px] leading-[20px] px-[6px] text-text2 text-[12px] bg-line1 rounded-[4px]`,children:e.cat_name})]})]},String(e.video_id??t)))]})}),y=p(({list:e})=>{let t=g(`components.pages.search`);return e.length===0?h(i,{className:`w-[324px] h-auto border rounded-[12px] shrink-0 p-[12px]`,style:{background:`linear-gradient( 156deg, rgba(153,215,255,0.5) 0%, rgba(153,215,255,0.1) 100%)`,borderColor:`rgba(31,167,255,0.2)`},children:[m(o,{className:`leading-[26px] block text-theme1 text-[18px] font-bold mb-[4px]`,children:t(`hotRecommend.hotPostsTitle`)}),h(`div`,{className:`flex flex-col gap-[8px]`,children:[m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`}),m(a,{className:`w-full h-[28px] mt-[8px]`})]})]}):h(i,{className:`w-[324px] h-auto border rounded-[12px] shrink-0 p-[12px]`,style:{background:`linear-gradient( 156deg, rgba(153,215,255,0.5) 0%, rgba(153,215,255,0.1) 100%)`,borderColor:`rgba(31,167,255,0.2)`},children:[m(o,{className:`leading-[26px] block text-theme1 text-[18px] font-bold mb-[4px]`,children:t(`hotRecommend.hotPostsTitle`)}),e.map((e,t)=>h(_,{className:`w-full h-[48px] mt-[8px] flex items-center`,href:s({id:e.content_id,contentType:1}),children:[h(o,{className:`text-[16px] leading-[24px] font-bold ${t<3?`text-theme1`:`text-text3`}`,children:[t+1,`.`]}),m(o,{className:`ml-[8px] text-[16px] text-text1 leading-[24px] line-clamp-1 max-w-[260px] ${d.hotInfoTitle}`,children:m(l,{text:e.title??``,atUsers:[]})})]},String(e.content_id??t)))]})});function b({isShow:r}){let{userInfo:a}=e(),{data:o}=c([`hotVideo`],()=>n({user_id:a.user_id})),s=o?.data?.hot_video_list??[],{data:l}=c([`hotContent`],()=>t({user_id:a.user_id})),u=l?.data?.hot_content_list??[];return r?h(i,{className:`w-full px-[12px] flex gap-x-[12px] flex-nowrap pb-[24px] ${d.gScrollBoxX}`,children:[m(v,{list:s}),m(y,{list:u})]}):null}export{b as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{updateUrlParams as e}from"../../../utils/common.mjs";import t from"../../../utils/event-bus.mjs";import{useUserStore as n}from"../../../store/modules/user-store.mjs";import{gContentGetRecommendSearchList as r}from"../../../service/generated/client.mjs";import{Text as i}from"../../ui/text.mjs";import{
|
|
2
|
+
"use client";import{updateUrlParams as e}from"../../../utils/common.mjs";import t from"../../../utils/event-bus.mjs";import{useUserStore as n}from"../../../store/modules/user-store.mjs";import{gContentGetRecommendSearchList as r}from"../../../service/generated/client.mjs";import{Text as i}from"../../ui/text.mjs";import{useSearchHistory as a}from"../../biz/business/search-history/use-search-history.mjs";import{SearchHistory as o}from"../../biz/business/search-history/index.mjs";import{useRequest as s}from"../../../hooks/query/use-query.mjs";import{eventKey as c}from"../../../constants/event-key.mjs";import l from"./style.module.mjs";import u from"./hot-recommend.mjs";import d from"./hot-search.mjs";import f from"./search-result/index.mjs";import p from"./top-header.mjs";import{useSearchParams as m}from"next/navigation";import{memo as h,useEffect as g,useMemo as _,useState as v}from"react";import{Fragment as y,jsx as b,jsxs as x}from"react/jsx-runtime";import{useTranslations as S}from"next-intl";const C=[{labelKey:`tabs.all`,value:`all`},{labelKey:`tabs.video`,value:`video`},{labelKey:`tabs.post`,value:`info`},{labelKey:`tabs.user`,value:`user`}],w=h(({searchType:e,onChange:t,tabList:n})=>b(`nav`,{className:`w-full h-[42px] bg-bg1 flex items-center px-[3px] sticky top-[53px] left-0 z-50`,children:n.map(n=>b(i,{className:`h-[30px] rounded-[15px] leading-[30px] px-[9px] text-[16px] bg-transparent transition-all duration-150 ${e===n.value?`text-theme5 !text-[20px] font-bold`:`text-text2`}`,onClick:()=>{e!==n.value&&t(n.value)},children:n.label},n.value))}));function T(){let i=S(`components.pages.search.pageClient`),{userInfo:h}=n(),T=h?.user_id||`guest`,E=m().get(`q`)?.toString()||``,D=E?decodeURIComponent(E):``,{data:O,refetch:k}=s([`hotSearchKey`],()=>r({user_id:T})),A=_(()=>O?.data?.recommend_list??[],[O]),[j,M]=v(D),N=_(()=>C.map(e=>({value:e.value,label:i(e.labelKey)})),[i]),[P,F]=v(D),[I,L]=v(0),[R,z]=v(C[0].value),[,B]=v([]),{history:V,addHistory:H}=a({storageKey:T}),U=_(()=>j.trim()===``?A.length>0||V.length>0||j.trim()===``:!1,[A,j,V]),W=_(()=>j.trim()!==``&&!U,[j,U]);return g(()=>(t.on(c.EXCHANGE_SEARCH_TYPE,z),()=>{t.off(c.EXCHANGE_SEARCH_TYPE,z)}),[z]),x(`div`,{className:`w-full min-h-screen bg-bg1 pb-[12px]`,children:[b(p,{setSearchInputVal:t=>{t!==j&&(B([]),M(t),e({q:t}))},initInputVal:P,initInputVersion:I,addSearchHistory:H}),U&&x(`div`,{className:`w-full pt-[8px]`,children:[V.length>0&&b(o,{className:`!bg-transparent ${l.customSearchHistory}`,storageKey:T,onHistoryClick:e=>{F(e),L(e=>e+1)}}),b(d,{initHotSearchKeywordList:A,onRefreshHotKey:async()=>(await k()).data??{code:0,message:``,data:{recommend_list:[]}},onClick:e=>{F(e.title||``),L(e=>e+1)}})]}),b(u,{isShow:j.trim()===``}),W&&x(y,{children:[b(w,{searchType:R,tabList:N,onChange:e=>{z(e),B([])}}),b(f,{inputVal:j,searchType:R},`${R}-${j}`)]})]})}export{T as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{gContentGetRecommendVideoList as e}from"../../../../service/generated/client.mjs";import{Image as t}from"../../../ui/image.mjs";import{Box as n}from"../../../ui/box.mjs";import{EmptyState as r}from"../../../ui/empty.mjs";import{usePaginated as
|
|
2
|
+
"use client";import{gContentGetRecommendVideoList as e}from"../../../../service/generated/client.mjs";import{Image as t}from"../../../ui/image.mjs";import{Box as n}from"../../../ui/box.mjs";import{EmptyState as r}from"../../../ui/empty.mjs";import{getPostDetailPagePath as i}from"../../../../utils/tools.mjs";import{usePaginated as a,useRefetchQuery as o,useUpdateRequest as s}from"../../../../hooks/query/use-query.mjs";import{UserActivityList as c}from"../../../common/list/user-activity-list/user-activity-list.mjs";import{apiCollectCustom as l}from"../../../../utils/api-collect.mjs";import{VideoListItemSkeleton as u}from"../../../common/skeleton/video-list-item-skeleton.mjs";import{useCardDecoration as d}from"../../../../hooks/use-card-decoration.mjs";import f from"../../../ui/rate.mjs";import{mapRecommendContentToUserActivityItem as p}from"../search-utils.mjs";import{memo as m,useCallback as h,useMemo as g}from"react";import{jsx as _,jsxs as v}from"react/jsx-runtime";import{useTranslations as y}from"next-intl";import b from"next/link";const x=m(()=>_(n,{className:`w-full px-[12px] pt-[12px]`,children:Array.from({length:3}).map((e,t)=>_(u,{},`search-video-skeleton-${t}`))}));x.displayName=`SearchVideoListSkeleton`;const S=m(({item:e})=>{let{getCalculationScore:r}=d();return v(b,{className:`w-full flex items-center justify-between mb-[12px] pb-[12px] border-b border-line1 cursor-pointer px-[12px]`,href:i({id:e.video_id,contentType:0}),onClick:()=>{e.video_id},children:[_(n,{className:`w-[76px] h-[102px] shrink-0 rounded-[8px] overflow-hidden relative bg-bg2`,children:_(t,{src:e.img_y||e.img_x||``,fill:!0,objectFit:`cover`,alt:e.name||``})}),v(n,{className:`flex-1 min-w-0 flex flex-col ml-[12px]`,children:[_(`span`,{className:`leading-[26px] text-text1 text-[18px] font-bold max-w-[200px] line-clamp-1 mb-[4px]`,children:e.name||``}),v(n,{className:`flex items-center`,style:{transform:`scale(0.6)`,transformOrigin:`left center`},children:[_(f,{allowHalf:!0,value:r({score:String(e.score??0)})}),_(`span`,{className:`ml-[8px] text-[24px] text-[#F59E0B] font-bold leading-[24px]`,children:e.score?(Number(e.score)/10).toFixed(1):0})]}),v(n,{className:`w-full mt-[4px] flex items-center shrink-0 pr-[12px]`,children:[_(n,{className:`w-fit h-[20px] leading-[20px] px-[6px] text-text3 text-[12px] bg-line1 rounded-[4px] shrink-0 mr-[10px]`,children:e.group_name}),_(`span`,{className:`text-text2 text-[14px] leading-[22px] flex-1 min-w-0 line-clamp-1`,children:e.description})]})]})]})});S.displayName=`VideoItem`;const C=m(({list:e})=>_(n,{className:`w-full px-[12px] pt-[12px]`,children:e.map((e,t)=>_(S,{item:e},String(e.video_id??t)))}));C.displayName=`VideoList`;const w=m(({list:e,onUpdate:t,onActionSuccess:n})=>{let r=h(n=>{let r=e.findIndex(e=>e.content_id===n.content_id);if(r!==-1){let i=[...e];i[r]=n,t(i)}},[e,t]);return _(c,{list:g(()=>e.map(e=>({...p(e),onLikeSuccess(t){r({...e,like_count:String(t.count),dislike_count:t.dislikeCount===void 0?e.dislike_count:String(t.dislikeCount),interaction:{...e.interaction,is_liked:t.isLiked,is_dislike:t.isDisliked??e.interaction?.is_dislike}})},onDislikeSuccess(t){r({...e,like_count:t.likeCount===void 0?e.like_count:String(t.likeCount),dislike_count:String(t.count),interaction:{...e.interaction,is_dislike:t.isDisliked,is_liked:t.isLiked??e.interaction?.is_liked}})}})),[r,e]),showGroupHeaders:!1,onActionSuccess:n})});w.displayName=`InfoList`;const T=m(({searchType:t,inputVal:i})=>{let l=y(`components.pages.search.searchResult`),u=h(async n=>await e({data_type:2,extra_params:JSON.stringify({type:t===`video`?3:2,keywords:i}),page:n||1,page_size:20}),[i,20,t]),d=g(()=>[`searchByKeyForVideoInfo`,i,t===`video`?3:2],[i,t]),f=a({key:d,initialPageParam:1,async queryFn(e){let n=await u(e);return(t===`video`?n?.data?.videos:n?.data?.contents)??{has_more:!1,total:0,list:[]}},getNextPageParam(e,t){if(e.has_more)return t.length+1}}),m=g(()=>{let e=f.data?.pages??[],t=[];for(let n of e){let e=n.list??[];t.push(...e)}return t},[f.data?.pages]),v=g(()=>m,[m,t]),b=s(),S=o(),w=h(e=>{b(d,t=>{if(!t)return t;let n=t.pages.map(t=>({...t,list:(t.list??[]).map(t=>t.content_id===e.content_id?e:t)}));return{...t,pages:n}})},[d,b]),T=h(()=>{S(d)},[d,S]),E=h(e=>({...p(e),onLikeSuccess(t){w({...e,like_count:String(t.count),dislike_count:t.dislikeCount===void 0?e.dislike_count:String(t.dislikeCount),interaction:{...e.interaction,is_liked:t.isLiked,is_dislike:t.isDisliked??e.interaction?.is_dislike}})},onDislikeSuccess(t){w({...e,like_count:t.likeCount===void 0?e.like_count:String(t.likeCount),dislike_count:String(t.count),interaction:{...e.interaction,is_dislike:t.isDisliked,is_liked:t.isLiked??e.interaction?.is_liked}})}}),[w]),D=g(()=>v.map(E),[E,v]),O=f.isPending||f.isFetching,k=t===`video`&&O&&v.length===0;return _(n,{className:`w-full`,children:t===`video`?k?_(x,{}):v.length>0?_(C,{list:v}):_(r,{type:`no-content`,text:l(`searchVideoInfo.noRelevantContent`),className:`mt-[12px]`}):_(c,{list:D,loading:O,hasMore:f.hasNextPage??!1,loadMore:async e=>{if(e!==!1)try{f&&await f.fetchNextPage()}catch(e){console.error(`获取内容列表失败`,e)}},showGroupHeaders:!1,emptyText:l(`searchVideoInfo.noRelevantContent`),onActionSuccess:T})})});T.displayName=`SearchInfoOrVideoList`;export{C as VideoList,T as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Input as
|
|
2
|
+
"use client";import e from"../../../assets/icons/clear.mjs";import{Input as t}from"../../ui/input.mjs";import n from"../../../assets/icons/search.mjs";import{isPCEnv as r}from"../../../utils/tools.mjs";import{useKeepAliveEffect as i,useKeepAliveState as a}from"../../common/keep-scroll-position/index.mjs";import{HeaderNav as o}from"../../common/header-nav/client.mjs";import s from"./style.module.mjs";import{useSearchParams as c}from"next/navigation";import{memo as l,useCallback as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{useTranslations as p}from"next-intl";const m=l(({setSearchInputVal:l,initInputVal:m,initInputVersion:h,addSearchHistory:g})=>{let _=p(`components.pages.search`),[v,y]=a(`search-input-val`,``),b=c().get(`q`),x=e=>{let t=e.target.value;y(t)},S=u(e=>{l(e),g(e)},[g,l]);return i(()=>{m&&(y(m),S(m))},[m,h],`search-init-input-effect`),i(()=>{b&&(y(b),S(b))},[b],`search-url-params-effect`),d(o,{className:`h-[55px]`,rightChild:d(`div`,{className:`cursor-pointer w-[52px] flex items-center justify-center`,onClick:()=>{v&&S(v)},children:d(`span`,{className:`text-[16px] text-text1`,children:_(`topHeader.search`)})}),centerChild:f(`header`,{className:`w-[calc(100%-52px-48px)] ml-[-15px] h-[35px] rounded-[20px] flex items-center justify-center relative overflow-hidden border-line1 border-[1px]`,children:[d(`div`,{className:`absolute left-0 top-0 w-full h-full bg-bg2 opacity-50`}),d(n,{className:`w-[16px] h-[16px] text-text3 absolute left-[12px] top-[9px] z-[1]`}),d(t,{placeholder:_(`topHeader.placeholder`),maxLength:20,value:v,className:s.searchInput,onChange:x,onKeyDown:e=>{if(e.key===`Enter`){if(e.preventDefault(),!v)return;S(v)}}}),v&&d(e,{className:`w-[15px] h-[15px] text-text3 z-10 absolute right-[12px]`,onClick:()=>{r()||(y(``),l(``))}})]})})});export{m as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{cn as e}from"../../../../utils/cn.mjs";import{Button as t}from"../../../ui/button.mjs";import{AlertDialog as n,AlertDialogAction as r,AlertDialogCancel as i,AlertDialogContent as a,AlertDialogDescription as ee,AlertDialogFooter as o,AlertDialogHeader as s}from"../../../ui/alert-dialog.mjs";import{useUserStore as c}from"../../../../store/modules/user-store.mjs";import{gUserGetUserPrivacySettings as l,pUserUserPrivacySettings as u}from"../../../../service/generated/client.mjs";import{Box as d}from"../../../ui/box.mjs";import{List as f}from"../../../ui/list.mjs";import{Switch as p}from"../../../ui/switch.mjs";import{
|
|
2
|
+
"use client";import{cn as e}from"../../../../utils/cn.mjs";import{Button as t}from"../../../ui/button.mjs";import{AlertDialog as n,AlertDialogAction as r,AlertDialogCancel as i,AlertDialogContent as a,AlertDialogDescription as ee,AlertDialogFooter as o,AlertDialogHeader as s}from"../../../ui/alert-dialog.mjs";import{useUserStore as c}from"../../../../store/modules/user-store.mjs";import{gUserGetUserPrivacySettings as l,pUserUserPrivacySettings as u}from"../../../../service/generated/client.mjs";import{Box as d}from"../../../ui/box.mjs";import{List as f}from"../../../ui/list.mjs";import{Switch as p}from"../../../ui/switch.mjs";import{useLoginModalStore as m}from"../../../../store/modules/login-modal-store.mjs";import{locales as h,persistLocalePreference as g}from"../../../../i18n.mjs";import{useDeleteRequest as _,useRequest as v}from"../../../../hooks/query/use-query.mjs";import{HeaderNav as y}from"../../../common/header-nav/client.mjs";import{ResetPasswordDrawer as b}from"./reset-password-drawer.mjs";import{useEffect as x,useRef as S,useState as C}from"react";import{jsx as w,jsxs as T}from"react/jsx-runtime";import{useLocale as te,useTranslations as E}from"next-intl";import ne from"next/link";function D(e){return{collection:Number(e?.collections_open??0)>0,follower:Number(e?.follower_open??0)>0,following:Number(e?.following_open??0)>0,like:Number(e?.like_open??0)>0}}function O(e){return{collections_open:e.collection?1:0,follower_open:e.follower?1:0,following_open:e.following?1:0,like_open:e.like?1:0}}function k({className:k}={}){let A=E(`components.pages.settings.components`),j=te(),{open:M}=m(),N=c(e=>e.isLogin),P=c(e=>e.token),F=c(e=>e.logout),I=c(e=>e.userId),L=(N||!!P)&&!!I,R=D(),[z,B]=C(R),V=S(R),[H,U]=C(!1),[W,G]=C(!1),K=_(),q=[`user-privacy-settings`,I],J=j===`zh-CN`?`en`:`zh-CN`,Y=h.find(e=>e.code===J)?.name||J,{data:X}=v(q,()=>l({user_id:I}),{enabled:!!I}),Z=X?.data;x(()=>{if(!Z)return;let e=D(Z);B(e),V.current=e},[Z]),x(()=>{V.current=z},[z]);async function re(e){let t=await u({user_id:I,...O(e)});if(t.code!==0)throw Error(t.message||`隐私设置更新失败`);K(q)}async function Q(e,t){let n=V.current,r={...n,[e]:t};B(r);try{await re(r)}catch(e){console.error(`update settings failed:`,e),B(n)}}let ie=_();function ae(){ie([`user-profile`,`mine`]),F(),window.location.href=`/user/mine`}function oe(e){G(e)}function se(){G(!0)}function ce(){G(!1)}function le(){G(!1),ae()}function $(e){U(e)}function ue(){if(!L){M();return}U(!0)}function de(e){L||(e.preventDefault(),e.stopPropagation(),M())}function fe(){g(J),window.location.reload()}function pe(e){Q(`collection`,e)}function me(e){Q(`like`,e)}function he(e){Q(`following`,e)}function ge(e){Q(`follower`,e)}return T(d,{className:e(k),children:[w(y,{className:`!bg-bg2`,title:A(`settings.title`)}),w(b,{open:H,onOpenChange:$}),T(d,{className:`flex flex-col gap-2 `,children:[w(f,{className:`bg-bg2 py-2`,children:w(ne,{href:`/feedback`,onClick:de,children:w(f.Item,{title:A(`settings.feedbackTitle`),arrow:!0})})}),w(f,{className:`bg-bg2 py-2`,children:w(f.Item,{title:A(`settings.resetPasswordTitle`),arrow:!0,onClick:ue})}),w(f,{className:`bg-bg2 py-2`,children:w(f.Item,{title:A(`settings.languageTitle`),extra:T(t,{size:`sm`,variant:`outline`,onClick:fe,children:[A(`settings.switchTo`),` `,Y]})})}),L?T(f,{className:`bg-bg2 py-2`,children:[w(f.Item,{title:A(`settings.privacySettingsTitle`),extra:T(`span`,{className:`text-xs`,children:[A(`settings.whenOff`),`,`,A(`settings.listPrivateHint`)]})}),w(f.Item,{className:`pl-8 mt-2`,title:A(`settings.collectionsTitle`),extra:w(p,{checked:z.collection,onCheckedChange:pe})}),w(f.Item,{className:`pl-8`,title:A(`settings.like`),extra:w(p,{checked:z.like,onCheckedChange:me})}),w(f.Item,{className:`pl-8`,title:A(`settings.follow`),extra:w(p,{checked:z.following,onCheckedChange:he})}),w(f.Item,{className:`pl-8`,title:A(`settings.followersTitle`),extra:w(p,{checked:z.follower,onCheckedChange:ge})})]}):null]}),H||!L?null:w(d,{className:`fixed bottom-0 w-full left-0`,children:w(t,{className:`h-auto text-base py-4 w-full`,variant:`secondary`,onClick:se,children:A(`settings.button`)})}),w(n,{open:W,onOpenChange:oe,children:T(a,{size:`sm`,children:[w(s,{children:w(ee,{children:A(`settings.logoutConfirmMessage`)})}),T(o,{children:[w(i,{onClick:ce,children:A(`settings.cancel`)}),w(r,{onClick:le,children:A(`settings.confirm`)})]})]})})]})}export{k as Settings};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{cn as e}from"../../../utils/cn.mjs";import{gContentGetAppChannels as t,gInteractionGetFollowingContentList as n}from"../../../service/generated/client.mjs";import{Box as r}from"../../ui/box.mjs";import{Text as i}from"../../ui/text.mjs";import{
|
|
2
|
+
import{cn as e}from"../../../utils/cn.mjs";import{gContentGetAppChannels as t,gInteractionGetFollowingContentList as n}from"../../../service/generated/client.mjs";import{Box as r}from"../../ui/box.mjs";import{Text as i}from"../../ui/text.mjs";import{defaultLocale as a,isValidLocale as o,resolveLocaleByPriority as s,resolveLocaleFromAcceptLanguage as c}from"../../../i18n.mjs";import{HydrationBoundary as l}from"../../../hooks/query/hydration-boundary.mjs";import{queryKey as u}from"../../../constants/query-key.mjs";import{getTranslator as d}from"../../../i18n/translator.mjs";import{FollowTopHeader as f}from"./_components/follow-top-header.mjs";import{PostTab as p}from"./_components/post-tab.mjs";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{cookies as g,headers as _}from"next/headers";function v(e){return o(e)?e:a}async function y({userId:e,page:t,pageSize:r,authConfig:i}){let a=await n({app_id:0,user_id:e,page:t,page_size:r,content_type:2},i),o=a.data?.post_infos??[];return{data:{list:o,total:a.data?.total??o.length,has_more:!!a.data?.has_more}}}async function b({className:n}={}){let o=await g(),b=await _(),x=o.get(`token`)?.value||``,S=d(v(s(o.get(`NEXT_LOCALE`)?.value,c(b.get(`accept-language`)),a))),C=o.get(`userId`)?.value||``,w=x?{headers:{Authorization:`Bearer ${x}`}}:void 0,T=[],E=[];return E.push({queryKey:[u.CHANNEL],queryFn:()=>t()}),C&&E.push({type:`infinite`,queryKey:[...T,`user-follow-post`,C],initialPageParam:1,async queryFn(e){return y({userId:C,page:e,pageSize:10,authConfig:w})}}),m(l,{prefetch:E,children:h(r,{className:e(`w-full h-full overflow-y-auto `,n),children:[m(f,{}),m(r,{className:`w-full px-[16px] py-[12px] g-scroll-box-x scrollbar-hide flex items-center min-w-max`,children:[{key:`posts`,label:S(`components.pages.userFollow.page.tabs.posts`)}].map(e=>m(r,{className:`h-full px-[9px] shrink-0 flex items-center justify-center`,children:m(i,{className:`leading-[24px] transition-all duration-100 !text-theme5 !text-[20px] font-bold`,children:e.label})},e.key))}),m(r,{className:`w-full bg-bg2`,children:m(p,{queryKeyPrefix:T,cookieUserId:C||void 0})})]})})}export{b as UserFollowPage};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{gContentGetVideoDetail as e}from"../../../service/generated/client.mjs";import{HydrationBoundary as t}from"../../../hooks/query/hydration-boundary.mjs";import{normalizeEpisodeNumber as
|
|
2
|
+
import{gContentGetVideoDetail as e}from"../../../service/generated/client.mjs";import{HydrationBoundary as t}from"../../../hooks/query/hydration-boundary.mjs";import{revalidate as n}from"../../../constants/revalidate.mjs";import{normalizeEpisodeNumber as r,warmupProcessM3u8Auto as i}from"../../common/video-player/process-m3u8-cache.mjs";import{DetailStructuredData as a}from"../../biz/business/detail/detail-structured-data.mjs";import o from"./video-detail-client.mjs";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";async function u({params:u,isWebView:d=!1,materialConfig:f}){let{level:p}=await u,m=p?.[0]||``,h=p.findIndex(e=>e===`episode`),g=r(h>=0?p?.[h+1]:void 0,1),_=null,v=null;if(m){_=await e({id:m},{revalidate:n.TIME});let t=_?.data?.video;t&&typeof t==`object`&&(await i(t.links,g),v={...t,mid:t.mid||t.id||``,content_type:0,episode_cnt:t.links?.length||0})}return l(s,{children:[v&&c(a,{information:v,detailId:m}),c(t,{prefetch:m&&_?[{queryKey:[`video-detail`,m],queryFn:()=>Promise.resolve(_)}]:[],children:c(o,{detailId:m,isWebView:d,materialConfig:f})})]})}export{u as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{getChannelList as e}from"../../biz/utils/helpers/get-channel-list.mjs";import{cn as t}from"../../../utils/cn.mjs";import n from"../../../utils/get-res-url.mjs";import{decryptImageToUint8Array as r}from"../../../utils/decrypt-image-client.mjs";import{gContentGetAppChannels as i,gContentGetVideoDetail as a,pInteractionBrowse as o}from"../../../service/generated/client.mjs";import{uint8ArrayToBase64 as s}from"../../../utils/uint8.mjs";import{EmptyState as c}from"../../ui/empty.mjs";import{useRequest as l}from"../../../hooks/query/use-query.mjs";import{useKeepAliveEffect as u,useKeepAliveState as d}from"../../common/keep-scroll-position/index.mjs";import{apiCollectClick as f}from"../../../utils/api-collect.mjs";import{batchQueryContentInteractions as p}from"../../../hooks/use-content-operate.mjs";import{queryKey as m}from"../../../constants/query-key.mjs";import ee from"../../biz/business/search-bar/variants/detail-search-bar/index.mjs";import{resolveMaterialProps as te,videoDetailMaterials as ne}from"../../biz/business/detail/materials/registry.mjs";import{DetailHero as re}from"../../biz/business/detail/video-hero.mjs";import{
|
|
2
|
+
"use client";import{getChannelList as e}from"../../biz/utils/helpers/get-channel-list.mjs";import{cn as t}from"../../../utils/cn.mjs";import n from"../../../utils/get-res-url.mjs";import{decryptImageToUint8Array as r}from"../../../utils/decrypt-image-client.mjs";import{gContentGetAppChannels as i,gContentGetVideoDetail as a,pInteractionBrowse as o}from"../../../service/generated/client.mjs";import{uint8ArrayToBase64 as s}from"../../../utils/uint8.mjs";import{EmptyState as c}from"../../ui/empty.mjs";import{useRequest as l}from"../../../hooks/query/use-query.mjs";import{useKeepAliveEffect as u,useKeepAliveState as d}from"../../common/keep-scroll-position/index.mjs";import{apiCollectClick as f}from"../../../utils/api-collect.mjs";import{batchQueryContentInteractions as p}from"../../../hooks/use-content-operate.mjs";import{queryKey as m}from"../../../constants/query-key.mjs";import ee from"../../biz/business/search-bar/variants/detail-search-bar/index.mjs";import{resolveMaterialProps as te,videoDetailMaterials as ne}from"../../biz/business/detail/materials/registry.mjs";import{DetailHero as re}from"../../biz/business/detail/video-hero.mjs";import{useParams as h,useSearchParams as g}from"next/navigation";import{Fragment as _,useCallback as v,useEffect as y,useMemo as b}from"react";import{Fragment as x,jsx as S,jsxs as C}from"react/jsx-runtime";import{useTranslations as w}from"next-intl";const T=[{id:`detail-info`,componentName:`video-detail-info`,props:{}},{id:`detail-actions`,componentName:`video-detail-actions`,props:{}},{id:`detail-recommend`,componentName:`video-detail-recommend`,props:{rows:2}}];function E({detailId:f,initialInformation:E,isWebView:D=!1,materialConfig:O}){let k=w(`components.pages.videoDetail`),ie=h(),ae=g(),A=ie.level,j=Array.isArray(A)?A:typeof A==`string`?[A]:[],M=j.findIndex(e=>e===`episode`),N=M>=0?j[M+1]:j[2],P=Math.max(1,Number(N)||1),[F,I]=d(`detail-current-series-num-${f}`,P);y(()=>{I(P)},[f,P,I]);let L=Math.max(0,F-1),{data:R}=l(b(()=>[`video-detail`,f],[f]),async()=>f?await a({id:f}):null,{enabled:!!f}),z=b(()=>{let e=R?.data?.video;return!e||typeof e!=`object`?null:{...e,content_type:1,episode_cnt:e.links?.length||0}},[R?.data?.video]),oe=E??z??null,[B,V]=d(`detail-information-${f}`,oe),H=B?.links?.[L]?.id||``,{data:U,isFetching:W,isFetchedAfterMount:G,isSuccess:K}=l(b(()=>[`detail-interaction`,B?.id,B?.content_type,H,F],[H,F,B?.content_type,B?.id]),async()=>!B?.id||typeof B.content_type!=`number`?null:await p([B.id],1),{enabled:D?!1:!!B?.id,staleTime:0,refetchOnMount:`always`,refetchOnWindowFocus:!1}),se=b(()=>{if(!G||W||!K)return 0;let e=U?.interaction_list?.[0]?.browse_record,t=Number(e?.browse_duration||0);if(!Number.isFinite(t)||t<=0)return 0;let n=String(e?.browse_episode||``).trim();if(!n)return t;let r=Number.parseInt(n,10);return Number.isNaN(r)?0:r===F?t:0},[F,U,G,W,K]),[ce,le]=d(`info-detail-active-tab-${f}`,`video`),[q,J]=d(`info-detail-comment-add-count-${f}`,0),[Y,ue]=d(`info-detail-comment-total-${f}`,void 0),X=v(async e=>{let t=String(f||``).trim();if(!t)return;let n=e.browse_episode||F,r=Date.now(),i=String(e.browse_key||r);try{await o({app_id:0,content_type:1,content_id:t,browse_duration:Number(e.browse_duration||0),browse_episode:String(n),browse_key:i,browse_page_ts:r})}catch(e){console.error(`上报播放进度失败:`,e)}},[F,f]);y(()=>{!B&&z&&V(z),window.video={[f]:B},window.getVideoInfoAsync=async()=>{let e=B?.links?.[L]?.m3u8_url||``,t=e?`${process.env.NEXT_PUBLIC_API_BASE}/api/content/processM3u8?url=${encodeURIComponent(`${n()}/m3f/${e}`)}`:``,i=B?.img_y||B?.img_x||B?.preview_images?.[0]||``,a=``,o=await r(i);return o&&(a=s(o.bytes)),{poster:a,src:t,title:B?.name||``}},window.getVideoBrowseRecordAsync=async()=>{let e=await p([f],1);return e?.interaction_list?.[0]?e.interaction_list[0].browse_record:null},window.reportVideoBrowse=X},[f,L,B,z,V,X]),y(()=>{if(!U?.interaction_list?.[0])return;let e=U.interaction_list[0];V(t=>{if(!t)return t;let n=t.static?.like_cnt,r=typeof n==`number`?n:Number(n||0),i=!!e.is_liked&&r===0;return{...t,like:e.is_liked||!1,dislike:e.is_disliked||!1,collect:e.is_collected||!1,static:i?{...t.static||{},like_cnt:1}:t.static}})},[U,V]);let Z=v(e=>{V(t=>t&&{...t,...e})},[V]);u(()=>{B?.id&&B.id},[B?.id],`detail-page-report-${f}`),y(()=>{!B||typeof window>`u`||window.sensors?.track?.(`detail_page_view`,{object_id:B.id||f,author_id:B.up_user,object_type:B.content_type,object_category:B.content_type,object_tags:B.tags?.map(e=>e.name),block_id:``,page_source:window.location?.pathname||``})},[f,B]),y(()=>{J(0)},[H,J]),b(()=>(typeof Y==`number`?Y:0)+q,[q,Y]);let de=v(()=>{},[!1,le]);v(()=>{J(e=>e+1)},[J]),y(()=>{},[!1,de,B?.id,ae]);let Q=v(e=>{if(D){let t=encodeURIComponent(B?.name||``),n=`/webview/${B?.id}/${t}/episode/${e}`;window.location.href=n}else I(e)},[B?.id,B?.name,D,I]),$=B?.status===`1`,{data:fe}=l([m.CHANNEL],()=>i()),pe=e(fe?.data),me=b(()=>{if(O!==void 0){let e=new Map(T.map(e=>[e.componentName,e]));return O.map(t=>{let n=e.get(t.componentName);return{...n,...t,props:{...n?.props??{},...t.props??{}}}})}return T},[O]),he=v(e=>{if(!B)return null;let t=ne[e.componentName];if(!t)return null;let n=t.clientComponent,r=te(t,e.props);if(!r.isValid)return S(`div`,{children:`组件配置错误`});let i={};return e.componentName.startsWith(`video-detail-info`)&&(i.information=B,i.currentSeriesNum=F,i.onEpisodeChange=Q,i.isShow=!0),e.componentName===`video-detail-actions`&&(i.information=B,i.onUpdate=Z),e.componentName===`video-detail-recommend`&&(i.detailId=f),S(n,{...r.props,...i})},[F,f,Q,Z,B,!0]);return C(`div`,{className:`w-full min-h-screen bg-bg2 text-text1 ${D?``:`pt-11`}`,children:[!D&&S(`div`,{className:`fixed bg-black top-0 left-0 right-0 z-[1000]`,children:S(ee,{data:{list:pe}})}),S(`div`,{className:`mx-auto w-full max-w-[840px] pb-6`,children:C(x,{children:[B&&!$&&S(c,{type:`no-content`,text:k(`videoDetailClient.videoUnavailable`)}),B&&$&&C(x,{children:[!D&&S(re,{isVideo:!0,information:B,episodeIndex:L,resumeProgressSeconds:se}),S(`div`,{id:`selectPopupPosition`,className:`w-full`}),!1,C(`div`,{className:t(`w-full`,!1),children:[me.map(e=>S(_,{children:he(e)},e.id)),!1]}),!1]}),!B&&S(c,{type:`no-content`,text:k(`videoDetailClient.videoDeleted`)})]})})]})}export{E as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Button as e}from"../../ui/button.mjs";import{gContentGetNewstVideoList as t,gContentGetPopularVideoList as n}from"../../../service/generated/client.mjs";import{gContentGetNewstVideoListKey as r,gContentGetPopularVideoListKey as i}from"../../../service/generated/tanstack.mjs";import{Box as a}from"../../ui/box.mjs";import{InfiniteScroll as o}from"../../ui/infinite-scroll.mjs";import{Text as s}from"../../ui/text.mjs";import{usePaginated as c}from"../../../hooks/query/use-query.mjs";import l from"../../../assets/icons/left_arrow.mjs";import{getNextVideoListPageParam as u,resolveNextCursor as d}from"./types.mjs";import{VideoListItemComponent as f}from"./video-list-item.mjs";import{useMemo as
|
|
2
|
+
"use client";import{Button as e}from"../../ui/button.mjs";import{gContentGetNewstVideoList as t,gContentGetPopularVideoList as n}from"../../../service/generated/client.mjs";import{gContentGetNewstVideoListKey as r,gContentGetPopularVideoListKey as i}from"../../../service/generated/tanstack.mjs";import{Box as a}from"../../ui/box.mjs";import{InfiniteScroll as o}from"../../ui/infinite-scroll.mjs";import{Text as s}from"../../ui/text.mjs";import{usePaginated as c}from"../../../hooks/query/use-query.mjs";import l from"../../../assets/icons/left_arrow.mjs";import{getNextVideoListPageParam as u,resolveNextCursor as d}from"./types.mjs";import{VideoListItemComponent as f}from"./video-list-item.mjs";import{useRouter as p}from"next/navigation";import{useMemo as m,useState as h}from"react";import{jsx as g,jsxs as _}from"react/jsx-runtime";import v from"next/link";const y=[];function b({title:b=`列表页`,tags:x=y}){let S=p(),[C,w]=h(`hot`),T={page_size:10,tags:x.length?x:void 0},{data:E,fetchNextPage:D,hasNextPage:O}=c({key:C===`hot`?i(T):r(T),queryFn:async e=>{let r={page_size:10,cursor:e||void 0,tags:x.length?x:void 0},i=(C===`hot`?await n(r):await t(r)).data;return{list:i?.videos??[],nextCursor:d(i)}},getNextPageParam:u,initialPageParam:``}),k=m(()=>E?.pages?.flatMap(e=>e.list)??[],[E?.pages]);function A(){S.back()}let j=m(()=>k.map(e=>{let t=e.id??e.mid??``;return g(v,{href:`/video/${t}/${e.name??``}`,children:g(f,{item:e})},t)}),[k]);return _(a,{as:`main`,className:`h-[100dvh] max-h-[100dvh] flex flex-col bg-bg1 overflow-hidden [overscroll-behavior-y:none]`,children:[_(a,{className:`shrink-0 bg-bg1`,children:[_(a,{as:`header`,className:`flex items-center gap-2 px-4 py-3`,children:[g(l,{className:`w-[16px] h-[16px]`,onClick:A}),g(s,{as:`h1`,className:`flex-1 min-w-0 flex justify-center overflow-hidden text-[18px] pr-[16px]`,children:g(s,{className:`block max-w-full truncate`,children:b})})]}),_(a,{as:`nav`,className:`px-4 pb-2 flex gap-2`,children:[g(e,{type:`button`,onClick:()=>w(`hot`),className:`h-[30px] px-[12px] text-[14px] rounded-[50px] ${C===`hot`?`bg-theme5 text-text1`:`bg-transparent text-text2`}`,children:`最热`}),g(e,{type:`button`,onClick:()=>w(`latest`),className:`h-[30px] px-[12px] text-[14px] rounded-[50px] ${C===`latest`?`bg-theme5 text-text1`:`bg-transparent text-text2`}`,children:`最新`})]})]}),g(a,{id:`video-list-scroll-container`,className:`flex-1 min-h-0 overflow-y-auto [overscroll-behavior-y:none]`,children:g(o,{loadMore:()=>D().then(()=>void 0),hasMore:O,rootId:`video-list-scroll-container`,threshold:300,className:``,children:g(a,{className:`grid grid-cols-2 gap-3 p-4`,children:j})})})]})}export{b as default};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
-
import
|
|
4
|
+
import Image from "next/image";
|
|
5
5
|
|
|
6
6
|
//#region components/ui/image.d.ts
|
|
7
7
|
/** BaseImageProps 属性定义。 */
|
|
8
|
-
type BaseImageProps = Omit<React.ComponentPropsWithoutRef<typeof
|
|
8
|
+
type BaseImageProps = Omit<React.ComponentPropsWithoutRef<typeof Image>, 'className' | 'src' | 'alt' | 'width' | 'height' | 'loading' | 'priority' | 'fill' | 'style'>;
|
|
9
9
|
type CommonImageProps = BaseImageProps & {
|
|
10
10
|
/** 图片地址,支持普通 URL、默认资源路径和加密地址。 */src: string; /** 图片替代文本。 */
|
|
11
11
|
alt?: string; /** 图片类名。 */
|
|
@@ -27,6 +27,6 @@ type ImagePropsWithSize = CommonImageProps & {
|
|
|
27
27
|
/** ImageProps 属性定义。 */
|
|
28
28
|
type ImageProps = ImagePropsWithFill | ImagePropsWithSize;
|
|
29
29
|
/** 图片组件:支持 bnc 解密、默认资源域名拼接与错误占位。 */
|
|
30
|
-
declare function Image(props: ImageProps): react_jsx_runtime0.JSX.Element;
|
|
30
|
+
declare function Image$1(props: ImageProps): react_jsx_runtime0.JSX.Element;
|
|
31
31
|
//#endregion
|
|
32
|
-
export { BaseImageProps, CommonImageProps, Image, ImageProps, ImagePropsWithFill, ImagePropsWithSize };
|
|
32
|
+
export { BaseImageProps, CommonImageProps, Image$1 as Image, ImageProps, ImagePropsWithFill, ImagePropsWithSize };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{useUserStore as e}from"../store/modules/user-store.mjs";import{gCommunityGetUserCollections as t,pCommunityAddContentToCollection as n,pInteractionBatchQueryContentInteractions as r,pInteractionCancelDislike as i,pInteractionCancelLike as a,pInteractionDislike as o,pInteractionLike as s,pInteractionRemoveCollect as c}from"../service/generated/client.mjs";import{useLoginModalStore as l}from"../store/modules/login-modal-store.mjs";import u from"../components/common/collection-popup/index.mjs";import d from"../components/common/share-popup/share-popup.mjs";import{useInteractionAnimation as f}from"./use-interaction-animation.mjs";import{
|
|
2
|
+
import{useUserStore as e}from"../store/modules/user-store.mjs";import{gCommunityGetUserCollections as t,pCommunityAddContentToCollection as n,pInteractionBatchQueryContentInteractions as r,pInteractionCancelDislike as i,pInteractionCancelLike as a,pInteractionDislike as o,pInteractionLike as s,pInteractionRemoveCollect as c}from"../service/generated/client.mjs";import{useLoginModalStore as l}from"../store/modules/login-modal-store.mjs";import u from"../components/common/collection-popup/index.mjs";import d from"../components/common/share-popup/share-popup.mjs";import{useInteractionAnimation as f}from"./use-interaction-animation.mjs";import{usePathname as p,useRouter as m,useSearchParams as h}from"next/navigation";import{useCallback as g,useEffect as _,useMemo as v,useState as y}from"react";import{toast as b}from"sonner";function x(){let t=e.getState().userId||e.getState().userInfo?.userId;if(!t){let{open:e}=l.getState();return e(),null}return t}async function S(t,n){try{let i=e.getState().userId||e.getState().userInfo?.userId;if(!i)return console.warn(`用户未登录,无法查询交互状态`),null;let a=await r({app_id:0,user_id:i,content_ids:t,content_type:n});return a.code===0?a.data:(console.error(`查询交互状态失败:`,a.message),null)}catch(e){return console.error(`查询交互状态异常:`,e),null}}async function C(e,t){try{let n=x();if(!n)return{success:!1,message:`请先登录`};let r=await s({app_id:0,user_id:n,id:e,content_type:t});return r.code===0?{success:!0,data:r.data}:{success:!1,message:r.message||`点赞失败`}}catch(e){return console.error(`点赞失败:`,e),{success:!1,message:`点赞失败`}}}async function w(e,t){try{let n=x();if(!n)return{success:!1,message:`请先登录`};let r=await a({app_id:0,user_id:n,id:e,content_type:t});return r.code===0?{success:!0,data:r.data}:{success:!1,message:r.message||`取消点赞失败`}}catch(e){return console.error(`取消点赞失败:`,e),{success:!1,message:`取消点赞失败`}}}async function T(e,t){try{let n=x();if(!n)return{success:!1,message:`请先登录`};let r=await o({app_id:0,user_id:n,id:e,content_type:t});return r.code===0?{success:!0,data:r.data}:{success:!1,message:r.message||`点踩失败`}}catch(e){return console.error(`点踩异常:`,e),{success:!1,message:`点踩异常`}}}async function E(e,t){try{let n=x();if(!n)return{success:!1,message:`请先登录`};let r=await i({app_id:0,user_id:n,id:e,content_type:t});return r.code===0?{success:!0,data:r.data}:{success:!1,message:r.message||`取消点踩失败`}}catch(e){return console.error(`取消点踩异常:`,e),{success:!1,message:`取消点踩异常`}}}function D({id:r,isLike:i,isDislike:a,isCollect:o,likeCnt:s,dislikeCnt:x,contentType:S,animationClasses:D,copyUrl:O,prefetchDefaultCollection:k=!1}){let{isLogin:A,userInfo:j,userId:M}=e(),N=m(),P=p(),F=h()?.toString()||``,[I,L]=y(void 0),R=D?.like||`like-shake-animation`,z=D?.dislike||`dislike-shake-animation`,B=v(()=>String(M||j?.userId||``),[M,j?.userId]);_(()=>{L(void 0)},[B]);let[V,H]=y(!1),[U,W]=y(!1);_(()=>{d.clear(),u.clear()},[P,F]),_(()=>()=>{d.clear(),u.clear()},[]);let G=g(async()=>{if(!A||!B)return null;try{let e=await t({page:1,page_size:40});if(e.code!==0)return L(null),null;let n=(e.data?.data?.collections??[]).find(e=>e?.is_default),r=(typeof n?.title==`string`?n.title.trim():``)||null;return L(r),r}catch(e){return console.error(`获取默认收藏夹失败:`,e),L(null),null}},[A,B]);_(()=>{!A||!B||k&&I===void 0&&G()},[I,G,A,k,B]);let K=g(()=>{if(!A){let{open:e}=l.getState();return e(),!1}return!0},[A]),q=f(),J=f(),Y=g(async e=>{try{return e?await C(r,S):await w(r,S)}catch(e){return console.error(`点赞操作失败`,e),{success:!1,message:`点赞操作失败`}}},[r,S]),X=g(async()=>{if(!(!K()||V)){H(!0);try{let e=!i;e&&q.trigger(R);let t={isLike:e,likeCnt:Math.max(0,s+(e?1:-1))};e&&a&&(t.isDislike=!1,t.dislikeCnt=Math.max(0,x-1));let n=await Y(e);if(!n.success){b.error(n.message||`点赞失败`);return}return t}finally{H(!1)}}},[q,i,a,s,x,Y,K,V,R]),Z=g(async e=>{try{return e?await T(r,S):await E(r,S)}catch(e){return console.error(`点踩操作失败`,e),{success:!1,message:`点踩操作失败`}}},[r,S]),ee=g(async()=>{if(!(!K()||U)){W(!0);try{let e=!a;e&&J.trigger(z);let t={isDislike:e,dislikeCnt:Math.max(0,x+(e?1:-1))};e&&i&&(t.isLike=!1,t.likeCnt=Math.max(0,s-1));let n=await Z(e);if(!n.success){b.error(n.message||`操作失败`);return}return t}finally{W(!1)}}},[J,i,a,s,x,Z,K,U,z]),Q=g(async({currentId:e,isCancel:t,collectionIds:r})=>{try{if(t){let t=String(M||j?.userId||``);if(!t)return{success:!1};let n=await c({app_id:0,user_id:t,content_id:e,content_type:S});return n.code===0?{success:!0}:{success:!1,message:n.message}}if(!String(M||j?.userId||``))return{success:!1};let i=r?.[0],a=await n({...i?{collection_id:i}:{},content_id:e,source_type:S});return a.code===0?{success:!0}:{success:!1,message:a.message}}catch(e){return console.error(`取消收藏操作失败`,e),{success:!1,message:e?.message}}},[M,j?.userId,S]),$=g(({currentCollect:e,onUpdate:t})=>K()?(e?(async()=>{let e=await Q({currentId:r,isCancel:!0});if(!e?.success){b.error(e?.message||`操作失败`);return}t({isCollect:!1})})():(d.clear(),u.show({toCreateCollection:()=>{N.push(`/collection/create?information_id=${r}`)},onCollect:e=>{(async()=>{let n=await Q({currentId:r,isCancel:!1,collectionIds:[e]});if(!n?.success){b.error(n?.message||`操作失败`);return}t({isCollect:!0})})()}})),!0):!1,[r,N,K,Q]),te=g(async({currentCollect:e,onUpdate:t})=>{if(!K())return;if(e){let e=await Q({currentId:r,isCancel:!0});return e?.success?(t({isCollect:!1}),{success:!0,isCollect:!1}):{success:!1,message:e?.message}}d.clear(),u.clear();let n=await Q({currentId:r,isCancel:!1});if(!n?.success)return{success:!1,message:n?.message};let i=I===void 0?await G():I;return t({isCollect:!0}),{success:!0,isCollect:!0,collectionTitle:i||void 0}},[I,G,Q,r,K]);return{likeAnimation:q,dislikeAnimation:J,handleLikeOperate:X,handleDislikeOperate:ee,handleShareOperate:g((e,t)=>{let n=typeof t==`string`?{otherId:t}:t,i=n?.otherId||r,a=n?.shareUrl;d.show({copyUrl:O,data:{id:r,isCollect:o,parentId:i},...a?{shareUrl:a}:{},onCollect:t=>{$({currentCollect:t,onUpdate:e})}})},[r,o,$,O]),handleToCollectionOperate:$,handleDefaultCollectionOperate:te}}export{S as batchQueryContentInteractions,D as useContentOperate};
|
package/dist/hooks.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
import{appContextCookieKey as e,appContextValues as t,defaultAppContextValue as n,getLockedAppContext as r,lockAppContext as i,normalizeAppContextValue as a}from"./hooks/app-context.mjs";import{getAppContext as o,getAppContextResolved as s}from"./hooks/get-app-context.mjs";import{
|
|
2
|
+
import{appContextCookieKey as e,appContextValues as t,defaultAppContextValue as n,getLockedAppContext as r,lockAppContext as i,normalizeAppContextValue as a}from"./hooks/app-context.mjs";import{getAppContext as o,getAppContextResolved as s}from"./hooks/get-app-context.mjs";import{useAppContext as c}from"./hooks/use-app-context/index.mjs";import{HydrationBoundary as l}from"./hooks/query/hydration-boundary.mjs";import{useDeleteRequest as u,useMutation as d,usePaginated as f,usePrefetchQuery as p,useRefetchQuery as m,useRequest as h,useUpdateRequest as g}from"./hooks/query/use-query.mjs";import{useAuth as _,useCloseLogin as v,useExpireTime as y,useIsLoggedIn as b,useLoginModalOpen as x,useLogout as S,useOpenLogin as C,useOpenLoginAsync as w,useOpenResetPassword as T,useRequireLogin as E,useSetAuthFields as D,useToken as O,useUserId as k,useUserInfo as A}from"./hooks/use-auth.mjs";import{useBrowseReport as j}from"./hooks/use-browse-report.mjs";import{useFollow as M}from"./hooks/use-follow.mjs";import{useFullscreenGestures as N}from"./hooks/use-fullscreen-gestures.mjs";import{useKeyboardOpen as P}from"./hooks/use-keyboard-open.mjs";import{useLikeDislike as F}from"./hooks/use-like-dislike.mjs";import{useSticky as I}from"./hooks/use-sticky.mjs";import{useKeepAliveEffect as L,useKeepAliveState as R}from"./components/common/keep-scroll-position/index.mjs";export{l as HydrationBoundary,e as appContextCookieKey,t as appContextValues,n as defaultAppContextValue,o as getAppContext,s as getAppContextResolved,r as getLockedAppContext,i as lockAppContext,a as normalizeAppContextValue,c as useAppContext,_ as useAuth,j as useBrowseReport,v as useCloseLogin,u as useDeleteRequest,y as useExpireTime,M as useFollow,N as useFullscreenGestures,b as useIsLoggedIn,L as useKeepAliveEffect,R as useKeepAliveState,P as useKeyboardOpen,F as useLikeDislike,x as useLoginModalOpen,S as useLogout,d as useMutation,C as useOpenLogin,w as useOpenLoginAsync,T as useOpenResetPassword,f as usePaginated,p as usePrefetchQuery,m as useRefetchQuery,h as useRequest,E as useRequireLogin,D as useSetAuthFields,I as useSticky,O as useToken,g as useUpdateRequest,k as useUserId,A as useUserInfo};
|
package/dist/i18n/locales/en.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
var e={components:{biz:{basics:{fullscreenFeed:{runtime:{bottomInfo:{collapse:`Collapse`,expand:`Expand`,nextItem:`Next`,seriesAction:`Episodes · {title}`,seriesActionWithEpisode:`Episodes · {title} {episodeName}`},commentModal:{comment:`Comments`},userAction:{collectAction:`Collect`,commentAction:`Comment`,followFailed:`Follow failed`,like:`Like`,likeAction:`Like`,loginRequired:`Please log in first`,shareAction:`Share`},videoSlide:{watchFullscreen:`Watch full screen`}}}},business:{comment:{commentInput:{cannotSelectVideoWhenImageSelected:`Cannot select a video after choosing images`,dragFileNotSupported:`Drag-and-drop images/files is not supported. Please use the upload button below`,image:`Pictures`,imageUploadFailed:`Image upload failed`,partialImageUploadFailed:`Some images failed to upload`,pasteFileNotSupported:`Pasting images/files is not supported. Please use the upload button below`,placeholder:`Say something...`,publishCommentFailed:`Failed to publish comment`,publishDefault:`Publish`,publishSuccess:`Published successfully`,publishing:`Publishing...`,video:`Video`,videoUploadFailed:`Video upload failed`},commentItem:{contentInReview:`Content in review`,dislike:`Dislike`,like:`Like`,reply:`Reply`,replyCount:`{count} replies`},commentList:{dislikeHint:`Already disliked`,emptyPrompt:`No comments yet. Be the first one!`,fetchCommentsFailed:`Failed to fetch comments`,invalidReplyTarget:`Invalid reply target`,loading:`Loading...`,loginRequired:`Please log in first`,noMore:`No more`,publishCommentFailed:`Failed to publish comment`,publishReplyFailed:`Failed to publish reply`,viewMore:`View more`},replyDetail:{commentDetail:`Comment details`,dislike:`Dislike`,dislikeHint:`Already disliked`,fetchRepliesFailed:`Failed to fetch replies`,follow:`Follow`,followFailed:`Failed to follow`,followed:`Following`,invalidReplyTarget:`Invalid reply target`,like:`Like`,loginRequired:`Please log in first`,publishReplyFailed:`Failed to publish reply`,reply:`Reply`,underReview:`Content in review`,unfollowFailed:`Failed to unfollow`}},contact:{contactList:{myFollowing:`Following`,noFollowingUsers:`You are not following any users yet`,noMore:`No more`,noSearchResult:`No results found`},contactSearch:{cancel:`Cancel`,close:`Close`,placeholder:`Search users you want to @`}},detail:{detailFollowAction:{follow:`Follow`,following:`Following`},detailGuessLike:{title:`Guess you like it`},detailIntroduction:{collapse:`Collapse`,expand:`Expand`,score:`Score`},detailOperate:{collectAdded:`Added`,collectFailed:`Failed to collect`,collection:`Collection`,defaultCollection:`Default Collection`,like:`Like`,modifyCollection:`Change`,modifyCollectionSuccess:`Collection updated`,operateFailed:`Operation failed, please try again`,share:`Bagikan`},detailPopularComments:{emptyPrompt:`Looking forward to your first comment`,like:`Like`,mediaPlaceholder:`[Image/Video]`,popularComments:`Pop comments`},detailTabs:{discussion:`DISCUSSION`,video:`Video`},postRecommendList:{title:`Related Posts`},videoHero:{coverAlt:`Video player cover`,noVideos:`No videos available`}},fullscreenFeed:{variants:{fullscreenVideoFeed:{runtime:{client:{contentLoading:`Loading content...`}}}}},navBar:{variants:{basicNavBar:{runtime:{channelFilterDialog:{add:`Add`,allAddedTo:`All have been added to`,allChannels:`All channels`,delete:`Delete`,moreChannels:`More channels`,myChannels:`My channels`,resetDefault:`Reset to default`}}}}},searchHistory:{clearAllHistory:`Delete all history`}}},common:{blockedDialog:{contactSupport:`Contact Support`,description:`Due to: {remark}, your account has been restricted from logging in.
|
|
2
|
+
var e={components:{biz:{basics:{fullscreenFeed:{runtime:{bottomInfo:{collapse:`Collapse`,expand:`Expand`,nextItem:`Next`,seriesAction:`Episodes · {title}`,seriesActionWithEpisode:`Episodes · {title} {episodeName}`},commentModal:{comment:`Comments`},userAction:{collectAction:`Collect`,commentAction:`Comment`,followFailed:`Follow failed`,like:`Like`,likeAction:`Like`,loginRequired:`Please log in first`,shareAction:`Share`},videoSlide:{watchFullscreen:`Watch full screen`}}}},business:{comment:{commentInput:{cannotSelectVideoWhenImageSelected:`Cannot select a video after choosing images`,dragFileNotSupported:`Drag-and-drop images/files is not supported. Please use the upload button below`,image:`Pictures`,imageUploadFailed:`Image upload failed`,partialImageUploadFailed:`Some images failed to upload`,pasteFileNotSupported:`Pasting images/files is not supported. Please use the upload button below`,placeholder:`Say something...`,publishCommentFailed:`Failed to publish comment`,publishDefault:`Publish`,publishSuccess:`Published successfully`,publishing:`Publishing...`,video:`Video`,videoUploadFailed:`Video upload failed`},commentItem:{contentInReview:`Content in review`,dislike:`Dislike`,like:`Like`,reply:`Reply`,replyCount:`{count} replies`},commentList:{dislikeHint:`Already disliked`,emptyPrompt:`No comments yet. Be the first one!`,fetchCommentsFailed:`Failed to fetch comments`,invalidReplyTarget:`Invalid reply target`,loading:`Loading...`,loginRequired:`Please log in first`,noMore:`No more`,publishCommentFailed:`Failed to publish comment`,publishReplyFailed:`Failed to publish reply`,viewMore:`View more`},replyDetail:{commentDetail:`Comment details`,dislike:`Dislike`,dislikeHint:`Already disliked`,fetchRepliesFailed:`Failed to fetch replies`,follow:`Follow`,followFailed:`Failed to follow`,followed:`Following`,invalidReplyTarget:`Invalid reply target`,like:`Like`,loginRequired:`Please log in first`,publishReplyFailed:`Failed to publish reply`,reply:`Reply`,underReview:`Content in review`,unfollowFailed:`Failed to unfollow`}},contact:{contactList:{myFollowing:`Following`,noFollowingUsers:`You are not following any users yet`,noMore:`No more`,noSearchResult:`No results found`},contactSearch:{cancel:`Cancel`,close:`Close`,placeholder:`Search users you want to @`}},detail:{detailFollowAction:{follow:`Follow`,following:`Following`},detailGuessLike:{title:`Guess you like it`},detailIntroduction:{collapse:`Collapse`,expand:`Expand`,score:`Score`},detailOperate:{collectAdded:`Added`,collectFailed:`Failed to collect`,collection:`Collection`,defaultCollection:`Default Collection`,like:`Like`,modifyCollection:`Change`,modifyCollectionSuccess:`Collection updated`,operateFailed:`Operation failed, please try again`,share:`Bagikan`},detailPopularComments:{emptyPrompt:`Looking forward to your first comment`,like:`Like`,mediaPlaceholder:`[Image/Video]`,popularComments:`Pop comments`},detailTabs:{discussion:`DISCUSSION`,video:`Video`},postRecommendList:{title:`Related Posts`},videoHero:{coverAlt:`Video player cover`,noVideos:`No videos available`}},fullscreenFeed:{variants:{fullscreenVideoFeed:{runtime:{client:{contentLoading:`Loading content...`}}}}},navBar:{variants:{basicNavBar:{runtime:{channelFilterDialog:{add:`Add`,allAddedTo:`All have been added to`,allChannels:`All channels`,delete:`Delete`,moreChannels:`More channels`,myChannels:`My channels`,resetDefault:`Reset to default`}}}}},searchHistory:{clear:`Clear`,clearAllHistory:`Delete all history`,confirmClearDescription:`Are you sure you want to delete all search history?`},videoHorizontalList:{allEpisodes:`All {count} episodes`,defaultTitle:`Recommended Videos`,updatedTo:`Updated to {count} episodes`}}},common:{blockedDialog:{contactSupport:`Contact Support`,description:`Due to: {remark}, your account has been restricted from logging in.
|
|
3
3
|
Unblock time: {unblockTime}
|
|
4
4
|
If this was not you, please contact support or file an appeal.`,gotIt:`Got it`,remarkDefault:`Abnormal behavior detected`,title:`Account Restricted`,unblockTimePermanent:`Permanent`},collectionPopup:{collectSuccess:`Added to collection`,coverAlt:`Cover image`,createCollection:`Create Collection`,createCollectionHint:`to create your collection.`,createModalAction:`Done`,createModalTitle:`New Collection`,favoriteToCollectionTitle:`Favorite to Collection`,newCollection:`New`,noCollections:`No collections yet`,postsCountSuffix:`Posts`,selectTitle:`Select Collection`,updateSuccess:`Collection updated`},debugLocaleSwitcher:{current:`Current`,languageDebugging:`Language Debugging`},deleteConfirmDialog:{cancel:`Cancel`,confirm:`Delete`,description:`This action cannot be undone.`},followButton:{follow:`Follow`,followFailed:`Failed to follow`,following:`Following`,loginFailed:`Login failed`,loginRequired:`Please log in first`,unfollowConfirmDialog:{cancel:`cancel`,confirm:`OK`,confirmUnfollow:`Are you sure you want to unfollow`},unfollowFailed:`Failed to unfollow`},imageCropModal:{cancel:`Cancel`,confirm:`Confirm`,processing:`Processing...`},infoCard:{cardBottom:{comment:`Comment`,dislike:`Dislike`,like:`Like`,share:`Share`}},list:{collectionList:{collectionListItem:{contentCountSuffix:`content`,movieLabel:`Movie`}}},photoGrid:{episodeLoading:`Episode Loading`,missingEpisode:`Missing valid episode`,noEpisodes:`No episodes available`},picker:{genderPicker:{cancel:`Cancel`,confirm:`Confirm`,options:{female:`Female`,male:`Male`,secret:`Secret`},title:`Select Gender`},pickerDrawer:{cancel:`Cancel`,confirm:`Confirm`,title:`Please Select`}},seriesEpisodes:{completedSeriesTotal:`Completed series: {total} episodes`,episodeLabel:`Episode {episode}`,episodeNotFound:`Episode not found`,episodeSwitchFailed:`Failed to switch episode`,episodeTitle:`Episode title`,ongoingSeriesTotal:`Ongoing series: {total} episodes`,ongoingSeriesUpdatedTo:`Ongoing series: updated to {total} episodes`,selectorTitle:`Episodes`,singleContent:`Single episode`},sharePopup:{shareContent:{copyFailed:`Copy failed`,copyShareLink:`Copy link`,copySuccess:`Copied`,shareHint:`Can paste a link to share with friends`,shareLinksTitle:`Share Links`},shareDrawer:{cancel:`Cancel`,collectionLabel:`Collection`,label:`Uncollect`,moments:`Moments`,wechat:`WeChat`,wechatFriend:`WeChat Friend`}},skeleton:{loading:`Loading`},title:`Are you sure you want to delete this content?`},pages:{collectionAdd:{page:{collectionNotFound:`Collection not found`,done:`Done`,emptyPublish:`No posts available to add`,selectPostFirst:`Please select posts first`,submitFailed:`Add failed, please try again later`,submitSuccess:`Added successfully`,submitting:`Adding...`,title:`Add posts to collection`,userNotFound:`User not found`}},collectionCreate:{form:{addCover:`Add cover`,collectionNotFound:`Collection not found`,coverAlt:`Collection cover`,coverLabel:`Cover`,coverUploadFailed:`Failed to upload cover`,create:`Create`,createFailed:`Create failed`,createSuccess:`Created successfully`,createTitle:`Create Collection`,creating:`Creating...`,descriptionLabel:`Description`,descriptionPlaceholder:`Add a description for this collection`,editTitle:`Edit Collection`,label:`Title`,save:`Save`,saveFailed:`Save failed`,saveSuccess:`Saved successfully`,saving:`Saving...`,signatureLabel:`Description`,titlePlaceholder:`Please enter collection title`,titleRequired:`Please enter collection title`,uploading:`Uploading...`}},collectionDetail:{components:{collectionDetailCard:{collectedInLabel:`Collected in:`}},detail:{add:`Add Content`,contentCountSuffix:`Section Contents`,coverAlt:`Collection cover`,defaultCollectionDeleteNotSupported:`Default collection cannot be deleted`,defaultTitle:`Collection`,deleteCollection:`Delete collection`,deleteFailed:`Delete failed`,deleteSuccess:`Collection deleted`,deleting:`Deleting...`,editCollection:`Edit Collection`,emptyContent:`No content yet`,operationFailed:`Operation failed, please try again later`,ownerAvatarAlt:`Collection owner`,pleaseLogin:`Please log in first`,subscribe:`Subscribe`,subscribeOperateFailed:`Subscription action failed`,subscribeProcessing:`Processing...`,subscribeSuccess:`Subscribed successfully`,subscribed:`Subscribed`,uncollectFailed:`Failed to remove from collection`,uncollectSuccess:`Removed from collection`,unsubscribeSuccess:`Unsubscribed`,updatedSuffix:`Update`}},edit:{page:{avatarUpdateSuccess:`Updated successfully`,avatarUploadFailed:`Failed to upload avatar. Please try again later.`,avatarUploading:`Uploading...`,clickToChangeAvatar:`Tap to change avatar`,displayIdLabel:`Display ID`,genderFemale:`Female`,genderLabel:`Gender`,genderMale:`Male`,genderSecret:`Private`,genderSelect:`Please select`,genderUpdateSuccess:`Gender updated successfully`,imageTypeInvalid:`Only JPG/JPEG/PNG formats are supported`,label:`Nickname`,loading:`Loading`,nicknameInvalidChars:`Nickname only supports _, - and .`,nicknamePlaceholder:`Enter your nickname`,nicknameRequired:`Please enter a nickname`,nicknameTooShort:`Nickname must be at least 2 characters`,nicknameUpdateSuccess:`Nickname updated successfully`,save:`Save`,saveFailed:`Save failed. Please try again later.`,saveSuccess:`Saved successfully`,signatureLabel:`Signature`,signaturePlaceholder:`Enter your bio`,signatureTooShort:`Bio must be at least 2 characters`,signatureUpdateSuccess:`Bio updated successfully`,submit:`Submit`,title:`Edit profile`,updateFailed:`Update failed. Please try again later.`,userNotFound:`User info not found`}},feedSeries:{feedSeriesClient:{episodeLoading:`Episode Loading`,episodeSelectorTitle:`Episodes`,missingEpisode:`Missing valid episode`,noEpisodes:`No episodes available`},page:{videoLoading:`Loading video...`}},feedback:{components:{feedbackForm:{addScreenshot:`Add screenshot`,alt:`Screenshot of feedback`,contactLabel:`Contact`,contentMinLength:`Problem description must be at least 4 characters.`,delete:`Delete`,imageTypeInvalid:`Only JPG/JPEG/PNG formats are supported`,label:`Feedback content`,loading:`Submitting...`,message:`Update failed, please try again later.`,missingContact:`Enter your contact information.`,missingFeedback:`Please enter your feedback`,missingScreenshot:`Please upload a screenshot`,placeholder:`obtain SMS verification code`,placeholder1_6d0242:`Please enter your email or phone number so we can resolve your issue.`,screenshotLabel:`Upload Screenshot`,screenshotUploadFailed:`Screenshot upload failed, please try again later`,submit:`SUBMIT`,submitsuccess:`Feedback submitted successfully. We will resolve it as soon as possible.`,title:`Feedback`,uploading:`UPLOADING...`}}},follow:{components:{followButton:{follow:`Follow`,following:`Following`},interactionTabs:{fans:`Fans`,follow:`Follow`},userList:{follow:`Follow`,followBack:`Follow back`,followNow:`Follow now`,noFans:`No fans yet`,noFollowedUsers:`Not following any users`}},pages:{fans:{privateListUnavailable:`This fan list is not publicly available`},followed:{privateListUnavailable:`This following list is not publicly available`}}},fullscreenFeed:{page:{episodeSelectorTitle:`Episodes`,missingParams:`Missing testimonial bit or episode parameter`}},login:{forgot:{back:`Back`,emailPlaceholder:`Enter your email`,getCode:`Get verification code`,loginLink:`Remembered your password? Log in`,or:`or`,sendFailed:`Failed to send, please try again later`,sending:`Sending...`,title:`Forgot your password?`},index:{loginFailed:`Login failed. Please try again later.`,loginSuccess:`Logged in successfully`},loginClient:{agreeToTerms:`I have read and agree to the Terms of Service and Privacy Policy`,agreeToTermsPrefix:`I have read and agree to the `,and:` and `,close:`Close`,emailPlaceholder:`Enter your email`,forgotPassword:`Forgot Password`,hidePassword:`Hide password`,loggingIn:`Logging in...`,login:`Log in`,noAccount:`Don't have an account?`,passwordPlaceholder:`Enter your password`,privacyPolicy:`Privacy Policy`,registerLink:`Create a new account`,showPassword:`Show password`,title:`Log in to your account`,userAgreement:`Terms of Service`},password:{back:`Back`,confirmModify:`Confirm changes`,confirmPasswordPlaceholder:`Re-enter your password`,confirmReset:`Confirm reset`,passwordPlaceholder:`Enter a password (6-18 characters)`,passwordSetSuccess:`Password updated`,passwordTooLong:`Password must be no more than 18 characters`,passwordTooShort:`Password must be at least 6 characters`,passwordsNotMatch:`Passwords do not match`,register:`Register`,setLoginPassword:`Set a login password`,setNewPassword:`Set a new password`,submitFailed:`Failed to submit. Please try again later.`,submitting:`Submitting...`},register:{back:`Back`,emailPlaceholder:`Enter your email`,getCode:`Get verification code`,hasAccount:`Already have an account?`,invalidEmail:`Please enter a valid email`,loginLink:`Log in`,sendFailed:`Failed to send`,sending:`Sending...`,title:`Create your account`},resetPassword:{back:`Back`,codePlaceholder:`Enter the verification code`,resend:`Resend`,sendCode:`Send code`,sendFailed:`Failed to send`,title:`Reset password`,verifyEmail:`Verify email`,verifyFailed:`Verification failed. Please try again later.`,verifyHint:`Verify your identity`,verifyViaEmail:`Verify via email`,verifying:`Verifying...`},verify:{back:`Back`,invalidCode:`Invalid verification code`,nextStep:`Next`,resend:`Resend`,sentTo:`Sent to`,title:`Enter the verification code`,verifying:`Verifying...`}},postDetail:{postDetailClient:{comment:`Comments`,postDeleted:`This post has been deleted`,postOffline:`This post is no longer available`,reactions:`Reactions`}},profile:{client:{collect:`Collect`,collectionNotPublic:`This collection is private`,editProfile:`Edit profile`,exploreAdventures:`Explore amazing adventures.`,follow:`Follow`,followFailed:`Follow failed`,followSuccess:`Followed successfully`,followed:`Following`,history:`History`,like:`Like`,likeNotPublic:`Likes are private`,loginNow:`Log in`,loginToView:`Please log in to view`,operationFailed:`Operation failed. Please try again later.`,processing:`Processing...`,publish:`Publish`,unfollowFailed:`Unfollow failed`,unfollowSuccess:`Unfollowed`,welcomeToPlanet:`Welcome`},components:{tabs:{collectTab:{cancel:`Cancel`,collections:`Collections`,created:`Created`,delete:`Delete`,edit:`Edit`,noCreatedCollections:`No created collections yet`,noSubscribedCollections:`No subscribed collections yet`,operationFailed:`Operation failed, please try again later`,pleaseLogin:`Please log in first`,posts:`Posts`,processing:`Processing...`,selectAll:`Select All`,subscribed:`Subscribed`,uncollectFailed:`Failed to uncollect`,uncollectedSuccess:`Uncollected successfully`,video:`Video`},historyTab:{cancel:`Cancel`,delete:`Delete`,deleteFailed:`Deletion failed.`,edit:`Edit`,historyDeletedSuccess:`Browsing history deleted`,operationFailed:`Operation failed, please try again later`,pleaseLogin:`Please log in first`,posts:`Posts`,processing:`Processing...`,selectAll:`Select All`,video:`Video`},likeTab:{cancel:`Cancel`,delete:`Delete`,edit:`Edit`,operationFailed:`Operation failed, please try again later`,pleaseLogin:`Please log in first`,posts:`Posts`,processing:`Processing...`,selectAll:`Select All`,unlikeFailed:`Failed to unlike`,unlikedSuccess:`Unliked successfully`,video:`Video`},publishTab:{deleteFailed:`Delete failed`,deleteSuccess:`Deleted`,emptyText:`No published content yet`}},userProfileHeader:{fans:`Fans`,follow:`Follow`,likesReceived:`Likes Received`}}},publish:{components:{collection:{createCollection:`Create Collection`,moreCollections:`More collections`,syncToCollection:`Sync to collection`},collectionCard:{contentCountSuffix:`Bar Contents`},collectionPopup:{noCollections:`No collections yet`,syncToCollection:`Sync to collection`},coverItem:{coverAlt:`Cover`,editCover:`Edit cover`,uploadImage:`Upload Image`},editor:{headlineHint:`With Headline`},header:{publish:`Publish`},materialItem:{deleteMaterial:`Delete media`,uploadImage:`Uploaded image`,videoCover:`Video cover`},mediaPreview:{previewAlt:`Preview`},uploadProgress:{uploading:`Uploading`}},pageClient:{cancel:`cancel`,editContentFirst:`Please edit the content first`,maxMaterialCount:`You can upload up to 9 materials`,publishFailed:`Publish failed, please try again later`,publishSuccess:`Published successfully`,resume:`Continued`,switchToPostConfirm:`Switching to post will clear the main video. Continue?`,switchToVideoConfirm:`Switching to video will clear existing materials. Continue?`,title:`Confirm toggle`,uploadFailedCount:`{count} files failed to upload`}},search:{hotRecommend:{hotPostsTitle:`Popular Posts`,hotVideosTitle:`Popular Videos`},hotSearch:{recommendedSearches:`Recommended searches`},pageClient:{tabs:{all:`All`,post:`Posts`,user:`Users`,video:`Videos`}},searchResult:{searchAll:{emptyResult:`No related content found`,more:`MORE`,relatedSuffix:`Related`},searchUser:{emptyResult:`No related content found`,followersSuffix:`Followers`},searchVideoInfo:{noRelevantContent:`No relevant content found`}},topHeader:{placeholder:`Please enter keywords`,search:`Cari`}},settings:{components:{resetPasswordDrawer:{boundEmailNotice:`The email address is currently bound`,codeSentSuccess:`Verification code sent`,confirmPasswordPlaceholder:`Please enter the login password again`,passwordPlaceholder:`Enter password (6-18 characters)`,passwordResetSuccess:`Password changed successfully`,resendAfter:`resend after`,resetFailed:`Modification failed, please try again later`,resetPassword:`Change Password`,sendCode:`Send verification code`,sendFailed:`Failed to send, please try again later`,sending:`Sending...`,setNewPasswordHint:`Set a new login password`,submitting:`Submitting...`,title:`Reset Password`,verifyEmailButton:`Validate Email`,verifyFailed:`Verification failed, please check the code`,verifyHint:`Perform verification`,verifySuccess:`Verification successful`,verifying:`Verifying...`},settings:{button:`Log Out`,cancel:`Cancel`,collectionsTitle:`Collections`,confirm:`Confirm`,feedbackTitle:`Feedback`,follow:`Following`,followersTitle:`Followers`,languageTitle:`Language`,like:`Likes`,listPrivateHint:`This list will be private`,logoutConfirmMessage:`Are you sure you want to log out?`,privacySettingsTitle:`Privacy Settings`,resetPasswordTitle:`Reset Password`,switchTo:`Switch to`,title:`Settings`,whenOff:`When turned off`}}},userFollow:{components:{comprehensiveTab:{empty:`No content yet, try somewhere else.`,postsFeed:`Posts Feed`},contentItem:{filmAndTv:`Film and television related`},followNoLogin:{login:`Log in`,notLoggedIn:`You are not logged in`},followNoUser:{empty:`You haven't followed anyone yet`},followedList:{newUpdate:`New update`,seeAll:`See All`},postTab:{empty:`Not following any posts`}},page:{tabs:{posts:`Posts`}}},videoDetail:{videoDetailClient:{videoDeleted:`This video has been deleted`,videoUnavailable:`This video is unavailable`}}},ui:{infiniteScroll:{failed:`Load failed, click to retry`,loading:`Loading`,noMore:`No more`},list:{empty:`No content yet`,loading:`Loading...`,postList:{earlier:`Earlier`,empty:`No browsing history`,postListItem:{coverAlt:`Post cover`},today:`Today`},userActivityList:{earlier:`Earlier`,empty:`No browsing history`,today:`Today`,userActivityListActions:{comment:`Comment`,dislike:`Dislike`,like:`Like`,likeFailed:`Like failed`,share:`Share`},userActivityListItem:{collapse:`Collapse`,collectFailed:`Collection failed`,expand:`Expand`,mediaAlt:`Feed image`}},videoList:{earlier:`Earlier`,empty:`No viewing history`,today:`Today`,videoListItem:{coverAlt:`Video cover`,movie:`Movie`,series:`Series`,watchUntil:`Watched `}}},loading:{label:`Loading...`}}},tabBar:{follow:`Follow`,home:`Home`,message:`Message`,mine:`Mine`}};export{e as default};
|