react-native-inapp-inspector 2.5.8 → 2.5.10
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/commonjs/components/BrandCircleIcon.js +8 -3
- package/dist/commonjs/components/Inspector/ConsoleExportModal.d.ts +10 -0
- package/dist/commonjs/components/Inspector/ConsoleExportModal.js +317 -0
- package/dist/commonjs/components/Inspector/ConsoleTab.js +20 -15
- package/dist/commonjs/components/Inspector/FabLauncher.js +8 -8
- package/dist/commonjs/components/Inspector/FloatingCaptureWidget.js +4 -4
- package/dist/commonjs/components/Inspector/InspectorHeader.js +30 -45
- package/dist/commonjs/components/Inspector/MainScreen.js +1 -1
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +34 -20
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +49 -44
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +5 -5
- package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +3 -3
- package/dist/commonjs/components/SkeletonPlaceholder.js +3 -3
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/networkLogger.d.ts +1 -17
- package/dist/commonjs/customHooks/networkLogger.js +1 -1
- package/dist/commonjs/helpers/shareFormatter.d.ts +15 -0
- package/dist/commonjs/helpers/shareFormatter.js +15 -8
- package/dist/commonjs/i18n/locales/ar.json +1 -1
- package/dist/commonjs/i18n/locales/bn.json +1 -1
- package/dist/commonjs/i18n/locales/de.json +1 -1
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/i18n/locales/es.json +1 -1
- package/dist/commonjs/i18n/locales/fr.json +1 -1
- package/dist/commonjs/i18n/locales/gu.json +1 -1
- package/dist/commonjs/i18n/locales/hi.json +1 -1
- package/dist/commonjs/i18n/locales/id.json +1 -1
- package/dist/commonjs/i18n/locales/it.json +1 -1
- package/dist/commonjs/i18n/locales/ja.json +1 -1
- package/dist/commonjs/i18n/locales/kn.json +1 -1
- package/dist/commonjs/i18n/locales/ko.json +1 -1
- package/dist/commonjs/i18n/locales/ml.json +1 -1
- package/dist/commonjs/i18n/locales/mr.json +1 -1
- package/dist/commonjs/i18n/locales/nl.json +1 -1
- package/dist/commonjs/i18n/locales/pa.json +1 -1
- package/dist/commonjs/i18n/locales/pl.json +1 -1
- package/dist/commonjs/i18n/locales/pt.json +1 -1
- package/dist/commonjs/i18n/locales/ru.json +1 -1
- package/dist/commonjs/i18n/locales/ta.json +1 -1
- package/dist/commonjs/i18n/locales/te.json +1 -1
- package/dist/commonjs/i18n/locales/tr.json +1 -1
- package/dist/commonjs/i18n/locales/vi.json +1 -1
- package/dist/commonjs/i18n/locales/zh.json +1 -1
- package/dist/commonjs/index.js +1 -1
- package/dist/commonjs/styles/index.d.ts +3 -0
- package/dist/commonjs/styles/index.js +1 -1
- package/dist/commonjs/types/interfaces.d.ts +4 -2
- package/dist/esm/components/BrandCircleIcon.js +9 -4
- package/dist/esm/components/Inspector/ConsoleExportModal.d.ts +10 -0
- package/dist/esm/components/Inspector/ConsoleExportModal.js +317 -0
- package/dist/esm/components/Inspector/ConsoleTab.js +38 -33
- package/dist/esm/components/Inspector/FabLauncher.js +1 -1
- package/dist/esm/components/Inspector/FloatingCaptureWidget.js +9 -9
- package/dist/esm/components/Inspector/InspectorHeader.js +75 -90
- package/dist/esm/components/Inspector/MainScreen.js +1 -1
- package/dist/esm/components/Inspector/MediaGalleryTab.js +88 -74
- package/dist/esm/components/Inspector/MediaPreviewModal.js +178 -173
- package/dist/esm/components/Inspector/NpmUpdateToast.js +18 -18
- package/dist/esm/components/Inspector/SkeletonPlaceholder.js +11 -11
- package/dist/esm/components/SkeletonPlaceholder.js +11 -11
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/networkLogger.d.ts +1 -17
- package/dist/esm/customHooks/networkLogger.js +1 -1
- package/dist/esm/helpers/shareFormatter.d.ts +15 -0
- package/dist/esm/helpers/shareFormatter.js +15 -8
- package/dist/esm/i18n/locales/ar.json +1 -1
- package/dist/esm/i18n/locales/bn.json +1 -1
- package/dist/esm/i18n/locales/de.json +1 -1
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/i18n/locales/es.json +1 -1
- package/dist/esm/i18n/locales/fr.json +1 -1
- package/dist/esm/i18n/locales/gu.json +1 -1
- package/dist/esm/i18n/locales/hi.json +1 -1
- package/dist/esm/i18n/locales/id.json +1 -1
- package/dist/esm/i18n/locales/it.json +1 -1
- package/dist/esm/i18n/locales/ja.json +1 -1
- package/dist/esm/i18n/locales/kn.json +1 -1
- package/dist/esm/i18n/locales/ko.json +1 -1
- package/dist/esm/i18n/locales/ml.json +1 -1
- package/dist/esm/i18n/locales/mr.json +1 -1
- package/dist/esm/i18n/locales/nl.json +1 -1
- package/dist/esm/i18n/locales/pa.json +1 -1
- package/dist/esm/i18n/locales/pl.json +1 -1
- package/dist/esm/i18n/locales/pt.json +1 -1
- package/dist/esm/i18n/locales/ru.json +1 -1
- package/dist/esm/i18n/locales/ta.json +1 -1
- package/dist/esm/i18n/locales/te.json +1 -1
- package/dist/esm/i18n/locales/tr.json +1 -1
- package/dist/esm/i18n/locales/vi.json +1 -1
- package/dist/esm/i18n/locales/zh.json +1 -1
- package/dist/esm/index.js +4 -4
- package/dist/esm/styles/index.d.ts +3 -0
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/types/interfaces.d.ts +4 -2
- package/package.json +1 -1
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
import{useState as
|
|
2
|
-
`);
|
|
1
|
+
import{useState as F,useEffect as je,useMemo as se,useCallback as de}from"react";import{Dimensions as Ee,FlatList as Ne,Image as Ce,RefreshControl as _e,Share as Te,StyleSheet as qe,Text as S,TouchableOpacity as B,View as C}from"react-native";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as I}from"../../styles/AppFonts";import Se from"../TouchableScale";import Je from"../EmptyState";import{CameraRollIcon as Be,CheckIcon as Ie,CopyIcon as Y,FilmIcon as U,GifIcon as Z,GridIcon as Qe,ImageIcon as E,ListIcon as Xe,PlayIcon as Re,ScreencastIcon as Ye,ShareIcon as Ve,TrashIcon as K,WhiteBackNavigation as Ze,CloseWhite as Ke}from"../NetworkIcons";import{MediaPreviewModal as Ct}from"./MediaPreviewModal";import{ScreenCapture as O}from"../../capture";import{copyImageOrMediaToClipboard as Tt,copyToClipboard as St,formatBytes as N}from"../../helpers";import{showToast as M}from"../../helpers/toast";import{useTranslation as xt}from"../../i18n";import{useInspector as kt}from"./InspectorContext";import{ConfirmationModal as Bt}from"./ConfirmationModal";export const MediaGalleryTab=()=>{const{t:r}=xt(),{refreshMediaCount:W,switchActiveTab:A,previewMediaItem:ee,setPreviewMediaItem:_}=kt(),[z,te]=F([]),[Ge,oe]=F(!1),[v,De]=F("all"),[R,q]=F(new Set),[V,ie]=F("grid"),[$,L]=F({visible:!1,title:"",message:"",onConfirm:()=>{}}),re=async()=>{try{const t=v==="image"?"image":v==="video"?"video":"any",i=await O.pickMedia({mediaType:t});i&&(await G(),W?.().catch(()=>{}),M(i.type==="video"?r("mediaGallery.importedVideo","Video imported from Camera Roll"):r("mediaGallery.importedPhoto","Photo imported from Camera Roll")),_(i))}catch{M(r("mediaGallery.importFailed","Failed to import media"))}},G=de(async()=>{try{const t=await O.getMediaList();te(t),W?.().catch(()=>{})}catch{te([])}},[W]);je(()=>{G()},[G]);const Me=async()=>{oe(!0),await G(),oe(!1)},D=se(()=>v==="all"?z:z.filter(t=>t.type===v),[z,v]),J=se(()=>z.reduce((t,i)=>t+(i.sizeBytes||0),0),[z]),le=de(t=>{q(i=>{const l=new Set(i);return l.has(t)?l.delete(t):l.add(t),l})},[]),ae=async t=>{await O.deleteMedia(t.uri),q(l=>{const T=new Set(l);return T.delete(t.id),T}),await G(),await W?.()===0&&A("apis"),M(r("mediaGallery.deleted"))},ne=t=>{t?.uri&&Tt(t.uri,t.type==="image"?"Image":"Media")},We=()=>{const t=z.filter(l=>R.has(l.id));if(t.length===0)return;const i=t.map(l=>l.uri).join(`
|
|
2
|
+
`);St(i,`${t.length} Media URIs`),M(`${t.length} file URIs copied to clipboard`)},Pe=async t=>{try{const i=t.uri.startsWith("file://")||t.uri.startsWith("content://")||t.uri.startsWith("http")?t.uri:`file://${t.uri}`;await Te.share({url:i,title:t.filename,message:t.filename})}catch{M(r("mediaGallery.shareUnavailable","Sharing not available on this device"))}},$e=async()=>{const t=z.filter(i=>R.has(i.id));if(t.length!==0)try{const i=t[0],l=i.uri.startsWith("file://")||i.uri.startsWith("content://")||i.uri.startsWith("http")?i.uri:`file://${i.uri}`;await Te.share({url:l,title:i.filename,message:t.length===1?i.filename:`${t.length} items: ${t.map(T=>T.filename).join(", ")}`})}catch{M(r("mediaGallery.shareUnavailable","Sharing not available on this device"))}},Fe=()=>{const t=R.size;t!==0&&L({visible:!0,title:r("mediaGallery.deleteSelectedTitle","Delete Selected Media"),message:r("mediaGallery.deleteSelectedMessage",{count:t,defaultValue:`Are you sure you want to permanently delete ${t} media items?`}),confirmText:r("mediaGallery.delete","Delete"),cancelText:r("common.cancel","Cancel"),onConfirm:async()=>{L(T=>({...T,visible:!1}));const i=z.filter(T=>R.has(T.id));for(const T of i)await O.deleteMedia(T.uri);q(new Set),await G(),await W?.()===0&&A("apis"),M(r("mediaGallery.deletedCount",{count:i.length}))}})},Oe=()=>{L({visible:!0,title:r("mediaGallery.purgeTitle","Purge Gallery"),message:r("mediaGallery.purgeMessage",{count:z.length,size:N(J),defaultValue:`Are you sure you want to delete all ${z.length} media files (${N(J)})? This cannot be undone.`}),confirmText:r("common.clearAll","Clear All"),cancelText:r("common.cancel","Cancel"),onConfirm:async()=>{L(t=>({...t,visible:!1})),await O.clearAllMedia(),q(new Set),await G(),await W?.(),A("apis"),M(r("mediaGallery.allPurged"))}})},Ae=async t=>{await O.convertToGif(t.uri,{fps:12,width:480})&&(await G(),W?.().catch(()=>{}))},Le=(t,i)=>{const l=i?e.sky400:e.slate400,T=12;switch(t){case"all":return<Ye size={T}color={l}/>;case"image":return<E size={T}color={l}/>;case"video":return<U size={T}color={l}/>;case"gif":return<Z size={T}color={l}/>}},He=({item:t})=>{if(!t)return null;const i=t.type==="video",l=t.type==="gif",T=i&&t.thumbnailUri||t.uri,P=!!(t.id&&R.has(t.id)),Q=(t.format||(i?"mp4":l?"gif":"png")).toUpperCase(),X=t.filename||(t.uri?t.uri.split("/").pop():"")||"Capture",H=t.timestamp?new Date(t.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):"";return<Se onPress={()=>_(t)}style={[o.card,P&&o.cardSelected]}>
|
|
3
3
|
<C style={o.thumbnailContainer}>
|
|
4
4
|
{T?<Ce source={{uri:T}}style={o.thumbnail}resizeMode="cover"/>:<C style={o.thumbnailFallback}>
|
|
5
|
-
{i?<
|
|
5
|
+
{i?<U size={26}color={e.sky400}/>:<E size={26}color={e.slate400}/>}
|
|
6
6
|
</C>}
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
<
|
|
10
|
-
{
|
|
11
|
-
</
|
|
9
|
+
<B onPress={()=>t.id&&le(t.id)}style={[o.checkbox,P&&o.checkboxSelected]}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
10
|
+
{P&&<Ie size={12}color={e.white}/>}
|
|
11
|
+
</B>
|
|
12
12
|
|
|
13
13
|
{i&&<C style={o.miniPlayCircle}>
|
|
14
|
-
<Re size={14}color={
|
|
14
|
+
<Re size={14}color={e.white}/>
|
|
15
15
|
</C>}
|
|
16
16
|
<C style={o.typeBadge}>
|
|
17
|
-
{i?<
|
|
17
|
+
{i?<U size={11}color={e.sky400}/>:l?<Z size={11}color={e.warningAmber}/>:<E size={11}color={e.emerald500}/>}
|
|
18
18
|
<S style={o.typeBadgeText}>
|
|
19
|
-
{
|
|
19
|
+
{Q}
|
|
20
20
|
</S>
|
|
21
21
|
</C>
|
|
22
22
|
</C>
|
|
23
23
|
|
|
24
24
|
<C style={o.cardInfo}>
|
|
25
25
|
<S style={o.cardTitle}numberOfLines={1}>
|
|
26
|
-
{
|
|
26
|
+
{X}
|
|
27
27
|
</S>
|
|
28
28
|
<C style={o.cardMetaRow}>
|
|
29
29
|
<C style={{flexDirection:"row",alignItems:"center",gap:4,flex:1,minWidth:0}}>
|
|
30
30
|
<S style={o.cardMeta}numberOfLines={1}>
|
|
31
|
-
{
|
|
31
|
+
{N(t.sizeBytes||0)}
|
|
32
32
|
</S>
|
|
33
|
-
{
|
|
33
|
+
{H?<>
|
|
34
34
|
<S style={o.cardMetaDot}>•</S>
|
|
35
35
|
<S style={o.cardMeta}numberOfLines={1}>
|
|
36
|
-
{
|
|
36
|
+
{H}
|
|
37
37
|
</S>
|
|
38
38
|
</>:null}
|
|
39
39
|
</C>
|
|
40
|
-
<
|
|
41
|
-
<
|
|
42
|
-
</
|
|
40
|
+
<B onPress={()=>ne(t)}style={o.gridCopyBtn}hitSlop={{top:6,bottom:6,left:6,right:6}}>
|
|
41
|
+
<Y size={11}color={e.slate400}/>
|
|
42
|
+
</B>
|
|
43
43
|
</C>
|
|
44
44
|
</C>
|
|
45
|
-
</Se>},
|
|
45
|
+
</Se>},Ue=({item:t})=>{if(!t)return null;const i=t.type==="video",l=t.type==="gif",T=i&&t.thumbnailUri||t.uri,P=!!(t.id&&R.has(t.id)),Q=(t.format||(i?"mp4":l?"gif":"png")).toUpperCase(),X=t.filename||(t.uri?t.uri.split("/").pop():"")||"Capture",H=t.timestamp?`${new Date(t.timestamp).toLocaleDateString([],{month:"short",day:"numeric"})} ${new Date(t.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`:"";return<Se onPress={()=>_(t)}style={[o.listRow,P&&o.listRowSelected]}>
|
|
46
46
|
|
|
47
|
-
<
|
|
48
|
-
{
|
|
49
|
-
</
|
|
47
|
+
<B onPress={()=>t.id&&le(t.id)}style={[o.listCheckbox,P&&o.checkboxSelected]}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
48
|
+
{P&&<Ie size={12}color={e.white}/>}
|
|
49
|
+
</B>
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
<C style={o.listThumbContainer}>
|
|
53
53
|
{T?<Ce source={{uri:T}}style={o.listThumb}resizeMode="cover"/>:<C style={o.listThumbFallback}>
|
|
54
|
-
{i?<
|
|
54
|
+
{i?<U size={18}color={e.sky400}/>:<E size={18}color={e.slate400}/>}
|
|
55
55
|
</C>}
|
|
56
56
|
{i&&<C style={o.listMiniPlay}>
|
|
57
|
-
<Re size={10}color={
|
|
57
|
+
<Re size={10}color={e.white}/>
|
|
58
58
|
</C>}
|
|
59
59
|
</C>
|
|
60
60
|
|
|
61
61
|
|
|
62
62
|
<C style={o.listInfo}>
|
|
63
63
|
<S style={o.listTitle}numberOfLines={1}>
|
|
64
|
-
{
|
|
64
|
+
{X}
|
|
65
65
|
</S>
|
|
66
66
|
<C style={o.listMetaRow}>
|
|
67
67
|
<C style={o.listBadge}>
|
|
68
|
-
{i?<
|
|
68
|
+
{i?<U size={10}color={e.sky400}/>:l?<Z size={10}color={e.warningAmber}/>:<E size={10}color={e.emerald500}/>}
|
|
69
69
|
<S style={o.listBadgeText}>
|
|
70
|
-
{
|
|
70
|
+
{Q}
|
|
71
71
|
</S>
|
|
72
72
|
</C>
|
|
73
73
|
<S style={o.cardMeta}>
|
|
74
|
-
{
|
|
74
|
+
{N(t.sizeBytes||0)}
|
|
75
75
|
</S>
|
|
76
|
-
{
|
|
76
|
+
{H?<>
|
|
77
77
|
<S style={o.cardMetaDot}>•</S>
|
|
78
78
|
<S style={o.cardMeta}>
|
|
79
|
-
{
|
|
79
|
+
{H}
|
|
80
80
|
</S>
|
|
81
81
|
</>:null}
|
|
82
82
|
</C>
|
|
@@ -84,105 +84,119 @@ import{useState as $,useEffect as je,useMemo as ae,useCallback as ne}from"react"
|
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
<C style={o.listActionsRow}>
|
|
87
|
-
<
|
|
88
|
-
<
|
|
89
|
-
</
|
|
87
|
+
<B onPress={()=>ne(t)}style={o.listCopyBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
88
|
+
<Y size={13}color={e.slate200}/>
|
|
89
|
+
</B>
|
|
90
90
|
|
|
91
|
-
<
|
|
92
|
-
<
|
|
93
|
-
</
|
|
91
|
+
<B onPress={()=>Pe(t)}style={o.listShareBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
92
|
+
<Ve size={13}color={e.sky400}/>
|
|
93
|
+
</B>
|
|
94
94
|
|
|
95
|
-
<
|
|
96
|
-
<
|
|
97
|
-
</
|
|
95
|
+
<B onPress={()=>ae(t)}style={o.listDeleteBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
96
|
+
<K size={13}color={e.red500}/>
|
|
97
|
+
</B>
|
|
98
98
|
</C>
|
|
99
99
|
</Se>};return<C style={o.container}>
|
|
100
100
|
|
|
101
|
+
<C style={o.topHeaderBar}>
|
|
102
|
+
<B onPress={()=>A("apis")}style={o.backToTabBtn}accessibilityLabel="Back to Inspector"hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
103
|
+
<Ze size={15}color={e.purple}/>
|
|
104
|
+
<S style={o.backToTabText}>
|
|
105
|
+
{r("common.back","Back to Inspector")}
|
|
106
|
+
</S>
|
|
107
|
+
</B>
|
|
108
|
+
|
|
109
|
+
<B onPress={()=>A("apis")}style={o.closeCircleBtn}accessibilityLabel="Close Screencast"hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
110
|
+
<Ke size={14}color={e.grayTextStrong}/>
|
|
111
|
+
</B>
|
|
112
|
+
</C>
|
|
113
|
+
|
|
114
|
+
|
|
101
115
|
<C style={o.filterBar}>
|
|
102
116
|
<C style={o.chipGroup}>
|
|
103
|
-
{["all","image","video","gif"].map(
|
|
104
|
-
{Le(
|
|
117
|
+
{["all","image","video","gif"].map(t=>{const i=v===t,l=t==="all"?r("mediaGallery.all",{count:z.length}):r(t==="image"?"mediaGallery.photos":t==="video"?"mediaGallery.videos":"mediaGallery.gifs");return<B key={t}onPress={()=>De(t)}style={[o.chip,i&&o.chipActive]}>
|
|
118
|
+
{Le(t,i)}
|
|
105
119
|
<S style={[o.chipText,i&&o.chipTextActive]}>
|
|
106
120
|
{l}
|
|
107
121
|
</S>
|
|
108
|
-
</
|
|
122
|
+
</B>})}
|
|
109
123
|
</C>
|
|
110
124
|
|
|
111
125
|
|
|
112
126
|
<C style={o.rightControls}>
|
|
113
|
-
<
|
|
114
|
-
<
|
|
127
|
+
<B onPress={re}style={o.importBtn}accessibilityLabel="Open Camera Roll"hitSlop={{top:6,bottom:6,left:6,right:6}}>
|
|
128
|
+
<Be size={12}color={e.sky400}/>
|
|
115
129
|
<S style={o.importBtnText}>
|
|
116
130
|
{v==="image"?"Photos":v==="video"?"Videos":"Import"}
|
|
117
131
|
</S>
|
|
118
|
-
</
|
|
132
|
+
</B>
|
|
119
133
|
|
|
120
134
|
|
|
121
135
|
<C style={o.viewToggleContainer}>
|
|
122
|
-
<
|
|
123
|
-
<Qe size={13}color={
|
|
124
|
-
</
|
|
125
|
-
<
|
|
126
|
-
<Xe size={13}color={
|
|
127
|
-
</
|
|
136
|
+
<B onPress={()=>ie("grid")}style={[o.viewToggleBtn,V==="grid"&&o.viewToggleBtnActive]}>
|
|
137
|
+
<Qe size={13}color={V==="grid"?e.white:e.slate400}/>
|
|
138
|
+
</B>
|
|
139
|
+
<B onPress={()=>ie("list")}style={[o.viewToggleBtn,V==="list"&&o.viewToggleBtnActive]}>
|
|
140
|
+
<Xe size={13}color={V==="list"?e.white:e.slate400}/>
|
|
141
|
+
</B>
|
|
128
142
|
</C>
|
|
129
143
|
</C>
|
|
130
144
|
</C>
|
|
131
145
|
|
|
132
146
|
|
|
133
|
-
{
|
|
147
|
+
{z.length>0&&<C style={o.subBar}>
|
|
134
148
|
<C style={o.resultCountWrapper}>
|
|
135
|
-
<S style={[o.resultCountText,
|
|
136
|
-
{
|
|
149
|
+
<S style={[o.resultCountText,R.size>0&&o.resultCountTextSelected]}>
|
|
150
|
+
{R.size>0?r("mediaGallery.selectedOfResults",{selected:R.size,total:D.length,defaultValue:`Selected ${R.size} of ${D.length} results`}):D.length!==z.length?r("mediaGallery.showingFilteredResults",{count:D.length,total:z.length,defaultValue:`Showing ${D.length} of ${z.length} results`}):r("mediaGallery.showingResults",{count:D.length,defaultValue:`Showing ${D.length} results`})}
|
|
137
151
|
</S>
|
|
138
152
|
</C>
|
|
139
153
|
|
|
140
154
|
<C style={o.actionsGroup}>
|
|
141
|
-
{
|
|
142
|
-
<
|
|
143
|
-
<
|
|
155
|
+
{R.size>0&&<>
|
|
156
|
+
<B onPress={We}style={o.copySelectedBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
157
|
+
<Y size={12}color={e.slate200}/>
|
|
144
158
|
<S style={o.copySelectedBtnText}>
|
|
145
159
|
{r("mediaGallery.copyUri","Copy URI")}
|
|
146
160
|
</S>
|
|
147
|
-
</
|
|
161
|
+
</B>
|
|
148
162
|
|
|
149
|
-
<
|
|
150
|
-
<
|
|
163
|
+
<B onPress={$e}style={o.shareSelectedBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
164
|
+
<Ve size={12}color={e.sky400}/>
|
|
151
165
|
<S style={o.shareSelectedBtnText}>
|
|
152
166
|
{r("mediaGallery.share","Share")}
|
|
153
167
|
</S>
|
|
154
|
-
</
|
|
168
|
+
</B>
|
|
155
169
|
|
|
156
|
-
<
|
|
157
|
-
<
|
|
170
|
+
<B onPress={Fe}style={o.deleteBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
171
|
+
<K size={13}color={e.red500}/>
|
|
158
172
|
<S style={o.deleteBtnText}>
|
|
159
|
-
{r("mediaGallery.deleteSelected",{count:
|
|
173
|
+
{r("mediaGallery.deleteSelected",{count:R.size})}
|
|
160
174
|
</S>
|
|
161
|
-
</
|
|
175
|
+
</B>
|
|
162
176
|
</>}
|
|
163
177
|
|
|
164
|
-
<
|
|
165
|
-
<
|
|
178
|
+
<B onPress={Oe}style={o.clearBtn}hitSlop={{top:8,bottom:8,left:8,right:8}}>
|
|
179
|
+
<K size={13}color={e.red500}/>
|
|
166
180
|
<S style={o.clearBtnText}>
|
|
167
|
-
{r("mediaGallery.purge",{size:
|
|
181
|
+
{r("mediaGallery.purge",{size:N(J)})}
|
|
168
182
|
</S>
|
|
169
|
-
</
|
|
183
|
+
</B>
|
|
170
184
|
</C>
|
|
171
185
|
</C>}
|
|
172
186
|
|
|
173
187
|
|
|
174
|
-
<Ne key={
|
|
188
|
+
<Ne key={V}data={D}keyExtractor={t=>t.id}renderItem={V==="grid"?He:Ue}numColumns={V==="grid"?2:1}columnWrapperStyle={V==="grid"?o.columnWrapper:void 0}style={{flex:1}}contentContainerStyle={[o.listContent,{flexGrow:1}]}nestedScrollEnabled={!0}keyboardShouldPersistTaps="handled"refreshControl={<_e refreshing={Ge}onRefresh={Me}tintColor={e.sky400}/>}ListEmptyComponent={<C style={o.emptyContainer}>
|
|
175
189
|
<Je customTitle={v==="image"?"No Photos Found":v==="video"?"No Videos Found":r("mediaGallery.noMediaTitle")}customSub={v==="image"?"Take a screenshot or import photos from Camera Roll.":v==="video"?"Record a video or import videos from Camera Roll.":r("mediaGallery.noMediaDesc")}showReload={!1}/>
|
|
176
|
-
<
|
|
177
|
-
<
|
|
190
|
+
<B onPress={re}style={o.emptyImportBtn}activeOpacity={.8}>
|
|
191
|
+
<Be size={14}color={e.white}/>
|
|
178
192
|
<S style={o.emptyImportBtnText}>
|
|
179
193
|
{v==="image"?r("mediaGallery.importPhotos","Import Photos from Camera Roll"):v==="video"?r("mediaGallery.importVideos","Import Videos from Camera Roll"):r("mediaGallery.openCameraRoll","Open Camera Roll")}
|
|
180
194
|
</S>
|
|
181
|
-
</
|
|
195
|
+
</B>
|
|
182
196
|
</C>}/>
|
|
183
197
|
|
|
184
198
|
|
|
185
|
-
<
|
|
199
|
+
<Ct item={ee}visible={!!ee}onClose={()=>_(null)}onDelete={ae}onConvertToGif={Ae}/>
|
|
186
200
|
|
|
187
|
-
<
|
|
188
|
-
</C>};const{width:
|
|
201
|
+
<Bt visible={$.visible}title={$.title}message={$.message}confirmText={$.confirmText}cancelText={$.cancelText}isDestructive={!0}icon="trash"onConfirm={$.onConfirm}onCancel={()=>L(t=>({...t,visible:!1}))}/>
|
|
202
|
+
</C>};const{width:It}=Ee.get("window"),zt=(It-36)/2,o=qe.create({container:{flex:1,backgroundColor:e.slate850},topHeaderBar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:8,backgroundColor:e.primaryLight,borderBottomWidth:1,borderBottomColor:e.dividerColor},backToTabBtn:{flexDirection:"row",alignItems:"center",gap:6,paddingVertical:3,paddingHorizontal:6},backToTabText:{fontFamily:I.interSemiBold,fontSize:12,color:e.purple},closeCircleBtn:{width:26,height:26,borderRadius:13,backgroundColor:e.grayBackground,borderWidth:1,borderColor:e.dividerColor,alignItems:"center",justifyContent:"center"},filterBar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:9,borderBottomWidth:1,borderBottomColor:e.borderGlassLight,gap:8},chipGroup:{flexDirection:"row",alignItems:"center",gap:6,flexShrink:1},chip:{flexDirection:"row",alignItems:"center",gap:4.5,paddingHorizontal:8,paddingVertical:4.5,borderRadius:6,backgroundColor:e.whiteAlpha06,borderWidth:1,borderColor:e.whiteAlpha10},chipActive:{backgroundColor:`${e.sky400}2E`,borderColor:e.sky400},chipText:{fontFamily:I.interMedium,fontSize:11,color:e.slate400},chipTextActive:{fontFamily:I.interBold,color:e.sky400},subBar:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:7,backgroundColor:`${e.slate900}99`,borderBottomWidth:1,borderBottomColor:e.borderGlassLight,gap:8},resultCountWrapper:{flexDirection:"row",alignItems:"center",flexShrink:1},resultCountText:{fontFamily:I.interMedium,fontSize:11,color:e.slate400},resultCountTextSelected:{fontFamily:I.interSemiBold,color:e.sky400},actionsGroup:{flexDirection:"row",alignItems:"center",gap:6},rightControls:{flexDirection:"row",alignItems:"center",gap:6},importBtn:{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:`${e.sky500}1F`,borderColor:`${e.sky400}44`,borderWidth:1,paddingHorizontal:8,paddingVertical:4.5,borderRadius:6},importBtnText:{fontFamily:I.interSemiBold,fontSize:11,color:e.sky400},emptyContainer:{alignItems:"center",justifyContent:"center",paddingVertical:36},emptyImportBtn:{flexDirection:"row",alignItems:"center",gap:7,backgroundColor:e.sky500,paddingHorizontal:16,paddingVertical:10,borderRadius:8,marginTop:18,shadowColor:e.sky500,shadowOffset:{width:0,height:2},shadowOpacity:.35,shadowRadius:6,elevation:3},emptyImportBtnText:{fontFamily:I.interSemiBold,fontSize:13,color:e.white},viewToggleContainer:{flexDirection:"row",alignItems:"center",backgroundColor:e.whiteAlpha06,borderRadius:6,padding:2,borderWidth:1,borderColor:e.whiteAlpha10},viewToggleBtn:{paddingHorizontal:7,paddingVertical:4,borderRadius:4,alignItems:"center",justifyContent:"center"},viewToggleBtnActive:{backgroundColor:`${e.violet600}80`},deleteBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:4,borderRadius:6,backgroundColor:`${e.red500}26`,borderWidth:1,borderColor:`${e.red500}80`},deleteBtnText:{fontFamily:I.interBold,fontSize:10.5,color:e.red500},clearBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:4,borderRadius:6,backgroundColor:`${e.red500}1F`,borderWidth:1,borderColor:`${e.red500}4D`},clearBtnText:{fontFamily:I.interMedium,fontSize:10.5,color:e.red500},listContent:{padding:12,gap:10},columnWrapper:{gap:12},card:{width:zt,backgroundColor:e.slate800,borderRadius:8,borderWidth:1,borderColor:e.borderGlassLight,overflow:"hidden"},cardSelected:{borderColor:e.violet600,borderWidth:1.5},thumbnailContainer:{width:"100%",height:110,backgroundColor:e.slate850,position:"relative"},thumbnail:{width:"100%",height:"100%"},thumbnailFallback:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",backgroundColor:e.slate900},checkbox:{position:"absolute",top:6,left:6,width:22,height:22,borderRadius:5,borderWidth:1.5,borderColor:"rgba(255, 255, 255, 0.65)",backgroundColor:"rgba(15, 23, 42, 0.65)",alignItems:"center",justifyContent:"center",zIndex:10},checkboxSelected:{backgroundColor:e.violet600,borderColor:e.violet600},miniPlayCircle:{position:"absolute",top:"50%",left:"50%",width:32,height:32,marginTop:-16,marginLeft:-16,borderRadius:16,backgroundColor:`${e.sky400}D9`,alignItems:"center",justifyContent:"center",paddingLeft:2,shadowColor:e.black,shadowOffset:{width:0,height:2},shadowOpacity:.4,shadowRadius:4,elevation:4},typeBadge:{position:"absolute",top:6,right:6,flexDirection:"row",alignItems:"center",gap:3,backgroundColor:e.badgeGlassDark,paddingHorizontal:5,paddingVertical:2,borderRadius:4,borderWidth:1,borderColor:e.borderGlassMedium},typeBadgeText:{fontFamily:I.interBold,fontSize:9,color:e.slate200},cardInfo:{padding:8,gap:3},cardTitle:{fontFamily:I.interMedium,fontSize:11.5,color:e.white},cardMetaRow:{flexDirection:"row",alignItems:"center",gap:4},cardMeta:{fontFamily:I.interRegular,fontSize:10,color:e.slate400},cardMetaDot:{fontSize:10,color:e.whiteAlpha30},listRow:{flexDirection:"row",alignItems:"center",backgroundColor:e.slate800,borderRadius:8,borderWidth:1,borderColor:e.borderGlassLight,padding:8,gap:10},listRowSelected:{borderColor:e.violet600,borderWidth:1.5,backgroundColor:`${e.violet600}14`},listCheckbox:{width:20,height:20,borderRadius:4,borderWidth:1.5,borderColor:"rgba(255, 255, 255, 0.65)",backgroundColor:"rgba(15, 23, 42, 0.65)",alignItems:"center",justifyContent:"center"},listThumbContainer:{width:46,height:46,borderRadius:6,backgroundColor:e.slate850,overflow:"hidden",position:"relative"},listThumb:{width:"100%",height:"100%"},listThumbFallback:{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",backgroundColor:e.slate900},listMiniPlay:{position:"absolute",top:"50%",left:"50%",width:20,height:20,marginTop:-10,marginLeft:-10,borderRadius:10,backgroundColor:`${e.sky400}D9`,alignItems:"center",justifyContent:"center",paddingLeft:1},listInfo:{flex:1,gap:4,minWidth:0},listTitle:{fontFamily:I.interMedium,fontSize:12,color:e.white},listMetaRow:{flexDirection:"row",alignItems:"center",gap:6,flexWrap:"wrap"},listBadge:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:e.badgeGlassDark,paddingHorizontal:4,paddingVertical:1.5,borderRadius:4,borderWidth:1,borderColor:e.borderGlassMedium},listBadgeText:{fontFamily:I.interBold,fontSize:8.5,color:e.slate200},gridCopyBtn:{padding:3,borderRadius:4,backgroundColor:e.whiteAlpha08},listActionsRow:{flexDirection:"row",alignItems:"center",gap:6},listCopyBtn:{padding:6,borderRadius:6,backgroundColor:e.whiteAlpha10,borderWidth:1,borderColor:e.whiteAlpha15},listShareBtn:{padding:6,borderRadius:6,backgroundColor:`${e.sky400}18`,borderWidth:1,borderColor:`${e.sky400}40`},listDeleteBtn:{padding:6,borderRadius:6,backgroundColor:`${e.red500}14`,borderWidth:1,borderColor:`${e.red500}33`},copySelectedBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:4,borderRadius:6,backgroundColor:e.whiteAlpha10,borderWidth:1,borderColor:e.whiteAlpha20},copySelectedBtnText:{fontFamily:I.interSemiBold,fontSize:10.5,color:e.slate200},shareSelectedBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8,paddingVertical:4,borderRadius:6,backgroundColor:`${e.sky400}20`,borderWidth:1,borderColor:`${e.sky400}60`},shareSelectedBtnText:{fontFamily:I.interBold,fontSize:10.5,color:e.sky400}});
|