Skip to content

Commit a059b32

Browse files
committed
Merge branch 'dap-4799' of github.com:dapplets/mutable-web-monorepo into dap-4799
2 parents b16c1af + e36d388 commit a059b32

File tree

1 file changed

+38
-31
lines changed
  • libs/shared-components/src/mini-overlay

1 file changed

+38
-31
lines changed

libs/shared-components/src/mini-overlay/index.tsx

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -159,39 +159,46 @@ interface IMiniOverlayProps extends Partial<IWalletConnect> {
159159
trackingRefs?: Set<React.RefObject<HTMLDivElement>>
160160
}
161161

162-
export const AppSwitcher: FC<IAppSwitcherProps> = ({ app, enableApp, disableApp, isLoading }) => (
163-
<>
164-
{isLoading ? (
165-
<Loading>
166-
<Spinner animation="border" variant="primary"></Spinner>
167-
</Loading>
168-
) : (
169-
<MutationIconWrapper
170-
title={app.localId}
171-
$isStopped={!app.settings.isEnabled}
172-
$isButton={true}
173-
>
174-
{app?.metadata.image ? <Image image={app?.metadata.image} /> : <MutationFallbackIcon />}
162+
export const AppSwitcher: FC<IAppSwitcherProps> = ({ app, enableApp, disableApp, isLoading }) => {
163+
const docMeta = (app as any).documentId?.split('/')
164+
return (
165+
<>
166+
{isLoading ? (
167+
<Loading>
168+
<Spinner animation="border" variant="primary"></Spinner>
169+
</Loading>
170+
) : (
171+
<MutationIconWrapper
172+
title={
173+
(app as any).documentId
174+
? `${app.localId}:\n${docMeta?.[2]}\nby ${docMeta?.[0]}`
175+
: app.localId
176+
}
177+
$isStopped={!app.settings.isEnabled}
178+
$isButton={true}
179+
>
180+
{app?.metadata.image ? <Image image={app?.metadata.image} /> : <MutationFallbackIcon />}
175181

176-
{!app.settings.isEnabled ? (
177-
<LabelAppTop className="labelAppTop">
178-
<StopTopIcon />
179-
</LabelAppTop>
180-
) : null}
182+
{!app.settings.isEnabled ? (
183+
<LabelAppTop className="labelAppTop">
184+
<StopTopIcon />
185+
</LabelAppTop>
186+
) : null}
181187

182-
{app.settings.isEnabled ? (
183-
<LabelAppCenter className="labelAppCenter" onClick={disableApp}>
184-
<StopCenterIcon />
185-
</LabelAppCenter>
186-
) : (
187-
<LabelAppCenter className="labelAppCenter" onClick={enableApp}>
188-
<PlayCenterIcon />
189-
</LabelAppCenter>
190-
)}
191-
</MutationIconWrapper>
192-
)}
193-
</>
194-
)
188+
{app.settings.isEnabled ? (
189+
<LabelAppCenter className="labelAppCenter" onClick={disableApp}>
190+
<StopCenterIcon />
191+
</LabelAppCenter>
192+
) : (
193+
<LabelAppCenter className="labelAppCenter" onClick={enableApp}>
194+
<PlayCenterIcon />
195+
</LabelAppCenter>
196+
)}
197+
</MutationIconWrapper>
198+
)}
199+
</>
200+
)
201+
}
195202

196203
export const MiniOverlay: FC<IMiniOverlayProps> = ({
197204
baseMutation,

0 commit comments

Comments
 (0)