-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa2a68b
commit 4cd12c7
Showing
1 changed file
with
56 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,78 @@ | ||
{{ define "lock-icon" }} | ||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 20 20" class="{{ . }} inline-block h-4 w-4"> | ||
<path fill="currentColor" fill-rule="evenodd" | ||
d="M10 1a4.5 4.5 0 0 0-4.5 4.5V9H5a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2h-.5V5.5A4.5 4.5 0 0 0 10 1Zm3 8V5.5a3 3 0 1 0-6 0V9h6Z" | ||
clip-rule="evenodd" /> | ||
</svg> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="32" | ||
height="32" | ||
viewBox="0 0 20 20" | ||
class="{{ . }} inline-block h-4 w-4" | ||
> | ||
<path | ||
fill="currentColor" | ||
fill-rule="evenodd" | ||
d="M10 1a4.5 4.5 0 0 0-4.5 4.5V9H5a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2h-.5V5.5A4.5 4.5 0 0 0 10 1Zm3 8V5.5a3 3 0 1 0-6 0V9h6Z" | ||
clip-rule="evenodd" | ||
/> | ||
</svg> | ||
{{ end }} | ||
|
||
{{ define "lock-open-icon" }} | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="32" | ||
height="32" | ||
viewBox="0 0 20 20" | ||
class="{{ . }} inline-block h-4 w-4" | ||
> | ||
<path | ||
fill="currentColor" | ||
fill-rule="evenodd" | ||
d="M14.5 1A4.5 4.5 0 0 0 10 5.5V9H3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2h-1.5V5.5a3 3 0 1 1 6 0v2.75a.75.75 0 0 0 1.5 0V5.5A4.5 4.5 0 0 0 14.5 1Z" | ||
clip-rule="evenodd" | ||
/> | ||
</svg> | ||
{{ end }} | ||
|
||
{{ define "lock-open-icon"}} | ||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 20 20" class="{{ . }} inline-block h-4 w-4"> | ||
<path fill="currentColor" fill-rule="evenodd" | ||
d="M14.5 1A4.5 4.5 0 0 0 10 5.5V9H3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2h-1.5V5.5a3 3 0 1 1 6 0v2.75a.75.75 0 0 0 1.5 0V5.5A4.5 4.5 0 0 0 14.5 1Z" | ||
clip-rule="evenodd" /> | ||
</svg> | ||
{{end}} | ||
|
||
<div class="flex justify-between gap-2"> | ||
<h1 class="mb-4 text-3xl">All users</h1> | ||
|
||
<div> | ||
<a href="{{ disabledUsersHref .showDisabled }}" class="{{ disabledUsersClass .showDisabled }}" | ||
title="{{ disabledUsersTooltip .showDisabled }}"> | ||
<a | ||
href="{{ disabledUsersHref .showDisabled }}" | ||
class="{{ disabledUsersClass .showDisabled }}" | ||
title="{{ disabledUsersTooltip .showDisabled }}" | ||
> | ||
{{ if .showDisabled }} | ||
{{ template "lock-open-icon" }} | ||
{{ template "lock-open-icon" }} | ||
{{ else }} | ||
{{ template "lock-icon" }} | ||
{{ template "lock-icon" }} | ||
{{ end }} | ||
</a> | ||
</div> | ||
</div> | ||
|
||
<div class="flex flex-col justify-between divide-y divide-gray-600"> | ||
{{ range .users }} | ||
<div class="flex items-center transition-colors list-outer-hocus:bg-gray-700/50"> | ||
<a href="/users/{{ .DN }}" | ||
class="flex w-full items-center gap-2 py-2 pl-3 transition-transform focus:outline-none hocus:translate-x-2 [&>.goto]:text-gray-500 [&>.goto]:hocus:text-white"> | ||
<span title="{{ .DN }}">{{ .CN }} ({{ .SAMAccountName }})</span> | ||
<div class="flex items-center transition-colors list-outer-hocus:bg-gray-700/50"> | ||
<a | ||
href="/users/{{ .DN }}" | ||
class="flex w-full items-center gap-2 py-2 pl-3 transition-transform focus:outline-none hocus:translate-x-2 [&>.goto]:text-gray-500 [&>.goto]:hocus:text-white" | ||
> | ||
<span title="{{ .DN }}">{{ .CN }} ({{ .SAMAccountName }})</span> | ||
|
||
{{ if not .Enabled }}{{ template "lock-icon" "text-gray-500" }}{{ end }} | ||
{{ if not .Enabled }}{{ template "lock-icon" "text-gray-500" }}{{ end }} | ||
|
||
|
||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" | ||
class="goto inline-block transition-colors"> | ||
<path fill="currentColor" d="m14 18l-1.4-1.45L16.15 13H4v-2h12.15L12.6 7.45L14 6l6 6l-6 6Z" /> | ||
</svg> | ||
</a> | ||
</div> | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width="16" | ||
height="16" | ||
viewBox="0 0 24 24" | ||
class="goto inline-block transition-colors" | ||
> | ||
<path fill="currentColor" d="m14 18l-1.4-1.45L16.15 13H4v-2h12.15L12.6 7.45L14 6l6 6l-6 6Z" /> | ||
</svg> | ||
</a> | ||
</div> | ||
{{ end }} | ||
</div> |