chore: 🤖 only show proxy info for active or pending sessions

This commit is contained in:
Randall Morey committed 2021-02-03 18:40:51 -05:00
1 parent 6ddaa1fedc
commit f4f0beaca7
1 file changed
+19 -11
@@ -31,18 +31,26 @@
<row.cell>{{sessionAggregate.target.displayName}}</row.cell>
<row.cell>
{{!--
This should also be predicated on the session being active...
inactive sessions should not show this information,
even if it remains on the model instance
Two if's here because:
1) Local proxy info is only relevant if the session is
active or pending (aka isCancelable). Once the session
is canceled or in the process thereof, the local proxy
may no longer be used.
2) The session actually has proxy information associated
with it. It's possible for the user to start sessions
from other devices (or even another tab), in which case we
won't have the local proxy info available here.
--}}
{{#if sessionAggregate.session.proxy}}
<Copyable
@text={{sessionAggregate.session.proxy}}
@buttonText={{t "actions.copy-to-clipboard"}}
@acknowledgeText={{t "states.copied"}}
>
<code>{{sessionAggregate.session.proxy}}</code>
</Copyable>
{{#if sessionAggregate.session.isCancelable}}
{{#if sessionAggregate.session.proxy}}
<Copyable
@text={{sessionAggregate.session.proxy}}
@buttonText={{t "actions.copy-to-clipboard"}}
@acknowledgeText={{t "states.copied"}}
>
<code>{{sessionAggregate.session.proxy}}</code>
</Copyable>
{{/if}}
{{/if}}
</row.cell>
<row.cell>