mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Merge branch 'briar-about-update' into 'master'
Briar about update See merge request briar/briar!1690
This commit is contained in:
@@ -29,6 +29,7 @@ android {
|
||||
versionCode 10410
|
||||
versionName "1.4.10"
|
||||
applicationId "org.briarproject.briar.android"
|
||||
buildConfigField "String", "TorVersion", "\"$tor_version\""
|
||||
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
buildConfigField "String", "GitHash",
|
||||
|
||||
@@ -34,8 +34,10 @@ public class AboutFragment extends Fragment {
|
||||
private static final Logger LOG = getLogger(TAG);
|
||||
|
||||
private TextView briarVersion;
|
||||
private TextView torVersion;
|
||||
private TextView briarWebsite;
|
||||
private TextView briarSourceCode;
|
||||
private TextView briarChangelog;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
@@ -53,32 +55,38 @@ public class AboutFragment extends Fragment {
|
||||
briarVersion = requireActivity().findViewById(R.id.BriarVersion);
|
||||
briarVersion.setText(
|
||||
getString(R.string.briar_version, BuildConfig.VERSION_NAME));
|
||||
torVersion = requireActivity().findViewById(R.id.TorVersion);
|
||||
torVersion.setText(
|
||||
getString(R.string.tor_version, BuildConfig.TorVersion));
|
||||
briarWebsite = requireActivity().findViewById(R.id.BriarWebsite);
|
||||
briarSourceCode = requireActivity().findViewById(R.id.BriarSourceCode);
|
||||
briarChangelog = requireActivity().findViewById(R.id.BriarChangelog);
|
||||
briarWebsite.setOnClickListener(View -> {
|
||||
String url = "https://briarproject.org/";
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse(url));
|
||||
try {
|
||||
startActivity(i);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
logException(LOG, WARNING, e);
|
||||
Toast.makeText(requireContext(),
|
||||
R.string.error_start_activity, LENGTH_LONG).show();
|
||||
}
|
||||
goToUrl(url);
|
||||
});
|
||||
briarSourceCode.setOnClickListener(View -> {
|
||||
String url = "https://code.briarproject.org/briar/briar";
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse(url));
|
||||
try {
|
||||
startActivity(i);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
logException(LOG, WARNING, e);
|
||||
Toast.makeText(requireContext(),
|
||||
R.string.error_start_activity, LENGTH_LONG).show();
|
||||
}
|
||||
goToUrl(url);
|
||||
});
|
||||
briarChangelog.setOnClickListener(View -> {
|
||||
String url =
|
||||
"https://code.briarproject.org/briar/briar/-/wikis/changelog";
|
||||
goToUrl(url);
|
||||
});
|
||||
}
|
||||
|
||||
private void goToUrl(String url) {
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse(url));
|
||||
try {
|
||||
startActivity(i);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
logException(LOG, WARNING, e);
|
||||
Toast.makeText(requireContext(),
|
||||
R.string.error_start_activity, LENGTH_LONG).show();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,6 +14,15 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TorVersion"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tor_version"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/BriarVersion" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/LinksTitle"
|
||||
android:layout_width="match_parent"
|
||||
@@ -22,7 +31,7 @@
|
||||
android:text="@string/links"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/BriarVersion" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/TorVersion" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/BriarWebsite"
|
||||
@@ -42,6 +51,15 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/BriarWebsite" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/BriarChangelog"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/briar_changelog"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/BriarSourceCode" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/TranslatorThanks"
|
||||
android:layout_width="match_parent"
|
||||
@@ -50,6 +68,6 @@
|
||||
android:text="@string/translator_thanks"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/BriarSourceCode" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/BriarChangelog" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -693,10 +693,12 @@
|
||||
|
||||
<!-- About -->
|
||||
<string name="about_title">About</string>
|
||||
<string name="briar_version">Briar Version: %s</string>
|
||||
<string name="briar_version">Briar version: %s</string>
|
||||
<string name="tor_version">Tor version: %s</string>
|
||||
<string name="links">Links</string>
|
||||
<string name="briar_website">\u2022 <a href="">Briar website</a></string>
|
||||
<string name="briar_source_code">\u2022 <a href="">Briar source code</a></string>
|
||||
<string name="briar_website">\u2022 <a href="">Website</a></string>
|
||||
<string name="briar_source_code">\u2022 <a href="">Source code</a></string>
|
||||
<string name="briar_changelog">\u2022 <a href="">Changelog</a></string>
|
||||
<!-- Here translators can add their names or Transifex usernames(eg "Thanks to all the contributors at the Localization Lab, especially Tom, Matthew and Jerry") -->
|
||||
<string name="translator_thanks">Thanks to all the contributors at the Localization Lab</string>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user