Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • Commit451/LabCoat
  • Iktwo/GitLabAndroid
  • jonduran3000/GitLabAndroid
  • steffandroid/GitLabAndroid
  • xiaoyanit/GitLabAndroid
  • scottolcott/GitLabAndroid
  • james.mu/GitLabAndroid
  • pushkarpandey27/GitLabAndroid
  • atomfrede/GitLabAndroid
  • burrito82/GitLabAndroid
  • txlong_onz/GitLabAndroid
  • ricardo.longa/GitLabAndroid
  • rubenroy/GitLabAndroid
  • remy_android/GitLabAndroid
  • mzestars/GitLabAndroid
  • theobisproject/LabCoat
  • tarek360/GitLabAndroid
  • TR4Android/LabCoat
  • lvsmart/LabCoat
  • buddybuild/LabCoat
  • tkuah/LabCoat
  • jay3126/LabCoat
  • rmad17/LabCoat
  • galvatron/LabCoat
  • lijianjian13/LabCoat
  • Cody2333/LabCoat
  • ajtfreitas/LabCoat
  • nestor.lobo/LabCoat
  • Microgamer/LabCoat
  • irvinwang/LabCoat
  • avallete/LabCoat
  • digicazter/LabCoat
  • lovexiaov/LabCoat
  • dineshkarpe/LabCoat
  • bak1an/LabCoat
  • loomis/LabCoat
  • sank20/LabCoat
  • Jawnnyfoo/LabCoat
  • scottyab/LabCoat
  • aleksandar-stefanovic/LabCoat
  • tfontana/LabCoat
  • fuzzmz/LabCoat
  • dipaksavaliya/LabCoat
  • adi.bk/LabCoat
  • andreea.voicu/LabCoat
  • H1ghT0p/LabCoat
  • indritqoku/LabCoat
  • armpogart/LabCoat
  • eyedol/LabCoat
  • khairulnizan/LabCoat
  • vadm.perspectiva/LabCoat
  • yiyoss1986/LabCoat
  • BRoy98/LabCoat
  • satyarth.23/LabCoat
  • victorpe76/LabCoat
  • canhnht/LabCoat
  • jinhu/LabCoat
  • weathery/LabCoat
  • gitlabproject_s/LabCoat
  • tfKamran/LabCoat
  • voxadam/LabCoat
  • nprail/LabCoat
  • terrakok/LabCoat
  • jungletian/LabCoat
  • goldins/LabCoat
  • insanum/LabCoat
  • lzrs/LabCoat
  • shankarg/LabCoat
  • rm3l/LabCoat
  • alamo_dev/LabCoat
  • insomniaqc/LabCoat
  • mrasif/LabCoat
  • Babasile/LabCoat
  • eeyoo/LabCoat
  • ditkin/LabCoat
  • unbubot/LabCoat
  • bschuhm/LabCoat
  • fanticker/LabCoat
  • colorwebdesigner/LabCoat
  • milouse/LabCoat
80 results
Show changes
Showing
with 99 additions and 175 deletions
Loading
@@ -55,7 +55,9 @@ class UserFeedWidgetConfigureActivity : BaseActivity() {
Loading
@@ -55,7 +55,9 @@ class UserFeedWidgetConfigureActivity : BaseActivity() {
toolbar.setTitle(R.string.widget_choose_account) toolbar.setTitle(R.string.widget_choose_account)
   
adapterAccounts = AccountsAdapter() adapterAccounts = AccountsAdapter()
adapterAccounts.setOnItemClickListener { adapter, _, position -> saveWidgetConfig(adapter.get(position)) } adapterAccounts.setOnItemClickListener { adapter, _, position ->
saveWidgetConfig(adapter.get(position))
}
list.layoutManager = LinearLayoutManager(this) list.layoutManager = LinearLayoutManager(this)
list.adapter = adapterAccounts list.adapter = adapterAccounts
   
Loading
Loading
Loading
@@ -47,5 +47,4 @@ object UserFeedWidgetPrefs {
Loading
@@ -47,5 +47,4 @@ object UserFeedWidgetPrefs {
} }
   
} }
} }
Loading
@@ -24,7 +24,6 @@ import android.content.Intent
Loading
@@ -24,7 +24,6 @@ import android.content.Intent
import android.net.Uri import android.net.Uri
import android.widget.RemoteViews import android.widget.RemoteViews
import com.commit451.gitlab.R import com.commit451.gitlab.R
import com.commit451.gitlab.extension.feedUrl
import com.commit451.gitlab.navigation.DeepLinker import com.commit451.gitlab.navigation.DeepLinker
import timber.log.Timber import timber.log.Timber
   
