auth to server-V41
This commit is contained in:
parent
003212b5b4
commit
a43a605c63
3 changed files with 4 additions and 20 deletions
|
|
@ -26,20 +26,4 @@ data class UserProfileUpdateRequest(
|
|||
val bio: String? = null,
|
||||
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?
|
||||
)
|
||||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -60,4 +60,5 @@ class PersonalProfileViewModel @Inject constructor(
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in a new issue