Merge pull request #6275 from pixelfed/staging

Staging
dev
dansup 5 days ago committed by GitHub
commit e90f79085e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -50,7 +50,7 @@ trait AdminUserController
'query' => $queryString,
];
$users = User::select('id', 'username', 'status', 'profile_id', 'is_admin')
$users = User::select('id', 'username', 'status', 'profile_id', 'is_admin', 'email', 'app_register_ip')
->orderBy($col, $dir)
->when($search, function ($q, $search) {
return $q->where('username', 'like', "%{$search}%");

@ -31,5 +31,5 @@ return [
'unhealthy_backup_found_empty' => 'このアプリケーションのバックアップはありません。',
'unhealthy_backup_found_old' => ':date に作成されたバックアップは古すぎます。',
'unhealthy_backup_found_unknown' => '正確な原因が特定できませんでした。',
'unhealthy_backup_found_full' => 'バックアップが使用できる容量(:disk_limit)を超えています。(現在の使用量 :disk_usage),
'unhealthy_backup_found_full' => 'バックアップが使用できる容量(:disk_limit)を超えています。(現在の使用量 :disk_usage)',
];

@ -60,6 +60,22 @@
Show deleted accounts
</label>
</div>
<div class="custom-control custom-switch ml-4 mb-2 mb-md-0 flex">
<input type="checkbox" class="custom-control-input" id="showEmailToggle"
onchange="toggleEmail(this.checked)">
<label class="custom-control-label text-muted text-xs pt-1" for="showEmailToggle">
Show Email
</label>
</div>
<div class="custom-control custom-switch ml-4 mb-2 mb-md-0">
<input type="checkbox" class="custom-control-input" id="showIpToggle"
onchange="toggleIp(this.checked)">
<label class="custom-control-label text-muted text-xs pt-1" for="showIpToggle">
Show IP
</label>
</div>
</div>
</div>
@ -166,37 +182,58 @@
<span class="badge badge-outline-primary">{{$user->id}}</span>
</a>
</td>
<td class="text-center align-middle">
<div class="d-flex align-items-center">
<a href="/{{$user->account['username']}}" class="font-weight-bold" target="_blank">
<div class="avatar-wrapper mr-3">
@if($user->account)
<img src="{{$user->account['avatar']}}" width="32" height="32" class="rounded-circle border"
onerror="this.src='/storage/avatars/default.jpg';this.onerror=null;" />
<div class="avatar-status bg-success"></div>
@else
<img src="/storage/avatars/default.jpg" width="32" height="32" class="rounded-circle border" />
<div class="avatar-status bg-secondary"></div>
@endif
</div>
</a>
<div>
<div class="d-flex">
<div class="font-weight-bold">
{{$user->username}}
@if($user->is_admin)
<span class="badge badge-danger badge-xs ml-1">
<i class="fas fa-crown mr-1"></i>Admin
</span>
<td class="">
<div class="text-center align-middle">
<div class="d-flex align-items-center">
<a href="/{{$user->account['username']}}" class="font-weight-bold" target="_blank">
<div class="avatar-wrapper mr-3">
@if($user->account)
<img src="{{$user->account['avatar']}}" width="32" height="32" class="rounded-circle border"
onerror="this.src='/storage/avatars/default.jpg';this.onerror=null;" />
<div class="avatar-status bg-success"></div>
@else
<img src="/storage/avatars/default.jpg" width="32" height="32" class="rounded-circle border" />
<div class="avatar-status bg-secondary"></div>
@endif
</div>
</a>
<div>
<div class="d-flex">
<div class="font-weight-bold">
{{$user->username}}
@if($user->is_admin)
<span class="badge badge-danger badge-xs ml-1">
<i class="fas fa-crown mr-1"></i>Admin
</span>
@endif
</div>
</div>
<small class="text-muted">
{{ str_limit(strip_tags($user->profile->bio))}}
</small>
<small class="text-warning">
{{ parse_url($user->profile->website, PHP_URL_HOST) }}
</small>
</div>
<small class="text-muted">{{ str_limit(strip_tags($user->profile->bio))}}</small>
<small class="text-warning">{{ parse_url($user->profile->website, PHP_URL_HOST) }}</small>
</div>
</div>
<div class="user-meta mt-1 d-block">
@if($user->email)
<small class="text-muted user-email d-none">
{{$user->email}}
</small>
@endif
@if($user->app_register_ip)
<small class="text-muted user-ip d-none">
{{$user->app_register_ip}}
</small>
@endif
</div>
</td>
<td class="text-center align-middle">
<a href="/i/web/profile/{{$user->account['id']}}" class="font-weight-bold" target="_blank">
{{$user->account['statuses_count'] ?? 0}}
@ -574,6 +611,28 @@
window.location.href = url.toString();
}
function toggleEmail(checked) {
const emails = document.querySelectorAll('.user-email');
emails.forEach(el => {
if (checked) {
el.classList.remove('d-none');
} else {
el.classList.add('d-none');
}
});
}
function toggleIp(checked) {
const ips = document.querySelectorAll('.user-ip');
ips.forEach(el => {
if (checked) {
el.classList.remove('d-none');
} else {
el.classList.add('d-none');
}
});
}
async function deleteSelected() {
const selectedData = userSelectionManager.getSelectedUserData();

Loading…
Cancel
Save