add piped section in about page

This commit is contained in:
Bnyro 2022-06-18 22:17:47 +02:00
parent fc2a001b45
commit c3b3ad8b7b
5 changed files with 30 additions and 2 deletions

View File

@ -5,3 +5,4 @@ const val WEBSITE_URL = "https://libre-tube.github.io/"
const val AUTHORS_URL = "https://github.com/libre-tube/LibreTube/graphs/contributors"
const val DONATE_URL = "https://libre-tube.github.io/#donate"
const val CONTRIBUTING_URL = "https://github.com/libre-tube/LibreTube#donate"
const val PIPED_GITHUB_URL = "https://github.com/TeamPiped/Piped"

View File

@ -15,6 +15,7 @@ import com.github.libretube.AUTHORS_URL
import com.github.libretube.BuildConfig
import com.github.libretube.CONTRIBUTING_URL
import com.github.libretube.DONATE_URL
import com.github.libretube.PIPED_GITHUB_URL
import com.github.libretube.R
import com.github.libretube.WEBSITE_URL
import com.google.android.material.dialog.MaterialAlertDialogBuilder
@ -44,6 +45,10 @@ class AboutFragment : Fragment() {
authors.setOnClickListener {
openLinkFromHref(AUTHORS_URL)
}
val piped = view.findViewById<LinearLayout>(R.id.piped)
piped.setOnClickListener {
openLinkFromHref(PIPED_GITHUB_URL)
}
val donate = view.findViewById<LinearLayout>(R.id.donate)
donate.setOnClickListener {
openLinkFromHref(DONATE_URL)

View File

@ -97,6 +97,27 @@
</LinearLayout>
<LinearLayout
android:id="@+id/piped"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingHorizontal="20dp"
android:paddingVertical="10dp">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/piped"
android:textStyle="bold" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/piped_summary" />
</LinearLayout>
<LinearLayout
android:id="@+id/donate"
android:layout_width="match_parent"

View File

@ -149,7 +149,7 @@
<string name="live">Live</string>
<string name="no_replies">This comment has no replies.</string>
<string name="authors">Authors</string>
<string name="authors_summary">Get to know everyone.</string>
<string name="authors_summary">Get to know everyone who is involved in developing and improving the app.</string>
<string name="download_folder">Name</string>
<string name="download_folder_summary">The name of the folder downloaded media is stored in.</string>
<string name="internal_storage">Internal storage</string>
@ -196,4 +196,5 @@
<string name="behavior">Behavior</string>
<string name="player_summary">Quality and player behavior</string>
<string name="seek_increment">Seek increment</string>
<string name="piped_summary">Piped is an open-source alternative web-frontend for YouTube provides the API we use. Without Piped, LibreTube wouldn\'t exist. Huge thanks to their devs!</string>
</resources>

View File

@ -22,5 +22,5 @@
<item name="dialogCornerRadius">28dp</item>
</style>
z
</resources>