PageSourceSearch

https://www.aipictors.com/assets/home-notifications-content-followed-item.js

js aipictors.com collected 2026-10-01 11:57:01 UTC 8,389 bytes, 102 lines download raw bytes

1import{j as s}from"./jsx-runtime.js";import{B as R}from"./badge.js";import{t as m}from"./gql-tada.js";import{w as d}from"./with-icon-url-fallback.js";import{u}from"./use-translation.js";import{c as x}from"./utils.js";import{A as f,a as h,b as k}from"./avatar.js";import{t as N}from"./to-date-time-text.js";import{L as r}from"./components.js";import{f as I}from"./format.js";import{t as F}from"./to-date-text.js";import{c as $}from"./createLucideIcon.js";/**
2 * @license lucide-react v0.562.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const T=[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]],p=$("arrow-left-right",T),j=e=>{const i=new Date(e*1e3);return I(i,"yyyy/MM/dd")},C={xl:"size-24 md:h-32 md:w-32",lg:"size-20 md:h-24 md:w-24",md:"size-12",sm:"size-8",xs:"size-6"};function P(e){var n,c,o,g,w,v,b,z,y,U,A;const i=u(),t=e.stickerSize?C[e.stickerSize]:C.md,l=e.notification.myReplies&&e.notification.myReplies.length!==0,[a]=e.notification.myReplies??[];return s.jsxs("div",{className:"flex flex-col space-y-2 border-b p-2",children:[s.jsxs(r,{to:`/posts/${(n=e.notification.work)==null?void 0:n.id}`,className:"flex items-center rounded-md p-2 transition-all hover:bg-zinc-100 dark:hover:bg-zinc-900",onClick:e.onClick,children:[s.jsx("img",{src:d((c=e.notification.user)==null?void 0:c.iconUrl),alt:"thumbnail",className:"size-8 rounded-full object-cover"}),s.jsxs("div",{className:"ml-2 flex w-full flex-col space-y-2 overflow-hidden",children:[s.jsxs("p",{className:"text-ellipsis",children:[i(`${(o=e.notification.user)==null?void 0:o.name}さんがコメントしました`,`${(g=e.notification.user)==null?void 0:g.name} commented`),e.notification.message&&s.jsxs(s.Fragment,{children:[i("「"," '"),e.notification.message,i("」"," '")]})]}),((w=e.notification.sticker)==null?void 0:w.imageUrl)&&s.jsx("img",{src:e.notification.sticker.imageUrl,alt:"sticker",className:x(t,"object-cover")}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("p",{className:"text-sm opacity-80",children:i(N(e.notification.createdAt),j(e.notification.createdAt))}),l?s.jsx(R,{variant:"secondary",children:i("返信済み","Replied")}):s.jsx(R,{variant:"default",children:i("未返信","Not replied")})]})]}),s.jsx("div",{className:"size-12 overflow-hidden rounded-md",children:s.jsx("img",{src:(v=e.notification.work)==null?void 0:v.smallThumbnailImageURL,alt:"thumbnail",className:"size-16 object-cover"})})]}),a&&s.jsxs("div",{className:"ml-12 flex items-center space-x-2",children:[s.jsxs(f,{className:"size-8",children:[s.jsx(h,{className:"size-8 rounded-full object-cover",src:d((b=a.user)==null?void 0:b.iconUrl),alt:"thumbnail"}),s.jsx(k,{})]}),s.jsxs("div",{className:"flex flex-col space-y-2",children:[s.jsxs("p",{className:"text-ellipsis",children:[i(`${(z=a.user)==null?void 0:z.name}返信しました`,`${(y=a.user)==null?void 0:y.name} replied`),a.text&&s.jsxs(s.Fragment,{children:[i("「"," '"),a.text,i("」"," '")]})]}),((U=a.sticker)==null?void 0:U.imageUrl)&&s.jsx("img",{src:(A=a.sticker)==null?void 0:A.imageUrl,alt:"sticker",className:x(t,"object-cover")})]})]})]})}const Q=m(`fragment WorkCommentNotification on WorkCommentNotificationNode @_unmask {
7    id
8    createdAt
9    message
10    work {
11      id
12      smallThumbnailImageURL
13    }
14    user {
15      id
16      iconUrl
17      name
18    }
19    sticker {
20      id
21      imageUrl
22    }
23    myReplies {
24      id
25      text
26      user {
27        id
28        name
29        iconUrl
30      }
31      sticker {
32        id
33        imageUrl
34      }
35    }
36  }`);function W(e){const i=new Date(e*1e3);return I(i,"yyyy年MM月dd日 HH時mm分")}const L={xl:"size-24 md:h-32 md:w-32",lg:"size-20 md:h-24 md:w-24",md:"size-12",sm:"size-8",xs:"size-6"};function V(e){var t,l,a,n,c,o;const i=e.stickerSize?L[e.stickerSize]:L.md;return s.jsx(s.Fragment,{children:s.jsxs(r,{to:`/posts/${(t=e.notification.work)==null?void 0:t.id}`,className:"flex items-center border-b transition-all hover:bg-zinc-100 dark:hover:bg-zinc-900",onClick:e.onClick,children:[s.jsx(r,{to:`/users/${(l=e.notification.user)==null?void 0:l.id}`,children:s.jsxs(f,{className:"size-8",children:[s.jsx(h,{className:"size-8 rounded-full object-cover",src:d((a=e.notification.user)==null?void 0:a.iconUrl),alt:"thumbnail"}),s.jsx(k,{})]})}),s.jsxs("div",{className:"ml-2 w-full overflow-hidden",children:[s.jsxs("p",{className:"text-ellipsis",children:[(n=e.notification.user)==null?void 0:n.name,"さんが返信しました",e.notification.message&&`「${e.notification.message}」`]}),((c=e.notification.sticker)==null?void 0:c.imageUrl)&&s.jsx("img",{src:e.notification.sticker.imageUrl,alt:"sticker",className:x(i,"size-12")}),s.jsx("p",{className:"text-sm opacity-80",children:W(e.notification.createdAt)})]}),s.jsx("div",{className:"size-12 overflow-hidden rounded-md",children:s.jsx("img",{src:(o=e.notification.work)==null?void 0:o.smallThumbn
36ailImageURL,alt:"thumbnail",className:"size-16 object-cover"})})]})})}const X=m(`fragment WorkCommentReplyNotification on WorkCommentReplyNotificationNode @_unmask {
37    id
38    createdAt
39    message
40    work {
41      id
42      smallThumbnailImageURL
43    }
44    user {
45      id
46      name
47      iconUrl
48    }
49    sticker {
50      id
51      imageUrl
52    }
53    comment {
54      id
55      createdAt
56      text
57      work {
58        id
59        smallThumbnailImageURL
60      }
61      user {
62        id
63        name
64        iconUrl
65      }
66      sticker {
67        id
68        imageUrl
69      }
70    }
71  }`);function Y({notification:e,onClick:i}){var l;const t=u();return e.work===null?null:s.jsxs(r,{to:`/posts/${e.work.id}`,className:"flex items-center p-1 transition-all hover:opacity-80",onClick:i,children:[s.jsx("div",{className:"size-12 overflow-hidden rounded-md",children:e.work.smallThumbnailImageURL?s.jsx("img",{src:e.work.smallThumbnailImageURL,alt:"thumbnail",className:"size-16 object-cover"}):s.jsx("div",{className:"size-16 rounded-md"})}),s.jsxs("div",{className:"ml-2 w-full overflow-hidden",children:[s.jsxs("p",{className:"text-ellipsis",children:[((l=e.user)==null?void 0:l.name)&&s.jsx("span",{children:t(`${e.user.name}さんから`,`${e.user.name} `)}),t("いいねされました!","Liked")]}),s.jsx("p",{className:"text-sm opacity-80",children:t(N(e.createdAt),j(e.createdAt))})]})]})}const Z=m(`fragment LikedWorkNotification on LikedWorkNotificationNode @_unmask {
72    id
73    createdAt
74    work {
75      id
76      title
77      smallThumbnailImageURL
78    }
79    user {
80      id
81      name
82      iconUrl
83    }
84  }`);function ee({notification:e,onClick:i}){return e.work===null?null:s.jsxs(r,{to:`/posts/${e.work.id}`,className:"flex items-center p-1 transition-all",onClick:i,children:[s.jsx("div",{className:"size-12 overflow-hidden rounded-md",children:s.jsx("img",{src:e.work.smallThumbnailImageURL,alt:"thumbnail",className:"size-16 object-cover"})}),s.jsxs("div",{className:"ml-2 w-full overflow-hidden",children:[s.jsx("p",{className:"text-ellipsis",children:e.message}),s.jsx("p",{className:"text-sm opacity-80",children:F(e.createdAt)})]})]})}const se=m(`fragment WorkAwardNotification on WorkAwardNotificationNode @_unmask {
85    id
86    createdAt
87    message
88    work {
89      id
90      title
91      smallThumbnailImageURL
92    }
93  }`);function ie({notification:e,onClick:i}){const t=u();return e.user===null?null:s.jsxs(r,{className:"flex items-center p-1 transition-all",to:`/users/${e.user.id}`,onClick:i,children:[s.jsxs(f,{className:"size-8",children:[s.jsx(h,{className:"size-8 rounded-full object-cover",src:d(e.user.iconUrl),alt:"thumbnail"}),s.jsx(k,{})]}),s.jsxs("div",{className:"ml-2 w-full overflow-hidden",children:[s.jsx("p",{className:"text-ellipsis",children:t(`${e.user.name}さんにフォローされました!`,`${e.user.name} followed you!`)}),s.jsx("p",{className:"text-sm opacity-80",children:t(N(e.createdAt),j(e.createdAt))})]}),e.user.isFollowee&&s.jsx(p,{className:"size-6 text-zinc-500"})]})}const te=m(`fragment FollowNotification on FollowNotificationNode @_unmask {
94    id
95    createdAt
96    user {
97      id
98      name
99      iconUrl
100      isFollowee
101    }
102  }`);export{te as F,Y as H,Z as L,se as W,W as a,Q as b,X as c,ee as d,ie as e,P as f,V as g,j as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.