2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.ip}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton @class="btn-default" @action={{action "lookup"}} @icon="globe" @label="admin.user.ip_lookup" />
|
2014-07-08 04:18:18 +08:00
|
|
|
{{/if}}
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.show}}
|
2014-07-08 04:18:18 +08:00
|
|
|
<div class="location-box">
|
2022-10-04 19:27:26 +08:00
|
|
|
<a href class="close pull-right" {{action "hide"}}>{{d-icon "times"}}</a>
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.copied}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton @class="btn-hover pull-right" @icon="copy" @label="ip_lookup.copied" />
|
2018-08-24 04:27:08 +08:00
|
|
|
{{else}}
|
2022-06-30 18:30:50 +08:00
|
|
|
<DButton @action={{action "copy"}} @class="pull-right no-text" @icon="copy" />
|
2018-08-24 04:27:08 +08:00
|
|
|
{{/if}}
|
2019-01-22 22:09:04 +08:00
|
|
|
<h4>{{i18n "ip_lookup.title"}}</h4>
|
2020-03-12 23:50:20 +08:00
|
|
|
<p class="powered-by">{{html-safe (i18n "ip_lookup.powered_by")}}</p>
|
2014-07-08 04:18:18 +08:00
|
|
|
<dl>
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.location}}
|
|
|
|
{{#if this.location.hostname}}
|
2019-01-22 22:09:04 +08:00
|
|
|
<dt>{{i18n "ip_lookup.hostname"}}</dt>
|
2022-07-06 01:41:31 +08:00
|
|
|
<dd>{{this.location.hostname}}</dd>
|
2014-07-08 04:18:18 +08:00
|
|
|
{{/if}}
|
|
|
|
|
2019-01-22 22:09:04 +08:00
|
|
|
<dt>{{i18n "ip_lookup.location"}}</dt>
|
2014-07-08 04:18:18 +08:00
|
|
|
<dd>
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.location.location}}
|
|
|
|
<a href="https://maps.google.com/maps?q={{this.location.latitude}},{{this.location.longitude}}" rel="noopener noreferrer" target="_blank">
|
|
|
|
{{this.location.location}}
|
2019-01-22 22:09:04 +08:00
|
|
|
</a>
|
2014-07-08 04:18:18 +08:00
|
|
|
{{else}}
|
2019-01-22 22:09:04 +08:00
|
|
|
{{i18n "ip_lookup.location_not_found"}}
|
2014-07-08 04:18:18 +08:00
|
|
|
{{/if}}
|
|
|
|
</dd>
|
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.location.organization}}
|
2019-01-22 22:09:04 +08:00
|
|
|
<dt>{{i18n "ip_lookup.organisation"}}</dt>
|
2022-07-06 01:41:31 +08:00
|
|
|
<dd>{{this.location.organization}}</dd>
|
2014-07-08 04:18:18 +08:00
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
2014-11-17 21:51:28 +08:00
|
|
|
{{loading-spinner size="small"}}
|
2014-07-08 04:18:18 +08:00
|
|
|
{{/if}}
|
|
|
|
|
2014-11-21 02:59:20 +08:00
|
|
|
<dt>
|
2019-01-22 22:09:04 +08:00
|
|
|
{{i18n "ip_lookup.other_accounts"}}
|
2022-07-06 01:41:31 +08:00
|
|
|
<strong>{{this.totalOthersWithSameIP}}</strong>
|
|
|
|
{{#if this.other_accounts.length}}
|
|
|
|
<DButton @class="btn-danger pull-right" @action={{action "deleteOtherAccounts"}} @icon="exclamation-triangle" @translatedLabel={{i18n "ip_lookup.delete_other_accounts" count=this.otherAccountsToDelete}} />
|
2014-11-21 02:59:20 +08:00
|
|
|
{{/if}}
|
|
|
|
</dt>
|
2019-01-22 22:09:04 +08:00
|
|
|
|
2022-07-06 01:41:31 +08:00
|
|
|
<ConditionalLoadingSpinner @size="small" @condition={{this.otherAccountsLoading}}>
|
|
|
|
{{#if this.other_accounts.length}}
|
2014-11-21 02:59:20 +08:00
|
|
|
<dd class="other-accounts">
|
2014-11-20 04:38:53 +08:00
|
|
|
<table class="table table-condensed table-hover">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2019-01-22 22:09:04 +08:00
|
|
|
<th>{{i18n "ip_lookup.username"}}</th>
|
|
|
|
<th>{{i18n "ip_lookup.trust_level"}}</th>
|
|
|
|
<th>{{i18n "ip_lookup.read_time"}}</th>
|
|
|
|
<th>{{i18n "ip_lookup.topics_entered"}}</th>
|
|
|
|
<th>{{i18n "ip_lookup.post_count"}}</th>
|
2014-11-20 04:38:53 +08:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#each this.other_accounts as |a|}}
|
2014-11-20 04:38:53 +08:00
|
|
|
<tr>
|
2019-01-22 22:09:04 +08:00
|
|
|
<td>
|
2022-06-30 18:30:50 +08:00
|
|
|
<LinkTo @route="adminUser" @model={{a}}>
|
2019-01-22 22:09:04 +08:00
|
|
|
{{avatar a usernamePath="user.username" imageSize="small"}}
|
|
|
|
|
|
|
|
<span>{{a.username}}</span>
|
2022-06-30 18:30:50 +08:00
|
|
|
</LinkTo>
|
2019-01-22 22:09:04 +08:00
|
|
|
</td>
|
2014-12-13 02:28:20 +08:00
|
|
|
<td>{{a.trustLevel.id}}</td>
|
|
|
|
<td>{{a.time_read}}</td>
|
|
|
|
<td>{{a.topics_entered}}</td>
|
|
|
|
<td>{{a.post_count}}</td>
|
2014-11-20 04:38:53 +08:00
|
|
|
</tr>
|
|
|
|
{{/each}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2014-11-21 02:59:20 +08:00
|
|
|
</dd>
|
|
|
|
{{/if}}
|
2022-06-30 18:30:50 +08:00
|
|
|
</ConditionalLoadingSpinner>
|
2014-07-08 04:18:18 +08:00
|
|
|
</dl>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|