make version text selectable; add profile password warning text; shorten buildver git hash
continuous-integration/drone/pr Build was killed Details

This commit is contained in:
Dan Ballard 2021-07-13 18:16:55 -07:00
parent 7b397ecfe2
commit 04d8abe4e1
13 changed files with 45 additions and 16 deletions

View File

@ -30,7 +30,7 @@ steps:
path: /root/.pub-cache
commands:
- ./fetch-tor.sh
- echo `git describe --tags` > VERSION
- echo `git describe --tags --abbrev=1` > VERSION
- echo `date +%G-%m-%d-%H-%M` > BUILDDATE
- flutter pub get
- mkdir deploy
@ -197,7 +197,7 @@ steps:
commands:
- powershell -command "Invoke-WebRequest -Uri https://dist.torproject.org/torbrowser/10.0.18/tor-win64-0.4.5.9.zip -OutFile tor.zip"
- powershell -command "if ((Get-FileHash tor.zip -Algorithm sha512).Hash -ne '72764eb07ad8ab511603aba0734951ca003989f5f4686af91ba220217b4a8a4bcc5f571b59f52c847932f6efedf847b111621983050fcddbb8099d43ca66fb07' ) { Write-Error 'tor.zip sha512sum mismatch' }"
- git describe --tags > VERSION
- git describe --tags --abbrev=1 > VERSION
- powershell -command "Get-Date -Format 'yyyy-MM-dd-HH-mm'" > BUILDDATE
- .\fetch-libcwtch-go.ps1

View File

@ -68,6 +68,7 @@ In Lokalise, hit Download and make sure:
* Format is set to "Flutter (.arb)
* Output filename is set to `l10n/intl_%LANG_ISO%.%FORMAT%`
* Empty translations is set to "Replace with base language"
* Order "Last Update"
Build, download and unzip the output, overwriting `lib/l10n`. The next time Flwtch is built, Flutter will notice the changes and update `app_localizations.dart` accordingly (thanks to `generate:true` in `pubspec.yaml`).

View File

