@funhub/platform 0.2.3-beta.1 → 0.2.3
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/channel-list/channel-active-indicator.mjs +2 -0
- package/dist/assets/icons/common/header-menu.mjs +2 -0
- package/dist/assets/icons/common/header-search-icon.mjs +2 -0
- package/dist/assets/icons/common/right_arrow_thin.mjs +2 -0
- package/dist/assets/icons/eye-off-icon.mjs +1 -1
- package/dist/assets/icons/marquee-close.mjs +2 -0
- package/dist/assets/icons/marquee-speaker.mjs +2 -0
- package/dist/assets/images/shortcut-grid/shortcut-grid-card-bg-primary.mjs +2 -0
- package/dist/biz.d.mts +11 -4
- package/dist/biz.mjs +1 -1
- package/dist/common.d.mts +5 -2
- package/dist/common.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/business/advertisement/ad-match.mjs +1 -1
- package/dist/components/biz/business/advertisement/banner-ad/client.mjs +1 -1
- package/dist/components/biz/business/advertisement/banner-ad/material.d.mts +2 -2
- package/dist/components/biz/business/advertisement/banner-ad/material.mjs +1 -1
- package/dist/components/biz/business/advertisement/banner-ad/schema.d.mts +9 -4
- package/dist/components/biz/business/advertisement/banner-ad/schema.mjs +1 -1
- package/dist/components/biz/business/advertisement/feed-ad/index.d.mts +1 -31
- package/dist/components/biz/business/advertisement/feed-ad/index.mjs +1 -1
- package/dist/components/biz/business/advertisement/floating-ad/client.mjs +1 -1
- package/dist/components/biz/business/advertisement/floating-ad/material.mjs +1 -1
- package/dist/components/biz/business/advertisement/icon-ad/client.mjs +1 -1
- package/dist/components/biz/business/advertisement/icon-ad/material.d.mts +1 -1
- package/dist/components/biz/business/advertisement/icon-ad/material.mjs +1 -1
- package/dist/components/biz/business/advertisement/icon-ad/schema.d.mts +7 -1
- package/dist/components/biz/business/advertisement/icon-ad/schema.mjs +1 -1
- package/dist/components/biz/business/advertisement/index.d.mts +2 -2
- package/dist/components/biz/business/advertisement/popup-ad/client.mjs +2 -2
- package/dist/components/biz/business/advertisement/popup-ad/index.d.mts +1 -1
- package/dist/components/biz/business/advertisement/popup-ad/material.d.mts +2 -2
- package/dist/components/biz/business/advertisement/popup-ad/schema.d.mts +14 -15
- package/dist/components/biz/business/advertisement/popup-ad/schema.mjs +1 -1
- package/dist/components/biz/business/advertisement/text-ad/client.mjs +1 -1
- package/dist/components/biz/business/advertisement/text-ad/material.d.mts +1 -1
- package/dist/components/biz/business/advertisement/text-ad/material.mjs +1 -1
- package/dist/components/biz/business/advertisement/text-ad/schema.d.mts +5 -1
- package/dist/components/biz/business/advertisement/text-ad/schema.mjs +1 -1
- package/dist/components/biz/business/banner/variants/basic-banner/runtime/client.mjs +1 -1
- package/dist/components/biz/business/banner-carousel/client.d.mts +2 -1
- package/dist/components/biz/business/banner-carousel/client.mjs +1 -1
- package/dist/components/biz/business/banner-carousel/default-props.mjs +1 -1
- package/dist/components/biz/business/channel-list/client.mjs +1 -1
- package/dist/components/biz/business/channel-list/default-props.mjs +1 -1
- package/dist/components/biz/business/detail/shared/detail-operate.mjs +1 -1
- package/dist/components/biz/business/detail/shared/editor-preview.mjs +1 -1
- package/dist/components/biz/business/detail/shared/registry.d.mts +36 -1
- package/dist/components/biz/business/detail/shared/registry.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-actions/client.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-info/client.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-recommend/client.d.mts +1 -13
- package/dist/components/biz/business/detail/video-detail-recommend/client.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-recommend/material.mjs +1 -1
- package/dist/components/biz/business/detail/video-detail-recommend/shared.mjs +2 -0
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/client.d.mts +8 -0
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/client.mjs +2 -0
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/index.d.mts +5 -0
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/material.d.mts +45 -0
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/material.mjs +2 -0
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/schema.d.mts +9 -0
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/schema.mjs +2 -0
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/server.d.mts +11 -0
- package/dist/components/biz/business/detail/video-detail-waterfall-recommend/server.mjs +2 -0
- package/dist/components/biz/business/header-search/header-avatar-icon/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search/client.d.mts +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.d.mts +4 -3
- package/dist/components/biz/business/header-search/header-avatar-logo-search/schema.mjs +1 -1
- package/dist/components/biz/business/header-search/header-avatar-logo-search-icon/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-logo-search/client.mjs +1 -1
- package/dist/components/biz/business/header-search/header-search/client.mjs +1 -1
- package/dist/components/biz/business/header-search/shared/avatar.mjs +1 -1
- package/dist/components/biz/business/header-search/shared/header-action.mjs +2 -0
- package/dist/components/biz/business/header-search/shared/header-search-icon.mjs +2 -0
- package/dist/components/biz/business/header-search/shared/header-shell.mjs +2 -0
- package/dist/components/biz/business/header-search/shared/logo.mjs +1 -1
- package/dist/components/biz/business/header-search/shared/search.mjs +1 -1
- package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.d.mts +0 -8
- package/dist/components/biz/business/home-recommend/home-recommend-grid/inspector-schema.mjs +1 -1
- package/dist/components/biz/business/home-recommend/home-recommend-grid/material.d.mts +0 -8
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.d.mts +0 -8
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/inspector-schema.mjs +1 -1
- package/dist/components/biz/business/home-recommend/home-recommend-waterfall/material.d.mts +0 -8
- package/dist/components/biz/business/home-recommend/shared/home-recommend-base.mjs +1 -1
- package/dist/components/biz/business/home-recommend/shared/home-recommend-preview.mjs +1 -1
- package/dist/components/biz/business/hot-recommend/client.d.mts +17 -0
- package/dist/components/biz/business/hot-recommend/client.mjs +2 -0
- package/dist/components/biz/business/hot-recommend/index.d.mts +5 -0
- package/dist/components/biz/business/hot-recommend/material.d.mts +24 -0
- package/dist/components/biz/business/hot-recommend/material.mjs +2 -0
- package/dist/components/biz/business/hot-recommend/schema.d.mts +23 -0
- package/dist/components/biz/business/hot-recommend/schema.mjs +2 -0
- package/dist/components/biz/business/hot-recommend/server.d.mts +11 -0
- package/dist/components/biz/business/hot-recommend/server.mjs +2 -0
- package/dist/components/biz/business/index.d.mts +12 -3
- package/dist/components/biz/business/large-feature-grid/card-item.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/client.mjs +1 -1
- package/dist/components/biz/business/large-feature-grid/schema.mjs +1 -1
- package/dist/components/biz/business/marquee/client.mjs +1 -1
- package/dist/components/biz/business/marquee/marquee.module.mjs +2 -6
- package/dist/components/biz/business/marquee/material.d.mts +1 -1
- package/dist/components/biz/business/marquee/schema.d.mts +1 -1
- package/dist/components/biz/business/nav-bar/variants/basic-nav-bar/runtime/client.mjs +1 -1
- package/dist/components/biz/business/profile/index.d.mts +1 -1
- package/dist/components/biz/business/profile/profile-header/client.d.mts +2 -1
- package/dist/components/biz/business/profile/profile-header/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/index.d.mts +1 -1
- package/dist/components/biz/business/profile/profile-header/user-profile-avatar.mjs +1 -1
- package/dist/components/biz/business/profile/profile-header/user-profile-cover-background.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/empty-state.mjs +2 -0
- package/dist/components/biz/business/profile/profile-main/shell.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/collect-tab/video-waterfall.mjs +2 -0
- package/dist/components/biz/business/profile/profile-main/tabs/history-tab/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.d.mts +5 -1
- package/dist/components/biz/business/profile/profile-main/tabs/like-tab/client.mjs +1 -1
- package/dist/components/biz/business/profile/profile-main/utils.mjs +1 -1
- package/dist/components/biz/business/ranking-recommend/client.d.mts +17 -0
- package/dist/components/biz/business/ranking-recommend/client.mjs +70 -0
- package/dist/components/biz/business/ranking-recommend/material.d.mts +35 -0
- package/dist/components/biz/business/ranking-recommend/material.mjs +2 -0
- package/dist/components/biz/business/ranking-recommend/schema.d.mts +35 -0
- package/dist/components/biz/business/ranking-recommend/schema.mjs +2 -0
- package/dist/components/biz/business/ranking-recommend/server.d.mts +11 -0
- package/dist/components/biz/business/ranking-recommend/server.mjs +2 -0
- package/dist/components/biz/business/ranking-recommend/shared/query.mjs +2 -0
- package/dist/components/biz/business/ranking-recommend/shared.d.mts +15 -0
- package/dist/components/biz/business/ranking-recommend/shared.mjs +2 -0
- package/dist/components/biz/business/search-history/client.mjs +1 -1
- package/dist/components/biz/business/search-history/schema.mjs +1 -1
- package/dist/components/biz/business/search-input/client.mjs +1 -1
- package/dist/components/biz/business/search-waterfall-recommend/client.d.mts +9 -0
- package/dist/components/biz/business/search-waterfall-recommend/client.mjs +2 -0
- package/dist/components/biz/business/search-waterfall-recommend/index.d.mts +4 -0
- package/dist/components/biz/business/search-waterfall-recommend/material.d.mts +40 -0
- package/dist/components/biz/business/search-waterfall-recommend/material.mjs +2 -0
- package/dist/components/biz/business/search-waterfall-recommend/server.d.mts +8 -0
- package/dist/components/biz/business/search-waterfall-recommend/server.mjs +2 -0
- package/dist/components/biz/business/shortcut-grid/client.mjs +1 -1
- package/dist/components/biz/business/tab-bar/client.mjs +1 -1
- package/dist/components/common/collection-popup/create-collection-sheet.d.mts +41 -0
- package/dist/components/common/collection-popup/create-collection-sheet.mjs +2 -0
- package/dist/components/common/collection-popup/index.d.mts +1 -0
- package/dist/components/common/collection-popup/index.mjs +1 -1
- package/dist/components/common/icons/setting.mjs +1 -1
- package/dist/components/common/list/collection-list/collection-list-item.d.mts +8 -0
- package/dist/components/common/list/collection-list/collection-list-item.mjs +1 -1
- package/dist/components/common/list/collection-list/collection-list.d.mts +6 -0
- package/dist/components/common/list/collection-list/collection-list.mjs +1 -1
- package/dist/components/common/list/collection-list/collection-select-icon.mjs +2 -0
- package/dist/components/common/list/waterfall-recommend/index.d.mts +2 -0
- package/dist/components/common/list/waterfall-recommend/waterfall-recommend.d.mts +99 -0
- package/dist/components/common/list/waterfall-recommend/waterfall-recommend.mjs +2 -0
- package/dist/components/common/series-episodes/index.d.mts +3 -1
- package/dist/components/common/series-episodes/index.mjs +1 -1
- package/dist/components/common/tab-bar/index.mjs +1 -1
- package/dist/components/pages/collection-detail/_components/collection-detail-video-card.mjs +2 -0
- package/dist/components/pages/collection-detail/detail.mjs +1 -1
- package/dist/components/pages/edit/page.mjs +1 -1
- package/dist/components/pages/home/client.mjs +1 -1
- package/dist/components/pages/login/auth-page-styles.mjs +6 -0
- package/dist/components/pages/login/login-client.mjs +1 -1
- package/dist/components/pages/login/register.mjs +1 -1
- package/dist/components/pages/login/verify.mjs +1 -4
- package/dist/components/pages/publish/components/collection.mjs +1 -1
- package/dist/components/pages/search/page-client.mjs +1 -1
- package/dist/components/pages/search/search-result/index.mjs +1 -1
- package/dist/components/pages/search/search-result/search-all.mjs +1 -1
- package/dist/components/pages/search/search-result/search-user.mjs +1 -1
- package/dist/components/pages/search/search-result/search-video-info.mjs +1 -1
- package/dist/components/pages/search/search-result/shared.mjs +2 -0
- package/dist/components/pages/search/top-header.mjs +1 -1
- package/dist/components/pages/search-result/page-client.mjs +1 -1
- package/dist/components/pages/search-result/search-all.mjs +1 -1
- package/dist/components/pages/search-result/search-empty.mjs +2 -0
- package/dist/components/pages/search-result/search-tab.mjs +1 -1
- package/dist/components/pages/search-result/search-user.mjs +1 -1
- package/dist/components/pages/search-result/search-video-info.mjs +2 -0
- package/dist/components/pages/search-result/shared.mjs +2 -0
- package/dist/components/pages/search-result/top-header.mjs +2 -0
- package/dist/components/pages/settings/_components/reset-password-drawer.mjs +2 -2
- package/dist/components/pages/settings/_components/settings.mjs +1 -1
- package/dist/components/pages/user-follow/_components/follow-no-login.mjs +1 -1
- package/dist/components/pages/video-list/video-list-client.mjs +1 -1
- package/dist/components/pages/video-list/video-list-recommend-item.mjs +2 -0
- package/dist/components/pages/video-list/video-list-skeleton.d.mts +2 -3
- package/dist/components/pages/video-list/video-list-skeleton.mjs +1 -1
- package/dist/components/ui/badge.d.mts +1 -1
- package/dist/components/ui/box.d.mts +1 -1
- package/dist/components/ui/button.d.mts +1 -1
- package/dist/i18n/locales/en.mjs +2 -2
- package/dist/i18n/locales/zh-CN.mjs +2 -2
- package/dist/materials.d.mts +6 -1
- package/dist/materials.mjs +1 -1
- package/dist/service/generated/client.d.mts +38 -2
- package/dist/service/generated/client.mjs +1 -1
- package/dist/service/generated/tanstack.d.mts +47 -2
- package/dist/service/generated/tanstack.mjs +1 -1
- package/dist/service.d.mts +3 -3
- package/dist/service.mjs +1 -1
- package/dist/theme-tokens.d.mts +9 -0
- package/dist/theme-tokens.mjs +2 -0
- package/dist/types.d.mts +662 -9
- package/dist/utils/helper.d.mts +1 -1
- package/dist/utils/helper.mjs +1 -1
- package/package.json +7 -2
- package/theme.css +170 -59
- package/dist/assets/icons/detail/collect_nor.mjs +0 -2
- package/dist/assets/icons/detail/collect_sel.mjs +0 -2
- package/dist/assets/icons/detail/share.mjs +0 -2
- package/dist/assets/icons/marquee-enter.mjs +0 -2
- package/dist/assets/icons/right_arrow.mjs +0 -2
- package/dist/assets/icons/search/avatar.mjs +0 -2
- package/dist/assets/images/marquee.mjs +0 -2
- package/dist/components/biz/business/detail/shared/detail-introduction.mjs +0 -2
- package/dist/components/common/collection-popup/collection-create-modal.mjs +0 -2
- package/dist/components/common/skeleton/search-video-card-skeleton.mjs +0 -2
- package/dist/components/pages/search/search-utils.mjs +0 -2
- package/dist/components/pages/search-result/search-result-skeleton.mjs +0 -2
- package/dist/components/pages/search-result/search-video.mjs +0 -2
- package/dist/components/pages/video-list/video-list-item.mjs +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Button as e}from"../../ui/button.mjs";import{ensureGuestIdentity as t}from"../../../store/modules/user-store.mjs";import{Box as n}from"../../ui/box.mjs";import{Checkbox as r}from"../../ui/checkbox.mjs";import{Input as i}from"../../ui/input.mjs";import{Text as a}from"../../ui/text.mjs";import{CloseIcon as o}from"../../../assets/icons/close-icon.mjs";import{EyeIcon as s}from"../../../assets/icons/eye-icon.mjs";import{EyeOffIcon as c}from"../../../assets/icons/eye-off-icon.mjs";import{AgreementDialog as l}from"./agreement-dialog.mjs";import{
|
|
2
|
+
"use client";import{Button as e}from"../../ui/button.mjs";import{ensureGuestIdentity as t}from"../../../store/modules/user-store.mjs";import{Box as n}from"../../ui/box.mjs";import{Checkbox as r}from"../../ui/checkbox.mjs";import{Input as i}from"../../ui/input.mjs";import{Text as a}from"../../ui/text.mjs";import{CloseIcon as o}from"../../../assets/icons/close-icon.mjs";import{EyeIcon as s}from"../../../assets/icons/eye-icon.mjs";import{EyeOffIcon as c}from"../../../assets/icons/eye-off-icon.mjs";import{AgreementDialog as l}from"./agreement-dialog.mjs";import{authGradientTextStyle as u,authPanelBackgroundStyle as d}from"./auth-page-styles.mjs";import{useCallback as f,useMemo as p,useState as m}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";import{useTranslations as _}from"next-intl";function v(v){let y=_(`components.pages.login`),{onClose:b,onForgotPassword:x,onRegister:S,onSubmit:C,errorText:w}=v,[T,E]=m(``),[D,O]=m(``),[k,A]=m(!1),[j,M]=m(!1),[N,P]=m(!1),[F,I]=m(null),L=p(()=>T.trim().length>0&&D.length>0&&N&&!j,[T,D,N,j]),R=f(()=>{t(!0),S?.()},[S]);async function z(){if(L)try{M(!0),await C?.({email:T.trim(),password:D})}finally{M(!1)}}return g(n,{className:`min-h-screen w-full h-full bg-bg1 text-text1 flex flex-col`,style:d,children:[g(n,{className:`relative z-[1] mx-auto flex min-h-screen w-full max-w-[390px] flex-col justify-between px-[32px] pt-[calc(env(safe-area-inset-top)+152px)] pb-[calc(env(safe-area-inset-bottom)+40px)]`,children:[h(e,{type:`button`,variant:`ghost`,onClick:b,"aria-label":y(`loginClient.close`),className:`absolute top-[calc(env(safe-area-inset-top)+12px)] right-[24px] h-[32px] w-[32px] rounded-full border border-white/10 bg-white/5 !p-0 text-text2 backdrop-blur-[12px] hover:!bg-white/10 hover:text-text1`,children:h(o,{className:`h-[16px] w-[16px]`,"aria-hidden":`true`,focusable:`false`})}),g(n,{className:`flex w-full flex-col`,children:[h(a,{className:`text-[28px] leading-[32px] font-medium text-[#E6E6E6]`,children:y(`loginClient.title`)}),h(a,{className:`mt-[16px] text-[14px] leading-[24px] text-[#E6E6E6]`,children:y(`loginClient.subtitle`)}),g(`form`,{className:`mt-[48px]`,autoComplete:`off`,onSubmit:e=>{e.preventDefault(),z()},children:[h(n,{className:`flex h-[48px] items-center rounded-[8px] bg-white/10 px-[22px]`,children:h(i,{placeholder:y(`loginClient.emailPlaceholder`),type:`email`,name:`funhub-login-email`,value:T,onChange:e=>E(e.target.value),autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`none`,spellCheck:!1,"data-lpignore":`true`,"data-1p-ignore":`true`,"data-form-type":`other`,className:`!h-auto !rounded-none !bg-transparent !px-0 !py-0 !text-[14px] !leading-[20px] !text-text2 placeholder:!text-white/60`})}),g(n,{className:`mt-[24px] flex h-[48px] items-center justify-between rounded-[8px] bg-white/10 px-[16px]`,children:[h(i,{placeholder:y(`loginClient.passwordPlaceholder`),type:k?`text`:`password`,name:`funhub-login-password`,value:D,onChange:e=>O(e.target.value),autoComplete:`new-password`,autoCorrect:`off`,autoCapitalize:`none`,spellCheck:!1,"data-lpignore":`true`,"data-1p-ignore":`true`,"data-form-type":`other`,className:`flex-1 !h-auto !rounded-none !bg-transparent !px-0 !py-0 !text-[14px] !leading-[20px] !text-text2 placeholder:!text-white/60`}),h(e,{type:`button`,variant:`ghost`,className:`ml-[12px] h-[24px] w-[24px] cursor-pointer select-none !p-0 text-white/50 hover:text-white/80`,"aria-label":y(k?`loginClient.hidePassword`:`loginClient.showPassword`),onClick:()=>A(e=>!e),children:h(k?s:c,{className:`h-[20px] w-[20px]`,"aria-hidden":`true`,focusable:`false`})})]}),!!w&&h(n,{className:`mt-[8px] text-[12px] leading-[16px] text-theme5`,children:w})]}),g(n,{className:`mt-[16px] flex items-center justify-between text-[14px] leading-[24px] text-[#9DA3AC]`,children:[g(a,{as:`span`,className:`whitespace-nowrap`,children:[y(`loginClient.noAccount`),h(e,{type:`button`,variant:`link`,onClick:R,className:`inline h-auto !p-0 text-[14px] font-normal leading-[24px] !no-underline hover:opacity-80 hover:!no-underline`,style:u,children:y(`loginClient.registerLink`)})]}),h(e,{type:`button`,variant:`link`,onClick:x,className:`inline h-auto !p-0 text-[14px] font-normal leading-[24px] text-[#9DA3AC] !no-underline hover:text-text1 hover:!no-underline`,children:y(`loginClient.forgotPassword`)})]})]}),g(n,{className:`flex w-full flex-col`,children:[g(n,{className:`flex items-center`,children:[h(r,{checked:N,onCheckedChange:e=>P(e===!0),"aria-label":y(`loginClient.agreeToTerms`),className:`mt-px size-[16px] border-white/60 bg-transparent data-[checked]:border-theme5 data-[checked]:bg-theme5 data-[checked]:text-white`}),g(a,{as:`span`,className:`ml-[8px] text-[12px] leading-[16px] text-[#9DA3AC]`,children:[y(`loginClient.agreeToTermsPrefix`),g(e,{type:`button`,variant:`link`,className:`inline h-auto !p-0 text-[12px] font-normal leading-[16px] !no-underline hover:opacity-80 hover:!no-underline`,style:u,onClick:()=>I(`terms`),children:[`《`,y(`loginClient.userAgreement`),`》`]}),y(`loginClient.and`),g(e,{type:`button`,variant:`link`,className:`inline h-auto !p-0 text-[12px] font-normal leading-[16px] !no-underline hover:opacity-80 hover:!no-underline`,style:u,onClick:()=>I(`privacy`),children:[`《`,y(`loginClient.privacyPolicy`),`》`]})]})]}),h(e,{type:`button`,onClick:z,disabled:!L,className:`mt-[16px] h-[48px] w-full !rounded-[8px] !border-0 !px-0 !py-0 text-[16px] font-normal leading-[24px] text-white disabled:opacity-100 active:opacity-90 ${L?``:`!text-white/60`}`,style:{background:L?`var(--gradient-action-button)`:`linear-gradient(90deg, rgba(151, 86, 227, 0.45) 0%, rgba(108, 67, 238, 0.45) 100%)`},children:y(j?`loginClient.loggingIn`:`loginClient.login`)})]})]}),h(l,{type:F,onClose:()=>I(null)})]})}export{v as LoginClient};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Button as e}from"../../ui/button.mjs";import{pUserSendEmailCode as t}from"../../../service/generated/client.mjs";import{Box as n}from"../../ui/box.mjs";import{Checkbox as r}from"../../ui/checkbox.mjs";import{Input as i}from"../../ui/input.mjs";import{Text as a}from"../../ui/text.mjs";import{useLoginModalStore as o}from"../../../store/modules/login-modal-store.mjs";import{LeftArrowIcon as s}from"../../../assets/icons/left-arrow-icon.mjs";import{AgreementDialog as c}from"./agreement-dialog.mjs";import{
|
|
2
|
+
"use client";import{Button as e}from"../../ui/button.mjs";import{pUserSendEmailCode as t}from"../../../service/generated/client.mjs";import{Box as n}from"../../ui/box.mjs";import{Checkbox as r}from"../../ui/checkbox.mjs";import{Input as i}from"../../ui/input.mjs";import{Text as a}from"../../ui/text.mjs";import{useLoginModalStore as o}from"../../../store/modules/login-modal-store.mjs";import{LeftArrowIcon as s}from"../../../assets/icons/left-arrow-icon.mjs";import{AgreementDialog as c}from"./agreement-dialog.mjs";import{authGradientTextStyle as l,authPanelBackgroundStyle as u}from"./auth-page-styles.mjs";import{useMemo as d,useState as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import{useTranslations as h}from"next-intl";function g(g){let _=h(`components.pages.login`),{onClose:v,onLogin:y,onVerify:b}=g,{setVerifyStep:x}=o(),[S,C]=f(``),[w,T]=f(!1),[E,D]=f(``),[O,k]=f(!1),[A,j]=f(null),M=d(()=>S.trim().length>0&&O&&!w,[S,O,w]);function N(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function P(e){C(e),E&&D(``)}async function F(){if(M)try{T(!0),D(``);let e=S.trim();if(!N(e)){D(_(`register.invalidEmail`));return}await t({email:e}),x(`register-verify`),b?.(e)}catch(e){D(e.message??_(`register.sendFailed`))}finally{T(!1)}}return m(n,{className:`min-h-screen w-full h-full bg-bg1 text-text1 flex flex-col`,style:u,children:[m(n,{className:`relative z-[1] mx-auto flex min-h-screen w-full max-w-[390px] flex-col justify-between px-[32px] pt-[calc(env(safe-area-inset-top)+152px)] pb-[calc(env(safe-area-inset-bottom)+40px)]`,children:[p(e,{type:`button`,variant:`ghost`,onClick:v,"aria-label":_(`register.back`),className:`absolute top-[calc(env(safe-area-inset-top)+12px)] left-[24px] h-[32px] w-[32px] rounded-full border border-white/10 bg-white/5 !p-0 text-text2 backdrop-blur-[12px] hover:!bg-white/10 hover:text-text1`,children:p(s,{className:`h-[16px] w-[16px]`,"aria-hidden":`true`,focusable:`false`})}),m(n,{className:`flex w-full flex-col`,children:[p(a,{className:`text-[28px] leading-[32px] font-medium text-[#E6E6E6]`,children:_(`loginClient.title`)}),p(a,{className:`mt-[16px] text-[14px] leading-[24px] text-[#E6E6E6]`,children:_(`loginClient.subtitle`)}),p(`form`,{className:`mt-[48px]`,autoComplete:`off`,onSubmit:e=>{e.preventDefault(),F()},children:p(n,{className:`flex h-[48px] items-center rounded-[8px] bg-white/10 px-[22px]`,children:p(i,{placeholder:_(`register.emailPlaceholder`),type:`email`,name:`funhub-register-email`,value:S,onChange:e=>P(e.target.value),autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`none`,spellCheck:!1,"data-lpignore":`true`,"data-1p-ignore":`true`,"data-form-type":`other`,className:`!h-auto !rounded-none !bg-transparent !px-0 !py-0 !text-[14px] !leading-[20px] !text-text2 placeholder:!text-white/60`})})}),!!E&&p(n,{className:`mt-[8px] min-h-[16px] text-[12px] leading-[16px] text-theme5`,children:E}),p(n,{className:`mt-[16px] flex items-center justify-between text-[14px] leading-[24px] text-[#9DA3AC]`,children:m(a,{as:`span`,className:`whitespace-nowrap`,children:[_(`register.hasAccount`),p(e,{type:`button`,variant:`link`,onClick:y,className:`inline h-auto !p-0 text-[14px] font-normal leading-[24px] !no-underline hover:opacity-80 hover:!no-underline`,style:l,children:_(`register.loginLink`)})]})})]}),m(n,{className:`flex w-full flex-col`,children:[m(n,{className:`flex items-center`,children:[p(r,{checked:O,onCheckedChange:e=>k(e===!0),"aria-label":_(`loginClient.agreeToTerms`),className:`mt-px size-[16px] border-white/60 bg-transparent data-[checked]:border-theme5 data-[checked]:bg-theme5 data-[checked]:text-white`}),m(a,{as:`span`,className:`ml-[8px] text-[12px] leading-[16px] text-[#9DA3AC]`,children:[_(`loginClient.agreeToTermsPrefix`),m(e,{type:`button`,variant:`link`,className:`inline h-auto !p-0 text-[12px] font-normal leading-[16px] !no-underline hover:opacity-80 hover:!no-underline`,style:l,onClick:()=>j(`terms`),children:[`《`,_(`loginClient.userAgreement`),`》`]}),_(`loginClient.and`),m(e,{type:`button`,variant:`link`,className:`inline h-auto !p-0 text-[12px] font-normal leading-[16px] !no-underline hover:opacity-80 hover:!no-underline`,style:l,onClick:()=>j(`privacy`),children:[`《`,_(`loginClient.privacyPolicy`),`》`]})]})]}),p(e,{type:`button`,onClick:F,disabled:!M,className:`mt-[16px] h-[48px] w-full !rounded-[8px] !border-0 !px-0 !py-0 text-[16px] font-normal leading-[24px] text-white disabled:opacity-100 active:opacity-90 ${M?``:`!text-white/60`}`,style:{background:M?`var(--gradient-action-button)`:`linear-gradient(90deg, rgba(151, 86, 227, 0.45) 0%, rgba(108, 67, 238, 0.45) 100%)`},children:_(w?`register.sending`:`register.getCode`)})]})]}),p(c,{type:A,onClose:()=>j(null)})]})}export{g as Register};
|
|
@@ -1,5 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Button as e}from"../../ui/button.mjs";import{getCookie as t}from"../../../utils/common.mjs";import{pUserSendEmailCode as n,pUserSendResetPasswordEmailCode as r,pUserVerifyForgetEmailCode as i,pUserVerifyResetPasswordEmailCode as a}from"../../../service/generated/client.mjs";import{pUserRegisterByVerifyEmailCodeCompat as o}from"../../../service/register-by-verify-email-code.mjs";import{Box as s}from"../../ui/box.mjs";import{Text as c}from"../../ui/text.mjs";import{useLoginModalStore as l}from"../../../store/modules/login-modal-store.mjs";import{useDeleteRequest as u}from"../../../hooks/query/use-query.mjs";import{useSetAuthFields as d,useUserId as f}from"../../../hooks/use-auth.mjs";import{LeftArrowIcon as p}from"../../../assets/icons/left-arrow-icon.mjs";import{useCallback as
|
|
3
|
-
w-14 h-14 sm:w-16 sm:h-16 md:w-20 md:h-20 rounded-xl border-2 flex items-center justify-center cursor-pointer transition-all duration-200
|
|
4
|
-
${t===N?`border-theme3 bg-theme3`:`border-transparent bg-bg2`}
|
|
5
|
-
`,children:y(c,{className:`select-none font-semibold text-2xl sm:text-3xl leading-none text-text1`,children:e})},t))})]}),y(s,{className:`h-[22px] mt-[16px] mb-[22px] ml-[12px] text-[14px] text-theme5`,children:V}),y(e,{type:`submit`,disabled:!Y,className:`w-full h-[60px] !rounded-[30px] !text-[18px] font-bold leading-[26px] bg-theme6 disabled:bg-theme6/40 disabled:text-text3 active:opacity-90 !px-0 !py-0`,children:T(F?`verify.verifying`:`verify.nextStep`)})]})]})]})}export{w as Verify};
|
|
2
|
+
"use client";import{Button as e}from"../../ui/button.mjs";import{getCookie as t}from"../../../utils/common.mjs";import{pUserSendEmailCode as n,pUserSendResetPasswordEmailCode as r,pUserVerifyForgetEmailCode as i,pUserVerifyResetPasswordEmailCode as a}from"../../../service/generated/client.mjs";import{pUserRegisterByVerifyEmailCodeCompat as o}from"../../../service/register-by-verify-email-code.mjs";import{Box as s}from"../../ui/box.mjs";import{Text as c}from"../../ui/text.mjs";import{useLoginModalStore as l}from"../../../store/modules/login-modal-store.mjs";import{useDeleteRequest as u}from"../../../hooks/query/use-query.mjs";import{useSetAuthFields as d,useUserId as f}from"../../../hooks/use-auth.mjs";import{LeftArrowIcon as p}from"../../../assets/icons/left-arrow-icon.mjs";import{authPanelBackgroundStyle as m}from"./auth-page-styles.mjs";import{useCallback as h,useEffect as g,useMemo as _,useRef 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";function w(e){let[t,n]=e.split(`@`);return!t||!n?e:`${t.slice(0,3)}***${t.length>3?t.slice(-1):``}@${n}`}function T(T){let E=C(`components.pages.login`),{email:D,onClose:O,onPassword:k}=T,{verifyStep:A,resolveLogin:j}=l(),[M,N]=y([,,,,,,].fill(``)),[P,F]=y(0),[I,L]=y(!1),[R,z]=y(60),[B,V]=y(!1),[H,U]=y(``),W=v(null),G=f(),K=d(),q=u(),J=_(()=>w(D),[D]),Y=h(async()=>{if(A===`reset-password`)return await a({user_id:G,email_code:M.join(``)});if(A===`forgot-password`)return await i({email:D,email_code:M.join(``)});if(A===`register-verify`){let e=await t(`guestUserId`);return await o({email:D,email_code:M.join(``),user_id:e})}throw Error(E(`verify.invalidCode`))},[A,M,G,D,E]),X=_(()=>M.every(e=>e!==``)&&!I,[M,I]);g(()=>{if(R<=0)return;let e=setInterval(()=>{z(e=>e-1)},1e3);return()=>clearInterval(e)},[R]),g(()=>{W.current?.focus()},[]);let Z=h(e=>{let t=e.target.value.replace(/\D/g,``);if(t.length===0)return;let n=[...M],r=t.split(``),i=P;for(let e of r)i<6&&(n[i]=e,i++);N(n),F(Math.min(i,5)),U(``)},[M,P]),Q=h(e=>{if(e.key===`Backspace`){e.preventDefault();let t=[...M];M[P]?t[P]=``:P>0&&(t[P-1]=``,F(P-1)),N(t),U(``)}else e.key===`ArrowLeft`&&P>0?F(P-1):e.key===`ArrowRight`&&P<5&&F(P+1)},[M,P]),$=h(e=>{F(e),W.current?.focus()},[]);async function ee(){if(!(R>0||B))try{V(!0),A===`reset-password`?await r({user_id:G}):await n({email:D}),z(60),U(``)}finally{V(!1)}}async function te(){if(X)try{L(!0);let e=await Y();if(A===`register-verify`){let t=e?.data;if(t?.user_id){K({token:t.token??``,expireTime:t.expire_time??0,userId:t.user_id}),S.success(E(`index.loginSuccess`)),q([`user-profile`,`mine`]),j(!0);return}}k?.(D)}catch(e){U(e.message??E(`verify.invalidCode`))}finally{L(!1)}}return b(s,{className:`min-h-screen w-full h-full bg-bg1 text-text1 flex flex-col`,style:m,children:x(s,{className:`relative z-[1] mx-auto min-h-screen w-full max-w-[390px] px-[32px] pt-[calc(env(safe-area-inset-top)+136px)] pb-[calc(env(safe-area-inset-bottom)+40px)]`,children:[b(e,{type:`button`,variant:`ghost`,onClick:O,"aria-label":E(`verify.back`),className:`absolute top-[calc(env(safe-area-inset-top)+12px)] left-[16px] h-[32px] w-[32px] rounded-full border border-white/10 bg-white/5 !p-0 text-text2 backdrop-blur-[12px] hover:!bg-white/10 hover:text-text1`,children:b(p,{className:`h-[16px] w-[16px]`,"aria-hidden":`true`,focusable:`false`})}),x(s,{className:`w-full`,children:[b(s,{children:b(c,{className:`text-[28px] leading-[32px] font-medium text-text1`,children:E(`verify.title`)})}),x(s,{className:`mt-[6px]`,children:[b(c,{className:`ml-[4px] text-[14px] leading-[28px] text-white/60`,children:E(`verify.sentTo`)}),b(c,{className:`mt-[6px] text-[14px] leading-[28px] text-white/60`,children:J})]}),x(`form`,{className:`mt-[44px]`,onSubmit:e=>{e.preventDefault(),te()},children:[x(s,{className:`relative h-[50px]`,children:[b(`input`,{ref:W,type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,value:``,onChange:Z,onKeyDown:Q,className:`absolute inset-0 opacity-0 pointer-events-none h-full w-full border-none bg-transparent text-base outline-none`,autoComplete:`one-time-code`}),b(s,{className:`flex w-full items-center justify-between`,children:M.map((e,t)=>b(s,{onClick:()=>$(t),className:`flex h-[50px] w-[50px] cursor-pointer items-center justify-center rounded-[8px] bg-white/10 transition-all duration-200 ${t===P?`ring-1 ring-white/25 bg-white/[0.14]`:``}`,children:b(c,{className:`select-none text-[28px] leading-none font-medium text-text1`,children:e})},t))})]}),!!H&&b(s,{className:`mt-[12px] text-[12px] leading-[16px] text-theme5`,children:H}),b(e,{type:`submit`,disabled:!X,className:`mt-[44px] h-[48px] w-full !rounded-[8px] !border-0 !px-0 !py-0 text-[16px] font-normal leading-[24px] text-white disabled:opacity-100 active:opacity-90 ${X?``:`!text-white/60`}`,style:{background:X?`var(--gradient-action-button)`:`linear-gradient(90deg, rgba(151, 86, 227, 0.45) 0%, rgba(108, 67, 238, 0.45) 100%)`},children:E(I?`verify.verifying`:`verify.nextStep`)}),b(e,{type:`button`,variant:`ghost`,onClick:ee,disabled:R>0||B,className:`mt-[16px] flex w-full items-center justify-center bg-transparent !p-0 text-[15px] leading-[24px] text-[#9DA3AC] hover:bg-transparent hover:text-text1 disabled:cursor-not-allowed disabled:opacity-100`,children:R>0?E(`verify.resendCountdown`,{seconds:R}):E(`verify.resend`)})]})]})]})})}export{T as Verify};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{gCommunityGetUserCollections as e}from"../../../../service/generated/client.mjs";import{useRouter as t}from"../../../../utils/use-compatible-router.mjs";import{Box as n}from"../../../ui/box.mjs";import{Text as r}from"../../../ui/text.mjs";import i
|
|
2
|
+
"use client";import{gCommunityGetUserCollections as e}from"../../../../service/generated/client.mjs";import{useRouter as t}from"../../../../utils/use-compatible-router.mjs";import{Box as n}from"../../../ui/box.mjs";import{Text as r}from"../../../ui/text.mjs";import{useRequest as i}from"../../../../hooks/query/use-query.mjs";import a from"../../../ui/legacy/button.mjs";import o from"../../../../assets/icons/publish/publish_collection.mjs";import{CollectionCard as s}from"./collection-card.mjs";import{CollectionPopup as c}from"./collection-popup.mjs";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=t(),{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(n,{children:[f(n,{className:`flex justify-between items-center px-[16px] py-[12px]`,children:[d(r,{className:`text-[14px] text-text1`,children:g(`collection.syncToCollection`)}),d(a,{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(n,{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(s,{item:e,active:e.collection_id===m,onClick:()=>h(e.collection_id===m?``:e.collection_id??``)},e.collection_id)),f(a,{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(o,{width:52,height:52}),d(n,{className:`flex flex-1 flex-col overflow-hidden gap-[4px]`,children:d(r,{className:`text-[14px] text-text2 text-left`,children:g(`collection.createCollection`)})})]})]}),d(c,{open:y,onOpenChange:b,onSelect:C})]})}export{m as Collection};
|
|
@@ -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{useRouter as i}from"../../../utils/use-compatible-router.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{useRouter as i}from"../../../utils/use-compatible-router.mjs";import{Box as a}from"../../ui/box.mjs";import{Popover as o,PopoverContent as s,PopoverTrigger as c}from"../../ui/popover.mjs";import{useRequest as l}from"../../../hooks/query/use-query.mjs";import{eventKey as u}from"../../../constants/event-key.mjs";import{useSearchHistory as d}from"../../../hooks/use-search-history.mjs";import{SearchHistoryClient as f}from"../../biz/business/search-history/client.mjs";import p from"../../../assets/icons/search/filter.mjs";import m from"./hot-recommend.mjs";import h from"./hot-search.mjs";import{SEARCH_RESULT_SORT_OPTIONS as g}from"./search-result/shared.mjs";import _ from"./search-result/index.mjs";import v from"./top-header.mjs";import{memo as y,useEffect as b,useMemo as x,useState as S}from"react";import{jsx as C,jsxs as w}from"react/jsx-runtime";import{usePathname as T,useSearchParams as E}from"next/navigation";import{useTranslations as D}from"next-intl";const O=[{labelKey:`tabs.all`,value:`all`},{labelKey:`tabs.video`,value:`video`},{labelKey:`tabs.user`,value:`user`}],k=y(({searchType:e,sort:t,tabList:n,onChange:r,onSortChange:i})=>{let[l,u]=S(!1);return w(a,{as:`nav`,className:`sticky top-[66px] z-40 flex items-center justify-between bg-[linear-gradient(180deg,rgba(6,3,21,0.98)_0%,rgba(6,3,21,0.88)_100%)] px-[16px] pb-[24px] pt-[23px] backdrop-blur-[16px]`,children:[C(a,{className:`flex items-center gap-[10px]`,children:n.map(t=>C(`button`,{type:`button`,className:`text-[16px] leading-[22px] transition-colors ${e===t.value?`font-medium text-white`:`font-normal text-white/80`}`,onClick:()=>{e!==t.value&&r(t.value)},children:t.label},t.value))}),w(o,{open:l,onOpenChange:u,children:[C(c,{"aria-label":`排序筛选`,className:`flex size-[24px] items-center justify-center text-white/70`,children:C(p,{className:`size-[20px]`})}),C(s,{side:`bottom`,align:`end`,sideOffset:8,className:`w-[132px] border border-white/10 bg-[#10071E]/95 p-[8px] backdrop-blur-[18px]`,children:C(a,{className:`flex flex-col gap-[4px]`,children:g.map(e=>C(`button`,{type:`button`,className:`rounded-[8px] px-[12px] py-[8px] text-left text-[14px] leading-[20px] ${e.value===t?`bg-white/10 text-white`:`text-white/70`}`,onClick:()=>{i(e.value),u(!1)},children:e.label},e.value))})})]})]})});k.displayName=`SearchResultTabs`;function A(){let o=D(`components.pages.search.pageClient`),{userInfo:s}=n(),c=s?.user_id||`guest`,p=E(),y=T(),A=i(),j=p.get(`q`)?.toString()||``,{data:M,refetch:N}=l([`hotSearchKey`],()=>r({user_id:c})),P=x(()=>M?.data?.recommend_list??[],[M]),[F,I]=S(j),[L,R]=S(j),[z,B]=S(0),[V,H]=S(O[0].value),[U,W]=S(g[0].value),[G,K]=S(0),{history:q,addHistory:J}=d({storageKey:c}),Y=x(()=>O.map(e=>({value:e.value,label:o(e.labelKey)})),[o]),X=x(()=>F.trim()===``?P.length>0||q.length>0||F.trim()===``:!1,[q.length,P.length,F]),Z=x(()=>F.trim()!==``&&!X,[F,X]);return b(()=>(t.on(u.EXCHANGE_SEARCH_TYPE,H),()=>{t.off(u.EXCHANGE_SEARCH_TYPE,H)}),[]),w(a,{className:`min-h-screen w-full bg-[radial-gradient(79.9%_42.18%_at_50%_0%,rgba(71,20,126,0.95)_0%,rgba(14,6,32,0.98)_42%,#05010F_100%)] pb-[24px]`,children:[C(v,{setSearchInputVal:t=>{t!==F&&(I(t),e({q:t}))},initInputVal:L,initInputVersion:z,addSearchHistory:J}),X&&w(a,{className:`w-full pt-[8px]`,children:[q.length>0&&C(f,{title:o(`searchHistory`),rows:2,storageKey:c,onHistoryClick:e=>{R(e),B(e=>e+1);let t=new URLSearchParams(p.toString());t.set(`q`,e),A.push(`${y}?${t.toString()}`)}}),C(h,{initHotSearchKeywordList:P,onRefreshHotKey:async()=>(await N()).data??{code:0,message:``,data:{recommend_list:[]}},onClick:e=>{R(e.title||``),B(e=>e+1),J(e.title)}})]}),C(m,{isShow:F.trim()===``}),Z&&w(a,{className:`relative mt-[8px] min-h-[calc(100vh-74px)] overflow-hidden rounded-t-[16px] bg-[linear-gradient(180deg,rgba(6,3,21,0.9)_19.905%,rgba(6,3,21,0)_100%)] backdrop-blur-[2px]`,children:[C(k,{searchType:V,sort:U,tabList:Y,onChange:e=>{H(e)},onSortChange:e=>{W(e),K(e=>e+1)}}),C(_,{inputVal:F,searchType:V,sort:U,refreshVersion:G},`${V}-${F}-${U}-${G}`)]})]})}export{A as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import e from"./search-user.mjs";import t from"./search-video-info.mjs";import n from"./search-all.mjs";import{jsx as r}from"react/jsx-runtime";function i({searchType:i,inputVal:a}){return i===`user`?r(e,{inputVal:a}):i===`all`?r(n,{
|
|
2
|
+
"use client";import e from"./search-user.mjs";import t from"./search-video-info.mjs";import n from"./search-all.mjs";import{jsx as r}from"react/jsx-runtime";function i({searchType:i,inputVal:a,sort:o,refreshVersion:s}){return i===`user`?r(e,{inputVal:a,sort:o,refreshVersion:s}):i===`all`?r(n,{searchInputVal:a,sort:o,refreshVersion:s}):r(t,{inputVal:a,sort:o,refreshVersion:s})}export{i as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import e from"../../../../utils/event-bus.mjs";import{gContentGetRecommendVideoList as t}from"../../../../service/generated/client.mjs";import{
|
|
2
|
+
"use client";import e from"../../../../utils/event-bus.mjs";import{gContentGetRecommendVideoList as t}from"../../../../service/generated/client.mjs";import{gContentGetRecommendVideoListKey as n}from"../../../../service/generated/tanstack.mjs";import{Box as r}from"../../../ui/box.mjs";import{EmptyState as i}from"../../../ui/empty.mjs";import{Text as a}from"../../../ui/text.mjs";import{Skeleton as o}from"../../../ui/skeleton.mjs";import{useRequest as s}from"../../../../hooks/query/use-query.mjs";import{eventKey as c}from"../../../../constants/event-key.mjs";import{SearchUserRowCard as l}from"./search-user.mjs";import{SearchVideoWaterfall as u}from"./search-video-info.mjs";import{useEffect as d,useMemo as f,useState as p}from"react";import{ChevronDown as m}from"lucide-react";import{jsx as h,jsxs as g}from"react/jsx-runtime";import{useTranslations as _}from"next-intl";function v(e,t){return JSON.stringify({type:1,keywords:e,sort:t})}function y(){return g(r,{className:`w-full`,children:[h(r,{className:`px-[16px]`,children:h(r,{className:`flex flex-col gap-[12px]`,children:Array.from({length:2}).map((e,t)=>g(r,{className:`flex h-[88px] items-center gap-[8px] rounded-[8px] bg-white/8 px-[12px] py-[8px]`,children:[h(o,{className:`size-[56px] rounded-full bg-white/10`}),g(r,{className:`min-w-0 flex-1`,children:[h(o,{className:`h-[20px] w-[96px] rounded-[4px] bg-white/10`}),h(o,{className:`mt-[6px] h-[20px] w-full rounded-[4px] bg-white/10`}),h(o,{className:`mt-[6px] h-[20px] w-[120px] rounded-[4px] bg-white/10`})]}),h(o,{className:`h-[24px] w-[64px] rounded-full bg-white/10`})]},`search-all-user-skeleton-${t}`))})}),g(r,{className:`mt-[32px] flex w-full gap-[15px] px-[16px]`,children:[g(r,{className:`flex min-w-0 flex-1 flex-col gap-[16px]`,children:[h(o,{className:`h-[218px] w-full rounded-[8px] bg-white/8`}),h(o,{className:`h-[120px] w-full rounded-[8px] bg-white/8`})]}),g(r,{className:`flex min-w-0 flex-1 flex-col gap-[16px]`,children:[h(o,{className:`h-[120px] w-full rounded-[8px] bg-white/8`}),h(o,{className:`h-[218px] w-full rounded-[8px] bg-white/8`})]})]})]})}function b({searchInputVal:o,sort:b,refreshVersion:x}){let S=_(`components.pages.search.searchResult`),[C,w]=p(!1),[T,E]=p({});d(()=>{w(!1),E({})},[x,o,b]);let D=f(()=>v(o,b),[o,b]),{data:O,isFetching:k,isLoading:A}=s(f(()=>[...n({data_type:2,extra_params:D,page:1,page_size:10}),x],[x,D]),async()=>(await t({data_type:2,extra_params:D,page:1,page_size:10})).data??{}),j=f(()=>O?.users?.list??[],[O]),M=f(()=>j.map(e=>{let t=String(e.user_id||``).trim();return!t||T[t]===void 0?e:{...e,is_following:T[t]}}),[T,j]),N=f(()=>O?.videos?.list??[],[O]),P=f(()=>C?M:M.slice(0,2),[C,M]),F=!C&&M.length>2,I=!!((A||k)&&M.length===0&&N.length===0),L=!k&&M.length===0&&N.length===0;return I?h(y,{}):L?h(i,{type:`nodata`,text:S(`searchAll.emptyResult`),className:`!pt-[72px]`}):g(r,{className:`w-full pb-[24px]`,children:[P.length>0&&g(r,{className:`px-[16px]`,children:[h(r,{className:`flex flex-col gap-[12px]`,children:P.map((e,t)=>h(l,{item:e,onFollowChange:t=>{let n=String(e.user_id||``).trim();n&&E(e=>({...e,[n]:t?1:0}))}},String(e.user_id??t)))}),F&&g(`button`,{type:`button`,className:`mt-[12px] flex h-[48px] w-full items-center justify-center gap-[4px] rounded-[8px] bg-[linear-gradient(180deg,#15041B_8.824%,#250561_113.72%)] text-white/70 backdrop-blur-[4px]`,onClick:()=>w(!0),children:[h(a,{className:`text-[14px] leading-[20px]`,children:`展开全部`}),h(m,{className:`size-[16px]`,strokeWidth:1.5})]})]}),N.length>0&&h(u,{list:N,title:`相似推荐`,onMoreClick:()=>{e.emit(c.EXCHANGE_SEARCH_TYPE,`video`)},sectionClassName:P.length>0?`mt-[32px] w-full`:`w-full`})]})}export{b as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{useUserStore as e}from"../../../../store/modules/user-store.mjs";import{gContentGetRecommendVideoList as t}from"../../../../service/generated/client.mjs";import{Image as
|
|
2
|
+
"use client";import{useUserStore as e}from"../../../../store/modules/user-store.mjs";import{gContentGetRecommendVideoList as t,pInteractionFollow as n,pInteractionUnfollow as r}from"../../../../service/generated/client.mjs";import{Image as i}from"../../../ui/image.mjs";import{Box as a}from"../../../ui/box.mjs";import{EmptyState as o}from"../../../ui/empty.mjs";import{InfiniteScroll as s}from"../../../ui/infinite-scroll.mjs";import{Text as c}from"../../../ui/text.mjs";import{Skeleton as l}from"../../../ui/skeleton.mjs";import{usePaginated as u}from"../../../../hooks/query/use-query.mjs";import{useRequireLogin as d}from"../../../../hooks/use-auth.mjs";import f from"../../../../assets/images/user/default_avatar.mjs";import{formatSearchFollowerCount as p,resolveSearchUserDescription as m,resolveSearchUserName as h}from"./shared.mjs";import{memo as g,useCallback as _,useEffect as v,useMemo as y,useState as b}from"react";import{Check as x,Plus as S}from"lucide-react";import{jsx as C,jsxs as w}from"react/jsx-runtime";import{toast as T}from"sonner";import{useTranslations as E}from"next-intl";import D from"next/link";const O=typeof f==`string`?f:f.src;function k(e,t){return String(t||e?.user_id||e?.userId||``).trim()}function A({src:e,alt:t,variant:n}){let r=n===`row`?`size-[56px] p-[4px]`:`size-[40px] p-[3px]`,o=n===`row`?`border-[3px]`:`border-[2px]`;return C(a,{className:`rounded-full bg-white/20 ${r}`,children:C(a,{className:`relative size-full overflow-hidden rounded-full border-solid border-white/40 ${o}`,children:C(i,{src:e||O,fill:!0,objectFit:`cover`,alt:t})})})}function j({item:t,variant:i,onFollowChange:a}){let o=d(),{userInfo:s,userId:l}=e(),[u,f]=b(!1),p=k(s,l),m=p!==``&&p===String(t.user_id||``).trim(),h=!!t.is_following,g=_(()=>{!t.user_id||u||o(()=>{let i=k(e.getState().userInfo,e.getState().userId);if(!i){T.error(`请先登录`);return}(async()=>{f(!0);try{let e=h?await r({follower_id:i,followee_id:t.user_id}):await n({follower_id:i,followee_id:t.user_id});if(e.code!==0){T.error(e.message||(h?`取消关注失败`:`关注失败`));return}a?.(!h)}catch(e){console.error(`切换关注状态失败`,e),T.error(h?`取消关注失败`:`关注失败`)}finally{f(!1)}})()})},[h,t.user_id,a,u,o]);return m?null:i===`grid`?C(`button`,{type:`button`,"aria-label":h?`取消关注`:`关注`,className:`flex size-[24px] shrink-0 items-center justify-center rounded-full transition-opacity ${h?`bg-white/15 text-white`:`bg-black/30 text-white/75`} ${u?`opacity-50`:``}`,onClick:g,children:C(h?x:S,{className:`size-[14px]`})}):w(`button`,{type:`button`,className:`flex h-[24px] shrink-0 items-center justify-center rounded-full transition-opacity ${h?`border border-white/25 bg-white/10 px-[8px] text-white/85`:`border border-white/60 bg-black/20 pl-[4px] pr-[8px] text-white/70`} ${u?`opacity-50`:``}`,onClick:g,children:[!h&&C(S,{className:`mr-[2px] size-[16px]`}),C(c,{className:h?`text-[12px] leading-[18px]`:`text-[14px] leading-[20px]`,children:h?`已关注`:`关注`})]})}const M=g(({item:e,onFollowChange:t})=>{let n=h(e),r=m(e),i=p(e.follower_count);return w(a,{className:`flex h-[88px] w-full items-center gap-[8px] rounded-[8px] bg-white/10 px-[12px] py-[8px]`,children:[w(D,{href:`/profile/${e.user_id||``}`,className:`flex min-w-0 flex-1 items-center gap-[8px]`,children:[C(A,{src:e.avatar,alt:n||`用户头像`,variant:`row`}),w(a,{className:`min-w-0 flex-1`,children:[C(c,{className:`block truncate text-[14px] leading-[20px] font-medium text-white`,children:n}),C(c,{className:`mt-[2px] block truncate text-[14px] leading-[20px] text-white/60`,children:r}),w(c,{className:`mt-[2px] block truncate text-[14px] leading-[20px] text-white/60`,children:[`粉丝:`,i]})]})]}),C(j,{item:e,variant:`row`,onFollowChange:t})]})});M.displayName=`SearchUserRowCard`;const N=g(({item:e,onFollowChange:t})=>{let n=h(e),r=m(e);return w(a,{className:`h-[170px] rounded-[8px] bg-white/10 px-[16px] py-[16px]`,children:[w(a,{className:`flex items-start justify-between`,children:[C(D,{href:`/profile/${e.user_id||``}`,className:`flex items-center`,children:C(A,{src:e.avatar,alt:n||`用户头像`,variant:`grid`})}),C(j,{item:e,variant:`grid`,onFollowChange:t})]}),w(D,{href:`/profile/${e.user_id||``}`,className:`mt-[16px] block`,children:[C(c,{className:`block truncate text-[14px] leading-[20px] font-medium text-white`,children:n}),C(c,{className:`mt-[8px] block text-[14px] leading-[20px] text-white/60 line-clamp-4`,children:r})]})]})});N.displayName=`SearchUserGridCard`;function P(){return C(a,{className:`grid grid-cols-2 gap-[16px] px-[16px]`,children:Array.from({length:6}).map((e,t)=>w(a,{className:`h-[170px] rounded-[8px] bg-white/8 px-[16px] py-[16px]`,children:[w(a,{className:`flex items-start justify-between`,children:[C(l,{className:`size-[40px] rounded-full bg-white/10`}),C(l,{className:`size-[24px] rounded-full bg-white/10`})]}),C(l,{className:`mt-[16px] h-[20px] w-[86px] rounded-[4px] bg-white/10`}),C(l,{className:`mt-[8px] h-[20px] w-full rounded-[4px] bg-white/10`}),C(l,{className:`mt-[6px] h-[20px] w-[90%] rounded-[4px] bg-white/10`}),C(l,{className:`mt-[6px] h-[20px] w-[72%] rounded-[4px] bg-white/10`})]},`search-user-grid-skeleton-${t}`))})}const F=g(({inputVal:e,sort:n,refreshVersion:r})=>{let i=E(`components.pages.search.searchResult`),[c,l]=b({});v(()=>{l({})},[e,r,n]);let d=_(async r=>await t({data_type:2,extra_params:JSON.stringify({type:4,keywords:e,sort:n}),page:r||1,page_size:20}),[e,n]),f=u({key:y(()=>[`search-result`,`user`,e,n,r],[e,r,n]),initialPageParam:1,async queryFn(e){return(await d(e))?.data?.users??{has_more:!1,total:0,list:[]}},getNextPageParam(e,t){if(e.has_more)return t.length+1}}),p=y(()=>(f.data?.pages??[]).flatMap(e=>e.list??[]).map(e=>{let t=String(e.user_id||``).trim();return!t||c[t]===void 0?e:{...e,is_following:c[t]}}),[c,f.data?.pages]),m=!!((f.isPending||f.isFetching)&&p.length===0),h=_((e,t)=>{e&&l(n=>({...n,[e]:t?1:0}))},[]),g=_(async()=>{try{await f.fetchNextPage()}catch(e){console.error(`获取用户搜索结果失败`,e)}},[f]);return m?C(P,{}):p.length===0?C(o,{type:`nodata`,text:i(`searchUser.emptyResult`),className:`!pt-[72px]`}):w(a,{className:`w-full pb-[24px]`,children:[C(a,{className:`grid grid-cols-2 gap-[16px] px-[16px]`,children:p.map((e,t)=>C(N,{item:e,onFollowChange:t=>{h(String(e.user_id||``),t)}},String(e.user_id??t)))}),f.hasNextPage&&C(s,{loadMore:async e=>g(),hasMore:f.hasNextPage,className:`w-full`})]})});F.displayName=`SearchUser`;export{M as SearchUserRowCard,F as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{gContentGetRecommendVideoList as e}from"../../../../service/generated/client.mjs";import{
|
|
2
|
+
"use client";import{gContentGetRecommendVideoList as e}from"../../../../service/generated/client.mjs";import{Box as t}from"../../../ui/box.mjs";import{EmptyState as n}from"../../../ui/empty.mjs";import{InfiniteScroll as r}from"../../../ui/infinite-scroll.mjs";import{Skeleton as i}from"../../../ui/skeleton.mjs";import{usePaginated as a}from"../../../../hooks/query/use-query.mjs";import o from"../../../../assets/icons/common/right_arrow_thin.mjs";import{WaterfallRecommend as s}from"../../../common/list/waterfall-recommend/waterfall-recommend.mjs";import{buildSearchVideoWaterfallColumns as c}from"./shared.mjs";import{memo as l,useCallback as u,useMemo as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{useTranslations as m}from"next-intl";function h(){return p(t,{className:`flex w-full gap-[15px] px-[16px]`,children:[p(t,{className:`flex min-w-0 flex-1 flex-col gap-[16px]`,children:[f(i,{className:`h-[218px] w-full rounded-[8px] bg-white/8`}),f(i,{className:`h-[120px] w-full rounded-[8px] bg-white/8`}),f(i,{className:`h-[218px] w-full rounded-[8px] bg-white/8`})]}),p(t,{className:`flex min-w-0 flex-1 flex-col gap-[16px]`,children:[f(i,{className:`h-[120px] w-full rounded-[8px] bg-white/8`}),f(i,{className:`h-[218px] w-full rounded-[8px] bg-white/8`}),f(i,{className:`h-[120px] w-full rounded-[8px] bg-white/8`})]})]})}const g=l(({list:e,title:t,onMoreClick:n,sectionClassName:r=`w-full`})=>{let i=d(()=>c(e),[e]),a=!!t;return e.length===0?null:f(s,{title:t||``,columns:i,sectionClassName:r,headerClassName:a?`mb-[16px] flex items-center justify-between px-[16px]`:`hidden`,titleClassName:`min-w-0 flex-1 text-[18px] leading-[24px] font-medium text-white`,moreLinkClassName:`ml-[8px] flex size-[24px] shrink-0 items-center justify-center text-white/50`,moreIcon:a&&n?f(o,{className:`size-[16px]`}):void 0,onMoreClick:n,containerClassName:`relative flex w-full gap-[15px] px-[16px]`})});g.displayName=`SearchVideoWaterfall`;const _=l(({inputVal:i,sort:o,refreshVersion:s})=>{let c=m(`components.pages.search.searchResult`),l=u(async t=>await e({data_type:2,extra_params:JSON.stringify({type:3,keywords:i,sort:o}),page:t||1,page_size:20}),[i,o]),_=a({key:d(()=>[`search-result`,`video`,i,o,s],[i,s,o]),initialPageParam:1,async queryFn(e){return(await l(e))?.data?.videos??{has_more:!1,total:0,list:[]}},getNextPageParam(e,t){if(e.has_more)return t.length+1}}),v=d(()=>(_.data?.pages??[]).flatMap(e=>e.list??[]),[_.data?.pages]),y=!!((_.isPending||_.isFetching)&&v.length===0),b=u(async()=>{try{await _.fetchNextPage()}catch(e){console.error(`获取视频搜索结果失败`,e)}},[_]);return y?f(h,{}):v.length===0?f(n,{type:`nodata`,text:c(`searchVideoInfo.noRelevantContent`),className:`!pt-[72px]`}):p(t,{className:`w-full pb-[24px]`,children:[f(g,{list:v}),_.hasNextPage&&f(r,{loadMore:async e=>b(),hasMore:_.hasNextPage,className:`w-full`})]})});_.displayName=`SearchVideoInfo`;export{g as SearchVideoWaterfall,_ as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
import{getPostDetailPagePath as e}from"../../../../utils/tools.mjs";const t=[{label:`综合`,value:1},{label:`最新`,value:2},{label:`最热`,value:3}];function n(e){return!Number.isFinite(e)||e<=0?``:e>=1e8?`${(e/1e8).toFixed(1).replace(/\.0$/,``)}亿热度`:e>=1e4?`${(e/1e4).toFixed(1).replace(/\.0$/,``)}万热度`:`${Math.floor(e)}热度`}function r(e){let t=Number(e);if(!(!Number.isFinite(t)||t<=0))return t>10&&t<=100?t/10:Math.min(t,10)}function i(e){return String(e.img_type??``).trim().toLowerCase()===`long`?`short`:`tall`}function a(e){let t=[],n=[],r=0,i=0;return e.forEach(e=>{let a=(e.cardKind===`short`?120:218)+16;if(r<=i){t.push(e),r+=a;return}n.push(e),i+=a}),{left:t,right:n}}function o(e){return String(e.name||``).trim()}function s(e){return e.img_y||e.img_x||``}function c(e){return String(e.group_name||e.description||``).trim()}function l(t){let n=String(t.video_id||``).trim();return n?e({id:n,contentType:0}):`#`}function u(e){return a(e.filter(e=>String(e.video_id||``).trim()).map((e,t)=>({key:`${e.video_id??`video`}-${t}`,sourceIndex:t,href:l(e),cardKind:i(e),coverUrl:s(e),title:o(e),metaPrimaryText:c(e),heatText:n(Number(e.play_count||0)),score:r(e.score)})))}function d(e){for(let t of e)if(typeof t==`string`&&t.trim())return t.trim();return``}function f(e){return d([e.nick_name,e.nickname,e.display_id,e.user_id])}function p(e){return d([e.signature,e.description,e.text,e.introduce,e.bio])}function m(e){let t=Number(e||0);return!Number.isFinite(t)||t<=0?`0`:t>=1e8?`${(t/1e8).toFixed(1).replace(/\.0$/,``)}亿`:t>=1e4?`${(t/1e4).toFixed(1).replace(/\.0$/,``)}万`:`${Math.floor(t)}`}export{t as SEARCH_RESULT_SORT_OPTIONS,u as buildSearchVideoWaterfallColumns,m as formatSearchFollowerCount,p as resolveSearchUserDescription,f as resolveSearchUserName};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{useRouter as e}from"../../../utils/use-compatible-router.mjs";import{Input as t}from"../../ui/input.mjs";import{toast as n}from"../../../ui.mjs";import{useKeepAliveEffect as r,useKeepAliveState as i}from"../../common/keep-scroll-position/index.mjs";import{isPCEnv as a}from"../../../utils/tools.mjs";import{LeftArrowIcon as o}from"../../common/icons/left-arrow.mjs";import s from"../../../assets/icons/search.mjs";import c from"../../../assets/icons/clear.mjs";import{memo as l,useCallback as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{useSearchParams as p}from"next/navigation";import{useTranslations as m}from"next-intl";function h(){}const g=l(({setSearchInputVal:l,initInputVal:g,initInputVersion:_,addSearchHistory:v,clearCallback:y=h})=>{let b=m(`components.pages.search`),x=e(),[S,C]=i(`search-input-val`,``),w=p().get(`q`),T=e=>{
|
|
2
|
+
"use client";import{useRouter as e}from"../../../utils/use-compatible-router.mjs";import{Input as t}from"../../ui/input.mjs";import{toast as n}from"../../../ui.mjs";import{useKeepAliveEffect as r,useKeepAliveState as i}from"../../common/keep-scroll-position/index.mjs";import{isPCEnv as a}from"../../../utils/tools.mjs";import{LeftArrowIcon as o}from"../../common/icons/left-arrow.mjs";import s from"../../../assets/icons/search.mjs";import c from"../../../assets/icons/clear.mjs";import{memo as l,useCallback as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{useSearchParams as p}from"next/navigation";import{useTranslations as m}from"next-intl";function h(){}const g=l(({setSearchInputVal:l,initInputVal:g,initInputVersion:_,addSearchHistory:v,clearCallback:y=h})=>{let b=m(`components.pages.search`),x=e(),[S,C]=i(`search-input-val`,``),w=p().get(`q`),T=e=>{C(e.target.value)},E=u(e=>{l(e),v(e)},[v,l]);r(()=>{g&&(C(g),E(g))},[E,g,_,C],`search-init-input-effect`),r(()=>{w&&(C(w),E(w))},[E,C,w],`search-url-params-effect`);function D(){if(n.dismiss(),window.location.search.split(`from_code=`)[1]){x.push(`/`);return}x.back()}return d(`div`,{className:`app-top-nav relative h-[66px] w-full`,children:d(`header`,{className:`fixed left-0 right-0 top-0 z-50`,style:{willChange:`transform`,transform:`translateZ(0)`},children:f(`div`,{className:`mx-auto flex h-[66px] items-end gap-[8px] px-[16px] pb-[16px] pt-[16px]`,children:[d(`button`,{type:`button`,"aria-label":`返回`,className:`flex size-[24px] shrink-0 items-center justify-center text-white`,onClick:D,children:d(o,{className:`h-[16px] w-[16px]`})}),f(`div`,{className:`flex h-[34px] min-w-0 flex-1 items-center overflow-hidden rounded-[100px] border border-[#E62AFF]/90 bg-black/40 backdrop-blur-[2px]`,children:[f(`div`,{className:`relative flex h-full min-w-0 flex-1 items-center pl-[12px] pr-[10px]`,children:[d(`span`,{className:`pointer-events-none absolute inset-y-0 left-[12px] flex items-center justify-center`,children:d(s,{className:`h-[14px] w-[14px] text-white/60`})}),d(t,{placeholder:b(`topHeader.placeholder`),maxLength:20,value:S,className:`!h-[20px] !w-full !rounded-none !border-0 !bg-transparent !px-0 !pl-[22px] !pr-[18px] !py-0 !text-[14px] !leading-[20px] !text-white placeholder:!text-white/90`,onChange:T,onKeyDown:e=>{if(e.key===`Enter`){if(e.preventDefault(),!S.trim())return;E(S.trim())}}}),S&&d(`span`,{className:`absolute inset-y-0 right-0 flex items-center justify-center`,children:d(c,{className:`h-[15px] w-[15px] text-white/50`,onClick:()=>{a()||(C(``),l(``),y())}})})]}),d(`button`,{type:`button`,className:`mx-[2px] flex h-[30px] w-[56px] shrink-0 items-center justify-center rounded-[100px] bg-[linear-gradient(90deg,#9756E3_0%,#6C43EE_100%)] text-[14px] leading-[20px] text-white`,onClick:()=>{S.trim()&&E(S.trim())},children:b(`topHeader.search`)})]})]})})})});g.displayName=`SearchTopHeader`;export{g 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{
|
|
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{Box as r}from"../../ui/box.mjs";import{eventKey as i}from"../../../constants/event-key.mjs";import{useSearchHistory as a}from"../../../hooks/use-search-history.mjs";import{SEARCH_RESULT_SORT_OPTIONS as o}from"./shared.mjs";import s from"./search-user.mjs";import c from"./search-video-info.mjs";import l from"./search-all.mjs";import{SearchTab as u}from"./search-tab.mjs";import d from"./top-header.mjs";import{useEffect as f,useMemo as p,useState as m}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";import{useSearchParams as _}from"next/navigation";import{useTranslations as v}from"next-intl";const y=[{labelKey:`tabs.all`,value:`all`},{labelKey:`tabs.video`,value:`video`},{labelKey:`tabs.user`,value:`user`}];function b(){let b=v(`components.pages.search.pageClient`),{userInfo:x}=n(),S=x?.user_id||`guest`,C=_().get(`q`)?.toString()||``,[w,T]=m(C),[E,D]=m(0);f(()=>{T(C),D(e=>e+1)},[C]);let[O,k]=m(y[0].value),[A,j]=m(o[0].value),[M,N]=m(0),{addHistory:P}=a({storageKey:S}),F=p(()=>y.map(e=>({value:e.value,label:b(e.labelKey)})),[b]),I=p(()=>w.trim()!==``,[w]);return f(()=>(t.on(i.EXCHANGE_SEARCH_TYPE,k),()=>{t.off(i.EXCHANGE_SEARCH_TYPE,k)}),[]),g(r,{className:`flex h-dvh w-full flex-col`,children:[h(r,{className:`shrink-0`,children:h(d,{setSearchInputVal:t=>{t!==w&&(T(t),e({q:t}))},initInputVal:C,initInputVersion:E,addSearchHistory:P})}),h(r,{className:`mt-[16px] min-h-0 flex-1 overflow-hidden rounded-t-[16px]`,children:I&&g(r,{className:`flex h-full flex-col bg-[linear-gradient(180deg,rgba(6,3,21,0.9)_0%,rgba(6,3,21,0)_100%)] backdrop-blur-[2px]`,children:[h(u,{searchType:O,tabList:F,onChange:e=>{k(e)},sort:A,onSortChange:e=>{j(e),N(e=>e+1)}}),g(`div`,{className:`min-h-0 flex-1 overflow-y-auto pb-[24px]`,children:[O===`user`&&h(s,{inputVal:w,sort:A,refreshVersion:M}),O===`all`&&h(l,{searchInputVal:w,sort:A,refreshVersion:M}),O===`video`&&h(c,{inputVal:w,sort:A,refreshVersion:M})]})]})})]})}export{b as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{gContentGetRecommendVideoList as
|
|
2
|
+
"use client";import e from"../../../utils/event-bus.mjs";import{gContentGetRecommendVideoList as t}from"../../../service/generated/client.mjs";import{gContentGetRecommendVideoListKey as n}from"../../../service/generated/tanstack.mjs";import{Box as r}from"../../ui/box.mjs";import{Text as i}from"../../ui/text.mjs";import{Skeleton as a}from"../../ui/skeleton.mjs";import{useRequest as o}from"../../../hooks/query/use-query.mjs";import{eventKey as s}from"../../../constants/event-key.mjs";import{SearchResultEmpty as c}from"./search-empty.mjs";import{SearchUserRowCard as l}from"./search-user.mjs";import{SearchVideoWaterfall as u}from"./search-video-info.mjs";import{useEffect as d,useMemo as f,useState as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{useTranslations as g}from"next-intl";function _({className:e}){return m(`svg`,{viewBox:`0 0 12.728 7.778`,fill:`currentColor`,"aria-hidden":!0,className:e,children:m(`path`,{d:`M6.36391 4.94972L11.3137 0L12.7279 1.41421L6.36391 7.77822L0 1.41421L1.41421 0L6.36391 4.94972Z`})})}function v(e,t){return JSON.stringify({type:1,keywords:e,sort:t})}function y(){return h(r,{className:`w-full`,children:[m(r,{className:`px-[16px]`,children:h(r,{className:`overflow-hidden rounded-[8px] bg-white/8`,children:[m(r,{className:`flex flex-col gap-[16px] px-[15px] pt-[16px]`,children:Array.from({length:3}).map((e,t)=>h(r,{className:`flex h-[66px] items-center gap-[8px]`,children:[m(a,{className:`size-[56px] rounded-full bg-white/10`}),h(r,{className:`min-w-0 flex-1`,children:[m(a,{className:`h-[20px] w-[96px] rounded-[4px] bg-white/10`}),m(a,{className:`mt-[2px] h-[20px] w-full rounded-[4px] bg-white/10`}),m(a,{className:`mt-[2px] h-[20px] w-[120px] rounded-[4px] bg-white/10`})]}),m(a,{className:`h-[24px] w-[64px] rounded-full bg-white/10`})]},`search-all-user-skeleton-${t}`))}),m(r,{className:`flex h-[48px] items-center justify-center`,children:m(a,{className:`h-[20px] w-[88px] rounded-[4px] bg-white/10`})})]})}),h(r,{className:`mt-[24px] flex w-full justify-between gap-[16px] px-[16px]`,children:[h(r,{className:`flex w-[171px] shrink-0 flex-col gap-[16px]`,children:[m(a,{className:`h-[218px] w-[171px] rounded-[8px] bg-white/8`}),m(a,{className:`h-[120px] w-[171px] rounded-[8px] bg-white/8`})]}),h(r,{className:`flex w-[171px] shrink-0 flex-col gap-[16px]`,children:[m(a,{className:`h-[120px] w-[171px] rounded-[8px] bg-white/8`}),m(a,{className:`h-[218px] w-[171px] rounded-[8px] bg-white/8`})]})]})]})}function b({searchInputVal:a,sort:b,refreshVersion:x}){let S=g(`components.pages.search.searchResult`),[C,w]=p(!1),[T,E]=p({});d(()=>{w(!1),E({})},[x,a,b]);let D=f(()=>v(a,b),[a,b]),{data:O,isFetching:k,isLoading:A}=o(f(()=>[...n({data_type:2,extra_params:D,page:1,page_size:10}),x],[x,D]),async()=>(await t({data_type:2,extra_params:D,page:1,page_size:10})).data??{}),j=f(()=>O?.users?.list??[],[O]),M=f(()=>j.map(e=>{let t=String(e.user_id||``).trim();return!t||T[t]===void 0?e:{...e,is_following:T[t]}}),[T,j]),N=f(()=>O?.videos?.list??[],[O]),P=f(()=>C?M:M.slice(0,3),[C,M]),F=!C&&M.length>3,I=!!((A||k)&&M.length===0&&N.length===0),L=!k&&M.length===0&&N.length===0;return I?m(y,{}):L?m(c,{text:S(`searchAll.emptyResult`)}):h(r,{className:`w-full pb-[24px]`,children:[P.length>0&&m(r,{className:`px-[16px]`,children:h(r,{className:`overflow-hidden rounded-[8px] bg-white/10`,children:[m(r,{className:`flex flex-col gap-[16px] px-[15px] pt-[16px] ${F?``:`pb-[16px]`}`.trim(),children:P.map((e,t)=>m(l,{item:e,onFollowChange:t=>{let n=String(e.user_id||``).trim();n&&E(e=>({...e,[n]:t?1:0}))}},String(e.user_id??t)))}),F&&h(`button`,{type:`button`,className:`flex h-[48px] w-full items-center justify-center gap-[4px] rounded-bl-[8px] rounded-br-[8px] text-[rgba(255,255,255,0.7)]`,onClick:()=>w(!0),children:[m(i,{className:`text-[14px] leading-[20px] font-normal`,children:`展开全部`}),m(r,{className:`flex size-[24px] items-center justify-center`,children:m(_,{className:`h-[7.778px] w-[12.728px] text-[rgba(255,255,255,0.7)]`})})]})]})}),N.length>0&&m(u,{list:N,title:`相似推荐`,onMoreClick:()=>{e.emit(s.EXCHANGE_SEARCH_TYPE,`video`)},sectionClassName:P.length>0?`mt-[24px] w-full`:`w-full`})]})}export{b as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";import{Box as e}from"../../ui/box.mjs";import{Text as t}from"../../ui/text.mjs";import{jsx as n,jsxs as r}from"react/jsx-runtime";function i(){return r(`svg`,{width:`64`,height:`64`,viewBox:`0 0 64 64`,fill:`none`,"aria-hidden":!0,children:[n(`path`,{d:`M0 56V8C0 3.58172 3.58172 0 8 0H44.1975L63.9564 19.1496V56C63.9564 60.4183 60.3747 64 55.9564 64H8C3.58172 64 0 60.4183 0 56Z`,fill:`#1B1829`,stroke:`#322F3E`}),n(`path`,{d:`M44.198 11.2184V0L63.9996 19.2184H52.198C47.7797 19.2184 44.198 15.6367 44.198 11.2184Z`,fill:`#302D3E`}),n(`path`,{transform:`translate(20.982, 21.076)`,d:`M10.0632 0C15.621 0 20.1265 4.50548 20.1265 10.0632C20.1265 12.2975 19.3968 14.3606 18.1649 16.0304L21.5505 19.415C22.1398 20.0045 22.1399 20.961 21.5505 21.5505C20.961 22.1399 20.0045 22.1398 19.415 21.5505L16.0304 18.1649C14.3606 19.3968 12.2975 20.1265 10.0632 20.1265C4.50548 20.1265 0 15.621 0 10.0632C0 4.50548 4.50548 0 10.0632 0ZM10.0632 3.01897C6.17282 3.01897 3.01897 6.17282 3.01897 10.0632C3.01897 13.9537 6.17282 17.1075 10.0632 17.1075C13.9537 17.1075 17.1075 13.9537 17.1075 10.0632C17.1075 6.17282 13.9537 3.01897 10.0632 3.01897Z`,fill:`#54525E`})]})}function a({text:a}){return r(e,{className:`flex flex-1 flex-col items-center pt-[72px]`,children:[n(i,{}),n(t,{className:`mt-[16px] text-center text-[15px] font-normal text-[#54525E]`,children:a})]})}export{a as SearchResultEmpty};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{
|
|
2
|
+
"use client";import{Box as e}from"../../ui/box.mjs";import{Popover as t,PopoverContent as n,PopoverTrigger as r}from"../../ui/popover.mjs";import{SEARCH_RESULT_SORT_OPTIONS as i}from"./shared.mjs";import{memo as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";function l({className:e}){return c(`svg`,{viewBox:`0 0 22 15`,fill:`currentColor`,"aria-hidden":!0,className:e,children:[s(`rect`,{x:`0`,y:`0`,width:`13.5`,height:`2`,rx:`1`}),s(`rect`,{x:`0`,y:`6.5`,width:`13.5`,height:`2`,rx:`1`}),s(`rect`,{x:`0`,y:`13`,width:`13.5`,height:`2`,rx:`1`}),s(`path`,{d:`M15 1C15 0.447715 15.4477 0 16 0C16.5523 0 17 0.447715 17 1V11.2969L18.2412 9.84961C18.6006 9.43028 19.2311 9.38179 19.6504 9.74121C20.0697 10.1006 20.1182 10.7311 19.7588 11.1504L16.7588 14.6504C16.4865 14.9681 16.0458 15.0826 15.6533 14.9375C15.2608 14.7923 15 14.4185 15 14V1Z`})]})}const u=a(({searchType:a,onChange:u,tabList:d,sort:f,onSortChange:p})=>{let[m,h]=o(!1);return s(e,{as:`nav`,className:`sticky top-0 z-40 px-[16px] pb-[16px] pt-[12px]`,children:c(e,{className:`flex h-[24px] items-center justify-between`,children:[s(e,{className:`flex items-center gap-[10px]`,children:d.map(e=>s(`button`,{type:`button`,className:`text-[16px] leading-[24px] transition-colors ${a===e.value?`font-medium text-white`:`font-normal text-white/80`}`,onClick:()=>{a!==e.value&&u(e.value)},children:e.label},e.value))}),c(t,{open:m,onOpenChange:h,children:[s(r,{"aria-label":`排序筛选`,className:`flex size-[24px] items-center justify-center`,children:s(l,{className:`h-[15px] w-[20px] text-white/40`})}),s(n,{side:`bottom`,align:`end`,sideOffset:8,className:`w-[132px] border border-white/10 bg-[#10071E]/95 p-[8px] backdrop-blur-[18px]`,children:s(e,{className:`flex flex-col gap-[4px]`,children:i.map(e=>s(`button`,{type:`button`,className:`rounded-[8px] px-[12px] py-[8px] text-left text-[14px] leading-[20px] ${e.value===f?`bg-white/10 text-white`:`text-white/70`}`,onClick:()=>{p(e.value),h(!1)},children:e.label},e.value))})})]})]})})});u.displayName=`SearchTab`;export{u as SearchTab};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{
|
|
2
|
+
"use client";import{useUserStore as e}from"../../../store/modules/user-store.mjs";import{gContentGetRecommendVideoList as t,pInteractionFollow as n,pInteractionUnfollow as r}from"../../../service/generated/client.mjs";import{Image as i}from"../../ui/image.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{Skeleton as c}from"../../ui/skeleton.mjs";import{usePaginated as l}from"../../../hooks/query/use-query.mjs";import{useRequireLogin as u}from"../../../hooks/use-auth.mjs";import d from"../../../assets/images/user/default_avatar.mjs";import{SearchResultEmpty as f}from"./search-empty.mjs";import{formatSearchFollowerCount as p,resolveSearchUserDescription as m,resolveSearchUserName as h}from"./shared.mjs";import{memo as g,useCallback as _,useEffect as v,useMemo as y,useState as b}from"react";import{Check as x,Plus as S}from"lucide-react";import{jsx as C,jsxs as w}from"react/jsx-runtime";import{toast as T}from"sonner";import{useTranslations as E}from"next-intl";import D from"next/link";const O=typeof d==`string`?d:d.src;function k(e,t){return String(t||e?.user_id||e?.userId||``).trim()}function A({src:e,alt:t,variant:n}){let r=n===`row`?`size-[56px] p-[4.375px]`:`size-[40px] p-[3px]`,o=n===`row`?`border-[3px]`:`border-[2px]`;return C(a,{className:`rounded-full bg-white/20 ${r}`,children:C(a,{className:`relative size-full overflow-hidden rounded-full border-solid border-white/40 ${o}`,children:C(i,{src:e||O,fill:!0,objectFit:`cover`,alt:t})})})}function j({item:t,variant:i,onFollowChange:a}){let o=u(),{userInfo:c,userId:l}=e(),[d,f]=b(!1),p=k(c,l),m=p!==``&&p===String(t.user_id||``).trim(),h=!!t.is_following,g=_(()=>{!t.user_id||d||o(()=>{let i=k(e.getState().userInfo,e.getState().userId);if(!i){T.error(`请先登录`);return}(async()=>{f(!0);try{let e=h?await r({follower_id:i,followee_id:t.user_id}):await n({follower_id:i,followee_id:t.user_id});if(e.code!==0){T.error(e.message||(h?`取消关注失败`:`关注失败`));return}a?.(!h)}catch(e){console.error(`切换关注状态失败`,e),T.error(h?`取消关注失败`:`关注失败`)}finally{f(!1)}})()})},[h,t.user_id,a,d,o]);return m?null:i===`grid`?C(`button`,{type:`button`,"aria-label":h?`取消关注`:`关注`,className:`flex size-[24px] shrink-0 items-center justify-center rounded-full transition-opacity ${h?`bg-white/15 text-white`:`bg-black/30 text-white/75`} ${d?`opacity-50`:``}`,onClick:g,children:C(h?x:S,{className:`size-[14px]`})}):w(`button`,{type:`button`,className:`flex h-[24px] shrink-0 items-center justify-center rounded-full transition-opacity ${h?`border border-white/25 bg-white/10 px-[8px] text-white/85`:`w-[64px] border border-white/60 bg-black/20 text-white/60`} ${d?`opacity-50`:``}`,onClick:g,children:[!h&&C(S,{className:`mr-[2px] size-[16px]`}),C(s,{className:h?`text-[12px] leading-[18px]`:`text-[14px] leading-[20px]`,children:h?`已关注`:`关注`})]})}const M=g(({item:e,onFollowChange:t})=>{let n=h(e),r=m(e),i=p(e.follower_count);return w(a,{className:`flex w-full items-center gap-[8px]`,children:[w(D,{href:`/profile/${e.user_id||``}`,className:`flex min-w-0 flex-1 items-center gap-[8px]`,children:[C(A,{src:e.avatar,alt:n||`用户头像`,variant:`row`}),w(a,{className:`min-w-0 max-w-[194px] flex-1`,children:[C(s,{className:`block truncate text-[14px] leading-[20px] font-normal text-white`,children:n}),C(s,{className:`mt-[2px] block truncate text-[14px] leading-[20px] text-white/60`,children:r}),w(s,{className:`mt-[2px] block truncate text-[14px] leading-[20px] text-white/60`,children:[`粉丝:`,i]})]})]}),C(j,{item:e,variant:`row`,onFollowChange:t})]})});M.displayName=`SearchUserRowCard`;const N=g(({item:e,onFollowChange:t})=>{let n=h(e),r=m(e);return w(a,{className:`h-[170px] rounded-[8px] bg-white/10 px-[16px] py-[16px]`,children:[w(a,{className:`flex items-start justify-between`,children:[C(D,{href:`/profile/${e.user_id||``}`,className:`flex items-center`,children:C(A,{src:e.avatar,alt:n||`用户头像`,variant:`grid`})}),C(j,{item:e,variant:`grid`,onFollowChange:t})]}),w(D,{href:`/profile/${e.user_id||``}`,className:`mt-[16px] block`,children:[C(s,{className:`block truncate text-[14px] leading-[20px] font-medium text-white`,children:n}),C(s,{className:`mt-[8px] block text-[14px] leading-[20px] text-white/60 line-clamp-4`,children:r})]})]})});N.displayName=`SearchUserGridCard`;const P={background:`linear-gradient(180deg, rgba(255,30,255,0.8) 0%, rgba(108,67,238,0) 100%), linear-gradient(145deg, rgba(255,30,172,0.6) 2.9%, rgba(108,67,238,0) 100%), linear-gradient(180deg, rgba(151,86,227,1) 0%, rgba(108,67,238,1) 100%)`,WebkitMask:`linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)`,WebkitMaskComposite:`xor`,maskComposite:`exclude`,padding:`0.5px`},F=g(({item:e,isFirst:t,onFollowChange:n})=>w(a,{className:`relative flex h-[88px] items-center rounded-[8px] bg-white/10 px-[12px] py-[8px]`,children:[t&&C(a,{className:`pointer-events-none absolute inset-0 rounded-[8px]`,style:P}),C(M,{item:e,onFollowChange:n})]}));F.displayName=`SearchUserCard`;function I(){return C(a,{className:`flex flex-col gap-[12px] px-[16px]`,children:Array.from({length:6}).map((e,t)=>w(a,{className:`flex h-[88px] items-center gap-[8px] rounded-[8px] bg-white/8 px-[12px] py-[8px]`,children:[C(c,{className:`size-[56px] shrink-0 rounded-full bg-white/10`}),w(a,{className:`min-w-0 flex-1`,children:[C(c,{className:`h-[20px] w-[100px] rounded-[4px] bg-white/10`}),C(c,{className:`mt-[4px] h-[20px] w-[160px] rounded-[4px] bg-white/10`}),C(c,{className:`mt-[4px] h-[20px] w-[80px] rounded-[4px] bg-white/10`})]}),C(c,{className:`h-[24px] w-[64px] shrink-0 rounded-full bg-white/10`})]},`search-user-row-skeleton-${t}`))})}const L=g(({inputVal:e,sort:n,refreshVersion:r})=>{let i=E(`components.pages.search.searchResult`),[s,c]=b({});v(()=>{c({})},[e,r,n]);let u=_(async r=>await t({data_type:2,extra_params:JSON.stringify({type:4,keywords:e,sort:n}),page:r||1,page_size:20}),[e,n]),d=l({key:y(()=>[`search-result`,`user`,e,n,r],[e,r,n]),initialPageParam:1,async queryFn(e){return(await u(e))?.data?.users??{has_more:!1,total:0,list:[]}},getNextPageParam(e,t){if(e.has_more)return t.length+1}}),p=y(()=>(d.data?.pages??[]).flatMap(e=>e.list??[]).map(e=>{let t=String(e.user_id||``).trim();return!t||s[t]===void 0?e:{...e,is_following:s[t]}}),[s,d.data?.pages]),m=!!((d.isPending||d.isFetching)&&p.length===0),h=_((e,t)=>{e&&c(n=>({...n,[e]:t?1:0}))},[]),g=_(async()=>{try{await d.fetchNextPage()}catch(e){console.error(`获取用户搜索结果失败`,e)}},[d]);return m?C(I,{}):p.length===0?C(f,{text:i(`searchUser.emptyResult`)}):w(a,{className:`w-full pb-[24px]`,children:[C(a,{className:`flex flex-col gap-[12px] px-[16px]`,children:p.map((e,t)=>C(F,{item:e,isFirst:t===0,onFollowChange:t=>{h(String(e.user_id||``),t)}},String(e.user_id??t)))}),d.hasNextPage&&C(o,{loadMore:async e=>g(),hasMore:d.hasNextPage,className:`w-full`})]})});L.displayName=`SearchUser`;export{M as SearchUserRowCard,L as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";import{gContentGetRecommendVideoList 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{Skeleton as r}from"../../ui/skeleton.mjs";import{usePaginated as i}from"../../../hooks/query/use-query.mjs";import{getPostDetailPagePath as a}from"../../../utils/tools.mjs";import o from"../../../assets/icons/common/right_arrow_thin.mjs";import{WaterfallRecommend as s}from"../../common/list/waterfall-recommend/waterfall-recommend.mjs";import{SearchResultEmpty as c}from"./search-empty.mjs";import{memo as l,useCallback as u,useMemo as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{useTranslations as m}from"next-intl";function h(){return p(t,{className:`flex w-full justify-between gap-[16px] px-[16px]`,children:[p(t,{className:`flex w-[171px] shrink-0 flex-col gap-[16px]`,children:[f(r,{className:`h-[218px] w-[171px] rounded-[8px] bg-white/8`}),f(r,{className:`h-[120px] w-[171px] rounded-[8px] bg-white/8`}),f(r,{className:`h-[218px] w-[171px] rounded-[8px] bg-white/8`})]}),p(t,{className:`flex w-[171px] shrink-0 flex-col gap-[16px]`,children:[f(r,{className:`h-[120px] w-[171px] rounded-[8px] bg-white/8`}),f(r,{className:`h-[218px] w-[171px] rounded-[8px] bg-white/8`}),f(r,{className:`h-[120px] w-[171px] rounded-[8px] bg-white/8`})]})]})}function g(e){let t=Number(e);if(!(!Number.isFinite(t)||t<=0))return t>10&&t<=100?t/10:Math.min(t,10)}function _(e){return String(e.img_type??``).trim().toLowerCase()===`long`?`short`:`tall`}function v(e){let t=String(e.source_tags||``).trim();if(t)return t.split(`,`)[0]?.trim()||void 0}function y(e){let t=Number(e.episode_count||0);if(!t||t<=0)return;let n=Number(e.update_status??-1);return n===1?`${t}集全`:n===0?`更新中`:`${t}集`}function b(e){let t=Number(e||0);return!Number.isFinite(t)||t<=0?``:t>=1e4?`${(t/1e4).toFixed(t>=1e5?0:1).replace(/\.0$/,``)}W`:t>=1e3?`${(t/1e3).toFixed(1).replace(/\.0$/,``)}K`:`${Math.floor(t)}`}function x(e){let t=e.filter(e=>String(e.video_id||``).trim()).map((e,t)=>{let n=String(e.video_id||``).trim(),r=String(e.name||``).trim(),i=String(e.group_name||e.description||``).trim();return{key:`${n}-${t}`,sourceIndex:t,href:n?a({id:n,contentType:0}):`#`,cardKind:_(e),coverUrl:String(e.img_y||e.img_x||``).trim(),title:r,badgeText:v(e),episodeText:y(e),metaPrimaryText:i||void 0,heatText:b(e.play_count)||void 0,score:g(e.score)}}),n=[],r=[],i=0,o=0;return t.forEach(e=>{let t=(e.cardKind===`short`?120:218)+16;i<=o?(n.push(e),i+=t):(r.push(e),o+=t)}),{left:n,right:r}}function S(){return f(o,{className:`size-[16px]`})}const C=l(({list:e,title:t,onMoreClick:n,sectionClassName:r=`w-full`})=>{let i=d(()=>x(e),[e]);return e.length===0?null:f(s,{title:t||``,columns:i,sectionClassName:r,titleClassName:`min-w-0 flex-1 text-[18px] leading-[24px] font-medium line-clamp-1 text-white`,moreLinkClassName:`ml-[8px] flex size-[24px] shrink-0 items-center justify-center text-white/50`,moreIcon:n?f(S,{}):void 0,onMoreClick:n})});C.displayName=`SearchVideoWaterfall`;const w=l(({inputVal:r,sort:a,refreshVersion:o})=>{let s=m(`components.pages.search.searchResult`),l=u(async t=>await e({data_type:2,extra_params:JSON.stringify({type:3,keywords:r,sort:a}),page:t||1,page_size:20}),[r,a]),g=i({key:d(()=>[`search-result`,`video`,r,a,o],[r,o,a]),initialPageParam:1,async queryFn(e){return(await l(e))?.data?.videos??{has_more:!1,total:0,list:[]}},getNextPageParam(e,t){if(e.has_more)return t.length+1}}),_=d(()=>(g.data?.pages??[]).flatMap(e=>e.list??[]),[g.data?.pages]),v=!!((g.isPending||g.isFetching)&&_.length===0),y=u(async()=>{try{await g.fetchNextPage()}catch(e){console.error(`获取视频搜索结果失败`,e)}},[g]);return v?f(h,{}):_.length===0?f(c,{text:s(`searchVideoInfo.noRelevantContent`)}):p(t,{className:`w-full pb-[24px]`,children:[f(C,{list:_}),g.hasNextPage&&f(n,{loadMore:async e=>y(),hasMore:g.hasNextPage,className:`w-full`})]})});w.displayName=`SearchVideoInfo`;export{C as SearchVideoWaterfall,w as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
const e=[{label:`综合`,value:1},{label:`最新`,value:2},{label:`最热`,value:3}];function t(e){for(let t of e)if(typeof t==`string`&&t.trim())return t.trim();return``}function n(e){return t([e.nick_name,e.nickname,e.display_id,e.user_id])}function r(e){return t([e.signature,e.description,e.text,e.introduce,e.bio])}function i(e){let t=Number(e||0);return!Number.isFinite(t)||t<=0?`0`:t>=1e8?`${(t/1e8).toFixed(1).replace(/\.0$/,``)}亿`:t>=1e4?`${(t/1e4).toFixed(1).replace(/\.0$/,``)}万`:`${Math.floor(t)}`}export{e as SEARCH_RESULT_SORT_OPTIONS,i as formatSearchFollowerCount,r as resolveSearchUserDescription,n as resolveSearchUserName};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";import{useRouter as e}from"../../../utils/use-compatible-router.mjs";import{Input as t}from"../../ui/input.mjs";import{toast as n}from"../../../ui.mjs";import{useKeepAliveEffect as r,useKeepAliveState as i}from"../../common/keep-scroll-position/index.mjs";import{LeftArrowIcon as a}from"../../common/icons/left-arrow.mjs";import{memo as o,useCallback as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{useSearchParams as u}from"next/navigation";import{useTranslations as d}from"next-intl";const f=o(({setSearchInputVal:o,initInputVal:f,initInputVersion:p,addSearchHistory:m})=>{let h=d(`components.pages.search`),g=e(),[_,v]=i(`search-input-val`,``),y=u().get(`q`),b=e=>{v(e.target.value)},x=s(e=>{o(e),m(e)},[m,o]);r(()=>{f&&(v(f),x(f))},[x,f,p,v],`search-init-input-effect`),r(()=>{y&&(v(y),x(y))},[x,v,y],`search-url-params-effect`);function S(){if(n.dismiss(),window.location.search.split(`from_code=`)[1]){g.push(`/`);return}g.back()}return c(`div`,{className:`app-top-nav w-full`,children:l(`header`,{className:`flex h-[60px] items-center gap-[8px] px-[16px] pb-[10px] pt-[16px]`,children:[c(`button`,{type:`button`,"aria-label":`返回`,className:`flex size-[24px] shrink-0 items-center justify-center text-white`,onClick:S,children:c(a,{className:`h-[16px] w-[16px]`})}),c(`div`,{className:`relative h-[34px] min-w-0 flex-1`,children:l(`div`,{className:`flex h-full min-w-0 flex-1 items-center overflow-hidden rounded-[100px] border-[0.5px] border-[rgba(230,42,255,0.9)] bg-black/40 backdrop-blur-[2px]`,children:[c(`div`,{className:`flex h-full min-w-0 flex-1 items-center pl-[20px] pr-[8px]`,children:c(t,{placeholder:h(`topHeader.placeholder`),maxLength:20,value:_,className:`!h-[24px] !w-full !rounded-none !border-0 !bg-transparent !px-0 !py-0 !text-[14px] !leading-[24px] !text-white/90 placeholder:!text-white/90`,onChange:b,onKeyDown:e=>{if(e.key===`Enter`){if(e.preventDefault(),!_.trim())return;x(_.trim())}}})}),c(`button`,{type:`button`,className:`mx-[2px] flex h-[30px] w-[56px] shrink-0 items-center justify-center rounded-[100px] bg-[linear-gradient(90deg,#9756E3_0%,#6C43EE_100%)] text-[14px] leading-[20px] text-white`,onClick:()=>{_.trim()&&x(_.trim())},children:h(`topHeader.search`)})]})})]})})});f.displayName=`SearchTopHeader`;export{f as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{Button as e}from"../../../ui/button.mjs";import{hashPassword as t}from"../../../../utils/common.mjs";import{useUserStore as n}from"../../../../store/modules/user-store.mjs";import{pUserResetPassword as r,pUserSendResetPasswordEmailCode as i,pUserVerifyResetPasswordEmailCode as
|
|
2
|
+
"use client";import{Button as e}from"../../../ui/button.mjs";import{hashPassword as t}from"../../../../utils/common.mjs";import{useUserStore as n}from"../../../../store/modules/user-store.mjs";import{pUserResetPassword as r,pUserSendResetPasswordEmailCode as i,pUserVerifyResetPasswordEmailCode as ee}from"../../../../service/generated/client.mjs";import{getPasswordValidationErrorText as a,validatePasswordPair as te}from"../../../../utils/password-validator.mjs";import{Box as o}from"../../../ui/box.mjs";import{Drawer as s,DrawerContent as ne,DrawerDescription as re,DrawerHeader as ie,DrawerTitle as c}from"../../../ui/drawer.mjs";import{Text as l}from"../../../ui/text.mjs";import u from"../../../ui/legacy/button.mjs";import{HeaderNav as ae}from"../../../common/header-nav/client.mjs";import{EyeIcon as d}from"../../../../assets/icons/eye-icon.mjs";import{EyeOffIcon as f}from"../../../../assets/icons/eye-off-icon.mjs";import p from"../../../ui/legacy/input.mjs";import{useEffect as m,useMemo as h,useRef as g,useState as _}from"react";import{jsx as v,jsxs as y}from"react/jsx-runtime";import{toast as b}from"sonner";import{useTranslations as x}from"next-intl";function S(e){let[t,n]=e.split(`@`);return!t||!n?e:`${t.slice(0,3)}***${t.length>3?t.slice(-1):``}@${n}`}function C(C){let w=x(`components.pages.settings.components`),{open:oe,onOpenChange:T}=C,E=n(e=>e.userInfo),[D,O]=_([,,,,,,].fill(``)),[k,A]=_(0),j=g(null),M=D.includes(``),[N,P]=_(``),F=g(null),[se,I]=_(60),[L,R]=_(!1),z=h(()=>S(E?.email||``),[E?.email]);async function B(){if(L)return;let e=b.loading(w(`resetPasswordDrawer.sending`));try{let t=await i({user_id:E?.user_id});t.code===0?(b.success(w(`resetPasswordDrawer.codeSentSuccess`),{id:e}),R(!0),I(60),P(``)):b.error(t.message||w(`resetPasswordDrawer.sendFailed`),{id:e})}catch(t){console.error(t),b.error(w(`resetPasswordDrawer.sendFailed`),{id:e})}}function V(){W(e=>e===1?e:e+1)}async function H(){let e=b.loading(w(`resetPasswordDrawer.verifying`));try{P(``);let t=await ee({user_id:E?.user_id,email_code:D.join(``)});t.code===0?(b.success(w(`resetPasswordDrawer.verifySuccess`),{id:e}),V()):(P(t.message||w(`resetPasswordDrawer.verifyFailed`)),b.error(t.message||w(`resetPasswordDrawer.verifyFailed`),{id:e}))}catch(t){console.error(t),P(w(`resetPasswordDrawer.verifyFailed`)),b.error(w(`resetPasswordDrawer.verifyFailed`),{id:e})}}m(()=>{if(L)return F.current=setInterval(()=>{I(e=>e<=1?(F.current&&clearInterval(F.current),R(!1),60):e-1)},1e3),()=>{F.current&&clearInterval(F.current)}},[L]);let[U,W]=_(0);m(()=>{U===0&&j.current?.focus()},[U]);let[G,K]=_({password:``,confirmPassword:``}),[q,J]=_(!1),[Y,ce]=_(!1),[X,le]=_(!1),Z=h(()=>te(G.password,G.confirmPassword),[G.password,G.confirmPassword]),Q=h(()=>a(Z),[Z]),$=h(()=>q||G.password.length===0||G.confirmPassword.length===0||Z.type!==`none`,[q,G.password.length,G.confirmPassword.length,Z.type]);async function ue(){if($)return;let e=b.loading(w(`resetPasswordDrawer.submitting`));try{J(!0);let n=await r({user_id:E?.user_id,password:t(G.password)});n.code===0?(b.success(w(`resetPasswordDrawer.passwordResetSuccess`),{id:e}),K({password:``,confirmPassword:``}),O([,,,,,,].fill(``)),A(0),T(!1)):b.error(n.message||w(`resetPasswordDrawer.resetFailed`),{id:e})}catch(t){console.error(t),b.error(w(`resetPasswordDrawer.resetFailed`),{id:e})}finally{J(!1)}}function de(e){let t=e.target.value.replace(/\D/g,``);if(t.length===0)return;let n=[...D],r=t.split(``),i=k;for(let e of r){if(i>=6)break;n[i]=e,i+=1}O(n),A(Math.min(i,5)),N&&P(``)}function fe(e){if(e.key===`Backspace`){e.preventDefault();let t=[...D];t[k]?t[k]=``:k>0&&(t[k-1]=``,A(k-1)),O(t),N&&P(``);return}e.key===`ArrowLeft`&&k>0&&A(k-1),e.key===`ArrowRight`&&k<5&&A(k+1)}function pe(e){A(e),j.current?.focus()}let me=y(o,{className:`p-6 min-h-[calc(100vh-48px)] bg-[var(--color-surface-panel-dark)]`,children:[y(o,{className:`space-y-[12px]`,children:[v(l,{className:`text-[24px] leading-[32px] font-bold text-text1`,children:w(`resetPasswordDrawer.verifyTitle`)}),v(o,{className:`flex items-center justify-between gap-[8px]`,children:y(l,{className:`min-w-0 flex-1 truncate text-[12px] leading-[16px] text-text2`,children:[w(`resetPasswordDrawer.boundEmailNotice`),v(l,{className:`dark:text-white text-white`,children:z}),w(`resetPasswordDrawer.verifyHint`)]})})]}),y(o,{className:`mt-[28px]`,children:[y(o,{className:`relative`,children:[v(`input`,{ref:j,type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,value:``,onChange:de,onKeyDown:fe,className:`absolute inset-0 h-full w-full opacity-0 pointer-events-none caret-transparent`,autoComplete:`one-time-code`}),v(o,{className:`flex justify-between gap-[10px]`,children:D.map((e,t)=>v(o,{onClick:()=>pe(t),className:`
|
|
3
3
|
h-[48px] flex-1 rounded-[6px] border-2 flex items-center justify-center cursor-pointer transition-all duration-200
|
|
4
4
|
${N?`border-theme5 bg-line1`:t===k?`border-theme3 bg-theme3/10`:`border-transparent bg-line1`}
|
|
5
|
-
`,children:
|
|
5
|
+
`,children:v(l,{className:`text-[24px] leading-none font-semibold text-text1 select-none`,children:e})},`${t}-${e||`empty`}`))})]}),v(o,{className:`min-h-[22px] pt-[8px]`,children:v(l,{className:`text-[12px] leading-[18px] text-theme5`,children:N})}),v(u,{type:`button`,onClick:H,disabled:M,className:`mt-[44px] h-[48px] w-full !rounded-[8px] !border-0 !px-0 !py-0 text-[16px] font-normal leading-[24px] text-white disabled:opacity-100 active:opacity-90 ${M?`!text-white/60`:``}`,style:{background:M?`linear-gradient(90deg, rgba(151, 86, 227, 0.45) 0%, rgba(108, 67, 238, 0.45) 100%)`:`var(--gradient-action-button)`},children:`提交`}),L?v(o,{className:`mt-[16px] w-full text-center text-[15px] leading-[24px] text-[#9DA3AC]`,children:w(`resetPasswordDrawer.resendCountdown`,{seconds:se})}):v(e,{variant:`link`,onClick:B,className:`mt-[16px] h-auto w-full justify-center !rounded-none bg-transparent !px-0 !py-0 text-[14px] leading-[24px] font-medium no-underline hover:no-underline`,style:{backgroundImage:`var(--gradient-action-button)`,backgroundClip:`text`,WebkitBackgroundClip:`text`,color:`transparent`},children:w(`resetPasswordDrawer.sendCode`)})]})]}),he=y(o,{className:`flex min-h-[calc(100vh-48px)] flex-col bg-[var(--color-surface-panel-dark)]`,children:[y(o,{className:`px-[32px] pt-[15px]`,children:[v(l,{className:`text-[16px] leading-[20px] text-text1`,children:w(`resetPasswordDrawer.setNewPasswordHint`)}),y(o,{className:`mt-[16px]`,children:[y(o,{className:`relative flex h-[48px] items-center rounded-[8px] border bg-white/10 px-[16px] ${Q?`border-theme5`:`border-transparent`}`,children:[v(p,{value:G.password,onChange:e=>K(t=>({...t,password:e})),placeholder:w(`resetPasswordDrawer.passwordPlaceholder`),type:Y?`text`:`password`,autoComplete:`new-password`,autoCorrect:`off`,autoCapitalize:`none`,spellCheck:!1,"data-lpignore":`true`,"data-1p-ignore":`true`,"data-form-type":`other`,className:`rounded-none bg-transparent !px-0 !py-0 text-[14px] leading-[20px] text-text1 placeholder:text-white/60`}),v(`button`,{type:`button`,onClick:()=>ce(!Y),className:`absolute right-[16px] top-1/2 -translate-y-1/2 text-white/50 transition-colors hover:text-white/80`,children:v(Y?d:f,{className:`h-[24px] w-[24px]`})})]}),y(o,{className:`mt-[16px] relative flex h-[48px] items-center rounded-[8px] border bg-white/10 px-[16px] ${Z.type===`not-match`?`border-theme5`:`border-transparent`}`,children:[v(p,{value:G.confirmPassword,onChange:e=>K(t=>({...t,confirmPassword:e})),placeholder:w(`resetPasswordDrawer.confirmPasswordPlaceholder`),type:X?`text`:`password`,autoComplete:`new-password`,autoCorrect:`off`,autoCapitalize:`none`,spellCheck:!1,"data-lpignore":`true`,"data-1p-ignore":`true`,"data-form-type":`other`,className:`rounded-none bg-transparent !px-0 !py-0 text-[14px] leading-[20px] text-text1 placeholder:text-white/60`}),v(`button`,{type:`button`,onClick:()=>le(!X),className:`absolute right-[16px] top-1/2 -translate-y-1/2 text-white/50 transition-colors hover:text-white/80`,children:v(X?d:f,{className:`h-[24px] w-[24px]`})})]}),Q?v(o,{className:`mt-[12px]`,children:v(l,{className:`text-[12px] leading-[16px] text-theme5`,children:Q})}):null]})]}),v(o,{className:`mt-auto bg-[rgba(5,1,15,0.9)] px-[16px] pt-[8px] pb-[calc(env(safe-area-inset-bottom)+8px)] backdrop-blur-[4px]`,children:v(u,{onClick:ue,disabled:$,className:`h-[48px] w-full rounded-[8px] bg-[linear-gradient(90deg,#A656E3_10%,#6C43EE_100%)] px-0 py-0 text-[16px] leading-[24px] font-normal text-white disabled:bg-[linear-gradient(90deg,rgba(166,86,227,0.45)_10%,rgba(108,67,238,0.45)_100%)] disabled:text-white/60 active:opacity-90`,children:w(q?`resetPasswordDrawer.submitting`:`resetPasswordDrawer.resetPassword`)})})]});return y(s,{open:oe,onOpenChange:T,direction:`right`,handleOnly:!0,children:[y(ie,{className:`hidden`,children:[v(c,{children:w(`resetPasswordDrawer.title`)}),v(re,{children:w(`resetPasswordDrawer.title`)})]}),y(ne,{className:`!w-full`,children:[v(ae,{className:`!bg-[var(--color-surface-panel-dark)] !border-transparent`,onBack:()=>T(!1)}),U===0&&me,U===1&&he]})]})}export{C as ResetPasswordDrawer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{cn as e}from"../../../../utils/cn.mjs";import{
|
|
2
|
+
"use client";import{cn as e}from"../../../../utils/cn.mjs";import{useUserStore as t}from"../../../../store/modules/user-store.mjs";import{gUserGetUserPrivacySettings as n}from"../../../../service/generated/client.mjs";import{Box as r}from"../../../ui/box.mjs";import{useLoginModalStore as i}from"../../../../store/modules/login-modal-store.mjs";import{useDeleteRequest as a,useRequest as o}from"../../../../hooks/query/use-query.mjs";import{locales as s}from"../../../../i18n.mjs";import{DeleteConfirmDialog as c}from"../../../common/delete-confirm-dialog/delete-confirm-dialog.mjs";import{HeaderNav as l}from"../../../common/header-nav/client.mjs";import{ResetPasswordDrawer as u}from"./reset-password-drawer.mjs";import{useEffect as d,useRef as f,useState as p}from"react";import{ChevronRight as m}from"lucide-react";import{jsx as h,jsxs as g}from"react/jsx-runtime";import{useRouter as _}from"next/navigation";import{useLocale as v,useTranslations as y}from"next-intl";import b from"next/link";function x(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 S({className:m}={}){let S=y(`components.pages.settings.components`),w=v(),{open:T}=i(),E=t(e=>e.isLogin),D=t(e=>e.token),O=t(e=>e.logout),k=t(e=>e.userId),A=(E||!!D)&&!!k,j=x(),[M,N]=p(j),P=f(j),[F,I]=p(!1),[L,R]=p(!1);a();let z=[`user-privacy-settings`,k],B=w===`zh-CN`?`en`:`zh-CN`;s.find(e=>e.code===B)?.name;let{data:V}=o(z,()=>n({user_id:k}),{enabled:!!k}),H=V?.data;d(()=>{if(!H)return;let e=x(H);N(e),P.current=e},[H]),d(()=>{P.current=M},[M]);let U=a(),W=_();function G(){U([`user-profile`,`mine`]),O(),W.push(`/user/mine`)}function K(e){R(e)}function q(){R(!0)}function J(){R(!1)}function Y(){G()}function X(e){I(e)}function Z(){if(!A){T();return}I(!0)}function Q(e){A||(e.preventDefault(),e.stopPropagation(),T())}return g(r,{className:e(`min-h-dvh bg-[var(--color-surface-panel-dark)]`,m),children:[h(l,{className:`!bg-[var(--color-surface-panel-dark)] !border-transparent`,title:S(`settings.title`)}),h(u,{open:F,onOpenChange:X}),g(r,{className:`mx-4 mt-4 flex flex-col`,children:[h(`button`,{type:`button`,className:`block w-full text-left`,onClick:Z,children:h(C,{title:S(`settings.resetPasswordTitle`)})}),h(b,{href:`/feedback`,onClick:Q,className:`block`,children:h(C,{title:S(`settings.feedbackTitle`)})})]}),F||!A?null:h(r,{className:`fixed inset-x-0 bottom-0 z-40 flex flex-col pb-[env(safe-area-inset-bottom)]`,children:h(`div`,{className:`flex flex-col items-center px-4 py-2`,style:{background:`var(--color-overlay-panel-fade-start90)`,backdropFilter:`blur(var(--effect-backdrop-blur-detail-hero))`},children:h(`button`,{type:`button`,className:`flex h-12 w-full items-center justify-center rounded-[8px] text-base text-[var(--color-text-primary)] transition-opacity active:opacity-80`,style:{background:`var(--color-surface-white10)`},onClick:q,children:S(`settings.button`)})})}),h(c,{open:L,onOpenChange:K,onCancel:J,onConfirm:Y,title:``,description:S(`settings.logoutConfirmMessage`),confirmText:S(`settings.confirm`),cancelText:S(`settings.cancel`)})]})}function C({title:e}){return g(`div`,{className:`flex h-14 items-center justify-between px-4`,children:[h(`span`,{className:`text-base text-[var(--color-text-primary)]`,children:e}),h(m,{className:`size-6 shrink-0 opacity-50 text-[var(--color-text-primary)]`})]})}export{S as Settings};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
"use client";import{cn as e}from"../../../../utils/cn.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import r
|
|
2
|
+
"use client";import{cn as e}from"../../../../utils/cn.mjs";import{Box as t}from"../../../ui/box.mjs";import{Text as n}from"../../../ui/text.mjs";import{useOpenLoginAsync as r}from"../../../../hooks/use-auth.mjs";import i from"../../../ui/legacy/button.mjs";import{memo as a}from"react";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{useTranslations as c}from"next-intl";const l=a(({className:a}={})=>{let l=c(`components.pages.userFollow.components`),u=r();return s(t,{className:e(`w-full bg-bg1 py-[20px] flex flex-col items-center justify-center relative z-[1]`,a),children:[s(n,{className:`text-[16px] leading-[22px] text-text1`,children:[l(`followNoLogin.notLoggedIn`),`~`]}),o(i,{className:`mt-[13px] w-[130px] h-[36px] leading-[36px] rounded-[8px] bg-theme5 text-[16px] text-white`,onClick:async()=>{await u()&&console.warn(`login success`)},children:l(`followNoLogin.login`)})]})});l.displayName=`FollowNoLogin`;export{l as FollowNoLogin};
|