@ddj-v2/user-management 2.6.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.ts +1 -1
- package/package.json +1 -1
- package/templates/user_manage_main.html +86 -88
package/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Context, Handler, param, PRIV, Types, UserModel, DomainModel,
|
|
3
|
-
ValidationError, UserNotFoundError, PermissionError,
|
|
3
|
+
ValidationError, UserNotFoundError, PermissionError, SystemModel, moment,
|
|
4
4
|
PERM
|
|
5
5
|
} from 'hydrooj';
|
|
6
6
|
import domain from 'hydrooj/src/model/domain';
|
package/package.json
CHANGED
|
@@ -34,99 +34,97 @@
|
|
|
34
34
|
</div>
|
|
35
35
|
|
|
36
36
|
<!-- 用户列表 -->
|
|
37
|
-
<
|
|
38
|
-
<
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
{
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
{
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
{
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
{
|
|
109
|
-
|
|
110
|
-
{
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
<
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
</table>
|
|
123
|
-
</div>
|
|
37
|
+
<table class="data-table">
|
|
38
|
+
<colgroup>
|
|
39
|
+
<col class="col--uid">
|
|
40
|
+
<col class="col--user">
|
|
41
|
+
<col class="col--email">
|
|
42
|
+
<col class="col--regat">
|
|
43
|
+
<col class="col--loginat">
|
|
44
|
+
<col class="col--priv">
|
|
45
|
+
<col class="col--status">
|
|
46
|
+
<col class="col--actions">
|
|
47
|
+
</colgroup>
|
|
48
|
+
<thead>
|
|
49
|
+
<tr>
|
|
50
|
+
<th class="col--uid">{{ _('User ID') }}</th>
|
|
51
|
+
<th class="col--user">{{ _('Username') }}</th>
|
|
52
|
+
<th class="col--email">{{ _('Email') }}</th>
|
|
53
|
+
<th class="col--regat">{{ _('Registration Time') }}</th>
|
|
54
|
+
<th class="col--loginat">{{ _('Last Login') }}</th>
|
|
55
|
+
<th class="col--priv">{{ _('Privilege') }}</th>
|
|
56
|
+
<th class="col--status">{{ _('Status') }}</th>
|
|
57
|
+
<th class="col--actions">{{ _('Actions') }}</th>
|
|
58
|
+
</tr>
|
|
59
|
+
</thead>
|
|
60
|
+
<tbody>
|
|
61
|
+
{% for udoc in udocs %}
|
|
62
|
+
{% set dudoc = dudocMap[udoc._id] %}
|
|
63
|
+
<tr data-uid="{{ udoc._id }}">
|
|
64
|
+
<td class="col--uid">
|
|
65
|
+
{{ udoc._id }}
|
|
66
|
+
</td>
|
|
67
|
+
<td class="col--user">
|
|
68
|
+
{{ user.render_inline(udoc, badge=false) }}
|
|
69
|
+
{% if dudoc and dudoc.displayName %}
|
|
70
|
+
<br><small class="text-gray">{{ dudoc.displayName }}</small>
|
|
71
|
+
{% endif %}
|
|
72
|
+
</td>
|
|
73
|
+
<td class="col--email">
|
|
74
|
+
{{ udoc.mail }}
|
|
75
|
+
</td>
|
|
76
|
+
<td class="col--regat">
|
|
77
|
+
{% if udoc.regat %}
|
|
78
|
+
{{ moment(udoc.regat).format('YYYY-MM-DD HH:mm') }}
|
|
79
|
+
{% else %}
|
|
80
|
+
-
|
|
81
|
+
{% endif %}
|
|
82
|
+
</td>
|
|
83
|
+
<td class="col--loginat">
|
|
84
|
+
{% if udoc.loginat %}
|
|
85
|
+
{{ moment(udoc.loginat).format('YYYY-MM-DD HH:mm') }}
|
|
86
|
+
{% else %}
|
|
87
|
+
-
|
|
88
|
+
{% endif %}
|
|
89
|
+
</td>
|
|
90
|
+
<td class="col--priv">
|
|
91
|
+
{% if udoc.priv == -1 %}
|
|
92
|
+
<span class="badge badge--red">root</span>
|
|
93
|
+
{% elif udoc.priv == 0 %}
|
|
94
|
+
<span class="badge badge--gray">{{ _('Banned') }}</span>
|
|
95
|
+
{% elif udoc.priv == 8 %}
|
|
96
|
+
<span class="badge badge--yellow">Guest</span>
|
|
97
|
+
{% elif udoc.priv == 4 %}
|
|
98
|
+
<span class="badge badge--purple">System</span>
|
|
99
|
+
{% elif udoc.priv == 16842756 %}
|
|
100
|
+
<span class="badge badge--green">Default</span>
|
|
101
|
+
{% else %}
|
|
102
|
+
<span class="badge badge--blue">Other</span>
|
|
103
|
+
{% endif %}
|
|
104
|
+
<br><small class="text-gray">{{ udoc.priv }}</small>
|
|
105
|
+
</td>
|
|
106
|
+
<td class="col--status">
|
|
107
|
+
{% if udoc.priv == 0 %}
|
|
108
|
+
<span class="text-red">{{ _('Banned') }}</span>
|
|
109
|
+
{% else %}
|
|
110
|
+
<span class="text-green">{{ _('Active') }}</span>
|
|
111
|
+
{% endif %}
|
|
112
|
+
</td>
|
|
113
|
+
<td class="col--actions">
|
|
114
|
+
<a href="{{ url('user_manage_detail', uid=udoc._id) }}" class="button button--small">
|
|
115
|
+
{{ _('Edit') }}
|
|
116
|
+
</a>
|
|
117
|
+
</td>
|
|
118
|
+
</tr>
|
|
119
|
+
{% endfor %}
|
|
120
|
+
</tbody>
|
|
121
|
+
</table>
|
|
124
122
|
|
|
125
123
|
<!-- 分页 -->
|
|
126
124
|
<div class="section__body">
|
|
127
125
|
<div class="row">
|
|
128
126
|
<div class="columns">
|
|
129
|
-
{{ paginator.render(page, upcount) }}
|
|
127
|
+
{{ paginator.render(page, upcount, add_qs=utils.buildQueryString(search=search, sort='' if sort == '_id' else sort)) }}
|
|
130
128
|
</div>
|
|
131
129
|
</div>
|
|
132
130
|
</div>
|