Skip to content

Commit

Permalink
chore: ID to Id
Browse files Browse the repository at this point in the history
  • Loading branch information
zijiren233 committed Nov 16, 2024
1 parent 2e60dc3 commit 1574d92
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 44 deletions.
2 changes: 1 addition & 1 deletion src/components/admin/dialogs/editVendor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const defaultData: Backend = {
comment: "",
tls: false,
jwtSecret: "",
customCA: "",
customCa: "",
timeOut: "",
consul: {
serviceName: "",
Expand Down
8 changes: 4 additions & 4 deletions src/components/user/dialogs/email.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const emit = defineEmits(["updateUInfo"]);
interface FormData {
email: string;
captcha: string;
captchaID: string;
captchaId: string;
answer: string;
}
Expand All @@ -27,7 +27,7 @@ const formDataRef = ref<FormInstance>();
const formData = reactive<FormData>({
email: "",
captcha: "",
captchaID: "",
captchaId: "",
answer: ""
});
const rules = reactive<FormRules<FormData>>({
Expand Down Expand Up @@ -67,7 +67,7 @@ const toSendEmailCode = async () => {
},
data: {
email,
captchaID: formData.captchaID,
captchaId: formData.captchaId,
answer: formData.answer
}
});
Expand Down Expand Up @@ -118,7 +118,7 @@ const refreshCaptcha = async () => {
Authorization: token.value
}
});
if (captcha.value) formData.captchaID = captcha.value.captchaID;
if (captcha.value) formData.captchaId = captcha.value.captchaId;
};
</script>