Loading
@@ -53,13 +52,14 @@ class UserFeedWidgetProvider : AppWidgetProvider() {
Loading
@@ -53,13 +52,14 @@ class UserFeedWidgetProvider : AppWidgetProvider() {
// Here we setup the intent which points to the StackViewService which will // Here we setup the intent which points to the StackViewService which will
// provide the views for this collection. // provide the views for this collection.
val account = UserFeedWidgetPrefs.getAccount(context, widgetId) val account = UserFeedWidgetPrefs.getAccount(context, widgetId)
val feedUrl = account?.user?.feedUrl
if (account == null || feedUrl == null) { if (account == null) {
//TODO alert the user to this misfortune? //TODO alert the user to this misfortune?
Timber.e("Error getting account or feed url") Timber.e("Error getting account or feed url")
} else { } else {
Timber.d("Updating widget with url $feedUrl") val feedUrl = account.serverUrl + "${account.username}.atom"
val intent = ProjectFeedWidgetService.newIntent(context, widgetId, account, feedUrl) Timber.d("Feed url: $feedUrl")
val intent = FeedWidgetService.newIntent(context, widgetId, account, feedUrl)
// When intents are compared, the extras are ignored, so we need to embed the extras // When intents are compared, the extras are ignored, so we need to embed the extras
// into the data so that the extras will not be ignored. // into the data so that the extras will not be ignored.
intent.data = Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME)) intent.data = Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME))
Loading
Loading
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M11,17h2v-6h-2v6zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM11,9h2L13,7h-2v2z"/>
</vector>
File added
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/root" android:id="@+id/root"
android:layout_width="match_parent" android:layout_width="match_parent"
Loading
@@ -10,17 +9,9 @@
Loading
@@ -10,17 +9,9 @@
android:id="@+id/toolbar" android:id="@+id/toolbar"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" android:layout_height="?attr/actionBarSize"
android:elevation="0dp"/> android:elevation="0dp" />
   
<ImageView <android.support.v4.widget.NestedScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="32dp"
android:contentDescription="@string/app_name"
app:srcCompat="@drawable/ic_logo"/>
<LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
Loading
@@ -28,110 +19,88 @@
Loading
@@ -28,110 +19,88 @@
android:layout_marginRight="@dimen/activity_horizontal_margin" android:layout_marginRight="@dimen/activity_horizontal_margin"
android:orientation="vertical"> android:orientation="vertical">
   
<android.support.design.widget.TextInputLayout
android:id="@+id/text_input_layout_server"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TextInputEditText
android:id="@+id/text_server"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/url_hint"
android:importantForAutofill="no"
android:inputType="textUri" />
</android.support.design.widget.TextInputLayout>
<LinearLayout <LinearLayout
android:id="@+id/normal_login"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
   
<android.support.design.widget.TextInputLayout <ImageView
android:id="@+id/user_input_hint" android:layout_width="wrap_content"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:layout_height="wrap_content"> android:layout_gravity="center_horizontal"
android:layout_marginBottom="16dp"
android:contentDescription="@string/app_name"
app:srcCompat="@drawable/ic_logo" />
   
<android.support.design.widget.TextInputEditText <TextView
android:id="@+id/user_input" style="@style/Text.MonoRegular"
android:layout_width="match_parent" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:layout_gravity="center_horizontal"
android:hint="@string/user_hint" android:layout_marginBottom="16dp"
android:imeOptions="actionNext" android:gravity="center_horizontal"
android:inputType="textEmailAddress"/> android:text="@string/welcome"
android:textSize="32sp" />
   
</android.support.design.widget.TextInputLayout> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:gravity="center_horizontal"
android:text="@string/welcome_message" />
   
<android.support.design.widget.TextInputLayout <android.support.design.widget.TextInputLayout
android:id="@+id/password_hint" android:id="@+id/text_input_layout_server"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content"
android:layout_marginTop="8dp">
   
<android.support.design.widget.TextInputEditText <android.support.design.widget.TextInputEditText
android:id="@+id/password_input" android:id="@+id/text_server"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/user_input" android:hint="@string/url_hint"
android:layout_centerHorizontal="true" android:importantForAutofill="no"
android:hint="@string/password_hint" android:inputType="textUri" />
android:inputType="textPassword"/>
   
</android.support.design.widget.TextInputLayout> </android.support.design.widget.TextInputLayout>
</LinearLayout>
   
