auth to server-V41

This commit is contained in:
Eric85710 2026-05-03 14:26:59 +08:00
parent 003212b5b4
commit a43a605c63
3 changed files with 4 additions and 20 deletions

View file

@ -27,19 +27,3 @@ data class UserProfileUpdateRequest(
val display_name: String? = null,
val status: String? = null
)
@JsonClass(generateAdapter = true)
data class UserProfileResponse(
@field:Json(name = "user_id") val userId: String,
val username: String,
val email: String,
@field:Json(name = "display_name") val displayName: String,
@field:Json(name = "avatar_url") val avatarUrl: String?,
@field:Json(name = "banner_url") val bannerUrl: String?,
val bio: String?,
val status: String?,
@field:Json(name = "is_active") val isActive: Boolean,
@field:Json(name = "is_verified") val isVerified: Boolean,
@field:Json(name = "created_at") val createdAt: String,
@field:Json(name = "last_login") val lastLogin: String?
)

View file

@ -49,8 +49,7 @@ import com.example.login_v3.R
import com.example.login_v3.data.api.api_class.UserProfile
import com.example.login_v3.home.setting.setting_detail_page.viewmodel.PersonalProfileViewModel
import com.example.login_v3.home.setting.setting_detail_page.viewmodel.ProfileUiState
import com.example.login_v3.ui.theme.main_orange
@Composable
@ -293,12 +292,12 @@ fun Loaded_setting_profile_page(
viewModel.updateBio(tempBio) // 呼叫你寫好的 API 邏輯
showDialog = false
}) {
Text("Save", color = Color.Cyan)
Text("Save", color = main_orange)
}
},
dismissButton = {
TextButton(onClick = { showDialog = false }) {
Text("Cancel", color = Color.Cyan)
Text("Cancel", color = main_orange)
}
}
)

View file

@ -60,4 +60,5 @@ class PersonalProfileViewModel @Inject constructor(
}
}
}
}