Skip to content

Commit de0fada

Browse files
committed
Improve Frida UX when all targets are filtered out
1 parent a69181a commit de0fada

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/components/intercept/config/frida-config.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,8 @@ class FridaConfig extends React.Component<{
412412
(target) => target.name.toLowerCase()
413413
);
414414

415+
const allResultsFiltered = this.fridaTargets.length > 0 && targets.length === 0;
416+
415417
return <ConfigContainer>
416418
<SelectedHostBlock>
417419
<BackButton onClick={this.deselectHost} />
@@ -425,7 +427,11 @@ class FridaConfig extends React.Component<{
425427
autoFocus={true}
426428
/>
427429
<FridaTargetList
428-
spinnerText='Scanning for apps to intercept...'
430+
spinnerText={
431+
allResultsFiltered
432+
? `No '${this.searchInput}' apps found...`
433+
: 'Scanning for apps to intercept...'
434+
}
429435
targets={targets.map(target => {
430436
const { id, name } = target;
431437
const activating = this.inProgressTargetIds.includes(id);

src/components/intercept/config/intercept-target-list.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ const SpinnerBlock = styled.div`
1616
flex-direction: column;
1717
justify-content: center;
1818
align-items: center;
19+
20+
word-break: break-word;
21+
padding: 0 10px;
1922
`;
2023

2124
const Spinner = styled(Icon).attrs(() => ({

0 commit comments

Comments
 (0)