Expand Down
8 changes: 4 additions & 4 deletions src/services/apis/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const getPublicSettings = useDefineApi<any, PublicSettings>({
export const getRegCaptchaApi = useDefineApi<
any,
{
captchaID: string;
captchaId: string;
captchaBase64: string;
}
>({
Expand All @@ -117,7 +117,7 @@ export const sendRegCodeApi = useDefineApi<
{
data: {
email: string;
captchaID: string;
captchaId: string;
answer: string;
};
},
Expand All @@ -131,7 +131,7 @@ export const sendRegCodeApi = useDefineApi<
export const getResetCaptchaApi = useDefineApi<
any,
{
captchaID: string;
captchaId: string;
captchaBase64: string;
}
>({
Expand All @@ -144,7 +144,7 @@ export const sendResetCodeApi = useDefineApi<
{
data: {
email: string;
captchaID: string;
captchaId: string;
answer: string;
};
},
Expand Down
6 changes: 3 additions & 3 deletions src/services/apis/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const oAuth2Platforms = useDefineApi<
},
{
[platform: string]: {
providerUserID: string;
providerUserId: string;
createdAt: number;
};
}
Expand Down Expand Up @@ -142,7 +142,7 @@ export const getBindEmailCaptchaApi = useDefineApi<
};
},
{
captchaID: string;
captchaId: string;
captchaBase64: string;
}
>({
Expand All @@ -158,7 +158,7 @@ export const sendBindEmailCodeApi = useDefineApi<
};
data: {
email: string;
captchaID: string;
captchaId: string;
answer: string;
};
},
Expand Down
6 changes: 3 additions & 3 deletions src/services/apis/vendor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export const getAListBinds = useDefineApi<
};
},
{
serverID: string;
serverId: string;
host: string;
}[]
>({
Expand Down Expand Up @@ -167,7 +167,7 @@ export const getAListAccountInfo = useDefineApi<
{
headers: { Authorization: string };
params: {
serverID: string;
serverId: string;
};
},
{
Expand Down Expand Up @@ -224,7 +224,7 @@ export const getEmbyBinds = useDefineApi<
};
},
{
serverID: string;
serverId: string;
host: string;
}[]
>({
Expand Down
2 changes: 1 addition & 1 deletion src/types/Vendor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export interface Backend {
comment?: string;
tls?: boolean;
jwtSecret?: string;
customCA?: string;
customCa?: string;
timeOut?: string;
consul?: Consul;
etcd?: Etcd;
Expand Down
10 changes: 5 additions & 5 deletions src/views/auth/Register.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ const { execute: passwordRegisterApi } = usePasswordRegisterApi();
const { state: oauth2SignupEnabled, execute: getOAuth2SignupEnabled } = OAuth2SignupEnabled();
const { execute: loginOAuth2 } = loginWithOAuth2();
const formData = ref<EmailRegForm & { captchaID: string; answer: string }>({
const formData = ref<EmailRegForm & { captchaId: string; answer: string }>({
email: "",
password: "",
captcha: "",
captchaID: "",
captchaId: "",
answer: ""
});
Expand Down Expand Up @@ -73,7 +73,7 @@ const toSendRegCode = async () => {
await sendRegCode({
data: {
email,
captchaID: formData.value.captchaID,
captchaId: formData.value.captchaId,
answer: formData.value.answer
}
});
Expand Down Expand Up @@ -251,15 +251,15 @@ const toRegister = async () => {
const refreshRegCaptcha = async () => {
await getRegCaptcha();
if (captcha.value) formData.value.captchaID = captcha.value.captchaID;
if (captcha.value) formData.value.captchaId = captcha.value.captchaId;
};
const resetForm = () => {
formData.value = {
email: "",
password: "",
captcha: "",
captchaID: "",
captchaId: "",
answer: ""
};
passwordFormData.value = {
Expand Down
10 changes: 5 additions & 5 deletions src/views/auth/Reset.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ const { execute: sendResetCode, isLoading: sendResetCodeLoading } = sendResetCod
const _captcha = useRouteQuery("captcha");
const _email = useRouteQuery("email");
const step = ref(1);
const formData = ref<EmailRegForm & { captchaID: string; answer: string }>({
const formData = ref<EmailRegForm & { captchaId: string; answer: string }>({
email: "",
password: "",
captcha: "",
captchaID: "",
captchaId: "",
answer: ""
});
const emailProvider = ref(settings?.emailWhitelistEnabled && settings?.emailWhitelist[0]);
Expand All @@ -50,7 +50,7 @@ const toSendResetCode = async () => {
await sendResetCode({
data: {
email,
captchaID: formData.value.captchaID,
captchaId: formData.value.captchaId,
answer: formData.value.answer
}
});
Expand Down Expand Up @@ -131,15 +131,15 @@ const toReset = async () => {
const refreshRegCaptcha = async () => {
await getRegCaptcha();
if (captcha.value) formData.value.captchaID = captcha.value.captchaID;
if (captcha.value) formData.value.captchaId = captcha.value.captchaId;
};
const resetForm = () =>
(formData.value = {
email: "",
password: "",
captcha: "",
captchaID: "",
captchaId: "",
answer: ""
});
Expand Down
8 changes: 4 additions & 4 deletions src/views/user/account/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const { token, info, getUserInfo } = userStore();
const bindEmailDialog = ref<InstanceType<typeof BindEmail>>();
interface ProviderType {
name: string;
providerUserID: string;
providerUserId: string;
createdAt: number;
}
Expand All @@ -42,13 +42,13 @@ const getProviders = async () => {
if (state.value[key].createdAt === 0) {
unbind.value.push({
name: key,
providerUserID: state.value[key].providerUserID,
providerUserId: state.value[key].providerUserId,
createdAt: state.value[key].createdAt
});
} else {
bind.value.push({
name: key,
providerUserID: state.value[key].providerUserID,
providerUserId: state.value[key].providerUserId,
createdAt: state.value[key].createdAt
});
}
Expand Down Expand Up @@ -182,7 +182,7 @@ onMounted(async () => {
</span>
</template>
</el-table-column>
<el-table-column prop="providerUserID" label="账号ID" />
<el-table-column prop="providerUserId" label="账号ID" />
<el-table-column prop="createdAt" label="绑定时间">
<template #default="scope">
{{ new Date(scope.row.createdAt).toLocaleString() }}
Expand Down
14 changes: 7 additions & 7 deletions src/views/user/platforms/alist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ const {
execute: reqAccountInfo,
isLoading: getAListAccountInfoLoading
} = getAListAccountInfo();
const getAccountInfo = async (serverID: string) => {
const getAccountInfo = async (serverId: string) => {
try {
infoDialog.value = true;
await reqAccountInfo({
headers: {
Authorization: userToken.value
},
params: {
serverID
serverId
}
});
} catch (err: any) {
Expand Down Expand Up @@ -149,11 +149,11 @@ const closeLoginDialog = () => {
>
<div class="-mt-5">
<el-table :data="binds" v-loading="getBindsLoading">
<el-table-column prop="serverID" label="serverID">
<el-table-column prop="serverId" label="serverId">
<template #default="scope">
<div class="flex overflow-hidden text-ellipsis max-w-[260px]">
<span class="truncate mr-1">{{ scope.row.serverID }}</span>
<CopyButton size="small" :value="scope.row.serverID" />
<span class="truncate mr-1">{{ scope.row.serverId }}</span>
<CopyButton size="small" :value="scope.row.serverId" />
</div>
</template>
</el-table-column>
Expand All @@ -172,14 +172,14 @@ const closeLoginDialog = () => {
confirm-button-text=""
cancel-button-text=""
title="你确定要解除绑定吗?"
@confirm="aListLogout(scope.row.serverID)"
@confirm="aListLogout(scope.row.serverId)"
>
<template #reference>
<el-button link type="danger" size="small"> 解绑 </el-button>
</template>
</el-popconfirm>

<el-button link type="primary" size="small" @click="getAccountInfo(scope.row.serverID)">
<el-button link type="primary" size="small" @click="getAccountInfo(scope.row.serverId)">
详情
</el-button>
</template>
Expand Down
14 changes: 7 additions & 7 deletions src/views/user/platforms/emby.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ const {
execute: reqAccountInfo,
isLoading: getEmbyAccountInfoLoading
} = getEmbyAccountInfo();
const getAccountInfo = async (serverID: string) => {
const getAccountInfo = async (serverId: string) => {
try {
infoDialog.value = true;
await reqAccountInfo({
headers: {
Authorization: userToken.value
},
params: {
serverID
serverId
}
});
} catch (err: any) {
Expand Down Expand Up @@ -132,11 +132,11 @@ const closeLoginDialog = () => {
>
<div class="-mt-5">
<el-table :data="binds" v-loading="getBindsLoading">
<el-table-column prop="serverID" label="serverID">
<el-table-column prop="serverId" label="serverId">
<template #default="scope">
<div class="flex overflow-hidden text-ellipsis max-w-[260px]">
<span class="truncate mr-1">{{ scope.row.serverID }}</span>
<CopyButton size="small" :value="scope.row.serverID" />
<span class="truncate mr-1">{{ scope.row.serverId }}</span>
<CopyButton size="small" :value="scope.row.serverId" />
</div>
</template>
</el-table-column>
Expand All @@ -155,14 +155,14 @@ const closeLoginDialog = () => {
confirm-button-text=""
cancel-button-text=""
title="你确定要解除绑定吗?"
@confirm="embyLogout(scope.row.serverID)"
@confirm="embyLogout(scope.row.serverId)"
>
<template #reference>
<el-button link type="danger" size="small"> 解绑 </el-button>
</template>
</el-popconfirm>

<el-button link type="primary" size="small" @click="getAccountInfo(scope.row.serverID)">
<el-button link type="primary" size="small" @click="getAccountInfo(scope.row.serverId)">
详情
</el-button>
</template>
Expand Down

0 comments on commit 1574d92

Please sign in to comment.