<LinearLayout <LinearLayout
android:id="@+id/token_login"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<android.support.design.widget.TextInputLayout
android:id="@+id/token_hint"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.design.widget.TextInputEditText
android:id="@+id/token_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:hint="@string/token_hint"
android:inputType="textVisiblePassword"/>
</android.support.design.widget.TextInputLayout>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_marginTop="8dp"
android:text="@string/or"/> android:orientation="horizontal">
   
<Button <android.support.design.widget.TextInputLayout
android:id="@+id/button_open_login_page" android:id="@+id/token_hint"
android:layout_width="wrap_content" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_weight="1">
android:text="@string/open_login_page"/>
<android.support.design.widget.TextInputEditText
<TextView android:id="@+id/token_input"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_horizontal" android:layout_alignParentTop="true"
android:text="@string/or"/> android:layout_centerHorizontal="true"
android:hint="@string/token_hint"
android:inputType="textVisiblePassword" />
</android.support.design.widget.TextInputLayout>
<ImageView
android:id="@+id/button_info"
android:layout_width="wrap_content"
android:layout_gravity="center_vertical"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@null"
android:padding="8dp"
app:srcCompat="@drawable/ic_info_outline_white_24dp" />
</LinearLayout>
   
<Button
android:id="@+id/button_open_login_page_for_personal_access"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="@string/open_login_page_for_personal_access_token"/>
</LinearLayout> </LinearLayout>
   
</LinearLayout> </android.support.v4.widget.NestedScrollView>
   
<Button <Button
android:id="@+id/login_button" android:id="@+id/login_button"
Loading
@@ -139,8 +108,8 @@
Loading
@@ -139,8 +108,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom" android:layout_gravity="bottom"
android:layout_margin="16dp" android:layout_margin="16dp"
android:text="@string/login_button"/> android:text="@string/login_button" />
   
<include layout="@layout/progress_fullscreen"/> <include layout="@layout/progress_fullscreen" />
   
</android.support.design.widget.CoordinatorLayout> </android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"/>
</android.support.design.widget.AppBarLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<WebView
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<me.zhanghai.android.materialprogressbar.MaterialProgressBar
android:id="@+id/progress"
style="@style/Widget.MaterialProgressBar.ProgressBar.Horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:indeterminate="false"
app:mpb_progressStyle="horizontal"/>
</FrameLayout>
</LinearLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_advanced_login"
app:showAsAction="never"
android:title="@string/advanced_login"/>
</menu>
\ No newline at end of file
Loading
@@ -93,7 +93,7 @@
Loading
@@ -93,7 +93,7 @@
<string name="url_gitlab">https://gitlab.com/</string> <string name="url_gitlab">https://gitlab.com/</string>
<string name="user_hint">Username or Email</string> <string name="user_hint">Username or Email</string>
<string name="password_hint">Password</string> <string name="password_hint">Password</string>
<string name="token_hint">Private or personal access token</string> <string name="token_hint">Personal Access token</string>
<string name="login_activity">Login</string> <string name="login_activity">Login</string>
<string name="login_progress_dialog">Logging in. Please wait</string> <string name="login_progress_dialog">Logging in. Please wait</string>
<string name="advanced_login">Advanced Login</string> <string name="advanced_login">Advanced Login</string>
Loading
@@ -107,8 +107,9 @@
Loading
@@ -107,8 +107,9 @@
<string name="not_a_valid_private_token">Not a valid private token</string> <string name="not_a_valid_private_token">Not a valid private token</string>
<string name="realm_message">A username and password are being requested by the server.\nThe server says: \"%1$s\"</string> <string name="realm_message">A username and password are being requested by the server.\nThe server says: \"%1$s\"</string>
<string name="already_logged_in">This account is already logged in</string> <string name="already_logged_in">This account is already logged in</string>
<string name="open_login_page">Web Login To Fetch Private Token</string> <string name="access_token_info_title">Personal Access Token</string>
<string name="open_login_page_for_personal_access_token">Web Login To Fetch Personal Access Token</string> <string name="access_token_info_message">In order to log in to GitLab, you need to create a personal access token for the app to use. This is more secure than inputting your username and password, since those values could be tracked or used maliciously. You can create a personal access token under your profile preferences. Please select "api" as the scope of this token. You can leave "expires at" blank to never have the token expire.</string>
<string name="create_personal_access_token">Create Personal Access Token</string>
   
<!-- Error messages --> <!-- Error messages -->
<string name="connection_error">Connection failed</string> <string name="connection_error">Connection failed</string>
Loading
@@ -525,5 +526,6 @@
Loading
@@ -525,5 +526,6 @@
<string name="no_tags">No tags</string> <string name="no_tags">No tags</string>
<string name="fetching_some_details">Fetching some details</string> <string name="fetching_some_details">Fetching some details</string>
   
<string name="title_activity_fullscreen_image">FullscreenImageActivity</string> <string name="welcome">Welcome to LabCoat</string>
<string name="welcome_message">We support GitLab.com, as well as any GitLab server running GitLab version 9.0 or later</string>
</resources> </resources>
\ No newline at end of file
Loading
@@ -14,7 +14,7 @@
Loading
@@ -14,7 +14,7 @@
<item name="alertDialogTheme">@style/AppDialogTheme</item> <item name="alertDialogTheme">@style/AppDialogTheme</item>
</style> </style>
   
<style name="Activity" parent="AppTheme"/> <style name="Activity" parent="AppTheme" />
   
<style name="Activity.Login"> <style name="Activity.Login">
<item name="android:windowBackground">?attr/colorPrimary</item> <item name="android:windowBackground">?attr/colorPrimary</item>
Loading
@@ -72,4 +72,10 @@
Loading
@@ -72,4 +72,10 @@
<item name="android:foreground">?attr/selectableItemBackground</item> <item name="android:foreground">?attr/selectableItemBackground</item>
</style> </style>
   
<style name="Text" />
<style name="Text.MonoRegular">
<item name="android:fontFamily">@font/roboto_mono_regular</item>
</style>
</resources> </resources>
\ No newline at end of file
Loading
@@ -9,7 +9,7 @@ import timber.log.Timber
Loading
@@ -9,7 +9,7 @@ import timber.log.Timber
*/ */
class CrashlyticsWtfTree : Timber.Tree() { class CrashlyticsWtfTree : Timber.Tree() {
   
override fun log(priority: Int, tag: String?, message: String?, t: Throwable?) { override fun log(priority: Int, tag: String?, message: String, t: Throwable?) {
if (priority == Log.ASSERT) { if (priority == Log.ASSERT) {
Crashlytics.log(Log.ASSERT, tag, message) Crashlytics.log(Log.ASSERT, tag, message)
} }
Loading
Loading
Loading
@@ -3,12 +3,9 @@ package com.commit451.gitlab
Loading
@@ -3,12 +3,9 @@ package com.commit451.gitlab
import com.commit451.gitlab.api.GitLabFactory import com.commit451.gitlab.api.GitLabFactory
import com.commit451.gitlab.api.GitLabService import com.commit451.gitlab.api.GitLabService
import com.commit451.gitlab.api.OkHttpClientFactory import com.commit451.gitlab.api.OkHttpClientFactory
import com.commit451.gitlab.api.request.SessionRequest
import com.commit451.gitlab.model.Account import com.commit451.gitlab.model.Account
import okhttp3.logging.HttpLoggingInterceptor import okhttp3.logging.HttpLoggingInterceptor
import org.junit.Assert import org.junit.Assert
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertTrue
import retrofit2.Response import retrofit2.Response
   
/** /**
Loading
@@ -27,16 +24,8 @@ object TestUtil {
Loading
@@ -27,16 +24,8 @@ object TestUtil {
gitlabClientBuilder.addInterceptor(HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY)) gitlabClientBuilder.addInterceptor(HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY))
} }
val gitLab = GitLabFactory.create(account, gitlabClientBuilder.build()) val gitLab = GitLabFactory.create(account, gitlabClientBuilder.build())
val request = SessionRequest()
request.login = "TestAllTheThings"
request.password = "testing123"
val loginResponse = gitLab
.login(request)
.blockingGet()
assertTrue(loginResponse.isSuccessful)
assertNotNull(loginResponse.body()!!.privateToken)
//attach the newly retrieved private token //attach the newly retrieved private token
account.privateToken = loginResponse.body()!!.privateToken account.privateToken = "UjssYTJLWy7CFs7G8sS_"
return gitLab return gitLab
} }
   
Loading
Loading
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply plugin: 'com.github.ben-manes.versions' apply plugin: 'com.github.ben-manes.versions'
apply plugin: 'com.commit451.updatewrapper' apply plugin: 'com.commit451.updatewrapper'
buildscript { buildscript {
ext.kotlinVersion = '1.1.4-3' ext.kotlinVersion = '1.1.60'
repositories { repositories {
jcenter() jcenter()
maven { url "https://jitpack.io" } maven { url "https://jitpack.io" }
google() google()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-beta6' classpath 'com.android.tools.build:gradle:3.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'com.github.ben-manes:gradle-versions-plugin:0.15.0' classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0'
classpath 'com.github.Commit451:updatewrapper:1.1.2' classpath 'com.github.Commit451:updatewrapper:1.1.2'
} }
} }
Loading
Loading