mirror of
https://github.com/certd/certd.git
synced 2026-04-23 19:57:27 +08:00
Merge branch 'v2-dev' of https://github.com/certd/certd into v2-dev
This commit is contained in:
@@ -64,6 +64,7 @@ const props = defineProps<
|
||||
search?: boolean;
|
||||
pager?: boolean;
|
||||
multi?: boolean;
|
||||
pageSize?: number;
|
||||
} & ComponentPropsType
|
||||
>();
|
||||
|
||||
@@ -103,7 +104,7 @@ const loading = ref(false);
|
||||
const pagerRef: Ref = ref({
|
||||
pageNo: 1,
|
||||
total: 0,
|
||||
pageSize: 100,
|
||||
pageSize: props.pageSize || 100,
|
||||
});
|
||||
const getOptions = async () => {
|
||||
if (loading.value) {
|
||||
|
||||
@@ -278,20 +278,22 @@ async function doRegisterPasskey(deviceName: string) {
|
||||
// type: "public-key",
|
||||
// }));
|
||||
|
||||
const credential = await (navigator.credentials as any).create({
|
||||
publicKey: {
|
||||
challenge: Uint8Array.from(atob(options.challenge.replace(/-/g, "+").replace(/_/g, "/")), c => c.charCodeAt(0)),
|
||||
rp: options.rp,
|
||||
pubKeyCredParams: options.pubKeyCredParams,
|
||||
timeout: options.timeout || 60000,
|
||||
attestation: options.attestation,
|
||||
// excludeCredentials: excludeCredentials,
|
||||
user: {
|
||||
id: new TextEncoder().encode(options.userId + ""),
|
||||
name: userInfo.value.username,
|
||||
displayName: deviceName,
|
||||
},
|
||||
const publicKey = {
|
||||
challenge: Uint8Array.from(atob(options.challenge.replace(/-/g, "+").replace(/_/g, "/")), c => c.charCodeAt(0)),
|
||||
rp: options.rp,
|
||||
pubKeyCredParams: options.pubKeyCredParams,
|
||||
timeout: options.timeout || 60000,
|
||||
attestation: options.attestation,
|
||||
// excludeCredentials: excludeCredentials,
|
||||
user: {
|
||||
id: new TextEncoder().encode(options.userId + ""),
|
||||
name: userInfo.value.username,
|
||||
displayName: deviceName,
|
||||
},
|
||||
};
|
||||
console.log("passkey register publicKey:", publicKey);
|
||||
const credential = await (navigator.credentials as any).create({
|
||||
publicKey,
|
||||
});
|
||||
|
||||
if (!credential) {
|
||||
|
||||
@@ -100,7 +100,10 @@ function formatDate(dateStr: string): string {
|
||||
.cert-detail {
|
||||
table {
|
||||
width: 100%;
|
||||
table-layout: fixed;
|
||||
table-layout: fixed !important;
|
||||
}
|
||||
.ant-descriptions-item-label {
|
||||
width: 90px;
|
||||
}
|
||||
.fingerprint {
|
||||
.label {
|
||||
|
||||
Reference in New Issue
Block a user