Skip to content

Commit b4dfc52

Browse files
fix: use Pierre icons consistently for attachments
1 parent bb5748b commit b4dfc52

3 files changed

Lines changed: 17 additions & 16 deletions

File tree

‎apps/mobile/src/components/ComposerAttachmentStrip.tsx‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useEffect, useMemo, useState } from "react";
44
import { Image, Pressable, ScrollView, View } from "react-native";
55

66
import { AppText as Text } from "./AppText";
7+
import { PierreEntryIcon } from "./PierreEntryIcon";
78
import {
89
isFileBackedComposerAttachment,
910
type DraftComposerAttachment,
@@ -192,12 +193,7 @@ function ComposerAttachmentContent(props: ComposerAttachmentThumbnailProps) {
192193
}
193194
style={style}
194195
>
195-
<SymbolView
196-
name="doc.text"
197-
size={props.compact ? 15 : 22}
198-
tintColorClassName="accent-icon-subtle"
199-
type="monochrome"
200-
/>
196+
<PierreEntryIcon path={attachment.name} kind="file" size={props.compact ? 15 : 22} />
201197
{!props.compact ? (
202198
<Text className="w-full text-center text-2xs text-foreground" numberOfLines={1}>
203199
{attachment.name}

‎apps/mobile/src/features/threads/ThreadFeed.tsx‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ import {
129129
import { useAppearancePreferences } from "../settings/appearance/AppearancePreferencesProvider";
130130
import { useAppearanceCodeSurface } from "../settings/appearance/useAppearanceCodeSurface";
131131
import { markdownFileIconSource } from "@t3tools/mobile-markdown-text/file-icons";
132+
import { PierreEntryIcon } from "../../components/PierreEntryIcon";
132133
import { markdownLinkIconSource } from "@t3tools/mobile-markdown-text/link-icons";
133134
import {
134135
normalizeNativeMarkdownUrl,
@@ -474,12 +475,7 @@ function MessageAttachmentFile(props: {
474475
{opening ? (
475476
<ActivityIndicator size="small" />
476477
) : (
477-
<SymbolView
478-
name="doc.text"
479-
size={26}
480-
tintColorClassName={isPdf ? "accent-red-500" : "accent-foreground-muted"}
481-
type="monochrome"
482-
/>
478+
<PierreEntryIcon path={attachment.name} kind="file" size={26} />
483479
)}
484480
</View>
485481
<View className="min-w-0 flex-1 gap-1">
@@ -508,7 +504,7 @@ function MessageAttachmentFile(props: {
508504
function MessageAttachmentUnknown(props: { readonly name: string }) {
509505
return (
510506
<View className="flex-row items-center gap-2 py-1">
511-
<SymbolView name="doc.text" size={16} tintColor="#a3a3a3" type="monochrome" />
507+
<PierreEntryIcon path={props.name} kind="file" size={16} />
512508
<Text className="min-w-0 flex-1 text-sm text-foreground" numberOfLines={1}>
513509
{props.name}
514510
</Text>

‎apps/web/src/components/chat/ChatComposer.tsx‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ import {
208208
submitComposerDraft,
209209
} from "./composerSubmission";
210210
import { ComposerPromptLengthValidation } from "./ComposerPromptLengthValidation";
211+
import { PierreEntryIcon } from "./PierreEntryIcon";
211212
import {
212213
createComposerScrollGestureState,
213214
recordComposerScrollGestureEvent,
@@ -783,7 +784,6 @@ import { toastManager } from "../ui/toast";
783784
import {
784785
BotIcon,
785786
CircleAlertIcon,
786-
FileIcon,
787787
PaperclipIcon,
788788
PencilRulerIcon,
789789
PlayIcon,
@@ -3767,7 +3767,12 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
37673767
{image.previewUrl ? (
37683768
<img src={image.previewUrl} alt="" className="size-full object-cover" />
37693769
) : (
3770-
<FileIcon className="m-auto size-3.5 text-secondary-label" />
3770+
<PierreEntryIcon
3771+
pathValue={image.name}
3772+
kind="file"
3773+
theme={resolvedTheme}
3774+
className="m-auto size-3.5"
3775+
/>
37713776
)}
37723777
</button>
37733778
))}
@@ -5320,7 +5325,11 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
53205325
key={file.id}
53215326
className="flex min-w-0 items-center gap-2 py-1 text-sm text-foreground"
53225327
>
5323-
<FileIcon className="size-4 shrink-0 text-secondary-label" />
5328+
<PierreEntryIcon
5329+
pathValue={file.name}
5330+
kind="file"
5331+
theme={resolvedTheme}
5332+
/>
53245333
<span className="min-w-0 flex-1 truncate">{file.name}</span>
53255334
<span className="shrink-0 text-xs text-secondary-label">
53265335
{needsReattach

0 commit comments

Comments
 (0)