chore(record)

This commit is contained in:
oiov
2025-06-16 16:00:44 +08:00
parent 8f44b8ae11
commit 6c784d255d
4 changed files with 25 additions and 15 deletions
+20 -12
View File
@@ -119,6 +119,12 @@ export function RecordForm({
return recordDomains[0].domain_name;
}, [recordDomains, initData?.zone_name]);
useEffect(() => {
if (validDefaultDomain) {
setCurrentZoneName(validDefaultDomain);
}
}, [validDefaultDomain]);
useEffect(() => {
if (recordDomains && recordDomains.length > 0) {
setAllowedRecordTypes(
@@ -547,18 +553,20 @@ export function RecordForm({
)}
</Button>
)}
<Button
type="submit"
variant="blue"
disabled={isPending}
className="w-[80px] shrink-0 px-0"
>
{isPending ? (
<Icons.spinner className="size-4 animate-spin" />
) : (
<p>{type === "edit" ? t("Update") : t("Save")}</p>
)}
</Button>
{initData?.active !== 3 && (
<Button
type="submit"
variant="blue"
disabled={isPending}
className="w-[80px] shrink-0 px-0"
>
{isPending ? (
<Icons.spinner className="size-4 animate-spin" />
) : (
<p>{type === "edit" ? t("Update") : t("Save")}</p>
)}
</Button>
)}
</div>
</form>
</div>
+3 -1
View File
@@ -242,7 +242,9 @@ export async function getUserRecordByTypeNameContent(
type,
// content,
name,
// active,
active: {
not: 3,
},
},
});
}
+1 -1
View File
@@ -236,7 +236,7 @@ export function applyRecordEmailHtml({
</table>
<div class="button-container">
<a href="${appUrl}/admin/domains" class="button">Review Record</a>
<a href="${appUrl}/admin/records" class="button">Review Record</a>
</div>
</div>
</body>
+1 -1
View File
File diff suppressed because one or more lines are too long