@ -1,6 +1,8 @@
{
"@@locale": "de",
"@@last_modified": "2021-07-10T17:32:01+02:00",
"@@last_modified": "2021-07-14T01:50:27+02:00",
"plainProfileDescription": "We recommend that you protect your Cwtch profiles with a password. If you do not set a password on this profile then anyone who has access to this device may be able to access information about this profile, including contacts, messages and sensitive cryptographic keys.",
"encryptedProfileDescription": "Encrypting a profile with a password protects it from other people who may also use this device. Encrypted profiles cannot be decrypted, displayed or accessed until the correct password is entered to unlock them.",
"addContactConfirm": "Add contact %1",
"addContact": "Add contact",
"contactGoto": "Go to conversation with %1",

View File

@ -1,6 +1,8 @@
{
"@@locale": "en",
"@@last_modified": "2021-07-10T17:32:01+02:00",
"@@last_modified": "2021-07-14T01:50:27+02:00",
"plainProfileDescription": "We recommend that you protect your Cwtch profiles with a password. If you do not set a password on this profile then anyone who has access to this device may be able to access information about this profile, including contacts, messages and sensitive cryptographic keys.",
"encryptedProfileDescription": "Encrypting a profile with a password protects it from other people who may also use this device. Encrypted profiles cannot be decrypted, displayed or accessed until the correct password is entered to unlock them.",
"addContactConfirm": "Add contact %1",
"addContact": "Add contact",
"contactGoto": "Go to conversation with %1",

View File

@ -1,6 +1,8 @@
{
"@@locale": "es",
"@@last_modified": "2021-07-10T17:32:01+02:00",
"@@last_modified": "2021-07-14T01:50:27+02:00",
"plainProfileDescription": "We recommend that you protect your Cwtch profiles with a password. If you do not set a password on this profile then anyone who has access to this device may be able to access information about this profile, including contacts, messages and sensitive cryptographic keys.",
"encryptedProfileDescription": "Encrypting a profile with a password protects it from other people who may also use this device. Encrypted profiles cannot be decrypted, displayed or accessed until the correct password is entered to unlock them.",
"addContactConfirm": "Add contact %1",
"addContact": "Add contact",
"contactGoto": "Go to conversation with %1",

View File

@ -1,7 +1,9 @@
{
"@@locale": "fr",
"@@last_modified": "2021-07-10T17:32:01+02:00",
"addContactConfirm": "Add contact %1",
"@@last_modified": "2021-07-14T01:50:27+02:00",
"plainProfileDescription": "Nous vous recommandons de protéger vos profils Cwtch par un mot de passe. Si vous ne définissez pas de mot de passe sur ce profil, toute personne ayant accès à cet appareil peut être en mesure d'accéder aux informations relatives à ce profil, y compris les contacts, les messages et les clés de chiffrement sensibles.",
"encryptedProfileDescription": "Le chiffrement d'un profil à l'aide d'un mot de passe le protège des autres personnes susceptibles d'utiliser également cet appareil. Les profils chiffrés ne peuvent pas être déchiffrés , affichés ou accessibles tant que le mot de passe correct n'a pas été saisi pour les déverrouiller.",
"addContactConfirm": "Ajouter le contact %1",
"addContact": "Ajouter le contact",
"contactGoto": "Aller à la conversation avec %1",
"settingUIColumnOptionSame": "Même réglage que pour le mode portrait",

View File

@ -1,6 +1,8 @@
{
"@@locale": "it",
"@@last_modified": "2021-07-10T17:32:01+02:00",
"@@last_modified": "2021-07-14T01:50:27+02:00",
"plainProfileDescription": "We recommend that you protect your Cwtch profiles with a password. If you do not set a password on this profile then anyone who has access to this device may be able to access information about this profile, including contacts, messages and sensitive cryptographic keys.",
"encryptedProfileDescription": "Encrypting a profile with a password protects it from other people who may also use this device. Encrypted profiles cannot be decrypted, displayed or accessed until the correct password is entered to unlock them.",
"addContactConfirm": "Add contact %1",
"addContact": "Add contact",
"contactGoto": "Go to conversation with %1",

View File

@ -1,6 +1,8 @@
{
"@@locale": "pl",
"@@last_modified": "2021-07-10T17:32:01+02:00",
"@@last_modified": "2021-07-14T01:50:27+02:00",
"plainProfileDescription": "We recommend that you protect your Cwtch profiles with a password. If you do not set a password on this profile then anyone who has access to this device may be able to access information about this profile, including contacts, messages and sensitive cryptographic keys.",
"encryptedProfileDescription": "Encrypting a profile with a password protects it from other people who may also use this device. Encrypted profiles cannot be decrypted, displayed or accessed until the correct password is entered to unlock them.",
"addContactConfirm": "Add contact %1",
"addContact": "Add contact",
"contactGoto": "Go to conversation with %1",

View File

@ -1,6 +1,8 @@
{
"@@locale": "pt",
"@@last_modified": "2021-07-10T17:32:01+02:00",
"@@last_modified": "2021-07-14T01:50:27+02:00",
"plainProfileDescription": "We recommend that you protect your Cwtch profiles with a password. If you do not set a password on this profile then anyone who has access to this device may be able to access information about this profile, including contacts, messages and sensitive cryptographic keys.",
"encryptedProfileDescription": "Encrypting a profile with a password protects it from other people who may also use this device. Encrypted profiles cannot be decrypted, displayed or accessed until the correct password is entered to unlock them.",
"addContactConfirm": "Add contact %1",
"addContact": "Add contact",
"contactGoto": "Go to conversation with %1",

View File

@ -1,4 +1,5 @@
import 'dart:convert';
import 'package:cwtch/config.dart';
import 'package:cwtch/notification_manager.dart';
import 'package:cwtch/views/messageview.dart';
import 'package:cwtch/widgets/rightshiftfixer.dart';
@ -28,7 +29,7 @@ var globalTorStatus = TorStatus();
var globalAppState = AppState();
void main() {
print("main()");
print("Cwtch version: ${EnvironmentConfig.BUILD_VER} built on: ${EnvironmentConfig.BUILD_DATE}");
LicenseRegistry.addLicense(() => licenses());
WidgetsFlutterBinding.ensureInitialized();
print("runApp()");

View File

@ -134,6 +134,11 @@ class _AddEditProfileViewState extends State<AddEditProfileView> {
)
])),
// We only allow setting password types on profile creation
Visibility(
visible: Provider.of<ProfileInfoState>(context).onion.isEmpty,
child: SizedBox(
height: 20,
)),
Visibility(
visible: Provider.of<ProfileInfoState>(context).onion.isEmpty,
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
@ -147,7 +152,12 @@ class _AddEditProfileViewState extends State<AddEditProfileView> {
AppLocalizations.of(context)!.radioUsePassword,
style: TextStyle(color: theme.current().mainTextColor()),
),
])),
Flexible(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 24),
child: Text( usePassword ? AppLocalizations.of(context)!.encryptedProfileDescription : AppLocalizations.of(context)!.plainProfileDescription,
textAlign: TextAlign.left,
)))])),
SizedBox(
height: 20,
),

View File

@ -34,6 +34,7 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
Widget _buildSettingsList() {
return Consumer<Settings>(builder: (context, settings, child) {
return LayoutBuilder(builder: (BuildContext context, BoxConstraints viewportConstraints) {
var appIcon = Icon(Icons.info, color: settings.current().mainTextColor());
return Scrollbar(
isAlwaysShown: true,
child: SingleChildScrollView(
@ -177,12 +178,14 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
],
)),
AboutListTile(
icon: Icon(Icons.info, color: settings.current().mainTextColor()),
icon: appIcon,
applicationIcon: Padding(padding: EdgeInsets.all(5), child: Icon(CwtchIcons.cwtch_knott)),
applicationName: "Cwtch (Flutter UI)",
applicationVersion: AppLocalizations.of(context)!.versionBuilddate.replaceAll("%1", EnvironmentConfig.BUILD_VER).replaceAll("%2", EnvironmentConfig.BUILD_DATE),
applicationLegalese: '\u{a9} 2021 Open Privacy Research Society',
),
aboutBoxChildren: <Widget>[Padding(
padding: EdgeInsets.fromLTRB(24.0 + 10.0 + (appIcon.size ?? 24.0), 16.0, 0.0, 0.0), // About has 24 padding (ln 389) and there appears to be another 10 of padding in the widget
child: SelectableText(AppLocalizations.of(context)!.versionBuilddate.replaceAll("%1", EnvironmentConfig.BUILD_VER).replaceAll("%2", EnvironmentConfig.BUILD_DATE)),
)]),
]))));
});
});

View File

@ -54,7 +54,7 @@ class _TorStatusView extends State<TorStatusView> {
),
ListTile(
title: Text(AppLocalizations.of(context)!.torVersion),
subtitle: Text(torStatus.version),
subtitle: SelectableText(torStatus.version),
),
]))));
});