You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
2.4 KiB
38 lines
2.4 KiB
import { defineComponent, mergeProps, useSSRContext } from 'vue';
|
|
import { ssrRenderAttrs, ssrInterpolate } from 'vue/server-renderer';
|
|
import { u as useToast } from './useToast-MBvLaNjH.mjs';
|
|
|
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
__name: "AccountCredentialDialog",
|
|
__ssrInlineRender: true,
|
|
props: {
|
|
info: {}
|
|
},
|
|
emits: ["close"],
|
|
setup(__props) {
|
|
useToast();
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
if (__props.info) {
|
|
_push(`<div${ssrRenderAttrs(mergeProps({ class: "modal modal-open" }, _attrs))}><div class="modal-box max-w-md"><h3 class="font-bold text-base mb-1">${ssrInterpolate(__props.info.title)}</h3><p class="text-xs text-slate-400 mb-3">初始密码仅在此显示一次,关闭后无法再查看(如需重设请到「后台账号」改密)。</p><div class="rounded-xl border border-slate-200 bg-slate-50 p-3 space-y-2"><div class="flex items-center justify-between gap-3"><span class="text-xs text-slate-500">登录用户名</span><span class="font-mono font-semibold text-sm">${ssrInterpolate(__props.info.username)}</span></div><div class="flex items-center justify-between gap-3"><span class="text-xs text-slate-500">初始密码</span><span class="font-mono font-semibold text-sm">${ssrInterpolate(__props.info.password)}</span></div></div>`);
|
|
if (__props.info.mailTo) {
|
|
_push(`<div class="mt-3 text-xs text-emerald-600"> ✓ 凭据已邮件发送至 ${ssrInterpolate(__props.info.mailTo)}</div>`);
|
|
} else {
|
|
_push(`<div class="mt-3 text-xs text-amber-600"> ⚠ 凭据未能邮件送达${ssrInterpolate(__props.info.mailError ? ":" + __props.info.mailError : "")},请手工转达上面的用户名和密码。 </div>`);
|
|
}
|
|
_push(`<div class="modal-action"><button class="btn btn-ghost btn-sm">复制</button><button class="btn btn-primary btn-sm text-white">我已记录,关闭</button></div></div></div>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
};
|
|
}
|
|
});
|
|
const _sfc_setup = _sfc_main.setup;
|
|
_sfc_main.setup = (props, ctx) => {
|
|
const ssrContext = useSSRContext();
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/AccountCredentialDialog.vue");
|
|
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
};
|
|
const __nuxt_component_0 = Object.assign(_sfc_main, { __name: "AccountCredentialDialog" });
|
|
|
|
export { __nuxt_component_0 as _ };
|
|
//# sourceMappingURL=AccountCredentialDialog-D37zgaXm.mjs.map
|
|
|