Commit d3a2b88a authored by divyanshu's avatar divyanshu

resolve conflicts

parent dc32d9ca
......@@ -5,6 +5,7 @@ import chat.rocket.android.R
import chat.rocket.android.authentication.domain.model.LoginDeepLinkInfo
import chat.rocket.android.authentication.login.ui.LoginFragment
import chat.rocket.android.authentication.login.ui.TAG_LOGIN_FRAGMENT
import chat.rocket.android.authentication.loginoptions.ui.LoginOptionsFragment
import chat.rocket.android.authentication.registerusername.ui.RegisterUsernameFragment
import chat.rocket.android.authentication.registerusername.ui.TAG_REGISTER_USERNAME_FRAGMENT
import chat.rocket.android.authentication.resetpassword.ui.ResetPasswordFragment
......@@ -23,6 +24,12 @@ import chat.rocket.android.webview.ui.webViewIntent
class AuthenticationNavigator(internal val activity: AuthenticationActivity) {
fun toLoginOptions(server: String) {
activity.addFragmentBackStack("LoginOptionFragment", R.id.fragment_container) {
LoginOptionsFragment.newInstance(server)
}
}
fun toLogin() {
activity.addFragmentBackStack(TAG_LOGIN_FRAGMENT, R.id.fragment_container) {
LoginFragment.newInstance()
......@@ -57,8 +64,8 @@ class AuthenticationNavigator(internal val activity: AuthenticationActivity) {
}
}
fun toWebPage(url: String) {
activity.startActivity(activity.webViewIntent(url))
fun toWebPage(url: String, toolbarTitle: String? = null) {
activity.startActivity(activity.webViewIntent(url, toolbarTitle))
activity.overridePendingTransition(R.anim.slide_up, R.anim.hold)
}
......@@ -82,4 +89,10 @@ class AuthenticationNavigator(internal val activity: AuthenticationActivity) {
activity.startActivity(activity.newServerIntent())
activity.finish()
}
fun toCreateAccount() {
activity.addFragmentBackStack("SignUpFragment", R.id.fragment_container){
SignupFragment.newInstance()
}
}
}
\ No newline at end of file
......@@ -8,6 +8,7 @@ import androidx.appcompat.app.AppCompatActivity
import chat.rocket.android.R
import chat.rocket.android.authentication.domain.model.LoginDeepLinkInfo
import chat.rocket.android.authentication.domain.model.getLoginDeepLinkInfo
import chat.rocket.android.authentication.onboarding.ui.OnBoardingFragment
import chat.rocket.android.authentication.presentation.AuthenticationPresenter
import chat.rocket.android.authentication.server.ui.ServerFragment
import chat.rocket.android.util.extensions.addFragment
......@@ -15,6 +16,7 @@ import dagger.android.AndroidInjection
import dagger.android.AndroidInjector
import dagger.android.DispatchingAndroidInjector
import dagger.android.support.HasSupportFragmentInjector
import kotlinx.android.synthetic.main.app_bar_chat_room.*
import kotlinx.coroutines.experimental.Job
import kotlinx.coroutines.experimental.android.UI
import kotlinx.coroutines.experimental.launch
......@@ -30,8 +32,17 @@ class AuthenticationActivity : AppCompatActivity(), HasSupportFragmentInjector {
override fun onCreate(savedInstanceState: Bundle?) {
AndroidInjection.inject(this)
setContentView(R.layout.activity_authentication)
setTheme(R.style.AuthenticationTheme)
super.onCreate(savedInstanceState)
setupToolbar()
}
private fun setupToolbar() {
setSupportActionBar(toolbar)
supportActionBar?.setDisplayShowTitleEnabled(false)
toolbar.setNavigationIcon(R.drawable.ic_arrow_back_white_24dp)
toolbar.setNavigationOnClickListener {
onBackPressed()
}
}
override fun onStart() {
......@@ -40,9 +51,9 @@ class AuthenticationActivity : AppCompatActivity(), HasSupportFragmentInjector {
launch(UI + job) {
val newServer = intent.getBooleanExtra(INTENT_ADD_NEW_SERVER, false)
// if we got authenticateWithDeepLink information, pass true to newServer also
presenter.loadCredentials(newServer || deepLinkInfo != null) { authenticated ->
presenter.loadCredentials(newServer) { authenticated ->
if (!authenticated) {
showServerInput(deepLinkInfo)
showOnBoarding()
}
}
}
......@@ -63,9 +74,9 @@ class AuthenticationActivity : AppCompatActivity(), HasSupportFragmentInjector {
return fragmentDispatchingAndroidInjector
}
fun showServerInput(deepLinkInfo: LoginDeepLinkInfo?) {
addFragment("ServerFragment", R.id.fragment_container, allowStateLoss = true) {
ServerFragment.newInstance(deepLinkInfo)
private fun showOnBoarding() {
addFragment("OnBoardingFragment", R.id.fragment_container, allowStateLoss = true) {
OnBoardingFragment.newInstance()
}
}
}
......
......@@ -26,7 +26,7 @@ internal fun MainActivity.setupMenu(menu: Menu) {
R.id.menu_action_profile,
Menu.NONE,
R.string.title_profile
).setIcon(R.drawable.ic_person_black_24dp)
).setIcon(R.drawable.ic_person_black_20dp)
add(
R.id.menu_section_two,
......
......@@ -218,10 +218,10 @@ class ProfileFragment : Fragment(), ProfileView, ActionMode.Callback {
private fun tintEditTextDrawableStart() {
(activity as MainActivity).apply {
val personDrawable =
DrawableHelper.getDrawableFromId(R.drawable.ic_person_black_24dp, this)
val atDrawable = DrawableHelper.getDrawableFromId(R.drawable.ic_at_black_24dp, this)
DrawableHelper.getDrawableFromId(R.drawable.ic_person_black_20dp, this)
val atDrawable = DrawableHelper.getDrawableFromId(R.drawable.ic_at_black_20dp, this)
val emailDrawable =
DrawableHelper.getDrawableFromId(R.drawable.ic_email_black_24dp, this)
DrawableHelper.getDrawableFromId(R.drawable.ic_email_black_20dp, this)
val drawables = arrayOf(personDrawable, atDrawable, emailDrawable)
DrawableHelper.wrapDrawables(drawables)
......
......@@ -32,7 +32,7 @@
android:id="@+id/text_name"
style="@style/Profile.EditText"
android:layout_marginTop="32dp"
android:drawableStart="@drawable/ic_person_black_24dp"
android:drawableStart="@drawable/ic_person_black_20dp"
android:hint="@string/msg_name"
android:inputType="textCapWords" />
......@@ -40,7 +40,7 @@
android:id="@+id/text_username"
style="@style/Profile.EditText"
android:layout_marginTop="16dp"
android:drawableStart="@drawable/ic_at_black_24dp"
android:drawableStart="@drawable/ic_at_black_20dp"
android:hint="@string/msg_username"
android:inputType="text" />
......@@ -49,7 +49,7 @@
style="@style/Profile.EditText"
android:layout_marginTop="16dp"
android:layout_marginBottom="16dp"
android:drawableStart="@drawable/ic_email_black_24dp"
android:drawableStart="@drawable/ic_email_black_20dp"
android:hint="@string/msg_email"
android:inputType="textEmailAddress" />
</LinearLayout>
......
......@@ -44,6 +44,11 @@
<string name="action_select_photo_from_gallery">Select photo from gallery</string> <!-- TODO Add translation -->
<string name="action_take_photo">Select photo from gallery</string> <!-- TODO Add translation -->
<string name="action_reset_avatar">Reset avatar</string> <!-- TODO Add translation -->
<string name="action_connect_server">Connect with a server</string>
<string name="action_join_community">Join in the community</string>
<string name="action_create_server">Create a new server</string>
<string name="action_register">Register</string>
<string name="action_confirm">Confirm</string>
<!-- Settings List -->
<string-array name="settings_actions">
......@@ -130,6 +135,17 @@
<string name="msg_file_description">Datei Beschreibung</string>
<string name="msg_send">Sende</string>
<string name="msg_sent_attachment">Sende Anhang</string>
<string name="msg_welcome_to_rocket_chat">Welcome to Rocket.Chat</string>
<string name="msg_open_source_communication">Open Source Communication</string>
<string name="msg_login_with_email">Login with e-mail</string>
<string name="msg_create_account">Create an account</string>
<string name="msg_continue_with_facebook">Continue with Facebook</string>
<string name="msg_continue_with_github">Continue with Github</string>
<string name="msg_continue_with_google">Continue with Google</string>
<string name="msg_continue_with_linkedin">Continue with Linkedin</string>
<string name="msg_continue_with_gitlab">Continue with GitLab</string>
<string name="msg_two_factor_authentication">Two-factor Authentication</string>
<string name="msg__your_2fa_code">What’s your 2FA code?</string>
<!-- Create channel messages -->
<string name="msg_private_channel">Privat</string>
......
......@@ -44,6 +44,11 @@
<string name="action_select_photo_from_gallery">Select photo from gallery</string> <!-- TODO Add translation -->
<string name="action_take_photo">Select photo from gallery</string> <!-- TODO Add translation -->
<string name="action_reset_avatar">Reset avatar</string> <!-- TODO Add translation -->
<string name="action_connect_server">Connect with a server</string>
<string name="action_join_community">Join in the community</string>
<string name="action_create_server">Create a new server</string>
<string name="action_register">Register</string>
<string name="action_confirm">Confirm</string>
<!-- Settings List -->
<string-array name="settings_actions">
......@@ -127,6 +132,17 @@
<string name="msg_delete_message">Borrar mensaje</string>
<string name="msg_delete_description">Seguro que quieres borrar este mensaje</string>
<string name="msg_no_search_found">No se han encontrado resultados</string>
<string name="msg_welcome_to_rocket_chat">Welcome to Rocket.Chat</string>
<string name="msg_open_source_communication">Open Source Communication</string>
<string name="msg_login_with_email">Login with e-mail</string>
<string name="msg_create_account">Create an account</string>
<string name="msg_continue_with_facebook">Continue with Facebook</string>
<string name="msg_continue_with_github">Continue with Github</string>
<string name="msg_continue_with_google">Continue with Google</string>
<string name="msg_continue_with_linkedin">Continue with Linkedin</string>
<string name="msg_continue_with_gitlab">Continue with GitLab</string>
<string name="msg_two_factor_authentication">Two-factor Authentication</string>
<string name="msg__your_2fa_code">What’s your 2FA code?</string>
<!-- Create channel messages -->
<string name="msg_private_channel">Privado</string>
......
......@@ -21,6 +21,7 @@
// TODO: Add proper translation.
<string name="title_create_channel">Create Channel</string>
<!-- Actions -->
<string name="action_connect">Se connecter</string>
<string name="action_use_this_username">Utilisez ce nom d\'utilisateur</string>
......@@ -46,6 +47,11 @@
<string name="action_select_photo_from_gallery">Select photo from gallery</string> <!-- TODO Add translation -->
<string name="action_take_photo">Select photo from gallery</string> <!-- TODO Add translation -->
<string name="action_reset_avatar">Reset avatar</string> <!-- TODO Add translation -->
<string name="action_connect_server">Connect with a server</string>
<string name="action_join_community">Join in the community</string>
<string name="action_create_server">Create a new server</string>
<string name="action_register">Register</string>
<string name="action_confirm">Confirm</string>
<!-- Settings List -->
<string-array name="settings_actions">
......@@ -144,6 +150,17 @@
// TODO: Add proper translation.
<string name="msg_delete_message">Delete Message</string>
<string name="msg_delete_description">Are you sure you want to delete this message</string>
<string name="msg_welcome_to_rocket_chat">Welcome to Rocket.Chat</string>
<string name="msg_open_source_communication">Open Source Communication</string>
<string name="msg_login_with_email">Login with e-mail</string>
<string name="msg_create_account">Create an account</string>
<string name="msg_continue_with_facebook">Continue with Facebook</string>
<string name="msg_continue_with_github">Continue with Github</string>
<string name="msg_continue_with_google">Continue with Google</string>
<string name="msg_continue_with_linkedin">Continue with Linkedin</string>
<string name="msg_continue_with_gitlab">Continue with GitLab</string>
<string name="msg_two_factor_authentication">Two-factor Authentication</string>
<string name="msg__your_2fa_code">What’s your 2FA code?</string>
<!-- Create channel messages -->
// TODO: Add proper translation.
......
......@@ -45,6 +45,11 @@
<string name="action_select_photo_from_gallery">Select photo from gallery</string> <!-- TODO Add translation -->
<string name="action_take_photo">Select photo from gallery</string> <!-- TODO Add translation -->
<string name="action_reset_avatar">Reset avatar</string> <!-- TODO Add translation -->
<string name="action_connect_server">Connect with a server</string>
<string name="action_join_community">Join in the community</string>
<string name="action_create_server">Create a new server</string>
<string name="action_register">Register</string>
<string name="action_confirm">Confirm</string>
<!-- Settings List -->
<string-array name="settings_actions">
......@@ -133,6 +138,17 @@
<string name="msg_sent_attachment">एक अनुलग्नक भेजा</string>
<string name="msg_delete_message">संदेश को हटाएं</string>
<string name="msg_delete_description">क्या आप निश्चित रूप से यह संदेश हटाना चाहते हैं</string>
<string name="msg_welcome_to_rocket_chat">Welcome to Rocket.Chat</string>
<string name="msg_open_source_communication">Open Source Communication</string>
<string name="msg_login_with_email">Login with e-mail</string>
<string name="msg_create_account">Create an account</string>
<string name="msg_continue_with_facebook">Continue with Facebook</string>
<string name="msg_continue_with_github">Continue with Github</string>
<string name="msg_continue_with_google">Continue with Google</string>
<string name="msg_continue_with_linkedin">Continue with Linkedin</string>
<string name="msg_continue_with_gitlab">Continue with GitLab</string>
<string name="msg_two_factor_authentication">Two-factor Authentication</string>
<string name="msg__your_2fa_code">What’s your 2FA code?</string>
<!-- Create channel messages -->
<string name="msg_private_channel">प्राइवेट</string>
......
......@@ -45,6 +45,11 @@
<string name="action_select_photo_from_gallery">Escolher foto da galeria</string>
<string name="action_take_photo">Tirar foto</string>
<string name="action_reset_avatar">Resetar avatar</string>
<string name="action_connect_server">Connect with a server</string>
<string name="action_join_community">Join in the community</string>
<string name="action_create_server">Create a new server</string>
<string name="action_register">Register</string>
<string name="action_confirm">Confirm</string>
<!-- Settings List -->
<string-array name="settings_actions">
......@@ -133,6 +138,17 @@
// TODO: Add proper translation.
<string name="msg_delete_message">Delete Message</string>
<string name="msg_delete_description">Are you sure you want to delete this message</string>
<string name="msg_welcome_to_rocket_chat">Welcome to Rocket.Chat</string>
<string name="msg_open_source_communication">Open Source Communication</string>
<string name="msg_login_with_email">Login with e-mail</string>
<string name="msg_create_account">Create an account</string>
<string name="msg_continue_with_facebook">Continue with Facebook</string>
<string name="msg_continue_with_github">Continue with Github</string>
<string name="msg_continue_with_google">Continue with Google</string>
<string name="msg_continue_with_linkedin">Continue with Linkedin</string>
<string name="msg_continue_with_gitlab">Continue with GitLab</string>
<string name="msg_two_factor_authentication">Two-factor Authentication</string>
<string name="msg__your_2fa_code">What’s your 2FA code?</string>
<!-- Create channel messages -->
<string name="msg_private_channel">Privado</string>
......
......@@ -45,6 +45,11 @@
<string name="action_select_photo_from_gallery">Выбрать из галереи</string>
<string name="action_take_photo">Сделать снимок</string>
<string name="action_reset_avatar">Восстановить аватар</string>
<string name="action_connect_server">Connect with a server</string>
<string name="action_join_community">Join in the community</string>
<string name="action_create_server">Create a new server</string>
<string name="action_register">Register</string>
<string name="action_confirm">Confirm</string>
<!-- Settings List -->
<string-array name="settings_actions">
......@@ -130,6 +135,17 @@
<string name="msg_delete_description">Вы уверены, что хотите удалить это сообщение?</string>
<string name="msg_channel_name">Название канала</string>
<string name="msg_search">Поиск</string>
<string name="msg_welcome_to_rocket_chat">Welcome to Rocket.Chat</string>
<string name="msg_open_source_communication">Open Source Communication</string>
<string name="msg_login_with_email">Login with e-mail</string>
<string name="msg_create_account">Create an account</string>
<string name="msg_continue_with_facebook">Continue with Facebook</string>
<string name="msg_continue_with_github">Continue with Github</string>
<string name="msg_continue_with_google">Continue with Google</string>
<string name="msg_continue_with_linkedin">Continue with Linkedin</string>
<string name="msg_continue_with_gitlab">Continue with GitLab</string>
<string name="msg_two_factor_authentication">Two-factor Authentication</string>
<string name="msg__your_2fa_code">What’s your 2FA code?</string>
<!-- Create channel messages -->
<string name="msg_private_channel">Приватный</string>
......
......@@ -46,6 +46,11 @@
<string name="action_select_photo_from_gallery">Select photo from gallery</string>
<string name="action_take_photo">Take photo</string>
<string name="action_reset_avatar">Reset avatar</string>
<string name="action_connect_server">Connect with a server</string>
<string name="action_join_community">Join in the community</string>
<string name="action_create_server">Create a new server</string>
<string name="action_register">Register</string>
<string name="action_confirm">Confirm</string>
<!-- Settings List -->
<string-array name="settings_actions">
......@@ -133,6 +138,17 @@
<string name="msg_file_description">File description</string>
<string name="msg_send">Send</string>
<string name="msg_sent_attachment">Sent an attachment</string>
<string name="msg_welcome_to_rocket_chat">Welcome to Rocket.Chat</string>
<string name="msg_open_source_communication">Open Source Communication</string>
<string name="msg_login_with_email">Login with e-mail</string>
<string name="msg_create_account">Create an account</string>
<string name="msg_continue_with_facebook">Continue with Facebook</string>
<string name="msg_continue_with_github">Continue with Github</string>
<string name="msg_continue_with_google">Continue with Google</string>
<string name="msg_continue_with_linkedin">Continue with Linkedin</string>
<string name="msg_continue_with_gitlab">Continue with GitLab</string>
<string name="msg_two_factor_authentication">Two-factor Authentication</string>
<string name="msg__your_2fa_code">What’s your 2FA code?</string>
<!-- Create channel messages -->
<string name="msg_private_channel">Private</string>
......@@ -290,4 +306,6 @@
<string name="message_information_title">Message information</string>
<string name="foss" tools:ignore="MissingTranslation">(FOSS)</string>
<!-- Community Server-->
<string name="community_server" translatable="false">open.rocket.chat</string>
</resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment