Add README.md

This commit is contained in:
Thomas 2020-07-01 17:39:15 +02:00
parent 3b42207003
commit e70d99a602
3 changed files with 100 additions and 56 deletions

35
README.md Normal file
View File

@ -0,0 +1,35 @@
## TubeLab [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
TubeLab est une application Android open source (GNU GLPv3) pour les instances Peertube académiques. Lauthentification se fait par adresse mail, linstance est automatiquement détectée. Il également possible sur certaines instances de créer son compte depuis lapplication.
### Mode non authentifié
Ce mode permet de visionner les vidéos sur différentes instances (en sélectionnant une instance académique). Cependant, vous ne pourrez pas interagir totalement avec les vidéos. Vous pourrez :
- Partager une vidéo,
- Télécharger une vidéo.
### Mode authentifié
Si vous connectez votre compte, vous pourrez interagir avec les vidéos :
- Écrire/supprimer un commentaire,
- Ajouter/supprimer des vidéos dans les listes de lecture,
- Gérer les listes de lecture,
- Suivre une chaîne,
- Thumbs-up/down,
- Téléverser des vidéos,
- Modifier vos vidéos,
- Supprimer vos vidéos,
- Voir vos notifications.
### Télécharger
Les fichiers apk (debug) sont téléchargeables [Framagit](https://framadrive.org/s/HzzxraPdmF5FDYd)
Lapplication sera par la suite publiée sur F-Droid.
### TODO
- OpenID
- Optimisation pour les tablettes

View File

@ -24,6 +24,7 @@ import android.text.Html;
import android.text.SpannableString;
import android.text.method.LinkMovementMethod;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
@ -220,7 +221,11 @@ public class ShowAccountActivity extends AppCompatActivity implements OnPostActi
PagerAdapter mPagerAdapter = new ScreenSlidePagerAdapter(getSupportFragmentManager());
mPager.setAdapter(mPagerAdapter);
if( ischannel) {
ViewGroup.LayoutParams params = tabLayout.getLayoutParams();
params.height = 0;
tabLayout.setLayoutParams(params);
}
mPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
@ -298,6 +303,7 @@ public class ShowAccountActivity extends AppCompatActivity implements OnPostActi
Helper.loadGiF(ShowAccountActivity.this, account, account_pp);
//Follow button
String target = account.getAcct();
account_follow.setOnClickListener(v -> {
if (doAction == action.NOTHING) {
Toasty.info(ShowAccountActivity.this, getString(R.string.nothing_to_do), Toast.LENGTH_LONG).show();
@ -395,11 +401,19 @@ public class ShowAccountActivity extends AppCompatActivity implements OnPostActi
}
doAction = action.UNFOLLOW;
account_follow.setContentDescription(getString(R.string.action_unfollow));
account_follow.setVisibility(View.VISIBLE);
if(ischannel) {
account_follow.setVisibility(View.VISIBLE);
}else{
account_follow.setVisibility(View.GONE);
}
} else if (!relationship.isFollowing()) {
account_follow.setImageResource(R.drawable.ic_user_plus);
doAction = action.FOLLOW;
account_follow.setVisibility(View.VISIBLE);
if(ischannel) {
account_follow.setVisibility(View.VISIBLE);
}else{
account_follow.setVisibility(View.GONE);
}
account_follow.setContentDescription(getString(R.string.action_follow));
} else {
account_follow.setVisibility(View.GONE);

View File

@ -45,6 +45,20 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/action_back"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentStart="true"
android:layout_marginStart="5dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:contentDescription="@string/go_back"
android:src="@drawable/ic_baseline_arrow_back_24"
android:tint="@android:color/white"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/banner_pp"
android:layout_width="match_parent"
@ -53,7 +67,9 @@
android:scaleType="centerCrop"
android:src="@drawable/default_banner"
app:layout_collapseMode="parallax"
app:layout_constraintTop_toTopOf="parent" />
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
/>
<ImageView
android:id="@+id/account_pp"
@ -65,9 +81,8 @@
android:background="@drawable/account_pp_border"
android:contentDescription="@string/profile_picture"
android:padding="2dp"
app:layout_constraintBottom_toBottomOf="@id/banner_pp"
app:layout_constraintTop_toBottomOf="@+id/action_back"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/banner_pp"
app:layout_scrollFlags="scroll" />
<androidx.constraintlayout.widget.ConstraintLayout
@ -75,17 +90,16 @@
android:layout_height="wrap_content"
android:layout_marginStart="5dp"
android:padding="2dp"
app:layout_constraintBottom_toBottomOf="@id/banner_pp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/account_pp"
app:layout_constraintTop_toBottomOf="@id/banner_pp">
app:layout_constraintTop_toBottomOf="@+id/action_back">
<LinearLayout
android:layout_marginStart="10dp"
android:id="@+id/names_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
@ -107,56 +121,37 @@
android:textSize="14sp" />
</LinearLayout>
<ImageButton
android:id="@+id/account_follow"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:contentDescription="@string/make_an_action"
android:scaleType="fitCenter"
android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/names_container" />
<ImageButton
android:id="@+id/header_edit_profile"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:contentDescription="@string/edit_profile"
android:scaleType="fitCenter"
android:src="@drawable/ic_baseline_edit_24"
android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/names_container" />
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageButton
android:id="@+id/account_follow"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:contentDescription="@string/make_an_action"
android:scaleType="fitCenter"
android:visibility="gone"
app:layout_constraintStart_toEndOf="@id/account_pp"
app:layout_constraintTop_toBottomOf="@id/banner_pp" />
<ImageButton
android:id="@+id/header_edit_profile"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="45dp"
android:layout_height="45dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:contentDescription="@string/edit_profile"
android:scaleType="fitCenter"
android:src="@drawable/ic_baseline_edit_24"
android:visibility="gone"
app:layout_constraintStart_toEndOf="@id/account_pp"
app:layout_constraintTop_toBottomOf="@id/banner_pp" />
<View
android:layout_width="match_parent"
android:layout_height="50dp"
android:alpha="0.4"
android:background="@android:color/black"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/action_back"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentStart="true"
android:layout_marginStart="5dp"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:contentDescription="@string/go_back"
android:src="@drawable/ic_baseline_arrow_back_24"
android:tint="@android:color/white"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>