Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
530e1a3d5d
commit
195069450f
480 files changed
+15507
-24650
No files matched your search
@@ -2,15 +2,11 @@
|
||||
* 账号名单下成表格:用户名、密码两列。批量建号建完下名单、用户列表按班下名单共用这一份。
|
||||
* 开头带 BOM,Excel 打开中文才不乱码
|
||||
*/
|
||||
export function downloadAccountsCsv(
|
||||
rows: { username: string; password: string }[],
|
||||
filename: string,
|
||||
) {
|
||||
export function downloadAccountsCsv(rows: { username: string; password: string }[], filename: string) {
|
||||
const cell = (text: string) => (/[",\n]/.test(text) ? `"${text.replace(/"/g, '""')}"` : text)
|
||||
const csv =
|
||||
"用户名,密码\n" + rows.map((it) => `${cell(it.username)},${cell(it.password)}`).join("\n")
|
||||
const link = document.createElement("a")
|
||||
link.href = URL.createObjectURL(new Blob([csv], { type: "text/csv;charset=utf-8" }))
|
||||
const csv = '用户名,密码\n' + rows.map((it) => `${cell(it.username)},${cell(it.password)}`).join('\n')
|
||||
const link = document.createElement('a')
|
||||
link.href = URL.createObjectURL(new Blob([csv], { type: 'text/csv;charset=utf-8' }))
|
||||
link.download = `${filename}.csv`
|
||||
link.click()
|
||||
URL.revokeObjectURL(link.href)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { editUser } from "admin/api"
|
||||
import type { AdminUserForm } from "utils/types"
|
||||
import { useBreakpoints } from "shared/composables/breakpoints"
|
||||
import { editUser } from 'admin/api'
|
||||
import type { AdminUserForm } from 'utils/types'
|
||||
import { useBreakpoints } from 'shared/composables/breakpoints'
|
||||
|
||||
/**
|
||||
* 用户列表一行的操作:重置密码、编辑、禁用、删除直接摆出来(用户说的:不要收进 ⋯)。
|
||||
@@ -12,10 +12,10 @@ interface Props {
|
||||
}
|
||||
const props = defineProps<Props>()
|
||||
const emit = defineEmits<{
|
||||
(e: "deleteUser", value: number[]): void
|
||||
(e: "userBanned", value: AdminUserForm): void
|
||||
(e: "openEditModal", value: AdminUserForm): void
|
||||
(e: "resetPassword", value: AdminUserForm): void
|
||||
(e: 'deleteUser', value: number[]): void
|
||||
(e: 'userBanned', value: AdminUserForm): void
|
||||
(e: 'openEditModal', value: AdminUserForm): void
|
||||
(e: 'resetPassword', value: AdminUserForm): void
|
||||
}>()
|
||||
|
||||
const dialog = useDialog()
|
||||
@@ -25,16 +25,16 @@ const { isMobile } = useBreakpoints()
|
||||
async function banUser() {
|
||||
props.user.isDisabled = !props.user.isDisabled
|
||||
await editUser(props.user)
|
||||
emit("userBanned", props.user)
|
||||
emit('userBanned', props.user)
|
||||
}
|
||||
|
||||
function confirmDelete() {
|
||||
dialog.warning({
|
||||
title: `删除 ${props.user.username}?`,
|
||||
content: "删掉就找不回来了。交过题的账号删不掉,那种请改为禁用。",
|
||||
positiveText: "删除",
|
||||
negativeText: "不删",
|
||||
onPositiveClick: () => emit("deleteUser", [props.user.id]),
|
||||
content: '删掉就找不回来了。交过题的账号删不掉,那种请改为禁用。',
|
||||
positiveText: '删除',
|
||||
negativeText: '不删',
|
||||
onPositiveClick: () => emit('deleteUser', [props.user.id]),
|
||||
})
|
||||
}
|
||||
</script>
|
||||
@@ -43,7 +43,7 @@ function confirmDelete() {
|
||||
<n-button size="small" @click="emit('resetPassword', props.user)">重置密码</n-button>
|
||||
<n-button size="small" @click="emit('openEditModal', props.user)">编辑</n-button>
|
||||
<n-button size="small" @click="banUser">
|
||||
{{ props.user.isDisabled ? "解除禁用" : "禁用" }}
|
||||
{{ props.user.isDisabled ? '解除禁用' : '禁用' }}
|
||||
</n-button>
|
||||
<n-button size="small" quaternary type="error" @click="confirmDelete">删除</n-button>
|
||||
</n-flex>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import TextCopy from "shared/components/TextCopy.vue"
|
||||
import { USER_TYPE } from "utils/constants"
|
||||
import type { AdminUserForm } from "utils/types"
|
||||
import TextCopy from 'shared/components/TextCopy.vue'
|
||||
import { USER_TYPE } from 'utils/constants'
|
||||
import type { AdminUserForm } from 'utils/types'
|
||||
|
||||
interface Props {
|
||||
user: AdminUserForm
|
||||
@@ -9,7 +9,7 @@ interface Props {
|
||||
}
|
||||
const props = defineProps<Props>()
|
||||
defineEmits<{
|
||||
(e: "toggle", value: number): void
|
||||
(e: 'toggle', value: number): void
|
||||
}>()
|
||||
|
||||
/**
|
||||
@@ -21,9 +21,7 @@ defineEmits<{
|
||||
* `rawPassword` 为空时不打码:给一个点了什么也不显示的按钮没有意义,直接走原来的
|
||||
* TextCopy(渲染成空)。
|
||||
*/
|
||||
const maskable = computed(
|
||||
() => props.user.adminType !== USER_TYPE.REGULAR_USER && !!props.user.rawPassword,
|
||||
)
|
||||
const maskable = computed(() => props.user.adminType !== USER_TYPE.REGULAR_USER && !!props.user.rawPassword)
|
||||
</script>
|
||||
<template>
|
||||
<!-- 显示出来之后要能再收回去:看一眼就该关掉,不然一整页管理员密码就那么摊着,
|
||||
@@ -32,7 +30,7 @@ const maskable = computed(
|
||||
<span v-if="!props.revealed" class="dots">••••••</span>
|
||||
<TextCopy v-else>{{ props.user.rawPassword }}</TextCopy>
|
||||
<n-button size="tiny" secondary @click="$emit('toggle', props.user.id)">
|
||||
{{ props.revealed ? "隐藏" : "显示" }}
|
||||
{{ props.revealed ? '隐藏' : '显示' }}
|
||||
</n-button>
|
||||
</n-flex>
|
||||
<TextCopy v-else>{{ props.user.rawPassword }}</TextCopy>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import { PROBLEM_PERMISSION, USER_TYPE } from "utils/constants"
|
||||
import { getUserRole } from "utils/functions"
|
||||
import type { AdminUserForm } from "utils/types"
|
||||
import TextCopy from "shared/components/TextCopy.vue"
|
||||
import { PROBLEM_PERMISSION, USER_TYPE } from 'utils/constants'
|
||||
import { getUserRole } from 'utils/functions'
|
||||
import type { AdminUserForm } from 'utils/types'
|
||||
import TextCopy from 'shared/components/TextCopy.vue'
|
||||
|
||||
interface Props {
|
||||
user: AdminUserForm
|
||||
@@ -15,23 +15,11 @@ const hasRoleTag = computed(() => props.user.adminType !== USER_TYPE.REGULAR_USE
|
||||
<n-flex align="center" :size="6" :wrap="false">
|
||||
<TextCopy>{{ props.user.username }}</TextCopy>
|
||||
<n-tag v-if="props.user.isDisabled" type="error" size="small" :bordered="false"> 已禁用 </n-tag>
|
||||
<n-tag
|
||||
v-if="hasRoleTag"
|
||||
:type="getUserRole(props.user.adminType).type"
|
||||
size="small"
|
||||
:bordered="false"
|
||||
>
|
||||
<n-tag v-if="hasRoleTag" :type="getUserRole(props.user.adminType).type" size="small" :bordered="false">
|
||||
{{ getUserRole(props.user.adminType).label }}
|
||||
</n-tag>
|
||||
<n-tag
|
||||
v-if="
|
||||
props.user.adminType === USER_TYPE.STUDENT_ADMIN ||
|
||||
props.user.adminType === USER_TYPE.TEACHER_ADMIN
|
||||
"
|
||||
size="small"
|
||||
:bordered="false"
|
||||
>
|
||||
{{ props.user.problemPermission === PROBLEM_PERMISSION.ALL ? "全部题目" : "自己的题" }}
|
||||
<n-tag v-if="props.user.adminType === USER_TYPE.STUDENT_ADMIN || props.user.adminType === USER_TYPE.TEACHER_ADMIN" size="small" :bordered="false">
|
||||
{{ props.user.problemPermission === PROBLEM_PERMISSION.ALL ? '全部题目' : '自己的题' }}
|
||||
</n-tag>
|
||||
</n-flex>
|
||||
</template>
|
||||
@@ -1,19 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
import type { ImportUsersRequest } from "@oj2/contract"
|
||||
import { downloadAccountsCsv } from "./accountsCsv"
|
||||
import PageHeader from "admin/components/PageHeader.vue"
|
||||
import { classLabel } from "utils/classes"
|
||||
import UserName from "shared/components/UserName.vue"
|
||||
import { errorMessage } from "utils/api"
|
||||
import {
|
||||
CLASS_NAME_MAX_DIGITS,
|
||||
CLASS_NAME_MAX_VALUE,
|
||||
CLASS_NAME_MIN_DIGITS,
|
||||
CLASS_NAME_MIN_VALUE,
|
||||
} from "utils/constants"
|
||||
import { parseTime } from "utils/functions"
|
||||
import { checkUsernames, importUsers } from "../api"
|
||||
import { useBreakpoints } from "shared/composables/breakpoints"
|
||||
import type { ImportUsersRequest } from '@oj2/contract'
|
||||
import { downloadAccountsCsv } from './accountsCsv'
|
||||
import PageHeader from 'admin/components/PageHeader.vue'
|
||||
import { classLabel } from 'utils/classes'
|
||||
import UserName from 'shared/components/UserName.vue'
|
||||
import { errorMessage } from 'utils/api'
|
||||
import { CLASS_NAME_MAX_DIGITS, CLASS_NAME_MAX_VALUE, CLASS_NAME_MIN_DIGITS, CLASS_NAME_MIN_VALUE } from 'utils/constants'
|
||||
import { parseTime } from 'utils/functions'
|
||||
import { checkUsernames, importUsers } from '../api'
|
||||
import { useBreakpoints } from 'shared/composables/breakpoints'
|
||||
|
||||
/**
|
||||
* 批量建号(设计稿「后台用户与批量建号」UsGen / UsGenIssue / UsDone)。
|
||||
@@ -27,25 +22,25 @@ const message = useMessage()
|
||||
// 手机上左右两栏改成上下:先填班级和名单,预览排在下面
|
||||
const { isMobile } = useBreakpoints()
|
||||
|
||||
const classNo = ref("")
|
||||
const rawInput = ref("")
|
||||
const classNo = ref('')
|
||||
const rawInput = ref('')
|
||||
|
||||
const classError = computed(() => {
|
||||
const value = classNo.value.trim()
|
||||
if (!value) return ""
|
||||
if (!value) return ''
|
||||
const n = Number(value)
|
||||
if (!/^\d+$/.test(value) || n < CLASS_NAME_MIN_VALUE || n > CLASS_NAME_MAX_VALUE) {
|
||||
return `班级号要是 ${CLASS_NAME_MIN_DIGITS}~${CLASS_NAME_MAX_DIGITS} 位数字`
|
||||
}
|
||||
return ""
|
||||
return ''
|
||||
})
|
||||
const prefix = computed(() => (classNo.value.trim() ? `ks${classNo.value.trim()}` : ""))
|
||||
const prefix = computed(() => (classNo.value.trim() ? `ks${classNo.value.trim()}` : ''))
|
||||
|
||||
/** 名单:一行一个,前后和中间的空格都去掉(从表格里复制常带空格),空行不算 */
|
||||
const names = computed(() =>
|
||||
rawInput.value
|
||||
.split("\n")
|
||||
.map((line) => line.replace(/\s+/g, ""))
|
||||
.split('\n')
|
||||
.map((line) => line.replace(/\s+/g, ''))
|
||||
.filter(Boolean),
|
||||
)
|
||||
|
||||
@@ -54,8 +49,8 @@ const passwords = new Map<string, string>()
|
||||
function passwordOf(name: string) {
|
||||
let value = passwords.get(name)
|
||||
if (!value) {
|
||||
value = ""
|
||||
for (let j = 0; j < 6; j++) value += "123456789".charAt(Math.floor(Math.random() * 9))
|
||||
value = ''
|
||||
for (let j = 0; j < 6; j++) value += '123456789'.charAt(Math.floor(Math.random() * 9))
|
||||
passwords.set(name, value)
|
||||
}
|
||||
return value
|
||||
@@ -86,7 +81,7 @@ const duplicates = computed(() => {
|
||||
const existing = ref<{ username: string; createTime: string | null }[]>([])
|
||||
const checking = ref(false)
|
||||
watchDebounced(
|
||||
() => rows.value.map((row) => row.username).join("\n"),
|
||||
() => rows.value.map((row) => row.username).join('\n'),
|
||||
async () => {
|
||||
const usernames = [...new Set(rows.value.map((row) => row.username))]
|
||||
if (!usernames.length || classError.value || usernames.length > 500) {
|
||||
@@ -106,16 +101,8 @@ watchDebounced(
|
||||
)
|
||||
|
||||
const tooMany = computed(() => rows.value.length > 500)
|
||||
const issueCount = computed(
|
||||
() =>
|
||||
(classError.value ? 1 : 0) +
|
||||
duplicates.value.length +
|
||||
existing.value.length +
|
||||
(tooMany.value ? 1 : 0),
|
||||
)
|
||||
const canSubmit = computed(
|
||||
() => rows.value.length > 0 && !issueCount.value && !checking.value && !!prefix.value,
|
||||
)
|
||||
const issueCount = computed(() => (classError.value ? 1 : 0) + duplicates.value.length + existing.value.length + (tooMany.value ? 1 : 0))
|
||||
const canSubmit = computed(() => rows.value.length > 0 && !issueCount.value && !checking.value && !!prefix.value)
|
||||
|
||||
// ---------------------------------------------------------------- 建号
|
||||
|
||||
@@ -128,10 +115,10 @@ async function submit() {
|
||||
// 占位邮箱必须全站唯一:注册、编辑用户、导入三条路都查重。每批一段随机后缀错开,
|
||||
// 同一个班分两批导也不会撞。这个地址不发给任何人,纯占位
|
||||
const batch = Math.random().toString(36).slice(2, 8)
|
||||
const payload: ImportUsersRequest["users"] = rows.value.map((row, i) => [
|
||||
const payload: ImportUsersRequest['users'] = rows.value.map((row, i) => [
|
||||
row.username,
|
||||
row.password,
|
||||
`${prefix.value || "user"}.${batch}.${i + 1}@example.com`,
|
||||
`${prefix.value || 'user'}.${batch}.${i + 1}@example.com`,
|
||||
row.name,
|
||||
])
|
||||
saving.value = true
|
||||
@@ -140,7 +127,7 @@ async function submit() {
|
||||
addedClasses.value = res.addedClasses ?? []
|
||||
done.value = rows.value.map(({ username, password }) => ({ username, password }))
|
||||
} catch (err) {
|
||||
message.error("没建成:" + errorMessage(err))
|
||||
message.error('没建成:' + errorMessage(err))
|
||||
} finally {
|
||||
saving.value = false
|
||||
}
|
||||
@@ -148,37 +135,30 @@ async function submit() {
|
||||
|
||||
function again() {
|
||||
done.value = null
|
||||
rawInput.value = ""
|
||||
rawInput.value = ''
|
||||
addedClasses.value = []
|
||||
passwords.clear()
|
||||
}
|
||||
|
||||
function download() {
|
||||
if (!done.value) return
|
||||
downloadAccountsCsv(done.value, prefix.value || "账号")
|
||||
downloadAccountsCsv(done.value, prefix.value || '账号')
|
||||
}
|
||||
|
||||
/** 打印账号条:一人一张,一页四列,打出来剪开发下去 */
|
||||
function printSlips() {
|
||||
if (!done.value) return
|
||||
const escape = (text: string) =>
|
||||
text.replace(
|
||||
/[&<>"]/g,
|
||||
(ch) => ({ "&": "&", "<": "<", ">": ">", '"': """ })[ch]!,
|
||||
)
|
||||
const escape = (text: string) => text.replace(/[&<>"]/g, (ch) => ({ '&': '&', '<': '<', '>': '>', '"': '"' })[ch]!)
|
||||
const slips = done.value
|
||||
.map(
|
||||
(it) =>
|
||||
`<div class="slip"><div class="u">${escape(it.username)}</div><div class="p">密码 ${escape(it.password)}</div></div>`,
|
||||
)
|
||||
.join("")
|
||||
const win = window.open("", "_blank")
|
||||
.map((it) => `<div class="slip"><div class="u">${escape(it.username)}</div><div class="p">密码 ${escape(it.password)}</div></div>`)
|
||||
.join('')
|
||||
const win = window.open('', '_blank')
|
||||
if (!win) {
|
||||
message.warning("浏览器拦住了新窗口,允许弹出窗口后再点一次")
|
||||
message.warning('浏览器拦住了新窗口,允许弹出窗口后再点一次')
|
||||
return
|
||||
}
|
||||
win.document.write(`<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><title>${escape(
|
||||
classLabel(classNo.value.trim()) || "账号条",
|
||||
classLabel(classNo.value.trim()) || '账号条',
|
||||
)}</title><style>
|
||||
body{margin:12mm;font-family:"Microsoft YaHei","PingFang SC",sans-serif}
|
||||
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:0}
|
||||
@@ -198,9 +178,7 @@ body{margin:12mm;font-family:"Microsoft YaHei","PingFang SC",sans-serif}
|
||||
<div v-if="done" class="done">
|
||||
<div class="done-bar">
|
||||
<b>建好了 {{ done.length }} 个账号</b>
|
||||
<n-text v-if="addedClasses.length" depth="3">
|
||||
{{ addedClasses.map((name) => classLabel(name)).join("、") }}已加进班级列表
|
||||
</n-text>
|
||||
<n-text v-if="addedClasses.length" depth="3"> {{ addedClasses.map((name) => classLabel(name)).join('、') }}已加进班级列表 </n-text>
|
||||
<div class="spacer"></div>
|
||||
<n-button @click="download">下载名单(表格)</n-button>
|
||||
<n-button type="primary" @click="printSlips">打印账号条</n-button>
|
||||
@@ -219,51 +197,31 @@ body{margin:12mm;font-family:"Microsoft YaHei","PingFang SC",sans-serif}
|
||||
<label class="label" for="class-no">班级号</label>
|
||||
<div class="class-row">
|
||||
<span class="ks">ks</span>
|
||||
<n-input
|
||||
v-model:value="classNo"
|
||||
:input-props="{ id: 'class-no', inputmode: 'numeric' }"
|
||||
placeholder="如 2612"
|
||||
style="width: 120px"
|
||||
/>
|
||||
<n-input v-model:value="classNo" :input-props="{ id: 'class-no', inputmode: 'numeric' }" placeholder="如 2612" style="width: 120px" />
|
||||
<span v-if="classNo.trim() && !classError" class="class-name">
|
||||
{{ classLabel(classNo.trim()) }}
|
||||
</span>
|
||||
</div>
|
||||
<label class="label" for="names">
|
||||
名单 <n-text depth="3" class="hint">从表格里整列复制过来,一行一个</n-text>
|
||||
</label>
|
||||
<n-input
|
||||
v-model:value="rawInput"
|
||||
type="textarea"
|
||||
:input-props="{ id: 'names' }"
|
||||
:rows="isMobile ? 8 : 20"
|
||||
placeholder="一行一个名字"
|
||||
/>
|
||||
<label class="label" for="names"> 名单 <n-text depth="3" class="hint">从表格里整列复制过来,一行一个</n-text> </label>
|
||||
<n-input v-model:value="rawInput" type="textarea" :input-props="{ id: 'names' }" :rows="isMobile ? 8 : 20" placeholder="一行一个名字" />
|
||||
</div>
|
||||
|
||||
<div class="right">
|
||||
<template v-if="rows.length">
|
||||
<div class="head">
|
||||
<b>会建这 {{ rows.length }} 个账号</b>
|
||||
<n-tag v-if="!issueCount && !checking && prefix" type="success" :bordered="false" round>
|
||||
没有重名
|
||||
</n-tag>
|
||||
<n-tag v-if="issueCount" type="warning" :bordered="false" round>
|
||||
有 {{ issueCount }} 处要先改
|
||||
</n-tag>
|
||||
<n-tag v-if="!issueCount && !checking && prefix" type="success" :bordered="false" round> 没有重名 </n-tag>
|
||||
<n-tag v-if="issueCount" type="warning" :bordered="false" round> 有 {{ issueCount }} 处要先改 </n-tag>
|
||||
</div>
|
||||
|
||||
<div v-if="issueCount" class="issues">
|
||||
<div v-if="classError">{{ classError }}</div>
|
||||
<div v-if="tooMany">一次最多 500 个,分两批建</div>
|
||||
<div v-for="dup in duplicates" :key="dup.line">
|
||||
第 {{ dup.line }} 行「{{ dup.name }}」和第 {{ dup.firstLine }} 行重名 ——
|
||||
同班同名的,名字后面加个 1、2 区分
|
||||
第 {{ dup.line }} 行「{{ dup.name }}」和第 {{ dup.firstLine }} 行重名 —— 同班同名的,名字后面加个 1、2 区分
|
||||
</div>
|
||||
<div v-for="it in existing" :key="it.username">
|
||||
{{ it.username }} 已经有这个账号了<template v-if="it.createTime"
|
||||
>({{ parseTime(it.createTime, "YYYY-MM-DD") }} 建的)</template
|
||||
>
|
||||
{{ it.username }} 已经有这个账号了<template v-if="it.createTime">({{ parseTime(it.createTime, 'YYYY-MM-DD') }} 建的)</template>
|
||||
—— 删掉这一行,或者换个名字
|
||||
</div>
|
||||
</div>
|
||||
@@ -288,25 +246,13 @@ body{margin:12mm;font-family:"Microsoft YaHei","PingFang SC",sans-serif}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<n-button
|
||||
type="primary"
|
||||
size="large"
|
||||
:disabled="!canSubmit"
|
||||
:loading="saving || checking"
|
||||
@click="submit"
|
||||
>
|
||||
<n-button type="primary" size="large" :disabled="!canSubmit" :loading="saving || checking" @click="submit">
|
||||
建好这 {{ rows.length }} 个账号
|
||||
</n-button>
|
||||
<n-text v-if="!prefix" depth="3" class="hint" style="margin-left: 12px">
|
||||
先填班级号
|
||||
</n-text>
|
||||
<n-text v-if="!prefix" depth="3" class="hint" style="margin-left: 12px"> 先填班级号 </n-text>
|
||||
</div>
|
||||
</template>
|
||||
<n-empty
|
||||
v-else
|
||||
:description="`${isMobile ? '上面' : '左边'}粘进名单,这里就列出会建成的账号`"
|
||||
:style="{ marginTop: isMobile ? '24px' : '80px' }"
|
||||
/>
|
||||
<n-empty v-else :description="`${isMobile ? '上面' : '左边'}粘进名单,这里就列出会建成的账号`" :style="{ marginTop: isMobile ? '24px' : '80px' }" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
+100
-171
@@ -1,24 +1,24 @@
|
||||
<script setup lang="ts">
|
||||
import { Icon } from "@iconify/vue"
|
||||
import PageHeader from "admin/components/PageHeader.vue"
|
||||
import { errorMessage } from "utils/api"
|
||||
import { DataTableRowKey, SelectOption, useThemeVars } from "naive-ui"
|
||||
import Pagination from "shared/components/Pagination.vue"
|
||||
import { usePagination } from "shared/composables/pagination"
|
||||
import { parseTime } from "utils/functions"
|
||||
import type { AdminUserForm } from "utils/types"
|
||||
import { deleteUsers, editUser, getUserList, importUsers, resetPassword } from "../api"
|
||||
import Actions from "./components/Actions.vue"
|
||||
import UserNameCell from "./components/UserNameCell.vue"
|
||||
import PasswordCell from "./components/PasswordCell.vue"
|
||||
import { PROBLEM_PERMISSION, USER_TYPE } from "utils/constants"
|
||||
import { useRouteQuery } from "@vueuse/router"
|
||||
import { NO_CLASS, STUDENT_ROLES, type ImportUsersRequest } from "@oj2/contract"
|
||||
import { downloadAccountsCsv } from "./accountsCsv"
|
||||
import { classLabel, groupClassOptions } from "utils/classes"
|
||||
import { useConfigStore } from "shared/store/config"
|
||||
import { useBreakpoints } from "shared/composables/breakpoints"
|
||||
import { useListLoader } from "shared/composables/listLoader"
|
||||
import { Icon } from '@iconify/vue'
|
||||
import PageHeader from 'admin/components/PageHeader.vue'
|
||||
import { errorMessage } from 'utils/api'
|
||||
import { DataTableRowKey, SelectOption, useThemeVars } from 'naive-ui'
|
||||
import Pagination from 'shared/components/Pagination.vue'
|
||||
import { usePagination } from 'shared/composables/pagination'
|
||||
import { parseTime } from 'utils/functions'
|
||||
import type { AdminUserForm } from 'utils/types'
|
||||
import { deleteUsers, editUser, getUserList, importUsers, resetPassword } from '../api'
|
||||
import Actions from './components/Actions.vue'
|
||||
import UserNameCell from './components/UserNameCell.vue'
|
||||
import PasswordCell from './components/PasswordCell.vue'
|
||||
import { PROBLEM_PERMISSION, USER_TYPE } from 'utils/constants'
|
||||
import { useRouteQuery } from '@vueuse/router'
|
||||
import { NO_CLASS, STUDENT_ROLES, type ImportUsersRequest } from '@oj2/contract'
|
||||
import { downloadAccountsCsv } from './accountsCsv'
|
||||
import { classLabel, groupClassOptions } from 'utils/classes'
|
||||
import { useConfigStore } from 'shared/store/config'
|
||||
import { useBreakpoints } from 'shared/composables/breakpoints'
|
||||
import { useListLoader } from 'shared/composables/listLoader'
|
||||
|
||||
/**
|
||||
* 后台用户列表(设计稿「后台用户与批量建号」UsList)。老师进来多半是三件事:学生忘了密码、
|
||||
@@ -39,14 +39,14 @@ interface UserQuery {
|
||||
|
||||
// 使用分页 composable
|
||||
const { query, clearQuery } = usePagination<UserQuery>({
|
||||
keyword: useRouteQuery("keyword", "").value,
|
||||
type: useRouteQuery("type", "").value,
|
||||
orderBy: useRouteQuery("orderBy", "").value,
|
||||
className: useRouteQuery("className", "").value,
|
||||
keyword: useRouteQuery('keyword', '').value,
|
||||
type: useRouteQuery('type', '').value,
|
||||
orderBy: useRouteQuery('orderBy', '').value,
|
||||
className: useRouteQuery('className', '').value,
|
||||
})
|
||||
|
||||
const classOptions = computed(() => [
|
||||
{ label: "全部班级", value: "" },
|
||||
{ label: '全部班级', value: '' },
|
||||
...groupClassOptions(configStore.config?.classList ?? []),
|
||||
{ label: classLabel(NO_CLASS), value: NO_CLASS },
|
||||
])
|
||||
@@ -57,21 +57,21 @@ const users = ref<AdminUserForm[]>([])
|
||||
const userEditing = ref<AdminUserForm | null>(null)
|
||||
|
||||
const adminOptions = [
|
||||
{ label: "全部角色", value: "" },
|
||||
{ label: "学生", value: USER_TYPE.REGULAR_USER },
|
||||
{ label: "学生管理员", value: USER_TYPE.STUDENT_ADMIN },
|
||||
{ label: "教师管理员", value: USER_TYPE.TEACHER_ADMIN },
|
||||
{ label: "超级管理员", value: USER_TYPE.SUPER_ADMIN },
|
||||
{ label: '全部角色', value: '' },
|
||||
{ label: '学生', value: USER_TYPE.REGULAR_USER },
|
||||
{ label: '学生管理员', value: USER_TYPE.STUDENT_ADMIN },
|
||||
{ label: '教师管理员', value: USER_TYPE.TEACHER_ADMIN },
|
||||
{ label: '超级管理员', value: USER_TYPE.SUPER_ADMIN },
|
||||
]
|
||||
|
||||
const sortOptions = [
|
||||
{ label: "最近建号", value: "" },
|
||||
{ label: "按用户名", value: "username" },
|
||||
{ label: "最近登录", value: "-last_login" },
|
||||
{ label: "在线优先", value: "-online" },
|
||||
{ label: '最近建号', value: '' },
|
||||
{ label: '按用户名', value: 'username' },
|
||||
{ label: '最近登录', value: '-last_login' },
|
||||
{ label: '在线优先', value: '-online' },
|
||||
]
|
||||
const [create, toggleCreate] = useToggle(false)
|
||||
const password = ref("")
|
||||
const password = ref('')
|
||||
// 已经点开的管理员密码,按 user id 记。同一个按钮再点一下收回去;listUsers() 里清空,
|
||||
// 所以翻页/搜索/换筛选之后也一律回到打码状态 —— 不做定时自动隐藏,也不记进 localStorage。
|
||||
const revealedPasswords = ref(new Set<number>())
|
||||
@@ -81,17 +81,13 @@ const rowKey = (row: AdminUserForm) => row.id
|
||||
|
||||
/** 上次登录:今天的写「今天 13:02」,在线的前面一个绿点;今年的写到月日;从没登录的写出来 */
|
||||
function lastLoginText(row: AdminUserForm) {
|
||||
if (!row.lastLogin) return h("span", { class: "muted" }, "从没登录")
|
||||
const day = parseTime(row.lastLogin, "YYYY-MM-DD")
|
||||
const today = parseTime(new Date().toISOString(), "YYYY-MM-DD")
|
||||
if (!row.lastLogin) return h('span', { class: 'muted' }, '从没登录')
|
||||
const day = parseTime(row.lastLogin, 'YYYY-MM-DD')
|
||||
const today = parseTime(new Date().toISOString(), 'YYYY-MM-DD')
|
||||
const text =
|
||||
day === today
|
||||
? `今天 ${parseTime(row.lastLogin, "HH:mm")}`
|
||||
: day.slice(0, 4) === today.slice(0, 4)
|
||||
? parseTime(row.lastLogin, "MM-DD HH:mm")
|
||||
: day
|
||||
return h("span", { class: "num", title: parseTime(row.lastLogin, "YYYY-MM-DD HH:mm:ss") }, [
|
||||
row.isOnline ? h("span", { class: "online", title: "在线" }) : null,
|
||||
day === today ? `今天 ${parseTime(row.lastLogin, 'HH:mm')}` : day.slice(0, 4) === today.slice(0, 4) ? parseTime(row.lastLogin, 'MM-DD HH:mm') : day
|
||||
return h('span', { class: 'num', title: parseTime(row.lastLogin, 'YYYY-MM-DD HH:mm:ss') }, [
|
||||
row.isOnline ? h('span', { class: 'online', title: '在线' }) : null,
|
||||
text,
|
||||
])
|
||||
}
|
||||
@@ -121,67 +117,52 @@ function renderActions(row: AdminUserForm) {
|
||||
* 密码单独一行(学生忘了密码是最常见的事,要一眼找到),操作按钮放不下就折行
|
||||
*/
|
||||
function renderMobileCard(row: AdminUserForm) {
|
||||
return h("div", { class: "m-card" }, [
|
||||
return h('div', { class: 'm-card' }, [
|
||||
h(UserNameCell, { user: row }),
|
||||
h("div", { class: "m-meta muted" }, [
|
||||
h("span", { class: "m-item" }, row.className ? classLabel(row.className) : "没填班级"),
|
||||
h("span", { class: "m-item" }, [" · ", lastLoginText(row)]),
|
||||
row.createTime
|
||||
? h("span", { class: "m-item" }, ` · 建号 ${parseTime(row.createTime, "YYYY-MM-DD")}`)
|
||||
: null,
|
||||
h('div', { class: 'm-meta muted' }, [
|
||||
h('span', { class: 'm-item' }, row.className ? classLabel(row.className) : '没填班级'),
|
||||
h('span', { class: 'm-item' }, [' · ', lastLoginText(row)]),
|
||||
row.createTime ? h('span', { class: 'm-item' }, ` · 建号 ${parseTime(row.createTime, 'YYYY-MM-DD')}`) : null,
|
||||
]),
|
||||
row.rawPassword
|
||||
? h("div", { class: "m-password" }, [
|
||||
h("span", { class: "muted" }, "密码"),
|
||||
renderPassword(row),
|
||||
])
|
||||
: null,
|
||||
row.rawPassword ? h('div', { class: 'm-password' }, [h('span', { class: 'muted' }, '密码'), renderPassword(row)]) : null,
|
||||
renderActions(row),
|
||||
])
|
||||
}
|
||||
|
||||
const mobileColumns: DataTableColumn<AdminUserForm>[] = [
|
||||
{ type: "selection" },
|
||||
{ title: "用户", key: "username", render: renderMobileCard },
|
||||
]
|
||||
const mobileColumns: DataTableColumn<AdminUserForm>[] = [{ type: 'selection' }, { title: '用户', key: 'username', render: renderMobileCard }]
|
||||
|
||||
const desktopColumns: DataTableColumn<AdminUserForm>[] = [
|
||||
{ type: "selection" },
|
||||
{ type: 'selection' },
|
||||
{
|
||||
title: "用户名",
|
||||
key: "username",
|
||||
title: '用户名',
|
||||
key: 'username',
|
||||
// 定宽:用户名一般就 ks + 班号 + 两三个字,原来 minWidth 让它把整行剩下的空都吃掉了(用户嫌空太多)。
|
||||
// 剩下的宽度给最后的操作列,操作直接摆出来
|
||||
width: 230,
|
||||
render: (row) => h(UserNameCell, { user: row }),
|
||||
},
|
||||
{
|
||||
title: "班级",
|
||||
key: "className",
|
||||
title: '班级',
|
||||
key: 'className',
|
||||
width: 130,
|
||||
render: (row) => h("span", { class: "muted" }, row.className ? classLabel(row.className) : "—"),
|
||||
render: (row) => h('span', { class: 'muted' }, row.className ? classLabel(row.className) : '—'),
|
||||
},
|
||||
{
|
||||
title: "密码",
|
||||
key: "raw_password",
|
||||
title: '密码',
|
||||
key: 'raw_password',
|
||||
width: 150,
|
||||
render: renderPassword,
|
||||
},
|
||||
{ title: "上次登录", key: "last_login", width: 150, render: lastLoginText },
|
||||
{ title: '上次登录', key: 'last_login', width: 150, render: lastLoginText },
|
||||
{
|
||||
title: "建号",
|
||||
key: "create_time",
|
||||
title: '建号',
|
||||
key: 'create_time',
|
||||
width: 110,
|
||||
render: (row) =>
|
||||
h(
|
||||
"span",
|
||||
{ class: "num muted" },
|
||||
row.createTime ? parseTime(row.createTime, "YYYY-MM-DD") : "",
|
||||
),
|
||||
render: (row) => h('span', { class: 'num muted' }, row.createTime ? parseTime(row.createTime, 'YYYY-MM-DD') : ''),
|
||||
},
|
||||
{
|
||||
key: "actions",
|
||||
title: "",
|
||||
key: 'actions',
|
||||
title: '',
|
||||
minWidth: 300,
|
||||
render: renderActions,
|
||||
},
|
||||
@@ -190,16 +171,16 @@ const desktopColumns: DataTableColumn<AdminUserForm>[] = [
|
||||
const columns = computed(() => (isMobile.value ? mobileColumns : desktopColumns))
|
||||
|
||||
const options: SelectOption[] = [
|
||||
{ label: "普通", value: USER_TYPE.REGULAR_USER },
|
||||
{ label: "学生管理员", value: USER_TYPE.STUDENT_ADMIN },
|
||||
{ label: "教师管理员", value: USER_TYPE.TEACHER_ADMIN },
|
||||
{ label: "超级管理员", value: USER_TYPE.SUPER_ADMIN },
|
||||
{ label: '普通', value: USER_TYPE.REGULAR_USER },
|
||||
{ label: '学生管理员', value: USER_TYPE.STUDENT_ADMIN },
|
||||
{ label: '教师管理员', value: USER_TYPE.TEACHER_ADMIN },
|
||||
{ label: '超级管理员', value: USER_TYPE.SUPER_ADMIN },
|
||||
]
|
||||
|
||||
const problemPermissionOptions: SelectOption[] = [
|
||||
{ label: "无权限", value: PROBLEM_PERMISSION.NONE },
|
||||
{ label: "仅管理自己创建", value: PROBLEM_PERMISSION.OWN },
|
||||
{ label: "管理全部题目", value: PROBLEM_PERMISSION.ALL },
|
||||
{ label: '无权限', value: PROBLEM_PERMISSION.NONE },
|
||||
{ label: '仅管理自己创建', value: PROBLEM_PERMISSION.OWN },
|
||||
{ label: '管理全部题目', value: PROBLEM_PERMISSION.ALL },
|
||||
]
|
||||
// 老师不给「无权限」:比赛题的接口要出题权限,设了就是比赛题目页全报权限不足,后端也会兜成「仅自己」
|
||||
const teacherPermissionOptions = problemPermissionOptions.slice(1)
|
||||
@@ -208,9 +189,7 @@ const { loading, track } = useListLoader()
|
||||
async function listUsers() {
|
||||
if (query.page < 1) query.page = 1
|
||||
const offset = (query.page - 1) * query.limit
|
||||
const res = await track(
|
||||
getUserList(offset, query.limit, query.type, query.keyword, query.orderBy, query.className),
|
||||
)
|
||||
const res = await track(getUserList(offset, query.limit, query.type, query.keyword, query.orderBy, query.className))
|
||||
if (!res) return
|
||||
total.value = res.total
|
||||
neverLoggedIn.value = res.neverLoggedIn
|
||||
@@ -229,19 +208,17 @@ async function downloadClassAccounts() {
|
||||
try {
|
||||
const rows: AdminUserForm[] = []
|
||||
for (let offset = 0; ; offset += 250) {
|
||||
const res = await getUserList(offset, 250, "", "", "username", className)
|
||||
const res = await getUserList(offset, 250, '', '', 'username', className)
|
||||
rows.push(...res.results)
|
||||
if (!res.results.length || rows.length >= res.total) break
|
||||
}
|
||||
const students = rows.filter((it) =>
|
||||
(STUDENT_ROLES as readonly string[]).includes(it.adminType),
|
||||
)
|
||||
const students = rows.filter((it) => (STUDENT_ROLES as readonly string[]).includes(it.adminType))
|
||||
if (!students.length) {
|
||||
message.warning("这个班没有学生")
|
||||
message.warning('这个班没有学生')
|
||||
return
|
||||
}
|
||||
downloadAccountsCsv(
|
||||
students.map((it) => ({ username: it.username, password: it.rawPassword ?? "" })),
|
||||
students.map((it) => ({ username: it.username, password: it.rawPassword ?? '' })),
|
||||
`${classLabel(className)}账号`,
|
||||
)
|
||||
} catch (err) {
|
||||
@@ -258,7 +235,7 @@ function chooseUsers(rowKeys: DataTableRowKey[]) {
|
||||
async function onDeleteUsers(ids: DataTableRowKey[] | Ref<number[]>) {
|
||||
try {
|
||||
await deleteUsers(toRaw(ids) as number[])
|
||||
message.success("删掉了")
|
||||
message.success('删掉了')
|
||||
userIDs.value = []
|
||||
} catch (err) {
|
||||
message.error(errorMessage(err))
|
||||
@@ -290,34 +267,34 @@ function createNewUser() {
|
||||
toggleCreate(true)
|
||||
userEditing.value = {
|
||||
id: 0,
|
||||
username: "",
|
||||
realName: "",
|
||||
username: '',
|
||||
realName: '',
|
||||
// 预填一个唯一的占位邮箱:这条路走的是导入接口,后端要求邮箱合法且不重复,
|
||||
// 留空会直接被打回。想填真邮箱就改掉它
|
||||
email: `user.${Math.random().toString(36).slice(2, 10)}@example.com`,
|
||||
// 导入接口写死建成普通用户(后端 POST /admin/users),这里不摆一个建不出来的
|
||||
// 角色。要给管理员权限,建完再用「编辑」改
|
||||
adminType: "Regular User",
|
||||
problemPermission: "None",
|
||||
adminType: 'Regular User',
|
||||
problemPermission: 'None',
|
||||
createTime: null,
|
||||
lastLogin: null,
|
||||
isDisabled: false,
|
||||
isOnline: false,
|
||||
rawPassword: null,
|
||||
className: null,
|
||||
password: "",
|
||||
password: '',
|
||||
}
|
||||
password.value = ""
|
||||
password.value = ''
|
||||
}
|
||||
|
||||
function onOpenEditModal(user: AdminUserForm) {
|
||||
userEditing.value = user
|
||||
password.value = ""
|
||||
password.value = ''
|
||||
}
|
||||
|
||||
function onCloseEditModal() {
|
||||
userEditing.value = null
|
||||
password.value = ""
|
||||
password.value = ''
|
||||
toggleCreate(false)
|
||||
}
|
||||
|
||||
@@ -325,24 +302,19 @@ async function handleEditUser() {
|
||||
if (!userEditing.value) return
|
||||
// 新建走的是导入接口,密码是必填的(后端 min(1)),留空只会换来一句 400
|
||||
if (create.value && !password.value) {
|
||||
message.error("新建用户必须填写密码")
|
||||
message.error('新建用户必须填写密码')
|
||||
return
|
||||
}
|
||||
if (password.value && password.value.length < 6) {
|
||||
message.error("密码长度不得小于 6")
|
||||
message.error('密码长度不得小于 6')
|
||||
return
|
||||
}
|
||||
// http 拦截器只对 login-required / permission-denied 自动弹提示,
|
||||
// 其余业务错误(比如班级号位数不对)不接住就什么都不显示
|
||||
try {
|
||||
if (create.value) {
|
||||
const newUser: ImportUsersRequest["users"] = [
|
||||
[
|
||||
userEditing.value.username,
|
||||
password.value,
|
||||
userEditing.value.email ?? "",
|
||||
userEditing.value.realName ?? "",
|
||||
],
|
||||
const newUser: ImportUsersRequest['users'] = [
|
||||
[userEditing.value.username, password.value, userEditing.value.email ?? '', userEditing.value.realName ?? ''],
|
||||
]
|
||||
await importUsers(newUser)
|
||||
listUsers()
|
||||
@@ -353,11 +325,11 @@ async function handleEditUser() {
|
||||
await editUser(user)
|
||||
}
|
||||
} catch (err) {
|
||||
message.error("保存失败:" + errorMessage(err))
|
||||
message.error('保存失败:' + errorMessage(err))
|
||||
return
|
||||
}
|
||||
userEditing.value = null
|
||||
password.value = ""
|
||||
password.value = ''
|
||||
toggleCreate(false)
|
||||
}
|
||||
|
||||
@@ -380,45 +352,17 @@ watch(() => [query.page, query.limit, query.type, query.orderBy, query.className
|
||||
删掉就找不回来了。交过题的账号删不掉,那种请改为禁用。
|
||||
</n-popconfirm>
|
||||
<n-button @click="createNewUser">新建一个</n-button>
|
||||
<n-button type="primary" @click="$router.push({ name: 'admin user generate' })">
|
||||
批量建号
|
||||
</n-button>
|
||||
<n-button type="primary" @click="$router.push({ name: 'admin user generate' })"> 批量建号 </n-button>
|
||||
</template>
|
||||
<template #filters>
|
||||
<n-input
|
||||
:style="{ width: isMobile ? '100%' : '220px' }"
|
||||
v-model:value="query.keyword"
|
||||
placeholder="用户名或名字"
|
||||
clearable
|
||||
@clear="clearQuery"
|
||||
/>
|
||||
<n-select
|
||||
v-model:value="query.className"
|
||||
:options="classOptions"
|
||||
filterable
|
||||
aria-label="班级"
|
||||
style="width: 150px"
|
||||
/>
|
||||
<n-button
|
||||
v-if="query.className && query.className !== NO_CLASS"
|
||||
:loading="downloadingClass"
|
||||
@click="downloadClassAccounts"
|
||||
>
|
||||
<n-input :style="{ width: isMobile ? '100%' : '220px' }" v-model:value="query.keyword" placeholder="用户名或名字" clearable @clear="clearQuery" />
|
||||
<n-select v-model:value="query.className" :options="classOptions" filterable aria-label="班级" style="width: 150px" />
|
||||
<n-button v-if="query.className && query.className !== NO_CLASS" :loading="downloadingClass" @click="downloadClassAccounts">
|
||||
<template #icon><Icon icon="ph:download-simple" /></template>
|
||||
下载这个班的账号
|
||||
</n-button>
|
||||
<n-select
|
||||
v-model:value="query.type"
|
||||
:options="adminOptions"
|
||||
aria-label="角色"
|
||||
style="width: 120px"
|
||||
/>
|
||||
<n-select
|
||||
v-model:value="query.orderBy"
|
||||
:options="sortOptions"
|
||||
aria-label="排序"
|
||||
style="width: 120px"
|
||||
/>
|
||||
<n-select v-model:value="query.type" :options="adminOptions" aria-label="角色" style="width: 120px" />
|
||||
<n-select v-model:value="query.orderBy" :options="sortOptions" aria-label="排序" style="width: 120px" />
|
||||
<n-text depth="3">
|
||||
{{ total }} 人<template v-if="neverLoggedIn"> · {{ neverLoggedIn }} 人从没登录</template>
|
||||
</n-text>
|
||||
@@ -435,14 +379,7 @@ watch(() => [query.page, query.limit, query.type, query.orderBy, query.className
|
||||
@update:checked-row-keys="chooseUsers"
|
||||
/>
|
||||
<Pagination :total="total" v-model:limit="query.limit" v-model:page="query.page" />
|
||||
<n-modal
|
||||
:mask-closable="false"
|
||||
:show="!!userEditing"
|
||||
preset="card"
|
||||
:title="create ? '新建用户' : '编辑用户'"
|
||||
style="width: 700px"
|
||||
@close="onCloseEditModal"
|
||||
>
|
||||
<n-modal :mask-closable="false" :show="!!userEditing" preset="card" :title="create ? '新建用户' : '编辑用户'" style="width: 700px" @close="onCloseEditModal">
|
||||
<n-form label-placement="left" v-if="userEditing">
|
||||
<n-grid :cols="isMobile ? 1 : 2" :x-gap="16">
|
||||
<n-form-item-gi :span="1" label="用户">
|
||||
@@ -466,21 +403,13 @@ watch(() => [query.page, query.limit, query.type, query.orderBy, query.className
|
||||
<n-input v-model:value="password" />
|
||||
</n-form-item-gi>
|
||||
<n-form-item-gi
|
||||
v-if="
|
||||
!create &&
|
||||
(userEditing.adminType === USER_TYPE.STUDENT_ADMIN ||
|
||||
userEditing.adminType === USER_TYPE.TEACHER_ADMIN)
|
||||
"
|
||||
v-if="!create && (userEditing.adminType === USER_TYPE.STUDENT_ADMIN || userEditing.adminType === USER_TYPE.TEACHER_ADMIN)"
|
||||
:span="1"
|
||||
label="出题权限"
|
||||
>
|
||||
<n-select
|
||||
v-model:value="userEditing.problemPermission"
|
||||
:options="
|
||||
userEditing.adminType === USER_TYPE.TEACHER_ADMIN
|
||||
? teacherPermissionOptions
|
||||
: problemPermissionOptions
|
||||
"
|
||||
:options="userEditing.adminType === USER_TYPE.TEACHER_ADMIN ? teacherPermissionOptions : problemPermissionOptions"
|
||||
/>
|
||||
</n-form-item-gi>
|
||||
|
||||
@@ -498,7 +427,7 @@ watch(() => [query.page, query.limit, query.type, query.orderBy, query.className
|
||||
|
||||
<style scoped>
|
||||
.user-table :deep(.muted) {
|
||||
color: v-bind("theme.textColor3");
|
||||
color: v-bind('theme.textColor3');
|
||||
}
|
||||
|
||||
.user-table :deep(.m-card) {
|
||||
@@ -535,7 +464,7 @@ watch(() => [query.page, query.limit, query.type, query.orderBy, query.className
|
||||
height: 7px;
|
||||
margin-right: 6px;
|
||||
border-radius: 50%;
|
||||
background: v-bind("theme.successColor");
|
||||
background: v-bind('theme.successColor');
|
||||
vertical-align: 1px;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user