enhance auth modals UX and add download login check

This commit is contained in:
jingrow 2025-12-21 17:45:03 +08:00
parent f8da7e84b6
commit c3d9263aac
2 changed files with 8 additions and 0 deletions

View File

@ -1154,6 +1154,7 @@
"Network error. Please check your connection.": "网络错误,请检查您的连接", "Network error. Please check your connection.": "网络错误,请检查您的连接",
"No image data returned": "未返回图片数据", "No image data returned": "未返回图片数据",
"Please login first to use this feature": "请先登录以使用此功能", "Please login first to use this feature": "请先登录以使用此功能",
"Please login to download": "请先登录后才能下载",
"Session expired. Please login again.": "会话已过期,请重新登录", "Session expired. Please login again.": "会话已过期,请重新登录",
"Session expired. Please login again to use this feature.": "会话已过期,请重新登录以使用此功能", "Session expired. Please login again to use this feature.": "会话已过期,请重新登录以使用此功能",
"or": "或", "or": "或",

View File

@ -383,6 +383,13 @@ const handleRemoveBackground = async () => {
const handleDownload = async () => { const handleDownload = async () => {
if (!resultImage.value) return if (!resultImage.value) return
//
if (!isLoggedIn.value) {
message.warning(t('Please login to download'))
showLoginModal.value = true
return
}
try { try {
const response = await fetch(resultImage.value) const response = await fetch(resultImage.value)
const blob = await response.blob() const blob = await response.blob()