@appsupportkit/support-sdk 0.3.0 → 0.4.0
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/lib/commonjs/api.js +49 -15
- package/lib/commonjs/api.js.map +1 -1
- package/lib/commonjs/components/BottomSheet.js +1 -1
- package/lib/commonjs/components/BottomSheet.js.map +1 -1
- package/lib/commonjs/components/LauncherButton.js +4 -4
- package/lib/commonjs/components/LauncherButton.js.map +1 -1
- package/lib/commonjs/components/SupportButton.js +123 -97
- package/lib/commonjs/components/SupportButton.js.map +1 -1
- package/lib/commonjs/components/icons.js +81 -110
- package/lib/commonjs/components/icons.js.map +1 -1
- package/lib/commonjs/components/primitives.js +0 -153
- package/lib/commonjs/components/primitives.js.map +1 -1
- package/lib/commonjs/components/screens/ChatScreen.js +487 -0
- package/lib/commonjs/components/screens/ChatScreen.js.map +1 -0
- package/lib/commonjs/i18n/strings/de.js +3 -0
- package/lib/commonjs/i18n/strings/de.js.map +1 -1
- package/lib/commonjs/i18n/strings/en.js +3 -0
- package/lib/commonjs/i18n/strings/en.js.map +1 -1
- package/lib/commonjs/i18n/strings/es.js +3 -0
- package/lib/commonjs/i18n/strings/es.js.map +1 -1
- package/lib/commonjs/i18n/strings/fr.js +3 -0
- package/lib/commonjs/i18n/strings/fr.js.map +1 -1
- package/lib/commonjs/i18n/strings/hi.js +3 -0
- package/lib/commonjs/i18n/strings/hi.js.map +1 -1
- package/lib/commonjs/i18n/strings/it.js +3 -0
- package/lib/commonjs/i18n/strings/it.js.map +1 -1
- package/lib/commonjs/i18n/strings/ja.js +3 -0
- package/lib/commonjs/i18n/strings/ja.js.map +1 -1
- package/lib/commonjs/i18n/strings/ko.js +3 -0
- package/lib/commonjs/i18n/strings/ko.js.map +1 -1
- package/lib/commonjs/i18n/strings/nl.js +3 -0
- package/lib/commonjs/i18n/strings/nl.js.map +1 -1
- package/lib/commonjs/i18n/strings/pl.js +3 -0
- package/lib/commonjs/i18n/strings/pl.js.map +1 -1
- package/lib/commonjs/i18n/strings/pt.js +3 -0
- package/lib/commonjs/i18n/strings/pt.js.map +1 -1
- package/lib/commonjs/i18n/strings/ru.js +3 -0
- package/lib/commonjs/i18n/strings/ru.js.map +1 -1
- package/lib/commonjs/i18n/strings/tr.js +3 -0
- package/lib/commonjs/i18n/strings/tr.js.map +1 -1
- package/lib/commonjs/i18n/strings/zh.js +3 -0
- package/lib/commonjs/i18n/strings/zh.js.map +1 -1
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/push.js +78 -3
- package/lib/commonjs/push.js.map +1 -1
- package/lib/commonjs/review.js +54 -0
- package/lib/commonjs/review.js.map +1 -0
- package/lib/commonjs/theme.js +142 -23
- package/lib/commonjs/theme.js.map +1 -1
- package/lib/commonjs/types.js +21 -3
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/useSupportThreads.js +22 -15
- package/lib/commonjs/useSupportThreads.js.map +1 -1
- package/lib/commonjs/utils.js +13 -33
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/commonjs/version.js +13 -0
- package/lib/commonjs/version.js.map +1 -0
- package/lib/module/api.js +46 -13
- package/lib/module/api.js.map +1 -1
- package/lib/module/components/BottomSheet.js +1 -1
- package/lib/module/components/BottomSheet.js.map +1 -1
- package/lib/module/components/LauncherButton.js +5 -5
- package/lib/module/components/LauncherButton.js.map +1 -1
- package/lib/module/components/SupportButton.js +128 -102
- package/lib/module/components/SupportButton.js.map +1 -1
- package/lib/module/components/icons.js +80 -107
- package/lib/module/components/icons.js.map +1 -1
- package/lib/module/components/primitives.js +2 -146
- package/lib/module/components/primitives.js.map +1 -1
- package/lib/module/components/screens/ChatScreen.js +485 -0
- package/lib/module/components/screens/ChatScreen.js.map +1 -0
- package/lib/module/i18n/strings/de.js +3 -0
- package/lib/module/i18n/strings/de.js.map +1 -1
- package/lib/module/i18n/strings/en.js +3 -0
- package/lib/module/i18n/strings/en.js.map +1 -1
- package/lib/module/i18n/strings/es.js +3 -0
- package/lib/module/i18n/strings/es.js.map +1 -1
- package/lib/module/i18n/strings/fr.js +3 -0
- package/lib/module/i18n/strings/fr.js.map +1 -1
- package/lib/module/i18n/strings/hi.js +3 -0
- package/lib/module/i18n/strings/hi.js.map +1 -1
- package/lib/module/i18n/strings/it.js +3 -0
- package/lib/module/i18n/strings/it.js.map +1 -1
- package/lib/module/i18n/strings/ja.js +3 -0
- package/lib/module/i18n/strings/ja.js.map +1 -1
- package/lib/module/i18n/strings/ko.js +3 -0
- package/lib/module/i18n/strings/ko.js.map +1 -1
- package/lib/module/i18n/strings/nl.js +3 -0
- package/lib/module/i18n/strings/nl.js.map +1 -1
- package/lib/module/i18n/strings/pl.js +3 -0
- package/lib/module/i18n/strings/pl.js.map +1 -1
- package/lib/module/i18n/strings/pt.js +3 -0
- package/lib/module/i18n/strings/pt.js.map +1 -1
- package/lib/module/i18n/strings/ru.js +3 -0
- package/lib/module/i18n/strings/ru.js.map +1 -1
- package/lib/module/i18n/strings/tr.js +3 -0
- package/lib/module/i18n/strings/tr.js.map +1 -1
- package/lib/module/i18n/strings/zh.js +3 -0
- package/lib/module/i18n/strings/zh.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/push.js +77 -3
- package/lib/module/push.js.map +1 -1
- package/lib/module/review.js +48 -0
- package/lib/module/review.js.map +1 -0
- package/lib/module/theme.js +141 -23
- package/lib/module/theme.js.map +1 -1
- package/lib/module/types.js +21 -3
- package/lib/module/types.js.map +1 -1
- package/lib/module/useSupportThreads.js +22 -15
- package/lib/module/useSupportThreads.js.map +1 -1
- package/lib/module/utils.js +12 -32
- package/lib/module/utils.js.map +1 -1
- package/lib/module/version.js +9 -0
- package/lib/module/version.js.map +1 -0
- package/lib/typescript/api.d.ts +33 -12
- package/lib/typescript/api.d.ts.map +1 -1
- package/lib/typescript/components/SupportButton.d.ts +2 -2
- package/lib/typescript/components/SupportButton.d.ts.map +1 -1
- package/lib/typescript/components/icons.d.ts +5 -14
- package/lib/typescript/components/icons.d.ts.map +1 -1
- package/lib/typescript/components/primitives.d.ts +0 -31
- package/lib/typescript/components/primitives.d.ts.map +1 -1
- package/lib/typescript/components/screens/ChatScreen.d.ts +21 -0
- package/lib/typescript/components/screens/ChatScreen.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/de.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/en.d.ts +3 -0
- package/lib/typescript/i18n/strings/en.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/es.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/fr.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/hi.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/it.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/ja.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/ko.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/nl.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/pl.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/pt.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/ru.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/tr.d.ts.map +1 -1
- package/lib/typescript/i18n/strings/zh.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +3 -2
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/push.d.ts +14 -2
- package/lib/typescript/push.d.ts.map +1 -1
- package/lib/typescript/review.d.ts +15 -0
- package/lib/typescript/review.d.ts.map +1 -0
- package/lib/typescript/theme.d.ts +23 -5
- package/lib/typescript/theme.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +54 -11
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/useSupportThreads.d.ts +9 -3
- package/lib/typescript/useSupportThreads.d.ts.map +1 -1
- package/lib/typescript/utils.d.ts +3 -2
- package/lib/typescript/utils.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +7 -0
- package/lib/typescript/version.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/api.ts +59 -30
- package/src/components/BottomSheet.tsx +1 -1
- package/src/components/LauncherButton.tsx +4 -4
- package/src/components/SupportButton.tsx +140 -111
- package/src/components/icons.tsx +60 -101
- package/src/components/primitives.tsx +1 -163
- package/src/components/screens/ChatScreen.tsx +541 -0
- package/src/i18n/strings/de.ts +3 -0
- package/src/i18n/strings/en.ts +3 -0
- package/src/i18n/strings/es.ts +3 -0
- package/src/i18n/strings/fr.ts +3 -0
- package/src/i18n/strings/hi.ts +3 -0
- package/src/i18n/strings/it.ts +3 -0
- package/src/i18n/strings/ja.ts +3 -0
- package/src/i18n/strings/ko.ts +3 -0
- package/src/i18n/strings/nl.ts +3 -0
- package/src/i18n/strings/pl.ts +3 -0
- package/src/i18n/strings/pt.ts +3 -0
- package/src/i18n/strings/ru.ts +3 -0
- package/src/i18n/strings/tr.ts +3 -0
- package/src/i18n/strings/zh.ts +3 -0
- package/src/index.tsx +5 -0
- package/src/push.ts +100 -2
- package/src/review.ts +54 -0
- package/src/theme.ts +182 -28
- package/src/types.ts +53 -11
- package/src/useSupportThreads.ts +31 -18
- package/src/utils.ts +14 -21
- package/src/version.ts +6 -0
- package/lib/commonjs/components/screens/ComposeScreen.js +0 -219
- package/lib/commonjs/components/screens/ComposeScreen.js.map +0 -1
- package/lib/commonjs/components/screens/HomeScreen.js +0 -334
- package/lib/commonjs/components/screens/HomeScreen.js.map +0 -1
- package/lib/commonjs/components/screens/ThreadScreen.js +0 -339
- package/lib/commonjs/components/screens/ThreadScreen.js.map +0 -1
- package/lib/module/components/screens/ComposeScreen.js +0 -217
- package/lib/module/components/screens/ComposeScreen.js.map +0 -1
- package/lib/module/components/screens/HomeScreen.js +0 -330
- package/lib/module/components/screens/HomeScreen.js.map +0 -1
- package/lib/module/components/screens/ThreadScreen.js +0 -337
- package/lib/module/components/screens/ThreadScreen.js.map +0 -1
- package/lib/typescript/components/screens/ComposeScreen.d.ts +0 -12
- package/lib/typescript/components/screens/ComposeScreen.d.ts.map +0 -1
- package/lib/typescript/components/screens/HomeScreen.d.ts +0 -19
- package/lib/typescript/components/screens/HomeScreen.d.ts.map +0 -1
- package/lib/typescript/components/screens/ThreadScreen.d.ts +0 -12
- package/lib/typescript/components/screens/ThreadScreen.d.ts.map +0 -1
- package/src/components/screens/ComposeScreen.tsx +0 -229
- package/src/components/screens/HomeScreen.tsx +0 -346
- package/src/components/screens/ThreadScreen.tsx +0 -424
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useMemo","useRef","useState","KeyboardAvoidingView","Platform","ScrollView","Text","TextInput","View","USER_MESSAGE_MAX","USER_MESSAGE_MIN","dayLabel","formatDate","formatTime","isSameDay","relativeTime","ArrowUpIcon","Chevron","IconButton","StatusIndicator","textStyles","TypeChipView","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","GROUP_WINDOW_MS","COUNTER_VISIBLE_FROM","buildRows","messages","unreadCount","strings","remaining","firstUnreadId","i","length","candidate","undefined","sender","id","map","message","previous","next","withinGroup","a","b","Math","abs","Date","parse","created_at","day","startsUnread","firstInGroup","lastInGroup","Separator","label","theme","tone","color","colors","accent","textTertiary","style","flexDirection","alignItems","gap","paddingVertical","children","flex","height","backgroundColor","accentMuted","border","fontSize","fontWeight","letterSpacing","MessageBubble","row","own","round","radii","bubble","tight","bubbleTail","maxWidth","alignSelf","marginTop","meta","paddingHorizontal","t","surface","borderWidth","borderColor","borderTopLeftRadius","borderBottomLeftRadius","borderTopRightRadius","borderBottomRightRadius","body","accentForeground","translation_pending","ThreadScreen","thread","onBack","onSend","draft","setDraft","sending","setSending","failedMessage","setFailedMessage","scrollRef","unreadOnOpen","unread_count","resolved","status","trimmed","trim","valid","tooShort","rows","current","scrollToEnd","animated","handleSend","errorMessage","behavior","OS","paddingBottom","borderBottomWidth","borderBottomColor","onPress","accessibilityLabel","size","textSecondary","direction","type","marginLeft","ref","contentContainerStyle","keyboardShouldPersistTaps","onContentSizeChange","resolved_at","date","borderTopWidth","borderTopColor","paddingTop","borderRadius","control","secondary","value","onChangeText","v","multiline","editable","placeholder","placeholderTextColor","minHeight","maxHeight","cardLg","textPrimary","lineHeight","textAlignVertical","disabled","statusDanger","count"],"sourceRoot":"../../../../src","sources":["components/screens/ThreadScreen.tsx"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC5D,SACEC,oBAAoB,EACpBC,QAAQ,EACRC,UAAU,EACVC,IAAI,EACJC,SAAS,EACTC,IAAI,QACC,cAAc;AAIrB,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,aAAa;AAChE,SAASC,QAAQ,EAAEC,UAAU,EAAEC,UAAU,EAAEC,SAAS,EAAEC,YAAY,QAAQ,aAAa;AACvF,SAASC,WAAW,EAAEC,OAAO,QAAQ,UAAU;AAC/C,SACEC,UAAU,EACVC,eAAe,EACfC,UAAU,EACVC,YAAY,QACP,eAAe;;AAEtB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA,EAAAC,QAAA,IAAAC,SAAA;AACA,MAAMC,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI;AACrC;AACA,MAAMC,oBAAoB,GAAGpB,gBAAgB,GAAG,EAAE;AAYlD,SAASqB,SAASA,CAChBC,QAAyB,EACzBC,WAAmB,EACnBC,OAAmB,EACZ;EACP;EACA;EACA,IAAIC,SAAS,GAAGF,WAAW;EAC3B,IAAIG,aAA4B,GAAG,IAAI;EACvC,KAAK,IAAIC,CAAC,GAAGL,QAAQ,CAACM,MAAM,GAAG,CAAC,EAAED,CAAC,IAAI,CAAC,IAAIF,SAAS,GAAG,CAAC,EAAEE,CAAC,IAAI,CAAC,EAAE;IACjE,MAAME,SAAS,GAAGP,QAAQ,CAACK,CAAC,CAAC;IAC7B,IAAIE,SAAS,KAAKC,SAAS,IAAID,SAAS,CAACE,MAAM,KAAK,OAAO,EAAE;IAC7D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AAI;YAAC4D,KAAK,EAAE;cAAEW,QAAQ,EAAE,EAAE;cAAEf,KAAK,EAAEF,KAAK,CAACG,MAAM,CAACwG;YAAa,CAAE;YAAAhG,QAAA,EAC7DyC;UAAa,CACV,CAAC,GACLU,QAAQ,gBACVnG,IAAA,CAACjB,IAAI;YAAC4D,KAAK,EAAE9C,UAAU,CAACuE,IAAI,CAAC/B,KAAK,CAAE;YAAAW,QAAA,EACjCtC,OAAO,CAAC4D,CAAC,CAAC,kBAAkB,EAAE;cAAE2E,KAAK,EAAE9J;YAAiB,CAAC;UAAC,CACvD,CAAC,GACL,IAAI,EACPkG,KAAK,CAACvE,MAAM,IAAIR,oBAAoB,iBACnCJ,KAAA,CAACnB,IAAI;YACH4D,KAAK,EAAE,CACL9C,UAAU,CAACuE,IAAI,CAAC/B,KAAK,CAAC,EACtB;cAAEgF,UAAU,EAAE;YAAO,CAAC,EACtBhC,KAAK,CAACvE,MAAM,GAAG5B,gBAAgB,IAAI;cACjCqD,KAAK,EAAEF,KAAK,CAACG,MAAM,CAACwG;YACtB,CAAC,CACD;YAAAhG,QAAA,GAEDqC,KAAK,CAACvE,MAAM,EAAC,GAAC,EAAC5B,gBAAgB;UAAA,CAC5B,CACP;QAAA,CACG,CACP;MAAA,CACD;IACH,CACG,CAAC;EAAA,CACa,CAAC;AAE3B","ignoreList":[]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Translator } from '../../i18n';
|
|
2
|
-
import type { SupportTheme } from '../../theme';
|
|
3
|
-
import type { QueryType } from '../../types';
|
|
4
|
-
export declare function ComposeScreen({ theme, strings, type, onBack, onSubmit, }: {
|
|
5
|
-
theme: SupportTheme;
|
|
6
|
-
strings: Translator;
|
|
7
|
-
type: QueryType;
|
|
8
|
-
onBack: () => void;
|
|
9
|
-
/** Resolves null on success, or a user-facing error message. */
|
|
10
|
-
onSubmit: (message: string) => Promise<string | null>;
|
|
11
|
-
}): import("react").JSX.Element;
|
|
12
|
-
//# sourceMappingURL=ComposeScreen.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ComposeScreen.d.ts","sourceRoot":"","sources":["../../../../src/components/screens/ComposeScreen.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAoD7C,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,OAAO,EACP,IAAI,EACJ,MAAM,EACN,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,UAAU,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,gEAAgE;IAChE,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACvD,+BAuJA"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Translator } from '../../i18n';
|
|
2
|
-
import { type Language } from '../../i18n/languages';
|
|
3
|
-
import type { SupportTheme } from '../../theme';
|
|
4
|
-
import type { QueryType, Thread } from '../../types';
|
|
5
|
-
export declare function HomeScreen({ theme, strings, language, threads, loading, refreshing, error, onRefresh, onCompose, onOpenThread, onChangeLanguage, onClose, }: {
|
|
6
|
-
theme: SupportTheme;
|
|
7
|
-
strings: Translator;
|
|
8
|
-
language: Language;
|
|
9
|
-
threads: Thread[] | null;
|
|
10
|
-
loading: boolean;
|
|
11
|
-
refreshing: boolean;
|
|
12
|
-
error: string | null;
|
|
13
|
-
onRefresh: () => void;
|
|
14
|
-
onCompose: (type: QueryType) => void;
|
|
15
|
-
onOpenThread: (thread: Thread) => void;
|
|
16
|
-
onChangeLanguage: () => void;
|
|
17
|
-
onClose: () => void;
|
|
18
|
-
}): import("react").JSX.Element;
|
|
19
|
-
//# sourceMappingURL=HomeScreen.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HomeScreen.d.ts","sourceRoot":"","sources":["../../../../src/components/screens/HomeScreen.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAmB,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAmJrD,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,OAAO,EACP,QAAQ,EACR,OAAO,EACP,OAAO,EACP,UAAU,EACV,KAAK,EACL,SAAS,EACT,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,OAAO,GACR,EAAE;IACD,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,UAAU,CAAC;IACpB,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,+BAwKA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Translator } from '../../i18n';
|
|
2
|
-
import type { SupportTheme } from '../../theme';
|
|
3
|
-
import type { Thread } from '../../types';
|
|
4
|
-
export declare function ThreadScreen({ theme, strings, thread, onBack, onSend, }: {
|
|
5
|
-
theme: SupportTheme;
|
|
6
|
-
strings: Translator;
|
|
7
|
-
thread: Thread;
|
|
8
|
-
onBack: () => void;
|
|
9
|
-
/** Resolves null on success, or a user-facing error message. */
|
|
10
|
-
onSend: (message: string) => Promise<string | null>;
|
|
11
|
-
}): import("react").JSX.Element;
|
|
12
|
-
//# sourceMappingURL=ThreadScreen.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadScreen.d.ts","sourceRoot":"","sources":["../../../../src/components/screens/ThreadScreen.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,EAAiB,MAAM,aAAa,CAAC;AA6LzD,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,OAAO,EACP,MAAM,EACN,MAAM,EACN,MAAM,GACP,EAAE;IACD,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,gEAAgE;IAChE,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACrD,+BAkNA"}
|
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
import { useEffect, useRef, useState } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
Animated,
|
|
4
|
-
Easing,
|
|
5
|
-
KeyboardAvoidingView,
|
|
6
|
-
Platform,
|
|
7
|
-
Text,
|
|
8
|
-
TextInput,
|
|
9
|
-
View,
|
|
10
|
-
} from 'react-native';
|
|
11
|
-
import type { Translator } from '../../i18n';
|
|
12
|
-
import type { SupportTheme } from '../../theme';
|
|
13
|
-
import type { QueryType } from '../../types';
|
|
14
|
-
import { USER_MESSAGE_MAX, USER_MESSAGE_MIN } from '../../types';
|
|
15
|
-
import { CheckIcon, Chevron } from '../icons';
|
|
16
|
-
import {
|
|
17
|
-
IconButton,
|
|
18
|
-
PrimaryButton,
|
|
19
|
-
textStyles,
|
|
20
|
-
TypeGlyph,
|
|
21
|
-
} from '../primitives';
|
|
22
|
-
|
|
23
|
-
/** Scales in once on success — the only celebratory motion in the SDK. */
|
|
24
|
-
function SentMark({ theme }: { theme: SupportTheme }) {
|
|
25
|
-
const scale = useRef(new Animated.Value(0.6)).current;
|
|
26
|
-
const opacity = useRef(new Animated.Value(0)).current;
|
|
27
|
-
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
Animated.parallel([
|
|
30
|
-
Animated.timing(scale, {
|
|
31
|
-
toValue: 1,
|
|
32
|
-
duration: 320,
|
|
33
|
-
easing: Easing.bezier(0.16, 1, 0.3, 1),
|
|
34
|
-
useNativeDriver: true,
|
|
35
|
-
}),
|
|
36
|
-
Animated.timing(opacity, {
|
|
37
|
-
toValue: 1,
|
|
38
|
-
duration: 200,
|
|
39
|
-
easing: Easing.out(Easing.cubic),
|
|
40
|
-
useNativeDriver: true,
|
|
41
|
-
}),
|
|
42
|
-
]).start();
|
|
43
|
-
}, [scale, opacity]);
|
|
44
|
-
|
|
45
|
-
return (
|
|
46
|
-
<Animated.View
|
|
47
|
-
style={{
|
|
48
|
-
width: 56,
|
|
49
|
-
height: 56,
|
|
50
|
-
borderRadius: 28,
|
|
51
|
-
backgroundColor: theme.colors.statusResolvedBg,
|
|
52
|
-
borderWidth: 1,
|
|
53
|
-
borderColor: theme.colors.statusResolved,
|
|
54
|
-
alignItems: 'center',
|
|
55
|
-
justifyContent: 'center',
|
|
56
|
-
opacity,
|
|
57
|
-
transform: [{ scale }],
|
|
58
|
-
}}
|
|
59
|
-
>
|
|
60
|
-
<CheckIcon color={theme.colors.statusResolved} size={20} />
|
|
61
|
-
</Animated.View>
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export function ComposeScreen({
|
|
66
|
-
theme,
|
|
67
|
-
strings,
|
|
68
|
-
type,
|
|
69
|
-
onBack,
|
|
70
|
-
onSubmit,
|
|
71
|
-
}: {
|
|
72
|
-
theme: SupportTheme;
|
|
73
|
-
strings: Translator;
|
|
74
|
-
type: QueryType;
|
|
75
|
-
onBack: () => void;
|
|
76
|
-
/** Resolves null on success, or a user-facing error message. */
|
|
77
|
-
onSubmit: (message: string) => Promise<string | null>;
|
|
78
|
-
}) {
|
|
79
|
-
const [message, setMessage] = useState('');
|
|
80
|
-
const [submitting, setSubmitting] = useState(false);
|
|
81
|
-
const [failedMessage, setFailedMessage] = useState<string | null>(null);
|
|
82
|
-
const [sent, setSent] = useState(false);
|
|
83
|
-
|
|
84
|
-
const trimmed = message.trim();
|
|
85
|
-
const valid =
|
|
86
|
-
trimmed.length >= USER_MESSAGE_MIN && trimmed.length <= USER_MESSAGE_MAX;
|
|
87
|
-
const overLimit = message.length > USER_MESSAGE_MAX;
|
|
88
|
-
const tooShort = trimmed.length > 0 && trimmed.length < USER_MESSAGE_MIN;
|
|
89
|
-
|
|
90
|
-
async function handleSubmit() {
|
|
91
|
-
if (!valid || submitting) return;
|
|
92
|
-
setSubmitting(true);
|
|
93
|
-
setFailedMessage(null);
|
|
94
|
-
const errorMessage = await onSubmit(trimmed);
|
|
95
|
-
setSubmitting(false);
|
|
96
|
-
if (errorMessage === null) setSent(true);
|
|
97
|
-
else setFailedMessage(errorMessage);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (sent) {
|
|
101
|
-
return (
|
|
102
|
-
<View
|
|
103
|
-
style={{
|
|
104
|
-
flex: 1,
|
|
105
|
-
alignItems: 'center',
|
|
106
|
-
justifyContent: 'center',
|
|
107
|
-
gap: 14,
|
|
108
|
-
paddingHorizontal: 32,
|
|
109
|
-
paddingBottom: 40,
|
|
110
|
-
}}
|
|
111
|
-
>
|
|
112
|
-
<SentMark theme={theme} />
|
|
113
|
-
<Text style={textStyles.title(theme)}>{strings.t('compose.sent')}</Text>
|
|
114
|
-
<Text style={[textStyles.secondary(theme), { textAlign: 'center' }]}>
|
|
115
|
-
{strings.t('compose.sentHint')}
|
|
116
|
-
</Text>
|
|
117
|
-
<View style={{ marginTop: 6 }}>
|
|
118
|
-
<PrimaryButton
|
|
119
|
-
label={strings.t('compose.done')}
|
|
120
|
-
onPress={onBack}
|
|
121
|
-
theme={theme}
|
|
122
|
-
/>
|
|
123
|
-
</View>
|
|
124
|
-
</View>
|
|
125
|
-
);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
return (
|
|
129
|
-
<KeyboardAvoidingView
|
|
130
|
-
style={{ flex: 1 }}
|
|
131
|
-
behavior={Platform.OS === 'ios' ? 'padding' : undefined}
|
|
132
|
-
>
|
|
133
|
-
{/* Header: back + the chosen type */}
|
|
134
|
-
<View
|
|
135
|
-
style={{
|
|
136
|
-
flexDirection: 'row',
|
|
137
|
-
alignItems: 'center',
|
|
138
|
-
gap: 10,
|
|
139
|
-
paddingHorizontal: 12,
|
|
140
|
-
paddingBottom: 14,
|
|
141
|
-
}}
|
|
142
|
-
>
|
|
143
|
-
<IconButton
|
|
144
|
-
onPress={onBack}
|
|
145
|
-
theme={theme}
|
|
146
|
-
accessibilityLabel={strings.t('compose.back')}
|
|
147
|
-
size={32}
|
|
148
|
-
>
|
|
149
|
-
<Chevron color={theme.colors.textSecondary} direction="left" size={12} />
|
|
150
|
-
</IconButton>
|
|
151
|
-
<TypeGlyph type={type} theme={theme} size={32} />
|
|
152
|
-
<View style={{ flex: 1, gap: 1 }}>
|
|
153
|
-
<Text style={textStyles.heading(theme)}>
|
|
154
|
-
{strings.t(`type.${type}`)}
|
|
155
|
-
</Text>
|
|
156
|
-
<Text style={textStyles.meta(theme)}>{strings.t(`sub.${type}`)}</Text>
|
|
157
|
-
</View>
|
|
158
|
-
</View>
|
|
159
|
-
|
|
160
|
-
<View style={{ flex: 1, paddingHorizontal: 16 }}>
|
|
161
|
-
<TextInput
|
|
162
|
-
value={message}
|
|
163
|
-
onChangeText={(v) => {
|
|
164
|
-
setMessage(v);
|
|
165
|
-
setFailedMessage(null);
|
|
166
|
-
}}
|
|
167
|
-
multiline
|
|
168
|
-
autoFocus
|
|
169
|
-
editable={!submitting}
|
|
170
|
-
placeholder={strings.t(`prompt.${type}`)}
|
|
171
|
-
placeholderTextColor={theme.colors.textTertiary}
|
|
172
|
-
style={{
|
|
173
|
-
minHeight: 140,
|
|
174
|
-
maxHeight: 240,
|
|
175
|
-
borderWidth: 1,
|
|
176
|
-
borderColor: theme.colors.border,
|
|
177
|
-
borderRadius: theme.radii.card,
|
|
178
|
-
backgroundColor: theme.colors.surface,
|
|
179
|
-
color: theme.colors.textPrimary,
|
|
180
|
-
fontSize: 15,
|
|
181
|
-
lineHeight: 21,
|
|
182
|
-
padding: 14,
|
|
183
|
-
textAlignVertical: 'top',
|
|
184
|
-
}}
|
|
185
|
-
/>
|
|
186
|
-
|
|
187
|
-
<View
|
|
188
|
-
style={{
|
|
189
|
-
flexDirection: 'row',
|
|
190
|
-
alignItems: 'center',
|
|
191
|
-
gap: 10,
|
|
192
|
-
paddingTop: 10,
|
|
193
|
-
paddingHorizontal: 2,
|
|
194
|
-
minHeight: 20,
|
|
195
|
-
}}
|
|
196
|
-
>
|
|
197
|
-
{failedMessage !== null ? (
|
|
198
|
-
<Text style={{ fontSize: 12, color: theme.colors.statusDanger }}>
|
|
199
|
-
{failedMessage}
|
|
200
|
-
</Text>
|
|
201
|
-
) : tooShort ? (
|
|
202
|
-
<Text style={textStyles.meta(theme)}>
|
|
203
|
-
{strings.t('compose.minChars', { count: USER_MESSAGE_MIN })}
|
|
204
|
-
</Text>
|
|
205
|
-
) : null}
|
|
206
|
-
<Text
|
|
207
|
-
style={[
|
|
208
|
-
textStyles.meta(theme),
|
|
209
|
-
{ marginLeft: 'auto' },
|
|
210
|
-
overLimit && { color: theme.colors.statusDanger },
|
|
211
|
-
]}
|
|
212
|
-
>
|
|
213
|
-
{message.length}/{USER_MESSAGE_MAX}
|
|
214
|
-
</Text>
|
|
215
|
-
</View>
|
|
216
|
-
|
|
217
|
-
<View style={{ paddingTop: 12 }}>
|
|
218
|
-
<PrimaryButton
|
|
219
|
-
label={strings.t(submitting ? 'compose.sending' : 'compose.send')}
|
|
220
|
-
onPress={handleSubmit}
|
|
221
|
-
disabled={!valid || submitting}
|
|
222
|
-
theme={theme}
|
|
223
|
-
fullWidth
|
|
224
|
-
/>
|
|
225
|
-
</View>
|
|
226
|
-
</View>
|
|
227
|
-
</KeyboardAvoidingView>
|
|
228
|
-
);
|
|
229
|
-
}
|
|
@@ -1,346 +0,0 @@
|
|
|
1
|
-
import { RefreshControl, ScrollView, Text, View } from 'react-native';
|
|
2
|
-
import type { Translator } from '../../i18n';
|
|
3
|
-
import { LANGUAGE_LABELS, type Language } from '../../i18n/languages';
|
|
4
|
-
import type { SupportTheme } from '../../theme';
|
|
5
|
-
import type { QueryType, Thread } from '../../types';
|
|
6
|
-
import { relativeTime } from '../../utils';
|
|
7
|
-
import { Chevron, CloseIcon, GlobeIcon } from '../icons';
|
|
8
|
-
import {
|
|
9
|
-
EmptyState,
|
|
10
|
-
ErrorState,
|
|
11
|
-
IconButton,
|
|
12
|
-
PressableRow,
|
|
13
|
-
SectionLabel,
|
|
14
|
-
SkeletonBlock,
|
|
15
|
-
textStyles,
|
|
16
|
-
TypeGlyph,
|
|
17
|
-
UnreadPill,
|
|
18
|
-
} from '../primitives';
|
|
19
|
-
|
|
20
|
-
const COMPOSE_TYPES: QueryType[] = ['feedback', 'feature_request', 'bug_report'];
|
|
21
|
-
|
|
22
|
-
function ThreadRow({
|
|
23
|
-
thread,
|
|
24
|
-
theme,
|
|
25
|
-
strings,
|
|
26
|
-
onPress,
|
|
27
|
-
last,
|
|
28
|
-
}: {
|
|
29
|
-
thread: Thread;
|
|
30
|
-
theme: SupportTheme;
|
|
31
|
-
strings: Translator;
|
|
32
|
-
onPress: () => void;
|
|
33
|
-
last: boolean;
|
|
34
|
-
}) {
|
|
35
|
-
const unread = thread.unread_count > 0;
|
|
36
|
-
const type = strings.t(`type.${thread.type}`);
|
|
37
|
-
const preview = thread.last_message?.body ?? strings.t('home.noMessages');
|
|
38
|
-
const at = thread.last_message?.created_at ?? thread.created_at;
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<PressableRow
|
|
42
|
-
onPress={onPress}
|
|
43
|
-
theme={theme}
|
|
44
|
-
accessibilityLabel={
|
|
45
|
-
unread
|
|
46
|
-
? strings.t('home.threadUnreadA11y', {
|
|
47
|
-
type,
|
|
48
|
-
count: thread.unread_count,
|
|
49
|
-
})
|
|
50
|
-
: strings.t('home.threadA11y', { type })
|
|
51
|
-
}
|
|
52
|
-
style={{
|
|
53
|
-
flexDirection: 'row',
|
|
54
|
-
alignItems: 'center',
|
|
55
|
-
gap: 12,
|
|
56
|
-
paddingHorizontal: 16,
|
|
57
|
-
paddingVertical: 13,
|
|
58
|
-
borderBottomWidth: last ? 0 : 1,
|
|
59
|
-
borderBottomColor: theme.colors.border,
|
|
60
|
-
opacity: thread.status === 'resolved' ? 0.75 : 1,
|
|
61
|
-
}}
|
|
62
|
-
>
|
|
63
|
-
<TypeGlyph type={thread.type} theme={theme} size={38} />
|
|
64
|
-
|
|
65
|
-
<View style={{ flex: 1, gap: 3 }}>
|
|
66
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
67
|
-
<Text
|
|
68
|
-
numberOfLines={1}
|
|
69
|
-
style={{
|
|
70
|
-
flex: 1,
|
|
71
|
-
fontSize: 14,
|
|
72
|
-
fontWeight: unread ? '700' : '600',
|
|
73
|
-
letterSpacing: -0.1,
|
|
74
|
-
color: theme.colors.textPrimary,
|
|
75
|
-
}}
|
|
76
|
-
>
|
|
77
|
-
{type}
|
|
78
|
-
</Text>
|
|
79
|
-
<Text style={textStyles.meta(theme)}>{relativeTime(at, strings)}</Text>
|
|
80
|
-
</View>
|
|
81
|
-
|
|
82
|
-
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
|
|
83
|
-
<Text
|
|
84
|
-
numberOfLines={1}
|
|
85
|
-
style={{
|
|
86
|
-
flex: 1,
|
|
87
|
-
fontSize: 13,
|
|
88
|
-
lineHeight: 18,
|
|
89
|
-
color: unread ? theme.colors.textPrimary : theme.colors.textSecondary,
|
|
90
|
-
}}
|
|
91
|
-
>
|
|
92
|
-
{thread.last_message?.sender === 'user'
|
|
93
|
-
? `${strings.t('home.you')}: `
|
|
94
|
-
: ''}
|
|
95
|
-
{preview}
|
|
96
|
-
</Text>
|
|
97
|
-
{unread ? (
|
|
98
|
-
<UnreadPill count={thread.unread_count} theme={theme} />
|
|
99
|
-
) : (
|
|
100
|
-
<Chevron color={theme.colors.textTertiary} />
|
|
101
|
-
)}
|
|
102
|
-
</View>
|
|
103
|
-
</View>
|
|
104
|
-
</PressableRow>
|
|
105
|
-
);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function ThreadGroup({
|
|
109
|
-
label,
|
|
110
|
-
threads,
|
|
111
|
-
theme,
|
|
112
|
-
strings,
|
|
113
|
-
onOpenThread,
|
|
114
|
-
}: {
|
|
115
|
-
label: string;
|
|
116
|
-
threads: Thread[];
|
|
117
|
-
theme: SupportTheme;
|
|
118
|
-
strings: Translator;
|
|
119
|
-
onOpenThread: (thread: Thread) => void;
|
|
120
|
-
}) {
|
|
121
|
-
if (threads.length === 0) return null;
|
|
122
|
-
return (
|
|
123
|
-
<View style={{ marginTop: 24 }}>
|
|
124
|
-
<SectionLabel theme={theme} style={{ paddingHorizontal: 16, paddingBottom: 8 }}>
|
|
125
|
-
{label}
|
|
126
|
-
</SectionLabel>
|
|
127
|
-
<View
|
|
128
|
-
style={{
|
|
129
|
-
marginHorizontal: 16,
|
|
130
|
-
borderWidth: 1,
|
|
131
|
-
borderColor: theme.colors.border,
|
|
132
|
-
borderRadius: theme.radii.card,
|
|
133
|
-
backgroundColor: theme.colors.surface,
|
|
134
|
-
overflow: 'hidden',
|
|
135
|
-
}}
|
|
136
|
-
>
|
|
137
|
-
{threads.map((thread, i) => (
|
|
138
|
-
<ThreadRow
|
|
139
|
-
key={thread.id}
|
|
140
|
-
thread={thread}
|
|
141
|
-
theme={theme}
|
|
142
|
-
strings={strings}
|
|
143
|
-
onPress={() => onOpenThread(thread)}
|
|
144
|
-
last={i === threads.length - 1}
|
|
145
|
-
/>
|
|
146
|
-
))}
|
|
147
|
-
</View>
|
|
148
|
-
</View>
|
|
149
|
-
);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
export function HomeScreen({
|
|
153
|
-
theme,
|
|
154
|
-
strings,
|
|
155
|
-
language,
|
|
156
|
-
threads,
|
|
157
|
-
loading,
|
|
158
|
-
refreshing,
|
|
159
|
-
error,
|
|
160
|
-
onRefresh,
|
|
161
|
-
onCompose,
|
|
162
|
-
onOpenThread,
|
|
163
|
-
onChangeLanguage,
|
|
164
|
-
onClose,
|
|
165
|
-
}: {
|
|
166
|
-
theme: SupportTheme;
|
|
167
|
-
strings: Translator;
|
|
168
|
-
language: Language;
|
|
169
|
-
threads: Thread[] | null;
|
|
170
|
-
loading: boolean;
|
|
171
|
-
refreshing: boolean;
|
|
172
|
-
error: string | null;
|
|
173
|
-
onRefresh: () => void;
|
|
174
|
-
onCompose: (type: QueryType) => void;
|
|
175
|
-
onOpenThread: (thread: Thread) => void;
|
|
176
|
-
onChangeLanguage: () => void;
|
|
177
|
-
onClose: () => void;
|
|
178
|
-
}) {
|
|
179
|
-
const open = (threads ?? []).filter((t) => t.status === 'open');
|
|
180
|
-
const resolved = (threads ?? []).filter((t) => t.status === 'resolved');
|
|
181
|
-
|
|
182
|
-
return (
|
|
183
|
-
<View style={{ flex: 1 }}>
|
|
184
|
-
{/* Header */}
|
|
185
|
-
<View
|
|
186
|
-
style={{
|
|
187
|
-
flexDirection: 'row',
|
|
188
|
-
alignItems: 'flex-start',
|
|
189
|
-
paddingHorizontal: 16,
|
|
190
|
-
paddingTop: 4,
|
|
191
|
-
paddingBottom: 16,
|
|
192
|
-
}}
|
|
193
|
-
>
|
|
194
|
-
<View style={{ flex: 1, gap: 2 }}>
|
|
195
|
-
<Text style={textStyles.title(theme)}>{strings.t('home.title')}</Text>
|
|
196
|
-
<Text style={textStyles.secondary(theme)}>
|
|
197
|
-
{strings.t('home.subtitle')}
|
|
198
|
-
</Text>
|
|
199
|
-
</View>
|
|
200
|
-
<IconButton
|
|
201
|
-
onPress={onClose}
|
|
202
|
-
theme={theme}
|
|
203
|
-
accessibilityLabel={strings.t('home.close')}
|
|
204
|
-
size={32}
|
|
205
|
-
>
|
|
206
|
-
<CloseIcon color={theme.colors.textSecondary} size={12} />
|
|
207
|
-
</IconButton>
|
|
208
|
-
</View>
|
|
209
|
-
|
|
210
|
-
<ScrollView
|
|
211
|
-
style={{ flex: 1 }}
|
|
212
|
-
contentContainerStyle={{ paddingBottom: 24 }}
|
|
213
|
-
keyboardShouldPersistTaps="handled"
|
|
214
|
-
refreshControl={
|
|
215
|
-
<RefreshControl
|
|
216
|
-
refreshing={refreshing}
|
|
217
|
-
onRefresh={onRefresh}
|
|
218
|
-
tintColor={theme.colors.textTertiary}
|
|
219
|
-
colors={[theme.colors.accent]}
|
|
220
|
-
progressBackgroundColor={theme.colors.surface}
|
|
221
|
-
/>
|
|
222
|
-
}
|
|
223
|
-
>
|
|
224
|
-
{/* Compose actions */}
|
|
225
|
-
<View
|
|
226
|
-
style={{
|
|
227
|
-
marginHorizontal: 16,
|
|
228
|
-
borderWidth: 1,
|
|
229
|
-
borderColor: theme.colors.border,
|
|
230
|
-
borderRadius: theme.radii.card,
|
|
231
|
-
backgroundColor: theme.colors.surface,
|
|
232
|
-
overflow: 'hidden',
|
|
233
|
-
}}
|
|
234
|
-
>
|
|
235
|
-
{COMPOSE_TYPES.map((type, i) => (
|
|
236
|
-
<PressableRow
|
|
237
|
-
key={type}
|
|
238
|
-
onPress={() => onCompose(type)}
|
|
239
|
-
theme={theme}
|
|
240
|
-
accessibilityLabel={strings.t('home.newA11y', {
|
|
241
|
-
type: strings.t(`type.${type}`),
|
|
242
|
-
})}
|
|
243
|
-
style={{
|
|
244
|
-
flexDirection: 'row',
|
|
245
|
-
alignItems: 'center',
|
|
246
|
-
gap: 12,
|
|
247
|
-
paddingHorizontal: 14,
|
|
248
|
-
paddingVertical: 12,
|
|
249
|
-
borderTopWidth: i === 0 ? 0 : 1,
|
|
250
|
-
borderTopColor: theme.colors.border,
|
|
251
|
-
}}
|
|
252
|
-
>
|
|
253
|
-
<TypeGlyph type={type} theme={theme} size={34} />
|
|
254
|
-
<View style={{ flex: 1, gap: 1 }}>
|
|
255
|
-
<Text style={textStyles.heading(theme)}>
|
|
256
|
-
{strings.t(`type.${type}`)}
|
|
257
|
-
</Text>
|
|
258
|
-
<Text style={textStyles.meta(theme)}>
|
|
259
|
-
{strings.t(`hint.${type}`)}
|
|
260
|
-
</Text>
|
|
261
|
-
</View>
|
|
262
|
-
<Chevron color={theme.colors.textTertiary} />
|
|
263
|
-
</PressableRow>
|
|
264
|
-
))}
|
|
265
|
-
</View>
|
|
266
|
-
|
|
267
|
-
{/* Language — a quiet row rather than a settings screen, since it is
|
|
268
|
-
the only preference the sheet has. */}
|
|
269
|
-
<View
|
|
270
|
-
style={{
|
|
271
|
-
marginTop: 12,
|
|
272
|
-
marginHorizontal: 16,
|
|
273
|
-
borderWidth: 1,
|
|
274
|
-
borderColor: theme.colors.border,
|
|
275
|
-
borderRadius: theme.radii.card,
|
|
276
|
-
backgroundColor: theme.colors.surface,
|
|
277
|
-
overflow: 'hidden',
|
|
278
|
-
}}
|
|
279
|
-
>
|
|
280
|
-
<PressableRow
|
|
281
|
-
onPress={onChangeLanguage}
|
|
282
|
-
theme={theme}
|
|
283
|
-
accessibilityLabel={strings.t('lang.change')}
|
|
284
|
-
style={{
|
|
285
|
-
flexDirection: 'row',
|
|
286
|
-
alignItems: 'center',
|
|
287
|
-
gap: 12,
|
|
288
|
-
paddingHorizontal: 14,
|
|
289
|
-
paddingVertical: 11,
|
|
290
|
-
}}
|
|
291
|
-
>
|
|
292
|
-
<GlobeIcon color={theme.colors.textTertiary} size={16} />
|
|
293
|
-
<Text style={[textStyles.secondary(theme), { flex: 1 }]}>
|
|
294
|
-
{strings.t('home.language')}
|
|
295
|
-
</Text>
|
|
296
|
-
<Text style={textStyles.meta(theme)}>
|
|
297
|
-
{LANGUAGE_LABELS[language]}
|
|
298
|
-
</Text>
|
|
299
|
-
<Chevron color={theme.colors.textTertiary} />
|
|
300
|
-
</PressableRow>
|
|
301
|
-
</View>
|
|
302
|
-
|
|
303
|
-
{/* Threads */}
|
|
304
|
-
{error !== null && threads === null ? (
|
|
305
|
-
// Only take over the screen when there's nothing cached to show —
|
|
306
|
-
// a failed background poll shouldn't hide an already-loaded list.
|
|
307
|
-
<ErrorState
|
|
308
|
-
message={error}
|
|
309
|
-
onRetry={onRefresh}
|
|
310
|
-
theme={theme}
|
|
311
|
-
strings={strings}
|
|
312
|
-
/>
|
|
313
|
-
) : loading && threads === null ? (
|
|
314
|
-
<View style={{ paddingHorizontal: 16, paddingTop: 28, gap: 12 }}>
|
|
315
|
-
<SkeletonBlock width={110} height={11} theme={theme} radius={4} />
|
|
316
|
-
<SkeletonBlock width="100%" height={64} theme={theme} radius={theme.radii.card} />
|
|
317
|
-
<SkeletonBlock width="100%" height={64} theme={theme} radius={theme.radii.card} />
|
|
318
|
-
</View>
|
|
319
|
-
) : (threads ?? []).length === 0 ? (
|
|
320
|
-
<EmptyState
|
|
321
|
-
message={strings.t('home.empty')}
|
|
322
|
-
hint={strings.t('home.emptyHint')}
|
|
323
|
-
theme={theme}
|
|
324
|
-
/>
|
|
325
|
-
) : (
|
|
326
|
-
<>
|
|
327
|
-
<ThreadGroup
|
|
328
|
-
label={`${strings.t('home.open')} · ${open.length}`}
|
|
329
|
-
threads={open}
|
|
330
|
-
theme={theme}
|
|
331
|
-
strings={strings}
|
|
332
|
-
onOpenThread={onOpenThread}
|
|
333
|
-
/>
|
|
334
|
-
<ThreadGroup
|
|
335
|
-
label={strings.t('home.resolved')}
|
|
336
|
-
threads={resolved}
|
|
337
|
-
theme={theme}
|
|
338
|
-
strings={strings}
|
|
339
|
-
onOpenThread={onOpenThread}
|
|
340
|
-
/>
|
|
341
|
-
</>
|
|
342
|
-
)}
|
|
343
|
-
</ScrollView>
|
|
344
|
-
</View>
|
|
345
|
-
);
|
|
346
|
-
}
|