Compare commits

..

1 Commits

Author SHA1 Message Date
Dan Ballard 20bff8b713 messagecache stub 2021-12-03 17:15:47 -08:00
96 changed files with 3431 additions and 4048 deletions

View File

@ -8,7 +8,7 @@ clone:
steps: steps:
- name: clone - name: clone
image: cirrusci/flutter:2.8.0 image: cirrusci/flutter:2.5.3
environment: environment:
buildbot_key_b64: buildbot_key_b64:
from_secret: buildbot_key_b64 from_secret: buildbot_key_b64
@ -24,7 +24,7 @@ steps:
- git checkout $DRONE_COMMIT - git checkout $DRONE_COMMIT
- name: fetch - name: fetch
image: cirrusci/flutter:2.8.0 image: cirrusci/flutter:2.5.3
volumes: volumes:
- name: deps - name: deps
path: /root/.pub-cache path: /root/.pub-cache
@ -47,7 +47,7 @@ steps:
# #Todo: fix all the lint errors and add `-set_exit_status` above to enforce linting # #Todo: fix all the lint errors and add `-set_exit_status` above to enforce linting
- name: build-linux - name: build-linux
image: openpriv/flutter-desktop:linux-fstable-2.8.0 image: openpriv/flutter-desktop:linux-fstable-2.5.3
volumes: volumes:
- name: deps - name: deps
path: /root/.pub-cache path: /root/.pub-cache
@ -61,7 +61,7 @@ steps:
- rm -r cwtch - rm -r cwtch
- name: test-build-android - name: test-build-android
image: cirrusci/flutter:2.8.0 image: cirrusci/flutter:2.5.3
when: when:
event: pull_request event: pull_request
volumes: volumes:
@ -71,7 +71,7 @@ steps:
- flutter build apk --debug - flutter build apk --debug
- name: build-android - name: build-android
image: cirrusci/flutter:2.8.0 image: cirrusci/flutter:2.5.3
when: when:
event: push event: push
environment: environment:
@ -95,7 +95,7 @@ steps:
#- cp build/app/outputs/flutter-apk/app-debug.apk deploy/android #- cp build/app/outputs/flutter-apk/app-debug.apk deploy/android
- name: widget-tests - name: widget-tests
image: cirrusci/flutter:2.8.0 image: cirrusci/flutter:2.5.3
volumes: volumes:
- name: deps - name: deps
path: /root/.pub-cache path: /root/.pub-cache
@ -106,7 +106,6 @@ steps:
- name: deploy-buildfiles - name: deploy-buildfiles
image: kroniak/ssh-client image: kroniak/ssh-client
pull: if-not-exists
environment: environment:
BUILDFILES_KEY: BUILDFILES_KEY:
from_secret: buildfiles_key from_secret: buildfiles_key
@ -130,7 +129,6 @@ steps:
- name: notify-email - name: notify-email
image: drillster/drone-email image: drillster/drone-email
pull: if-not-exists
settings: settings:
host: build.openprivacy.ca host: build.openprivacy.ca
port: 25 port: 25
@ -141,7 +139,6 @@ steps:
- name: notify-gogs - name: notify-gogs
image: openpriv/drone-gogs image: openpriv/drone-gogs
pull: if-not-exists
when: when:
event: pull_request event: pull_request
status: [ success, changed, failure ] status: [ success, changed, failure ]
@ -177,7 +174,7 @@ clone:
steps: steps:
- name: clone - name: clone
image: openpriv/flutter-desktop:windows-sdk30-fstable-2.8.1 image: openpriv/flutter-desktop:windows-sdk30-fstable2.5.3
environment: environment:
buildbot_key_b64: buildbot_key_b64:
from_secret: buildbot_key_b64 from_secret: buildbot_key_b64
@ -195,7 +192,7 @@ steps:
- git checkout $Env:DRONE_COMMIT - git checkout $Env:DRONE_COMMIT
- name: fetch - name: fetch
image: openpriv/flutter-desktop:windows-sdk30-fstable-2.8.1 image: openpriv/flutter-desktop:windows-sdk30-fstable2.5.3
commands: commands:
- powershell -command "Invoke-WebRequest -Uri https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-win64-0.4.6.5.zip -OutFile tor.zip" - powershell -command "Invoke-WebRequest -Uri https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-win64-0.4.6.5.zip -OutFile tor.zip"
- powershell -command "if ((Get-FileHash tor.zip -Algorithm sha512).Hash -ne '7917561a7a063440a1ddfa9cb544ab9ffd09de84cea3dd66e3cc9cd349dd9f85b74a522ec390d7a974bc19b424c4d53af60e57bbc47e763d13cab6a203c4592f' ) { Write-Error 'tor.zip sha512sum mismatch' }" - powershell -command "if ((Get-FileHash tor.zip -Algorithm sha512).Hash -ne '7917561a7a063440a1ddfa9cb544ab9ffd09de84cea3dd66e3cc9cd349dd9f85b74a522ec390d7a974bc19b424c4d53af60e57bbc47e763d13cab6a203c4592f' ) { Write-Error 'tor.zip sha512sum mismatch' }"
@ -204,7 +201,7 @@ steps:
- .\fetch-libcwtch-go.ps1 - .\fetch-libcwtch-go.ps1
- name: build-windows - name: build-windows
image: openpriv/flutter-desktop:windows-sdk30-fstable-2.8.1 image: openpriv/flutter-desktop:windows-sdk30-fstable2.5.3
commands: commands:
- flutter pub get - flutter pub get
- $Env:version += type .\VERSION - $Env:version += type .\VERSION
@ -223,8 +220,7 @@ steps:
- powershell -command "Expand-Archive -Path tor.zip -DestinationPath $Env:releasedir\Tor" - powershell -command "Expand-Archive -Path tor.zip -DestinationPath $Env:releasedir\Tor"
- name: package-windows - name: package-windows
image: openpriv/nsis image: openpriv/nsis:latest
pull: if-not-exists
when: when:
event: push event: push
status: [ success ] status: [ success ]
@ -261,7 +257,7 @@ steps:
- move *.sha512 deploy\$Env:builddir - move *.sha512 deploy\$Env:builddir
- name: deploy-windows - name: deploy-windows
image: openpriv/flutter-desktop:windows-sdk30-fstable-2.8.1 image: openpriv/flutter-desktop:windows-sdk30-fstable2.5.3
when: when:
event: push event: push
status: [ success ] status: [ success ]

View File

@ -1 +1 @@
2021-12-20-18-47-v1.5.2 2021-11-09-18-25-v1.4.2

View File

@ -1 +1 @@
2021-12-20-23-47-v1.5.2 2021-11-09-23-25-v1.4.2

View File

@ -28,7 +28,7 @@ Cwtch processes the following environment variables:
First you will need a valid [flutter sdk installation](https://flutter.dev/docs/get-started/install). First you will need a valid [flutter sdk installation](https://flutter.dev/docs/get-started/install).
You will probably want to disable Analytics on the Flutter Tool: `flutter config --no-analytics` You will probably want to disable Analytics on the Flutter Tool: `flutter config --no-analytics`
This project uses the flutter `stable` channel This project uses the flutter `dev` channel, which you will need to switch to: `flutter channel dev; flutter upgrade`.
Once flutter is set up, run `flutter pub get` from this project folder to fetch dependencies. Once flutter is set up, run `flutter pub get` from this project folder to fetch dependencies.
@ -42,20 +42,17 @@ To build a release version and load normal profiles, use `build-release.sh X` in
- set `LD_LIBRARY_PATH="$PWD/linux"` - set `LD_LIBRARY_PATH="$PWD/linux"`
- copy a `tor` binary to `linux/` or run `fetch-tor.sh` to download one - copy a `tor` binary to `linux/` or run `fetch-tor.sh` to download one
- run `flutter config --enable-linux-desktop` if you've never done so before - run `flutter config --enable-linux-desktop` if you've never done so before
- optional: launch cwtch-ui debug build by running `flutter run -d linux` - optional: launch cwtch-ui directly by running `flutter run -d linux`
- to build cwtch-ui, run `flutter build linux` - to build cwtch-ui, run `flutter build linux`
- optional: launch cwtch-ui release build with `env LD_LIBRARY_PATH=linux ./build/linux/x64/release/bundle/cwtch` - optional: launch cwtch-ui build with `env LD_LIBRARY_PATH=linux ./build/linux/x64/release/bundle/cwtch`
- to package the build, run `linux/package-release.sh` - to package the build, run `linux/package-release.sh`
### Building on Windows (for Windows) ### Building on Windows (for Windows)
- copy `libCwtch.dll` to `windows/`, or run `fetch-libcwtch-go.ps1` to download it - copy `libCwtch.dll` to `windows/`, or run `fetch-libcwtch-go.ps1` to download it
- run `fetch-tor-win.ps1` to fetch Tor for windows - run `fetch-tor-win.ps1` to fetch Tor for windows
- optional: launch cwtch-ui debug build by running `flutter run -d windows` - optional: launch cwtch-ui directly by running `flutter run -d windows`
- to build cwtch-ui, run `flutter build windows` - to build cwtch-ui, run `flutter build windows`
- optional: to run the release build:
- `cp windows/libCwtch.dll .`
- `./build/windows/runner/Release/cwtch.exe`
### Building on Linux/Windows (for Android) ### Building on Linux/Windows (for Android)
@ -68,8 +65,10 @@ To build a release version and load normal profiles, use `build-release.sh X` in
- copy `libCwtch.dylib` into the root folder, or run `fetch-libcwtch-go-macos.sh` to download it - copy `libCwtch.dylib` into the root folder, or run `fetch-libcwtch-go-macos.sh` to download it
- run `fetch-tor-macos.sh` to fetch Tor or Download and install Tor Browser and `cp -r /Applications/Tor\ Browser.app/Contents/MacOS/Tor ./macos/` - run `fetch-tor-macos.sh` to fetch Tor or Download and install Tor Browser and `cp -r /Applications/Tor\ Browser.app/Contents/MacOS/Tor ./macos/`
- `flutter build macos` - `flutter build macos`
- optional: launch cwtch-ui release build with `./build/macos/Build/Products/Release/Cwtch.app/Contents/MacOS/Cwtch` - optional: launch cwtch-ui build with `./build/linux/x64/release/bundle/cwtch`
- To package the UI: `./macos/package-release.sh`, which results in a Cwtch.dmg that has libCwtch.dylib and tor in it as well and can be installed into Applications - `./macos/package-release.sh`
results in a Cwtch.dmg that has libCwtch.dylib and tor in it as well and can be installed into Applications
### Known Platform Issues ### Known Platform Issues

View File

@ -133,21 +133,21 @@ class FlwtchWorker(context: Context, parameters: WorkerParameters) :
notificationManager.notify(dlID, newNotification); notificationManager.notify(dlID, newNotification);
} }
} catch (e: Exception) { } catch (e: Exception) {
Log.d("FlwtchWorker->FileDownloadProgressUpdate", e.toString() + " :: " + e.getStackTrace()); Log.i("FlwtchWorker->FileDownloadProgressUpdate", e.toString() + " :: " + e.getStackTrace());
} }
} else if (evt.EventType == "FileDownloaded") { } else if (evt.EventType == "FileDownloaded") {
Log.d("FlwtchWorker", "file downloaded!"); Log.i("FlwtchWorker", "file downloaded!");
val data = JSONObject(evt.Data); val data = JSONObject(evt.Data);
val tempFile = data.getString("TempFile"); val tempFile = data.getString("TempFile");
val fileKey = data.getString("FileKey"); val fileKey = data.getString("FileKey");
if (tempFile != "" && tempFile != data.getString("FilePath")) { if (tempFile != "") {
val filePath = data.getString("FilePath"); val filePath = data.getString("FilePath");
Log.i("FlwtchWorker", "moving "+tempFile+" to "+filePath); Log.i("FlwtchWorker", "moving "+tempFile+" to "+filePath);
val sourcePath = Paths.get(tempFile); val sourcePath = Paths.get(tempFile);
val targetUri = Uri.parse(filePath); val targetUri = Uri.parse(filePath);
val os = this.applicationContext.getContentResolver().openOutputStream(targetUri); val os = this.applicationContext.getContentResolver().openOutputStream(targetUri);
val bytesWritten = Files.copy(sourcePath, os); val bytesWritten = Files.copy(sourcePath, os);
Log.d("FlwtchWorker", "copied " + bytesWritten.toString() + " bytes"); Log.i("FlwtchWorker", "copied " + bytesWritten.toString() + " bytes");
if (bytesWritten != 0L) { if (bytesWritten != 0L) {
os?.flush(); os?.flush();
os?.close(); os?.close();
@ -180,78 +180,62 @@ class FlwtchWorker(context: Context, parameters: WorkerParameters) :
val pass = (a.get("pass") as? String) ?: "" val pass = (a.get("pass") as? String) ?: ""
Cwtch.loadProfiles(pass) Cwtch.loadProfiles(pass)
} }
"ChangePassword" -> {
val profile = (a.get("ProfileOnion") as? String) ?: ""
val pass = (a.get("OldPass") as? String) ?: ""
val passNew = (a.get("NewPass") as? String) ?: ""
val passNew2 = (a.get("NewPassAgain") as? String) ?: ""
Cwtch.changePassword(profile, pass, passNew, passNew2)
}
"GetMessage" -> { "GetMessage" -> {
val profile = (a.get("ProfileOnion") as? String) ?: "" val profile = (a.get("profile") as? String) ?: ""
val conversation = a.getInt("conversation").toLong() val handle = (a.get("contact") as? String) ?: ""
val indexI = a.getInt("index").toLong() val indexI = a.getInt("index")
Log.d("FlwtchWorker", "Cwtch GetMessage " + profile + " " + conversation.toString() + " " + indexI.toString()) return Result.success(Data.Builder().putString("result", Cwtch.getMessage(profile, handle, indexI.toLong())).build())
return Result.success(Data.Builder().putString("result", Cwtch.getMessage(profile, conversation, indexI)).build())
}
"GetMessageByID" -> {
val profile = (a.get("ProfileOnion") as? String) ?: ""
val conversation = a.getInt("conversation").toLong()
val id = a.getInt("id").toLong()
return Result.success(Data.Builder().putString("result", Cwtch.getMessageByID(profile, conversation, id)).build())
} }
"GetMessageByContentHash" -> { "GetMessageByContentHash" -> {
val profile = (a.get("ProfileOnion") as? String) ?: "" val profile = (a.get("profile") as? String) ?: ""
val conversation = a.getInt("conversation").toLong() val handle = (a.get("contact") as? String) ?: ""
val contentHash = (a.get("contentHash") as? String) ?: "" val contentHash = (a.get("contentHash") as? String) ?: ""
return Result.success(Data.Builder().putString("result", Cwtch.getMessagesByContentHash(profile, conversation, contentHash)).build()) return Result.success(Data.Builder().putString("result", Cwtch.getMessagesByContentHash(profile, handle, contentHash)).build())
} }
"UpdateMessageAttribute" -> { "UpdateMessageFlags" -> {
val profile = (a.get("ProfileOnion") as? String) ?: "" val profile = (a.get("profile") as? String) ?: ""
val conversation = a.getInt("conversation").toLong() val handle = (a.get("contact") as? String) ?: ""
val channel = a.getInt("chanenl").toLong() val midx = (a.get("midx") as? Long) ?: 0
val midx = a.getInt("midx").toLong() val flags = (a.get("flags") as? Long) ?: 0
val key = (a.get("key") as? String) ?: "" Cwtch.updateMessageFlags(profile, handle, midx, flags)
val value = (a.get("value") as? String) ?: ""
Cwtch.setMessageAttribute(profile, conversation, channel, midx, key, value)
} }
"AcceptConversation" -> { "AcceptContact" -> {
val profile = (a.get("ProfileOnion") as? String) ?: "" val profile = (a.get("ProfileOnion") as? String) ?: ""
val conversation = a.getInt("conversation").toLong() val handle = (a.get("handle") as? String) ?: ""
Cwtch.acceptConversation(profile, conversation) Cwtch.acceptContact(profile, handle)
} }
"BlockContact" -> { "BlockContact" -> {
val profile = (a.get("ProfileOnion") as? String) ?: "" val profile = (a.get("ProfileOnion") as? String) ?: ""
val conversation = a.getInt("conversation").toLong() val handle = (a.get("handle") as? String) ?: ""
Cwtch.blockContact(profile, conversation) Cwtch.blockContact(profile, handle)
} }
"SendMessage" -> { "SendMessage" -> {
val profile = (a.get("ProfileOnion") as? String) ?: "" val profile = (a.get("ProfileOnion") as? String) ?: ""
val conversation = a.getInt("conversation").toLong() val handle = (a.get("handle") as? String) ?: ""
val message = (a.get("message") as? String) ?: "" val message = (a.get("message") as? String) ?: ""
Cwtch.sendMessage(profile, conversation, message) Cwtch.sendMessage(profile, handle, message)
} }
"SendInvitation" -> { "SendInvitation" -> {
val profile = (a.get("ProfileOnion") as? String) ?: "" val profile = (a.get("ProfileOnion") as? String) ?: ""
val conversation = a.getInt("conversation").toLong() val handle = (a.get("handle") as? String) ?: ""
val target = (a.get("target") as? Long) ?: -1 val target = (a.get("target") as? String) ?: ""
Cwtch.sendInvitation(profile, conversation, target) Cwtch.sendInvitation(profile, handle, target)
} }
"ShareFile" -> { "ShareFile" -> {
val profile = (a.get("ProfileOnion") as? String) ?: "" val profile = (a.get("ProfileOnion") as? String) ?: ""
val conversation = a.getInt("conversation").toLong() val handle = (a.get("handle") as? String) ?: ""
val filepath = (a.get("filepath") as? String) ?: "" val filepath = (a.get("filepath") as? String) ?: ""
Cwtch.shareFile(profile, conversation, filepath) Cwtch.shareFile(profile, handle, filepath)
} }
"DownloadFile" -> { "DownloadFile" -> {
val profile = (a.get("ProfileOnion") as? String) ?: "" val profile = (a.get("ProfileOnion") as? String) ?: ""
val conversation = a.getInt("conversation").toLong() val handle = (a.get("handle") as? String) ?: ""
val filepath = (a.get("filepath") as? String) ?: "" val filepath = (a.get("filepath") as? String) ?: ""
val manifestpath = (a.get("manifestpath") as? String) ?: "" val manifestpath = (a.get("manifestpath") as? String) ?: ""
val filekey = (a.get("filekey") as? String) ?: "" val filekey = (a.get("filekey") as? String) ?: ""
// FIXME: Prevent spurious calls by Intent // FIXME: Prevent spurious calls by Intent
if (profile != "") { if (profile != "") {
Cwtch.downloadFile(profile, conversation, filepath, manifestpath, filekey) Cwtch.downloadFile(profile, handle, filepath, manifestpath, filekey)
} }
} }
"CheckDownloadStatus" -> { "CheckDownloadStatus" -> {
@ -261,9 +245,9 @@ class FlwtchWorker(context: Context, parameters: WorkerParameters) :
} }
"VerifyOrResumeDownload" -> { "VerifyOrResumeDownload" -> {
val profile = (a.get("ProfileOnion") as? String) ?: "" val profile = (a.get("ProfileOnion") as? String) ?: ""
val conversation = a.getInt("conversation").toLong() val handle = (a.get("handle") as? String) ?: ""
val fileKey = (a.get("fileKey") as? String) ?: "" val fileKey = (a.get("fileKey") as? String) ?: ""
Cwtch.verifyOrResumeDownload(profile, conversation, fileKey) Cwtch.verifyOrResumeDownload(profile, handle, fileKey)
} }
"SendProfileEvent" -> { "SendProfileEvent" -> {
val onion = (a.get("onion") as? String) ?: "" val onion = (a.get("onion") as? String) ?: ""
@ -282,6 +266,13 @@ class FlwtchWorker(context: Context, parameters: WorkerParameters) :
val bundle = (a.get("bundle") as? String) ?: "" val bundle = (a.get("bundle") as? String) ?: ""
Cwtch.importBundle(profile, bundle) Cwtch.importBundle(profile, bundle)
} }
"SetGroupAttribute" -> {
val profile = (a.get("ProfileOnion") as? String) ?: ""
val groupHandle = (a.get("groupHandle") as? String) ?: ""
val key = (a.get("key") as? String) ?: ""
val value = (a.get("value") as? String) ?: ""
Cwtch.setGroupAttribute(profile, groupHandle, key, value)
}
"CreateGroup" -> { "CreateGroup" -> {
val profile = (a.get("ProfileOnion") as? String) ?: "" val profile = (a.get("ProfileOnion") as? String) ?: ""
val server = (a.get("server") as? String) ?: "" val server = (a.get("server") as? String) ?: ""
@ -295,13 +286,18 @@ class FlwtchWorker(context: Context, parameters: WorkerParameters) :
} }
"ArchiveConversation" -> { "ArchiveConversation" -> {
val profile = (a.get("ProfileOnion") as? String) ?: "" val profile = (a.get("ProfileOnion") as? String) ?: ""
val conversation = (a.get("conversation") as? Long) ?: -1 val contactHandle = (a.get("handle") as? String) ?: ""
Cwtch.archiveConversation(profile, conversation) Cwtch.archiveConversation(profile, contactHandle)
} }
"DeleteConversation" -> { "DeleteContact" -> {
val profile = (a.get("ProfileOnion") as? String) ?: "" val profile = (a.get("ProfileOnion") as? String) ?: ""
val conversation = (a.get("conversation") as? Long) ?: -1 val handle = (a.get("handle") as? String) ?: ""
Cwtch.deleteContact(profile, conversation) Cwtch.deleteContact(profile, handle)
}
"RejectInvite" -> {
val profile = (a.get("ProfileOnion") as? String) ?: ""
val groupHandle = (a.get("groupHandle") as? String) ?: ""
Cwtch.rejectInvite(profile, groupHandle)
} }
"SetProfileAttribute" -> { "SetProfileAttribute" -> {
val profile = (a.get("ProfileOnion") as? String) ?: "" val profile = (a.get("ProfileOnion") as? String) ?: ""
@ -309,12 +305,12 @@ class FlwtchWorker(context: Context, parameters: WorkerParameters) :
val v = (a.get("Val") as? String) ?: "" val v = (a.get("Val") as? String) ?: ""
Cwtch.setProfileAttribute(profile, key, v) Cwtch.setProfileAttribute(profile, key, v)
} }
"SetConversationAttribute" -> { "SetContactAttribute" -> {
val profile = (a.get("ProfileOnion") as? String) ?: "" val profile = (a.get("ProfileOnion") as? String) ?: ""
val conversation = (a.get("conversation") as? Long) ?: -1 val contact = (a.get("Contact") as? String) ?: ""
val key = (a.get("Key") as? String) ?: "" val key = (a.get("Key") as? String) ?: ""
val v = (a.get("Val") as? String) ?: "" val v = (a.get("Val") as? String) ?: ""
Cwtch.setConversationAttribute(profile, conversation, key, v) Cwtch.setContactAttribute(profile, contact, key, v)
} }
"Shutdown" -> { "Shutdown" -> {
Cwtch.shutdownCwtch(); Cwtch.shutdownCwtch();
@ -358,10 +354,7 @@ class FlwtchWorker(context: Context, parameters: WorkerParameters) :
val v = (a.get("Val") as? String) ?: "" val v = (a.get("Val") as? String) ?: ""
Cwtch.setServerAttribute(serverOnion, key, v) Cwtch.setServerAttribute(serverOnion, key, v)
} }
else -> { else -> return Result.failure()
Log.i("FlwtchWorker", "unknown command: " + method);
return Result.failure()
}
} }
return Result.success() return Result.success()
} }

View File

@ -22,10 +22,6 @@ import io.flutter.plugin.common.ErrorLogResult
import org.json.JSONObject import org.json.JSONObject
import java.util.concurrent.TimeUnit import java.util.concurrent.TimeUnit
import java.io.File
import java.nio.file.Files
import java.nio.file.Paths
import java.nio.file.StandardCopyOption
import android.net.Uri import android.net.Uri
import android.provider.DocumentsContract import android.provider.DocumentsContract
@ -61,11 +57,9 @@ class MainActivity: FlutterActivity() {
// "Download to..." prompt extra arguments // "Download to..." prompt extra arguments
private val FILEPICKER_REQUEST_CODE = 234 private val FILEPICKER_REQUEST_CODE = 234
private val PREVIEW_EXPORT_REQUEST_CODE = 235
private var dlToProfile = "" private var dlToProfile = ""
private var dlToHandle = "" private var dlToHandle = ""
private var dlToFileKey = "" private var dlToFileKey = ""
private var exportFromPath = ""
// handles clicks received from outside the app (ie, notifications) // handles clicks received from outside the app (ie, notifications)
override fun onNewIntent(intent: Intent) { override fun onNewIntent(intent: Intent) {
@ -108,20 +102,6 @@ class MainActivity: FlutterActivity() {
"manifestpath" to manifestPath, "manifestpath" to manifestPath,
"filekey" to this.dlToFileKey "filekey" to this.dlToFileKey
)), ErrorLogResult(""));//placeholder; this Result is never actually invoked )), ErrorLogResult(""));//placeholder; this Result is never actually invoked
} else if (requestCode == PREVIEW_EXPORT_REQUEST_CODE) {
val targetPath = intent!!.getData().toString()
var srcFile = File(this.exportFromPath)
Log.i("MainActivity:PREVIEW_EXPORT", "exporting previewed file")
val sourcePath = Paths.get(this.exportFromPath);
val targetUri = Uri.parse(targetPath);
val os = this.applicationContext.getContentResolver().openOutputStream(targetUri);
val bytesWritten = Files.copy(sourcePath, os);
Log.d("MainActivity:PREVIEW_EXPORT", "copied " + bytesWritten.toString() + " bytes");
if (bytesWritten != 0L) {
os?.flush();
os?.close();
//Files.delete(sourcePath);
}
} }
} }
@ -167,7 +147,11 @@ class MainActivity: FlutterActivity() {
// that we can divert this method call to ReconnectCwtchForeground instead if so. // that we can divert this method call to ReconnectCwtchForeground instead if so.
val works = WorkManager.getInstance(this).getWorkInfosByTag(WORKER_TAG).get() val works = WorkManager.getInstance(this).getWorkInfosByTag(WORKER_TAG).get()
for (workInfo in works) { for (workInfo in works) {
WorkManager.getInstance(this).cancelWorkById(workInfo.id) Log.i("handleCwtch:WorkManager", "$workInfo")
if (!workInfo.tags.contains(uniqueTag)) {
Log.i("handleCwtch:WorkManager", "canceling ${workInfo.id} bc tags don't include $uniqueTag")
WorkManager.getInstance(this).cancelWorkById(workInfo.id)
}
} }
WorkManager.getInstance(this).pruneWork() WorkManager.getInstance(this).pruneWork()
@ -190,26 +174,6 @@ class MainActivity: FlutterActivity() {
} }
startActivityForResult(intent, FILEPICKER_REQUEST_CODE) startActivityForResult(intent, FILEPICKER_REQUEST_CODE)
return return
} else if (call.method == "ExportPreviewedFile") {
this.exportFromPath = argmap["Path"] ?: ""
val suggestion = argmap["FileName"] ?: "filename.ext"
var imgType = "jpeg"
if (suggestion.endsWith("png")) {
imgType = "png"
} else if (suggestion.endsWith("webp")) {
imgType = "webp"
} else if (suggestion.endsWith("bmp")) {
imgType = "bmp"
} else if (suggestion.endsWith("gif")) {
imgType = "gif"
}
val intent = Intent(Intent.ACTION_CREATE_DOCUMENT).apply {
addCategory(Intent.CATEGORY_OPENABLE)
type = "image/" + imgType
putExtra(Intent.EXTRA_TITLE, suggestion)
}
startActivityForResult(intent, PREVIEW_EXPORT_REQUEST_CODE)
return
} }
// ...otherwise fallthru to a normal ffi method call (and return the result using the result callback) // ...otherwise fallthru to a normal ffi method call (and return the result using the result callback)

View File

@ -10,14 +10,14 @@ abstract class Cwtch {
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
Future<void> ReconnectCwtchForeground(); Future<void> ReconnectCwtchForeground();
// ignore: non_constant_identifier_names
void SelectProfile(String onion);
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void CreateProfile(String nick, String pass); void CreateProfile(String nick, String pass);
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void LoadProfiles(String pass); void LoadProfiles(String pass);
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void DeleteProfile(String profile, String pass); void DeleteProfile(String onion, String pass);
// ignore: non_constant_identifier_names
void ChangePassword(String profile, String pass, String newpass, String newpassAgain);
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void ResetTor(); void ResetTor();
@ -51,16 +51,12 @@ abstract class Cwtch {
void ShareFile(String profile, int handle, String filepath); void ShareFile(String profile, int handle, String filepath);
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void DownloadFile(String profile, int handle, String filepath, String manifestpath, String filekey); void DownloadFile(String profile, int handle, String filepath, String manifestpath, String filekey);
// android-only
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void CreateDownloadableFile(String profile, int handle, String filenameSuggestion, String filekey); void CreateDownloadableFile(String profile, int handle, String filenameSuggestion, String filekey);
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void CheckDownloadStatus(String profile, String fileKey); void CheckDownloadStatus(String profile, String fileKey);
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void VerifyOrResumeDownload(String profile, int handle, String filekey); void VerifyOrResumeDownload(String profile, int handle, String filekey);
// android-only
// ignore: non_constant_identifier_names
void ExportPreviewedFile(String sourceFile, String suggestion);
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void ArchiveConversation(String profile, int handle); void ArchiveConversation(String profile, int handle);
@ -73,11 +69,12 @@ abstract class Cwtch {
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void ImportBundle(String profile, String bundle); void ImportBundle(String profile, String bundle);
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void RejectInvite(String profileOnion, int groupHandle);
// ignore: non_constant_identifier_names
void SetProfileAttribute(String profile, String key, String val); void SetProfileAttribute(String profile, String key, String val);
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void SetConversationAttribute(String profile, int conversation, String key, String val); void SetConversationAttribute(String profile, int contact, String key, String val);
// ignore: non_constant_identifier_names
void SetMessageAttribute(String profile, int conversation, int channel, int message, String key, String val);
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void LoadServers(String password); void LoadServers(String password);
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
@ -100,8 +97,5 @@ abstract class Cwtch {
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void Shutdown(); void Shutdown();
// non-ffi
String defaultDownloadPath();
void dispose(); void dispose();
} }

View File

@ -1,5 +1,4 @@
import 'dart:convert'; import 'dart:convert';
import 'package:cwtch/main.dart';
import 'package:cwtch/models/message.dart'; import 'package:cwtch/models/message.dart';
import 'package:cwtch/models/profileservers.dart'; import 'package:cwtch/models/profileservers.dart';
import 'package:cwtch/models/servers.dart'; import 'package:cwtch/models/servers.dart';
@ -36,7 +35,7 @@ class CwtchNotifier {
} }
void handleMessage(String type, dynamic data) { void handleMessage(String type, dynamic data) {
//EnvironmentConfig.debugLog("NewEvent $type $data"); EnvironmentConfig.debugLog("NewEvent $type $data");
switch (type) { switch (type) {
case "CwtchStarted": case "CwtchStarted":
appState.SetCwtchInit(); appState.SetCwtchInit();
@ -79,21 +78,16 @@ class CwtchNotifier {
server.setRunning(data["Intent"] == "running"); server.setRunning(data["Intent"] == "running");
} }
break; break;
case "ServerStatsUpdate":
EnvironmentConfig.debugLog("ServerStatsUpdate $data");
var totalMessages = int.parse(data["TotalMessages"]);
var connections = int.parse(data["Connections"]);
serverListState.updateServerStats(data["Identity"], totalMessages, connections);
break;
case "GroupCreated": case "GroupCreated":
// Retrieve Server Status from Cache... // Retrieve Server Status from Cache...
String status = ""; String status = "";
RemoteServerInfoState? serverInfoState = profileCN.getProfile(data["ProfileOnion"])?.serverList.getServer(data["GroupServer"]); RemoteServerInfoState? serverInfoState = profileCN.getProfile(data["ProfileOnion"])?.serverList.getServer(data["GroupServer"]);
if (serverInfoState != null) { if (serverInfoState != null) {
status = serverInfoState.status; status = serverInfoState.status;
} }
if (profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(int.parse(data["ConversationID"])) == null) { if (profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["GroupID"]) == null) {
profileCN.getProfile(data["ProfileOnion"])?.contactList.add(ContactInfoState(data["ProfileOnion"], int.parse(data["ConversationID"]), data["GroupID"], profileCN.getProfile(data["ProfileOnion"])?.contactList.add(ContactInfoState(data["ProfileOnion"], data["ConversationID"], data["GroupID"],
authorization: ContactAuthorization.approved, authorization: ContactAuthorization.approved,
imagePath: data["PicturePath"], imagePath: data["PicturePath"],
nickname: data["GroupName"], nickname: data["GroupName"],
@ -101,7 +95,7 @@ class CwtchNotifier {
server: data["GroupServer"], server: data["GroupServer"],
isGroup: true, isGroup: true,
lastMessageTime: DateTime.now())); lastMessageTime: DateTime.now()));
profileCN.getProfile(data["ProfileOnion"])?.contactList.updateLastMessageTime(int.parse(data["ConversationID"]), DateTime.now()); profileCN.getProfile(data["ProfileOnion"])?.contactList.updateLastMessageTime(data["GroupID"], DateTime.now());
} }
break; break;
case "PeerDeleted": case "PeerDeleted":
@ -137,29 +131,19 @@ class CwtchNotifier {
case "NewMessageFromPeer": case "NewMessageFromPeer":
notificationManager.notify("New Message From Peer!"); notificationManager.notify("New Message From Peer!");
var identifier = int.parse(data["ConversationID"]); var identifier = int.parse(data["ConversationID"]);
var messageID = int.parse(data["Index"]); if (appState.selectedProfile != data["ProfileOnion"] || appState.selectedConversation != identifier) {
var timestamp = DateTime.tryParse(data['TimestampReceived'])!; profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier)!.unreadMessages++;
var senderHandle = data['RemotePeer']; } else {
var senderImage = data['Picture']; profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier)!.newMarker++;
var isAuto = data['Auto'] == "true"; }
profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier)!.totalMessages++;
profileCN.getProfile(data["ProfileOnion"])?.contactList.updateLastMessageTime(identifier, DateTime.now());
// We might not have received a contact created for this contact yet... // We only ever see messages from authenticated peers.
// In that case the **next** event we receive will actually update these values... // If the contact is marked as offline then override this - can happen when the contact is removed from the front
if (profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier) != null) { // end during syncing.
if (appState.selectedProfile != data["ProfileOnion"] || appState.selectedConversation != identifier) { if (profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier)!.isOnline() == false) {
profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier)!.unreadMessages++; profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier)!.status = "Authenticated";
} else {
profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier)!.newMarker++;
}
profileCN.getProfile(data["ProfileOnion"])?.contactList.updateLastMessageTime(identifier, DateTime.now());
profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier)!.updateMessageCache(identifier, messageID, timestamp, senderHandle, senderImage, isAuto, data["Data"]);
// We only ever see messages from authenticated peers.
// If the contact is marked as offline then override this - can happen when the contact is removed from the front
// end during syncing.
if (profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier)!.isOnline() == false) {
profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier)!.status = "Authenticated";
}
} }
break; break;
@ -167,42 +151,38 @@ class CwtchNotifier {
// We don't use these anymore, IndexedAcknowledgement is more suited to the UI front end... // We don't use these anymore, IndexedAcknowledgement is more suited to the UI front end...
break; break;
case "IndexedAcknowledgement": case "IndexedAcknowledgement":
var conversation = int.parse(data["ConversationID"]); var messageID = data["Index"];
var messageID = int.parse(data["Index"]); var identifier = int.parse(data["ConversationID"]);
var idx = identifier.toString() + messageID;
var contact = profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(conversation);
// We return -1 for protocol message acks if there is no message // We return -1 for protocol message acks if there is no message
if (messageID == -1) break; if (idx == "-1") break;
var key = contact!.getMessageKeyOrFail(conversation, messageID); var key = profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier)!.getMessageKey(idx);
if (key == null) break; if (key == null) break;
try { try {
var message = Provider.of<MessageMetadata>(key.currentContext!, listen: false); var message = Provider.of<MessageMetadata>(key.currentContext!, listen: false);
message.ackd = true; if (message == null) break;
// We only ever see acks from authenticated peers. // We only ever see acks from authenticated peers.
// If the contact is marked as offline then override this - can happen when the contact is removed from the front // If the contact is marked as offline then override this - can happen when the contact is removed from the front
// end during syncing. // end during syncing.
if (profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(conversation)!.isOnline() == false) { if (profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier)!.isOnline() == false) {
profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(conversation)!.status = "Authenticated"; profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier)!.status = "Authenticated";
} }
profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(conversation)!.ackCache(messageID); message.ackd = true;
} catch (e) { } catch (e) {
// ignore, most likely cause is the key got optimized out... // ignore, we received an ack for a message that hasn't loaded onto the screen yet...
// the protocol was faster than the ui....yay?
} }
break; break;
case "NewMessageFromGroup": case "NewMessageFromGroup":
var identifier = int.parse(data["ConversationID"]); var identifier = int.parse(data["ConversationID"]);
if (data["ProfileOnion"] != data["RemotePeer"]) { if (data["ProfileOnion"] != data["RemotePeer"]) {
var idx = int.parse(data["Index"]); var idx = int.parse(data["Index"]);
var senderHandle = data['RemotePeer'];
var senderImage = data['Picture'];
var timestampSent = DateTime.tryParse(data['TimestampSent'])!;
var currentTotal = profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier)!.totalMessages; var currentTotal = profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier)!.totalMessages;
var isAuto = data['Auto'] == "true";
// Only bother to do anything if we know about the group and the provided index is greater than our current total... // Only bother to do anything if we know about the group and the provided index is greater than our current total...
if (currentTotal != null && idx >= currentTotal) { if (currentTotal != null && idx >= currentTotal) {
profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier)!.updateMessageCache(identifier, idx, timestampSent, senderHandle, senderImage, isAuto, data["Data"]); profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier)!.totalMessages = idx + 1;
//if not currently open //if not currently open
if (appState.selectedProfile != data["ProfileOnion"] || appState.selectedConversation != identifier) { if (appState.selectedProfile != data["ProfileOnion"] || appState.selectedConversation != identifier) {
@ -211,6 +191,7 @@ class CwtchNotifier {
profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier)!.newMarker++; profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier)!.newMarker++;
} }
var timestampSent = DateTime.tryParse(data['TimestampSent'])!;
// TODO: There are 2 timestamps associated with a new group message - time sent and time received. // TODO: There are 2 timestamps associated with a new group message - time sent and time received.
// Sent refers to the time a profile alleges they sent a message // Sent refers to the time a profile alleges they sent a message
// Received refers to the time we actually saw the message from the server // Received refers to the time we actually saw the message from the server
@ -225,18 +206,52 @@ class CwtchNotifier {
notificationManager.notify("New Message From Group!"); notificationManager.notify("New Message From Group!");
} }
} else { } else {
// This is dealt with by IndexedAcknowledgment // from me (already displayed - do not update counter)
EnvironmentConfig.debugLog("new message from group from yourself - this should not happen"); var idx = data["Signature"];
var key = profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier)?.getMessageKey(idx);
if (key == null) break;
try {
var message = Provider.of<MessageMetadata>(key.currentContext!, listen: false);
if (message == null) break;
message.ackd = true;
} catch (e) {
// ignore, we likely have an old key that has been replaced with an actual signature
}
} }
break; break;
case "MessageCounterResync":
var contactHandle = data["RemotePeer"];
if (contactHandle == null || contactHandle == "") contactHandle = data["GroupID"];
var total = int.parse(data["Data"]);
if (total != profileCN.getProfile(data["Identity"])?.contactList.findContact(contactHandle)!.totalMessages) {
profileCN.getProfile(data["Identity"])?.contactList.findContact(contactHandle)!.totalMessages = total;
}
break;
case "SendMessageToPeerError":
// Ignore
break;
case "IndexedFailure": case "IndexedFailure":
var identifier = int.parse(data["ConversationID"]); var idx = data["Index"];
var contact = profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(identifier); var key = profileCN.getProfile(data["ProfileOnion"])?.contactList.findContact(data["RemotePeer"])?.getMessageKey(idx);
var idx = int.parse(data["Index"]); try {
var key = contact?.getMessageKeyOrFail(contact.identifier, idx); var message = Provider.of<MessageMetadata>(key!.currentContext!, listen: false);
if (key != null) {
var message = Provider.of<MessageMetadata>(key.currentContext!, listen: false);
message.error = true; message.error = true;
} catch (e) {
// ignore, we likely have an old key that has been replaced with an actual signature
}
break;
case "SendMessageToGroupError":
// from me (already displayed - do not update counter)
EnvironmentConfig.debugLog("SendMessageToGroupError");
var idx = data["Signature"];
var key = profileCN.getProfile(data["ProfileOnion"])?.contactList.findContact(data["GroupID"])!.getMessageKey(idx);
if (key == null) break;
try {
var message = Provider.of<MessageMetadata>(key.currentContext!, listen: false);
if (message == null) break;
message.error = true;
} catch (e) {
// ignore, we likely have an old key that has been replaced with an actual signature
} }
break; break;
case "AppError": case "AppError":
@ -274,6 +289,7 @@ class CwtchNotifier {
profileCN.getProfile(data["ProfileOnion"])?.replaceServers(data["ServerList"]); profileCN.getProfile(data["ProfileOnion"])?.replaceServers(data["ServerList"]);
break; break;
case "NewGroup": case "NewGroup":
EnvironmentConfig.debugLog("new group");
String invite = data["GroupInvite"].toString(); String invite = data["GroupInvite"].toString();
if (invite.startsWith("torv3")) { if (invite.startsWith("torv3")) {
String inviteJson = new String.fromCharCodes(base64Decode(invite.substring(5))); String inviteJson = new String.fromCharCodes(base64Decode(invite.substring(5)));
@ -287,8 +303,7 @@ class CwtchNotifier {
} }
if (profileCN.getProfile(data["ProfileOnion"])?.contactList.findContact(groupInvite["GroupID"]) == null) { if (profileCN.getProfile(data["ProfileOnion"])?.contactList.findContact(groupInvite["GroupID"]) == null) {
var identifier = int.parse(data["ConversationID"]); profileCN.getProfile(data["ProfileOnion"])?.contactList.add(ContactInfoState(data["ProfileOnion"], data["ConversationID"], groupInvite["GroupID"],
profileCN.getProfile(data["ProfileOnion"])?.contactList.add(ContactInfoState(data["ProfileOnion"], identifier, groupInvite["GroupID"],
authorization: ContactAuthorization.approved, authorization: ContactAuthorization.approved,
imagePath: data["PicturePath"], imagePath: data["PicturePath"],
nickname: groupInvite["GroupName"], nickname: groupInvite["GroupName"],
@ -296,12 +311,19 @@ class CwtchNotifier {
status: status, status: status,
isGroup: true, isGroup: true,
lastMessageTime: DateTime.fromMillisecondsSinceEpoch(0))); lastMessageTime: DateTime.fromMillisecondsSinceEpoch(0)));
profileCN.getProfile(data["ProfileOnion"])?.contactList.updateLastMessageTime(identifier, DateTime.fromMillisecondsSinceEpoch(0)); profileCN.getProfile(data["ProfileOnion"])?.contactList.updateLastMessageTime(groupInvite["GroupID"], DateTime.fromMillisecondsSinceEpoch(0));
} }
} }
break; break;
case "AcceptGroupInvite":
EnvironmentConfig.debugLog("accept group invite");
profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["GroupID"])!.authorization = ContactAuthorization.approved;
profileCN.getProfile(data["ProfileOnion"])?.contactList.updateLastMessageTime(data["GroupID"], DateTime.fromMillisecondsSinceEpoch(0));
break;
case "ServerStateChange": case "ServerStateChange":
// Update the Server Cache // Update the Server Cache
EnvironmentConfig.debugLog("server state changes $data");
profileCN.getProfile(data["ProfileOnion"])?.updateServerStatusCache(data["GroupServer"], data["ConnectionState"]); profileCN.getProfile(data["ProfileOnion"])?.updateServerStatusCache(data["GroupServer"], data["ConnectionState"]);
profileCN.getProfile(data["ProfileOnion"])?.contactList.contacts.forEach((contact) { profileCN.getProfile(data["ProfileOnion"])?.contactList.contacts.forEach((contact) {
if (contact.isGroup == true && contact.server == data["GroupServer"]) { if (contact.isGroup == true && contact.server == data["GroupServer"]) {
@ -310,23 +332,42 @@ class CwtchNotifier {
}); });
profileCN.getProfile(data["ProfileOnion"])?.contactList.resort(); profileCN.getProfile(data["ProfileOnion"])?.contactList.resort();
break; break;
case "NewRetValMessageFromPeer": case "SetGroupAttribute":
if (data["Path"] == "profile.name") { if (data["Key"] == "local.name") {
if (data["Data"].toString().trim().length > 0) { if (profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["GroupID"]) != null) {
// Update locally on the UI... profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["GroupID"])!.nickname = data["Data"];
if (profileCN.getProfile(data["ProfileOnion"])?.contactList.findContact(data["RemotePeer"]) != null) { }
profileCN.getProfile(data["ProfileOnion"])?.contactList.findContact(data["RemotePeer"])!.nickname = data["Data"]; } else if (data["Key"] == "local.archived") {
} if (profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["GroupID"]) != null) {
profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["GroupID"])!.isArchived = data["Data"] == "true";
} }
} else if (data['Path'] == "profile.picture") {
// Not yet..
} else { } else {
EnvironmentConfig.debugLog("unhandled ret val event: ${data['Path']}"); EnvironmentConfig.debugLog("unhandled set group attribute event: ${data['Key']}");
} }
break; break;
case "ManifestSizeReceived": case "SetPeerAttribute":
if (!profileCN.getProfile(data["ProfileOnion"])!.downloadActive(data["FileKey"])) { if (data["Key"] == "local.name") {
profileCN.getProfile(data["ProfileOnion"])?.downloadUpdate(data["FileKey"], 0, 1); if (profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["RemotePeer"]) != null) {
profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["RemotePeer"])!.nickname = data["Data"];
}
} else if (data["Key"] == "local.archived") {
if (profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["RemotePeer"]) != null) {
profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["RemotePeer"])!.isArchived = data["Data"] == "true";
}
} else if (data["Key"] == "LastKnowSignature") {
// group syncing information that isn't relevant to the UI...
} else {
EnvironmentConfig.debugLog("unhandled set peer attribute event: ${data['Key']}");
}
break;
case "NewRetValMessageFromPeer":
if (data["Path"] == "name" && data["Data"].toString().trim().length > 0) {
// Update locally on the UI...
if (profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["RemotePeer"]) != null) {
profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["RemotePeer"])!.nickname = data["Data"];
}
} else {
EnvironmentConfig.debugLog("unhandled peer attribute event: ${data['Path']}");
} }
break; break;
case "ManifestSaved": case "ManifestSaved":
@ -343,14 +384,6 @@ class CwtchNotifier {
case "FileDownloaded": case "FileDownloaded":
profileCN.getProfile(data["ProfileOnion"])?.downloadMarkFinished(data["FileKey"], data["FilePath"]); profileCN.getProfile(data["ProfileOnion"])?.downloadMarkFinished(data["FileKey"], data["FilePath"]);
break; break;
case "ImportingProfileEvent":
break;
case "StartingStorageMigration":
appState.SetModalState(ModalState.storageMigration);
break;
case "DoneStorageMigration":
appState.SetModalState(ModalState.none);
break;
default: default:
EnvironmentConfig.debugLog("unhandled event: $type"); EnvironmentConfig.debugLog("unhandled event: $type");
} }

View File

@ -84,9 +84,6 @@ typedef VoidFromStringIntStringFn = void Function(Pointer<Utf8>, int, int, Point
typedef void_from_string_int_string_string_function = Void Function(Pointer<Utf8>, Int32, Int32, Pointer<Utf8>, Int32, Pointer<Utf8>, Int32); typedef void_from_string_int_string_string_function = Void Function(Pointer<Utf8>, Int32, Int32, Pointer<Utf8>, Int32, Pointer<Utf8>, Int32);
typedef VoidFromStringIntStringStringFn = void Function(Pointer<Utf8>, int, int, Pointer<Utf8>, int, Pointer<Utf8>, int); typedef VoidFromStringIntStringStringFn = void Function(Pointer<Utf8>, int, int, Pointer<Utf8>, int, Pointer<Utf8>, int);
typedef void_from_string_int_int_int_string_string_function = Void Function(Pointer<Utf8>, Int32, Int32, Int32, Int32, Pointer<Utf8>, Int32, Pointer<Utf8>, Int32);
typedef VoidFromStringIntIntIntStringStringFn = void Function(Pointer<Utf8>, int, int, int, int, Pointer<Utf8>, int, Pointer<Utf8>, int);
typedef void_from_string_int_int_function = Void Function(Pointer<Utf8>, Int32, Int32, Int32); typedef void_from_string_int_int_function = Void Function(Pointer<Utf8>, Int32, Int32, Int32);
typedef VoidFromStringIntIntFn = void Function(Pointer<Utf8>, int, int, int); typedef VoidFromStringIntIntFn = void Function(Pointer<Utf8>, int, int, int);
@ -115,13 +112,13 @@ class CwtchFfi implements Cwtch {
} }
CwtchFfi(CwtchNotifier _cwtchNotifier) { CwtchFfi(CwtchNotifier _cwtchNotifier) {
String libraryPath = getLibraryPath(); String library_path = getLibraryPath();
if (libraryPath == UNSUPPORTED_OS) { if (library_path == UNSUPPORTED_OS) {
print("OS ${Platform.operatingSystem} not supported by cwtch/ffi"); print("OS ${Platform.operatingSystem} not supported by cwtch/ffi");
// emergency, ideally the app stays on splash and just posts the error till user closes // emergency, ideally the app stays on splash and just posts the error till user closes
exit(0); exit(0);
} }
library = DynamicLibrary.open(libraryPath); library = DynamicLibrary.open(library_path);
cwtchNotifier = _cwtchNotifier; cwtchNotifier = _cwtchNotifier;
} }
@ -261,6 +258,16 @@ class CwtchFfi implements Cwtch {
} }
} }
// ignore: non_constant_identifier_names
void SelectProfile(String onion) async {
var selectProfileC = library.lookup<NativeFunction<get_json_blob_string_function>>("c_SelectProfile");
// ignore: non_constant_identifier_names
final SelectProfile = selectProfileC.asFunction<GetJsonBlobStringFn>();
final ut8Onion = onion.toNativeUtf8();
SelectProfile(ut8Onion, ut8Onion.length);
malloc.free(ut8Onion);
}
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void CreateProfile(String nick, String pass) { void CreateProfile(String nick, String pass) {
var createProfileC = library.lookup<NativeFunction<void_from_string_string_function>>("c_CreateProfile"); var createProfileC = library.lookup<NativeFunction<void_from_string_string_function>>("c_CreateProfile");
@ -402,11 +409,6 @@ class CwtchFfi implements Cwtch {
// android only - do nothing // android only - do nothing
} }
// ignore: non_constant_identifier_names
void ExportPreviewedFile(String sourceFile, String suggestion) {
// android only - do nothing
}
@override @override
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void CheckDownloadStatus(String profileOnion, String fileKey) { void CheckDownloadStatus(String profileOnion, String fileKey) {
@ -455,6 +457,17 @@ class CwtchFfi implements Cwtch {
malloc.free(u2); malloc.free(u2);
} }
@override
// ignore: non_constant_identifier_names
void RejectInvite(String profileOnion, int groupHandle) {
var rejectInvite = library.lookup<NativeFunction<string_int_to_void_function>>("c_RejectInvite");
// ignore: non_constant_identifier_names
final RejectInvite = rejectInvite.asFunction<VoidFromStringIntFn>();
final u1 = profileOnion.toNativeUtf8();
RejectInvite(u1, u1.length, groupHandle);
malloc.free(u1);
}
@override @override
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void CreateGroup(String profileOnion, String server, String groupName) { void CreateGroup(String profileOnion, String server, String groupName) {
@ -536,21 +549,6 @@ class CwtchFfi implements Cwtch {
malloc.free(u4); malloc.free(u4);
} }
@override
// ignore: non_constant_identifier_names
void SetMessageAttribute(String profile, int conversation, int channel, int message, String key, String val) {
var setMessageAttribute = library.lookup<NativeFunction<void_from_string_int_int_int_string_string_function>>("c_SetMessageAttribute");
// ignore: non_constant_identifier_names
final SetMessageAttribute = setMessageAttribute.asFunction<VoidFromStringIntIntIntStringStringFn>();
final u1 = profile.toNativeUtf8();
final u3 = key.toNativeUtf8();
final u4 = val.toNativeUtf8();
SetMessageAttribute(u1, u1.length, conversation, channel, message, u3, u3.length, u4, u4.length);
malloc.free(u1);
malloc.free(u3);
malloc.free(u4);
}
@override @override
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void LoadServers(String password) { void LoadServers(String password) {
@ -698,13 +696,6 @@ class CwtchFfi implements Cwtch {
} }
@override @override
String defaultDownloadPath() {
Map<String, String> envVars = Platform.environment;
return path.join(envVars[Platform.isWindows ? 'UserProfile' : 'HOME']!, "Downloads");
}
@override
// ignore: non_constant_identifier_names
Future<String> GetMessageByID(String profile, int handle, int index) async { Future<String> GetMessageByID(String profile, int handle, int index) async {
var getMessageC = library.lookup<NativeFunction<get_json_blob_from_str_int_int_function>>("c_GetMessageByID"); var getMessageC = library.lookup<NativeFunction<get_json_blob_from_str_int_int_function>>("c_GetMessageByID");
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
@ -716,21 +707,4 @@ class CwtchFfi implements Cwtch {
malloc.free(utf8profile); malloc.free(utf8profile);
return jsonMessage; return jsonMessage;
} }
@override
// ignore: non_constant_identifier_names
void ChangePassword(String profile, String pass, String newpass, String newpassAgain) {
var changePasswordC = library.lookup<NativeFunction<void_from_string_string_string_string_function>>("c_ChangePassword");
// ignore: non_constant_identifier_names
final ChangePasswordFn = changePasswordC.asFunction<VoidFromStringStringStringStringFn>();
final utf8profile = profile.toNativeUtf8();
final utf8pass = pass.toNativeUtf8();
final utf8newpass = newpass.toNativeUtf8();
final utf8newpasssagain = newpassAgain.toNativeUtf8();
ChangePasswordFn(utf8profile, utf8profile.length, utf8pass, utf8pass.length, utf8newpass, utf8newpass.length, utf8newpasssagain, utf8newpasssagain.length);
malloc.free(utf8profile);
malloc.free(utf8pass);
malloc.free(utf8newpass);
malloc.free(utf8newpasssagain);
}
} }

View File

@ -28,7 +28,6 @@ class CwtchGomobile implements Cwtch {
late Future<dynamic> androidLibraryDir; late Future<dynamic> androidLibraryDir;
late Future<dynamic> androidHomeDirectory; late Future<dynamic> androidHomeDirectory;
String androidHomeDirectoryStr = "";
late CwtchNotifier cwtchNotifier; late CwtchNotifier cwtchNotifier;
CwtchGomobile(CwtchNotifier _cwtchNotifier) { CwtchGomobile(CwtchNotifier _cwtchNotifier) {
@ -45,8 +44,7 @@ class CwtchGomobile implements Cwtch {
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
Future<void> Start() async { Future<void> Start() async {
print("gomobile.dart: Start()..."); print("gomobile.dart: Start()...");
androidHomeDirectoryStr = (await androidHomeDirectory).path; var cwtchDir = path.join((await androidHomeDirectory).path, ".cwtch");
var cwtchDir = path.join(androidHomeDirectoryStr, ".cwtch");
if (EnvironmentConfig.BUILD_VER == dev_version) { if (EnvironmentConfig.BUILD_VER == dev_version) {
cwtchDir = path.join(cwtchDir, "dev"); cwtchDir = path.join(cwtchDir, "dev");
} }
@ -68,6 +66,11 @@ class CwtchGomobile implements Cwtch {
cwtchNotifier.handleMessage(call.method, obj); cwtchNotifier.handleMessage(call.method, obj);
} }
// ignore: non_constant_identifier_names
void SelectProfile(String onion) {
cwtchPlatform.invokeMethod("SelectProfile", {"profile": onion});
}
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void CreateProfile(String nick, String pass) { void CreateProfile(String nick, String pass) {
cwtchPlatform.invokeMethod("CreateProfile", {"nick": nick, "pass": pass}); cwtchPlatform.invokeMethod("CreateProfile", {"nick": nick, "pass": pass});
@ -84,13 +87,13 @@ class CwtchGomobile implements Cwtch {
} }
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
Future<dynamic> GetMessage(String profile, int conversation, int index) { Future<dynamic> GetMessage(String profile, int handle, int index) {
return cwtchPlatform.invokeMethod("GetMessage", {"ProfileOnion": profile, "conversation": conversation, "index": index}); return cwtchPlatform.invokeMethod("GetMessage", {"profile": profile, "contact": handle, "index": index});
} }
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
Future<dynamic> GetMessageByID(String profile, int conversation, int id) { Future<dynamic> GetMessageByID(String profile, int handle, int index) {
return cwtchPlatform.invokeMethod("GetMessageByID", {"ProfileOnion": profile, "conversation": conversation, "id": id}); return cwtchPlatform.invokeMethod("GetMessageByID", {"profile": profile, "contact": handle, "index": index});
} }
@override @override
@ -110,51 +113,43 @@ class CwtchGomobile implements Cwtch {
@override @override
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void AcceptContact(String profileOnion, int conversation) { void AcceptContact(String profileOnion, int contactHandle) {
cwtchPlatform.invokeMethod("AcceptContact", {"ProfileOnion": profileOnion, "conversation": conversation}); cwtchPlatform.invokeMethod("AcceptContact", {"ProfileOnion": profileOnion, "handle": contactHandle});
} }
@override @override
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void BlockContact(String profileOnion, int conversation) { void BlockContact(String profileOnion, int contactHandle) {
cwtchPlatform.invokeMethod("BlockContact", {"ProfileOnion": profileOnion, "conversation": conversation}); cwtchPlatform.invokeMethod("BlockContact", {"ProfileOnion": profileOnion, "handle": contactHandle});
} }
@override @override
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void SendMessage(String profileOnion, int conversation, String message) { void SendMessage(String profileOnion, int contactHandle, String message) {
cwtchPlatform.invokeMethod("SendMessage", {"ProfileOnion": profileOnion, "conversation": conversation, "message": message}); cwtchPlatform.invokeMethod("SendMessage", {"ProfileOnion": profileOnion, "handle": contactHandle, "message": message});
} }
@override @override
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void SendInvitation(String profileOnion, int conversation, int target) { void SendInvitation(String profileOnion, int contactHandle, int target) {
cwtchPlatform.invokeMethod("SendInvitation", {"ProfileOnion": profileOnion, "conversation": conversation, "target": target}); cwtchPlatform.invokeMethod("SendInvitation", {"ProfileOnion": profileOnion, "handle": contactHandle, "target": target});
} }
@override @override
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void ShareFile(String profileOnion, int conversation, String filepath) { void ShareFile(String profileOnion, int contactHandle, String filepath) {
cwtchPlatform.invokeMethod("ShareFile", {"ProfileOnion": profileOnion, "conversation": conversation, "filepath": filepath}); cwtchPlatform.invokeMethod("ShareFile", {"ProfileOnion": profileOnion, "handle": contactHandle, "filepath": filepath});
} }
@override @override
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void DownloadFile(String profileOnion, int conversation, String filepath, String manifestpath, String filekey) { void DownloadFile(String profileOnion, int contactHandle, String filepath, String manifestpath, String filekey) {
cwtchPlatform.invokeMethod("DownloadFile", {"ProfileOnion": profileOnion, "conversation": conversation, "filepath": filepath, "manifestpath": manifestpath, "filekey": filekey}); cwtchPlatform.invokeMethod("DownloadFile", {"ProfileOnion": profileOnion, "handle": contactHandle, "filepath": filepath, "manifestpath": manifestpath, "filekey": filekey});
} }
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void CreateDownloadableFile(String profileOnion, int conversation, String filenameSuggestion, String filekey) { void CreateDownloadableFile(String profileOnion, int contactHandle, String filenameSuggestion, String filekey) {
cwtchPlatform.invokeMethod("CreateDownloadableFile", {"ProfileOnion": profileOnion, "conversation": conversation, "filename": filenameSuggestion, "filekey": filekey}); cwtchPlatform.invokeMethod("CreateDownloadableFile", {"ProfileOnion": profileOnion, "handle": contactHandle, "filename": filenameSuggestion, "filekey": filekey});
}
// ignore: non_constant_identifier_names
void ExportPreviewedFile(String sourceFile, String suggestion) {
cwtchPlatform.invokeMethod("ExportPreviewedFile", {
"Path": sourceFile,
"FileName": suggestion,
});
} }
@override @override
@ -165,8 +160,8 @@ class CwtchGomobile implements Cwtch {
@override @override
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void VerifyOrResumeDownload(String profileOnion, int conversation, String filekey) { void VerifyOrResumeDownload(String profileOnion, int contactHandle, String filekey) {
cwtchPlatform.invokeMethod("VerifyOrResumeDownload", {"ProfileOnion": profileOnion, "conversation": conversation, "filekey": filekey}); cwtchPlatform.invokeMethod("VerifyOrResumeDownload", {"ProfileOnion": profileOnion, "handle": contactHandle, "filekey": filekey});
} }
@override @override
@ -181,6 +176,18 @@ class CwtchGomobile implements Cwtch {
cwtchPlatform.invokeMethod("ImportBundle", {"ProfileOnion": profileOnion, "bundle": bundle}); cwtchPlatform.invokeMethod("ImportBundle", {"ProfileOnion": profileOnion, "bundle": bundle});
} }
@override
// ignore: non_constant_identifier_names
void SetGroupAttribute(String profileOnion, String groupHandle, String key, String value) {
cwtchPlatform.invokeMethod("SetGroupAttribute", {"ProfileOnion": profileOnion, "groupHandle": groupHandle, "key": key, "value": value});
}
@override
// ignore: non_constant_identifier_names
void RejectInvite(String profileOnion, int groupHandle) {
cwtchPlatform.invokeMethod("RejectInvite", {"ProfileOnion": profileOnion, "groupHandle": groupHandle});
}
@override @override
void CreateGroup(String profileOnion, String server, String groupName) { void CreateGroup(String profileOnion, String server, String groupName) {
cwtchPlatform.invokeMethod("CreateGroup", {"ProfileOnion": profileOnion, "server": server, "groupName": groupName}); cwtchPlatform.invokeMethod("CreateGroup", {"ProfileOnion": profileOnion, "server": server, "groupName": groupName});
@ -188,14 +195,14 @@ class CwtchGomobile implements Cwtch {
@override @override
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void DeleteContact(String profileOnion, int conversation) { void DeleteContact(String profileOnion, int handle) {
cwtchPlatform.invokeMethod("DeleteContact", {"ProfileOnion": profileOnion, "conversation": conversation}); cwtchPlatform.invokeMethod("DeleteContact", {"ProfileOnion": profileOnion, "handle": handle});
} }
@override @override
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void ArchiveConversation(String profileOnion, int conversation) { void ArchiveConversation(String profileOnion, int contactHandle) {
cwtchPlatform.invokeMethod("ArchiveConversation", {"ProfileOnion": profileOnion, "conversation": conversation}); cwtchPlatform.invokeMethod("ArchiveConversation", {"ProfileOnion": profileOnion, "handle": contactHandle});
} }
@override @override
@ -206,8 +213,8 @@ class CwtchGomobile implements Cwtch {
@override @override
// ignore: non_constant_identifier_names // ignore: non_constant_identifier_names
void SetConversationAttribute(String profile, int conversation, String key, String val) { void SetConversationAttribute(String profile, int contact, String key, String val) {
cwtchPlatform.invokeMethod("SetContactAttribute", {"ProfileOnion": profile, "conversation": conversation, "Key": key, "Val": val}); cwtchPlatform.invokeMethod("SetContactAttribute", {"ProfileOnion": profile, "Contact": contact, "Key": key, "Val": val});
} }
@override @override
@ -271,22 +278,7 @@ class CwtchGomobile implements Cwtch {
} }
@override @override
Future GetMessageByContentHash(String profile, int conversation, String contentHash) { Future GetMessageByContentHash(String profile, int handle, String contentHash) {
return cwtchPlatform.invokeMethod("GetMessageByContentHash", {"ProfileOnion": profile, "conversation": conversation, "contentHash": contentHash}); return cwtchPlatform.invokeMethod("GetMessageByContentHash", {"profile": profile, "contact": handle, "contentHash": contentHash});
}
@override
void SetMessageAttribute(String profile, int conversation, int channel, int message, String key, String val) {
cwtchPlatform.invokeMethod("SetMessageAttribute", {"ProfileOnion": profile, "conversation": conversation, "Channel": channel, "Message": message, "Key": key, "Val": val});
}
@override
String defaultDownloadPath() {
return this.androidHomeDirectoryStr;
}
@override
void ChangePassword(String profile, String pass, String newpass, String newpassAgain) {
cwtchPlatform.invokeMethod("ChangePassword", {"ProfileOnion": profile, "OldPass": pass, "NewPass": newpass, "NewPassAgain": newpassAgain});
} }
} }

View File

@ -6,17 +6,12 @@ class ErrorHandler extends ChangeNotifier {
// Add Contact Specific Errors... // Add Contact Specific Errors...
static const String addContactErrorPrefix = "addcontact"; static const String addContactErrorPrefix = "addcontact";
static const String changePasswordErrorPrefix = "changepassword";
static const String invalidImportStringErrorType = "invalid_import_string"; static const String invalidImportStringErrorType = "invalid_import_string";
static const String contactAlreadyExistsErrorType = "contact_already_exists"; static const String contactAlreadyExistsErrorType = "contact_already_exists";
bool invalidImportStringError = false; bool invalidImportStringError = false;
bool contactAlreadyExistsError = false; bool contactAlreadyExistsError = false;
bool explicitAddContactSuccess = false; bool explicitAddContactSuccess = false;
// ChangePassword
bool changePasswordError = false;
bool explicitChangePasswordSuccess = false;
// Import Bundle Specific Errors // Import Bundle Specific Errors
static const String importBundleErrorPrefix = "importBundle"; static const String importBundleErrorPrefix = "importBundle";
bool importBundleError = false; bool importBundleError = false;
@ -44,9 +39,6 @@ class ErrorHandler extends ChangeNotifier {
deletedServerError = false; deletedServerError = false;
deletedServerSuccess = false; deletedServerSuccess = false;
changePasswordError = false;
explicitChangePasswordSuccess = false;
notifyListeners(); notifyListeners();
} }
@ -66,9 +58,6 @@ class ErrorHandler extends ChangeNotifier {
case deleteProfileErrorPrefix: case deleteProfileErrorPrefix:
handleDeleteProfileError(errorType); handleDeleteProfileError(errorType);
break; break;
case changePasswordErrorPrefix:
handleChangePasswordError(errorType);
break;
case deletedServerErrorPrefix: case deletedServerErrorPrefix:
handleDeletedServerError(errorType); handleDeletedServerError(errorType);
} }
@ -126,21 +115,6 @@ class ErrorHandler extends ChangeNotifier {
} }
} }
handleChangePasswordError(String errorType) {
// Reset add contact errors
changePasswordError = false;
explicitChangePasswordSuccess = false;
switch (errorType) {
case successErrorType:
explicitChangePasswordSuccess = true;
break;
default:
changePasswordError = true;
break;
}
}
handleDeletedServerError(String errorType) { handleDeletedServerError(String errorType) {
// reset // reset
deletedServerError = false; deletedServerError = false;

View File

@ -1,39 +1,6 @@
{ {
"@@locale": "de", "@@locale": "de",
"@@last_modified": "2021-12-20T09:20:03+01:00", "@@last_modified": "2021-11-11T01:02:08+01:00",
"msgAddToAccept": "Add this account to your contacts in order to accept this file.",
"btnSendFile": "Send File",
"msgConfirmSend": "Are you sure you want to send",
"msgFileTooBig": "File size cannot exceed 10 GB",
"storageMigrationModalMessage": "Migrating profiles to new storage format. This could take a few minutes...",
"loadingCwtch": "Loading Cwtch...",
"themeColorLabel": "Color Theme",
"themeNameNeon2": "Neon2",
"themeNameNeon1": "Neon1",
"themeNameMidnight": "Midnight",
"themeNameMermaid": "Mermaid",
"themeNamePumpkin": "Pumpkin",
"themeNameGhost": "Ghost",
"themeNameVampire": "Vampire",
"themeNameWitch": "Witch",
"themeNameCwtch": "Cwtch",
"settingDownloadFolder": "Download Folder",
"settingImagePreviewsDescription": "Images will be downloaded and previewed automatically. Please note that image previews can often lead to security vulnerabilities, and you should not enable this Experiment if you use Cwtch with untrusted contacts. Profile pictures are planned for Cwtch 1.6.",
"settingImagePreviews": "Image Previews and Profile Pictures",
"experimentClickableLinksDescription": "The clickable links experiment allows you to click on URLs shared in messages",
"enableExperimentClickableLinks": "Enable Clickable Links",
"serverConnectionsLabel": "Connection",
"serverTotalMessagesLabel": "Total Messages",
"serverMetricsLabel": "Server Metrics",
"manageKnownServersShort": "Servers",
"manageKnownServersLong": "Manage Known Servers",
"displayNameTooltip": "Please enter a display name",
"manageKnownServersButton": "Manage Known Servers",
"fieldDescriptionLabel": "Description",
"groupsOnThisServerLabel": "Groups I am in hosted on this server",
"importLocalServerButton": "Import %1",
"importLocalServerSelectText": "Select Local Server",
"importLocalServerLabel": "Import a locally hosted server",
"newMessagesLabel": "New Messages", "newMessagesLabel": "New Messages",
"localeRU": "Russian", "localeRU": "Russian",
"copyServerKeys": "Copy keys", "copyServerKeys": "Copy keys",
@ -41,8 +8,8 @@
"fileCheckingStatus": "Checking download status", "fileCheckingStatus": "Checking download status",
"fileInterrupted": "Interrupted", "fileInterrupted": "Interrupted",
"fileSavedTo": "Saved to", "fileSavedTo": "Saved to",
"encryptedServerDescription": "Encrypting a server with a password protects it from other people who may also use this device. Encrypted servers cannot be decrypted, displayed or accessed until the correct password is entered to unlock them.",
"plainServerDescription": "We recommend that you protect your Cwtch servers with a password. If you do not set a password on this server then anyone who has access to this device may be able to access information about this server, including sensitive cryptographic keys.", "plainServerDescription": "We recommend that you protect your Cwtch servers with a password. If you do not set a password on this server then anyone who has access to this device may be able to access information about this server, including sensitive cryptographic keys.",
"encryptedServerDescription": "Encrypting a server with a password protects it from other people who may also use this device. Encrypted servers cannot be decrypted, displayed or accessed until the correct password is entered to unlock them.",
"deleteServerConfirmBtn": "Really delete server", "deleteServerConfirmBtn": "Really delete server",
"deleteServerSuccess": "Successfully deleted server", "deleteServerSuccess": "Successfully deleted server",
"enterCurrentPasswordForDeleteServer": "Please enter current password to delete this server", "enterCurrentPasswordForDeleteServer": "Please enter current password to delete this server",
@ -65,8 +32,8 @@
"serverAddress": "Server Address", "serverAddress": "Server Address",
"editServerTitle": "Edit Server", "editServerTitle": "Edit Server",
"addServerTitle": "Add Server", "addServerTitle": "Add Server",
"downloadFileButton": "Herunterladen",
"titleManageProfilesShort": "Profiles", "titleManageProfilesShort": "Profiles",
"descriptionStreamerMode": "If turned on, this option makes the app more visually private for streaming or presenting with, for example, hiding profile and contact addresses",
"descriptionFileSharing": "The file sharing experiment allows you to send and receive files from Cwtch contacts and groups. Note that sharing a file with a group will result in members of that group connecting with you directly over Cwtch to download it.", "descriptionFileSharing": "The file sharing experiment allows you to send and receive files from Cwtch contacts and groups. Note that sharing a file with a group will result in members of that group connecting with you directly over Cwtch to download it.",
"settingFileSharing": "File Sharing", "settingFileSharing": "File Sharing",
"tooltipSendFile": "Send File", "tooltipSendFile": "Send File",
@ -75,12 +42,25 @@
"messageEnableFileSharing": "Enable the file sharing experiment to view this message.", "messageEnableFileSharing": "Enable the file sharing experiment to view this message.",
"labelFilesize": "Size", "labelFilesize": "Size",
"labelFilename": "Filename", "labelFilename": "Filename",
"downloadFileButton": "Herunterladen",
"openFolderButton": "Open Folder", "openFolderButton": "Open Folder",
"retrievingManifestMessage": "Retrieving file information...", "retrievingManifestMessage": "Retrieving file information...",
"descriptionStreamerMode": "If turned on, this option makes the app more visually private for streaming or presenting with, for example, hiding profile and contact addresses",
"streamerModeLabel": "Streamer\/Presentation Mode", "streamerModeLabel": "Streamer\/Presentation Mode",
"archiveConversation": "Archive this Conversation", "archiveConversation": "Archive this Conversation",
"profileOnionLabel": "Senden Sie diese Adresse an Peers, mit denen Sie sich verbinden möchten",
"addPeerTab": "Einen anderen Nutzer hinzufügen",
"addPeer": "Anderen Nutzer hinzufügen",
"peerNotOnline": "Der andere Nutzer ist offline. Die App kann momentan nicht verwendet werden.",
"peerBlockedMessage": "Anderer Nutzer ist blockiert",
"peerOfflineMessage": "Anderer Nutzer ist offline, Nachrichten können derzeit nicht zugestellt werden",
"blockBtn": "Anderen Nutzer blockieren",
"savePeerHistory": "Peer-Verlauf speichern",
"savePeerHistoryDescription": "Legt fest, ob ein mit dem anderen Nutzer verknüpfter Verlauf gelöscht werden soll oder nicht.",
"dontSavePeerHistory": "Verlauf mit anderem Nutzer löschen",
"unblockBtn": "Anderen Nutzer entsperren",
"blockUnknownLabel": "Unbekannte Peers blockieren",
"blockUnknownConnectionsEnabledDescription": "Connections from unknown contacts are blocked. You can change this in Settings", "blockUnknownConnectionsEnabledDescription": "Connections from unknown contacts are blocked. You can change this in Settings",
"networkStatusConnecting": "Verbinde zu Netzwerk und Peers ...",
"showMessageButton": "Show Message", "showMessageButton": "Show Message",
"blockedMessageMessage": "This message is from a profile you have blocked.", "blockedMessageMessage": "This message is from a profile you have blocked.",
"placeholderEnterMessage": "Type a message...", "placeholderEnterMessage": "Type a message...",
@ -100,31 +80,17 @@
"tooltipReplyToThisMessage": "Reply to this message", "tooltipReplyToThisMessage": "Reply to this message",
"tooltipRejectContactRequest": "Reject this contact request", "tooltipRejectContactRequest": "Reject this contact request",
"tooltipAcceptContactRequest": "Accept this contact request.", "tooltipAcceptContactRequest": "Accept this contact request.",
"experimentsEnabled": "Experimente aktiviert",
"malformedMessage": "Fehlerhafte Nachricht",
"contactSuggestion": "Dieser Kontaktvorschlag ist für: ",
"descriptionBlockUnknownConnections": "Falls aktiviert, wird diese Einstellung alle Verbindungen von Cwtch Usern autmoatisch schliessen, wenn sie nicht in deinen Kontakten sind.",
"descriptionExperimentsGroups": "Mit experimentellen Gruppen kann Cwtch über nicht vertrauenswürdige Serverinfrastruktur die Kommunikation mit mehr als einem Kontakt vereinfachen.",
"descriptionExperiments": "Experimentelle Cwtch Features sind optionale, opt-in Features für die andere Privatsphärenaspekte berücksichtigt werden als bei traditionellen 1:1 metadatenresistenten Chats, wie z. B. Gruppennachrichten, Bots usw.",
"networkStatusDisconnected": "Vom Internet getrennt, überprüfe deine Verbindung",
"yourServers": "Deine Server",
"yourProfiles": "Deine Profile",
"enterProfilePassword": "Gib ein Passwort ein, um deine Profile anzuzeigen",
"deleteConfirmLabel": "Gib LÖSCHEN ein um zu bestätigen",
"profileOnionLabel": "Senden Sie diese Adresse an Peers, mit denen Sie sich verbinden möchten",
"cycleColoursAndroid": "Klicken um Farbe zu wechseln.\nGedrückt halten zum zurücksetzen.",
"cycleMorphsDesktop": "Klicken um Morph zu wechseln.\nRechtsklick zum zurücksetzen.",
"cycleMorphsAndroid": "Klicken um Morph zu wechseln.\nGedrückt halten zum zurücksetzen.",
"pasteAddressToAddContact": "Adresse, Einladung oder Schlüssel hier hinzufügen, um einen Kontakt hinzuzufügen",
"notificationNewMessageFromGroup": "Neue Nachricht in einer Gruppe!", "notificationNewMessageFromGroup": "Neue Nachricht in einer Gruppe!",
"notificationNewMessageFromPeer": "Neue Nachricht von einem Kontakt!", "notificationNewMessageFromPeer": "Neue Nachricht von einem Kontakt!",
"tooltipHidePassword": "Password verstecken", "tooltipHidePassword": "Password verstecken",
"tooltipShowPassword": "Password anzeigen", "tooltipShowPassword": "Password anzeigen",
"serverNotSynced": "Neue Nachrichten abrufen (Dies kann eine Weile dauern...)",
"groupInviteSettingsWarning": "Du wurdest eingeladen einer Gruppe beizutreten! Bitte aktiviere das Gruppenchat Experiment in den Einstellungen um diese Einladung anzusehen.", "groupInviteSettingsWarning": "Du wurdest eingeladen einer Gruppe beizutreten! Bitte aktiviere das Gruppenchat Experiment in den Einstellungen um diese Einladung anzusehen.",
"shutdownCwtchAction": "Cwtch schliessen", "shutdownCwtchAction": "Cwtch schliessen",
"shutdownCwtchDialog": "Bist du sicher, dass du Cwtch schliessen möchtest? Alle Verbindungen werden geschlossen und die App wird beendet.", "shutdownCwtchDialog": "Bist du sicher, dass du Cwtch schliessen möchtest? Alle Verbindungen werden geschlossen und die App wird beendet.",
"shutdownCwtchDialogTitle": "Cwtch schliessen?", "shutdownCwtchDialogTitle": "Cwtch schliessen?",
"shutdownCwtchTooltip": "Cwtch schliessen", "shutdownCwtchTooltip": "Cwtch schliessen",
"malformedMessage": "Fehlerhafte Nachricht",
"profileDeleteSuccess": "Profil erfolgreich gelöscht", "profileDeleteSuccess": "Profil erfolgreich gelöscht",
"debugLog": "Konsolendebuglogging aktivivieren", "debugLog": "Konsolendebuglogging aktivivieren",
"torNetworkStatus": "Tor Netzwerkstatus", "torNetworkStatus": "Tor Netzwerkstatus",
@ -140,6 +106,7 @@
"torStatus": "Tor Status", "torStatus": "Tor Status",
"torVersion": "Tor Version", "torVersion": "Tor Version",
"sendAnInvitation": "Du hast eine Einladung geschickt für: ", "sendAnInvitation": "Du hast eine Einladung geschickt für: ",
"contactSuggestion": "Dieser Kontaktvorschlag ist für: ",
"rejected": "Abgelehnt!", "rejected": "Abgelehnt!",
"accepted": "Angenommen!", "accepted": "Angenommen!",
"chatHistoryDefault": "Diese Unterhaltung wird gelöscht sobald Cwtch geschlossen wird! Der Nachrichtenverlauf für jede Unterhaltung kann im Einstellungsmenü oben rechts geändert werden.", "chatHistoryDefault": "Diese Unterhaltung wird gelöscht sobald Cwtch geschlossen wird! Der Nachrichtenverlauf für jede Unterhaltung kann im Einstellungsmenü oben rechts geändert werden.",
@ -148,6 +115,9 @@
"reallyLeaveThisGroupPrompt": "Bist du sicher, dass du diese Unterhaltung beenden möchtest? Alle Nachrichten und Attribute werden gelöscht.", "reallyLeaveThisGroupPrompt": "Bist du sicher, dass du diese Unterhaltung beenden möchtest? Alle Nachrichten und Attribute werden gelöscht.",
"leaveGroup": "Unterhaltung beenden", "leaveGroup": "Unterhaltung beenden",
"inviteToGroup": "Du wurdest eingeladen einer Gruppe beizutreten:", "inviteToGroup": "Du wurdest eingeladen einer Gruppe beizutreten:",
"pasteAddressToAddContact": "Adresse, Einladung oder Schlüssel hier hinzufügen, um einen Kontakt hinzuzufügen",
"tooltipAddContact": "Neuen Kontakt oder Unterhaltung hinzufügen",
"titleManageContacts": "Unterhaltungen",
"titleManageServers": "Server verwalten", "titleManageServers": "Server verwalten",
"dateNever": "Nie", "dateNever": "Nie",
"dateLastYear": "Letzes Jahr", "dateLastYear": "Letzes Jahr",
@ -155,110 +125,81 @@
"dateLastMonth": "Letzter Monat", "dateLastMonth": "Letzter Monat",
"dateRightNow": "Jetzt", "dateRightNow": "Jetzt",
"successfullAddedContact": "Erfolgreich hinzugefügt", "successfullAddedContact": "Erfolgreich hinzugefügt",
"descriptionBlockUnknownConnections": "Falls aktiviert, wird diese Einstellung alle Verbindungen von Cwtch Usern autmoatisch schliessen, wenn sie nicht in deinen Kontakten sind.",
"descriptionExperimentsGroups": "Mit experimentellen Gruppen kann Cwtch über nicht vertrauenswürdige Serverinfrastruktur die Kommunikation mit mehr als einem Kontakt vereinfachen.",
"descriptionExperiments": "Experimentelle Cwtch Features sind optionale, opt-in Features für die andere Privatsphärenaspekte berücksichtigt werden als bei traditionellen 1:1 metadatenresistenten Chats, wie z. B. Gruppennachrichten, Bots usw.",
"titleManageProfiles": "Cwtch Profile verwalten", "titleManageProfiles": "Cwtch Profile verwalten",
"tooltipUnlockProfiles": "Entsperre verschlüsselte Profile durch Eingabe des Passworts.", "tooltipUnlockProfiles": "Entsperre verschlüsselte Profile durch Eingabe des Passworts.",
"titleManageContacts": "Unterhaltungen",
"tooltipAddContact": "Neuen Kontakt oder Unterhaltung hinzufügen",
"tooltipOpenSettings": "Öfffne das Einstellungsmenü", "tooltipOpenSettings": "Öfffne das Einstellungsmenü",
"contactAlreadyExists": "Kontakt existiert bereits",
"invalidImportString": "Ungültiger Importstring", "invalidImportString": "Ungültiger Importstring",
"contactAlreadyExists": "Kontakt existiert bereits",
"conversationSettings": "Unterhaltungseinstellungen", "conversationSettings": "Unterhaltungseinstellungen",
"enterCurrentPasswordForDelete": "Bitte gib das aktuelle Passwort ein, um diese Profil zu löschen.", "enterCurrentPasswordForDelete": "Bitte gib das aktuelle Passwort ein, um diese Profil zu löschen.",
"enableGroups": "Gruppenchat aktivieren", "enableGroups": "Gruppenchat aktivieren",
"experimentsEnabled": "Experimente aktiviert",
"localeIt": "Italiana", "localeIt": "Italiana",
"localeEs": "Espanol", "localeEs": "Espanol",
"addListItem": "Liste hinzufügen",
"addNewItem": "Ein neues Element zur Liste hinzufügen",
"todoPlaceholder": "noch zu erledigen",
"newConnectionPaneTitle": "Neue Verbindung",
"networkStatusOnline": "Online",
"networkStatusAttemptingTor": "Versuche, eine Verbindung mit dem Tor-Netzwerk herzustellen",
"networkStatusDisconnected": "Vom Internet getrennt, überprüfe deine Verbindung",
"viewGroupMembershipTooltip": "Gruppenmitgliedschaft anzeigen",
"loadingTor": "Tor wird geladen...",
"smallTextLabel": "Klein",
"defaultScalingText": "defaultmäßige Textgröße (Skalierungsfaktor:",
"builddate": "Aufgebaut auf: %2",
"version": "Version %1",
"versionTor": "Version %1 mit tor %2",
"themeDark": "Dunkel",
"themeLight": "Licht",
"settingTheme": "Thema",
"largeTextLabel": "Groß",
"settingInterfaceZoom": "Zoomstufe",
"localeDe": "Deutsche",
"localePt": "Portuguesa", "localePt": "Portuguesa",
"localeFr": "Frances", "localeFr": "Frances",
"localeEn": "English", "localeEn": "English",
"passwordErrorEmpty": "Passwort darf nicht leer sein", "settingLanguage": "Sprache",
"currentPasswordLabel": "aktuelles Passwort", "zoomLabel": "Benutzeroberflächen-Zoom (betriftt hauptsächlich Text- und Knopgrößen)",
"yourDisplayName": "Dein Anzeigename", "versionBuilddate": "Version: %1 Aufgebaut auf: %2",
"unblockBtn": "Anderen Nutzer entsperren", "cwtchSettingsTitle": "Cwtch Einstellungen",
"dontSavePeerHistory": "Verlauf mit anderem Nutzer löschen", "unlock": "Entsperren",
"savePeerHistoryDescription": "Legt fest, ob ein mit dem anderen Nutzer verknüpfter Verlauf gelöscht werden soll oder nicht.", "yourServers": "Deine Server",
"blockBtn": "Anderen Nutzer blockieren", "yourProfiles": "Deine Profile",
"displayNameLabel": "Angezeigename", "error0ProfilesLoadedForPassword": "0 Profile mit diesem Passwort geladen",
"peerOfflineMessage": "Anderer Nutzer ist offline, Nachrichten können derzeit nicht zugestellt werden", "password": "Passwort",
"peerBlockedMessage": "Anderer Nutzer ist blockiert", "enterProfilePassword": "Gib ein Passwort ein, um deine Profile anzuzeigen",
"dmTooltip": "Klicken, um Direktnachricht zu senden", "addNewProfileBtn": "Neues Profil hinzufügen",
"peerNotOnline": "Der andere Nutzer ist offline. Die App kann momentan nicht verwendet werden.",
"searchList": "Liste durchsuchen",
"update": "Update",
"viewServerInfo": "Serverinfo",
"serverNotSynced": "Neue Nachrichten abrufen (Dies kann eine Weile dauern...)",
"serverSynced": "synchronisiert",
"cycleColoursDesktop": "Klicken um Farbe zu wechseln.\nRechtsklick zum zurücksetzen.",
"cycleCatsDesktop": "Klicken um Kategorie zu wechseln.\nRechtslick zum zurücksetzen.",
"cycleCatsAndroid": "Klicken um Kategorie zu wechseln.\nLanger Klick zum zurücksetzen.",
"addPeer": "Anderen Nutzer hinzufügen",
"addPeerTab": "Einen anderen Nutzer hinzufügen",
"todoPlaceholder": "noch zu erledigen",
"addListItem": "Liste hinzufügen",
"addNewItem": "Ein neues Element zur Liste hinzufügen",
"createGroupTab": "Eine Gruppe erstellen",
"joinGroupTab": "Einer Gruppe beitreten",
"peerAddress": "Adresse",
"peerName": "Namen",
"groupName": "Gruppenname",
"server": "Server",
"invitation": "Einladung",
"groupAddr": "Adresse",
"createGroup": "Gruppe erstellen",
"joinGroup": "Gruppe beitreten",
"blocked": "Blockiert",
"search": "Suche...",
"serverInfo": "Server-Informationen",
"serverConnectivityConnected": "Server verbunden",
"serverConnectivityDisconnected": "Server getrennt",
"addListItemBtn": "Element hinzufügen",
"savePeerHistory": "Peer-Verlauf speichern",
"addProfileTitle": "Neues Profil hinzufügen",
"editProfileTitle": "Profil bearbeiten",
"profileName": "Anzeigename",
"defaultProfileName": "Alice",
"newProfile": "Neues Profil",
"editProfile": "Profil bearbeiten",
"radioUsePassword": "Passwort",
"radioNoPassword": "Unverschlüsselt (kein Passwort)",
"noPasswordWarning": "Wenn für dieses Konto kein Passwort verwendet wird, bedeutet dies, dass alle lokal gespeicherten Daten nicht verschlüsselt werden.",
"deleteProfileBtn": "Profil löschen",
"deleteConfirmText": "LÖSCHEN", "deleteConfirmText": "LÖSCHEN",
"deleteProfileConfirmBtn": "Profil wirklich löschen", "deleteProfileConfirmBtn": "Profil wirklich löschen",
"addNewProfileBtn": "Neues Profil hinzufügen", "deleteConfirmLabel": "Gib LÖSCHEN ein um zu bestätigen",
"networkStatusConnecting": "Verbinde zu Netzwerk und Peers ...", "deleteProfileBtn": "Profil löschen",
"newConnectionPaneTitle": "Neue Verbindung",
"password1Label": "Passwort",
"password2Label": "Passwort erneut eingeben",
"createProfileBtn": "Profil speichern",
"saveProfileBtn": "Profil speichern",
"passwordErrorMatch": "Passwörter stimmen nicht überein",
"passwordChangeError": "Fehler beim Ändern des Passworts: Das Passwort wurde abgelehnt", "passwordChangeError": "Fehler beim Ändern des Passworts: Das Passwort wurde abgelehnt",
"password": "Passwort", "passwordErrorMatch": "Passwörter stimmen nicht überein",
"error0ProfilesLoadedForPassword": "0 Profile mit diesem Passwort geladen", "saveProfileBtn": "Profil speichern",
"unlock": "Entsperren", "createProfileBtn": "Profil speichern",
"versionBuilddate": "Version: %1 Aufgebaut auf: %2", "passwordErrorEmpty": "Passwort darf nicht leer sein",
"blockUnknownLabel": "Unbekannte Peers blockieren", "password2Label": "Passwort erneut eingeben",
"settingLanguage": "Sprache", "password1Label": "Passwort",
"localeDe": "Deutsche", "currentPasswordLabel": "aktuelles Passwort",
"settingInterfaceZoom": "Zoomstufe", "yourDisplayName": "Dein Anzeigename",
"settingTheme": "Thema", "noPasswordWarning": "Wenn für dieses Konto kein Passwort verwendet wird, bedeutet dies, dass alle lokal gespeicherten Daten nicht verschlüsselt werden.",
"themeLight": "Licht", "radioNoPassword": "Unverschlüsselt (kein Passwort)",
"themeDark": "Dunkel", "radioUsePassword": "Passwort",
"versionTor": "Version %1 mit tor %2",
"version": "Version %1",
"builddate": "Aufgebaut auf: %2",
"loadingTor": "Tor wird geladen...",
"viewGroupMembershipTooltip": "Gruppenmitgliedschaft anzeigen",
"networkStatusAttemptingTor": "Versuche, eine Verbindung mit dem Tor-Netzwerk herzustellen",
"networkStatusOnline": "Online",
"smallTextLabel": "Klein",
"defaultScalingText": "defaultmäßige Textgröße (Skalierungsfaktor:",
"largeTextLabel": "Groß",
"zoomLabel": "Benutzeroberflächen-Zoom (betriftt hauptsächlich Text- und Knopgrößen)",
"cwtchSettingsTitle": "Cwtch Einstellungen",
"copiedToClipboardNotification": "in die Zwischenablage kopiert", "copiedToClipboardNotification": "in die Zwischenablage kopiert",
"copyBtn": "Kopieren",
"editProfile": "Profil bearbeiten",
"newProfile": "Neues Profil",
"defaultProfileName": "Alice",
"profileName": "Anzeigename",
"editProfileTitle": "Profil bearbeiten",
"addProfileTitle": "Neues Profil hinzufügen",
"deleteBtn": "Löschen", "deleteBtn": "Löschen",
"saveBtn": "Speichern", "saveBtn": "Speichern",
"displayNameLabel": "Angezeigename",
"addressLabel": "Adresse", "addressLabel": "Adresse",
"puzzleGameBtn": "Puzzlespiel", "puzzleGameBtn": "Puzzlespiel",
"bulletinsBtn": "Meldungen", "bulletinsBtn": "Meldungen",
@ -269,19 +210,45 @@
"acceptGroupInviteLabel": "Möchtest Du die Einladung annehmen", "acceptGroupInviteLabel": "Möchtest Du die Einladung annehmen",
"newGroupBtn": "Neue Gruppe anlegen", "newGroupBtn": "Neue Gruppe anlegen",
"copiedClipboardNotification": "in die Zwischenablage kopiert", "copiedClipboardNotification": "in die Zwischenablage kopiert",
"copyBtn": "Kopieren",
"pendingLabel": "Bestätigung ausstehend", "pendingLabel": "Bestätigung ausstehend",
"acknowledgedLabel": "bestätigt", "acknowledgedLabel": "bestätigt",
"couldNotSendMsgError": "Nachricht konnte nicht gesendet werden", "couldNotSendMsgError": "Nachricht konnte nicht gesendet werden",
"dmTooltip": "Klicken, um Direktnachricht zu senden",
"membershipDescription": "Unten steht eine Liste der Benutzer, die Nachrichten an die Gruppe gesendet haben. Möglicherweise enthält diese Benutzerzliste nicht alle, die Zugang zur Gruppe haben.", "membershipDescription": "Unten steht eine Liste der Benutzer, die Nachrichten an die Gruppe gesendet haben. Möglicherweise enthält diese Benutzerzliste nicht alle, die Zugang zur Gruppe haben.",
"addListItemBtn": "Element hinzufügen",
"searchList": "Liste durchsuchen",
"update": "Update",
"inviteBtn": "Einladen", "inviteBtn": "Einladen",
"inviteToGroupLabel": "In die Gruppe einladen", "inviteToGroupLabel": "In die Gruppe einladen",
"groupNameLabel": "Gruppenname", "groupNameLabel": "Gruppenname",
"viewServerInfo": "Serverinfo",
"serverSynced": "synchronisiert",
"serverConnectivityDisconnected": "Server getrennt",
"serverConnectivityConnected": "Server verbunden",
"serverInfo": "Server-Informationen",
"invitationLabel": "Einladung", "invitationLabel": "Einladung",
"serverLabel": "Server", "serverLabel": "Server",
"search": "Suche...",
"cycleColoursDesktop": "Klicken um Farbe zu wechseln.\nRechtsklick zum zurücksetzen.",
"cycleColoursAndroid": "Klicken um Farbe zu wechseln.\nGedrückt halten zum zurücksetzen.",
"cycleMorphsDesktop": "Klicken um Morph zu wechseln.\nRechtsklick zum zurücksetzen.",
"cycleMorphsAndroid": "Klicken um Morph zu wechseln.\nGedrückt halten zum zurücksetzen.",
"cycleCatsDesktop": "Klicken um Kategorie zu wechseln.\nRechtslick zum zurücksetzen.",
"cycleCatsAndroid": "Klicken um Kategorie zu wechseln.\nLanger Klick zum zurücksetzen.",
"blocked": "Blockiert",
"titlePlaceholder": "Titel...", "titlePlaceholder": "Titel...",
"postNewBulletinLabel": "Neue Meldung veröffentlichen", "postNewBulletinLabel": "Neue Meldung veröffentlichen",
"newBulletinLabel": "Neue Meldung", "newBulletinLabel": "Neue Meldung",
"joinGroup": "Gruppe beitreten",
"createGroup": "Gruppe erstellen",
"groupAddr": "Adresse",
"invitation": "Einladung",
"server": "Server",
"groupName": "Gruppenname",
"peerName": "Namen",
"peerAddress": "Adresse",
"joinGroupTab": "Einer Gruppe beitreten",
"createGroupTab": "Eine Gruppe erstellen",
"createGroupBtn": "Anlegen", "createGroupBtn": "Anlegen",
"defaultGroupName": "Tolle Gruppe", "defaultGroupName": "Tolle Gruppe",
"createGroupTitle": "Gruppe Anlegen" "createGroupTitle": "Gruppe Anlegen"

View File

@ -1,40 +1,6 @@
{ {
"@@locale": "en", "@@locale": "en",
"@@last_modified": "2021-12-20T09:20:03+01:00", "@@last_modified": "2021-11-11T01:02:08+01:00",
"msgAddToAccept": "Add this account to your contacts in order to accept this file.",
"btnSendFile": "Send File",
"msgConfirmSend": "Are you sure you want to send",
"msgFileTooBig": "File size cannot exceed 10 GB",
"storageMigrationModalMessage": "Migrating profiles to new storage format. This could take a few minutes...",
"loadingCwtch": "Loading Cwtch...",
"themeColorLabel": "Color Theme",
"themeNameNeon2": "Neon2",
"themeNameNeon1": "Neon1",
"themeNameMidnight": "Midnight",
"themeNameMermaid": "Mermaid",
"themeNamePumpkin": "Pumpkin",
"themeNameGhost": "Ghost",
"themeNameVampire": "Vampire",
"themeNameWitch": "Witch",
"themeNameCwtch": "Cwtch",
"settingDownloadFolder": "Download Folder",
"settingImagePreviewsDescription": "Images will be downloaded and previewed automatically. Please note that image previews can often lead to security vulnerabilities, and you should not enable this Experiment if you use Cwtch with untrusted contacts. Profile pictures are planned for Cwtch 1.6.",
"settingImagePreviews": "Image Previews and Profile Pictures",
"experimentClickableLinksDescription": "The clickable links experiment allows you to click on URLs shared in messages",
"enableExperimentClickableLinks": "Enable Clickable Links",
"serverConnectionsLabel": "Connection",
"serverTotalMessagesLabel": "Total Messages",
"serverMetricsLabel": "Server Metrics",
"manageKnownServersShort": "Servers",
"manageKnownServersLong": "Manage Known Servers",
"displayNameTooltip": "Please enter a display name",
"manageKnownServersButton": "Manage Known Servers",
"fieldDescriptionLabel": "Description",
"groupsOnThisServerLabel": "Groups I am in hosted on this server",
"importLocalServerButton": "Import %1",
"importLocalServerSelectText": "Select Local Server",
"importLocalServerLabel": "Import a locally hosted server",
"savePeerHistoryDescription": "Determines whether to delete any history associated with the contact.",
"newMessagesLabel": "New Messages", "newMessagesLabel": "New Messages",
"localeRU": "Russian", "localeRU": "Russian",
"copyServerKeys": "Copy keys", "copyServerKeys": "Copy keys",
@ -89,6 +55,7 @@
"peerOfflineMessage": "Contact is offline, messages can't be delivered right now", "peerOfflineMessage": "Contact is offline, messages can't be delivered right now",
"blockBtn": "Block Contact", "blockBtn": "Block Contact",
"savePeerHistory": "Save History", "savePeerHistory": "Save History",
"savePeerHistoryDescription": "Determines whether or not to delete any history associated with the contact.",
"dontSavePeerHistory": "Delete History", "dontSavePeerHistory": "Delete History",
"unblockBtn": "Unblock Contact", "unblockBtn": "Unblock Contact",
"blockUnknownLabel": "Block Unknown Contacts", "blockUnknownLabel": "Block Unknown Contacts",
@ -223,6 +190,7 @@
"radioNoPassword": "Unencrypted (No password)", "radioNoPassword": "Unencrypted (No password)",
"radioUsePassword": "Password", "radioUsePassword": "Password",
"copiedToClipboardNotification": "Copied to Clipboard", "copiedToClipboardNotification": "Copied to Clipboard",
"copyBtn": "Copy",
"editProfile": "Edit Profille", "editProfile": "Edit Profille",
"newProfile": "New Profile", "newProfile": "New Profile",
"defaultProfileName": "Alice", "defaultProfileName": "Alice",
@ -242,7 +210,6 @@
"acceptGroupInviteLabel": "Do you want to accept the invitation to", "acceptGroupInviteLabel": "Do you want to accept the invitation to",
"newGroupBtn": "Create new group", "newGroupBtn": "Create new group",
"copiedClipboardNotification": "Copied to clipboard", "copiedClipboardNotification": "Copied to clipboard",
"copyBtn": "Copy",
"pendingLabel": "Pending", "pendingLabel": "Pending",
"acknowledgedLabel": "Acknowledged", "acknowledgedLabel": "Acknowledged",
"couldNotSendMsgError": "Could not send this message", "couldNotSendMsgError": "Could not send this message",

View File

@ -1,39 +1,6 @@
{ {
"@@locale": "es", "@@locale": "es",
"@@last_modified": "2021-12-20T09:20:03+01:00", "@@last_modified": "2021-11-11T01:02:08+01:00",
"msgAddToAccept": "Add this account to your contacts in order to accept this file.",
"btnSendFile": "Send File",
"msgConfirmSend": "Are you sure you want to send",
"msgFileTooBig": "File size cannot exceed 10 GB",
"storageMigrationModalMessage": "Migrating profiles to new storage format. This could take a few minutes...",
"loadingCwtch": "Loading Cwtch...",
"themeColorLabel": "Color Theme",
"themeNameNeon2": "Neon2",
"themeNameNeon1": "Neon1",
"themeNameMidnight": "Midnight",
"themeNameMermaid": "Mermaid",
"themeNamePumpkin": "Pumpkin",
"themeNameGhost": "Ghost",
"themeNameVampire": "Vampire",
"themeNameWitch": "Witch",
"themeNameCwtch": "Cwtch",
"settingDownloadFolder": "Download Folder",
"settingImagePreviewsDescription": "Images will be downloaded and previewed automatically. Please note that image previews can often lead to security vulnerabilities, and you should not enable this Experiment if you use Cwtch with untrusted contacts. Profile pictures are planned for Cwtch 1.6.",
"settingImagePreviews": "Image Previews and Profile Pictures",
"experimentClickableLinksDescription": "The clickable links experiment allows you to click on URLs shared in messages",
"enableExperimentClickableLinks": "Enable Clickable Links",
"serverConnectionsLabel": "Connection",
"serverTotalMessagesLabel": "Total Messages",
"serverMetricsLabel": "Server Metrics",
"manageKnownServersShort": "Servers",
"manageKnownServersLong": "Manage Known Servers",
"displayNameTooltip": "Please enter a display name",
"manageKnownServersButton": "Manage Known Servers",
"fieldDescriptionLabel": "Description",
"groupsOnThisServerLabel": "Groups I am in hosted on this server",
"importLocalServerButton": "Import %1",
"importLocalServerSelectText": "Select Local Server",
"importLocalServerLabel": "Import a locally hosted server",
"newMessagesLabel": "New Messages", "newMessagesLabel": "New Messages",
"localeRU": "Russian", "localeRU": "Russian",
"copyServerKeys": "Copy keys", "copyServerKeys": "Copy keys",
@ -41,8 +8,8 @@
"fileCheckingStatus": "Checking download status", "fileCheckingStatus": "Checking download status",
"fileInterrupted": "Interrupted", "fileInterrupted": "Interrupted",
"fileSavedTo": "Saved to", "fileSavedTo": "Saved to",
"encryptedServerDescription": "Encrypting a server with a password protects it from other people who may also use this device. Encrypted servers cannot be decrypted, displayed or accessed until the correct password is entered to unlock them.",
"plainServerDescription": "We recommend that you protect your Cwtch servers with a password. If you do not set a password on this server then anyone who has access to this device may be able to access information about this server, including sensitive cryptographic keys.", "plainServerDescription": "We recommend that you protect your Cwtch servers with a password. If you do not set a password on this server then anyone who has access to this device may be able to access information about this server, including sensitive cryptographic keys.",
"encryptedServerDescription": "Encrypting a server with a password protects it from other people who may also use this device. Encrypted servers cannot be decrypted, displayed or accessed until the correct password is entered to unlock them.",
"deleteServerConfirmBtn": "Really delete server", "deleteServerConfirmBtn": "Really delete server",
"deleteServerSuccess": "Successfully deleted server", "deleteServerSuccess": "Successfully deleted server",
"enterCurrentPasswordForDeleteServer": "Please enter current password to delete this server", "enterCurrentPasswordForDeleteServer": "Please enter current password to delete this server",
@ -66,6 +33,7 @@
"editServerTitle": "Edit Server", "editServerTitle": "Edit Server",
"addServerTitle": "Add Server", "addServerTitle": "Add Server",
"titleManageProfilesShort": "Profiles", "titleManageProfilesShort": "Profiles",
"descriptionStreamerMode": "If turned on, this option makes the app more visually private for streaming or presenting with, for example, hiding profile and contact addresses",
"descriptionFileSharing": "The file sharing experiment allows you to send and receive files from Cwtch contacts and groups. Note that sharing a file with a group will result in members of that group connecting with you directly over Cwtch to download it.", "descriptionFileSharing": "The file sharing experiment allows you to send and receive files from Cwtch contacts and groups. Note that sharing a file with a group will result in members of that group connecting with you directly over Cwtch to download it.",
"settingFileSharing": "File Sharing", "settingFileSharing": "File Sharing",
"tooltipSendFile": "Send File", "tooltipSendFile": "Send File",
@ -77,10 +45,22 @@
"downloadFileButton": "Download", "downloadFileButton": "Download",
"openFolderButton": "Open Folder", "openFolderButton": "Open Folder",
"retrievingManifestMessage": "Retrieving file information...", "retrievingManifestMessage": "Retrieving file information...",
"descriptionStreamerMode": "If turned on, this option makes the app more visually private for streaming or presenting with, for example, hiding profile and contact addresses",
"streamerModeLabel": "Streamer\/Presentation Mode", "streamerModeLabel": "Streamer\/Presentation Mode",
"archiveConversation": "Archive this Conversation", "archiveConversation": "Archive this Conversation",
"profileOnionLabel": "Envía esta dirección a los contactos con los que quieras conectarte",
"addPeerTab": "Agregar Contacto",
"addPeer": "Agregar Contacto",
"peerNotOnline": "Este contacto no está en línea, la aplicación no puede ser usada en este momento",
"peerBlockedMessage": "Contacto bloqueado",
"peerOfflineMessage": "Este contacto no está en línea, los mensajes no pueden ser entregados en este momento",
"blockBtn": "Bloquear contacto",
"savePeerHistory": "Guardar el historial con contacto",
"savePeerHistoryDescription": "Determina si eliminar o no el historial asociado con el contacto.",
"dontSavePeerHistory": "Eliminar historial de contacto",
"unblockBtn": "Desbloquear contacto",
"blockUnknownLabel": "Bloquear conexiones desconocidas",
"blockUnknownConnectionsEnabledDescription": "Connections from unknown contacts are blocked. You can change this in Settings", "blockUnknownConnectionsEnabledDescription": "Connections from unknown contacts are blocked. You can change this in Settings",
"networkStatusConnecting": "Conectando a la red y a los contactos...",
"showMessageButton": "Show Message", "showMessageButton": "Show Message",
"blockedMessageMessage": "This message is from a profile you have blocked.", "blockedMessageMessage": "This message is from a profile you have blocked.",
"placeholderEnterMessage": "Type a message...", "placeholderEnterMessage": "Type a message...",
@ -104,6 +84,7 @@
"notificationNewMessageFromPeer": "New message from a contact!", "notificationNewMessageFromPeer": "New message from a contact!",
"tooltipHidePassword": "Hide Password", "tooltipHidePassword": "Hide Password",
"tooltipShowPassword": "Show Password", "tooltipShowPassword": "Show Password",
"serverNotSynced": "Fuera de sincronización con el servidor",
"groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.", "groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.",
"shutdownCwtchAction": "Shutdown Cwtch", "shutdownCwtchAction": "Shutdown Cwtch",
"shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.", "shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.",
@ -134,6 +115,9 @@
"reallyLeaveThisGroupPrompt": "Are you sure you want to leave this conversation? All messages and attributes will be deleted.", "reallyLeaveThisGroupPrompt": "Are you sure you want to leave this conversation? All messages and attributes will be deleted.",
"leaveGroup": "Leave This Conversation", "leaveGroup": "Leave This Conversation",
"inviteToGroup": "You have been invited to join a group:", "inviteToGroup": "You have been invited to join a group:",
"pasteAddressToAddContact": "...pegar una dirección aquí para añadir contacto...",
"tooltipAddContact": "Add a new contact or conversation",
"titleManageContacts": "Conversations",
"titleManageServers": "Manage Servers", "titleManageServers": "Manage Servers",
"dateNever": "Never", "dateNever": "Never",
"dateLastYear": "Last Year", "dateLastYear": "Last Year",
@ -146,143 +130,126 @@
"descriptionExperiments": "Cwtch experiments are optional, opt-in features that add additional functionality to Cwtch that may have different privacy considerations than traditional 1:1 metadata resistant chat e.g. group chat, bot integration etc.", "descriptionExperiments": "Cwtch experiments are optional, opt-in features that add additional functionality to Cwtch that may have different privacy considerations than traditional 1:1 metadata resistant chat e.g. group chat, bot integration etc.",
"titleManageProfiles": "Manage Cwtch Profiles", "titleManageProfiles": "Manage Cwtch Profiles",
"tooltipUnlockProfiles": "Unlock encrypted profiles by entering their password.", "tooltipUnlockProfiles": "Unlock encrypted profiles by entering their password.",
"titleManageContacts": "Conversations",
"tooltipAddContact": "Add a new contact or conversation",
"tooltipOpenSettings": "Open the settings pane", "tooltipOpenSettings": "Open the settings pane",
"contactAlreadyExists": "Contact Already Exists",
"invalidImportString": "Invalid import string", "invalidImportString": "Invalid import string",
"contactAlreadyExists": "Contact Already Exists",
"conversationSettings": "Conversation Settings", "conversationSettings": "Conversation Settings",
"enterCurrentPasswordForDelete": "Please enter current password to delete this profile.", "enterCurrentPasswordForDelete": "Please enter current password to delete this profile.",
"enableGroups": "Enable Group Chat", "enableGroups": "Enable Group Chat",
"defaultScalingText": "Tamaño predeterminado de texto (factor de escala:", "experimentsEnabled": "Experimentos habilitados",
"localeIt": "Italiano",
"localeEs": "Español",
"addListItem": "Añadir un nuevo elemento a la lista",
"addNewItem": "Añadir un nuevo elemento a la lista",
"todoPlaceholder": "Por hacer...", "todoPlaceholder": "Por hacer...",
"bulletinsBtn": "Boletines", "newConnectionPaneTitle": "Nueva conexión",
"radioNoPassword": "Sin cifrado (sin contraseña)", "networkStatusOnline": "En línea",
"themeDark": "Oscuro", "networkStatusAttemptingTor": "Intentando conectarse a la red Tor",
"smallTextLabel": "Pequeño", "networkStatusDisconnected": "Sin conexión, comprueba tu conexión",
"viewGroupMembershipTooltip": "Ver membresía del grupo",
"loadingTor": "Cargando tor...", "loadingTor": "Cargando tor...",
"cycleCatsAndroid": "Click para cambiar categoría. Mantenga pulsado para reiniciar.", "smallTextLabel": "Pequeño",
"cycleCatsDesktop": "Click para cambiar categoría. Click derecho para reiniciar.", "defaultScalingText": "Tamaño predeterminado de texto (factor de escala:",
"cycleColoursDesktop": "Click para cambiar colores. Click derecho para reiniciar.",
"cycleColoursAndroid": "Click para cambiar colores. Mantenga pulsado para reiniciar.",
"builddate": "Basado en: %2", "builddate": "Basado en: %2",
"cycleMorphsAndroid": "Click para cambiar transformaciones. Mantenga pulsado para reiniciar.", "version": "Versión %1",
"cycleMorphsDesktop": "Click para cambiar transformaciones. Click derecho para reiniciar.", "versionTor": "Versión %1 con tor %2",
"themeDark": "Oscuro",
"themeLight": "Claro",
"settingTheme": "Tema",
"largeTextLabel": "Grande",
"settingInterfaceZoom": "Nivel de zoom",
"localeDe": "Alemán", "localeDe": "Alemán",
"localePt": "Portugués", "localePt": "Portugués",
"localeFr": "Francés", "localeFr": "Francés",
"addListItem": "Añadir un nuevo elemento a la lista",
"unblockBtn": "Desbloquear contacto",
"joinGroupTab": "Únete a un grupo",
"viewGroupMembershipTooltip": "Ver membresía del grupo",
"peerBlockedMessage": "Contacto bloqueado",
"peerOfflineMessage": "Este contacto no está en línea, los mensajes no pueden ser entregados en este momento",
"profileOnionLabel": "Envía esta dirección a los contactos con los que quieras conectarte",
"couldNotSendMsgError": "No se pudo enviar este mensaje",
"pendingLabel": "Pendiente",
"chatBtn": "Chat",
"dontSavePeerHistory": "Eliminar historial de contacto",
"password": "Contraseña",
"peerNotOnline": "Este contacto no está en línea, la aplicación no puede ser usada en este momento",
"enterProfilePassword": "Ingresa tu contraseña para ver tus perfiles",
"networkStatusConnecting": "Conectando a la red y a los contactos...",
"localeIt": "Italiano",
"savePeerHistoryDescription": "Determina si eliminar o no el historial asociado con el contacto.",
"acknowledgedLabel": "Reconocido",
"blockBtn": "Bloquear contacto",
"savePeerHistory": "Guardar el historial con contacto",
"defaultProfileName": "Alicia",
"versionBuilddate": "Versión: %1 Basado en %2",
"zoomLabel": "Zoom de la interfaz (afecta principalmente el tamaño del texto y de los botones)",
"settingTheme": "Tema",
"themeLight": "Claro",
"experimentsEnabled": "Experimentos habilitados",
"versionTor": "Versión %1 con tor %2",
"localeEs": "Español",
"networkStatusOnline": "En línea",
"newConnectionPaneTitle": "Nueva conexión",
"addNewItem": "Añadir un nuevo elemento a la lista",
"createGroupTitle": "Crear un grupo",
"serverLabel": "Servidor",
"groupNameLabel": "Nombre del grupo",
"defaultGroupName": "El Grupo Asombroso",
"createGroupBtn": "Crear",
"copiedToClipboardNotification": "Copiado al portapapeles",
"addPeerTab": "Agregar Contacto",
"createGroupTab": "Crear un grupo",
"peerAddress": "Dirección",
"peerName": "Nombre",
"groupName": "Nombre del grupo",
"server": "Servidor",
"invitation": "Invitación",
"groupAddr": "Dirección",
"addPeer": "Agregar Contacto",
"createGroup": "Crear perfil",
"joinGroup": "Únete al grupo",
"newBulletinLabel": "Nuevo Boletín",
"postNewBulletinLabel": "Publicar nuevo boletín",
"titlePlaceholder": "título...",
"pasteAddressToAddContact": "...pegar una dirección aquí para añadir contacto...",
"blocked": "Bloqueado",
"search": "Búsqueda...",
"invitationLabel": "Invitación",
"serverInfo": "Información del servidor",
"serverConnectivityConnected": "Servidor conectado",
"serverConnectivityDisconnected": "Servidor desconectado",
"serverSynced": "Sincronizado",
"serverNotSynced": "Fuera de sincronización con el servidor",
"viewServerInfo": "Información del servidor",
"saveBtn": "Guardar",
"inviteToGroupLabel": "Invitar al grupo",
"inviteBtn": "Invitar",
"deleteBtn": "Eliminar",
"update": "Actualizar",
"searchList": "Buscar en la lista",
"addListItemBtn": "Agregar artículo",
"membershipDescription": "La lista a continuación solo muestra los miembros que han enviado mensajes al grupo, no incluye a todos los usuarios dentro del grupo",
"dmTooltip": "Haz clic para enviar mensaje directo",
"copyBtn": "Copiar",
"copiedClipboardNotification": "Copiado al portapapeles",
"newGroupBtn": "Crear un nuevo grupo de chat",
"acceptGroupInviteLabel": "¿Quieres aceptar la invitación a ",
"acceptGroupBtn": "Aceptar",
"rejectGroupBtn": "Rechazar",
"listsBtn": "Listas",
"puzzleGameBtn": "Juego de rompecabezas",
"addressLabel": "Dirección",
"displayNameLabel": "Nombre de Usuario",
"addProfileTitle": "Agregar nuevo perfil",
"editProfileTitle": "Editar perfil",
"profileName": "Nombre de Usuario",
"newProfile": "Nuevo perfil",
"editProfile": "Editar perfil",
"radioUsePassword": "Contraseña",
"noPasswordWarning": "No usar una contraseña para esta cuenta significa que los datos almacenados localmente no serán encriptados",
"password2Label": "Vuelve a ingresar tu contraseña",
"yourDisplayName": "Tu nombre de usuario",
"currentPasswordLabel": "Contraseña actual",
"password1Label": "Contraseña",
"passwordErrorEmpty": "El campo de contraseña no puede estar vacío",
"createProfileBtn": "Crear perfil",
"saveProfileBtn": "Guardar perfil",
"passwordErrorMatch": "Las contraseñas no coinciden",
"passwordChangeError": "Hubo un error cambiando tu contraseña: la contraseña ingresada fue rechazada",
"deleteProfileBtn": "Eliminar Perfil",
"deleteConfirmLabel": "Escribe ELIMINAR para confirmar",
"deleteProfileConfirmBtn": "Confirmar eliminar perfil",
"deleteConfirmText": "ELIMINAR",
"addNewProfileBtn": "Agregar nuevo perfil",
"error0ProfilesLoadedForPassword": "0 perfiles cargados con esa contraseña",
"yourProfiles": "Tus perfiles",
"yourServers": "Tus servidores",
"unlock": "Desbloquear",
"cwtchSettingsTitle": "Configuración de Cwtch",
"blockUnknownLabel": "Bloquear conexiones desconocidas",
"settingLanguage": "Idioma",
"localeEn": "Inglés", "localeEn": "Inglés",
"settingInterfaceZoom": "Nivel de zoom", "settingLanguage": "Idioma",
"largeTextLabel": "Grande", "zoomLabel": "Zoom de la interfaz (afecta principalmente el tamaño del texto y de los botones)",
"version": "Versión %1", "versionBuilddate": "Versión: %1 Basado en %2",
"networkStatusDisconnected": "Sin conexión, comprueba tu conexión", "cwtchSettingsTitle": "Configuración de Cwtch",
"networkStatusAttemptingTor": "Intentando conectarse a la red Tor" "unlock": "Desbloquear",
"yourServers": "Tus servidores",
"yourProfiles": "Tus perfiles",
"error0ProfilesLoadedForPassword": "0 perfiles cargados con esa contraseña",
"password": "Contraseña",
"enterProfilePassword": "Ingresa tu contraseña para ver tus perfiles",
"addNewProfileBtn": "Agregar nuevo perfil",
"deleteConfirmText": "ELIMINAR",
"deleteProfileConfirmBtn": "Confirmar eliminar perfil",
"deleteConfirmLabel": "Escribe ELIMINAR para confirmar",
"deleteProfileBtn": "Eliminar Perfil",
"passwordChangeError": "Hubo un error cambiando tu contraseña: la contraseña ingresada fue rechazada",
"passwordErrorMatch": "Las contraseñas no coinciden",
"saveProfileBtn": "Guardar perfil",
"createProfileBtn": "Crear perfil",
"passwordErrorEmpty": "El campo de contraseña no puede estar vacío",
"password2Label": "Vuelve a ingresar tu contraseña",
"password1Label": "Contraseña",
"currentPasswordLabel": "Contraseña actual",
"yourDisplayName": "Tu nombre de usuario",
"noPasswordWarning": "No usar una contraseña para esta cuenta significa que los datos almacenados localmente no serán encriptados",
"radioNoPassword": "Sin cifrado (sin contraseña)",
"radioUsePassword": "Contraseña",
"copiedToClipboardNotification": "Copiado al portapapeles",
"copyBtn": "Copiar",
"editProfile": "Editar perfil",
"newProfile": "Nuevo perfil",
"defaultProfileName": "Alicia",
"profileName": "Nombre de Usuario",
"editProfileTitle": "Editar perfil",
"addProfileTitle": "Agregar nuevo perfil",
"deleteBtn": "Eliminar",
"saveBtn": "Guardar",
"displayNameLabel": "Nombre de Usuario",
"addressLabel": "Dirección",
"puzzleGameBtn": "Juego de rompecabezas",
"bulletinsBtn": "Boletines",
"listsBtn": "Listas",
"chatBtn": "Chat",
"rejectGroupBtn": "Rechazar",
"acceptGroupBtn": "Aceptar",
"acceptGroupInviteLabel": "¿Quieres aceptar la invitación a ",
"newGroupBtn": "Crear un nuevo grupo de chat",
"copiedClipboardNotification": "Copiado al portapapeles",
"pendingLabel": "Pendiente",
"acknowledgedLabel": "Reconocido",
"couldNotSendMsgError": "No se pudo enviar este mensaje",
"dmTooltip": "Haz clic para enviar mensaje directo",
"membershipDescription": "La lista a continuación solo muestra los miembros que han enviado mensajes al grupo, no incluye a todos los usuarios dentro del grupo",
"addListItemBtn": "Agregar artículo",
"searchList": "Buscar en la lista",
"update": "Actualizar",
"inviteBtn": "Invitar",
"inviteToGroupLabel": "Invitar al grupo",
"groupNameLabel": "Nombre del grupo",
"viewServerInfo": "Información del servidor",
"serverSynced": "Sincronizado",
"serverConnectivityDisconnected": "Servidor desconectado",
"serverConnectivityConnected": "Servidor conectado",
"serverInfo": "Información del servidor",
"invitationLabel": "Invitación",
"serverLabel": "Servidor",
"search": "Búsqueda...",
"cycleColoursDesktop": "Click para cambiar colores. Click derecho para reiniciar.",
"cycleColoursAndroid": "Click para cambiar colores. Mantenga pulsado para reiniciar.",
"cycleMorphsDesktop": "Click para cambiar transformaciones. Click derecho para reiniciar.",
"cycleMorphsAndroid": "Click para cambiar transformaciones. Mantenga pulsado para reiniciar.",
"cycleCatsDesktop": "Click para cambiar categoría. Click derecho para reiniciar.",
"cycleCatsAndroid": "Click para cambiar categoría. Mantenga pulsado para reiniciar.",
"blocked": "Bloqueado",
"titlePlaceholder": "título...",
"postNewBulletinLabel": "Publicar nuevo boletín",
"newBulletinLabel": "Nuevo Boletín",
"joinGroup": "Únete al grupo",
"createGroup": "Crear perfil",
"groupAddr": "Dirección",
"invitation": "Invitación",
"server": "Servidor",
"groupName": "Nombre del grupo",
"peerName": "Nombre",
"peerAddress": "Dirección",
"joinGroupTab": "Únete a un grupo",
"createGroupTab": "Crear un grupo",
"createGroupBtn": "Crear",
"defaultGroupName": "El Grupo Asombroso",
"createGroupTitle": "Crear un grupo"
} }

View File

@ -1,108 +1,74 @@
{ {
"@@locale": "fr", "@@locale": "fr",
"@@last_modified": "2021-12-20T09:20:03+01:00", "@@last_modified": "2021-11-11T01:02:08+01:00",
"msgConfirmSend": "Êtes-vous sûr de vouloir envoyer", "newMessagesLabel": "New Messages",
"acceptGroupInviteLabel": "Voulez-vous accepter l'invitation au groupe de", "localeRU": "Russian",
"msgFileTooBig": "La taille du fichier ne peut pas dépasser 10 Go",
"msgAddToAccept": "Ajoutez ce compte à vos contacts afin d'accepter ce fichier.",
"btnSendFile": "Envoyer le fichier",
"storageMigrationModalMessage": "Migration des profils vers un nouveau format de stockage. Cela peut prendre quelques minutes...",
"loadingCwtch": "Chargement de Cwtch...",
"experimentClickableLinksDescription": "L'expérience des liens cliquables vous permet de cliquer sur les URLs partagés dans les messages",
"themeNameWitch": "Sorcière",
"themeNameVampire": "Vampire",
"themeNamePumpkin": "Citrouille",
"themeNameNeon2": "Néon2",
"themeNameNeon1": "Néon1",
"themeNameMidnight": "Minuit",
"themeNameMermaid": "Sirène",
"themeNameGhost": "Fantôme",
"themeNameCwtch": "Cwtch",
"themeColorLabel": "Thème de couleur",
"settingImagePreviewsDescription": "Les images seront téléchargées et prévisualisées automatiquement. Veuillez noter que la prévisualisation des images peut souvent conduire à des failles de sécurité, et vous ne devriez pas activer cette expérience si vous utilisez Cwtch avec des contacts non fiables. Les images de profil sont prévues pour Cwtch 1.6.",
"settingImagePreviews": "Aperçu des images et photos de profil",
"settingDownloadFolder": "Dossier de téléchargement",
"enableExperimentClickableLinks": "Activer les liens cliquables",
"serverMetricsLabel": "Métriques du serveur",
"serverTotalMessagesLabel": "Nombre total de messages",
"serverConnectionsLabel": "Connexion",
"manageKnownServersShort": "Serveurs",
"manageKnownServersLong": "Gérer les serveurs connus",
"manageKnownServersButton": "Gérer les serveurs connus",
"importLocalServerSelectText": "Sélectionnez le serveur local",
"importLocalServerLabel": "Importer un serveur hébergé localement",
"importLocalServerButton": "Importer %1",
"groupsOnThisServerLabel": "Les groupes dont je fais partie sont hébergés sur ce serveur",
"fieldDescriptionLabel": "Description",
"displayNameTooltip": "Veuillez entrer un nom d'usage s'il vous plaît",
"savePeerHistoryDescription": "Détermine s'il faut ou non supprimer tout historique associé au contact.",
"newMessagesLabel": "Nouveaux messages",
"localeRU": "Russe",
"copyServerKeys": "Copier les clés", "copyServerKeys": "Copier les clés",
"verfiyResumeButton": "Vérifier\/reprendre", "verfiyResumeButton": "Vérifier\/reprendre",
"fileSavedTo": "Enregistré dans",
"fileInterrupted": "Interrompu",
"fileCheckingStatus": "Vérification de l'état du téléchargement", "fileCheckingStatus": "Vérification de l'état du téléchargement",
"fileInterrupted": "Interrompu",
"fileSavedTo": "Enregistré dans",
"plainServerDescription": "Nous vous recommandons de protéger vos serveurs Cwtch par un mot de passe. Si vous ne définissez pas de mot de passe sur ce serveur, toute personne ayant accès à cet appareil peut être en mesure d'accéder aux informations concernant ce serveur, y compris les clés cryptographiques sensibles.", "plainServerDescription": "Nous vous recommandons de protéger vos serveurs Cwtch par un mot de passe. Si vous ne définissez pas de mot de passe sur ce serveur, toute personne ayant accès à cet appareil peut être en mesure d'accéder aux informations concernant ce serveur, y compris les clés cryptographiques sensibles.",
"enterCurrentPasswordForDeleteServer": "Veuillez saisir le mot de passe actuel pour supprimer ce serveur",
"encryptedServerDescription": "Le chiffrement dun serveur avec un mot de passe le protège des autres personnes qui peuvent également utiliser cet appareil. Les serveurs cryptés ne peuvent pas être déchiffrés, affichés ou accessibles tant que le mot de passe correct nest pas entré pour les déverrouiller.", "encryptedServerDescription": "Le chiffrement dun serveur avec un mot de passe le protège des autres personnes qui peuvent également utiliser cet appareil. Les serveurs cryptés ne peuvent pas être déchiffrés, affichés ou accessibles tant que le mot de passe correct nest pas entré pour les déverrouiller.",
"deleteServerSuccess": "Le serveur a été supprimé avec succès",
"deleteServerConfirmBtn": "Supprimer vraiment le serveur", "deleteServerConfirmBtn": "Supprimer vraiment le serveur",
"unlockServerTip": "Veuillez créer ou déverrouiller un serveur pour commencer !", "deleteServerSuccess": "Le serveur a été supprimé avec succès",
"unlockProfileTip": "Veuillez créer ou déverrouiller un profil pour commencer !", "enterCurrentPasswordForDeleteServer": "Veuillez saisir le mot de passe actuel pour supprimer ce serveur",
"copyAddress": "Copier l'adresse",
"settingServersDescription": "L'expérience des serveurs d'hébergement permet d'héberger et de gérer les serveurs Cwtch.", "settingServersDescription": "L'expérience des serveurs d'hébergement permet d'héberger et de gérer les serveurs Cwtch.",
"settingServers": "Serveurs d'hébergement", "settingServers": "Serveurs d'hébergement",
"enterServerPassword": "Entrez le mot de passe pour déverrouiller le serveur",
"unlockProfileTip": "Veuillez créer ou déverrouiller un profil pour commencer !",
"unlockServerTip": "Veuillez créer ou déverrouiller un serveur pour commencer !",
"addServerTooltip": "Ajouter un nouveau serveur",
"serversManagerTitleShort": "Serveurs", "serversManagerTitleShort": "Serveurs",
"serversManagerTitleLong": "Serveurs que vous hébergez", "serversManagerTitleLong": "Serveurs que vous hébergez",
"saveServerButton": "Enregistrer le serveur",
"serverAutostartDescription": "Contrôle si l'application lance automatiquement le serveur au démarrage.",
"serverAutostartLabel": "Démarrage automatique",
"serverEnabledDescription": "Démarrer ou arrêter le serveur", "serverEnabledDescription": "Démarrer ou arrêter le serveur",
"serverEnabled": "Serveur activé", "serverEnabled": "Serveur activé",
"serverDescriptionLabel": "Description du serveur",
"serverDescriptionDescription": "Votre description du serveur est à des fins de gestion personnelle uniquement, elle ne sera jamais partagée.", "serverDescriptionDescription": "Votre description du serveur est à des fins de gestion personnelle uniquement, elle ne sera jamais partagée.",
"serverAutostartLabel": "Démarrage automatique", "serverDescriptionLabel": "Description du serveur",
"serverAutostartDescription": "Contrôle si l'application lance automatiquement le serveur au démarrage.",
"serverAddress": "Adresse du serveur", "serverAddress": "Adresse du serveur",
"saveServerButton": "Enregistrer le serveur",
"enterServerPassword": "Entrez le mot de passe pour déverrouiller le serveur",
"editServerTitle": "Modifier le serveur", "editServerTitle": "Modifier le serveur",
"copyAddress": "Copier l'adresse",
"addServerTooltip": "Ajouter un nouveau serveur",
"addServerTitle": "Ajouter un serveur", "addServerTitle": "Ajouter un serveur",
"titleManageProfilesShort": "Profils", "titleManageProfilesShort": "Profils",
"descriptionStreamerMode": "Si elle est activée, cette option donne un rendu visuel plus privé à l'application pour la diffusion en direct ou la présentation, par exemple, en masquant profil et adresses de contacts.", "descriptionStreamerMode": "Si elle est activée, cette option donne un rendu visuel plus privé à l'application pour la diffusion en direct ou la présentation, par exemple, en masquant profil et adresses de contacts.",
"tooltipSendFile": "Envoyer le fichier", "descriptionFileSharing": "L'expérience de partage de fichiers vous permet d'envoyer et de recevoir des fichiers à partir de contacts et de groupes Cwtch. Notez que si vous partagez un fichier avec un groupe, les membres de ce groupe se connecteront avec vous directement via Cwtch pour le télécharger.",
"settingFileSharing": "Partage de fichiers", "settingFileSharing": "Partage de fichiers",
"retrievingManifestMessage": "Récupération des informations sur le fichier...", "tooltipSendFile": "Envoyer le fichier",
"openFolderButton": "Ouvrir le dossier",
"messageFileSent": "Vous avez envoyé un fichier",
"messageFileOffered": "Contact vous propose de vous envoyer un fichier", "messageFileOffered": "Contact vous propose de vous envoyer un fichier",
"messageFileSent": "Vous avez envoyé un fichier",
"messageEnableFileSharing": "Activez l'expérience de partage de fichiers pour afficher ce message.", "messageEnableFileSharing": "Activez l'expérience de partage de fichiers pour afficher ce message.",
"labelFilesize": "Taille", "labelFilesize": "Taille",
"labelFilename": "Nom de fichier", "labelFilename": "Nom de fichier",
"downloadFileButton": "Télécharger", "downloadFileButton": "Télécharger",
"descriptionFileSharing": "L'expérience de partage de fichiers vous permet d'envoyer et de recevoir des fichiers à partir de contacts et de groupes Cwtch. Notez que si vous partagez un fichier avec un groupe, les membres de ce groupe se connecteront avec vous directement via Cwtch pour le télécharger.", "openFolderButton": "Ouvrir le dossier",
"retrievingManifestMessage": "Récupération des informations sur le fichier...",
"streamerModeLabel": "Mode Streamer\/Présentation", "streamerModeLabel": "Mode Streamer\/Présentation",
"addPeer": "Ajouter le contact", "archiveConversation": "Archiver cette conversation",
"networkStatusConnecting": "Connexion au réseau et aux contacts...",
"profileOnionLabel": "Envoyez cette adresse aux personnes avec lesquelles vous souhaitez entrer en contact.", "profileOnionLabel": "Envoyez cette adresse aux personnes avec lesquelles vous souhaitez entrer en contact.",
"addPeerTab": "Ajouter un contact", "addPeerTab": "Ajouter un contact",
"addPeer": "Ajouter le contact",
"peerNotOnline": "Le contact est hors ligne. Les applications ne peuvent pas être utilisées pour le moment.", "peerNotOnline": "Le contact est hors ligne. Les applications ne peuvent pas être utilisées pour le moment.",
"peerBlockedMessage": "Le contact est bloqué", "peerBlockedMessage": "Le contact est bloqué",
"peerOfflineMessage": "Le contact est hors ligne, les messages ne peuvent pas être transmis pour le moment.", "peerOfflineMessage": "Le contact est hors ligne, les messages ne peuvent pas être transmis pour le moment.",
"blockBtn": "Bloquer le contact", "blockBtn": "Bloquer le contact",
"savePeerHistory": "Enregistrer l'historique", "savePeerHistory": "Enregistrer l'historique",
"savePeerHistoryDescription": "Détermine s'il faut ou non supprimer tout historique associé au contact.",
"dontSavePeerHistory": "Supprimer l'historique", "dontSavePeerHistory": "Supprimer l'historique",
"unblockBtn": "Débloquer le contact", "unblockBtn": "Débloquer le contact",
"blockUnknownLabel": "Bloquer les pairs inconnus", "blockUnknownLabel": "Bloquer les pairs inconnus",
"blockUnknownConnectionsEnabledDescription": "Les connexions provenant de contacts inconnus sont bloquées. Vous pouvez modifier cela dans les paramètres", "blockUnknownConnectionsEnabledDescription": "Les connexions provenant de contacts inconnus sont bloquées. Vous pouvez modifier cela dans les paramètres",
"archiveConversation": "Archiver cette conversation", "networkStatusConnecting": "Connexion au réseau et aux contacts...",
"blockedMessageMessage": "Ce message provient d'un profil que vous avez bloqué.",
"showMessageButton": "Afficher le message", "showMessageButton": "Afficher le message",
"blockedMessageMessage": "Ce message provient d'un profil que vous avez bloqué.",
"placeholderEnterMessage": "saisissez un message", "placeholderEnterMessage": "saisissez un message",
"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.",
"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.", "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", "addContactConfirm": "Ajouter le contact %1",
"contactGoto": "Aller à la conversation avec %1",
"addContact": "Ajouter le contact", "addContact": "Ajouter le contact",
"contactGoto": "Aller à la conversation avec %1",
"settingUIColumnOptionSame": "Même réglage que pour le mode portrait", "settingUIColumnOptionSame": "Même réglage que pour le mode portrait",
"settingUIColumnDouble14Ratio": "Double (1:4)", "settingUIColumnDouble14Ratio": "Double (1:4)",
"settingUIColumnDouble12Ratio": "Double (1:2)", "settingUIColumnDouble12Ratio": "Double (1:2)",
@ -110,158 +76,128 @@
"settingUIColumnLandscape": "Colonnes de l'interface utilisateur en mode paysage", "settingUIColumnLandscape": "Colonnes de l'interface utilisateur en mode paysage",
"settingUIColumnPortrait": "Colonnes de l'interface utilisateur en mode portrait", "settingUIColumnPortrait": "Colonnes de l'interface utilisateur en mode portrait",
"localePl": "Polonais", "localePl": "Polonais",
"tooltipReplyToThisMessage": "Répondre à ce message",
"tooltipRemoveThisQuotedMessage": "Supprimer le message cité.", "tooltipRemoveThisQuotedMessage": "Supprimer le message cité.",
"deleteProfileConfirmBtn": "Supprimer vraiment le profil ?", "tooltipReplyToThisMessage": "Répondre à ce message",
"groupNameLabel": "Nom du groupe",
"defaultGroupName": "Un groupe génial",
"inviteToGroupLabel": "Inviter au groupe",
"membershipDescription": "Liste des utilisateurs ayant envoyés un ou plusieurs messages au groupe. Cette liste peut ne pas être représentatives de l'ensemble des membres du groupe.",
"shutdownCwtchTooltip": "Arrêt de Cwtch",
"shutdownCwtchAction": "Arrêt de Cwtch",
"deleteBtn": "Effacer",
"acknowledgedLabel": "Accusé de réception",
"zoomLabel": "Zoom de l'interface (affecte principalement la taille du texte et des boutons)",
"localeIt": "Italien",
"versionTor": "Version %1 avec tor %2",
"version": "Version %1",
"builddate": "Construit le : %2",
"versionBuilddate": "Version : %1 Construite le : %2",
"tooltipAcceptContactRequest": "Acceptez cette demande de contact.",
"tooltipRejectContactRequest": "Refuser cette demande de contact", "tooltipRejectContactRequest": "Refuser cette demande de contact",
"addNewItem": "Ajouter un nouvel élément à la liste", "tooltipAcceptContactRequest": "Acceptez cette demande de contact.",
"localeEs": "Espagnol", "notificationNewMessageFromGroup": "Nouveau message dans un groupe !",
"todoPlaceholder": "À faire...", "notificationNewMessageFromPeer": "Nouveau message d'un contact !",
"pasteAddressToAddContact": "Collez une adresse cwtch, une invitation ou un ensemble de clés ici pour ajouter une nouvelle conversation", "tooltipHidePassword": "Masquer le mot de passe",
"addListItem": "Ajouter un nouvel élément de liste", "tooltipShowPassword": "Afficher le mot de passe",
"cycleMorphsAndroid": "Cliquez pour faire défiler les morphes.\n Appuyez longuement pour réinitialiser.",
"cycleMorphsDesktop": "Cliquez pour faire défiler les morphes.\n Faites un clic droit pour réinitialiser.",
"debugLog": "Activer le journal de la console de débogage",
"joinGroupTab": "Rejoindre un groupe",
"createGroupTab": "Créer un groupe",
"peerAddress": "Adresse",
"peerName": "Nom",
"groupName": "Nom du groupe",
"server": "Serveur",
"invitation": "Invitation",
"cycleCatsAndroid": "Cliquez pour faire défiler les catégories.\nAppuyez longuement pour réinitialiser.",
"cycleCatsDesktop": "Cliquez pour parcourir la catégorie.\n Faites un clic droit pour réinitialiser.",
"cycleColoursAndroid": "Cliquez pour faire défiler les couleurs.\nAppuyez longuement pour réinitialiser.",
"groupAddr": "Adresse",
"createGroup": "Créer un groupe",
"joinGroup": "Rejoindre le groupe",
"blocked": "Bloqué",
"cycleColoursDesktop": "Cliquez pour faire défiler les couleurs.\nCliquez avec le bouton droit de la souris pour réinitialiser.",
"search": "Recherche...",
"serverInfo": "Informations sur le serveur",
"serverConnectivityConnected": "Serveur connecté",
"serverConnectivityDisconnected": "Serveur déconnecté",
"serverSynced": "Synchronisé",
"serverNotSynced": "Synchronisation des nouveaux messages (Cela peut prendre un certain temps)...", "serverNotSynced": "Synchronisation des nouveaux messages (Cela peut prendre un certain temps)...",
"viewServerInfo": "Informations sur le serveur", "groupInviteSettingsWarning": "Vous avez été invité à rejoindre un groupe ! Veuillez activer l'expérience de discussion de groupe dans les paramètres pour afficher cette invitation.",
"update": "Mise à jour", "shutdownCwtchAction": "Arrêt de Cwtch",
"searchList": "Liste de recherche", "shutdownCwtchDialog": "Êtes-vous sûr de vouloir arrêter Cwtch ? Ceci fermera toutes les connexions, et quittera l'application.",
"addListItemBtn": "Ajouter un élément", "shutdownCwtchDialogTitle": "Arrêter Cwtch ?",
"addProfileTitle": "Ajouter un nouveau profil", "shutdownCwtchTooltip": "Arrêt de Cwtch",
"editProfileTitle": "Modifier le profil", "malformedMessage": "Message mal formé",
"profileName": "Pseudo", "profileDeleteSuccess": "Le profil a été supprimé avec succès",
"defaultProfileName": "Alice", "debugLog": "Activer le journal de la console de débogage",
"newProfile": "Nouveau profil", "torNetworkStatus": "Statut du réseau Tor",
"deleteConfirmText": "SUPPRIMER", "addContactFirst": "Ajoutez ou choisissez un contact pour commencer à discuter.",
"deleteConfirmLabel": "Tapez SUPPRIMER pour confirmer", "createProfileToBegin": "Veuillez créer ou déverrouiller un profil pour commencer",
"addNewProfileBtn": "Ajouter un nouveau profil", "nickChangeSuccess": "Le pseudo du profil a été modifié avec succès",
"enterProfilePassword": "Entrez un mot de passe pour consulter vos profils", "addServerFirst": "Vous devez ajouter un serveur avant de pouvoir créer un groupe.",
"editProfile": "Modifier le profil", "deleteProfileSuccess": "Le profil a été supprimé avec succès",
"radioUsePassword": "Mot de passe", "sendInvite": "Envoyer une invitation à un contact ou à un groupe",
"radioNoPassword": "Non chiffré (pas de mot de passe)", "sendMessage": "Envoyer un message",
"saveProfileBtn": "Sauvegarder le profil", "cancel": "Annuler",
"passwordErrorMatch": "Les mots de passe ne correspondent pas", "resetTor": "Réinitialiser",
"passwordChangeError": "Erreur lors de la modification du mot de passe : le mot de passe fourni est rejeté", "torStatus": "Statut de Tor",
"deleteProfileBtn": "Supprimer le profil", "torVersion": "Version de Tor",
"password": "Mot de passe", "sendAnInvitation": "Vous avez envoyé une invitation pour : ",
"error0ProfilesLoadedForPassword": "Aucun profils chargés avec ce mot de passe", "contactSuggestion": "Il s'agit d'une suggestion de contact pour : ",
"yourProfiles": "Vos profils", "rejected": "Rejeté !",
"yourServers": "Vos serveurs", "accepted": "Accepté !",
"unlock": "Déverrouiller", "chatHistoryDefault": "Cette conversation sera supprimée lorsque Cwtch sera fermé ! L'historique des messages peut être activé pour la conversation via le menu Paramètres en haut à droite.",
"settingLanguage": "Langue", "newPassword": "Nouveau mot de passe",
"localeEn": "Anglais",
"localeFr": "Français",
"localePt": "Portugais",
"localeDe": "Allemand",
"settingInterfaceZoom": "Niveau de zoom",
"settingTheme": "Thème",
"themeLight": "Clair",
"themeDark": "Sombre",
"experimentsEnabled": "Activer les expériences",
"dateLastYear": "L'année dernière",
"dateNever": "Jamais",
"titleManageServers": "Gérer les serveurs",
"inviteToGroup": "Vous avez été invité à rejoindre un groupe :",
"leaveGroup": "Quittez cette conversation",
"reallyLeaveThisGroupPrompt": "Êtes-vous sûr de vouloir quitter cette conversation ? Tous les messages et attributs seront supprimés.",
"yesLeave": "Oui, quittez cette conversation", "yesLeave": "Oui, quittez cette conversation",
"noPasswordWarning": "Ne pas utiliser de mot de passe sur ce compte signifie que toutes les données stockées localement ne seront pas chiffrées.", "reallyLeaveThisGroupPrompt": "Êtes-vous sûr de vouloir quitter cette conversation ? Tous les messages et attributs seront supprimés.",
"yourDisplayName": "Pseudo", "leaveGroup": "Quittez cette conversation",
"currentPasswordLabel": "Mot de passe actuel", "inviteToGroup": "Vous avez été invité à rejoindre un groupe :",
"password1Label": "Mot de passe", "pasteAddressToAddContact": "Collez une adresse cwtch, une invitation ou un ensemble de clés ici pour ajouter une nouvelle conversation",
"password2Label": "Saisissez à nouveau le mot de passe",
"passwordErrorEmpty": "Le mot de passe ne peut pas être vide",
"createProfileBtn": "Créer un profil",
"loadingTor": "Chargement de tor...",
"viewGroupMembershipTooltip": "Afficher les membres du groupe",
"networkStatusDisconnected": "Déconnecté d'Internet, vérifiez votre connexion",
"networkStatusAttemptingTor": "Tentative de connexion au réseau Tor",
"networkStatusOnline": "En ligne",
"newConnectionPaneTitle": "Nouvelle connexion",
"enableGroups": "Activer la discussion de groupe",
"enterCurrentPasswordForDelete": "Veuillez entrer le mot de passe actuel pour supprimer ce profil.",
"conversationSettings": "Paramètres de conversation",
"invalidImportString": "Chaîne d'importation non valide",
"contactAlreadyExists": "Le contact existe déjà",
"tooltipOpenSettings": "Ouvrez le volet des paramètres",
"tooltipAddContact": "Ajouter un nouveau contact ou une nouvelle conversation", "tooltipAddContact": "Ajouter un nouveau contact ou une nouvelle conversation",
"titleManageContacts": "Conversations", "titleManageContacts": "Conversations",
"tooltipUnlockProfiles": "Déverrouillez les profils chiffrés en saisissant leur mot de passe.", "titleManageServers": "Gérer les serveurs",
"titleManageProfiles": "Gérer les profils Cwtch", "dateNever": "Jamais",
"descriptionExperiments": "Les expériences de Cwtch sont des fonctionnalités optionnelles et facultatives qui ajoutent des fonctionnalités supplémentaires à Cwtch et qui peuvent avoir des considérations de confidentialité différentes de celles du chat traditionnel résistant aux métadonnées 1:1, par exemple le chat de groupe, l'intégration de robots, etc.", "dateLastYear": "L'année dernière",
"descriptionExperimentsGroups": "L'expérience de groupe permet à Cwtch de se connecter à une infrastructure de serveurs non fiables pour faciliter la communication avec plus d'un contact.",
"descriptionBlockUnknownConnections": "Si elle est activée, cette option fermera automatiquement les connexions des utilisateurs de Cwtch qui n'ont pas été ajoutés à votre liste de contacts.",
"successfullAddedContact": "Ajouté avec succès ",
"dateRightNow": "Maintenant",
"dateLastMonth": "Le mois dernier",
"dateYesterday": "Hier", "dateYesterday": "Hier",
"newPassword": "Nouveau mot de passe", "dateLastMonth": "Le mois dernier",
"chatHistoryDefault": "Cette conversation sera supprimée lorsque Cwtch sera fermé ! L'historique des messages peut être activé pour la conversation via le menu Paramètres en haut à droite.", "dateRightNow": "Maintenant",
"accepted": "Accepté !", "successfullAddedContact": "Ajouté avec succès ",
"rejected": "Rejeté !", "descriptionBlockUnknownConnections": "Si elle est activée, cette option fermera automatiquement les connexions des utilisateurs de Cwtch qui n'ont pas été ajoutés à votre liste de contacts.",
"contactSuggestion": "Il s'agit d'une suggestion de contact pour : ", "descriptionExperimentsGroups": "L'expérience de groupe permet à Cwtch de se connecter à une infrastructure de serveurs non fiables pour faciliter la communication avec plus d'un contact.",
"sendAnInvitation": "Vous avez envoyé une invitation pour : ", "descriptionExperiments": "Les expériences de Cwtch sont des fonctionnalités optionnelles et facultatives qui ajoutent des fonctionnalités supplémentaires à Cwtch et qui peuvent avoir des considérations de confidentialité différentes de celles du chat traditionnel résistant aux métadonnées 1:1, par exemple le chat de groupe, l'intégration de robots, etc.",
"torVersion": "Version de Tor", "titleManageProfiles": "Gérer les profils Cwtch",
"torStatus": "Statut de Tor", "tooltipUnlockProfiles": "Déverrouillez les profils chiffrés en saisissant leur mot de passe.",
"resetTor": "Réinitialiser", "tooltipOpenSettings": "Ouvrez le volet des paramètres",
"cancel": "Annuler", "invalidImportString": "Chaîne d'importation non valide",
"sendMessage": "Envoyer un message", "contactAlreadyExists": "Le contact existe déjà",
"sendInvite": "Envoyer une invitation à un contact ou à un groupe", "conversationSettings": "Paramètres de conversation",
"deleteProfileSuccess": "Le profil a été supprimé avec succès", "enterCurrentPasswordForDelete": "Veuillez entrer le mot de passe actuel pour supprimer ce profil.",
"addServerFirst": "Vous devez ajouter un serveur avant de pouvoir créer un groupe.", "enableGroups": "Activer la discussion de groupe",
"nickChangeSuccess": "Le pseudo du profil a été modifié avec succès", "experimentsEnabled": "Activer les expériences",
"createProfileToBegin": "Veuillez créer ou déverrouiller un profil pour commencer", "localeIt": "Italien",
"addContactFirst": "Ajoutez ou choisissez un contact pour commencer à discuter.", "localeEs": "Espagnol",
"torNetworkStatus": "Statut du réseau Tor", "addListItem": "Ajouter un nouvel élément de liste",
"profileDeleteSuccess": "Le profil a été supprimé avec succès", "addNewItem": "Ajouter un nouvel élément à la liste",
"malformedMessage": "Message mal formé", "todoPlaceholder": "À faire...",
"shutdownCwtchDialogTitle": "Arrêter Cwtch ?", "newConnectionPaneTitle": "Nouvelle connexion",
"shutdownCwtchDialog": "Êtes-vous sûr de vouloir arrêter Cwtch ? Ceci fermera toutes les connexions, et quittera l'application.", "networkStatusOnline": "En ligne",
"groupInviteSettingsWarning": "Vous avez été invité à rejoindre un groupe ! Veuillez activer l'expérience de discussion de groupe dans les paramètres pour afficher cette invitation.", "networkStatusAttemptingTor": "Tentative de connexion au réseau Tor",
"tooltipShowPassword": "Afficher le mot de passe", "networkStatusDisconnected": "Déconnecté d'Internet, vérifiez votre connexion",
"tooltipHidePassword": "Masquer le mot de passe", "viewGroupMembershipTooltip": "Afficher les membres du groupe",
"notificationNewMessageFromPeer": "Nouveau message d'un contact !", "loadingTor": "Chargement de tor...",
"notificationNewMessageFromGroup": "Nouveau message dans un groupe !",
"smallTextLabel": "Petit", "smallTextLabel": "Petit",
"defaultScalingText": "Taille par défaut du texte (échelle:", "defaultScalingText": "Taille par défaut du texte (échelle:",
"builddate": "Construit le : %2",
"version": "Version %1",
"versionTor": "Version %1 avec tor %2",
"themeDark": "Sombre",
"themeLight": "Clair",
"settingTheme": "Thème",
"largeTextLabel": "Large", "largeTextLabel": "Large",
"settingInterfaceZoom": "Niveau de zoom",
"localeDe": "Allemand",
"localePt": "Portugais",
"localeFr": "Français",
"localeEn": "Anglais",
"settingLanguage": "Langue",
"zoomLabel": "Zoom de l'interface (affecte principalement la taille du texte et des boutons)",
"versionBuilddate": "Version : %1 Construite le : %2",
"cwtchSettingsTitle": "Préférences Cwtch", "cwtchSettingsTitle": "Préférences Cwtch",
"unlock": "Déverrouiller",
"yourServers": "Vos serveurs",
"yourProfiles": "Vos profils",
"error0ProfilesLoadedForPassword": "Aucun profils chargés avec ce mot de passe",
"password": "Mot de passe",
"enterProfilePassword": "Entrez un mot de passe pour consulter vos profils",
"addNewProfileBtn": "Ajouter un nouveau profil",
"deleteConfirmText": "SUPPRIMER",
"deleteProfileConfirmBtn": "Supprimer vraiment le profil ?",
"deleteConfirmLabel": "Tapez SUPPRIMER pour confirmer",
"deleteProfileBtn": "Supprimer le profil",
"passwordChangeError": "Erreur lors de la modification du mot de passe : le mot de passe fourni est rejeté",
"passwordErrorMatch": "Les mots de passe ne correspondent pas",
"saveProfileBtn": "Sauvegarder le profil",
"createProfileBtn": "Créer un profil",
"passwordErrorEmpty": "Le mot de passe ne peut pas être vide",
"password2Label": "Saisissez à nouveau le mot de passe",
"password1Label": "Mot de passe",
"currentPasswordLabel": "Mot de passe actuel",
"yourDisplayName": "Pseudo",
"noPasswordWarning": "Ne pas utiliser de mot de passe sur ce compte signifie que toutes les données stockées localement ne seront pas chiffrées.",
"radioNoPassword": "Non chiffré (pas de mot de passe)",
"radioUsePassword": "Mot de passe",
"copiedToClipboardNotification": "Copié dans le presse-papier", "copiedToClipboardNotification": "Copié dans le presse-papier",
"copyBtn": "Copier",
"editProfile": "Modifier le profil",
"newProfile": "Nouveau profil",
"defaultProfileName": "Alice",
"profileName": "Pseudo",
"editProfileTitle": "Modifier le profil",
"addProfileTitle": "Ajouter un nouveau profil",
"deleteBtn": "Effacer",
"saveBtn": "Sauvegarder", "saveBtn": "Sauvegarder",
"displayNameLabel": "Pseudo", "displayNameLabel": "Pseudo",
"addressLabel": "Adresse", "addressLabel": "Adresse",
@ -271,18 +207,49 @@
"chatBtn": "Discuter", "chatBtn": "Discuter",
"rejectGroupBtn": "Refuser", "rejectGroupBtn": "Refuser",
"acceptGroupBtn": "Accepter", "acceptGroupBtn": "Accepter",
"acceptGroupInviteLabel": "Voulez-vous accepter l'invitation au groupe",
"newGroupBtn": "Créer un nouveau groupe", "newGroupBtn": "Créer un nouveau groupe",
"copiedClipboardNotification": "Copié dans le presse-papier", "copiedClipboardNotification": "Copié dans le presse-papier",
"copyBtn": "Copier",
"pendingLabel": "En attente", "pendingLabel": "En attente",
"acknowledgedLabel": "Accusé de réception",
"couldNotSendMsgError": "Impossible d'envoyer ce message", "couldNotSendMsgError": "Impossible d'envoyer ce message",
"dmTooltip": "Envoyer un message privé", "dmTooltip": "Envoyer un message privé",
"membershipDescription": "Liste des utilisateurs ayant envoyés un ou plusieurs messages au groupe. Cette liste peut ne pas être représentatives de l'ensemble des membres du groupe.",
"addListItemBtn": "Ajouter un élément",
"searchList": "Liste de recherche",
"update": "Mise à jour",
"inviteBtn": "Invitation", "inviteBtn": "Invitation",
"inviteToGroupLabel": "Inviter au groupe",
"groupNameLabel": "Nom du groupe",
"viewServerInfo": "Informations sur le serveur",
"serverSynced": "Synchronisé",
"serverConnectivityDisconnected": "Serveur déconnecté",
"serverConnectivityConnected": "Serveur connecté",
"serverInfo": "Informations sur le serveur",
"invitationLabel": "Invitation", "invitationLabel": "Invitation",
"serverLabel": "Serveur", "serverLabel": "Serveur",
"search": "Recherche...",
"cycleColoursDesktop": "Cliquez pour faire défiler les couleurs.\nCliquez avec le bouton droit de la souris pour réinitialiser.",
"cycleColoursAndroid": "Cliquez pour faire défiler les couleurs.\nAppuyez longuement pour réinitialiser.",
"cycleMorphsDesktop": "Cliquez pour faire défiler les morphes.\n Faites un clic droit pour réinitialiser.",
"cycleMorphsAndroid": "Cliquez pour faire défiler les morphes.\n Appuyez longuement pour réinitialiser.",
"cycleCatsDesktop": "Cliquez pour parcourir la catégorie.\n Faites un clic droit pour réinitialiser.",
"cycleCatsAndroid": "Cliquez pour faire défiler les catégories.\nAppuyez longuement pour réinitialiser.",
"blocked": "Bloqué",
"titlePlaceholder": "titre...", "titlePlaceholder": "titre...",
"postNewBulletinLabel": "Envoyer un nouveau bulletin", "postNewBulletinLabel": "Envoyer un nouveau bulletin",
"newBulletinLabel": "Nouveau bulletin", "newBulletinLabel": "Nouveau bulletin",
"joinGroup": "Rejoindre le groupe",
"createGroup": "Créer un groupe",
"groupAddr": "Adresse",
"invitation": "Invitation",
"server": "Serveur",
"groupName": "Nom du groupe",
"peerName": "Nom",
"peerAddress": "Adresse",
"joinGroupTab": "Rejoindre un groupe",
"createGroupTab": "Créer un groupe",
"createGroupBtn": "Créer", "createGroupBtn": "Créer",
"defaultGroupName": "Un groupe génial",
"createGroupTitle": "Créer un groupe" "createGroupTitle": "Créer un groupe"
} }

View File

@ -1,288 +1,255 @@
{ {
"@@locale": "it", "@@locale": "it",
"@@last_modified": "2021-12-20T09:20:03+01:00", "@@last_modified": "2021-11-11T01:02:08+01:00",
"blockUnknownLabel": "Blocca Contatti Sconosciuti", "newMessagesLabel": "New Messages",
"unblockBtn": "Sblocca il Contatto", "localeRU": "Russian",
"dontSavePeerHistory": "Elimina Cronologia", "copyServerKeys": "Copy keys",
"blockBtn": "Blocca il Contatto", "verfiyResumeButton": "Verify\/resume",
"addPeer": "Aggiungi Contatto", "fileCheckingStatus": "Checking download status",
"importLocalServerSelectText": "Seleziona il Server Locale", "fileInterrupted": "Interrupted",
"manageKnownServersButton": "Gestisci i Server Conosciuti", "fileSavedTo": "Saved to",
"manageKnownServersLong": "Gestisci i Server Conosciuti", "plainServerDescription": "We recommend that you protect your Cwtch servers with a password. If you do not set a password on this server then anyone who has access to this device may be able to access information about this server, including sensitive cryptographic keys.",
"serverMetricsLabel": "Metriche del Server", "encryptedServerDescription": "Encrypting a server with a password protects it from other people who may also use this device. Encrypted servers cannot be decrypted, displayed or accessed until the correct password is entered to unlock them.",
"serverTotalMessagesLabel": "Numero Totale di Messaggi", "deleteServerConfirmBtn": "Really delete server",
"enableExperimentClickableLinks": "Abilita Link Cliccabili", "deleteServerSuccess": "Successfully deleted server",
"settingDownloadFolder": "Cartella di Download", "enterCurrentPasswordForDeleteServer": "Please enter current password to delete this server",
"themeColorLabel": "Schema di Colori", "copyAddress": "Copy Address",
"btnSendFile": "Invia File", "settingServersDescription": "The hosting servers experiment enables hosting and managing Cwtch servers",
"newMessagesLabel": "Nuovi Messaggi", "settingServers": "Hosting Servers",
"copiedToClipboardNotification": "Copiato negli Appunti", "enterServerPassword": "Enter password to unlock server",
"groupNameLabel": "Nome del gruppo", "unlockProfileTip": "Please create or unlock a profile to begin!",
"titleManageServers": "Gestisci i Server", "unlockServerTip": "Please create or unlock a server to begin!",
"leaveGroup": "Lascia Questa Conversazione", "addServerTooltip": "Add new server",
"yesLeave": "Sì, Lascia Questa Conversazione", "serversManagerTitleShort": "Servers",
"newPassword": "Nuova Password", "serversManagerTitleLong": "Servers You Host",
"sendMessage": "Invia Messaggio", "saveServerButton": "Save Server",
"tooltipShowPassword": "Mostra la Password", "serverAutostartDescription": "Controls if the application will automatically launch the server on start",
"tooltipHidePassword": "Nascondi la Password", "serverAutostartLabel": "Autostart",
"showMessageButton": "Mostra il Messaggio", "serverEnabledDescription": "Start or stop the server",
"addServerTitle": "Aggiungi Server", "serverEnabled": "Server Enabled",
"editServerTitle": "Modifica il Server", "serverDescriptionDescription": "Your description of the server for personal management use only, will never be shared",
"serverAddress": "Indirizzo del Server", "serverDescriptionLabel": "Server Description",
"serverEnabled": "Server Abilitato", "serverAddress": "Server Address",
"saveServerButton": "Salva il Server", "editServerTitle": "Edit Server",
"serversManagerTitleLong": "Server che Gestisci", "addServerTitle": "Add Server",
"settingServers": "Server di Hosting", "titleManageProfilesShort": "Profiles",
"openFolderButton": "Apri Cartella", "descriptionStreamerMode": "If turned on, this option makes the app more visually private for streaming or presenting with, for example, hiding profile and contact addresses",
"reallyLeaveThisGroupPrompt": "Confermi di voler lasciare questa conversazione? Tutti i messaggi e gli attributi verranno eliminati.",
"dateLastMonth": "Mese Scorso",
"dateLastYear": "L'Anno Scorso",
"titleManageProfiles": "Gestisci i Profili Cwtch",
"contactAlreadyExists": "Il Contatto Esiste Già",
"conversationSettings": "Impostazioni di Conversazione",
"enableGroups": "Abilita la Chat di Gruppo",
"addListItem": "Aggiungi un Nuovo Elemento alla Lista",
"newConnectionPaneTitle": "Nuova Connessione",
"viewGroupMembershipTooltip": "Visualizza i Membri del Gruppo",
"experimentsEnabled": "Abilita Esperimenti",
"yourServers": "I Tuoi Server",
"yourProfiles": "I Tuoi Profili",
"deleteProfileConfirmBtn": "Elimina Definitivamente il Profilo",
"deleteProfileBtn": "Elimina Profilo",
"saveProfileBtn": "Salva il Profilo",
"createProfileBtn": "Crea un Profilo",
"currentPasswordLabel": "Password Corrente",
"yourDisplayName": "Il tuo Nome Visualizzato",
"editProfile": "Modifica Profilo",
"newProfile": "Nuovo Profilo",
"editProfileTitle": "Modifica Profilo",
"puzzleGameBtn": "Gioco di Puzzle",
"searchList": "Elenco di Ricerca",
"dmTooltip": "Clicca per inviare un Messaggio Diretto",
"addListItemBtn": "Aggiungi Elemento",
"viewServerInfo": "Informazioni sul Server",
"serverConnectivityDisconnected": "Server Disconnesso",
"serverConnectivityConnected": "Server Connesso",
"newBulletinLabel": "Nuovo Bollettino",
"createGroupTitle": "Crea un Gruppo",
"defaultGroupName": "Gruppo Fantastico",
"pasteAddressToAddContact": "Incolla qui un indirizzo cwtch, un invito o un gruppo di chiavi per aggiungere una nuova conversazione",
"cycleCatsAndroid": "Clicca per scorrere le categorie.\nPressione lunga per resettare.",
"cycleCatsDesktop": "Clicca per scorrere le categorie.\nClicca con il tasto destro per resettare.",
"cycleMorphsAndroid": "Clicca per scorrere i morph.\nPressione lunga per resettare.",
"cycleMorphsDesktop": "Clicca per scorrere i morph.\nClicca con il tasto destro per resettare.",
"cycleColoursAndroid": "Clicca per scorrere i colori.\nPressione lunga per resettare.",
"cycleColoursDesktop": "Clicca per scorrere i colori.\nClicca con il tasto destro per resettare.",
"noPasswordWarning": "Se non utilizzi una password su questo account, tutti i dati archiviati localmente non verranno criptati",
"descriptionExperiments": "Gli esperimenti di Cwtch sono opzioni abilitabili per aggiungere a Cwtch funzionalità che possono considerare la privacy diversamente rispetto alla tradizionale chat 1:1 resistente ai metadati, ad esempio chat di gruppo, integrazione di bot ecc.",
"shutdownCwtchDialog": "Confermi di voler chiudere Cwtch? Questo chiuderà tutte le connessioni e uscirà dall'applicazione.",
"groupInviteSettingsWarning": "Hai ricevuto l'invito ad unirti ad un gruppo! Abilita l'Esperimento di chat di gruppo in Impostazioni per visualizzare questo Invito.",
"addPeerTab": "Aggiungi un contatto",
"peerNotOnline": "Il contatto è offline. Le applicazioni non possono essere utilizzate in questo momento.",
"peerBlockedMessage": "Il contatto è bloccato",
"peerOfflineMessage": "Il contatto è offline, i messaggi non possono essere recapitati in questo momento",
"networkStatusConnecting": "Connessione alla rete e ai contatti...",
"savePeerHistoryDescription": "Determina se eliminare la cronologia eventualmente associata al contatto.",
"savePeerHistory": "Salva cronologia ",
"profileOnionLabel": "Invia questo indirizzo ai contatti con cui vuoi connetterti",
"importLocalServerLabel": "Importa un server ospitato localmente",
"importLocalServerButton": "Importa %1",
"groupsOnThisServerLabel": "Gruppi di cui sono parte su questo server",
"fieldDescriptionLabel": "Descrizione",
"displayNameTooltip": "Inserisci un nome visualizzato",
"manageKnownServersShort": "Server",
"serverConnectionsLabel": "Connessione",
"experimentClickableLinksDescription": "L'esperimento dei link cliccabili permette di cliccare sugli URL condivisi nei messaggi",
"settingImagePreviews": "Anteprime delle immagini e immagini del profilo",
"settingImagePreviewsDescription": "Le immagini verranno scaricate e visualizzate in anteprima automaticamente. Tieni presente che le anteprime delle immagini possono spesso portare a vulnerabilità di sicurezza e non dovresti abilitare questo esperimento se usi Cwtch con contatti non attendibili. Le immagini del profilo sono previste per Cwtch 1.6.",
"themeNameCwtch": "Cwtch",
"themeNameWitch": "Strega",
"themeNameVampire": "Vampiro",
"themeNameGhost": "Fantasma",
"themeNamePumpkin": "Zucca",
"themeNameMermaid": "Sirena",
"themeNameMidnight": "Mezzanotte",
"themeNameNeon1": "Neon1",
"themeNameNeon2": "Neon2",
"loadingCwtch": "Caricamento Cwtch...",
"storageMigrationModalMessage": "Migrazione dei profili al nuovo formato di archiviazione. L'operazione potrebbe richiedere alcuni minuti...",
"msgAddToAccept": "Aggiungi questo account ai tuoi contatti per accettare questo file.",
"msgConfirmSend": "Confermi di voler inviare?",
"msgFileTooBig": "La dimensione del file non può superare i 10 GB",
"descriptionStreamerMode": "Se attivata, questa opzione rende l'applicazione visivamente più privata per lo streaming o la presentazione, ad esempio nascondendo il profilo e gli indirizzi di contatto",
"retrievingManifestMessage": "Recupero delle informazioni sul file in corso...",
"downloadFileButton": "Scarica",
"labelFilename": "Nome del file",
"labelFilesize": "Dimensione",
"messageEnableFileSharing": "Abilita l'esperimento di condivisione dei file per visualizzare questo messaggio.",
"messageFileSent": "Hai inviato un file",
"titleManageProfilesShort": "Profili",
"tooltipReplyToThisMessage": "Rispondi a questo messaggio",
"tooltipRemoveThisQuotedMessage": "Rimuovi il messaggio citato.",
"localePl": "Polacco",
"settingUIColumnPortrait": "Colonne dell'interfaccia utente in modalità verticale",
"settingUIColumnLandscape": "Colonne dell'interfaccia utente in modalità orizzontale",
"settingUIColumnSingle": "Singola",
"settingUIColumnDouble12Ratio": "Doppia (1:2)",
"settingUIColumnDouble14Ratio": "Doppia (1:4)",
"settingUIColumnOptionSame": "Stessa impostazione della modalità verticale",
"contactGoto": "Vai alla conversazione con %1",
"addContact": "Aggiungi contatto",
"addContactConfirm": "Aggiungi %1 come contatto",
"encryptedProfileDescription": "Criptare un profilo con una password lo protegge da altre persone che potrebbero usare questo dispositivo. I profili criptati non possono essere decriptati, visualizzati o accessibili finché non viene inserita la password corretta per sbloccarli.",
"plainServerDescription": "Ti raccomandiamo di proteggere i tuoi server Cwtch con una password. Se non imposti una password su questo server, chiunque abbia accesso a questo dispositivo potrebbe essere in grado di accedere alle relativ informazioni, compresi dati sensibili come le chiavi crittografiche.",
"plainProfileDescription": "Ti raccomandiamo di proteggere i tuoi profili Cwtch con una password. Se non imposti una password su questo profilo, chiunque abbia accesso a questo dispositivo potrebbe essere in grado di accedere alle relative informazioni, compresi contatti, messaggi e altri dati sensibili come le chiavi crittografiche.",
"placeholderEnterMessage": "Scrivi un messaggio...",
"blockedMessageMessage": "Questo messaggio proviene da un profilo che hai bloccato.",
"blockUnknownConnectionsEnabledDescription": "Le connessioni da contatti sconosciuti sono bloccate. Puoi modificare questa impostazione in Impostazioni",
"archiveConversation": "Archivia questa conversazione",
"streamerModeLabel": "Modalità Streamer\/Presentazione",
"serverDescriptionLabel": "Descrizione del server",
"serverDescriptionDescription": "La tua descrizione del server solo per gestione personale, non sarà mai condivisa",
"serverEnabledDescription": "Avvia o arresta il server",
"serverAutostartLabel": "Avvio automatico",
"serverAutostartDescription": "Controlla se l'applicazione avvierà automaticamente il server all'avvio",
"serversManagerTitleShort": "Gestisci i server",
"addServerTooltip": "Aggiungi nuovo server",
"unlockServerTip": "Crea o sblocca un server per iniziare!",
"unlockProfileTip": "Crea o sblocca un profilo per iniziare!",
"enterServerPassword": "Inserisci la password per sbloccare il server",
"settingServersDescription": "L'esperimento dei server di hosting permette di allocare e gestire i server Cwtch",
"copyAddress": "Copia indirizzo",
"enterCurrentPasswordForDeleteServer": "Inserisci la password attuale per eliminare questo server",
"deleteServerSuccess": "Server eliminato con successo",
"deleteServerConfirmBtn": "Elimina davvero il server",
"encryptedServerDescription": "Criptare un server con una password lo protegge da altre persone che potrebbero usare questo dispositivo. I server criptati non possono essere decriptati, visualizzati o accessibili finché non viene inserita la password corretta per sbloccarli.",
"fileSavedTo": "Salvato in",
"fileInterrupted": "Interrotto",
"fileCheckingStatus": "Controllo dello stato del download",
"verfiyResumeButton": "Verifica\/riprendi",
"copyServerKeys": "Copia chiavi",
"localeRU": "Russo",
"messageFileOffered": "Il contatto offre l'invio di un file",
"tooltipSendFile": "Invia file",
"settingFileSharing": "Condivisione file",
"descriptionFileSharing": "L'esperimento di condivisione dei file ti consente di inviare e ricevere file dai contatti e dai gruppi di Cwtch. Tieni presente che la condivisione di un file con un gruppo farà sì che i membri di quel gruppo si colleghino con te direttamente su Cwtch per scaricarlo.", "descriptionFileSharing": "L'esperimento di condivisione dei file ti consente di inviare e ricevere file dai contatti e dai gruppi di Cwtch. Tieni presente che la condivisione di un file con un gruppo farà sì che i membri di quel gruppo si colleghino con te direttamente su Cwtch per scaricarlo.",
"settingFileSharing": "Condivisione file",
"tooltipSendFile": "Invia file",
"messageFileOffered": "Il contatto offre l'invio di un file",
"messageFileSent": "You sent a file",
"messageEnableFileSharing": "Enable the file sharing experiment to view this message.",
"labelFilesize": "Size",
"labelFilename": "Filename",
"downloadFileButton": "Download",
"openFolderButton": "Open Folder",
"retrievingManifestMessage": "Retrieving file information...",
"streamerModeLabel": "Streamer\/Presentation Mode",
"archiveConversation": "Archive this Conversation",
"profileOnionLabel": "Inviare questo indirizzo ai peer con cui si desidera connettersi",
"addPeerTab": "Aggiungi un peer",
"addPeer": "Aggiungi peer",
"peerNotOnline": "Il peer è offline. Le applicazioni non possono essere utilizzate in questo momento.",
"peerBlockedMessage": "Il peer è bloccato",
"peerOfflineMessage": "Il peer è offline, i messaggi non possono essere recapitati in questo momento",
"blockBtn": "Blocca il peer",
"savePeerHistory": "Salva cronologia peer",
"savePeerHistoryDescription": "Determina se eliminare o meno ogni cronologia eventualmente associata al peer.",
"dontSavePeerHistory": "Elimina cronologia dei peer",
"unblockBtn": "Sblocca il peer",
"blockUnknownLabel": "Blocca peer sconosciuti",
"blockUnknownConnectionsEnabledDescription": "Connections from unknown contacts are blocked. You can change this in Settings",
"networkStatusConnecting": "Connessione alla rete e ai peer ...",
"showMessageButton": "Show Message",
"blockedMessageMessage": "This message is from a profile you have blocked.",
"placeholderEnterMessage": "Type a message...",
"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",
"settingUIColumnOptionSame": "Same as portrait mode setting",
"settingUIColumnDouble14Ratio": "Double (1:4)",
"settingUIColumnDouble12Ratio": "Double (1:2)",
"settingUIColumnSingle": "Single",
"settingUIColumnLandscape": "UI Columns in Landscape Mode",
"settingUIColumnPortrait": "UI Columns in Portrait Mode",
"localePl": "Polish",
"tooltipRemoveThisQuotedMessage": "Remove quoted message.",
"tooltipReplyToThisMessage": "Reply to this message",
"tooltipRejectContactRequest": "Rifiuta questa richiesta di contatto",
"tooltipAcceptContactRequest": "Accetta questa richiesta di contatto.",
"notificationNewMessageFromGroup": "Nuovo messaggio in un gruppo!",
"notificationNewMessageFromPeer": "Nuovo messaggio da un contatto!",
"tooltipHidePassword": "Nascondi la password",
"tooltipShowPassword": "Mostra la password",
"serverNotSynced": "Sincronizzazione nuovi messaggi (l'operazione può richiedere del tempo)...", "serverNotSynced": "Sincronizzazione nuovi messaggi (l'operazione può richiedere del tempo)...",
"enterCurrentPasswordForDelete": "Inserisci la password attuale per eliminare questo profilo.", "groupInviteSettingsWarning": "Sei stato invitato ad unirti ad un gruppo! Abilita l'Esperimento di chat di gruppo in Impostazioni per visualizzare questo Invito.",
"invalidImportString": "Importazione stringa non valida", "shutdownCwtchAction": "Chiudi Cwtch",
"tooltipOpenSettings": "Aprire il pannello delle impostazioni", "shutdownCwtchDialog": "Sei sicuro di voler chiudere Cwtch? Questo chiuderà tutte le connessioni e uscirà dall'applicazione.",
"shutdownCwtchDialogTitle": "Chiudi Cwtch?",
"shutdownCwtchTooltip": "Chiudi Cwtch",
"malformedMessage": "Messaggio non valido",
"profileDeleteSuccess": "Profilo eliminato con successo",
"debugLog": "Attiva la registrazione del debug della console",
"torNetworkStatus": "Stato della rete Tor",
"addContactFirst": "Aggiungi o scegli un contatto per iniziare a chattare.",
"createProfileToBegin": "Crea o sblocca un profilo per iniziare",
"nickChangeSuccess": "Nickname del profilo modificato con successo",
"addServerFirst": "È necessario aggiungere un server prima di poter creare un gruppo",
"deleteProfileSuccess": "Profilo eliminato con successo",
"sendInvite": "Invia un invito a un contatto o a un gruppo",
"sendMessage": "Invia messaggio",
"cancel": "Annulla",
"resetTor": "Resettare",
"torStatus": "Stato di Tor",
"torVersion": "Versione di Tor",
"sendAnInvitation": "Hai inviato un invito per:",
"contactSuggestion": "Questo è un suggerimento di contatto per:",
"rejected": "Rifiutato!",
"accepted": "Accettato!",
"chatHistoryDefault": "Questa conversazione sarà cancellata quando Cwtch sarà chiuso! La cronologia dei messaggi può essere abilitata per ogni conversazione tramite il menu Impostazioni in alto a destra.",
"newPassword": "Nuova password",
"yesLeave": "Sì, lascia questa conversazione",
"reallyLeaveThisGroupPrompt": "Uscire da questa conversazione? Tutti i messaggi e gli attributi verranno eliminati.",
"leaveGroup": "Lascia questa conversazione",
"inviteToGroup": "Hai ricevuto un invito a unirti a un gruppo:",
"pasteAddressToAddContact": "Incolla qui un indirizzo cwtch, un invito o un mazzo di chiavi per aggiungere una nuova conversazione",
"tooltipAddContact": "Aggiungi un nuovo contatto o conversazione", "tooltipAddContact": "Aggiungi un nuovo contatto o conversazione",
"titleManageContacts": "Conversazioni", "titleManageContacts": "Conversazioni",
"tooltipUnlockProfiles": "Sblocca i profili crittografati inserendo la loro password.", "titleManageServers": "Gestisci i server",
"descriptionExperimentsGroups": "L'esperimento di gruppo permette a Cwtch di connettersi con un'infrastruttura server non fidata per facilitare la comunicazione con più di un contatto.",
"descriptionBlockUnknownConnections": "Se attivata, questa opzione chiuderà automaticamente le connessioni degli utenti Cwtch che non sono stati aggiunti alla tua lista di contatti.",
"successfullAddedContact": "Aggiunto con successo ",
"dateRightNow": "Ora",
"dateYesterday": "Ieri",
"dateNever": "Mai", "dateNever": "Mai",
"inviteToGroup": "Hai ricevuto un invito a unirti a un gruppo:", "dateLastYear": "L'anno scorso",
"chatHistoryDefault": "Questa conversazione sarà cancellata quando Cwtch sarà chiuso! La cronologia dei messaggi può essere abilitata per ogni conversazione tramite il menu Impostazioni in alto a destra.", "dateYesterday": "Ieri",
"accepted": "Accettato!", "dateLastMonth": "Mese scorso",
"rejected": "Rifiutato!", "dateRightNow": "Ora",
"contactSuggestion": "Questo è un suggerimento di contatto per:", "successfullAddedContact": "Aggiunto con successo ",
"sendAnInvitation": "Hai inviato un invito per:", "descriptionBlockUnknownConnections": "Se attivata, questa opzione chiuderà automaticamente le connessioni degli utenti Cwtch che non sono stati aggiunti alla tua lista di contatti.",
"torVersion": "Versione di Tor", "descriptionExperimentsGroups": "L'esperimento di gruppo permette a Cwtch di connettersi con un'infrastruttura server non fidata per facilitare la comunicazione con più di un contatto.",
"torStatus": "Stato di Tor", "descriptionExperiments": "Gli esperimenti di Cwtch sono opzioni a scelta che aggiungono a Cwtch funzionalità che possono avere diverse considerazioni sulla privacy rispetto alla tradizionale chat 1:1 resistente ai metadati, ad esempio chat di gruppo, integrazione di bot ecc.",
"resetTor": "Resettare", "titleManageProfiles": "Gestisci i profili Cwtch",
"cancel": "Annulla", "tooltipUnlockProfiles": "Sblocca i profili crittografati inserendo la loro password.",
"sendInvite": "Invia un invito a un contatto o a un gruppo", "tooltipOpenSettings": "Aprire il pannello delle impostazioni",
"deleteProfileSuccess": "Profilo eliminato con successo", "invalidImportString": "Importazione stringa non valida",
"addServerFirst": "È necessario aggiungere un server prima di poter creare un gruppo", "contactAlreadyExists": "Il contatto esiste già",
"nickChangeSuccess": "Nickname del profilo modificato con successo", "conversationSettings": "Impostazioni di conversazione",
"createProfileToBegin": "Crea o sblocca un profilo per iniziare", "enterCurrentPasswordForDelete": "Inserisci la password attuale per eliminare questo profilo.",
"addContactFirst": "Aggiungi o scegli un contatto per iniziare a chattare.", "enableGroups": "Abilita la chat di gruppo",
"torNetworkStatus": "Stato della rete Tor", "experimentsEnabled": "Abilita esperimenti",
"debugLog": "Attiva la registrazione del debug della console",
"profileDeleteSuccess": "Profilo eliminato con successo",
"malformedMessage": "Messaggio non valido",
"shutdownCwtchTooltip": "Chiudi Cwtch",
"shutdownCwtchDialogTitle": "Chiudi Cwtch?",
"shutdownCwtchAction": "Chiudi Cwtch",
"notificationNewMessageFromPeer": "Nuovo messaggio da un contatto!",
"notificationNewMessageFromGroup": "Nuovo messaggio in un gruppo!",
"tooltipAcceptContactRequest": "Accetta questa richiesta di contatto.",
"tooltipRejectContactRequest": "Rifiuta questa richiesta di contatto",
"versionBuilddate": "Versione: %1 Costruito il: %2",
"versionTor": "Versione %1 con tor %2",
"version": "Versione %1",
"builddate": "Costruito il: %2",
"localeEn": "Inglese",
"localeIt": "Italiano", "localeIt": "Italiano",
"localeEs": "Spagnolo", "localeEs": "Spagnolo",
"addListItem": "Aggiungi un nuovo elemento alla lista",
"addNewItem": "Aggiungi un nuovo elemento alla lista",
"todoPlaceholder": "Da fare...",
"newConnectionPaneTitle": "Nuova connessione",
"networkStatusOnline": "Online",
"networkStatusAttemptingTor": "Tentativo di connessione alla rete Tor",
"networkStatusDisconnected": "Disconnesso da Internet, controlla la tua connessione",
"viewGroupMembershipTooltip": "Visualizza i membri del gruppo",
"loadingTor": "Caricamento di tor...",
"smallTextLabel": "Piccolo",
"defaultScalingText": "Testo di dimensioni predefinite (fattore di scala:",
"builddate": "Costruito il: %2",
"version": "Versione %1",
"versionTor": "Versione %1 con tor %2",
"themeDark": "Scuro",
"themeLight": "Chiaro",
"settingTheme": "Tema",
"largeTextLabel": "Grande",
"settingInterfaceZoom": "Livello di zoom",
"localeDe": "Tedesco", "localeDe": "Tedesco",
"localePt": "Portoghese", "localePt": "Portoghese",
"localeFr": "Francese", "localeFr": "Francese",
"serverLabel": "Server", "localeEn": "Inglese",
"createGroupBtn": "Crea",
"createGroupTab": "Crea un gruppo",
"joinGroupTab": "Unisciti a un gruppo",
"peerAddress": "Indirizzo",
"peerName": "Nome",
"groupName": "Nome del gruppo",
"server": "Server",
"invitation": "Invito",
"groupAddr": "Indirizzo",
"createGroup": "Crea un gruppo",
"joinGroup": "Unisciti al gruppo",
"postNewBulletinLabel": "Pubblica un nuovo bollettino",
"titlePlaceholder": "titolo...",
"blocked": "Bloccato",
"search": "Ricerca...",
"copyBtn": "Copia",
"copiedClipboardNotification": "Copiato negli Appunti",
"newGroupBtn": "Crea un nuovo gruppo",
"invitationLabel": "Invito",
"serverInfo": "Informazioni sul server",
"membershipDescription": "Di seguito è riportato un elenco di utenti che hanno inviato messaggi al gruppo. Questo elenco potrebbe non corrispondere a tutti gli utenti che hanno accesso al gruppo.",
"couldNotSendMsgError": "Impossibile inviare questo messaggio",
"acknowledgedLabel": "Riconosciuto",
"pendingLabel": "In corso",
"acceptGroupInviteLabel": "Vuoi accettare l'invito a",
"acceptGroupBtn": "Accetta",
"rejectGroupBtn": "Rifiuta",
"chatBtn": "Chat",
"listsBtn": "Liste",
"bulletinsBtn": "Bollettini",
"addressLabel": "Indirizzo",
"displayNameLabel": "Nome visualizzato",
"saveBtn": "Salva",
"password": "Password",
"error0ProfilesLoadedForPassword": "0 profili caricati con quella password",
"unlock": "Sblocca",
"addNewItem": "Aggiungi un nuovo elemento alla lista",
"todoPlaceholder": "Da fare...",
"serverSynced": "Sincronizzato",
"inviteToGroupLabel": "Invitare nel gruppo",
"inviteBtn": "Invitare",
"deleteBtn": "Elimina",
"update": "Aggiornamento",
"addProfileTitle": "Aggiungi nuovo profilo",
"profileName": "Nome visualizzato",
"defaultProfileName": "Alice",
"radioUsePassword": "Password",
"radioNoPassword": "Non criptato (senza password)",
"password1Label": "Password",
"password2Label": "Reinserire la password",
"passwordErrorEmpty": "La password non può essere vuota",
"passwordErrorMatch": "Le password non corrispondono",
"passwordChangeError": "Errore durante la modifica della password: password fornita rifiutata",
"deleteConfirmLabel": "Digita ELIMINA per confermare",
"deleteConfirmText": "ELIMINA",
"addNewProfileBtn": "Aggiungi nuovo profilo",
"enterProfilePassword": "Inserisci una password per visualizzare i tuoi profili",
"cwtchSettingsTitle": "Impostazioni di Cwtch",
"zoomLabel": "Zoom dell'interfaccia (influisce principalmente sulle dimensioni del testo e dei pulsanti)",
"settingLanguage": "Lingua", "settingLanguage": "Lingua",
"settingInterfaceZoom": "Livello di zoom", "zoomLabel": "Zoom dell'interfaccia (influisce principalmente sulle dimensioni del testo e dei pulsanti)",
"largeTextLabel": "Grande", "versionBuilddate": "Versione: %1 Costruito il: %2",
"settingTheme": "Tema", "cwtchSettingsTitle": "Impostazioni di Cwtch",
"themeLight": "Chiaro", "unlock": "Sblocca",
"themeDark": "Scuro", "yourServers": "I tuoi server",
"defaultScalingText": "Testo di dimensioni predefinite (fattore di scala:", "yourProfiles": "I tuoi profili",
"smallTextLabel": "Piccolo", "error0ProfilesLoadedForPassword": "0 profili caricati con quella password",
"loadingTor": "Caricamento di tor...", "password": "Password",
"networkStatusDisconnected": "Disconnesso da Internet, controlla la tua connessione", "enterProfilePassword": "Inserisci una password per visualizzare i tuoi profili",
"networkStatusAttemptingTor": "Tentativo di connessione alla rete Tor", "addNewProfileBtn": "Aggiungi nuovo profilo",
"networkStatusOnline": "Online" "deleteConfirmText": "ELIMINA",
"deleteProfileConfirmBtn": "Elimina realmente il profilo",
"deleteConfirmLabel": "Digita ELIMINA per confermare",
"deleteProfileBtn": "Elimina profilo",
"passwordChangeError": "Errore durante la modifica della password: password fornita rifiutata",
"passwordErrorMatch": "Le password non corrispondono",
"saveProfileBtn": "Salva il profilo",
"createProfileBtn": "Crea un profilo",
"passwordErrorEmpty": "La password non può essere vuota",
"password2Label": "Reinserire la password",
"password1Label": "Password",
"currentPasswordLabel": "Password corrente",
"yourDisplayName": "Il tuo nome visualizzato",
"noPasswordWarning": "Non utilizzare una password su questo account significa che tutti i dati archiviati localmente non verranno criptati",
"radioNoPassword": "Non criptato (senza password)",
"radioUsePassword": "Password",
"copiedToClipboardNotification": "Copiato negli Appunti",
"copyBtn": "Copia",
"editProfile": "Modifica profilo",
"newProfile": "Nuovo profilo",
"defaultProfileName": "Alice",
"profileName": "Nome visualizzato",
"editProfileTitle": "Modifica profilo",
"addProfileTitle": "Aggiungi nuovo profilo",
"deleteBtn": "Elimina",
"saveBtn": "Salva",
"displayNameLabel": "Nome visualizzato",
"addressLabel": "Indirizzo",
"puzzleGameBtn": "Gioco di puzzle",
"bulletinsBtn": "Bollettini",
"listsBtn": "Liste",
"chatBtn": "Chat",
"rejectGroupBtn": "Rifiuta",
"acceptGroupBtn": "Accetta",
"acceptGroupInviteLabel": "Vuoi accettare l'invito a",
"newGroupBtn": "Crea un nuovo gruppo",
"copiedClipboardNotification": "Copiato negli Appunti",
"pendingLabel": "In corso",
"acknowledgedLabel": "Riconosciuto",
"couldNotSendMsgError": "Impossibile inviare questo messaggio",
"dmTooltip": "Clicca per inviare un Messagio Diretto",
"membershipDescription": "Di seguito è riportato un elenco di utenti che hanno inviato messaggi al gruppo. Questo elenco potrebbe non corrispondere a tutti gli utenti che hanno accesso al gruppo.",
"addListItemBtn": "Aggiungi elemento",
"searchList": "Cerca nella lista",
"update": "Aggiornamento",
"inviteBtn": "Invitare",
"inviteToGroupLabel": "Invitare nel gruppo",
"groupNameLabel": "Nome del gruppo",
"viewServerInfo": "Informazioni sul server",
"serverSynced": "Sincronizzato",
"serverConnectivityDisconnected": "Server disconnesso",
"serverConnectivityConnected": "Server connesso",
"serverInfo": "Informazioni sul server",
"invitationLabel": "Invito",
"serverLabel": "Server",
"search": "Ricerca...",
"cycleColoursDesktop": "Fare clic per scorrere i colori.\nCliccare con il tasto destro per resettare.",
"cycleColoursAndroid": "Fare clic per scorrere i colori.\nPressione lunga per resettare.",
"cycleMorphsDesktop": "Fare clic per scorrere i morph.\nCliccare con il tasto destro per resettare.",
"cycleMorphsAndroid": "Fare clic per scorrere i morph.\nPressione lunga per resettare.",
"cycleCatsDesktop": "Fare clic per scorrere le categorie.\nCliccare con il tasto destro per resettare.",
"cycleCatsAndroid": "Fare clic per scorrere le categorie.\nPressione lunga per resettare.",
"blocked": "Bloccato",
"titlePlaceholder": "titolo...",
"postNewBulletinLabel": "Pubblica un nuovo bollettino",
"newBulletinLabel": "Nuovo bollettino",
"joinGroup": "Unisciti al gruppo",
"createGroup": "Crea un gruppo",
"groupAddr": "Indirizzo",
"invitation": "Invito",
"server": "Server",
"groupName": "Nome del gruppo",
"peerName": "Nome",
"peerAddress": "Indirizzo",
"joinGroupTab": "Unisciti a un gruppo",
"createGroupTab": "Crea un gruppo",
"createGroupBtn": "Crea",
"defaultGroupName": "Gruppo fantastico",
"createGroupTitle": "Crea un gruppo"
} }

View File

@ -1,288 +1,255 @@
{ {
"@@locale": "pl", "@@locale": "pl",
"@@last_modified": "2021-12-20T09:20:03+01:00", "@@last_modified": "2021-11-11T01:02:08+01:00",
"msgAddToAccept": "Dodaj tego użytkownika do znajomych aby pobrać plik.", "newMessagesLabel": "New Messages",
"btnSendFile": "Wyślij plik", "localeRU": "Russian",
"msgConfirmSend": "Na pewno chcesz wysłać ten plik?",
"msgFileTooBig": "Rozmiar pliku nie może przekraczać 10 GB",
"storageMigrationModalMessage": "Migrowanie profili do nowego formatu. To może chwilę potrwać...",
"loadingCwtch": "Ładowanie Cwtch...",
"themeColorLabel": "Motyw",
"themeNameNeon2": "Neon 2",
"themeNameNeon1": "Neon 1",
"themeNameMidnight": "Północ",
"themeNameMermaid": "Syrena",
"themeNamePumpkin": "Dynia",
"themeNameGhost": "Duch",
"themeNameVampire": "Wampir",
"themeNameWitch": "Czarownica",
"themeNameCwtch": "Cwtch",
"settingDownloadFolder": "Folder dla pobranych plików",
"settingImagePreviewsDescription": "Automatyczne pobieranie i podgląd obrazów. Pamiętaj, że podgląd obrazów jest potencjalną luką w zabezpieczeniach i nie należy używać tej eksperymentalnej funkcjonalności jeśli używasz Cwtch do komunikacji z niezaufanymi osobami. Zdjęcia profilowe są przewidziane na wersję Cwtch 1.6",
"settingImagePreviews": "Podgląd zdjęć i zdjęcia profilowe",
"experimentClickableLinksDescription": "Klikalne linki (eksperymentalne). Umożliwia klikanie na linki w wiadomościach, aby je otworzyć",
"enableExperimentClickableLinks": "Włącz klikalne linki",
"serverConnectionsLabel": "Połączenie",
"serverTotalMessagesLabel": "Wiadomości łącznie",
"serverMetricsLabel": "Statystyki serwera",
"manageKnownServersShort": "Serwery",
"manageKnownServersLong": "Zarządzaj znanymi serwerami",
"displayNameTooltip": "Wprowadź nazwę",
"manageKnownServersButton": "Zarządzaj znanymi serwerami",
"fieldDescriptionLabel": "Opis",
"groupsOnThisServerLabel": "Grupy na tym serwerze, których jesteś członkiem",
"importLocalServerButton": "Importuj %1",
"importLocalServerSelectText": "Wybierz lokalny serwer",
"importLocalServerLabel": "Importuj lokalnie hostowany serwer",
"titleManageServers": "Zarządzaj serwerami",
"leaveGroup": "Opuść grupę",
"yesLeave": "Opuść",
"newPassword": "Nowe hasło",
"accepted": "Zaakceptowano!",
"rejected": "Odrzucono!",
"sendAnInvitation": "You sent an invitation for: ",
"torVersion": "Wersja Tor",
"torStatus": "Status Tor",
"resetTor": "Reset",
"cancel": "Anuluj",
"sendMessage": "Wyślij wiadomość",
"sendInvite": "Wyślij zaproszenie do znajomych albo do grupy",
"deleteProfileSuccess": "Profil został usunięty",
"nickChangeSuccess": "Nazwa profilu została zmieniona",
"torNetworkStatus": "Status sieci Tor",
"debugLog": "Włącz zapisywanie logów konsoli",
"profileDeleteSuccess": "Profil został usunięty",
"malformedMessage": "Wiadomość uszkodzona",
"shutdownCwtchTooltip": "Zamknij Cwtch",
"shutdownCwtchDialogTitle": "Zamknąć Cwtch?",
"shutdownCwtchAction": "Zamknij Cwtch",
"tooltipShowPassword": "Pokaż hasło",
"tooltipHidePassword": "Ukryj hasło",
"notificationNewMessageFromPeer": "Nowa wiadomość od znajomego!",
"notificationNewMessageFromGroup": "Nowa wiadomość w grupie!",
"tooltipAcceptContactRequest": "Akceptuj zaproszenie do znajomych",
"tooltipRejectContactRequest": "Odrzuć zaproszenie do znajomych",
"tooltipReplyToThisMessage": "Odpowiedz na tę wiadomość",
"tooltipRemoveThisQuotedMessage": "Usuń cytowaną wiadomość.",
"settingUIColumnDouble12Ratio": "Podwójny (1:2)",
"settingUIColumnSingle": "Pojedynczy",
"settingUIColumnDouble14Ratio": "Podwójny (1:4)",
"settingUIColumnOptionSame": "Tak samo jak w przypadku trybu wertykalnego",
"contactGoto": "Przejdź do konwersacji z %1",
"addContact": "Dodaj znajomego",
"addContactConfirm": "Dodaj znajomego %1",
"placeholderEnterMessage": "Wpisz wiadomość...",
"blockedMessageMessage": "Ta wiadomość jest od użytkownika, który został przez Ciebie zablokowany",
"showMessageButton": "Pokaż wiadomość",
"addServerTitle": "Dodaj serwer",
"editServerTitle": "Edytuj serwer",
"serverAddress": "Adres serwera",
"serverDescriptionLabel": "Opis serwera",
"serverEnabled": "Serwer włączony",
"serverEnabledDescription": "Uruchom lub zatrzymaj serwer",
"serverAutostartLabel": "Autostart",
"saveServerButton": "Zapisz serwer",
"serversManagerTitleLong": "Serwery, które hostujesz",
"serversManagerTitleShort": "Serwery",
"addServerTooltip": "Dodaj nowy serwer",
"enterServerPassword": "Wprowadź hasło, aby odblokować serwer",
"settingServers": "Hostowanie serwerów",
"enterCurrentPasswordForDeleteServer": "Wprowadź aktualne hasło, aby usunąć ten serwer",
"newMessagesLabel": "Nowe wiadomości",
"localePl": "Polski",
"localeRU": "Rosyjski",
"copyAddress": "Skopiuj adres",
"deleteServerSuccess": "Usunięto serwer",
"deleteServerConfirmBtn": "Usuń",
"fileSavedTo": "Zapisano do",
"fileCheckingStatus": "Sprawdzanie statusu pobierania",
"verfiyResumeButton": "Zweryfikuj\/wznów",
"copyServerKeys": "Kopiuj klucze", "copyServerKeys": "Kopiuj klucze",
"fileInterrupted": "Przerwano", "verfiyResumeButton": "Zweryfikuj\/wznów",
"encryptedServerDescription": "Zaszyfrowanie serwera hasłem chroni go przed dostępem innych osób korzystających z tego urządzenia.", "fileCheckingStatus": "Sprawdzanie stanu pobierania",
"plainServerDescription": "Zalecamy ustawienie hasła dla Cwtch. Jeśli hasło nie zostanie ustawione, każdy z dostępem do tego urządzenia uzyska dostęp do tego serwera, w tym do wrażliwych kluczy kryptograficznych.", "fileInterrupted": "Przerwane",
"settingServersDescription": "Hostowanie serwerów (eksperymentalne) umożliwia tworzenie i zarządzanie serwerami Cwtch", "fileSavedTo": "Zapisano do",
"unlockProfileTip": "Utwórz albo odblokuj profil aby rozpocząć!", "plainServerDescription": "We recommend that you protect your Cwtch servers with a password. If you do not set a password on this server then anyone who has access to this device may be able to access information about this server, including sensitive cryptographic keys.",
"unlockServerTip": "Utwórz albo odblokuj serwer aby rozpocząć!", "encryptedServerDescription": "Encrypting a server with a password protects it from other people who may also use this device. Encrypted servers cannot be decrypted, displayed or accessed until the correct password is entered to unlock them.",
"serverAutostartDescription": "Decyduje, czy aplikacja automatycznie włączy serwer po uruchomieniu", "deleteServerConfirmBtn": "Naprawdę usuń serwer",
"serverDescriptionDescription": "Opis serwera widoczny tylko dla Ciebie", "deleteServerSuccess": "Pomyślnie usunięto serwer",
"blockUnknownConnectionsEnabledDescription": "Ta konwersacja zostanie usunięta gdy zamkniesz Cwtch! Możesz włączyć zapisywanie wiadomości dla każdej konwersacji osobno w menu w prawym górnym rogu.", "enterCurrentPasswordForDeleteServer": "Please enter current password to delete this server",
"archiveConversation": "Zarchiwizuj tę rozmowę", "copyAddress": "Skopiuj adres",
"streamerModeLabel": "Tryb streamera\/prezentacji", "settingServersDescription": "The hosting servers experiment enables hosting and managing Cwtch servers",
"retrievingManifestMessage": "Pobieranie informacji o pliku...", "settingServers": "Hosting Servers",
"openFolderButton": "Otwórz folder", "enterServerPassword": "Enter password to unlock server",
"downloadFileButton": "Pobierz", "unlockProfileTip": "Please create or unlock a profile to begin!",
"labelFilename": "Nazwa pliku", "unlockServerTip": "Please create or unlock a server to begin!",
"labelFilesize": "Rozmiar", "addServerTooltip": "Add new server",
"messageEnableFileSharing": "Włącz udostępnianie plików (eksperymentalne) aby wyświetlić tę wiadomość", "serversManagerTitleShort": "Servers",
"messageFileSent": "Plik został wysłany", "serversManagerTitleLong": "Servers You Host",
"messageFileOffered": "Znajomy chce wysłać Ci plik", "saveServerButton": "Save Server",
"tooltipSendFile": "Wyślij plik", "serverAutostartDescription": "Controls if the application will automatically launch the server on start",
"serverAutostartLabel": "Autostart",
"serverEnabledDescription": "Start or stop the server",
"serverEnabled": "Server Enabled",
"serverDescriptionDescription": "Your description of the server for personal management use only, will never be shared",
"serverDescriptionLabel": "Server Description",
"serverAddress": "Server Address",
"editServerTitle": "Edit Server",
"addServerTitle": "Add Server",
"titleManageProfilesShort": "Profile",
"descriptionStreamerMode": "If turned on, this option makes the app more visually private for streaming or presenting with, for example, hiding profile and contact addresses",
"descriptionFileSharing": "Eksperyment udostępniania plików pozwala na wysyłanie i odbieranie plików od kontaktów i grup Cwtch. Zauważ, że udostępnienie pliku grupie spowoduje, że członkowie tej grupy połączą się z Tobą bezpośrednio przez Cwtch, aby go pobrać.",
"settingFileSharing": "Udostępnianie plików", "settingFileSharing": "Udostępnianie plików",
"descriptionFileSharing": "Udostępnianie plików (eksperymentalne) umożliwia wysyłanie i otrzymywanie plików od znajomych i grup. Pamiętaj, że udostępnienie pliku grupie spowoduje bezpośrednie połączenie się członków grupy z Tobą przez Cwtch w celu pobrania pliku.", "tooltipSendFile": "Wyślij plik",
"titleManageProfilesShort": "Profil", "messageFileOffered": "Kontakt proponuje wysłanie Ci pliku",
"descriptionStreamerMode": "Ukrywa wrażliwe elementy interfejsu, np. adresy profili i kontaktów, na potrzeby udostępniania swojego ekranu", "messageFileSent": "Plik został wysłany",
"plainProfileDescription": "Zalecamy ustawienie hasła dla profilu Cwtch. Jeśli hasło nie zostanie ustawione, każdy z dostępem do tego urządzenia uzyska dostęp do tego profilu, w tym do wiadomości, znajomych i wrażliwych kluczy kryptograficznych.", "messageEnableFileSharing": "Włącz eksperyment udostępniania plików, aby wyświetlić tę wiadomość.",
"encryptedProfileDescription": "Zaszyfrowanie profilu hasłem chroni go przed dostępem innych osób korzystających z tego urządzenia", "labelFilesize": "Rozmiar",
"settingUIColumnLandscape": "Kolumny interfejsu w trybie horyzontalnym", "labelFilename": "Nazwa pliku",
"settingUIColumnPortrait": "Kolumny interfejsu w trybie wertykalnym", "downloadFileButton": "Pobierz",
"groupInviteSettingsWarning": "Zaproszono Cię do grupy! Aby wyświetlić to zaproszenie, włącz Czaty Grupowe (eksperymentalne) w Ustawieniach", "openFolderButton": "Otwórz folder",
"shutdownCwtchDialog": "Zamknąć Cwtch? Wszystkie połączenia zostaną zakończone, a aplikacja zostanie zamknięta.", "retrievingManifestMessage": "Pobieranie informacji o pliku...",
"addContactFirst": "Wybierz lub dodaj znajomego aby rozpocząć konwersację.", "streamerModeLabel": "Tryb streamera\/prezentacji",
"createProfileToBegin": "Utwórz albo odblokuj profil aby rozpocząć", "archiveConversation": "Zarchiwizuj tę rozmowę",
"addServerFirst": "Musisz dodać serwer, aby utworzyć grupę", "profileOnionLabel": "Send this address to contacts you want to connect with",
"addPeerTab": "Add a contact",
"addPeer": "Add Contact",
"peerNotOnline": "Contact is offline. Applications cannot be used right now.",
"peerBlockedMessage": "Contact is blocked",
"peerOfflineMessage": "Contact is offline, messages can't be delivered right now",
"blockBtn": "Block Contact",
"savePeerHistory": "Save History",
"savePeerHistoryDescription": "Determines whether or not to delete any history associated with the contact.",
"dontSavePeerHistory": "Delete History",
"unblockBtn": "Unblock Contact",
"blockUnknownLabel": "Block Unknown Contacts",
"blockUnknownConnectionsEnabledDescription": "Połączenia od nieznanych kontaktów są blokowane. Można to zmienić w Ustawieniach",
"networkStatusConnecting": "Connecting to network and contacts...",
"showMessageButton": "Show Message",
"blockedMessageMessage": "This message is from a profile you have blocked.",
"placeholderEnterMessage": "Type a message...",
"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",
"settingUIColumnOptionSame": "Same as portrait mode setting",
"settingUIColumnDouble14Ratio": "Double (1:4)",
"settingUIColumnDouble12Ratio": "Double (1:2)",
"settingUIColumnSingle": "Single",
"settingUIColumnLandscape": "UI Columns in Landscape Mode",
"settingUIColumnPortrait": "UI Columns in Portrait Mode",
"localePl": "Polish",
"tooltipRemoveThisQuotedMessage": "Remove quoted message.",
"tooltipReplyToThisMessage": "Reply to this message",
"tooltipRejectContactRequest": "Reject this contact request",
"tooltipAcceptContactRequest": "Accept this contact request.",
"notificationNewMessageFromGroup": "New message in a group!",
"notificationNewMessageFromPeer": "New message from a contact!",
"tooltipHidePassword": "Hide Password",
"tooltipShowPassword": "Show Password",
"serverNotSynced": "Syncing New Messages (This can take some time)...",
"groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.",
"shutdownCwtchAction": "Shutdown Cwtch",
"shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.",
"shutdownCwtchDialogTitle": "Shutdown Cwtch?",
"shutdownCwtchTooltip": "Shutdown Cwtch",
"malformedMessage": "Malformed message",
"profileDeleteSuccess": "Successfully deleted profile",
"debugLog": "Turn on console debug logging",
"torNetworkStatus": "Tor network status",
"addContactFirst": "Add or pick a contact to begin chatting.",
"createProfileToBegin": "Please create or unlock a profile to begin",
"nickChangeSuccess": "Profile nickname changed successfully",
"addServerFirst": "You need to add a server before you can create a group",
"deleteProfileSuccess": "Successfully deleted profile",
"sendInvite": "Send a contact or group invite",
"sendMessage": "Send Message",
"cancel": "Cancel",
"resetTor": "Reset",
"torStatus": "Tor Status",
"torVersion": "Tor Version",
"sendAnInvitation": "You sent an invitation for: ",
"contactSuggestion": "This is a contact suggestion for: ", "contactSuggestion": "This is a contact suggestion for: ",
"chatHistoryDefault": "Ta konwersacja zostanie usunięta gdy zamkniesz Cwtch! Możesz włączyć zapisywanie wiadomości dla każdej konwersacji osobno w menu w prawym górnym rogu.", "rejected": "Rejected!",
"reallyLeaveThisGroupPrompt": "Na pewno chcesz opuścić tę grupę? Wszystkie wiadomości i atrybuty zostaną usunięte.", "accepted": "Accepted!",
"inviteToGroup": "Zaproszono Cię do grupy:", "chatHistoryDefault": "This conversation will be deleted when Cwtch is closed! Message history can be enabled per-conversation via the Settings menu in the upper right.",
"dateNever": "Nigdy", "newPassword": "New Password",
"dateLastYear": "Rok temu", "yesLeave": "Yes, Leave This Conversation",
"dateYesterday": "Wczoraj", "reallyLeaveThisGroupPrompt": "Are you sure you want to leave this conversation? All messages and attributes will be deleted.",
"dateLastMonth": "Miesiąc temu", "leaveGroup": "Leave This Conversation",
"dateRightNow": "Teraz", "inviteToGroup": "You have been invited to join a group:",
"successfullAddedContact": "Dodano znajomego ", "pasteAddressToAddContact": "Paste a cwtch address, invitation or key bundle here to add a new conversation",
"descriptionBlockUnknownConnections": "Blokowanie połączeń od osób, które nie są na liście Twoich znajomych.", "tooltipAddContact": "Add a new contact or conversation",
"descriptionExperimentsGroups": "Czaty grupowe (eksperymentalne) łączą się z niezaufanymi serwerami, aby umożliwić komunikację grupową.", "titleManageContacts": "Conversations",
"descriptionExperiments": "Funkcje eksperymentalne są opcjonalne. Dodają one funkcjonalności, które mogą być mniej prywatne niż domyślne konwersacje 1:1, np. czaty grupowe, integracja z botami, itp.", "titleManageServers": "Manage Servers",
"titleManageProfiles": "Zarządzaj Profilami", "dateNever": "Never",
"tooltipUnlockProfiles": "Wprowadź hasło, aby odblokować zaszyfrowane profile.", "dateLastYear": "Last Year",
"titleManageContacts": "Konwersacje", "dateYesterday": "Yesterday",
"tooltipAddContact": "Dodaj znajomego lub grupę", "dateLastMonth": "Last Month",
"tooltipOpenSettings": "Ustawienia", "dateRightNow": "Right Now",
"contactAlreadyExists": "Ten znajomy już istnieje", "successfullAddedContact": "Successfully added ",
"descriptionBlockUnknownConnections": "If turned on, this option will automatically close connections from Cwtch users that have not been added to your contact list.",
"descriptionExperimentsGroups": "The group experiment allows Cwtch to connect with untrusted server infrastructure to facilitate communication with more than one contact.",
"descriptionExperiments": "Cwtch experiments are optional, opt-in features that add additional functionality to Cwtch that may have different privacy considerations than traditional 1:1 metadata resistant chat e.g. group chat, bot integration etc.",
"titleManageProfiles": "Manage Cwtch Profiles",
"tooltipUnlockProfiles": "Unlock encrypted profiles by entering their password.",
"tooltipOpenSettings": "Open the settings pane",
"invalidImportString": "Invalid import string", "invalidImportString": "Invalid import string",
"conversationSettings": "Ustawienia konwersacji", "contactAlreadyExists": "Contact Already Exists",
"enterCurrentPasswordForDelete": "Aby usunąć ten profil, wprowadź hasło.", "conversationSettings": "Conversation Settings",
"enableGroups": "Włącz czaty grupowe", "enterCurrentPasswordForDelete": "Please enter current password to delete this profile.",
"enableGroups": "Enable Group Chat",
"experimentsEnabled": "Enable Experiments",
"localeIt": "Italiana", "localeIt": "Italiana",
"localeEs": "Espanol", "localeEs": "Espanol",
"todoPlaceholder": "Do zdobienia...",
"addNewItem": "Dodaj do listy",
"addListItem": "Add a New List Item", "addListItem": "Add a New List Item",
"newConnectionPaneTitle": "Nowe połączenie", "addNewItem": "Add a new item to the list",
"networkStatusOnline": "Połączono", "todoPlaceholder": "Todo...",
"networkStatusConnecting": "Łączenie z siecią i znajomymi...", "newConnectionPaneTitle": "New Connection",
"networkStatusAttemptingTor": "Próba połączenia z siecią Tor", "networkStatusOnline": "Online",
"networkStatusDisconnected": "Rozłączono. Sprawdź połączenie z Internetem", "networkStatusAttemptingTor": "Attempting to connect to Tor network",
"viewGroupMembershipTooltip": "Wyświetl członków grupy", "networkStatusDisconnected": "Disconnected from the internet, check your connection",
"loadingTor": "Ładowanie Tor...", "viewGroupMembershipTooltip": "View Group Membership",
"smallTextLabel": "Mały", "loadingTor": "Loading tor...",
"defaultScalingText": "Domyślny rozmiar tekstu (skalowanie:", "smallTextLabel": "Small",
"builddate": "Zbudowana: %2", "defaultScalingText": "Default size text (scale factor:",
"version": "Wersja %1", "builddate": "Built on: %2",
"versionTor": "Wersja %1 , wersja Tor %2", "version": "Version %1",
"experimentsEnabled": "Włącz funkcje eksperymentalne", "versionTor": "Version %1 with tor %2",
"themeDark": "Ciemny", "themeDark": "Dark",
"themeLight": "Jasny", "themeLight": "Light",
"settingTheme": "Motyw", "settingTheme": "Theme",
"largeTextLabel": "Duży", "largeTextLabel": "Large",
"settingInterfaceZoom": "Przybliżenie", "settingInterfaceZoom": "Zoom level",
"localeDe": "Deutsche", "localeDe": "Deutsche",
"localePt": "Portuguesa", "localePt": "Portuguesa",
"localeFr": "Frances", "localeFr": "Frances",
"localeEn": "English", "localeEn": "English",
"settingLanguage": "Język", "settingLanguage": "Language",
"blockUnknownLabel": "Blokuj nieznajomych", "zoomLabel": "Interface zoom (mostly affects text and button sizes)",
"zoomLabel": "Przybliżenie interfejsu (wpływa głównie na rozmiar tekstu i przycisków)", "versionBuilddate": "Version: %1 Built on: %2",
"versionBuilddate": "Wersja: %1 Zbudowana: %2", "cwtchSettingsTitle": "Cwtch Settings",
"cwtchSettingsTitle": "Ustawienia Cwtch", "unlock": "Unlock",
"unlock": "Odblokuj", "yourServers": "Your Servers",
"yourServers": "Twoje serwery", "yourProfiles": "Your Profiles",
"yourProfiles": "Twoje profile", "error0ProfilesLoadedForPassword": "0 profiles loaded with that password",
"error0ProfilesLoadedForPassword": "Znaleziono 0 profili z tym hasłem", "password": "Password",
"password": "Hasło", "enterProfilePassword": "Enter a password to view your profiles",
"enterProfilePassword": "Wprowadź hasło aby wyświetlić profile", "addNewProfileBtn": "Add new profile",
"addNewProfileBtn": "Dodaj", "deleteConfirmText": "DELETE",
"deleteConfirmText": "USUŃ", "deleteProfileConfirmBtn": "Really Delete Profile",
"deleteProfileConfirmBtn": "Usuń", "deleteConfirmLabel": "Type DELETE to confirm",
"deleteConfirmLabel": "Wpisz USUŃ aby potwierdzić", "deleteProfileBtn": "Delete Profile",
"deleteProfileBtn": "Usuń profil", "passwordChangeError": "Error changing password: Supplied password rejected",
"passwordChangeError": "Zmiana hasła nie powiodła się: hasło niepoprawne", "passwordErrorMatch": "Passwords do not match",
"passwordErrorMatch": "Hasła nie są identyczne", "saveProfileBtn": "Save Profile",
"saveProfileBtn": "Zapisz profil", "createProfileBtn": "Create Profile",
"createProfileBtn": "Utwórz profil", "passwordErrorEmpty": "Password cannot be empty",
"passwordErrorEmpty": "Hasło nie może być puste", "password2Label": "Reenter password",
"password2Label": "Powtórz hasło", "password1Label": "Password",
"password1Label": "Hasło", "currentPasswordLabel": "Current Password",
"currentPasswordLabel": "Obecne hasło", "yourDisplayName": "Your Display Name",
"yourDisplayName": "Nazwa", "noPasswordWarning": "Not using a password on this account means that all data stored locally will not be encrypted",
"profileOnionLabel": "Przekaż ten adres znajomym, z którymi chcesz się połączyć", "radioNoPassword": "Unencrypted (No password)",
"noPasswordWarning": "Brak hasła do konta oznacza, że dane przechowywane na tym urządzeniu nie będą zaszyfrowane", "radioUsePassword": "Password",
"radioNoPassword": "Niezaszyfrowany (brak hasła)", "copiedToClipboardNotification": "Copied to Clipboard",
"radioUsePassword": "Hasło", "copyBtn": "Copy",
"copiedToClipboardNotification": "Skopiowano do schowka", "editProfile": "Edit Profille",
"editProfile": "Edytuj profil", "newProfile": "New Profile",
"newProfile": "Nowy profil", "defaultProfileName": "Alice",
"defaultProfileName": "Nowy profil", "profileName": "Display name",
"profileName": "Nazwa", "editProfileTitle": "Edit Profile",
"editProfileTitle": "Edytuj profil", "addProfileTitle": "Add new profile",
"addProfileTitle": "Dodaj nowy profil", "deleteBtn": "Delete",
"deleteBtn": "Usuń", "saveBtn": "Save",
"unblockBtn": "Odblokuj", "displayNameLabel": "Display Name",
"dontSavePeerHistory": "Nie", "addressLabel": "Address",
"savePeerHistoryDescription": "Zapisywanie wiadomości", "puzzleGameBtn": "Puzzle Game",
"savePeerHistory": "Tak", "bulletinsBtn": "Bulletins",
"blockBtn": "Zablokuj", "listsBtn": "Lists",
"saveBtn": "Zapisz",
"displayNameLabel": "Nazwa",
"addressLabel": "Adresy",
"puzzleGameBtn": "Puzzle",
"bulletinsBtn": "Biuletyny",
"listsBtn": "Listy",
"chatBtn": "Chat", "chatBtn": "Chat",
"rejectGroupBtn": "Odrzuć", "rejectGroupBtn": "Reject",
"acceptGroupBtn": "Akceptuj", "acceptGroupBtn": "Accept",
"acceptGroupInviteLabel": "Czy chcesz zaakceptować zaproszenie do grupy", "acceptGroupInviteLabel": "Do you want to accept the invitation to",
"newGroupBtn": "Utwórz nową grupę", "newGroupBtn": "Create new group",
"copiedClipboardNotification": "Skopiowano do schowka", "copiedClipboardNotification": "Copied to clipboard",
"copyBtn": "Kopiuj", "pendingLabel": "Pending",
"peerOfflineMessage": "Znajomy jest niedostępny, nie można dostarczyć wiadomości", "acknowledgedLabel": "Acknowledged",
"peerBlockedMessage": "Użytkownik jest zablokowany", "couldNotSendMsgError": "Could not send this message",
"pendingLabel": "W toku", "dmTooltip": "Click to DM",
"acknowledgedLabel": "OK", "membershipDescription": "Below is a list of users who have sent messages to the group. This list may not reflect all users who have access to the group.",
"couldNotSendMsgError": "Wiadomość nie została wysłana", "addListItemBtn": "Add Item",
"dmTooltip": "Kliknij, aby wysłać wiadomość",
"membershipDescription": "Lista użytkowników, którzy wysyłali wiadomości w tej grupie. Członkowie grupy, którzy nie wysyłali żadnych wiadomości nie są na tej liście.",
"addListItemBtn": "Dodaj",
"peerNotOnline": "Znajomy jest niedostępny. Nie można użyć aplikacji.",
"searchList": "Search List", "searchList": "Search List",
"update": "Zaktualizuj", "update": "Update",
"inviteBtn": "Zaproś", "inviteBtn": "Invite",
"inviteToGroupLabel": "Zaproś do grupy", "inviteToGroupLabel": "Invite to group",
"groupNameLabel": "Nazwa grupy", "groupNameLabel": "Group name",
"viewServerInfo": "Informacje o serwerze", "viewServerInfo": "Server Info",
"serverNotSynced": "Synchronizacja wiadomości (to może chwilę potrwać)...", "serverSynced": "Synced",
"serverSynced": "Zsynchronizowano", "serverConnectivityDisconnected": "Server Disconnected",
"serverConnectivityDisconnected": "Brak połączenia z serwerem", "serverConnectivityConnected": "Server Connected",
"serverConnectivityConnected": "Połączono z serwerem", "serverInfo": "Server Information",
"serverInfo": "Informacje o serwerze", "invitationLabel": "Invitation",
"invitationLabel": "Zaproszenie", "serverLabel": "Server",
"serverLabel": "Serwer", "search": "Search...",
"search": "Szukaj...",
"cycleColoursDesktop": "Click to cycle colours.\nRight-click to reset.", "cycleColoursDesktop": "Click to cycle colours.\nRight-click to reset.",
"cycleColoursAndroid": "Click to cycle colours.\nLong-press to reset.", "cycleColoursAndroid": "Click to cycle colours.\nLong-press to reset.",
"cycleMorphsDesktop": "Click to cycle morphs.\nRight-click to reset.", "cycleMorphsDesktop": "Click to cycle morphs.\nRight-click to reset.",
"cycleMorphsAndroid": "Click to cycle morphs.\nLong-press to reset.", "cycleMorphsAndroid": "Click to cycle morphs.\nLong-press to reset.",
"cycleCatsDesktop": "Click to cycle category.\nRight-click to reset.", "cycleCatsDesktop": "Click to cycle category.\nRight-click to reset.",
"cycleCatsAndroid": "Click to cycle category.\nLong-press to reset.", "cycleCatsAndroid": "Click to cycle category.\nLong-press to reset.",
"blocked": "Zablokowany", "blocked": "Blocked",
"pasteAddressToAddContact": "Wklej adres Cwtch znajomego, zaproszenie do grupy albo pęk kluczy", "titlePlaceholder": "title...",
"titlePlaceholder": "Tytuł...", "postNewBulletinLabel": "Post new bulletin",
"postNewBulletinLabel": "Opublikuj nowy biuletyn", "newBulletinLabel": "New Bulletin",
"newBulletinLabel": "Nowy biuletyn", "joinGroup": "Join group",
"joinGroup": "Dołącz do grupy", "createGroup": "Create group",
"createGroup": "Utwórz grupę", "groupAddr": "Address",
"addPeer": "Dodaj znajomego", "invitation": "Invitation",
"groupAddr": "Adres", "server": "Server",
"invitation": "Zaproszenie", "groupName": "Group name",
"server": "Serwer", "peerName": "Name",
"groupName": "Nazwa grupy", "peerAddress": "Address",
"peerName": "Nazwa", "joinGroupTab": "Join a group",
"peerAddress": "Adres", "createGroupTab": "Create a group",
"joinGroupTab": "Dołącz do grupy", "createGroupBtn": "Create",
"createGroupTab": "Utwórz grupę", "defaultGroupName": "Awesome Group",
"addPeerTab": "Dodaj znajomego", "createGroupTitle": "Create Group"
"createGroupBtn": "Utwórz", }
"defaultGroupName": "Nowa grupa",
"createGroupTitle": "Utwórz grupę"
}

View File

@ -1,39 +1,6 @@
{ {
"@@locale": "pt", "@@locale": "pt",
"@@last_modified": "2021-12-20T09:20:03+01:00", "@@last_modified": "2021-11-11T01:02:08+01:00",
"msgAddToAccept": "Add this account to your contacts in order to accept this file.",
"btnSendFile": "Send File",
"msgConfirmSend": "Are you sure you want to send",
"msgFileTooBig": "File size cannot exceed 10 GB",
"storageMigrationModalMessage": "Migrating profiles to new storage format. This could take a few minutes...",
"loadingCwtch": "Loading Cwtch...",
"themeColorLabel": "Color Theme",
"themeNameNeon2": "Neon2",
"themeNameNeon1": "Neon1",
"themeNameMidnight": "Midnight",
"themeNameMermaid": "Mermaid",
"themeNamePumpkin": "Pumpkin",
"themeNameGhost": "Ghost",
"themeNameVampire": "Vampire",
"themeNameWitch": "Witch",
"themeNameCwtch": "Cwtch",
"settingDownloadFolder": "Download Folder",
"settingImagePreviewsDescription": "Images will be downloaded and previewed automatically. Please note that image previews can often lead to security vulnerabilities, and you should not enable this Experiment if you use Cwtch with untrusted contacts. Profile pictures are planned for Cwtch 1.6.",
"settingImagePreviews": "Image Previews and Profile Pictures",
"experimentClickableLinksDescription": "The clickable links experiment allows you to click on URLs shared in messages",
"enableExperimentClickableLinks": "Enable Clickable Links",
"serverConnectionsLabel": "Connection",
"serverTotalMessagesLabel": "Total Messages",
"serverMetricsLabel": "Server Metrics",
"manageKnownServersShort": "Servers",
"manageKnownServersLong": "Manage Known Servers",
"displayNameTooltip": "Please enter a display name",
"manageKnownServersButton": "Manage Known Servers",
"fieldDescriptionLabel": "Description",
"groupsOnThisServerLabel": "Groups I am in hosted on this server",
"importLocalServerButton": "Import %1",
"importLocalServerSelectText": "Select Local Server",
"importLocalServerLabel": "Import a locally hosted server",
"newMessagesLabel": "New Messages", "newMessagesLabel": "New Messages",
"localeRU": "Russian", "localeRU": "Russian",
"copyServerKeys": "Copy keys", "copyServerKeys": "Copy keys",
@ -41,8 +8,8 @@
"fileCheckingStatus": "Checking download status", "fileCheckingStatus": "Checking download status",
"fileInterrupted": "Interrupted", "fileInterrupted": "Interrupted",
"fileSavedTo": "Saved to", "fileSavedTo": "Saved to",
"encryptedServerDescription": "Encrypting a server with a password protects it from other people who may also use this device. Encrypted servers cannot be decrypted, displayed or accessed until the correct password is entered to unlock them.",
"plainServerDescription": "We recommend that you protect your Cwtch servers with a password. If you do not set a password on this server then anyone who has access to this device may be able to access information about this server, including sensitive cryptographic keys.", "plainServerDescription": "We recommend that you protect your Cwtch servers with a password. If you do not set a password on this server then anyone who has access to this device may be able to access information about this server, including sensitive cryptographic keys.",
"encryptedServerDescription": "Encrypting a server with a password protects it from other people who may also use this device. Encrypted servers cannot be decrypted, displayed or accessed until the correct password is entered to unlock them.",
"deleteServerConfirmBtn": "Really delete server", "deleteServerConfirmBtn": "Really delete server",
"deleteServerSuccess": "Successfully deleted server", "deleteServerSuccess": "Successfully deleted server",
"enterCurrentPasswordForDeleteServer": "Please enter current password to delete this server", "enterCurrentPasswordForDeleteServer": "Please enter current password to delete this server",
@ -66,6 +33,7 @@
"editServerTitle": "Edit Server", "editServerTitle": "Edit Server",
"addServerTitle": "Add Server", "addServerTitle": "Add Server",
"titleManageProfilesShort": "Profiles", "titleManageProfilesShort": "Profiles",
"descriptionStreamerMode": "If turned on, this option makes the app more visually private for streaming or presenting with, for example, hiding profile and contact addresses",
"descriptionFileSharing": "The file sharing experiment allows you to send and receive files from Cwtch contacts and groups. Note that sharing a file with a group will result in members of that group connecting with you directly over Cwtch to download it.", "descriptionFileSharing": "The file sharing experiment allows you to send and receive files from Cwtch contacts and groups. Note that sharing a file with a group will result in members of that group connecting with you directly over Cwtch to download it.",
"settingFileSharing": "File Sharing", "settingFileSharing": "File Sharing",
"tooltipSendFile": "Send File", "tooltipSendFile": "Send File",
@ -77,10 +45,22 @@
"downloadFileButton": "Download", "downloadFileButton": "Download",
"openFolderButton": "Open Folder", "openFolderButton": "Open Folder",
"retrievingManifestMessage": "Retrieving file information...", "retrievingManifestMessage": "Retrieving file information...",
"descriptionStreamerMode": "If turned on, this option makes the app more visually private for streaming or presenting with, for example, hiding profile and contact addresses",
"streamerModeLabel": "Streamer\/Presentation Mode", "streamerModeLabel": "Streamer\/Presentation Mode",
"archiveConversation": "Archive this Conversation", "archiveConversation": "Archive this Conversation",
"profileOnionLabel": "Send this address to contacts you want to connect with",
"addPeerTab": "Add a contact",
"addPeer": "Add Contact",
"peerNotOnline": "Contact is offline. Applications cannot be used right now.",
"peerBlockedMessage": "Contact is blocked",
"peerOfflineMessage": "Contact is offline, messages can't be delivered right now",
"blockBtn": "Block Contact",
"savePeerHistory": "Save History",
"savePeerHistoryDescription": "Determines whether or not to delete any history associated with the contact.",
"dontSavePeerHistory": "Delete History",
"unblockBtn": "Unblock Contact",
"blockUnknownLabel": "Block Unknown Contacts",
"blockUnknownConnectionsEnabledDescription": "Connections from unknown contacts are blocked. You can change this in Settings", "blockUnknownConnectionsEnabledDescription": "Connections from unknown contacts are blocked. You can change this in Settings",
"networkStatusConnecting": "Connecting to network and contacts...",
"showMessageButton": "Show Message", "showMessageButton": "Show Message",
"blockedMessageMessage": "This message is from a profile you have blocked.", "blockedMessageMessage": "This message is from a profile you have blocked.",
"placeholderEnterMessage": "Type a message...", "placeholderEnterMessage": "Type a message...",
@ -104,6 +84,7 @@
"notificationNewMessageFromPeer": "New message from a contact!", "notificationNewMessageFromPeer": "New message from a contact!",
"tooltipHidePassword": "Hide Password", "tooltipHidePassword": "Hide Password",
"tooltipShowPassword": "Show Password", "tooltipShowPassword": "Show Password",
"serverNotSynced": "Syncing New Messages (This can take some time)...",
"groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.", "groupInviteSettingsWarning": "You have been invited to join a group! Please enable the Group Chat Experiment in Settings to view this Invitation.",
"shutdownCwtchAction": "Shutdown Cwtch", "shutdownCwtchAction": "Shutdown Cwtch",
"shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.", "shutdownCwtchDialog": "Are you sure you want to shutdown Cwtch? This will close all connections, and exit the application.",
@ -134,6 +115,9 @@
"reallyLeaveThisGroupPrompt": "Are you sure you want to leave this conversation? All messages and attributes will be deleted.", "reallyLeaveThisGroupPrompt": "Are you sure you want to leave this conversation? All messages and attributes will be deleted.",
"leaveGroup": "Leave This Conversation", "leaveGroup": "Leave This Conversation",
"inviteToGroup": "You have been invited to join a group:", "inviteToGroup": "You have been invited to join a group:",
"pasteAddressToAddContact": "… cole um endereço aqui para adicionar um contato…",
"tooltipAddContact": "Add a new contact or conversation",
"titleManageContacts": "Conversations",
"titleManageServers": "Manage Servers", "titleManageServers": "Manage Servers",
"dateNever": "Never", "dateNever": "Never",
"dateLastYear": "Last Year", "dateLastYear": "Last Year",
@ -146,22 +130,20 @@
"descriptionExperiments": "Cwtch experiments are optional, opt-in features that add additional functionality to Cwtch that may have different privacy considerations than traditional 1:1 metadata resistant chat e.g. group chat, bot integration etc.", "descriptionExperiments": "Cwtch experiments are optional, opt-in features that add additional functionality to Cwtch that may have different privacy considerations than traditional 1:1 metadata resistant chat e.g. group chat, bot integration etc.",
"titleManageProfiles": "Manage Cwtch Profiles", "titleManageProfiles": "Manage Cwtch Profiles",
"tooltipUnlockProfiles": "Unlock encrypted profiles by entering their password.", "tooltipUnlockProfiles": "Unlock encrypted profiles by entering their password.",
"titleManageContacts": "Conversations",
"tooltipAddContact": "Add a new contact or conversation",
"tooltipOpenSettings": "Open the settings pane", "tooltipOpenSettings": "Open the settings pane",
"contactAlreadyExists": "Contact Already Exists",
"invalidImportString": "Invalid import string", "invalidImportString": "Invalid import string",
"contactAlreadyExists": "Contact Already Exists",
"conversationSettings": "Conversation Settings", "conversationSettings": "Conversation Settings",
"enterCurrentPasswordForDelete": "Please enter current password to delete this profile.", "enterCurrentPasswordForDelete": "Please enter current password to delete this profile.",
"enableGroups": "Enable Group Chat", "enableGroups": "Enable Group Chat",
"experimentsEnabled": "Enable Experiments",
"localeIt": "Italiana", "localeIt": "Italiana",
"localeEs": "Espanol", "localeEs": "Espanol",
"todoPlaceholder": "Afazer…",
"addNewItem": "Adicionar novo item à lista",
"addListItem": "Adicionar Item à Lista", "addListItem": "Adicionar Item à Lista",
"addNewItem": "Adicionar novo item à lista",
"todoPlaceholder": "Afazer…",
"newConnectionPaneTitle": "New Connection", "newConnectionPaneTitle": "New Connection",
"networkStatusOnline": "Online", "networkStatusOnline": "Online",
"networkStatusConnecting": "Connecting to network and contacts...",
"networkStatusAttemptingTor": "Attempting to connect to Tor network", "networkStatusAttemptingTor": "Attempting to connect to Tor network",
"networkStatusDisconnected": "Disconnected from the internet, check your connection", "networkStatusDisconnected": "Disconnected from the internet, check your connection",
"viewGroupMembershipTooltip": "View Group Membership", "viewGroupMembershipTooltip": "View Group Membership",
@ -171,7 +153,6 @@
"builddate": "Built on: %2", "builddate": "Built on: %2",
"version": "Version %1", "version": "Version %1",
"versionTor": "Version %1 with tor %2", "versionTor": "Version %1 with tor %2",
"experimentsEnabled": "Enable Experiments",
"themeDark": "Dark", "themeDark": "Dark",
"themeLight": "Light", "themeLight": "Light",
"settingTheme": "Theme", "settingTheme": "Theme",
@ -182,7 +163,6 @@
"localeFr": "Frances", "localeFr": "Frances",
"localeEn": "English", "localeEn": "English",
"settingLanguage": "Language", "settingLanguage": "Language",
"blockUnknownLabel": "Block Unknown Contacts",
"zoomLabel": "Zoom da interface (afeta principalmente tamanho de texto e botões)", "zoomLabel": "Zoom da interface (afeta principalmente tamanho de texto e botões)",
"versionBuilddate": "Version: %1 Built on: %2", "versionBuilddate": "Version: %1 Built on: %2",
"cwtchSettingsTitle": "Configurações do Cwtch", "cwtchSettingsTitle": "Configurações do Cwtch",
@ -206,11 +186,11 @@
"password1Label": "Password", "password1Label": "Password",
"currentPasswordLabel": "Current Password", "currentPasswordLabel": "Current Password",
"yourDisplayName": "Your Display Name", "yourDisplayName": "Your Display Name",
"profileOnionLabel": "Send this address to contacts you want to connect with",
"noPasswordWarning": "Not using a password on this account means that all data stored locally will not be encrypted", "noPasswordWarning": "Not using a password on this account means that all data stored locally will not be encrypted",
"radioNoPassword": "Unencrypted (No password)", "radioNoPassword": "Unencrypted (No password)",
"radioUsePassword": "Password", "radioUsePassword": "Password",
"copiedToClipboardNotification": "Copiado", "copiedToClipboardNotification": "Copiado",
"copyBtn": "Copiar",
"editProfile": "Edit Profille", "editProfile": "Edit Profille",
"newProfile": "New Profile", "newProfile": "New Profile",
"defaultProfileName": "Alice", "defaultProfileName": "Alice",
@ -218,11 +198,6 @@
"editProfileTitle": "Edit Profile", "editProfileTitle": "Edit Profile",
"addProfileTitle": "Add new profile", "addProfileTitle": "Add new profile",
"deleteBtn": "Deletar", "deleteBtn": "Deletar",
"unblockBtn": "Unblock Contact",
"dontSavePeerHistory": "Delete History",
"savePeerHistoryDescription": "Determines whether to delete any history associated with the contact.",
"savePeerHistory": "Save History",
"blockBtn": "Block Contact",
"saveBtn": "Salvar", "saveBtn": "Salvar",
"displayNameLabel": "Nome de Exibição", "displayNameLabel": "Nome de Exibição",
"addressLabel": "Endereço", "addressLabel": "Endereço",
@ -235,23 +210,18 @@
"acceptGroupInviteLabel": "Você quer aceitar o convite para", "acceptGroupInviteLabel": "Você quer aceitar o convite para",
"newGroupBtn": "Criar novo grupo", "newGroupBtn": "Criar novo grupo",
"copiedClipboardNotification": "Copiado", "copiedClipboardNotification": "Copiado",
"copyBtn": "Copiar",
"peerOfflineMessage": "Contact is offline, messages can't be delivered right now",
"peerBlockedMessage": "Contact is blocked",
"pendingLabel": "Pendente", "pendingLabel": "Pendente",
"acknowledgedLabel": "Confirmada", "acknowledgedLabel": "Confirmada",
"couldNotSendMsgError": "Não deu para enviar esta mensagem", "couldNotSendMsgError": "Não deu para enviar esta mensagem",
"dmTooltip": "Clique para DM", "dmTooltip": "Clique para DM",
"membershipDescription": "A lista abaixo é de usuários que enviaram mensagens ao grupo. Essa lista pode não refletir todos os usuários que têm acesso ao grupo.", "membershipDescription": "A lista abaixo é de usuários que enviaram mensagens ao grupo. Essa lista pode não refletir todos os usuários que têm acesso ao grupo.",
"addListItemBtn": "Add Item", "addListItemBtn": "Add Item",
"peerNotOnline": "Contact is offline. Applications cannot be used right now.",
"searchList": "Search List", "searchList": "Search List",
"update": "Update", "update": "Update",
"inviteBtn": "Convidar", "inviteBtn": "Convidar",
"inviteToGroupLabel": "Convidar ao grupo", "inviteToGroupLabel": "Convidar ao grupo",
"groupNameLabel": "Nome do grupo", "groupNameLabel": "Nome do grupo",
"viewServerInfo": "Server Info", "viewServerInfo": "Server Info",
"serverNotSynced": "Syncing New Messages (This can take some time)...",
"serverSynced": "Synced", "serverSynced": "Synced",
"serverConnectivityDisconnected": "Server Disconnected", "serverConnectivityDisconnected": "Server Disconnected",
"serverConnectivityConnected": "Server Connected", "serverConnectivityConnected": "Server Connected",
@ -266,13 +236,11 @@
"cycleCatsDesktop": "Click to cycle category.\nRight-click to reset.", "cycleCatsDesktop": "Click to cycle category.\nRight-click to reset.",
"cycleCatsAndroid": "Click to cycle category.\nLong-press to reset.", "cycleCatsAndroid": "Click to cycle category.\nLong-press to reset.",
"blocked": "Blocked", "blocked": "Blocked",
"pasteAddressToAddContact": "… cole um endereço aqui para adicionar um contato…",
"titlePlaceholder": "título…", "titlePlaceholder": "título…",
"postNewBulletinLabel": "Postar novo boletim", "postNewBulletinLabel": "Postar novo boletim",
"newBulletinLabel": "Novo Boletim", "newBulletinLabel": "Novo Boletim",
"joinGroup": "Join group", "joinGroup": "Join group",
"createGroup": "Create group", "createGroup": "Create group",
"addPeer": "Add Contact",
"groupAddr": "Address", "groupAddr": "Address",
"invitation": "Invitation", "invitation": "Invitation",
"server": "Server", "server": "Server",
@ -281,7 +249,6 @@
"peerAddress": "Address", "peerAddress": "Address",
"joinGroupTab": "Join a group", "joinGroupTab": "Join a group",
"createGroupTab": "Create a group", "createGroupTab": "Create a group",
"addPeerTab": "Add a contact",
"createGroupBtn": "Criar", "createGroupBtn": "Criar",
"defaultGroupName": "Grupo incrível", "defaultGroupName": "Grupo incrível",
"createGroupTitle": "Criar Grupo" "createGroupTitle": "Criar Grupo"

View File

@ -1,59 +1,14 @@
{ {
"@@locale": "ru", "@@locale": "ru",
"@@last_modified": "2021-12-20T09:20:03+01:00", "@@last_modified": "2021-11-10T18:47:30+01:00",
"msgAddToAccept": "Add this account to your contacts in order to accept this file.", "localeRU": "Russian",
"btnSendFile": "Send File",
"msgConfirmSend": "Are you sure you want to send",
"msgFileTooBig": "File size cannot exceed 10 GB",
"storageMigrationModalMessage": "Migrating profiles to new storage format. This could take a few minutes...",
"loadingCwtch": "Loading Cwtch...",
"themeColorLabel": "Тема",
"themeNameNeon2": "Неон2",
"themeNameNeon1": "Неон1",
"themeNameMidnight": "Полночь",
"themeNameMermaid": "Русалка",
"themeNamePumpkin": "Тыква",
"themeNameGhost": "Призрак",
"themeNameVampire": "Вампир",
"themeNameWitch": "Ведьма",
"themeNameCwtch": "Cwtch",
"settingDownloadFolder": "Скачать папку",
"settingImagePreviewsDescription": "Автоматическая загрузка изображений. Обратите внимание, что предварительный просмотр изображений часто может использоваться для взлома или деаномизации. Не используйте данную функцию если Вы контактируете с ненадежными контактами. Аватары профиля запланированы для версии Cwtch 1.6.",
"settingImagePreviews": "Предпросмотр изображений и фотографий профиля",
"experimentClickableLinksDescription": "Экспериментальная функция которая позволяет нажимать на URL адреса в сообщениях",
"enableExperimentClickableLinks": "Включить кликабельные ссылки",
"serverConnectionsLabel": "Соединение",
"serverTotalMessagesLabel": "Всего сообщений",
"serverMetricsLabel": "Показатели сервера",
"manageKnownServersShort": "Серверы",
"manageKnownServersLong": "Управление серверами",
"displayNameTooltip": "Введите отображаемое имя",
"manageKnownServersButton": "Управление серверами",
"fieldDescriptionLabel": "Описание",
"groupsOnThisServerLabel": "Группы, в которых я нахожусь, размещены на этом сервере",
"importLocalServerButton": "Импорт %1",
"importLocalServerSelectText": "Выбрать локальный сервер",
"importLocalServerLabel": "Импортировать локальный сервер",
"newMessagesLabel": "Новое сообщение",
"localeRU": "Русский",
"profileOnionLabel": "Send this address to contacts you want to connect with",
"savePeerHistory": "Хранить историю",
"saveBtn": "Сохранить",
"networkStatusOnline": "В сети",
"copiedToClipboardNotification": "Скопировано в буфер обмена",
"defaultProfileName": "Алиса",
"deleteBtn": "Удалить",
"bulletinsBtn": "Бюллетень",
"groupNameLabel": "Имя группы",
"serverLabel": "Сервер",
"copyBtn": "Копировать",
"copyServerKeys": "Копировать ключи", "copyServerKeys": "Копировать ключи",
"verfiyResumeButton": "Проверить\/продолжить", "verfiyResumeButton": "Проверить\/продолжить",
"fileCheckingStatus": "Проверка статуса загрузки", "fileCheckingStatus": "Проверка статуса загрузки",
"fileInterrupted": "Прервано", "fileInterrupted": "Прервано",
"fileSavedTo": "Сохранить в", "fileSavedTo": "Сохранить в",
"encryptedServerDescription": "Шифрование сервера паролем защитит его от других людей у которых может оказаться доступ к этому устройству, включая Onion адрес сервера. Зашифрованный сервер нельзя расшифровать, пока не будет введен правильный пароль разблокировки.",
"plainServerDescription": "Мы настоятельно рекомендуем защитить свой сервер Cwtch паролем. Если Вы этого не сделаете, то любой у кого окажется доступ к серверу, сможет получить доступ к информации на этом сервере включая конфиденциальные криптографические ключи.", "plainServerDescription": "Мы настоятельно рекомендуем защитить свой сервер Cwtch паролем. Если Вы этого не сделаете, то любой у кого окажется доступ к серверу, сможет получить доступ к информации на этом сервере включая конфиденциальные криптографические ключи.",
"encryptedServerDescription": "Шифрование сервера паролем защитит его от других людей у которых может оказаться доступ к этому устройству, включая Onion адрес сервера. Зашифрованный сервер нельзя расшифровать, пока не будет введен правильный пароль разблокировки.",
"deleteServerConfirmBtn": "Точно удалить сервер?", "deleteServerConfirmBtn": "Точно удалить сервер?",
"deleteServerSuccess": "Сервер успешно удален", "deleteServerSuccess": "Сервер успешно удален",
"enterCurrentPasswordForDeleteServer": "Пожалуйста, введите пароль сервера, чтобы удалить его", "enterCurrentPasswordForDeleteServer": "Пожалуйста, введите пароль сервера, чтобы удалить его",
@ -77,6 +32,7 @@
"editServerTitle": "Изменить сервер", "editServerTitle": "Изменить сервер",
"addServerTitle": "Добавить сервер", "addServerTitle": "Добавить сервер",
"titleManageProfilesShort": "Профили", "titleManageProfilesShort": "Профили",
"descriptionStreamerMode": "При включении этого параметра, внешний вид некоторых элементов становится более приватным, скрывая длинные Onion адреса и адреса контактов, оставляя только заданные имена",
"descriptionFileSharing": "Данная функция позволяет обмениваться файлами напрямую с контактами и группами в Cwtch. Отправляемый файл будет напрямую скачиваться с вашего устройства через Cwtch.", "descriptionFileSharing": "Данная функция позволяет обмениваться файлами напрямую с контактами и группами в Cwtch. Отправляемый файл будет напрямую скачиваться с вашего устройства через Cwtch.",
"settingFileSharing": "Передача файлов", "settingFileSharing": "Передача файлов",
"tooltipSendFile": "Отправить файл", "tooltipSendFile": "Отправить файл",
@ -88,10 +44,22 @@
"downloadFileButton": "Загрузить", "downloadFileButton": "Загрузить",
"openFolderButton": "Открыть папку", "openFolderButton": "Открыть папку",
"retrievingManifestMessage": "Получение информации о файле...", "retrievingManifestMessage": "Получение информации о файле...",
"descriptionStreamerMode": "При включении этого параметра, внешний вид некоторых элементов становится более приватным, скрывая длинные Onion адреса и адреса контактов, оставляя только заданные имена",
"streamerModeLabel": "Режим презентации", "streamerModeLabel": "Режим презентации",
"archiveConversation": "Отправить чат в архив", "archiveConversation": "Отправить чат в архив",
"profileOnionLabel": "Send this address to contacts you want to connect with",
"addPeerTab": "Добавить контакт",
"addPeer": "Добавить контакт",
"peerNotOnline": "Контакт не в сети. Вы не можете связаться с ним пока он не появиться в сети.",
"peerBlockedMessage": "Контакт заблокирован",
"peerOfflineMessage": "Контакт не в сети, сообщения не могут быть отправлены",
"blockBtn": "Заблокировать контакт",
"savePeerHistory": "Хранить исторую",
"savePeerHistoryDescription": "Определяет политуку хранения или удаления переписки с данным контактом.",
"dontSavePeerHistory": "Удалить историю",
"unblockBtn": "Разблокировать контакт",
"blockUnknownLabel": "Блокировать неизвестные контакты",
"blockUnknownConnectionsEnabledDescription": "Соединения от неизвестных контактов блокируются. Данный параметр можно изменить в настройках", "blockUnknownConnectionsEnabledDescription": "Соединения от неизвестных контактов блокируются. Данный параметр можно изменить в настройках",
"networkStatusConnecting": "Подключение к сети и контактам...",
"showMessageButton": "Показать сообщения", "showMessageButton": "Показать сообщения",
"blockedMessageMessage": "Это сообщение из заблокированного вами профиля.", "blockedMessageMessage": "Это сообщение из заблокированного вами профиля.",
"placeholderEnterMessage": "Написать сообщение...", "placeholderEnterMessage": "Написать сообщение...",
@ -115,6 +83,7 @@
"notificationNewMessageFromPeer": "Новое сообщение от контакта!", "notificationNewMessageFromPeer": "Новое сообщение от контакта!",
"tooltipHidePassword": "Скрыть пароль", "tooltipHidePassword": "Скрыть пароль",
"tooltipShowPassword": "Показать пароль", "tooltipShowPassword": "Показать пароль",
"serverNotSynced": "Синхронизация новых сообщений (это может занять некоторое время)...",
"groupInviteSettingsWarning": "Вас пригласили присоединиться к группе! Пожалуйста, включите экспериментальную функцию групповые чаты в Настройках, чтобы просмотреть это приглашение.", "groupInviteSettingsWarning": "Вас пригласили присоединиться к группе! Пожалуйста, включите экспериментальную функцию групповые чаты в Настройках, чтобы просмотреть это приглашение.",
"shutdownCwtchAction": "Выключить Cwtch", "shutdownCwtchAction": "Выключить Cwtch",
"shutdownCwtchDialog": "Вы уверены, что хотите выключить Cwtch? Это приведет к закрытию всех подключений и выходу из приложения.", "shutdownCwtchDialog": "Вы уверены, что хотите выключить Cwtch? Это приведет к закрытию всех подключений и выходу из приложения.",
@ -145,6 +114,9 @@
"reallyLeaveThisGroupPrompt": "Вы уверены, что хотите закончить этот разговор? Все сообщения будут удалены.", "reallyLeaveThisGroupPrompt": "Вы уверены, что хотите закончить этот разговор? Все сообщения будут удалены.",
"leaveGroup": "Да, оставить этот чат", "leaveGroup": "Да, оставить этот чат",
"inviteToGroup": "Вас пригласили присоединиться к группе:", "inviteToGroup": "Вас пригласили присоединиться к группе:",
"pasteAddressToAddContact": "Вставьте адрес cwtch, приглашение или пакет ключей здесь, чтобы добавить их в контакты",
"tooltipAddContact": "Добавление нового контакта или разговора",
"titleManageContacts": "Разговоры",
"titleManageServers": "Управление серверами", "titleManageServers": "Управление серверами",
"dateNever": "Никогда", "dateNever": "Никогда",
"dateLastYear": "Прошлый год", "dateLastYear": "Прошлый год",
@ -157,21 +129,20 @@
"descriptionExperiments": "Экспериментальные функции Cwtch это необязательные дополнительные функции, которые добавляют некоторые возможности, но не имеют такой же устойчивости к метаданным как если бы вы общались через традиционный част 1 на 1..", "descriptionExperiments": "Экспериментальные функции Cwtch это необязательные дополнительные функции, которые добавляют некоторые возможности, но не имеют такой же устойчивости к метаданным как если бы вы общались через традиционный част 1 на 1..",
"titleManageProfiles": "Управление профилями Cwtch", "titleManageProfiles": "Управление профилями Cwtch",
"tooltipUnlockProfiles": "Разблокировать зашифрованные профили, введя их пароль.", "tooltipUnlockProfiles": "Разблокировать зашифрованные профили, введя их пароль.",
"titleManageContacts": "Разговоры",
"tooltipAddContact": "Добавление нового контакта или разговора",
"tooltipOpenSettings": "Откройте панель настроек", "tooltipOpenSettings": "Откройте панель настроек",
"contactAlreadyExists": "Контакт уже существует",
"invalidImportString": "Недействительная строка импорта", "invalidImportString": "Недействительная строка импорта",
"contactAlreadyExists": "Контакт уже существует",
"conversationSettings": "Настройки чата", "conversationSettings": "Настройки чата",
"enterCurrentPasswordForDelete": "Пожалуйста, введите текущий пароль, чтобы удалить этот профиль.", "enterCurrentPasswordForDelete": "Пожалуйста, введите текущий пароль, чтобы удалить этот профиль.",
"enableGroups": "Включить Групповые чаты", "enableGroups": "Включить Групповые чаты",
"experimentsEnabled": "Включить Экспериментальные функции",
"localeIt": "Итальянский", "localeIt": "Итальянский",
"localeEs": "Испанский", "localeEs": "Испанский",
"todoPlaceholder": "Выполняю...",
"addNewItem": "Добавить новый элемент в список",
"addListItem": "Добавить новый элемент", "addListItem": "Добавить новый элемент",
"addNewItem": "Добавить новый элемент в список",
"todoPlaceholder": "Выполняю...",
"newConnectionPaneTitle": "Новое соединение", "newConnectionPaneTitle": "Новое соединение",
"networkStatusConnecting": "Подключение к сети и контактам...", "networkStatusOnline": "Online",
"networkStatusAttemptingTor": "Попытка подключиться к сети Tor", "networkStatusAttemptingTor": "Попытка подключиться к сети Tor",
"networkStatusDisconnected": "Нет сети. Проверьте подключение к интернету", "networkStatusDisconnected": "Нет сети. Проверьте подключение к интернету",
"viewGroupMembershipTooltip": "Просмотр членства в группе", "viewGroupMembershipTooltip": "Просмотр членства в группе",
@ -181,7 +152,6 @@
"builddate": "Построен на: %2", "builddate": "Построен на: %2",
"version": "Версия %1", "version": "Версия %1",
"versionTor": "Версия %1 c tor %2", "versionTor": "Версия %1 c tor %2",
"experimentsEnabled": "Включить Экспериментальные функции",
"themeDark": "Темная", "themeDark": "Темная",
"themeLight": "Светлая", "themeLight": "Светлая",
"settingTheme": "Тема", "settingTheme": "Тема",
@ -192,7 +162,6 @@
"localeFr": "Французский", "localeFr": "Французский",
"localeEn": "Английский", "localeEn": "Английский",
"settingLanguage": "Язык", "settingLanguage": "Язык",
"blockUnknownLabel": "Блокировать неизвестные контакты",
"zoomLabel": "Масштаб интерфейса (в основном влияет на размеры текста и кнопок)", "zoomLabel": "Масштаб интерфейса (в основном влияет на размеры текста и кнопок)",
"versionBuilddate": "Версия: %1 Сборка от: %2", "versionBuilddate": "Версия: %1 Сборка от: %2",
"cwtchSettingsTitle": "Настройки Cwtch", "cwtchSettingsTitle": "Настройки Cwtch",
@ -219,18 +188,20 @@
"noPasswordWarning": "Отсутствие пароля в этой учетной записи означает, что все данные, хранящиеся локально, не будут зашифрованы", "noPasswordWarning": "Отсутствие пароля в этой учетной записи означает, что все данные, хранящиеся локально, не будут зашифрованы",
"radioNoPassword": "Незашифрованный (без пароля)", "radioNoPassword": "Незашифрованный (без пароля)",
"radioUsePassword": "Пароль", "radioUsePassword": "Пароль",
"copiedToClipboardNotification": "Copied to Clipboard",
"copyBtn": "Copy",
"editProfile": "Изменить профиль", "editProfile": "Изменить профиль",
"newProfile": "Новый профиль", "newProfile": "Новый профиль",
"defaultProfileName": "Alice",
"profileName": "Отображаемое имя", "profileName": "Отображаемое имя",
"editProfileTitle": "Изменить профиль", "editProfileTitle": "Изменить профиль",
"addProfileTitle": "Добавить новый профиль", "addProfileTitle": "Добавить новый профиль",
"unblockBtn": "Разблокировать контакт", "deleteBtn": "Delete",
"dontSavePeerHistory": "Удалить историю", "saveBtn": "Save",
"savePeerHistoryDescription": "Определяет политуку хранения или удаления переписки с данным контактом.",
"blockBtn": "Заблокировать контакт",
"displayNameLabel": "Отображаемое имя", "displayNameLabel": "Отображаемое имя",
"addressLabel": "Адрес", "addressLabel": "Адрес",
"puzzleGameBtn": "Puzzle Game", "puzzleGameBtn": "Puzzle Game",
"bulletinsBtn": "Bulletins",
"listsBtn": "Списки", "listsBtn": "Списки",
"chatBtn": "Чат", "chatBtn": "Чат",
"rejectGroupBtn": "Отклонить", "rejectGroupBtn": "Отклонить",
@ -238,26 +209,24 @@
"acceptGroupInviteLabel": "Хотите принять приглашение в", "acceptGroupInviteLabel": "Хотите принять приглашение в",
"newGroupBtn": "Создать новую группу", "newGroupBtn": "Создать новую группу",
"copiedClipboardNotification": "Скопировано в буфер обмена", "copiedClipboardNotification": "Скопировано в буфер обмена",
"peerOfflineMessage": "Контакт не в сети, сообщения не могут быть отправлены",
"peerBlockedMessage": "Контакт заблокирован",
"pendingLabel": "Ожидаемый", "pendingLabel": "Ожидаемый",
"acknowledgedLabel": "Отправлено", "acknowledgedLabel": "Отправлено",
"couldNotSendMsgError": "Не удалось отправить это сообщение", "couldNotSendMsgError": "Не удалось отправить это сообщение",
"dmTooltip": "Нажмите, чтобы перейти в DM", "dmTooltip": "Нажмите, чтобы перейти в DM",
"membershipDescription": "Ниже приведен список пользователей, отправивших сообщения группе. Этот список может не отражать всех пользователей, имеющих доступ к группе.", "membershipDescription": "Ниже приведен список пользователей, отправивших сообщения группе. Этот список может не отражать всех пользователей, имеющих доступ к группе.",
"addListItemBtn": "Добавить элемент", "addListItemBtn": "Добавить элемент",
"peerNotOnline": "Контакт не в сети. Вы не можете связаться с ним пока он не появиться в сети.",
"searchList": "Список поиска", "searchList": "Список поиска",
"update": "Обновить", "update": "Обновить",
"inviteBtn": "Пригласить", "inviteBtn": "Пригласить",
"inviteToGroupLabel": "Пригласить в группу", "inviteToGroupLabel": "Пригласить в группу",
"groupNameLabel": "Group name",
"viewServerInfo": "Информация о сервере", "viewServerInfo": "Информация о сервере",
"serverNotSynced": "Синхронизация новых сообщений (это может занять некоторое время)...",
"serverSynced": "Синхронизировано", "serverSynced": "Синхронизировано",
"serverConnectivityDisconnected": "Сервер отключен", "serverConnectivityDisconnected": "Сервер отключен",
"serverConnectivityConnected": "Сервер подключен", "serverConnectivityConnected": "Сервер подключен",
"serverInfo": "Информация о сервере", "serverInfo": "Информация о сервере",
"invitationLabel": "Приглашение", "invitationLabel": "Приглашение",
"serverLabel": "Server",
"search": "Поиск...", "search": "Поиск...",
"cycleColoursDesktop": "Нажмите, чтобы переключать цвета.\nПравый клик чтобы сбросить.", "cycleColoursDesktop": "Нажмите, чтобы переключать цвета.\nПравый клик чтобы сбросить.",
"cycleColoursAndroid": "Нажмите, чтобы переключать цвета.\nНажмите и удерживайте, чтобы сбросить.", "cycleColoursAndroid": "Нажмите, чтобы переключать цвета.\nНажмите и удерживайте, чтобы сбросить.",
@ -266,13 +235,11 @@
"cycleCatsDesktop": "Нажмите, чтобы просмотреть категории.\nПравый клик чтобы сбросить.", "cycleCatsDesktop": "Нажмите, чтобы просмотреть категории.\nПравый клик чтобы сбросить.",
"cycleCatsAndroid": "Нажмите, чтобы просмотреть категории.\nНажмите и удерживайте, чтобы сбросить.", "cycleCatsAndroid": "Нажмите, чтобы просмотреть категории.\nНажмите и удерживайте, чтобы сбросить.",
"blocked": "Заблокировано", "blocked": "Заблокировано",
"pasteAddressToAddContact": "Вставьте адрес cwtch, приглашение или пакет ключей здесь, чтобы добавить их в контакты",
"titlePlaceholder": "заговолок...", "titlePlaceholder": "заговолок...",
"postNewBulletinLabel": "Опубликовать новый бюллетень", "postNewBulletinLabel": "Опубликовать новый бюллетень",
"newBulletinLabel": "Новый бюллетень", "newBulletinLabel": "Новый бюллетень",
"joinGroup": "Вступить в группу", "joinGroup": "Вступить в группу",
"createGroup": "Создать группу", "createGroup": "Создать группу",
"addPeer": "Добавить контакт",
"groupAddr": "Адрес", "groupAddr": "Адрес",
"invitation": "Приглашение", "invitation": "Приглашение",
"server": "Сервер", "server": "Сервер",
@ -281,7 +248,6 @@
"peerAddress": "Адрес", "peerAddress": "Адрес",
"joinGroupTab": "Присоединиться к группе", "joinGroupTab": "Присоединиться к группе",
"createGroupTab": "Создать группу", "createGroupTab": "Создать группу",
"addPeerTab": "Добавить контакт",
"createGroupBtn": "Создать", "createGroupBtn": "Создать",
"defaultGroupName": "Замечательная группа", "defaultGroupName": "Замечательная группа",
"createGroupTitle": "Создать группу" "createGroupTitle": "Создать группу"

View File

@ -1,8 +1,8 @@
import 'dart:convert'; import 'dart:convert';
import 'package:cwtch/config.dart'; import 'package:cwtch/config.dart';
import 'package:cwtch/notification_manager.dart'; import 'package:cwtch/notification_manager.dart';
import 'package:cwtch/themes/cwtch.dart';
import 'package:cwtch/views/messageview.dart'; import 'package:cwtch/views/messageview.dart';
import 'package:cwtch/widgets/rightshiftfixer.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:cwtch/cwtch/ffi.dart'; import 'package:cwtch/cwtch/ffi.dart';
import 'package:cwtch/cwtch/gomobile.dart'; import 'package:cwtch/cwtch/gomobile.dart';
@ -10,6 +10,7 @@ import 'package:flutter/material.dart';
import 'package:cwtch/errorHandler.dart'; import 'package:cwtch/errorHandler.dart';
import 'package:cwtch/settings.dart'; import 'package:cwtch/settings.dart';
import 'package:cwtch/torstatus.dart'; import 'package:cwtch/torstatus.dart';
import 'package:cwtch/views/triplecolview.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'cwtch/cwtch.dart'; import 'cwtch/cwtch.dart';
@ -20,10 +21,10 @@ import 'models/servers.dart';
import 'views/profilemgrview.dart'; import 'views/profilemgrview.dart';
import 'views/splashView.dart'; import 'views/splashView.dart';
import 'dart:io' show Platform, exit; import 'dart:io' show Platform, exit;
import 'themes/opaque.dart'; import 'opaque.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart';
var globalSettings = Settings(Locale("en", ''), CwtchDark()); var globalSettings = Settings(Locale("en", ''), OpaqueDark());
var globalErrorHandler = ErrorHandler(); var globalErrorHandler = ErrorHandler();
var globalTorStatus = TorStatus(); var globalTorStatus = TorStatus();
var globalAppState = AppState(); var globalAppState = AppState();
@ -108,7 +109,7 @@ class FlwtchState extends State<Flwtch> {
supportedLocales: AppLocalizations.supportedLocales, supportedLocales: AppLocalizations.supportedLocales,
title: 'Cwtch', title: 'Cwtch',
theme: mkThemeData(settings), theme: mkThemeData(settings),
home: (!appState.cwtchInit || appState.modalState != ModalState.none) ? SplashView() : ProfileMgrView(), home: appState.cwtchInit == true ? ShiftRightFixer(child: ProfileMgrView()) : SplashView(),
), ),
); );
}, },

View File

@ -5,7 +5,7 @@ import 'package:cwtch/errorHandler.dart';
import 'package:cwtch/settings.dart'; import 'package:cwtch/settings.dart';
import 'licenses.dart'; import 'licenses.dart';
import 'main.dart'; import 'main.dart';
import 'themes/opaque.dart'; import 'opaque.dart';
import 'dart:convert'; import 'dart:convert';
import 'dart:io'; import 'dart:io';
@ -14,7 +14,7 @@ import 'dart:typed_data';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:glob/glob.dart'; import 'package:glob/glob.dart';
var globalSettings = Settings(Locale("en", ''), CwtchDark()); var globalSettings = Settings(Locale("en", ''), OpaqueDark());
var globalErrorHandler = ErrorHandler(); var globalErrorHandler = ErrorHandler();
void main() { void main() {

View File

@ -1,7 +1,5 @@
import 'dart:convert'; import 'dart:convert';
import 'package:cwtch/config.dart';
import 'package:cwtch/models/message.dart';
import 'package:cwtch/widgets/messagerow.dart'; import 'package:cwtch/widgets/messagerow.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:cwtch/models/profileservers.dart'; import 'package:cwtch/models/profileservers.dart';
@ -26,14 +24,8 @@ class ChatMessage {
}; };
} }
enum ModalState {
none,
storageMigration
}
class AppState extends ChangeNotifier { class AppState extends ChangeNotifier {
bool cwtchInit = false; bool cwtchInit = false;
ModalState modalState = ModalState.none;
bool cwtchIsClosing = false; bool cwtchIsClosing = false;
String appError = ""; String appError = "";
String? _selectedProfile; String? _selectedProfile;
@ -53,11 +45,6 @@ class AppState extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
void SetModalState(ModalState newState) {
modalState = newState;
notifyListeners();
}
String? get selectedProfile => _selectedProfile; String? get selectedProfile => _selectedProfile;
set selectedProfile(String? newVal) { set selectedProfile(String? newVal) {
this._selectedProfile = newVal; this._selectedProfile = newVal;
@ -131,7 +118,6 @@ class ProfileListState extends ChangeNotifier {
} }
class ContactListState extends ChangeNotifier { class ContactListState extends ChangeNotifier {
ProfileServerListState? servers;
List<ContactInfoState> _contacts = []; List<ContactInfoState> _contacts = [];
String _filter = ""; String _filter = "";
int get num => _contacts.length; int get num => _contacts.length;
@ -143,10 +129,6 @@ class ContactListState extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
void connectServers(ProfileServerListState servers) {
this.servers = servers;
}
List<ContactInfoState> filteredList() { List<ContactInfoState> filteredList() {
if (!isFiltered) return contacts; if (!isFiltered) return contacts;
return _contacts.where((ContactInfoState c) => c.onion.toLowerCase().startsWith(_filter) || (c.nickname.toLowerCase().contains(_filter))).toList(); return _contacts.where((ContactInfoState c) => c.onion.toLowerCase().startsWith(_filter) || (c.nickname.toLowerCase().contains(_filter))).toList();
@ -154,22 +136,11 @@ class ContactListState extends ChangeNotifier {
void addAll(Iterable<ContactInfoState> newContacts) { void addAll(Iterable<ContactInfoState> newContacts) {
_contacts.addAll(newContacts); _contacts.addAll(newContacts);
servers?.clearGroups();
_contacts.forEach((contact) {
if (contact.isGroup) {
servers?.addGroup(contact);
}
});
resort();
notifyListeners(); notifyListeners();
} }
void add(ContactInfoState newContact) { void add(ContactInfoState newContact) {
_contacts.add(newContact); _contacts.add(newContact);
if (newContact.isGroup) {
servers?.addGroup(newContact);
}
resort();
notifyListeners(); notifyListeners();
} }
@ -177,18 +148,12 @@ class ContactListState extends ChangeNotifier {
_contacts.sort((ContactInfoState a, ContactInfoState b) { _contacts.sort((ContactInfoState a, ContactInfoState b) {
// return -1 = a first in list // return -1 = a first in list
// return 1 = b first in list // return 1 = b first in list
// blocked contacts last // blocked contacts last
if (a.isBlocked == true && b.isBlocked != true) return 1; if (a.isBlocked == true && b.isBlocked != true) return 1;
if (a.isBlocked != true && b.isBlocked == true) return -1; if (a.isBlocked != true && b.isBlocked == true) return -1;
// archive is next... // archive is next...
if (!a.isArchived && b.isArchived) return -1; if (!a.isArchived && b.isArchived) return -1;
if (a.isArchived && !b.isArchived) return 1; if (a.isArchived && !b.isArchived) return 1;
// unapproved top
if (a.isInvitation && !b.isInvitation) return -1;
if (!a.isInvitation && b.isInvitation) return 1;
// special sorting for contacts with no messages in either history // special sorting for contacts with no messages in either history
if (a.lastMessageTime.millisecondsSinceEpoch == 0 && b.lastMessageTime.millisecondsSinceEpoch == 0) { if (a.lastMessageTime.millisecondsSinceEpoch == 0 && b.lastMessageTime.millisecondsSinceEpoch == 0) {
// online contacts first // online contacts first
@ -246,8 +211,8 @@ class ContactListState extends ChangeNotifier {
} }
class ProfileInfoState extends ChangeNotifier { class ProfileInfoState extends ChangeNotifier {
ProfileServerListState _servers = ProfileServerListState();
ContactListState _contacts = ContactListState(); ContactListState _contacts = ContactListState();
ProfileServerListState _servers = ProfileServerListState();
final String onion; final String onion;
String _nickname = ""; String _nickname = "";
String _imagePath = ""; String _imagePath = "";
@ -275,11 +240,7 @@ class ProfileInfoState extends ChangeNotifier {
this._online = online; this._online = online;
this._encrypted = encrypted; this._encrypted = encrypted;
_contacts.connectServers(this._servers);
if (contactsJson != null && contactsJson != "" && contactsJson != "null") { if (contactsJson != null && contactsJson != "" && contactsJson != "null") {
this.replaceServers(serversJson);
List<dynamic> contacts = jsonDecode(contactsJson); List<dynamic> contacts = jsonDecode(contactsJson);
this._contacts.addAll(contacts.map((contact) { this._contacts.addAll(contacts.map((contact) {
return ContactInfoState(this.onion, contact["identifier"], contact["onion"], return ContactInfoState(this.onion, contact["identifier"], contact["onion"],
@ -301,6 +262,8 @@ class ProfileInfoState extends ChangeNotifier {
this._contacts.updateLastMessageTime(this._contacts._contacts.first.identifier, this._contacts._contacts.first.lastMessageTime); this._contacts.updateLastMessageTime(this._contacts._contacts.first.identifier, this._contacts._contacts.first.lastMessageTime);
} }
} }
this.replaceServers(serversJson);
} }
// Parse out the server list json into our server info state struct... // Parse out the server list json into our server info state struct...
@ -309,22 +272,15 @@ class ProfileInfoState extends ChangeNotifier {
List<dynamic> servers = jsonDecode(serversJson); List<dynamic> servers = jsonDecode(serversJson);
this._servers.replace(servers.map((server) { this._servers.replace(servers.map((server) {
// TODO Keys... // TODO Keys...
return RemoteServerInfoState(onion: server["onion"], identifier: server["identifier"], description: server["description"], status: server["status"]); return RemoteServerInfoState(onion: server["onion"], status: server["status"]);
})); }));
this._contacts.contacts.forEach((contact) {
if (contact.isGroup) {
_servers.addGroup(contact);
}
});
notifyListeners(); notifyListeners();
} }
} }
// //
void updateServerStatusCache(String server, String status) { void updateServerStatusCache(String server, String status) {
this._servers.updateServerState(server, status); this._servers.updateServerCache(server, status);
notifyListeners(); notifyListeners();
} }
@ -414,9 +370,12 @@ class ProfileInfoState extends ChangeNotifier {
void downloadUpdate(String fileKey, int progress, int numChunks) { void downloadUpdate(String fileKey, int progress, int numChunks) {
if (!downloadActive(fileKey)) { if (!downloadActive(fileKey)) {
this._downloads[fileKey] = FileDownloadProgress(numChunks, DateTime.now());
if (progress < 0) { if (progress < 0) {
this._downloads[fileKey] = FileDownloadProgress(numChunks, DateTime.now());
this._downloads[fileKey]!.interrupted = true; this._downloads[fileKey]!.interrupted = true;
notifyListeners();
} else {
print("error: received progress for unknown download " + fileKey);
} }
} else { } else {
if (this._downloads[fileKey]!.interrupted) { if (this._downloads[fileKey]!.interrupted) {
@ -424,16 +383,17 @@ class ProfileInfoState extends ChangeNotifier {
} }
this._downloads[fileKey]!.chunksDownloaded = progress; this._downloads[fileKey]!.chunksDownloaded = progress;
this._downloads[fileKey]!.chunksTotal = numChunks; this._downloads[fileKey]!.chunksTotal = numChunks;
notifyListeners();
} }
notifyListeners();
} }
void downloadMarkManifest(String fileKey) { void downloadMarkManifest(String fileKey) {
if (!downloadActive(fileKey)) { if (!downloadActive(fileKey)) {
this._downloads[fileKey] = FileDownloadProgress(1, DateTime.now()); print("error: received download completion notice for unknown download " + fileKey);
} else {
this._downloads[fileKey]!.gotManifest = true;
notifyListeners();
} }
this._downloads[fileKey]!.gotManifest = true;
notifyListeners();
} }
void downloadMarkFinished(String fileKey, String finalPath) { void downloadMarkFinished(String fileKey, String finalPath) {
@ -443,17 +403,10 @@ class ProfileInfoState extends ChangeNotifier {
// so setting numChunks correctly shouldn't matter // so setting numChunks correctly shouldn't matter
this.downloadInit(fileKey, 1); this.downloadInit(fileKey, 1);
} }
// only update if different this._downloads[fileKey]!.timeEnd = DateTime.now();
if (!this._downloads[fileKey]!.complete) { this._downloads[fileKey]!.downloadedTo = finalPath;
this._downloads[fileKey]!.timeEnd = DateTime.now(); this._downloads[fileKey]!.complete = true;
this._downloads[fileKey]!.downloadedTo = finalPath; notifyListeners();
this._downloads[fileKey]!.complete = true;
notifyListeners();
}
}
bool downloadKnown(String fileKey) {
return this._downloads.containsKey(fileKey);
} }
bool downloadActive(String fileKey) { bool downloadActive(String fileKey) {
@ -547,12 +500,6 @@ ContactAuthorization stringToContactAuthorization(String authStr) {
} }
} }
class MessageCache {
final MessageMetadata metadata;
final String wrapper;
MessageCache(this.metadata, this.wrapper);
}
class ContactInfoState extends ChangeNotifier { class ContactInfoState extends ChangeNotifier {
final String profileOnion; final String profileOnion;
final int identifier; final int identifier;
@ -567,7 +514,6 @@ class ContactInfoState extends ChangeNotifier {
late int _totalMessages = 0; late int _totalMessages = 0;
late DateTime _lastMessageTime; late DateTime _lastMessageTime;
late Map<String, GlobalKey<MessageRowState>> keys; late Map<String, GlobalKey<MessageRowState>> keys;
late List<MessageCache?> messageCache;
int _newMarker = 0; int _newMarker = 0;
DateTime _newMarkerClearAt = DateTime.now(); DateTime _newMarkerClearAt = DateTime.now();
@ -599,7 +545,6 @@ class ContactInfoState extends ChangeNotifier {
this._lastMessageTime = lastMessageTime == null ? DateTime.fromMillisecondsSinceEpoch(0) : lastMessageTime; this._lastMessageTime = lastMessageTime == null ? DateTime.fromMillisecondsSinceEpoch(0) : lastMessageTime;
this._server = server; this._server = server;
this._archived = archived; this._archived = archived;
this.messageCache = List.empty(growable: true);
keys = Map<String, GlobalKey<MessageRowState>>(); keys = Map<String, GlobalKey<MessageRowState>>();
} }
@ -676,7 +621,7 @@ class ContactInfoState extends ChangeNotifier {
set newMarker(int newVal) { set newMarker(int newVal) {
// only unreadMessages++ can set newMarker = 1; // only unreadMessages++ can set newMarker = 1;
// avoids drawing a marker when the convo is already open // avoids drawing a marker when the convo is already open
if (newVal >= 1) { if (newVal > 1) {
this._newMarker = newVal; this._newMarker = newVal;
notifyListeners(); notifyListeners();
} }
@ -712,37 +657,11 @@ class ContactInfoState extends ChangeNotifier {
} }
} }
GlobalKey<MessageRowState> getMessageKey(int conversation, int message) { GlobalKey<MessageRowState> getMessageKey(String index) {
String index = "c: " + conversation.toString() + " m:" + message.toString();
if (keys[index] == null) { if (keys[index] == null) {
keys[index] = GlobalKey<MessageRowState>(); keys[index] = GlobalKey<MessageRowState>();
} }
GlobalKey<MessageRowState> ret = keys[index]!; GlobalKey<MessageRowState> ret = keys[index]!;
return ret; return ret;
} }
GlobalKey<MessageRowState>? getMessageKeyOrFail(int conversation, int message) {
String index = "c: " + conversation.toString() + " m:" + message.toString();
if (keys[index] == null) {
return null;
}
GlobalKey<MessageRowState> ret = keys[index]!;
return ret;
}
void updateMessageCache(int conversation, int messageID, DateTime timestamp, String senderHandle, String senderImage, bool isAuto, String data) {
this.messageCache.insert(0, MessageCache(MessageMetadata(profileOnion, conversation, messageID, timestamp, senderHandle, senderImage, "", {}, false, false, isAuto), data));
this.totalMessages += 1;
}
void bumpMessageCache() {
this.messageCache.insert(0, null);
this.totalMessages += 1;
}
void ackCache(int messageID) {
this.messageCache.firstWhere((element) => element?.metadata.messageID == messageID)?.metadata.ackd = true;
notifyListeners();
}
} }

View File

@ -28,47 +28,11 @@ const GroupConversationHandleLength = 32;
abstract class Message { abstract class Message {
MessageMetadata getMetadata(); MessageMetadata getMetadata();
Widget getWidget(BuildContext context, Key key); Widget getWidget(BuildContext context);
Widget getPreviewWidget(BuildContext context); Widget getPreviewWidget(BuildContext context);
} }
Message compileOverlay(MessageMetadata metadata, String messageData) {
try {
dynamic message = jsonDecode(messageData);
var content = message['d'] as dynamic;
var overlay = int.parse(message['o'].toString());
switch (overlay) {
case TextMessageOverlay:
return TextMessage(metadata, content);
case SuggestContactOverlay:
case InviteGroupOverlay:
return InviteMessage(overlay, metadata, content);
case QuotedMessageOverlay:
return QuotedMessage(metadata, content);
case FileShareOverlay:
return FileMessage(metadata, content);
default:
// Metadata is valid, content is not..
return MalformedMessage(metadata);
}
} catch (e) {
return MalformedMessage(metadata);
}
}
Future<Message> messageHandler(BuildContext context, String profileOnion, int conversationIdentifier, int index, {bool byID = false}) { Future<Message> messageHandler(BuildContext context, String profileOnion, int conversationIdentifier, int index, {bool byID = false}) {
try {
var cache = Provider.of<ProfileInfoState>(context, listen: false).contactList.getContact(conversationIdentifier)?.messageCache;
if (cache != null && cache.length > index) {
if (cache[index] != null) {
return Future.value(compileOverlay(cache[index]!.metadata, cache[index]!.wrapper));
}
}
} catch (e) {
// provider check failed...make an expensive call...
}
try { try {
Future<dynamic> rawMessageEnvelopeFuture; Future<dynamic> rawMessageEnvelopeFuture;
@ -79,7 +43,7 @@ Future<Message> messageHandler(BuildContext context, String profileOnion, int co
} }
return rawMessageEnvelopeFuture.then((dynamic rawMessageEnvelope) { return rawMessageEnvelopeFuture.then((dynamic rawMessageEnvelope) {
var metadata = MessageMetadata(profileOnion, conversationIdentifier, index, DateTime.now(), "", "", "", <String, String>{}, false, true, false); var metadata = MessageMetadata(profileOnion, conversationIdentifier, index, -1, DateTime.now(), "", "", null, 0, false, true);
try { try {
dynamic messageWrapper = jsonDecode(rawMessageEnvelope); dynamic messageWrapper = jsonDecode(rawMessageEnvelope);
// There are 2 conditions in which this error condition can be met: // There are 2 conditions in which this error condition can be met:
@ -94,7 +58,7 @@ Future<Message> messageHandler(BuildContext context, String profileOnion, int co
if (messageWrapper['Message'] == null || messageWrapper['Message'] == '' || messageWrapper['Message'] == '{}') { if (messageWrapper['Message'] == null || messageWrapper['Message'] == '' || messageWrapper['Message'] == '{}') {
return Future.delayed(Duration(seconds: 2), () { return Future.delayed(Duration(seconds: 2), () {
print("Tail recursive call to messageHandler called. This should be a rare event. If you see multiples of this log over a short period of time please log it as a bug."); print("Tail recursive call to messageHandler called. This should be a rare event. If you see multiples of this log over a short period of time please log it as a bug.");
return messageHandler(context, profileOnion, conversationIdentifier, -1, byID: byID).then((value) => value); return messageHandler(context, profileOnion, conversationIdentifier, index, byID: byID).then((value) => value);
}); });
} }
@ -103,20 +67,37 @@ Future<Message> messageHandler(BuildContext context, String profileOnion, int co
var timestamp = DateTime.tryParse(messageWrapper['Timestamp'])!; var timestamp = DateTime.tryParse(messageWrapper['Timestamp'])!;
var senderHandle = messageWrapper['PeerID']; var senderHandle = messageWrapper['PeerID'];
var senderImage = messageWrapper['ContactImage']; var senderImage = messageWrapper['ContactImage'];
var attributes = messageWrapper['Attributes']; var flags = int.parse(messageWrapper['Flags'].toString());
var ackd = messageWrapper['Acknowledged']; var ackd = messageWrapper['Acknowledged'];
var error = messageWrapper['Error'] != null; var error = messageWrapper['Error'] != null;
var signature = messageWrapper['Signature']; var signature = messageWrapper['Signature'];
metadata = MessageMetadata(profileOnion, conversationIdentifier, messageID, timestamp, senderHandle, senderImage, signature, attributes, ackd, error, false); metadata = MessageMetadata(profileOnion, conversationIdentifier, index, messageID, timestamp, senderHandle, senderImage, signature, flags, ackd, error);
return compileOverlay(metadata, messageWrapper['Message']); dynamic message = jsonDecode(messageWrapper['Message']);
var content = message['d'] as dynamic;
var overlay = int.parse(message['o'].toString());
switch (overlay) {
case TextMessageOverlay:
return TextMessage(metadata, content);
case SuggestContactOverlay:
case InviteGroupOverlay:
return InviteMessage(overlay, metadata, content);
case QuotedMessageOverlay:
return QuotedMessage(metadata, content);
case FileShareOverlay:
return FileMessage(metadata, content);
default:
// Metadata is valid, content is not..
return MalformedMessage(metadata);
}
} catch (e) { } catch (e) {
EnvironmentConfig.debugLog("an error! " + e.toString()); EnvironmentConfig.debugLog("an error! " + e.toString());
return MalformedMessage(metadata); return MalformedMessage(metadata);
} }
}); });
} catch (e) { } catch (e) {
return Future.value(MalformedMessage(MessageMetadata(profileOnion, conversationIdentifier, -1, DateTime.now(), "", "", "", <String, String>{}, false, true, false))); return Future.value(MalformedMessage(MessageMetadata(profileOnion, conversationIdentifier, index, -1, DateTime.now(), "", "", null, 0, false, true)));
} }
} }
@ -124,19 +105,23 @@ class MessageMetadata extends ChangeNotifier {
// meta-metadata // meta-metadata
final String profileOnion; final String profileOnion;
final int conversationIdentifier; final int conversationIdentifier;
final int messageIndex;
final int messageID; final int messageID;
final DateTime timestamp; final DateTime timestamp;
final String senderHandle; final String senderHandle;
final String? senderImage; final String? senderImage;
final dynamic _attributes; int _flags;
bool _ackd; bool _ackd;
bool _error; bool _error;
final bool isAuto;
final String? signature; final String? signature;
dynamic get attributes => this._attributes; int get flags => this._flags;
set flags(int newVal) {
this._flags = newVal;
notifyListeners();
}
bool get ackd => this._ackd; bool get ackd => this._ackd;
set ackd(bool newVal) { set ackd(bool newVal) {
@ -151,5 +136,5 @@ class MessageMetadata extends ChangeNotifier {
} }
MessageMetadata( MessageMetadata(
this.profileOnion, this.conversationIdentifier, this.messageID, this.timestamp, this.senderHandle, this.senderImage, this.signature, this._attributes, this._ackd, this._error, this.isAuto); this.profileOnion, this.conversationIdentifier, this.messageIndex, this.messageID, this.timestamp, this.senderHandle, this.senderImage, this.signature, this._flags, this._ackd, this._error);
} }

View File

@ -0,0 +1,26 @@
import 'dart:collection';
import 'package:cwtch/widgets/messagerow.dart';
import 'package:flutter/material.dart';
int MinCacheSize = 20;
class MessageCache extends ChangeNotifier {
final String profile;
Queue<MessageRowState> cacheByIndex = Queue();
Map<int, MessageRowState> cacheById = Map();
MessageCache(this.profile) {}
// So we internall need to fetch by N (new libcwtch API)
// then double store by index and id to support both calls
// monitor activeConversation for unlimited growth and when
// change to not active convo, trigger a shrink
// bonus: dont prune cache by id messages refed in core list
GetMessageByIndex(conversationIdentifier, index);
GetMessageById(conversationIdentifier, index);
}

View File

@ -7,7 +7,6 @@ import 'package:cwtch/widgets/messagerow.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../../main.dart';
import '../../model.dart'; import '../../model.dart';
class FileMessage extends Message { class FileMessage extends Message {
@ -18,10 +17,11 @@ class FileMessage extends Message {
FileMessage(this.metadata, this.content); FileMessage(this.metadata, this.content);
@override @override
Widget getWidget(BuildContext context, Key key) { Widget getWidget(BuildContext context) {
return ChangeNotifierProvider.value( return ChangeNotifierProvider.value(
value: this.metadata, value: this.metadata,
builder: (bcontext, child) { builder: (bcontext, child) {
String idx = this.metadata.conversationIdentifier.toString() + this.metadata.messageID.toString();
dynamic shareObj = jsonDecode(this.content); dynamic shareObj = jsonDecode(this.content);
if (shareObj == null) { if (shareObj == null) {
return MessageRow(MalformedBubble()); return MessageRow(MalformedBubble());
@ -30,19 +30,12 @@ class FileMessage extends Message {
String rootHash = shareObj['h'] as String; String rootHash = shareObj['h'] as String;
String nonce = shareObj['n'] as String; String nonce = shareObj['n'] as String;
int fileSize = shareObj['s'] as int; int fileSize = shareObj['s'] as int;
String fileKey = rootHash + "." + nonce;
if (metadata.attributes["file-downloaded"] == "true") {
if (!Provider.of<ProfileInfoState>(context).downloadKnown(fileKey)) {
Provider.of<FlwtchState>(context, listen: false).cwtch.CheckDownloadStatus(Provider.of<ProfileInfoState>(context, listen: false).onion, fileKey);
}
}
if (!validHash(rootHash, nonce)) { if (!validHash(rootHash, nonce)) {
return MessageRow(MalformedBubble()); return MessageRow(MalformedBubble());
} }
return MessageRow(FileBubble(nameSuggestion, rootHash, nonce, fileSize, isAuto: metadata.isAuto), key: key); return MessageRow(FileBubble(nameSuggestion, rootHash, nonce, fileSize), key: Provider.of<ContactInfoState>(bcontext).getMessageKey(idx));
}); });
} }
@ -62,16 +55,13 @@ class FileMessage extends Message {
if (!validHash(rootHash, nonce)) { if (!validHash(rootHash, nonce)) {
return MessageRow(MalformedBubble()); return MessageRow(MalformedBubble());
} }
return Container( return FileBubble(
alignment: Alignment.center, nameSuggestion,
child: FileBubble( rootHash,
nameSuggestion, nonce,
rootHash, fileSize,
nonce, interactive: false,
fileSize, );
isAuto: metadata.isAuto,
interactive: false,
));
}); });
} }

View File

@ -17,10 +17,11 @@ class InviteMessage extends Message {
InviteMessage(this.overlay, this.metadata, this.content); InviteMessage(this.overlay, this.metadata, this.content);
@override @override
Widget getWidget(BuildContext context, Key key) { Widget getWidget(BuildContext context) {
return ChangeNotifierProvider.value( return ChangeNotifierProvider.value(
value: this.metadata, value: this.metadata,
builder: (bcontext, child) { builder: (bcontext, child) {
String idx = this.metadata.conversationIdentifier.toString() + this.metadata.messageID.toString();
String inviteTarget; String inviteTarget;
String inviteNick; String inviteNick;
String invite = this.content; String invite = this.content;
@ -39,7 +40,7 @@ class InviteMessage extends Message {
return MessageRow(MalformedBubble()); return MessageRow(MalformedBubble());
} }
} }
return MessageRow(InvitationBubble(overlay, inviteTarget, inviteNick, invite), key: key); return MessageRow(InvitationBubble(overlay, inviteTarget, inviteNick, invite), key: Provider.of<ContactInfoState>(bcontext).getMessageKey(idx));
}); });
} }

View File

@ -9,11 +9,11 @@ class MalformedMessage extends Message {
MalformedMessage(this.metadata); MalformedMessage(this.metadata);
@override @override
Widget getWidget(BuildContext context, Key key) { Widget getWidget(BuildContext context) {
return ChangeNotifierProvider.value( return ChangeNotifierProvider.value(
value: this.metadata, value: this.metadata,
builder: (context, child) { builder: (context, child) {
return MessageRow(MalformedBubble(), key: key); return MessageRow(MalformedBubble());
}); });
} }

View File

@ -2,7 +2,6 @@ import 'dart:convert';
import 'package:cwtch/models/message.dart'; import 'package:cwtch/models/message.dart';
import 'package:cwtch/models/messages/malformedmessage.dart'; import 'package:cwtch/models/messages/malformedmessage.dart';
import 'package:cwtch/widgets/malformedbubble.dart';
import 'package:cwtch/widgets/messagerow.dart'; import 'package:cwtch/widgets/messagerow.dart';
import 'package:cwtch/widgets/quotedmessage.dart'; import 'package:cwtch/widgets/quotedmessage.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
@ -52,7 +51,7 @@ class QuotedMessage extends Message {
dynamic message = jsonDecode(this.content); dynamic message = jsonDecode(this.content);
return Text(message["body"]); return Text(message["body"]);
} catch (e) { } catch (e) {
return MalformedBubble(); return MalformedMessage(this.metadata).getWidget(context);
} }
}); });
} }
@ -63,15 +62,16 @@ class QuotedMessage extends Message {
} }
@override @override
Widget getWidget(BuildContext context, Key key) { Widget getWidget(BuildContext context) {
try { try {
dynamic message = jsonDecode(this.content); dynamic message = jsonDecode(this.content);
if (message["body"] == null || message["quotedHash"] == null) { if (message["body"] == null || message["quotedHash"] == null) {
return MalformedBubble(); return MalformedMessage(this.metadata).getWidget(context);
} }
var quotedMessagePotentials = Provider.of<FlwtchState>(context).cwtch.GetMessageByContentHash(metadata.profileOnion, metadata.conversationIdentifier, message["quotedHash"]); var quotedMessagePotentials = Provider.of<FlwtchState>(context).cwtch.GetMessageByContentHash(metadata.profileOnion, metadata.conversationIdentifier, message["quotedHash"]);
int messageIndex = metadata.messageIndex;
Future<LocallyIndexedMessage?> quotedMessage = quotedMessagePotentials.then((matchingMessages) { Future<LocallyIndexedMessage?> quotedMessage = quotedMessagePotentials.then((matchingMessages) {
if (matchingMessages == "[]") { if (matchingMessages == "[]") {
return null; return null;
@ -81,7 +81,9 @@ class QuotedMessage extends Message {
// message // message
try { try {
var list = (jsonDecode(matchingMessages) as List<dynamic>).map((data) => LocallyIndexedMessage.fromJson(data)).toList(); var list = (jsonDecode(matchingMessages) as List<dynamic>).map((data) => LocallyIndexedMessage.fromJson(data)).toList();
LocallyIndexedMessage candidate = list.reversed.first; LocallyIndexedMessage candidate = list.reversed.firstWhere((element) => messageIndex < element.index, orElse: () {
return list.firstWhere((element) => messageIndex > element.index);
});
return candidate; return candidate;
} catch (e) { } catch (e) {
// Malformed Message will be returned... // Malformed Message will be returned...
@ -92,17 +94,18 @@ class QuotedMessage extends Message {
return ChangeNotifierProvider.value( return ChangeNotifierProvider.value(
value: this.metadata, value: this.metadata,
builder: (bcontext, child) { builder: (bcontext, child) {
String idx = this.metadata.conversationIdentifier.toString() + this.metadata.messageID.toString();
return MessageRow( return MessageRow(
QuotedMessageBubble(message["body"], quotedMessage.then((LocallyIndexedMessage? localIndex) { QuotedMessageBubble(message["body"], quotedMessage.then((LocallyIndexedMessage? localIndex) {
if (localIndex != null) { if (localIndex != null) {
return messageHandler(bcontext, metadata.profileOnion, metadata.conversationIdentifier, localIndex.index); return messageHandler(context, metadata.profileOnion, metadata.conversationIdentifier, localIndex.index);
} }
return MalformedMessage(this.metadata); return MalformedMessage(this.metadata);
})), })),
key: key); key: Provider.of<ContactInfoState>(bcontext).getMessageKey(idx));
}); });
} catch (e) { } catch (e) {
return MalformedBubble(); return MalformedMessage(this.metadata).getWidget(context);
} }
} }
} }

View File

@ -1,8 +1,5 @@
import 'package:cwtch/models/message.dart'; import 'package:cwtch/models/message.dart';
import 'package:cwtch/models/messages/malformedmessage.dart';
import 'package:cwtch/widgets/malformedbubble.dart';
import 'package:cwtch/widgets/messagebubble.dart'; import 'package:cwtch/widgets/messagebubble.dart';
import 'package:cwtch/widgets/messageloadingbubble.dart';
import 'package:cwtch/widgets/messagerow.dart'; import 'package:cwtch/widgets/messagerow.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
@ -31,14 +28,12 @@ class TextMessage extends Message {
} }
@override @override
Widget getWidget(BuildContext context, Key key) { Widget getWidget(BuildContext context) {
return ChangeNotifierProvider.value( return ChangeNotifierProvider.value(
value: this.metadata, value: this.metadata,
builder: (bcontext, child) { builder: (bcontext, child) {
return MessageRow( String idx = this.metadata.conversationIdentifier.toString() + this.metadata.messageID.toString();
MessageBubble(this.content), return MessageRow(MessageBubble(this.content), key: Provider.of<ContactInfoState>(bcontext).getMessageKey(idx));
key: key,
);
}); });
} }
} }

View File

@ -1,4 +1,3 @@
import 'package:cwtch/model.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class ProfileServerListState extends ChangeNotifier { class ProfileServerListState extends ChangeNotifier {
@ -7,7 +6,6 @@ class ProfileServerListState extends ChangeNotifier {
void replace(Iterable<RemoteServerInfoState> newServers) { void replace(Iterable<RemoteServerInfoState> newServers) {
_servers.clear(); _servers.clear();
_servers.addAll(newServers); _servers.addAll(newServers);
resort();
notifyListeners(); notifyListeners();
} }
@ -16,78 +14,23 @@ class ProfileServerListState extends ChangeNotifier {
return idx >= 0 ? _servers[idx] : null; return idx >= 0 ? _servers[idx] : null;
} }
void updateServerState(String onion, String status) { void updateServerCache(String onion, String status) {
int idx = _servers.indexWhere((element) => element.onion == onion); int idx = _servers.indexWhere((element) => element.onion == onion);
if (idx >= 0) { if (idx >= 0) {
_servers[idx].status = status; _servers[idx] = RemoteServerInfoState(onion: onion, status: status);
} else { } else {
print("Tried to update server cache without a starting state...this is probably an error"); print("Tried to update server cache without a starting state...this is probably an error");
} }
resort();
notifyListeners(); notifyListeners();
} }
void resort() {
_servers.sort((RemoteServerInfoState a, RemoteServerInfoState b) {
// return -1 = a first in list
// return 1 = b first in list
// online v offline
if (a.status == "Synced" && b.status != "Synced") {
return -1;
} else if (a.status != "Synced" && b.status == "Synced") {
return 1;
}
// num of groups
if (a.groups.length > b.groups.length) {
return -1;
} else if (b.groups.length > a.groups.length) {
return 1;
}
return 0;
});
}
void clearGroups() {
_servers.map((server) => server.clearGroups());
}
void addGroup(ContactInfoState group) {
int idx = _servers.indexWhere((element) => element.onion == group.server);
if (idx >= 0) {
_servers[idx].addGroup(group);
}
}
List<RemoteServerInfoState> get servers => _servers.sublist(0); //todo: copy?? dont want caller able to bypass changenotifier List<RemoteServerInfoState> get servers => _servers.sublist(0); //todo: copy?? dont want caller able to bypass changenotifier
} }
class RemoteServerInfoState extends ChangeNotifier { class RemoteServerInfoState extends ChangeNotifier {
final String onion; final String onion;
final int identifier; final String status;
String status;
String description;
List<ContactInfoState> _groups = [];
RemoteServerInfoState({required this.onion, required this.identifier, required this.description, required this.status});
void updateDescription(String newDescription) {
this.description = newDescription;
notifyListeners();
}
void clearGroups() {
_groups = [];
}
void addGroup(ContactInfoState group) {
_groups.add(group);
notifyListeners();
}
List<ContactInfoState> get groups => _groups.sublist(0); //todo: copy?? dont want caller able to bypass changenotifier
RemoteServerInfoState({required this.onion, required this.status});
} }

View File

@ -39,34 +39,11 @@ class ServerListState extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
void updateServerStats(String onion, int newTotalMessages, int newConnections) {
var server = getServer(onion);
if (server != null) {
server.setStats(newTotalMessages, newConnections);
resort();
notifyListeners();
}
}
void delete(String onion) { void delete(String onion) {
_servers.removeWhere((element) => element.onion == onion); _servers.removeWhere((element) => element.onion == onion);
notifyListeners(); notifyListeners();
} }
void resort() {
_servers.sort((ServerInfoState a, ServerInfoState b) {
// return -1 = a first in list
// return 1 = b first in list
if (a.totalMessages > b.totalMessages) {
return -1;
} else if (b.totalMessages > a.totalMessages) {
return 1;
}
return 0;
});
}
List<ServerInfoState> get servers => _servers.sublist(0); //todo: copy?? dont want caller able to bypass changenotifier List<ServerInfoState> get servers => _servers.sublist(0); //todo: copy?? dont want caller able to bypass changenotifier
} }
@ -78,8 +55,6 @@ class ServerInfoState extends ChangeNotifier {
bool running; bool running;
bool autoStart; bool autoStart;
bool isEncrypted; bool isEncrypted;
int totalMessages = 0;
int connections = 0;
ServerInfoState({required this.onion, required this.serverBundle, required this.running, required this.description, required this.autoStart, required this.isEncrypted}); ServerInfoState({required this.onion, required this.serverBundle, required this.running, required this.description, required this.autoStart, required this.isEncrypted});
@ -97,10 +72,4 @@ class ServerInfoState extends ChangeNotifier {
description = val; description = val;
notifyListeners(); notifyListeners();
} }
void setStats(int newTotalMessages, int newConnections) {
totalMessages = newTotalMessages;
connections = newConnections;
notifyListeners();
}
} }

1455
lib/opaque.dart Normal file

File diff suppressed because it is too large Load Diff

View File

@ -2,17 +2,15 @@ import 'dart:collection';
import 'dart:ui'; import 'dart:ui';
import 'dart:core'; import 'dart:core';
import 'package:cwtch/themes/cwtch.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:package_info_plus/package_info_plus.dart'; import 'package:package_info_plus/package_info_plus.dart';
import 'themes/opaque.dart'; import 'opaque.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart';
const TapirGroupsExperiment = "tapir-groups-experiment"; const TapirGroupsExperiment = "tapir-groups-experiment";
const ServerManagementExperiment = "servers-experiment"; const ServerManagementExperiment = "servers-experiment";
const FileSharingExperiment = "filesharing"; const FileSharingExperiment = "filesharing";
const ImagePreviewsExperiment = "filesharing-images";
const ClickableLinksExperiment = "clickable-links"; const ClickableLinksExperiment = "clickable-links";
enum DualpaneMode { enum DualpaneMode {
@ -37,10 +35,16 @@ class Settings extends ChangeNotifier {
bool blockUnknownConnections = false; bool blockUnknownConnections = false;
bool streamerMode = false; bool streamerMode = false;
String _downloadPath = "";
void setTheme(String themeId, String mode) { /// Set the dark theme.
theme = getTheme(themeId, mode); void setDark() {
theme = OpaqueDark();
notifyListeners();
}
/// Set the Light theme.
void setLight() {
theme = OpaqueLight();
notifyListeners(); notifyListeners();
} }
@ -65,7 +69,11 @@ class Settings extends ChangeNotifier {
/// be sent to the function and new settings will be instantiated based on the contents. /// be sent to the function and new settings will be instantiated based on the contents.
handleUpdate(dynamic settings) { handleUpdate(dynamic settings) {
// Set Theme and notify listeners // Set Theme and notify listeners
this.setTheme(settings["Theme"], settings["ThemeMode"] ?? mode_dark); if (settings["Theme"] == "light") {
this.setLight();
} else {
this.setDark();
}
// Set Locale and notify listeners // Set Locale and notify listeners
switchLocale(Locale(settings["Locale"])); switchLocale(Locale(settings["Locale"]));
@ -83,9 +91,6 @@ class Settings extends ChangeNotifier {
_uiColumnModePortrait = uiColumnModeFromString(settings["UIColumnModePortrait"]); _uiColumnModePortrait = uiColumnModeFromString(settings["UIColumnModePortrait"]);
_uiColumnModeLandscape = uiColumnModeFromString(settings["UIColumnModeLandscape"]); _uiColumnModeLandscape = uiColumnModeFromString(settings["UIColumnModeLandscape"]);
// auto-download folder
_downloadPath = settings["DownloadPath"] ?? "";
// Push the experimental settings to Consumers of Settings // Push the experimental settings to Consumers of Settings
notifyListeners(); notifyListeners();
} }
@ -218,36 +223,17 @@ class Settings extends ChangeNotifier {
} }
} }
// checks experiment settings and file extension for image previews
// (ignores file size; if the user manually accepts the file, assume it's okay to preview)
bool shouldPreview(String path) {
var lpath = path.toLowerCase();
return isExperimentEnabled(ImagePreviewsExperiment) && (
lpath.endsWith(".jpg") ||
lpath.endsWith(".jpeg") ||
lpath.endsWith(".png") ||
lpath.endsWith(".gif") ||
lpath.endsWith(".webp") ||
lpath.endsWith(".bmp")
);
}
String get downloadPath => _downloadPath;
set downloadPath(String newval) {
_downloadPath = newval;
notifyListeners();
}
/// Construct a default settings object. /// Construct a default settings object.
Settings(this.locale, this.theme); Settings(this.locale, this.theme);
/// Convert this Settings object to a JSON representation for serialization on the /// Convert this Settings object to a JSON representation for serialization on the
/// event bus. /// event bus.
dynamic asJson() { dynamic asJson() {
var themeString = theme.identifier();
return { return {
"Locale": this.locale.languageCode, "Locale": this.locale.languageCode,
"Theme": theme.theme, "Theme": themeString,
"ThemeMode": theme.mode,
"PreviousPid": -1, "PreviousPid": -1,
"BlockUnknownConnections": blockUnknownConnections, "BlockUnknownConnections": blockUnknownConnections,
"StreamerMode": streamerMode, "StreamerMode": streamerMode,
@ -257,7 +243,6 @@ class Settings extends ChangeNotifier {
"FirstTime": false, "FirstTime": false,
"UIColumnModePortrait": uiColumnModePortrait.toString(), "UIColumnModePortrait": uiColumnModePortrait.toString(),
"UIColumnModeLandscape": uiColumnModeLandscape.toString(), "UIColumnModeLandscape": uiColumnModeLandscape.toString(),
"DownloadPath": _downloadPath,
}; };
} }
} }

View File

@ -1,123 +0,0 @@
import 'dart:ui';
import 'dart:core';
import 'package:flutter/material.dart';
import 'opaque.dart';
const cwtch_theme = "cwtch";
final Color darkGreyPurple = Color(0xFF281831);
final Color deepPurple = Color(0xFF422850);
final Color mauvePurple = Color(0xFF8E64A5);
final Color whiteishPurple = Color(0xFFE3DFE4);
final Color lightGrey = Color(0xFF9E9E9E);
final Color softGreen = Color(0xFFA0FFB0);
final Color softRed = Color(0xFFFFA0B0);
final Color whitePurple = Color(0xFFFFFDFF);
final Color softPurple = Color(0xFFFDF3FC);
final Color purple = Color(0xFFDFB9DE);
final Color brightPurple = Color(0xFFD1B0E0); // not in new: portrait badge color
final Color darkPurple = Color(0xFF350052);
final Color greyPurple = Color(0xFF775F84); // not in new: portrait borders
final Color pink = Color(0xFFE85DA1); // not in new: active button color
final Color hotPink = Color(0xFFD20070); // Color(0xFFD01972);
final Color softGrey = Color(0xFFB3B6B3); // not in new theme: blocked
OpaqueThemeType GetCwtchTheme(String mode) {
if (mode == mode_dark) {
return CwtchDark();
} else {
return CwtchLight();
}
}
class CwtchDark extends OpaqueThemeType {
static final Color background = darkGreyPurple;
static final Color header = darkGreyPurple;
static final Color userBubble = mauvePurple;
static final Color peerBubble = deepPurple;
static final Color font = whiteishPurple;
static final Color settings = whiteishPurple;
static final Color accent = hotPink;
get theme => cwtch_theme;
get mode => mode_dark;
get backgroundMainColor => background; // darkGreyPurple;
get backgroundPaneColor => header; //darkGreyPurple;
get topbarColor => header; //darkGreyPurple;
get backgroundHilightElementColor => deepPurple;
get mainTextColor => font; //whiteishPurple;
get sendHintTextColor => mauvePurple;
get hilightElementColor => purple;
get defaultButtonColor => accent; //hotPink;
get defaultButtonTextColor => whiteishPurple;
get defaultButtonDisabledColor => lightGrey;
get defaultButtonDisabledTextColor => darkGreyPurple;
get textfieldBackgroundColor => deepPurple;
get textfieldBorderColor => deepPurple;
get textfieldHintColor => mainTextColor; //TODO pick
get textfieldErrorColor => hotPink;
get scrollbarDefaultColor => purple;
get portraitBackgroundColor => deepPurple;
get portraitOnlineBorderColor => whiteishPurple;
get portraitOfflineBorderColor => purple;
get portraitBlockedBorderColor => lightGrey;
get portraitBlockedTextColor => lightGrey;
get portraitContactBadgeColor => hotPink;
get portraitContactBadgeTextColor => whiteishPurple;
get portraitProfileBadgeColor => mauvePurple;
get portraitProfileBadgeTextColor => darkGreyPurple;
get dropShadowColor => mauvePurple;
get toolbarIconColor => settings; //whiteishPurple;
get messageFromMeBackgroundColor => userBubble; // mauvePurple;
get messageFromMeTextColor => font; //whiteishPurple;
get messageFromOtherBackgroundColor => peerBubble; //deepPurple;
get messageFromOtherTextColor => font; //whiteishPurple;
}
class CwtchLight extends OpaqueThemeType {
static final Color background = whitePurple;
static final Color header = softPurple;
static final Color userBubble = purple;
static final Color peerBubble = softPurple;
static final Color font = darkPurple;
static final Color settings = darkPurple;
static final Color accent = hotPink;
get theme => cwtch_theme;
get mode => mode_light;
get backgroundMainColor => background; //whitePurple;
get backgroundPaneColor => background; //whitePurple;
get topbarColor => header; //softPurple;
get backgroundHilightElementColor => softPurple;
get mainTextColor => settings;
get sendHintTextColor => purple;
get hilightElementColor => purple; //darkPurple; // todo shouldn't be this, too dark, makes font unreadable
get defaultButtonColor => accent; // hotPink;
get defaultButtonTextColor => whitePurple; // ?
get defaultButtonDisabledColor => softGrey;
get textfieldBackgroundColor => purple;
get textfieldBorderColor => purple;
get textfieldHintColor => font; //TODO pick
get textfieldErrorColor => hotPink;
get scrollbarDefaultColor => accent;
get portraitBackgroundColor => softPurple;
get portraitOnlineBorderColor => greyPurple;
get portraitOfflineBorderColor => greyPurple;
get portraitBlockedBorderColor => softGrey;
get portraitBlockedTextColor => softGrey;
get portraitContactBadgeColor => accent;
get portraitContactBadgeTextColor => whitePurple;
get portraitProfileBadgeColor => brightPurple;
get portraitProfileBadgeTextColor => whitePurple;
get dropShadowColor => purple;
get toolbarIconColor => settings; //darkPurple;
get messageFromMeBackgroundColor => userBubble; //brightPurple;
get messageFromMeTextColor => font; //mainTextColor;
get messageFromOtherBackgroundColor => peerBubble; //purple;
get messageFromOtherTextColor => font; //darkPurple;
}

View File

@ -1,69 +0,0 @@
import 'dart:ui';
import 'dart:core';
import 'package:cwtch/themes/cwtch.dart';
import 'package:flutter/material.dart';
import 'opaque.dart';
const ghost_theme = "ghost";
OpaqueThemeType GetGhostTheme(String mode) {
if (mode == mode_dark) {
return GhostDark();
} else {
return GhostLight();
}
}
class GhostDark extends CwtchDark {
static final Color background = Color(0xFF0D0D1F);
static final Color header = Color(0xFF0D0D1F);
static final Color userBubble = Color(0xFF1A237E);
static final Color peerBubble = Color(0xFF000051);
static final Color font = Color(0xFFFFFFFF);
static final Color settings = Color(0xFFFDFFFD);
static final Color accent = Color(0xFFD20070);
get theme => ghost_theme;
get mode => mode_dark;
get backgroundMainColor => background; // darkGreyPurple;
get backgroundPaneColor => header; //darkGreyPurple;
get topbarColor => header; //darkGreyPurple;
get mainTextColor => font; //whiteishPurple;
get defaultButtonColor => accent; //hotPink;
get textfieldHintColor => mainTextColor; //TODO pick
get toolbarIconColor => settings; //whiteishPurple;
get messageFromMeBackgroundColor => userBubble; // mauvePurple;
get messageFromMeTextColor => font; //whiteishPurple;
get messageFromOtherBackgroundColor => peerBubble; //deepPurple;
get messageFromOtherTextColor => font; //whiteishPurple;
}
class GhostLight extends CwtchLight {
static final Color background = Color(0xFFFDFDFF);
static final Color header = Color(0xFFAAB6FE);
static final Color userBubble = Color(0xFFAAB6FE);
static final Color peerBubble = Color(0xFFE8EAF6);
static final Color font = Color(0xFF0D0D1F);
static final Color settings = Color(0xFF0D0D1F);
static final Color accent = Color(0xFFD20070);
get theme => ghost_theme;
get mode => mode_light;
get backgroundMainColor => background; //whitePurple;
get backgroundPaneColor => background; //whitePurple;
get topbarColor => header; //softPurple;
get mainTextColor => settings;
get defaultButtonColor => accent; // hotPink;
get textfieldHintColor => font; //TODO pick
get scrollbarDefaultColor => accent;
get portraitContactBadgeColor => accent;
get toolbarIconColor => settings; //darkPurple;
get messageFromMeBackgroundColor => userBubble; //brightPurple;
get messageFromMeTextColor => font; //mainTextColor;
get messageFromOtherBackgroundColor => peerBubble; //purple;
get messageFromOtherTextColor => font; //darkPurple;
}

View File

@ -1,69 +0,0 @@
import 'dart:ui';
import 'dart:core';
import 'package:cwtch/themes/cwtch.dart';
import 'package:flutter/material.dart';
import 'opaque.dart';
const mermaid_theme = "mermaid";
OpaqueThemeType GetMermaidTheme(String mode) {
if (mode == mode_dark) {
return MermaidDark();
} else {
return MermaidLight();
}
}
class MermaidDark extends CwtchDark {
static final Color background = Color(0xFF102426);
static final Color header = Color(0xFF102426);
static final Color userBubble = Color(0xFF00838F);
static final Color peerBubble = Color(0xFF00363A);
static final Color font = Color(0xFFFFFFFF);
static final Color settings = Color(0xFFF7FCFD);
static final Color accent = Color(0xFF8E64A5);
get theme => mermaid_theme;
get mode => mode_dark;
get backgroundMainColor => background; // darkGreyPurple;
get backgroundPaneColor => header; //darkGreyPurple;
get topbarColor => header; //darkGreyPurple;
get mainTextColor => font; //whiteishPurple;
get defaultButtonColor => accent; //hotPink;
get textfieldHintColor => mainTextColor; //TODO pick
get toolbarIconColor => settings; //whiteishPurple;
get messageFromMeBackgroundColor => userBubble; // mauvePurple;
get messageFromMeTextColor => font; //whiteishPurple;
get messageFromOtherBackgroundColor => peerBubble; //deepPurple;
get messageFromOtherTextColor => font; //whiteishPurple;
}
class MermaidLight extends CwtchLight {
static final Color background = Color(0xFFF7FCFD);
static final Color header = Color(0xFF56C8D8);
static final Color userBubble = Color(0xFF56C8D8);
static final Color peerBubble = Color(0xFFB2EBF2);
static final Color font = Color(0xFF102426);
static final Color settings = Color(0xFF102426);
static final Color accent = Color(0xFF8E64A5);
get theme => mermaid_theme;
get mode => mode_light;
get backgroundMainColor => background; //whitePurple;
get backgroundPaneColor => background; //whitePurple;
get topbarColor => header; //softPurple;
get mainTextColor => settings;
get defaultButtonColor => accent; // hotPink;
get textfieldHintColor => font; //TODO pick
get scrollbarDefaultColor => accent;
get portraitContactBadgeColor => accent;
get toolbarIconColor => settings; //darkPurple;
get messageFromMeBackgroundColor => userBubble; //brightPurple;
get messageFromMeTextColor => font; //mainTextColor;
get messageFromOtherBackgroundColor => peerBubble; //purple;
get messageFromOtherTextColor => font; //darkPurple;
}

View File

@ -1,69 +0,0 @@
import 'dart:ui';
import 'dart:core';
import 'package:cwtch/themes/cwtch.dart';
import 'package:flutter/material.dart';
import 'opaque.dart';
const midnight_theme = "midnight";
OpaqueThemeType GetMidnightTheme(String mode) {
if (mode == mode_dark) {
return MidnightDark();
} else {
return MidnightLight();
}
}
class MidnightDark extends CwtchDark {
static final Color background = Color(0xFF1B1B1B);
static final Color header = Color(0xFF1B1B1B);
static final Color userBubble = Color(0xFF373737);
static final Color peerBubble = Color(0xFF494949);
static final Color font = Color(0xFFFFFFFF);
static final Color settings = Color(0xFFFFFDFF);
static final Color accent = Color(0xFFD20070);
get theme => midnight_theme;
get mode => mode_dark;
get backgroundMainColor => background; // darkGreyPurple;
get backgroundPaneColor => header; //darkGreyPurple;
get topbarColor => header; //darkGreyPurple;
get mainTextColor => font; //whiteishPurple;
get defaultButtonColor => accent; //hotPink;
get textfieldHintColor => mainTextColor; //TODO pick
get toolbarIconColor => settings; //whiteishPurple;
get messageFromMeBackgroundColor => userBubble; // mauvePurple;
get messageFromMeTextColor => font; //whiteishPurple;
get messageFromOtherBackgroundColor => peerBubble; //deepPurple;
get messageFromOtherTextColor => font; //whiteishPurple;
}
class MidnightLight extends CwtchLight {
static final Color background = Color(0xFFFFFDFF);
static final Color header = Color(0xFFE0E0E0);
static final Color userBubble = Color(0xFFE0E0E0);
static final Color peerBubble = Color(0xFFBABDBE);
static final Color font = Color(0xFF1B1B1B);
static final Color settings = Color(0xFF1B1B1B);
static final Color accent = Color(0xFFD20070);
get theme => midnight_theme;
get mode => mode_light;
get backgroundMainColor => background; //whitePurple;
get backgroundPaneColor => background; //whitePurple;
get topbarColor => header; //softPurple;
get mainTextColor => settings;
get defaultButtonColor => accent; // hotPink;
get textfieldHintColor => font; //TODO pick
get scrollbarDefaultColor => accent;
get portraitContactBadgeColor => accent;
get toolbarIconColor => settings; //darkPurple;
get messageFromMeBackgroundColor => userBubble; //brightPurple;
get messageFromMeTextColor => font; //mainTextColor;
get messageFromOtherBackgroundColor => peerBubble; //purple;
get messageFromOtherTextColor => font; //darkPurple;
}

View File

@ -1,69 +0,0 @@
import 'dart:ui';
import 'dart:core';
import 'package:cwtch/themes/cwtch.dart';
import 'package:flutter/material.dart';
import 'opaque.dart';
const neon1_theme = "neon1";
OpaqueThemeType GetNeon1Theme(String mode) {
if (mode == mode_dark) {
return Neon1Dark();
} else {
return Neon1Light();
}
}
class Neon1Dark extends CwtchDark {
static final Color background = Color(0xFF290826);
static final Color header = Color(0xFF290826);
static final Color userBubble = Color(0xFFD20070);
static final Color peerBubble = Color(0xFF26A9A4);
static final Color font = Color(0xFFFFFFFF);
static final Color settings = Color(0xFFFFFDFF);
static final Color accent = Color(0xFFA604FE);
get theme => neon1_theme;
get mode => mode_dark;
get backgroundMainColor => background; // darkGreyPurple;
get backgroundPaneColor => header; //darkGreyPurple;
get topbarColor => header; //darkGreyPurple;
get mainTextColor => font; //whiteishPurple;
get defaultButtonColor => accent; //hotPink;
get textfieldHintColor => mainTextColor; //TODO pick
get toolbarIconColor => settings; //whiteishPurple;
get messageFromMeBackgroundColor => userBubble; // mauvePurple;
get messageFromMeTextColor => font; //whiteishPurple;
get messageFromOtherBackgroundColor => peerBubble; //deepPurple;
get messageFromOtherTextColor => font; //whiteishPurple;
}
class Neon1Light extends CwtchLight {
static final Color background = Color(0xFFFFFDFF);
static final Color header = Color(0xFFFF94C2);
static final Color userBubble = Color(0xFFFF94C2);
static final Color peerBubble = Color(0xFFE7F6F6);
static final Color font = Color(0xFF290826);
static final Color settings = Color(0xFF290826);
static final Color accent = Color(0xFFA604FE);
get theme => neon1_theme;
get mode => mode_light;
get backgroundMainColor => background; //whitePurple;
get backgroundPaneColor => background; //whitePurple;
get topbarColor => header; //softPurple
get mainTextColor => settings;
get defaultButtonColor => accent; // hotPink;
get textfieldHintColor => font; //TODO pick
get scrollbarDefaultColor => accent;
get portraitContactBadgeColor => accent;
get toolbarIconColor => settings; //darkPurple;
get messageFromMeBackgroundColor => userBubble; //brightPurple;
get messageFromMeTextColor => font; //mainTextColor;
get messageFromOtherBackgroundColor => peerBubble; //purple;
get messageFromOtherTextColor => font; //darkPurple;
}

View File

@ -1,69 +0,0 @@
import 'dart:ui';
import 'dart:core';
import 'package:cwtch/themes/cwtch.dart';
import 'package:flutter/material.dart';
import 'opaque.dart';
const neon2_theme = "neon2";
OpaqueThemeType GetNeon2Theme(String mode) {
if (mode == mode_dark) {
return Neon2Dark();
} else {
return Neon2Light();
}
}
class Neon2Dark extends CwtchDark {
static final Color background = Color(0xFF290826);
static final Color header = Color(0xFF290826);
static final Color userBubble = Color(0xFFA604FE);
static final Color peerBubble = Color(0xFF03AD00);
static final Color font = Color(0xFFFFFFFF);
static final Color settings = Color(0xFFFFFDFF);
static final Color accent = Color(0xFFA604FE);
get theme => neon2_theme;
get mode => mode_dark;
get backgroundMainColor => background; // darkGreyPurple;
get backgroundPaneColor => header; //darkGreyPurple;
get topbarColor => header; //darkGreyPurple;
get mainTextColor => font; //whiteishPurple;
get defaultButtonColor => accent; //hotPink;
get textfieldHintColor => mainTextColor; //TODO pick
get toolbarIconColor => settings; //whiteishPurple;
get messageFromMeBackgroundColor => userBubble; // mauvePurple;
get messageFromMeTextColor => font; //whiteishPurple;
get messageFromOtherBackgroundColor => peerBubble; //deepPurple;
get messageFromOtherTextColor => font; //whiteishPurple;
}
class Neon2Light extends CwtchLight {
static final Color background = Color(0xFFFFFDFF);
static final Color header = Color(0xFFD8C7E1);
static final Color userBubble = Color(0xFFD8C7E1);
static final Color peerBubble = Color(0xFF80E27E);
static final Color font = Color(0xFF290826);
static final Color settings = Color(0xFF290826);
static final Color accent = Color(0xFFA604FE);
get theme => neon2_theme;
get mode => mode_light;
get backgroundMainColor => background; //whitePurple;
get backgroundPaneColor => background; //whitePurple;
get topbarColor => header; //softPurple;
get mainTextColor => settings;
get defaultButtonColor => accent; // hotPink;
get textfieldHintColor => font; //TODO pick
get scrollbarDefaultColor => accent;
get portraitContactBadgeColor => accent;
get toolbarIconColor => settings; //darkPurple;
get messageFromMeBackgroundColor => userBubble; //brightPurple;
get messageFromMeTextColor => font; //mainTextColor;
get messageFromOtherBackgroundColor => peerBubble; //purple;
get messageFromOtherTextColor => font; //darkPurple;
}

View File

@ -1,203 +0,0 @@
import 'dart:ui';
import 'dart:core';
import 'package:cwtch/themes/cwtch.dart';
import 'package:cwtch/themes/mermaid.dart';
import 'package:cwtch/themes/neon1.dart';
import 'package:cwtch/themes/pumpkin.dart';
import 'package:cwtch/themes/vampire.dart';
import 'package:cwtch/themes/witch.dart';
import 'package:flutter/material.dart';
import 'package:cwtch/settings.dart';
import 'ghost.dart';
import 'midnight.dart';
import 'neon2.dart';
const mode_light = "light";
const mode_dark = "dark";
final themes = {
cwtch_theme: {mode_light: CwtchLight(), mode_dark: CwtchDark()},
ghost_theme: {mode_light: GhostLight(), mode_dark: GhostDark()},
mermaid_theme: {mode_light: MermaidLight(), mode_dark: MermaidDark()},
midnight_theme: {mode_light: MidnightLight(), mode_dark: MidnightDark()},
neon1_theme: {mode_light: Neon1Light(), mode_dark: Neon1Dark()},
neon2_theme: {mode_light: Neon2Light(), mode_dark: Neon2Dark()},
pumpkin_theme: {mode_light: PumpkinLight(), mode_dark: PumpkinDark()},
witch_theme: {mode_light: WitchLight(), mode_dark: WitchDark()},
vampire_theme: {mode_light: VampireLight(), mode_dark: VampireDark()},
};
OpaqueThemeType getTheme(String themeId, String mode) {
if (themeId == "") {
themeId = cwtch_theme;
}
if (themeId == mode_light) {
themeId = cwtch_theme;
mode = mode_light;
}
if (themeId == mode_dark) {
themeId = cwtch_theme;
mode = mode_dark;
}
var theme = themes[themeId]?[mode];
return theme ?? CwtchDark();
}
Color lighten(Color color, [double amount = 0.15]) {
final hsl = HSLColor.fromColor(color);
final hslLight = hsl.withLightness((hsl.lightness + amount).clamp(0.0, 1.0));
return hslLight.toColor();
}
Color darken(Color color, [double amount = 0.15]) {
final hsl = HSLColor.fromColor(color);
final hslDarken = hsl.withLightness((hsl.lightness - amount).clamp(0.0, 1.0));
return hslDarken.toColor();
}
abstract class OpaqueThemeType {
static final Color red = Color(0xFFFF0000);
get theme => "dummy";
get mode => mode_light;
// Main screen background color (message pane, item rows)
get backgroundMainColor => red;
// pane colors (settings)
get backgroundPaneColor => red;
get topbarColor => red;
get mainTextColor => red;
// pressed row, offline heart
get hilightElementColor => red;
// Selected Row
get backgroundHilightElementColor => red;
// Faded text color for suggestions in textfields
// Todo: implement way more places
get sendHintTextColor => red;
get defaultButtonColor => red;
get defaultButtonActiveColor => /*mode == mode_light ? darken(defaultButtonColor) :*/ lighten(defaultButtonColor);
get defaultButtonTextColor => red;
get defaultButtonDisabledColor => red;
get textfieldBackgroundColor => red;
get textfieldBorderColor => red;
get textfieldHintColor => red;
get textfieldErrorColor => red;
get scrollbarDefaultColor => red;
get portraitBackgroundColor => red;
get portraitOnlineBorderColor => red;
get portraitOfflineBorderColor => red;
get portraitBlockedBorderColor => red;
get portraitBlockedTextColor => red;
get portraitContactBadgeColor => red;
get portraitContactBadgeTextColor => red;
get portraitProfileBadgeColor => red;
get portraitProfileBadgeTextColor => red;
// dropshaddpow
// todo: probably should not be reply icon color in messagerow
get dropShadowColor => red;
get toolbarIconColor => red;
get messageFromMeBackgroundColor => red;
get messageFromMeTextColor => red;
get messageFromOtherBackgroundColor => red;
get messageFromOtherTextColor => red;
// Sizes
double contactOnionTextSize() {
return 18;
}
}
ThemeData mkThemeData(Settings opaque) {
return ThemeData(
visualDensity: VisualDensity.adaptivePlatformDensity,
primarySwatch: Colors.red,
primaryIconTheme: IconThemeData(
color: opaque.current().mainTextColor,
),
primaryColor: opaque.current().backgroundMainColor,
canvasColor: opaque.current().backgroundPaneColor,
backgroundColor: opaque.current().backgroundMainColor,
highlightColor: opaque.current().hilightElementColor,
iconTheme: IconThemeData(
color: opaque.current().toolbarIconColor,
),
cardColor: opaque.current().backgroundMainColor,
appBarTheme: AppBarTheme(
backgroundColor: opaque.current().topbarColor,
iconTheme: IconThemeData(
color: opaque.current().mainTextColor,
),
titleTextStyle: TextStyle(
color: opaque.current().mainTextColor,
),
actionsIconTheme: IconThemeData(
color: opaque.current().mainTextColor,
)),
//bottomNavigationBarTheme: BottomNavigationBarThemeData(type: BottomNavigationBarType.fixed, backgroundColor: opaque.current().backgroundHilightElementColor), // Can't determine current use
textButtonTheme: TextButtonThemeData(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.all(opaque.current().defaultButtonColor),
foregroundColor: MaterialStateProperty.all(opaque.current().defaultButtonTextColor),
overlayColor: MaterialStateProperty.all(opaque.current().defaultButtonActiveColor),
padding: MaterialStateProperty.all(EdgeInsets.all(20))),
),
hintColor: opaque.current().textfieldHintColor,
elevatedButtonTheme: ElevatedButtonThemeData(
style: ButtonStyle(
backgroundColor: MaterialStateProperty.resolveWith((states) => states.contains(MaterialState.disabled) ? opaque.current().defaultButtonDisabledColor : opaque.current().defaultButtonColor),
foregroundColor: MaterialStateProperty.all(opaque.current().defaultButtonTextColor),
overlayColor: MaterialStateProperty.resolveWith((states) => (states.contains(MaterialState.pressed) && states.contains(MaterialState.hovered))
? opaque.current().defaultButtonActiveColor
: states.contains(MaterialState.disabled)
? opaque.current().defaultButtonDisabledColor
: null),
enableFeedback: true,
splashFactory: InkRipple.splashFactory,
padding: MaterialStateProperty.all(EdgeInsets.all(20)),
shape: MaterialStateProperty.all(RoundedRectangleBorder(
borderRadius: BorderRadius.circular(18.0),
)),
),
),
scrollbarTheme: ScrollbarThemeData(isAlwaysShown: false, thumbColor: MaterialStateProperty.all(opaque.current().scrollbarDefaultColor)),
tabBarTheme: TabBarTheme(indicator: UnderlineTabIndicator(borderSide: BorderSide(color: opaque.current().defaultButtonActiveColor))),
dialogTheme: DialogTheme(
backgroundColor: opaque.current().backgroundPaneColor, titleTextStyle: TextStyle(color: opaque.current().mainTextColor), contentTextStyle: TextStyle(color: opaque.current().mainTextColor)),
textTheme: TextTheme(
headline1: TextStyle(color: opaque.current().mainTextColor),
headline2: TextStyle(color: opaque.current().mainTextColor),
headline3: TextStyle(color: opaque.current().mainTextColor),
headline4: TextStyle(color: opaque.current().mainTextColor),
headline5: TextStyle(color: opaque.current().mainTextColor),
headline6: TextStyle(color: opaque.current().mainTextColor),
bodyText1: TextStyle(color: opaque.current().mainTextColor),
bodyText2: TextStyle(color: opaque.current().mainTextColor),
subtitle1: TextStyle(color: opaque.current().mainTextColor),
subtitle2: TextStyle(color: opaque.current().mainTextColor),
caption: TextStyle(color: opaque.current().mainTextColor),
button: TextStyle(color: opaque.current().mainTextColor),
overline: TextStyle(color: opaque.current().mainTextColor)),
switchTheme: SwitchThemeData(
overlayColor: MaterialStateProperty.all(opaque.current().defaultButtonActiveColor),
thumbColor: MaterialStateProperty.all(opaque.current().mainTextColor),
trackColor: MaterialStateProperty.all(opaque.current().dropShadowColor),
),
floatingActionButtonTheme: FloatingActionButtonThemeData(
backgroundColor: opaque.current().defaultButtonColor, hoverColor: opaque.current().defaultButtonActiveColor, enableFeedback: true, splashColor: opaque.current().defaultButtonActiveColor),
textSelectionTheme: TextSelectionThemeData(
cursorColor: opaque.current().defaultButtonActiveColor, selectionColor: opaque.current().defaultButtonActiveColor, selectionHandleColor: opaque.current().defaultButtonActiveColor),
);
}

View File

@ -1,69 +0,0 @@
import 'dart:ui';
import 'dart:core';
import 'package:cwtch/themes/cwtch.dart';
import 'package:flutter/material.dart';
import 'opaque.dart';
const pumpkin_theme = "pumpkin";
OpaqueThemeType GetPumpkinTheme(String mode) {
if (mode == mode_dark) {
return PumpkinDark();
} else {
return PumpkinLight();
}
}
class PumpkinDark extends CwtchDark {
static final Color background = Color(0xFF281831);
static final Color header = Color(0xFF281831);
static final Color userBubble = Color(0xFFB53D00);
static final Color peerBubble = Color(0xFF422850);
static final Color font = Color(0xFFFFFFFF);
static final Color settings = Color(0xFFFFFBF6);
static final Color accent = Color(0xFF8E64A5);
get theme => pumpkin_theme;
get mode => mode_dark;
get backgroundMainColor => background; // darkGreyPurple;
get backgroundPaneColor => header; //darkGreyPurple;
get topbarColor => header; //darkGreyPurple;
get mainTextColor => font; //whiteishPurple;
get defaultButtonColor => accent; //hotPink;
get textfieldHintColor => mainTextColor; //TODO pick
get toolbarIconColor => settings; //whiteishPurple;
get messageFromMeBackgroundColor => userBubble; // mauvePurple;
get messageFromMeTextColor => font; //whiteishPurple;
get messageFromOtherBackgroundColor => peerBubble; //deepPurple;
get messageFromOtherTextColor => font; //whiteishPurple;
}
class PumpkinLight extends CwtchLight {
static final Color background = Color(0xFFFFFBF6);
static final Color header = Color(0xFFFF9800);
static final Color userBubble = Color(0xFFFF9800);
static final Color peerBubble = Color(0xFFD8C7E1);
static final Color font = Color(0xFF281831);
static final Color settings = Color(0xFF281831);
static final Color accent = Color(0xFF8E64A5);
get theme => pumpkin_theme;
get mode => mode_light;
get backgroundMainColor => background; //whitePurple;
get backgroundPaneColor => background; //whitePurple;
get topbarColor => header; //softPurple;
get mainTextColor => settings;
get defaultButtonColor => accent; // hotPink;
get textfieldHintColor => font; //TODO pick
get scrollbarDefaultColor => accent;
get portraitContactBadgeColor => accent;
get toolbarIconColor => settings; //darkPurple;
get messageFromMeBackgroundColor => userBubble; //brightPurple;
get messageFromMeTextColor => font; //mainTextColor;
get messageFromOtherBackgroundColor => peerBubble; //purple;
get messageFromOtherTextColor => font; //darkPurple;
}

View File

@ -1,69 +0,0 @@
import 'dart:ui';
import 'dart:core';
import 'package:cwtch/themes/cwtch.dart';
import 'package:flutter/material.dart';
import 'opaque.dart';
const vampire_theme = "vampire";
OpaqueThemeType GetVampireTheme(String mode) {
if (mode == mode_dark) {
return VampireDark();
} else {
return VampireLight();
}
}
class VampireDark extends CwtchDark {
static final Color background = Color(0xFF281831);
static final Color header = Color(0xFF281831);
static final Color userBubble = Color(0xFF9A1218);
static final Color peerBubble = Color(0xFF422850);
static final Color font = Color(0xFFFFFFFF);
static final Color settings = Color(0xFFFDFFFD);
static final Color accent = Color(0xFF8E64A5);
get theme => vampire_theme;
get mode => mode_dark;
get backgroundMainColor => background; // darkGreyPurple;
get backgroundPaneColor => header; //darkGreyPurple;
get topbarColor => header; //darkGreyPurple;
get mainTextColor => font; //whiteishPurple;
get defaultButtonColor => accent; //hotPink;
get textfieldHintColor => mainTextColor; //TODO pick
get toolbarIconColor => settings; //whiteishPurple;
get messageFromMeBackgroundColor => userBubble; // mauvePurple;
get messageFromMeTextColor => font; //whiteishPurple;
get messageFromOtherBackgroundColor => peerBubble; //deepPurple;
get messageFromOtherTextColor => font; //whiteishPurple;
}
class VampireLight extends CwtchLight {
static final Color background = Color(0xFFFFFDFD);
static final Color header = Color(0xFFD8C7E1);
static final Color userBubble = Color(0xFFD8C7E1);
static final Color peerBubble = Color(0xFFFFEBEE);
static final Color font = Color(0xFF281831);
static final Color settings = Color(0xFF281831);
static final Color accent = Color(0xFF8E64A5);
get theme => vampire_theme;
get mode => mode_light;
get backgroundMainColor => background; //whitePurple;
get backgroundPaneColor => background; //whitePurple;
get topbarColor => header; //softPurple;
get mainTextColor => settings;
get defaultButtonColor => accent; // hotPink;
get textfieldHintColor => font; //TODO pick
get scrollbarDefaultColor => accent;
get portraitContactBadgeColor => accent;
get toolbarIconColor => settings; //darkPurple;
get messageFromMeBackgroundColor => userBubble; //brightPurple;
get messageFromMeTextColor => font; //mainTextColor;
get messageFromOtherBackgroundColor => peerBubble; //purple;
get messageFromOtherTextColor => font; //darkPurple;
}

View File

@ -1,69 +0,0 @@
import 'dart:ui';
import 'dart:core';
import 'package:cwtch/themes/cwtch.dart';
import 'package:flutter/material.dart';
import 'opaque.dart';
const witch_theme = "witch";
OpaqueThemeType GetWitchTheme(String mode) {
if (mode == mode_dark) {
return WitchDark();
} else {
return WitchLight();
}
}
class WitchDark extends CwtchDark {
static final Color background = Color(0xFF0E1E0E);
static final Color header = Color(0xFF0E1E0E);
static final Color userBubble = Color(0xFF1B5E20);
static final Color peerBubble = Color(0xFF003300);
static final Color font = Color(0xFFFFFFFF);
static final Color settings = Color(0xFFFDFFFD);
static final Color accent = Color(0xFFD20070);
get theme => witch_theme;
get mode => mode_dark;
get backgroundMainColor => background; // darkGreyPurple;
get backgroundPaneColor => header; //darkGreyPurple;
get topbarColor => header; //darkGreyPurple;
get mainTextColor => font; //whiteishPurple;
get defaultButtonColor => accent; //hotPink;
get textfieldHintColor => mainTextColor; //TODO pick
get toolbarIconColor => settings; //whiteishPurple;
get messageFromMeBackgroundColor => userBubble; // mauvePurple;
get messageFromMeTextColor => font; //whiteishPurple;
get messageFromOtherBackgroundColor => peerBubble; //deepPurple;
get messageFromOtherTextColor => font; //whiteishPurple;
}
class WitchLight extends CwtchLight {
static final Color background = Color(0xFFFDFFFD);
static final Color header = Color(0xFF80E27E);
static final Color userBubble = Color(0xFF80E27E);
static final Color peerBubble = Color(0xFFE8F5E9);
static final Color font = Color(0xFF0E1E0E);
static final Color settings = Color(0xFF0E1E0E);
static final Color accent = Color(0xFFD20070);
get theme => witch_theme;
get mode => mode_light;
get backgroundMainColor => background; //whitePurple;
get backgroundPaneColor => background; //whitePurple;
get topbarColor => header; //softPurple;
get mainTextColor => settings;
get defaultButtonColor => accent; // hotPink;
get textfieldHintColor => font; //TODO pick
get scrollbarDefaultColor => accent;
get portraitContactBadgeColor => accent;
get toolbarIconColor => settings; //darkPurple;
get messageFromMeBackgroundColor => userBubble; //brightPurple;
get messageFromMeTextColor => font; //mainTextColor;
get messageFromOtherBackgroundColor => peerBubble; //purple;
get messageFromOtherTextColor => font; //darkPurple;
}

View File

@ -18,9 +18,6 @@ class TorStatus extends ChangeNotifier {
progress = new_progress; progress = new_progress;
status = new_status; status = new_status;
if (new_progress != 100) {
status = "$new_progress% - $new_status";
}
notifyListeners(); notifyListeners();
} }

View File

@ -52,26 +52,22 @@ class _AddContactViewState extends State<AddContactView> {
/// We display a different number of tabs depending on the experiment setup /// We display a different number of tabs depending on the experiment setup
bool groupsEnabled = Provider.of<Settings>(context).isExperimentEnabled(TapirGroupsExperiment); bool groupsEnabled = Provider.of<Settings>(context).isExperimentEnabled(TapirGroupsExperiment);
return Scrollbar( return Consumer<ErrorHandler>(builder: (context, globalErrorHandler, child) {
isAlwaysShown: true, return DefaultTabController(
child: SingleChildScrollView( length: groupsEnabled ? 2 : 1,
clipBehavior: Clip.antiAlias, child: Column(children: [
child: Consumer<ErrorHandler>(builder: (context, globalErrorHandler, child) { (groupsEnabled ? getTabBarWithGroups() : getTabBarWithAddPeerOnly()),
return DefaultTabController( Expanded(
length: groupsEnabled ? 2 : 1, child: TabBarView(
child: Column(children: [ children: (groupsEnabled
(groupsEnabled ? getTabBarWithGroups() : getTabBarWithAddPeerOnly()), ? [
Expanded( addPeerTab(),
child: TabBarView( addGroupTab(),
children: (groupsEnabled ]
? [ : [addPeerTab()]),
addPeerTab(), )),
addGroupTab(), ]));
] });
: [addPeerTab()]),
)),
]));
})));
} }
void _copyOnion() { void _copyOnion() {
@ -167,7 +163,7 @@ class _AddContactViewState extends State<AddContactView> {
} }
}); });
}, },
hintText: '', labelText: '',
) )
]))); ])));
} }
@ -201,15 +197,11 @@ class _AddContactViewState extends State<AddContactView> {
}, },
isExpanded: true, // magic property isExpanded: true, // magic property
value: server, value: server,
items: Provider.of<ProfileInfoState>(context) items: Provider.of<ProfileInfoState>(context).serverList.servers.map<DropdownMenuItem<String>>((RemoteServerInfoState serverInfo) {
.serverList
.servers
.where((serverInfo) => serverInfo.status == "Synced")
.map<DropdownMenuItem<String>>((RemoteServerInfoState serverInfo) {
return DropdownMenuItem<String>( return DropdownMenuItem<String>(
value: serverInfo.onion, value: serverInfo.onion,
child: Text( child: Text(
serverInfo.description, serverInfo.onion,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
); );
@ -223,7 +215,7 @@ class _AddContactViewState extends State<AddContactView> {
), ),
CwtchTextField( CwtchTextField(
controller: ctrlrGroupName, controller: ctrlrGroupName,
hintText: AppLocalizations.of(context)!.groupNameLabel, labelText: AppLocalizations.of(context)!.groupNameLabel,
onChanged: (newValue) {}, onChanged: (newValue) {},
validator: (value) {}, validator: (value) {},
), ),

View File

@ -1,8 +1,6 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:io';
import 'dart:math'; import 'dart:math';
import 'package:cwtch/config.dart';
import 'package:cwtch/cwtch/cwtch.dart'; import 'package:cwtch/cwtch/cwtch.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
@ -18,7 +16,7 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../cwtch_icons_icons.dart'; import '../cwtch_icons_icons.dart';
import '../errorHandler.dart'; import '../errorHandler.dart';
import '../main.dart'; import '../main.dart';
import '../themes/opaque.dart'; import '../opaque.dart';
import '../settings.dart'; import '../settings.dart';
class AddEditProfileView extends StatefulWidget { class AddEditProfileView extends StatefulWidget {
@ -93,7 +91,7 @@ class _AddEditProfileViewState extends State<AddEditProfileView> {
imagePath: Provider.of<ProfileInfoState>(context).imagePath, imagePath: Provider.of<ProfileInfoState>(context).imagePath,
diameter: 120, diameter: 120,
maskOut: false, maskOut: false,
border: theme.theme.portraitOnlineBorderColor, border: theme.theme.portraitOnlineBorderColor(),
badgeTextColor: Colors.red, badgeTextColor: Colors.red,
badgeColor: Colors.red, badgeColor: Colors.red,
) )
@ -106,10 +104,11 @@ class _AddEditProfileViewState extends State<AddEditProfileView> {
CwtchTextField( CwtchTextField(
controller: ctrlrNick, controller: ctrlrNick,
autofocus: false, autofocus: false,
hintText: AppLocalizations.of(context)!.yourDisplayName, labelText: AppLocalizations.of(context)!.yourDisplayName,
validator: (value) { validator: (value) {
if (value.isEmpty) { if (value.isEmpty) {
return AppLocalizations.of(context)!.displayNameTooltip; // TODO l10n ize
return "Please enter a display name";
} }
return null; return null;
}, },
@ -147,13 +146,13 @@ class _AddEditProfileViewState extends State<AddEditProfileView> {
child: Column(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[ child: Column(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
Checkbox( Checkbox(
value: usePassword, value: usePassword,
fillColor: MaterialStateProperty.all(theme.current().defaultButtonColor), fillColor: MaterialStateProperty.all(theme.current().defaultButtonColor()),
activeColor: theme.current().defaultButtonActiveColor, activeColor: theme.current().defaultButtonActiveColor(),
onChanged: _handleSwitchPassword, onChanged: _handleSwitchPassword,
), ),
Text( Text(
AppLocalizations.of(context)!.radioUsePassword, AppLocalizations.of(context)!.radioUsePassword,
style: TextStyle(color: theme.current().mainTextColor), style: TextStyle(color: theme.current().mainTextColor()),
), ),
SizedBox( SizedBox(
height: 20, height: 20,
@ -280,7 +279,7 @@ class _AddEditProfileViewState extends State<AddEditProfileView> {
// TODO Toast // TODO Toast
} }
void _createPressed() async { void _createPressed() {
// This will run all the validations in the form including // This will run all the validations in the form including
// checking that display name is not empty, and an actual check that the passwords // checking that display name is not empty, and an actual check that the passwords
// match (and are provided if the user has requested an encrypted profile). // match (and are provided if the user has requested an encrypted profile).
@ -303,31 +302,17 @@ class _AddEditProfileViewState extends State<AddEditProfileView> {
} else { } else {
// At this points passwords have been validated to be the same and not empty // At this points passwords have been validated to be the same and not empty
// Update both password and name, even if name hasn't been changed... // Update both password and name, even if name hasn't been changed...
var profile = Provider.of<ProfileInfoState>(context, listen: false).onion;
Provider.of<ProfileInfoState>(context, listen: false).nickname = ctrlrNick.value.text; Provider.of<ProfileInfoState>(context, listen: false).nickname = ctrlrNick.value.text;
Provider.of<FlwtchState>(context, listen: false).cwtch.SetProfileAttribute(profile, "profile.name", ctrlrNick.value.text); Provider.of<FlwtchState>(context, listen: false).cwtch.SetProfileAttribute(Provider.of<ProfileInfoState>(context, listen: false).onion, "profile.name", ctrlrNick.value.text);
Provider.of<FlwtchState>(context, listen: false).cwtch.ChangePassword(profile, ctrlrOldPass.text, ctrlrPass.text, ctrlrPass2.text); final updatePasswordEvent = {
"EventType": "ChangePassword",
"Data": {"Password": ctrlrOldPass.text, "NewPassword": ctrlrPass.text}
};
final updatePasswordEventJson = jsonEncode(updatePasswordEvent);
EnvironmentConfig.debugLog("waiting for change password response"); Provider.of<FlwtchState>(context, listen: false).cwtch.SendProfileEvent(Provider.of<ProfileInfoState>(context, listen: false).onion, updatePasswordEventJson);
Future.delayed(const Duration(milliseconds: 500), () {
if (globalErrorHandler.changePasswordError) { Navigator.of(context).pop();
// TODO: This isn't ideal, but because onChange can be fired during this future check
// and because the context can change after being popped we have this kind of double assertion...
// There is probably a better pattern to handle this...
if (AppLocalizations.of(context) != null) {
final snackBar = SnackBar(content: Text(AppLocalizations.of(context)!.passwordChangeError));
ScaffoldMessenger.of(context).showSnackBar(snackBar);
return;
}
}
}).whenComplete(() {
if (globalErrorHandler.explicitChangePasswordSuccess) {
final snackBar = SnackBar(content: Text(AppLocalizations.of(context)!.newPassword));
ScaffoldMessenger.of(context).showSnackBar(snackBar);
Navigator.pop(context);
return; // otherwise round and round we go...
}
});
} }
} }
} }

View File

@ -33,6 +33,7 @@ class _AddEditServerViewState extends State<AddEditServerView> {
final ctrlrOnion = TextEditingController(text: ""); final ctrlrOnion = TextEditingController(text: "");
late bool usePassword; late bool usePassword;
//late bool deleted;
@override @override
void initState() { void initState() {
@ -80,16 +81,22 @@ class _AddEditServerViewState extends State<AddEditServerView> {
child: Form( child: Form(
key: _formKey, key: _formKey,
child: Container( child: Container(
margin: EdgeInsets.fromLTRB(30, 5, 30, 10), margin: EdgeInsets.fromLTRB(30, 0, 30, 10),
padding: EdgeInsets.fromLTRB(20, 5, 20, 10), padding: EdgeInsets.fromLTRB(20, 0, 20, 10),
child: Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.stretch, children: [ child: Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.stretch, children: [
// Onion // Onion
Visibility( Visibility(
visible: serverInfoState.onion.isNotEmpty, visible: serverInfoState.onion.isNotEmpty,
child: Column( child: Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [
mainAxisAlignment: MainAxisAlignment.start, SizedBox(
crossAxisAlignment: CrossAxisAlignment.start, height: 20,
children: [CwtchLabel(label: AppLocalizations.of(context)!.serverAddress), SelectableText(serverInfoState.onion)])), ),
CwtchLabel(label: AppLocalizations.of(context)!.serverAddress),
SizedBox(
height: 20,
),
SelectableText(serverInfoState.onion)
])),
// Description // Description
Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [
@ -103,7 +110,7 @@ class _AddEditServerViewState extends State<AddEditServerView> {
), ),
CwtchTextField( CwtchTextField(
controller: ctrlrDesc, controller: ctrlrDesc,
hintText: AppLocalizations.of(context)!.fieldDescriptionLabel, labelText: "Description",
autofocus: false, autofocus: false,
) )
]), ]),
@ -116,7 +123,7 @@ class _AddEditServerViewState extends State<AddEditServerView> {
Visibility( Visibility(
visible: serverInfoState.onion.isNotEmpty, visible: serverInfoState.onion.isNotEmpty,
child: SwitchListTile( child: SwitchListTile(
title: Text(AppLocalizations.of(context)!.serverEnabled, style: TextStyle(color: settings.current().mainTextColor)), title: Text(AppLocalizations.of(context)!.serverEnabled, style: TextStyle(color: settings.current().mainTextColor())),
subtitle: Text(AppLocalizations.of(context)!.serverEnabledDescription), subtitle: Text(AppLocalizations.of(context)!.serverEnabledDescription),
value: serverInfoState.running, value: serverInfoState.running,
onChanged: (bool value) { onChanged: (bool value) {
@ -127,14 +134,14 @@ class _AddEditServerViewState extends State<AddEditServerView> {
Provider.of<FlwtchState>(context, listen: false).cwtch.StopServer(serverInfoState.onion); Provider.of<FlwtchState>(context, listen: false).cwtch.StopServer(serverInfoState.onion);
} }
}, },
activeTrackColor: settings.theme.defaultButtonColor, activeTrackColor: settings.theme.defaultButtonActiveColor(),
inactiveTrackColor: settings.theme.defaultButtonDisabledColor, inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
secondary: Icon(CwtchIcons.negative_heart_24px, color: settings.current().mainTextColor), secondary: Icon(CwtchIcons.negative_heart_24px, color: settings.current().mainTextColor()),
)), )),
// Auto start // Auto start
SwitchListTile( SwitchListTile(
title: Text(AppLocalizations.of(context)!.serverAutostartLabel, style: TextStyle(color: settings.current().mainTextColor)), title: Text(AppLocalizations.of(context)!.serverAutostartLabel, style: TextStyle(color: settings.current().mainTextColor())),
subtitle: Text(AppLocalizations.of(context)!.serverAutostartDescription), subtitle: Text(AppLocalizations.of(context)!.serverAutostartDescription),
value: serverInfoState.autoStart, value: serverInfoState.autoStart,
onChanged: (bool value) { onChanged: (bool value) {
@ -144,33 +151,11 @@ class _AddEditServerViewState extends State<AddEditServerView> {
Provider.of<FlwtchState>(context, listen: false).cwtch.SetServerAttribute(serverInfoState.onion, "autostart", value ? "true" : "false"); Provider.of<FlwtchState>(context, listen: false).cwtch.SetServerAttribute(serverInfoState.onion, "autostart", value ? "true" : "false");
} }
}, },
activeTrackColor: settings.theme.defaultButtonColor, activeTrackColor: settings.theme.defaultButtonActiveColor(),
inactiveTrackColor: settings.theme.defaultButtonDisabledColor, inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
secondary: Icon(CwtchIcons.favorite_24dp, color: settings.current().mainTextColor), secondary: Icon(CwtchIcons.favorite_24dp, color: settings.current().mainTextColor()),
), ),
// metrics
Visibility(
visible: serverInfoState.onion.isNotEmpty && serverInfoState.running,
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
SizedBox(
height: 20,
),
Text(AppLocalizations.of(context)!.serverMetricsLabel, style: Provider.of<FlwtchState>(context).biggerFont),
Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
Row(crossAxisAlignment: CrossAxisAlignment.start, children: [
Text(AppLocalizations.of(context)!.serverTotalMessagesLabel),
]),
Text(serverInfoState.totalMessages.toString())
]),
Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
Row(crossAxisAlignment: CrossAxisAlignment.start, children: [
Text(AppLocalizations.of(context)!.serverConnectionsLabel),
]),
Text(serverInfoState.connections.toString())
]),
])),
// ***** Password ***** // ***** Password *****
// use password toggle // use password toggle
@ -182,13 +167,13 @@ class _AddEditServerViewState extends State<AddEditServerView> {
), ),
Checkbox( Checkbox(
value: usePassword, value: usePassword,
fillColor: MaterialStateProperty.all(settings.current().defaultButtonColor), fillColor: MaterialStateProperty.all(settings.current().defaultButtonColor()),
activeColor: settings.current().defaultButtonActiveColor, activeColor: settings.current().defaultButtonActiveColor(),
onChanged: _handleSwitchPassword, onChanged: _handleSwitchPassword,
), ),
Text( Text(
AppLocalizations.of(context)!.radioUsePassword, AppLocalizations.of(context)!.radioUsePassword,
style: TextStyle(color: settings.current().mainTextColor), style: TextStyle(color: settings.current().mainTextColor()),
), ),
SizedBox( SizedBox(
height: 20, height: 20,

View File

@ -1,5 +1,4 @@
import 'package:cwtch/cwtch_icons_icons.dart'; import 'package:cwtch/cwtch_icons_icons.dart';
import 'package:cwtch/views/profileserversview.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cwtch/views/torstatusview.dart'; import 'package:cwtch/views/torstatusview.dart';
import 'package:cwtch/widgets/contactrow.dart'; import 'package:cwtch/widgets/contactrow.dart';
@ -78,7 +77,7 @@ class _ContactsViewState extends State<ContactsView> {
ProfileImage( ProfileImage(
imagePath: Provider.of<ProfileInfoState>(context).imagePath, imagePath: Provider.of<ProfileInfoState>(context).imagePath,
diameter: 42, diameter: 42,
border: Provider.of<Settings>(context).current().portraitOnlineBorderColor, border: Provider.of<Settings>(context).current().portraitOnlineBorderColor(),
badgeTextColor: Colors.red, badgeTextColor: Colors.red,
badgeColor: Colors.red, badgeColor: Colors.red,
), ),
@ -87,7 +86,7 @@ class _ContactsViewState extends State<ContactsView> {
), ),
Expanded( Expanded(
child: Text("%1 » %2".replaceAll("%1", Provider.of<ProfileInfoState>(context).nickname).replaceAll("%2", AppLocalizations.of(context)!.titleManageContacts), child: Text("%1 » %2".replaceAll("%1", Provider.of<ProfileInfoState>(context).nickname).replaceAll("%2", AppLocalizations.of(context)!.titleManageContacts),
overflow: TextOverflow.ellipsis, style: TextStyle(color: Provider.of<Settings>(context).current().mainTextColor))), overflow: TextOverflow.ellipsis, style: TextStyle(color: Provider.of<Settings>(context).current().mainTextColor()))),
])), ])),
actions: getActions(context), actions: getActions(context),
), ),
@ -113,15 +112,7 @@ class _ContactsViewState extends State<ContactsView> {
Clipboard.setData(new ClipboardData(text: Provider.of<ProfileInfoState>(context, listen: false).onion)); Clipboard.setData(new ClipboardData(text: Provider.of<ProfileInfoState>(context, listen: false).onion));
})); }));
// Manage known Servers // TODO servers
if (Provider.of<Settings>(context, listen: false).isExperimentEnabled(TapirGroupsExperiment) || Provider.of<Settings>(context, listen: false).isExperimentEnabled(ServerManagementExperiment)) {
actions.add(IconButton(
icon: Icon(CwtchIcons.dns_24px),
tooltip: AppLocalizations.of(context)!.manageKnownServersButton,
onPressed: () {
_pushServers();
}));
}
// Search contacts // Search contacts
actions.add(IconButton( actions.add(IconButton(
@ -139,7 +130,7 @@ class _ContactsViewState extends State<ContactsView> {
Widget _buildFilterable() { Widget _buildFilterable() {
Widget txtfield = CwtchTextField( Widget txtfield = CwtchTextField(
controller: ctrlrFilter, controller: ctrlrFilter,
hintText: AppLocalizations.of(context)!.search, labelText: AppLocalizations.of(context)!.search,
onChanged: (newVal) { onChanged: (newVal) {
Provider.of<ContactListState>(context, listen: false).filter = newVal; Provider.of<ContactListState>(context, listen: false).filter = newVal;
}, },
@ -171,13 +162,12 @@ class _ContactsViewState extends State<ContactsView> {
)); ));
} }
void _pushServers() { void _pushTorStatus() {
var profile = Provider.of<ProfileInfoState>(context);
Navigator.of(context).push(MaterialPageRoute<void>( Navigator.of(context).push(MaterialPageRoute<void>(
builder: (BuildContext context) { builder: (BuildContext context) {
return MultiProvider( return MultiProvider(
providers: [ChangeNotifierProvider(create: (context) => profile), Provider.value(value: Provider.of<FlwtchState>(context))], providers: [Provider.value(value: Provider.of<FlwtchState>(context))],
child: ProfileServersView(), child: TorStatusView(),
); );
}, },
)); ));

View File

@ -29,12 +29,7 @@ class _DoubleColumnViewState extends State<DoubleColumnView> {
Flexible( Flexible(
flex: cols[1], flex: cols[1],
child: flwtch.selectedConversation == null child: flwtch.selectedConversation == null
? Container( ? Card(child: Center(child: Text(AppLocalizations.of(context)!.addContactFirst)))
color: Provider.of<Settings>(context).theme.backgroundMainColor,
child: Card(
margin: EdgeInsets.all(0.0),
shape: new RoundedRectangleBorder(side: new BorderSide(color: Provider.of<Settings>(context).theme.defaultButtonColor, width: 4.0), borderRadius: BorderRadius.circular(4.0)),
child: Center(child: Text(AppLocalizations.of(context)!.addContactFirst))))
: //dev : //dev
MultiProvider(providers: [ MultiProvider(providers: [
ChangeNotifierProvider.value(value: Provider.of<ProfileInfoState>(context)), ChangeNotifierProvider.value(value: Provider.of<ProfileInfoState>(context)),

View File

@ -2,17 +2,6 @@ import 'dart:convert';
import 'dart:io'; import 'dart:io';
import 'package:cwtch/cwtch_icons_icons.dart'; import 'package:cwtch/cwtch_icons_icons.dart';
import 'package:cwtch/models/servers.dart'; import 'package:cwtch/models/servers.dart';
import 'package:cwtch/widgets/folderpicker.dart';
import 'package:cwtch/themes/cwtch.dart';
import 'package:cwtch/themes/ghost.dart';
import 'package:cwtch/themes/mermaid.dart';
import 'package:cwtch/themes/midnight.dart';
import 'package:cwtch/themes/neon1.dart';
import 'package:cwtch/themes/neon2.dart';
import 'package:cwtch/themes/opaque.dart';
import 'package:cwtch/themes/pumpkin.dart';
import 'package:cwtch/themes/vampire.dart';
import 'package:cwtch/themes/witch.dart';
import 'package:package_info_plus/package_info_plus.dart'; import 'package:package_info_plus/package_info_plus.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cwtch/settings.dart'; import 'package:cwtch/settings.dart';
@ -47,7 +36,7 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
Widget _buildSettingsList() { Widget _buildSettingsList() {
return Consumer<Settings>(builder: (context, settings, child) { return Consumer<Settings>(builder: (context, settings, child) {
return LayoutBuilder(builder: (BuildContext context, BoxConstraints viewportConstraints) { return LayoutBuilder(builder: (BuildContext context, BoxConstraints viewportConstraints) {
var appIcon = Icon(Icons.info, color: settings.current().mainTextColor); var appIcon = Icon(Icons.info, color: settings.current().mainTextColor());
return Scrollbar( return Scrollbar(
isAlwaysShown: true, isAlwaysShown: true,
child: SingleChildScrollView( child: SingleChildScrollView(
@ -58,8 +47,8 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
), ),
child: Column(children: [ child: Column(children: [
ListTile( ListTile(
title: Text(AppLocalizations.of(context)!.settingLanguage, style: TextStyle(color: settings.current().mainTextColor)), title: Text(AppLocalizations.of(context)!.settingLanguage, style: TextStyle(color: settings.current().mainTextColor())),
leading: Icon(CwtchIcons.change_language, color: settings.current().mainTextColor), leading: Icon(CwtchIcons.change_language, color: settings.current().mainTextColor()),
trailing: DropdownButton( trailing: DropdownButton(
value: Provider.of<Settings>(context).locale.languageCode, value: Provider.of<Settings>(context).locale.languageCode,
onChanged: (String? newValue) { onChanged: (String? newValue) {
@ -75,43 +64,25 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
); );
}).toList())), }).toList())),
SwitchListTile( SwitchListTile(
title: Text(AppLocalizations.of(context)!.settingTheme, style: TextStyle(color: settings.current().mainTextColor)), title: Text(AppLocalizations.of(context)!.settingTheme, style: TextStyle(color: settings.current().mainTextColor())),
value: settings.current().mode == mode_light, value: settings.current().identifier() == "light",
onChanged: (bool value) { onChanged: (bool value) {
if (value) { if (value) {
settings.setTheme(settings.theme.theme, mode_light); settings.setLight();
} else { } else {
settings.setTheme(settings.theme.theme, mode_dark); settings.setDark();
} }
// Save Settings... // Save Settings...
saveSettings(context); saveSettings(context);
}, },
activeTrackColor: settings.theme.defaultButtonColor, activeTrackColor: settings.theme.defaultButtonActiveColor(),
inactiveTrackColor: settings.theme.defaultButtonDisabledColor, inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
secondary: Icon(CwtchIcons.change_theme, color: settings.current().mainTextColor), secondary: Icon(CwtchIcons.change_theme, color: settings.current().mainTextColor()),
), ),
ListTile( ListTile(
title: Text(AppLocalizations.of(context)!.themeColorLabel), title: Text(AppLocalizations.of(context)!.settingUIColumnPortrait, style: TextStyle(color: settings.current().mainTextColor())),
trailing: DropdownButton<String>( leading: Icon(Icons.table_chart, color: settings.current().mainTextColor()),
value: Provider.of<Settings>(context).theme.theme,
onChanged: (String? newValue) {
setState(() {
settings.setTheme(newValue!, settings.theme.mode);
saveSettings(context);
});
},
items: themes.keys.map<DropdownMenuItem<String>>((String themeId) {
return DropdownMenuItem<String>(
value: themeId,
child: Text(getThemeName(context, themeId)),
);
}).toList()),
leading: Icon(CwtchIcons.change_theme, color: settings.current().mainTextColor),
),
ListTile(
title: Text(AppLocalizations.of(context)!.settingUIColumnPortrait, style: TextStyle(color: settings.current().mainTextColor)),
leading: Icon(Icons.table_chart, color: settings.current().mainTextColor),
trailing: DropdownButton( trailing: DropdownButton(
value: settings.uiColumnModePortrait.toString(), value: settings.uiColumnModePortrait.toString(),
onChanged: (String? newValue) { onChanged: (String? newValue) {
@ -129,9 +100,9 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
AppLocalizations.of(context)!.settingUIColumnLandscape, AppLocalizations.of(context)!.settingUIColumnLandscape,
textWidthBasis: TextWidthBasis.longestLine, textWidthBasis: TextWidthBasis.longestLine,
softWrap: true, softWrap: true,
style: TextStyle(color: settings.current().mainTextColor), style: TextStyle(color: settings.current().mainTextColor()),
), ),
leading: Icon(Icons.table_chart, color: settings.current().mainTextColor), leading: Icon(Icons.table_chart, color: settings.current().mainTextColor()),
trailing: Container( trailing: Container(
width: 200.0, width: 200.0,
child: DropdownButton( child: DropdownButton(
@ -151,7 +122,7 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
); );
}).toList()))), }).toList()))),
SwitchListTile( SwitchListTile(
title: Text(AppLocalizations.of(context)!.blockUnknownLabel, style: TextStyle(color: settings.current().mainTextColor)), title: Text(AppLocalizations.of(context)!.blockUnknownLabel, style: TextStyle(color: settings.current().mainTextColor())),
subtitle: Text(AppLocalizations.of(context)!.descriptionBlockUnknownConnections), subtitle: Text(AppLocalizations.of(context)!.descriptionBlockUnknownConnections),
value: settings.blockUnknownConnections, value: settings.blockUnknownConnections,
onChanged: (bool value) { onChanged: (bool value) {
@ -164,12 +135,12 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
// Save Settings... // Save Settings...
saveSettings(context); saveSettings(context);
}, },
activeTrackColor: settings.theme.defaultButtonColor, activeTrackColor: settings.theme.defaultButtonActiveColor(),
inactiveTrackColor: settings.theme.defaultButtonDisabledColor, inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
secondary: Icon(CwtchIcons.block_unknown, color: settings.current().mainTextColor), secondary: Icon(CwtchIcons.block_unknown, color: settings.current().mainTextColor()),
), ),
SwitchListTile( SwitchListTile(
title: Text(AppLocalizations.of(context)!.streamerModeLabel, style: TextStyle(color: settings.current().mainTextColor)), title: Text(AppLocalizations.of(context)!.streamerModeLabel, style: TextStyle(color: settings.current().mainTextColor())),
subtitle: Text(AppLocalizations.of(context)!.descriptionStreamerMode), subtitle: Text(AppLocalizations.of(context)!.descriptionStreamerMode),
value: settings.streamerMode, value: settings.streamerMode,
onChanged: (bool value) { onChanged: (bool value) {
@ -177,12 +148,12 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
// Save Settings... // Save Settings...
saveSettings(context); saveSettings(context);
}, },
activeTrackColor: settings.theme.defaultButtonColor, activeTrackColor: settings.theme.defaultButtonActiveColor(),
inactiveTrackColor: settings.theme.defaultButtonDisabledColor, inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
secondary: Icon(CwtchIcons.streamer_bunnymask, color: settings.current().mainTextColor), secondary: Icon(CwtchIcons.streamer_bunnymask, color: settings.current().mainTextColor()),
), ),
SwitchListTile( SwitchListTile(
title: Text(AppLocalizations.of(context)!.experimentsEnabled, style: TextStyle(color: settings.current().mainTextColor)), title: Text(AppLocalizations.of(context)!.experimentsEnabled, style: TextStyle(color: settings.current().mainTextColor())),
subtitle: Text(AppLocalizations.of(context)!.descriptionExperiments), subtitle: Text(AppLocalizations.of(context)!.descriptionExperiments),
value: settings.experimentsEnabled, value: settings.experimentsEnabled,
onChanged: (bool value) { onChanged: (bool value) {
@ -194,16 +165,16 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
// Save Settings... // Save Settings...
saveSettings(context); saveSettings(context);
}, },
activeTrackColor: settings.theme.defaultButtonColor, activeTrackColor: settings.theme.defaultButtonActiveColor(),
inactiveTrackColor: settings.theme.defaultButtonDisabledColor, inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
secondary: Icon(CwtchIcons.enable_experiments, color: settings.current().mainTextColor), secondary: Icon(CwtchIcons.enable_experiments, color: settings.current().mainTextColor()),
), ),
Visibility( Visibility(
visible: settings.experimentsEnabled, visible: settings.experimentsEnabled,
child: Column( child: Column(
children: [ children: [
SwitchListTile( SwitchListTile(
title: Text(AppLocalizations.of(context)!.enableGroups, style: TextStyle(color: settings.current().mainTextColor)), title: Text(AppLocalizations.of(context)!.enableGroups, style: TextStyle(color: settings.current().mainTextColor())),
subtitle: Text(AppLocalizations.of(context)!.descriptionExperimentsGroups), subtitle: Text(AppLocalizations.of(context)!.descriptionExperimentsGroups),
value: settings.isExperimentEnabled(TapirGroupsExperiment), value: settings.isExperimentEnabled(TapirGroupsExperiment),
onChanged: (bool value) { onChanged: (bool value) {
@ -215,14 +186,14 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
// Save Settings... // Save Settings...
saveSettings(context); saveSettings(context);
}, },
activeTrackColor: settings.theme.defaultButtonColor, activeTrackColor: settings.theme.defaultButtonActiveColor(),
inactiveTrackColor: settings.theme.defaultButtonDisabledColor, inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
secondary: Icon(CwtchIcons.enable_groups, color: settings.current().mainTextColor), secondary: Icon(CwtchIcons.enable_groups, color: settings.current().mainTextColor()),
), ),
Visibility( Visibility(
visible: !Platform.isAndroid && !Platform.isIOS, visible: !Platform.isAndroid && !Platform.isIOS,
child: SwitchListTile( child: SwitchListTile(
title: Text(AppLocalizations.of(context)!.settingServers, style: TextStyle(color: settings.current().mainTextColor)), title: Text(AppLocalizations.of(context)!.settingServers, style: TextStyle(color: settings.current().mainTextColor())),
subtitle: Text(AppLocalizations.of(context)!.settingServersDescription), subtitle: Text(AppLocalizations.of(context)!.settingServersDescription),
value: settings.isExperimentEnabled(ServerManagementExperiment), value: settings.isExperimentEnabled(ServerManagementExperiment),
onChanged: (bool value) { onChanged: (bool value) {
@ -235,12 +206,12 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
// Save Settings... // Save Settings...
saveSettings(context); saveSettings(context);
}, },
activeTrackColor: settings.theme.defaultButtonColor, activeTrackColor: settings.theme.defaultButtonActiveColor(),
inactiveTrackColor: settings.theme.defaultButtonDisabledColor, inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
secondary: Icon(CwtchIcons.dns_24px, color: settings.current().mainTextColor), secondary: Icon(CwtchIcons.dns_24px, color: settings.current().mainTextColor()),
)), )),
SwitchListTile( SwitchListTile(
title: Text(AppLocalizations.of(context)!.settingFileSharing, style: TextStyle(color: settings.current().mainTextColor)), title: Text(AppLocalizations.of(context)!.settingFileSharing, style: TextStyle(color: settings.current().mainTextColor())),
subtitle: Text(AppLocalizations.of(context)!.descriptionFileSharing), subtitle: Text(AppLocalizations.of(context)!.descriptionFileSharing),
value: settings.isExperimentEnabled(FileSharingExperiment), value: settings.isExperimentEnabled(FileSharingExperiment),
onChanged: (bool value) { onChanged: (bool value) {
@ -251,58 +222,25 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
} }
saveSettings(context); saveSettings(context);
}, },
activeTrackColor: settings.theme.defaultButtonColor, activeTrackColor: settings.theme.defaultButtonActiveColor(),
inactiveTrackColor: settings.theme.defaultButtonDisabledColor, inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
secondary: Icon(Icons.attach_file, color: settings.current().mainTextColor), secondary: Icon(Icons.attach_file, color: settings.current().mainTextColor()),
), ),
Visibility( SwitchListTile(
visible: settings.isExperimentEnabled(FileSharingExperiment), title: Text("Enable Clickable Links", style: TextStyle(color: settings.current().mainTextColor())),
child: Column(children: [ subtitle: Text("The clickable links experiment allows you to click on URLs shared in messages."),
SwitchListTile( value: settings.isExperimentEnabled(ClickableLinksExperiment),
title: Text(AppLocalizations.of(context)!.settingImagePreviews, style: TextStyle(color: settings.current().mainTextColor)), onChanged: (bool value) {
subtitle: Text(AppLocalizations.of(context)!.settingImagePreviewsDescription), if (value) {
value: settings.isExperimentEnabled(ImagePreviewsExperiment), settings.enableExperiment(ClickableLinksExperiment);
onChanged: (bool value) { } else {
if (value) { settings.disableExperiment(ClickableLinksExperiment);
settings.enableExperiment(ImagePreviewsExperiment); }
settings.downloadPath = Provider.of<FlwtchState>(context, listen: false).cwtch.defaultDownloadPath(); saveSettings(context);
} else { },
settings.disableExperiment(ImagePreviewsExperiment); activeTrackColor: settings.theme.defaultButtonActiveColor(),
} inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
saveSettings(context); secondary: Icon(Icons.link, color: settings.current().mainTextColor()),
},
activeTrackColor: settings.theme.defaultButtonActiveColor,
inactiveTrackColor: settings.theme.defaultButtonDisabledColor,
secondary: Icon(Icons.attach_file, color: settings.current().mainTextColor),
),
Visibility(
visible: settings.isExperimentEnabled(ImagePreviewsExperiment) && !Platform.isAndroid,
child: CwtchFolderPicker(
label: AppLocalizations.of(context)!.settingDownloadFolder,
initialValue: settings.downloadPath,
onSave: (newVal) {
settings.downloadPath = newVal;
saveSettings(context);
},
),
),
SwitchListTile(
title: Text(AppLocalizations.of(context)!.enableExperimentClickableLinks, style: TextStyle(color: settings.current().mainTextColor)),
subtitle: Text(AppLocalizations.of(context)!.experimentClickableLinksDescription),
value: settings.isExperimentEnabled(ClickableLinksExperiment),
onChanged: (bool value) {
if (value) {
settings.enableExperiment(ClickableLinksExperiment);
} else {
settings.disableExperiment(ClickableLinksExperiment);
}
saveSettings(context);
},
activeTrackColor: settings.theme.defaultButtonActiveColor,
inactiveTrackColor: settings.theme.defaultButtonDisabledColor,
secondary: Icon(Icons.link, color: settings.current().mainTextColor),
),
]),
), ),
], ],
)), )),
@ -313,8 +251,8 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
applicationLegalese: '\u{a9} 2021 Open Privacy Research Society', applicationLegalese: '\u{a9} 2021 Open Privacy Research Society',
aboutBoxChildren: <Widget>[ aboutBoxChildren: <Widget>[
Padding( Padding(
padding: EdgeInsets.fromLTRB(24.0 + 10.0 + (appIcon.size ?? 24.0), 16.0, 0.0, 0.0), padding: EdgeInsets.fromLTRB(
// About has 24 padding (ln 389) and there appears to be another 10 of padding in the widget 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)), child: SelectableText(AppLocalizations.of(context)!.versionBuilddate.replaceAll("%1", EnvironmentConfig.BUILD_VER).replaceAll("%2", EnvironmentConfig.BUILD_DATE)),
) )
]), ]),
@ -362,31 +300,6 @@ String getLanguageFull(context, String languageCode) {
return languageCode; return languageCode;
} }
/// Since we don't seem to able to dynamically pull translations, this function maps themes to their names
String getThemeName(context, String theme) {
switch (theme) {
case cwtch_theme:
return AppLocalizations.of(context)!.themeNameCwtch;
case ghost_theme:
return AppLocalizations.of(context)!.themeNameGhost;
case mermaid_theme:
return AppLocalizations.of(context)!.themeNameMermaid;
case midnight_theme:
return AppLocalizations.of(context)!.themeNameMidnight;
case neon1_theme:
return AppLocalizations.of(context)!.themeNameNeon1;
case neon2_theme:
return AppLocalizations.of(context)!.themeNameNeon2;
case pumpkin_theme:
return AppLocalizations.of(context)!.themeNamePumpkin;
case vampire_theme:
return AppLocalizations.of(context)!.themeNameVampire;
case witch_theme:
return AppLocalizations.of(context)!.themeNameWitch;
}
return theme;
}
/// Send an UpdateGlobalSettings to the Event Bus /// Send an UpdateGlobalSettings to the Event Bus
saveSettings(context) { saveSettings(context) {
var settings = Provider.of<Settings>(context, listen: false); var settings = Provider.of<Settings>(context, listen: false);

View File

@ -101,7 +101,7 @@ class _GroupSettingsViewState extends State<GroupSettingsView> {
), ),
CwtchTextField( CwtchTextField(
controller: ctrlrGroupAddr, controller: ctrlrGroupAddr,
hintText: '', labelText: '',
validator: (value) {}, validator: (value) {},
) )
]), ]),
@ -116,7 +116,7 @@ class _GroupSettingsViewState extends State<GroupSettingsView> {
CwtchTextField( CwtchTextField(
controller: TextEditingController(text: Provider.of<ContactInfoState>(context, listen: false).server), controller: TextEditingController(text: Provider.of<ContactInfoState>(context, listen: false).server),
validator: (value) {}, validator: (value) {},
hintText: '', labelText: '',
) )
]), ]),
@ -195,11 +195,10 @@ class _GroupSettingsViewState extends State<GroupSettingsView> {
child: Text(AppLocalizations.of(context)!.yesLeave), child: Text(AppLocalizations.of(context)!.yesLeave),
onPressed: () { onPressed: () {
var profileOnion = Provider.of<ContactInfoState>(context, listen: false).profileOnion; var profileOnion = Provider.of<ContactInfoState>(context, listen: false).profileOnion;
var identifier = Provider.of<ContactInfoState>(context, listen: false).identifier; var handle = Provider.of<ContactInfoState>(context, listen: false).identifier;
// locally update cache... // locally update cache...
Provider.of<ContactInfoState>(context, listen: false).isArchived = true; Provider.of<ContactInfoState>(context, listen: false).isArchived = true;
Provider.of<ProfileInfoState>(context, listen: false).contactList.removeContact(identifier); Provider.of<FlwtchState>(context, listen: false).cwtch.DeleteContact(profileOnion, handle);
Provider.of<FlwtchState>(context, listen: false).cwtch.DeleteContact(profileOnion, identifier);
Future.delayed(Duration(milliseconds: 500), () { Future.delayed(Duration(milliseconds: 500), () {
Provider.of<AppState>(context, listen: false).selectedConversation = null; Provider.of<AppState>(context, listen: false).selectedConversation = null;
Navigator.of(context).popUntil((route) => route.settings.name == "conversations"); // dismiss dialog Navigator.of(context).popUntil((route) => route.settings.name == "conversations"); // dismiss dialog

View File

@ -1,11 +1,9 @@
import 'dart:convert'; import 'dart:convert';
import 'dart:io'; import 'dart:io';
import 'package:crypto/crypto.dart'; import 'package:crypto/crypto.dart';
import 'package:cwtch/config.dart';
import 'package:cwtch/cwtch_icons_icons.dart'; import 'package:cwtch/cwtch_icons_icons.dart';
import 'package:cwtch/models/message.dart'; import 'package:cwtch/models/message.dart';
import 'package:cwtch/models/messages/quotedmessage.dart'; import 'package:cwtch/models/messages/quotedmessage.dart';
import 'package:cwtch/widgets/malformedbubble.dart';
import 'package:cwtch/widgets/messageloadingbubble.dart'; import 'package:cwtch/widgets/messageloadingbubble.dart';
import 'package:cwtch/widgets/profileimage.dart'; import 'package:cwtch/widgets/profileimage.dart';
@ -38,7 +36,6 @@ class _MessageViewState extends State<MessageView> {
int selectedContact = -1; int selectedContact = -1;
ItemPositionsListener scrollListener = ItemPositionsListener.create(); ItemPositionsListener scrollListener = ItemPositionsListener.create();
ItemScrollController scrollController = ItemScrollController(); ItemScrollController scrollController = ItemScrollController();
File? imagePreview;
@override @override
void initState() { void initState() {
@ -87,7 +84,7 @@ class _MessageViewState extends State<MessageView> {
appBarButtons.add(IconButton( appBarButtons.add(IconButton(
icon: Icon(Icons.attach_file, size: 24), icon: Icon(Icons.attach_file, size: 24),
tooltip: AppLocalizations.of(context)!.tooltipSendFile, tooltip: AppLocalizations.of(context)!.tooltipSendFile,
onPressed: (){_showFilePicker(context);}, onPressed: _showFilePicker,
)); ));
} }
appBarButtons.add(IconButton( appBarButtons.add(IconButton(
@ -106,7 +103,6 @@ class _MessageViewState extends State<MessageView> {
return WillPopScope( return WillPopScope(
onWillPop: _onWillPop, onWillPop: _onWillPop,
child: Scaffold( child: Scaffold(
backgroundColor: Provider.of<Settings>(context).theme.backgroundMainColor,
floatingActionButton: appState.unreadMessagesBelow floatingActionButton: appState.unreadMessagesBelow
? FloatingActionButton( ? FloatingActionButton(
child: Icon(Icons.arrow_downward), child: Icon(Icons.arrow_downward),
@ -123,7 +119,7 @@ class _MessageViewState extends State<MessageView> {
ProfileImage( ProfileImage(
imagePath: Provider.of<ContactInfoState>(context).imagePath, imagePath: Provider.of<ContactInfoState>(context).imagePath,
diameter: 42, diameter: 42,
border: Provider.of<Settings>(context).current().portraitOnlineBorderColor, border: Provider.of<Settings>(context).current().portraitOnlineBorderColor(),
badgeTextColor: Colors.red, badgeTextColor: Colors.red,
badgeColor: Colors.red, badgeColor: Colors.red,
), ),
@ -217,7 +213,7 @@ class _MessageViewState extends State<MessageView> {
ctrlrCompose.clear(); ctrlrCompose.clear();
focusNode.requestFocus(); focusNode.requestFocus();
Future.delayed(const Duration(milliseconds: 80), () { Future.delayed(const Duration(milliseconds: 80), () {
Provider.of<ProfileInfoState>(context, listen: false).contactList.getContact(Provider.of<ContactInfoState>(context, listen: false).identifier)?.bumpMessageCache(); Provider.of<ContactInfoState>(context, listen: false).totalMessages++;
Provider.of<ContactInfoState>(context, listen: false).newMarker++; Provider.of<ContactInfoState>(context, listen: false).newMarker++;
// Resort the contact list... // Resort the contact list...
Provider.of<ProfileInfoState>(context, listen: false).contactList.updateLastMessageTime(Provider.of<ContactInfoState>(context, listen: false).identifier, DateTime.now()); Provider.of<ProfileInfoState>(context, listen: false).contactList.updateLastMessageTime(Provider.of<ContactInfoState>(context, listen: false).identifier, DateTime.now());
@ -228,7 +224,7 @@ class _MessageViewState extends State<MessageView> {
bool isOffline = Provider.of<ContactInfoState>(context).isOnline() == false; bool isOffline = Provider.of<ContactInfoState>(context).isOnline() == false;
var composeBox = Container( var composeBox = Container(
color: Provider.of<Settings>(context).theme.backgroundMainColor, color: Provider.of<Settings>(context).theme.backgroundMainColor(),
padding: EdgeInsets.all(2), padding: EdgeInsets.all(2),
margin: EdgeInsets.all(2), margin: EdgeInsets.all(2),
height: 100, height: 100,
@ -236,7 +232,7 @@ class _MessageViewState extends State<MessageView> {
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Container( child: Container(
decoration: BoxDecoration(border: Border(top: BorderSide(color: Provider.of<Settings>(context).theme.defaultButtonActiveColor))), decoration: BoxDecoration(border: Border(top: BorderSide(color: Provider.of<Settings>(context).theme.defaultButtonActiveColor()))),
child: RawKeyboardListener( child: RawKeyboardListener(
focusNode: FocusNode(), focusNode: FocusNode(),
onKey: handleKeyPress, onKey: handleKeyPress,
@ -256,12 +252,12 @@ class _MessageViewState extends State<MessageView> {
enabled: !isOffline, enabled: !isOffline,
decoration: InputDecoration( decoration: InputDecoration(
hintText: isOffline ? "" : AppLocalizations.of(context)!.placeholderEnterMessage, hintText: isOffline ? "" : AppLocalizations.of(context)!.placeholderEnterMessage,
hintStyle: TextStyle(color: Provider.of<Settings>(context).theme.sendHintTextColor), hintStyle: TextStyle(color: Provider.of<Settings>(context).theme.altTextColor()),
enabledBorder: InputBorder.none, enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none, focusedBorder: InputBorder.none,
enabled: true, enabled: true,
suffixIcon: ElevatedButton( suffixIcon: ElevatedButton(
child: Icon(CwtchIcons.send_24px, size: 24, color: Provider.of<Settings>(context).theme.defaultButtonTextColor), child: Icon(CwtchIcons.send_24px, size: 24, color: Provider.of<Settings>(context).theme.defaultButtonTextColor()),
onPressed: isOffline ? null : _sendMessage, onPressed: isOffline ? null : _sendMessage,
))), ))),
)))), )))),
@ -281,8 +277,8 @@ class _MessageViewState extends State<MessageView> {
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
color: message.getMetadata().senderHandle != Provider.of<AppState>(context).selectedProfile color: message.getMetadata().senderHandle != Provider.of<AppState>(context).selectedProfile
? Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor ? Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor()
: Provider.of<Settings>(context).theme.messageFromMeBackgroundColor, : Provider.of<Settings>(context).theme.messageFromMeBackgroundColor(),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Stack(children: [ Stack(children: [
Align( Align(
@ -316,7 +312,7 @@ class _MessageViewState extends State<MessageView> {
children = [composeBox]; children = [composeBox];
} }
return Container(color: Provider.of<Settings>(context).theme.backgroundMainColor, child: Column(mainAxisSize: MainAxisSize.min, children: children)); return Column(mainAxisSize: MainAxisSize.min, children: children);
} }
// Send the message if enter is pressed without the shift key... // Send the message if enter is pressed without the shift key...
@ -357,7 +353,7 @@ class _MessageViewState extends State<MessageView> {
return contact.onion != Provider.of<ContactInfoState>(context).onion; return contact.onion != Provider.of<ContactInfoState>(context).onion;
}, onChanged: (newVal) { }, onChanged: (newVal) {
setState(() { setState(() {
this.selectedContact = Provider.of<ProfileInfoState>(context, listen: false).contactList.findContact(newVal)!.identifier; this.selectedContact = newVal;
}); });
})), })),
SizedBox( SizedBox(
@ -366,7 +362,7 @@ class _MessageViewState extends State<MessageView> {
ElevatedButton( ElevatedButton(
child: Text(AppLocalizations.of(bcontext)!.inviteBtn, semanticsLabel: AppLocalizations.of(bcontext)!.inviteBtn), child: Text(AppLocalizations.of(bcontext)!.inviteBtn, semanticsLabel: AppLocalizations.of(bcontext)!.inviteBtn),
onPressed: () { onPressed: () {
if (this.selectedContact != -1) { if (this.selectedContact != "") {
this._sendInvitation(); this._sendInvitation();
} }
Navigator.pop(bcontext); Navigator.pop(bcontext);
@ -378,8 +374,7 @@ class _MessageViewState extends State<MessageView> {
}); });
} }
void _showFilePicker(BuildContext ctx) async { void _showFilePicker() async {
imagePreview = null;
FilePickerResult? result = await FilePicker.platform.pickFiles(); FilePickerResult? result = await FilePicker.platform.pickFiles();
if (result != null) { if (result != null) {
File file = File(result.files.first.path); File file = File(result.files.first.path);
@ -387,73 +382,11 @@ class _MessageViewState extends State<MessageView> {
// a manifest (see : https://git.openprivacy.ca/cwtch.im/cwtch/src/branch/master/protocol/files/manifest.go#L25) // a manifest (see : https://git.openprivacy.ca/cwtch.im/cwtch/src/branch/master/protocol/files/manifest.go#L25)
if (file.lengthSync() <= 10737418240) { if (file.lengthSync() <= 10737418240) {
print("Sending " + file.path); print("Sending " + file.path);
_confirmFileSend(ctx, file.path); _sendFile(file.path);
} else { } else {
final snackBar = SnackBar( print("file size cannot exceed 10 gigabytes");
content: Text(AppLocalizations.of(context)!.msgFileTooBig), //todo: toast error
duration: Duration(seconds: 4),
);
ScaffoldMessenger.of(ctx).showSnackBar(snackBar);
} }
} }
} }
void _confirmFileSend(BuildContext ctx, String path) async {
showModalBottomSheet<void>(
context: ctx,
builder: (BuildContext bcontext) {
var showPreview = false;
if (Provider.of<Settings>(context, listen: false).shouldPreview(path)) {
showPreview = true;
if (imagePreview == null) {
imagePreview = new File(path);
}
}
return Container(
height: 300, // bespoke value courtesy of the [TextField] docs
child: Center(
child: Padding(
padding: EdgeInsets.all(10.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text(AppLocalizations.of(context)!.msgConfirmSend + " $path?"),
SizedBox(
height: 20,
),
Visibility(visible: showPreview, child: showPreview ? Image.file(
imagePreview!,
cacheHeight: 150, // limit the amount of space the image can decode too, we keep this high-ish to allow quality previews...
filterQuality: FilterQuality.medium,
fit: BoxFit.fill,
alignment: Alignment.center,
height: 150,
isAntiAlias: false,
errorBuilder: (context, error, stackTrace) {
return MalformedBubble();
},
) : Container()),
Visibility(visible: showPreview, child: SizedBox(height: 10,)),
Row(mainAxisAlignment: MainAxisAlignment.center, children: [
ElevatedButton(
child: Text(AppLocalizations.of(context)!.cancel, semanticsLabel: AppLocalizations.of(context)!.cancel),
onPressed: () {
Navigator.pop(bcontext);
},
),
SizedBox(width: 20,),
ElevatedButton(
child: Text(AppLocalizations.of(context)!.btnSendFile, semanticsLabel: AppLocalizations.of(context)!.btnSendFile),
onPressed: () {
_sendFile(path);
Navigator.pop(bcontext);
},
),
]),
],
)),
));
});
}
} }

View File

@ -105,7 +105,7 @@ class _PeerSettingsViewState extends State<PeerSettingsView> {
height: 20, height: 20,
), ),
SwitchListTile( SwitchListTile(
title: Text(AppLocalizations.of(context)!.blockBtn, style: TextStyle(color: settings.current().mainTextColor)), title: Text(AppLocalizations.of(context)!.blockBtn, style: TextStyle(color: settings.current().mainTextColor())),
value: Provider.of<ContactInfoState>(context).isBlocked, value: Provider.of<ContactInfoState>(context).isBlocked,
onChanged: (bool blocked) { onChanged: (bool blocked) {
// Save local blocked status // Save local blocked status
@ -137,14 +137,14 @@ class _PeerSettingsViewState extends State<PeerSettingsView> {
Provider.of<FlwtchState>(context, listen: false).cwtch.SendProfileEvent(profileOnion, setPeerAttributeJson); Provider.of<FlwtchState>(context, listen: false).cwtch.SendProfileEvent(profileOnion, setPeerAttributeJson);
} }
}, },
activeTrackColor: settings.theme.defaultButtonColor, activeTrackColor: settings.theme.defaultButtonActiveColor(),
inactiveTrackColor: settings.theme.defaultButtonDisabledColor, inactiveTrackColor: settings.theme.defaultButtonDisabledColor(),
secondary: Icon(CwtchIcons.block_peer, color: settings.current().mainTextColor), secondary: Icon(CwtchIcons.block_peer, color: settings.current().mainTextColor()),
), ),
ListTile( ListTile(
title: Text(AppLocalizations.of(context)!.savePeerHistory, style: TextStyle(color: settings.current().mainTextColor)), title: Text(AppLocalizations.of(context)!.savePeerHistory, style: TextStyle(color: settings.current().mainTextColor())),
subtitle: Text(AppLocalizations.of(context)!.savePeerHistoryDescription), subtitle: Text(AppLocalizations.of(context)!.savePeerHistoryDescription),
leading: Icon(CwtchIcons.peer_history, color: settings.current().mainTextColor), leading: Icon(CwtchIcons.peer_history, color: settings.current().mainTextColor()),
trailing: DropdownButton( trailing: DropdownButton(
value: Provider.of<ContactInfoState>(context).savePeerHistory == "DefaultDeleteHistory" value: Provider.of<ContactInfoState>(context).savePeerHistory == "DefaultDeleteHistory"
? AppLocalizations.of(context)!.dontSavePeerHistory ? AppLocalizations.of(context)!.dontSavePeerHistory

View File

@ -46,20 +46,20 @@ class _ProfileMgrViewState extends State<ProfileMgrView> {
return Provider.of<AppState>(context, listen: false).cwtchIsClosing; return Provider.of<AppState>(context, listen: false).cwtchIsClosing;
}, },
child: Scaffold( child: Scaffold(
backgroundColor: settings.theme.backgroundMainColor, backgroundColor: settings.theme.backgroundMainColor(),
appBar: AppBar( appBar: AppBar(
title: Row(children: [ title: Row(children: [
Icon( Icon(
CwtchIcons.cwtch_knott, CwtchIcons.cwtch_knott,
size: 36, size: 36,
color: settings.theme.mainTextColor, color: settings.theme.mainTextColor(),
), ),
SizedBox( SizedBox(
width: 10, width: 10,
), ),
Expanded( Expanded(
child: Text(MediaQuery.of(context).size.width > 600 ? AppLocalizations.of(context)!.titleManageProfiles : AppLocalizations.of(context)!.titleManageProfilesShort, child: Text(MediaQuery.of(context).size.width > 600 ? AppLocalizations.of(context)!.titleManageProfiles : AppLocalizations.of(context)!.titleManageProfilesShort,
style: TextStyle(color: settings.current().mainTextColor))) style: TextStyle(color: settings.current().mainTextColor())))
]), ]),
actions: getActions(), actions: getActions(),
), ),
@ -93,7 +93,7 @@ class _ProfileMgrViewState extends State<ProfileMgrView> {
// Unlock Profiles // Unlock Profiles
actions.add(IconButton( actions.add(IconButton(
icon: Icon(CwtchIcons.lock_open_24px), icon: Icon(CwtchIcons.lock_open_24px),
color: Provider.of<ProfileListState>(context).profiles.isEmpty ? Provider.of<Settings>(context).theme.defaultButtonColor : Provider.of<Settings>(context).theme.mainTextColor, color: Provider.of<ProfileListState>(context).profiles.isEmpty ? Provider.of<Settings>(context).theme.defaultButtonColor() : Provider.of<Settings>(context).theme.mainTextColor(),
tooltip: AppLocalizations.of(context)!.tooltipUnlockProfiles, tooltip: AppLocalizations.of(context)!.tooltipUnlockProfiles,
onPressed: _modalUnlockProfiles, onPressed: _modalUnlockProfiles,
)); ));

View File

@ -1,136 +0,0 @@
import 'package:cwtch/models/profileservers.dart';
import 'package:cwtch/models/servers.dart';
import 'package:cwtch/widgets/remoteserverrow.dart';
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:provider/provider.dart';
import '../cwtch_icons_icons.dart';
import '../main.dart';
import '../model.dart';
import '../settings.dart';
class ProfileServersView extends StatefulWidget {
@override
_ProfileServersView createState() => _ProfileServersView();
}
class _ProfileServersView extends State<ProfileServersView> {
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
var knownServers = Provider.of<ProfileInfoState>(context).serverList.servers.map<String>((RemoteServerInfoState remoteServer) {
return remoteServer.onion + ".onion";
}).toSet();
var importServerList = Provider.of<ServerListState>(context).servers.where((server) => !knownServers.contains(server.onion)).map<DropdownMenuItem<String>>((ServerInfoState serverInfo) {
return DropdownMenuItem<String>(
value: serverInfo.onion,
child: Text(
serverInfo.description.isNotEmpty ? serverInfo.description : serverInfo.onion,
overflow: TextOverflow.ellipsis,
),
);
}).toList();
importServerList.insert(0, DropdownMenuItem<String>(value: "", child: Text(AppLocalizations.of(context)!.importLocalServerSelectText)));
return Scaffold(
appBar: AppBar(
title: Text(MediaQuery.of(context).size.width > 600 ? AppLocalizations.of(context)!.manageKnownServersLong : AppLocalizations.of(context)!.manageKnownServersShort),
),
body: Consumer<ProfileInfoState>(
builder: (context, profile, child) {
ProfileServerListState servers = profile.serverList;
final tiles = servers.servers.map(
(RemoteServerInfoState server) {
return ChangeNotifierProvider<RemoteServerInfoState>.value(
value: server,
builder: (context, child) => RepaintBoundary(child: RemoteServerRow()),
);
},
);
final divided = ListTile.divideTiles(
context: context,
tiles: tiles,
).toList();
final importCard = Card(
child: ListTile(
title: Text(AppLocalizations.of(context)!.importLocalServerLabel),
leading: Icon(CwtchIcons.add_circle_24px, color: Provider.of<Settings>(context).current().mainTextColor),
trailing: DropdownButton(
onChanged: (String? importServer) {
if (importServer!.isNotEmpty) {
var server = Provider.of<ServerListState>(context).getServer(importServer)!;
showImportConfirm(context, profile.onion, server.onion, server.description, server.serverBundle);
}
},
value: "",
items: importServerList,
)));
return LayoutBuilder(builder: (BuildContext context, BoxConstraints viewportConstraints) {
return Scrollbar(
isAlwaysShown: true,
child: SingleChildScrollView(
clipBehavior: Clip.antiAlias,
child: Container(
margin: EdgeInsets.fromLTRB(5, 0, 5, 10),
padding: EdgeInsets.fromLTRB(5, 0, 5, 10),
child: Column(children: [if (importServerList.length > 1) importCard, Column(children: divided)]))));
});
return ListView(children: divided);
},
));
}
showImportConfirm(BuildContext context, String profileHandle, String serverHandle, String serverDesc, String bundle) {
var serverLabel = serverDesc.isNotEmpty ? serverDesc : serverHandle;
serverHandle = serverHandle.substring(0, serverHandle.length - 6); // remove '.onion'
// set up the buttons
Widget cancelButton = ElevatedButton(
child: Text(AppLocalizations.of(context)!.cancel),
onPressed: () {
Navigator.of(context).pop(); // dismiss dialog
},
);
Widget continueButton = ElevatedButton(
child: Text(AppLocalizations.of(context)!.importLocalServerButton.replaceAll("%1", serverLabel)),
onPressed: () {
Provider.of<FlwtchState>(context, listen: false).cwtch.ImportBundle(profileHandle, bundle);
// Wait 500ms and hope the server is imported and add it's description in the UI and as an attribute
Future.delayed(const Duration(milliseconds: 500), () {
var profile = Provider.of<ProfileInfoState>(context);
if (profile.serverList.getServer(serverHandle) != null) {
profile.serverList.getServer(serverHandle)?.updateDescription(serverDesc);
Provider.of<FlwtchState>(context, listen: false).cwtch.SetConversationAttribute(profile.onion, profile.serverList.getServer(serverHandle)!.identifier, "server.description", serverDesc);
}
});
Navigator.of(context).pop();
});
// set up the AlertDialog
AlertDialog alert = AlertDialog(
title: Text(AppLocalizations.of(context)!.importLocalServerButton.replaceAll("%1", serverLabel)),
actions: [
cancelButton,
continueButton,
],
);
// show the dialog
showDialog(
context: context,
builder: (BuildContext context) {
return alert;
},
);
}
}

View File

@ -1,146 +0,0 @@
import 'dart:convert';
import 'package:cwtch/cwtch/cwtch.dart';
import 'package:cwtch/cwtch_icons_icons.dart';
import 'package:cwtch/models/profileservers.dart';
import 'package:cwtch/models/servers.dart';
import 'package:cwtch/widgets/buttontextfield.dart';
import 'package:cwtch/widgets/contactrow.dart';
import 'package:cwtch/widgets/cwtchlabel.dart';
import 'package:cwtch/widgets/passwordfield.dart';
import 'package:cwtch/widgets/textfield.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:flutter/material.dart';
import 'package:cwtch/settings.dart';
import 'package:provider/provider.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../errorHandler.dart';
import '../main.dart';
import '../config.dart';
import '../model.dart';
/// Pane to add or edit a server
class RemoteServerView extends StatefulWidget {
const RemoteServerView();
@override
_RemoteServerViewState createState() => _RemoteServerViewState();
}
class _RemoteServerViewState extends State<RemoteServerView> {
final _formKey = GlobalKey<FormState>();
final ctrlrDesc = TextEditingController(text: "");
@override
void initState() {
super.initState();
var serverInfoState = Provider.of<RemoteServerInfoState>(context, listen: false);
if (serverInfoState.description.isNotEmpty) {
ctrlrDesc.text = serverInfoState.description;
}
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Consumer3<ProfileInfoState, RemoteServerInfoState, Settings>(builder: (context, profile, serverInfoState, settings, child) {
return Scaffold(
appBar: AppBar(title: Text(ctrlrDesc.text.isNotEmpty ? ctrlrDesc.text : serverInfoState.onion)),
body: Container(
margin: EdgeInsets.fromLTRB(30, 0, 30, 10),
padding: EdgeInsets.fromLTRB(20, 0, 20, 10),
child: Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [
SizedBox(
height: 20,
),
CwtchLabel(label: AppLocalizations.of(context)!.serverAddress),
SizedBox(
height: 20,
),
SelectableText(serverInfoState.onion),
// Description
SizedBox(
height: 20,
),
CwtchLabel(label: AppLocalizations.of(context)!.serverDescriptionLabel),
Text(AppLocalizations.of(context)!.serverDescriptionDescription),
SizedBox(
height: 20,
),
CwtchButtonTextField(
controller: ctrlrDesc,
readonly: false,
tooltip: AppLocalizations.of(context)!.saveBtn,
labelText: AppLocalizations.of(context)!.fieldDescriptionLabel,
icon: Icon(Icons.save),
onPressed: () {
Provider.of<FlwtchState>(context, listen: false).cwtch.SetConversationAttribute(profile.onion, serverInfoState.identifier, "server.description", ctrlrDesc.text);
serverInfoState.updateDescription(ctrlrDesc.text);
},
),
SizedBox(
height: 20,
),
Padding(
padding: EdgeInsets.all(8),
child: Text(AppLocalizations.of(context)!.groupsOnThisServerLabel),
),
Expanded(child: _buildGroupsList(serverInfoState))
])));
});
}
Widget _buildGroupsList(RemoteServerInfoState serverInfoState) {
final tiles = serverInfoState.groups.map(
(ContactInfoState group) {
return ChangeNotifierProvider<ContactInfoState>.value(
value: group,
builder: (context, child) => RepaintBoundary(child: _buildGroupRow(group)), // ServerRow()),
);
},
);
final divided = ListTile.divideTiles(
context: context,
tiles: tiles,
).toList();
var size = MediaQuery.of(context).size;
int cols = ((size.width - 50) / 500).ceil();
final double itemHeight = 60; // magic arbitary
final double itemWidth = (size.width - 50 /* magic padding guess */) / cols;
return GridView.count(crossAxisCount: cols, childAspectRatio: (itemWidth / itemHeight), children: divided);
}
Widget _buildGroupRow(ContactInfoState group) {
return Padding(
padding: const EdgeInsets.all(6.0), //border size
child: Column(children: [
Text(
group.nickname,
style: Provider.of<FlwtchState>(context).biggerFont.apply(color: Provider.of<Settings>(context).theme.portraitOnlineBorderColor),
softWrap: true,
overflow: TextOverflow.ellipsis,
),
Visibility(
visible: !Provider.of<Settings>(context).streamerMode,
child: ExcludeSemantics(
child: Text(
group.onion,
softWrap: true,
overflow: TextOverflow.ellipsis,
style: TextStyle(color: Provider.of<Settings>(context).theme.portraitOnlineBorderColor),
)))
]));
}
}

View File

@ -30,7 +30,6 @@ class _ServersView extends State<ServersView> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: Provider.of<Settings>(context, listen: false).theme.backgroundMainColor,
appBar: AppBar( appBar: AppBar(
title: Text(MediaQuery.of(context).size.width > 600 ? AppLocalizations.of(context)!.serversManagerTitleLong : AppLocalizations.of(context)!.serversManagerTitleShort), title: Text(MediaQuery.of(context).size.width > 600 ? AppLocalizations.of(context)!.serversManagerTitleLong : AppLocalizations.of(context)!.serversManagerTitleShort),
actions: getActions(), actions: getActions(),
@ -78,7 +77,7 @@ class _ServersView extends State<ServersView> {
// Unlock Profiles // Unlock Profiles
actions.add(IconButton( actions.add(IconButton(
icon: Icon(CwtchIcons.lock_open_24px), icon: Icon(CwtchIcons.lock_open_24px),
color: Provider.of<ServerListState>(context).servers.isEmpty ? Provider.of<Settings>(context).theme.defaultButtonColor : Provider.of<Settings>(context).theme.mainTextColor, color: Provider.of<ServerListState>(context).servers.isEmpty ? Provider.of<Settings>(context).theme.defaultButtonColor() : Provider.of<Settings>(context).theme.mainTextColor(),
tooltip: AppLocalizations.of(context)!.tooltipUnlockProfiles, tooltip: AppLocalizations.of(context)!.tooltipUnlockProfiles,
onPressed: _modalUnlockServers, onPressed: _modalUnlockServers,
)); ));

View File

@ -1,17 +1,11 @@
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../model.dart'; import '../model.dart';
import '../settings.dart'; import '../settings.dart';
class SplashView extends StatefulWidget { class SplashView extends StatelessWidget {
@override
_SplashViewState createState() => _SplashViewState();
}
class _SplashViewState extends State<SplashView> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Consumer<AppState>( return Consumer<AppState>(
@ -31,24 +25,11 @@ class _SplashViewState extends State<SplashView> {
isAntiAlias: true, isAntiAlias: true,
), ),
Padding( Padding(
padding: const EdgeInsets.all(20.0), padding: const EdgeInsets.all(20.0),
child: Column(children: [ child: Text(appState.appError == "" ? "Loading Cwtch..." : appState.appError,
Padding( style: TextStyle(
padding: EdgeInsets.all(6.0), fontSize: 16.0, color: appState.appError == "" ? Provider.of<Settings>(context).theme.mainTextColor() : Provider.of<Settings>(context).theme.textfieldErrorColor())),
child: Text( ),
appState.appError != ""
? appState.appError
: appState.modalState == ModalState.none
? AppLocalizations.of(context)!.loadingCwtch
: AppLocalizations.of(context)!.storageMigrationModalMessage,
style: TextStyle(
fontSize: 16.0, color: appState.appError == "" ? Provider.of<Settings>(context).theme.mainTextColor : Provider.of<Settings>(context).theme.textfieldErrorColor))),
Visibility(
visible: appState.modalState == ModalState.storageMigration,
child: LinearProgressIndicator(
color: Provider.of<Settings>(context).theme.defaultButtonActiveColor,
))
])),
Image(image: AssetImage("assets/Open_Privacy_Logo_lightoutline.png")), Image(image: AssetImage("assets/Open_Privacy_Logo_lightoutline.png")),
])), ])),
)); ));

View File

@ -0,0 +1,42 @@
import 'package:flutter/material.dart';
import 'package:cwtch/views/profilemgrview.dart';
import 'package:provider/provider.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../main.dart';
import '../model.dart';
import '../settings.dart';
import 'contactsview.dart';
import 'messageview.dart';
// currently unused but maybe one day?
class TripleColumnView extends StatefulWidget {
@override
_TripleColumnViewState createState() => _TripleColumnViewState();
}
class _TripleColumnViewState extends State<TripleColumnView> {
@override
Widget build(BuildContext context) {
var appState = Provider.of<AppState>(context);
var settings = Provider.of<Settings>(context);
var columns = settings.uiColumns(appState.isLandscape(context));
return Flex(direction: Axis.horizontal, children: <Widget>[
Flexible(
flex: columns[0],
child: ProfileMgrView(),
),
Flexible(
flex: columns[1],
child: appState.selectedProfile == null ? Center(child: Text(AppLocalizations.of(context)!.createProfileToBegin)) : ContactsView(), //dev
),
Flexible(
flex: columns[2],
child: appState.selectedConversation == null
? Center(child: Text(AppLocalizations.of(context)!.addContactFirst))
: //dev
Container(child: MessageView()),
),
]);
}
}

View File

@ -5,13 +5,12 @@ import 'package:provider/provider.dart';
// Provides a styled Text Field for use in Form Widgets. // Provides a styled Text Field for use in Form Widgets.
// Callers must provide a text controller, label helper text and a validator. // Callers must provide a text controller, label helper text and a validator.
class CwtchButtonTextField extends StatefulWidget { class CwtchButtonTextField extends StatefulWidget {
CwtchButtonTextField({required this.controller, required this.onPressed, required this.icon, required this.tooltip, this.readonly = true, this.labelText}); CwtchButtonTextField({required this.controller, required this.onPressed, required this.icon, required this.tooltip, this.readonly = true});
final TextEditingController controller; final TextEditingController controller;
final Function()? onPressed; final Function()? onPressed;
final Icon icon; final Icon icon;
final String tooltip; final String tooltip;
final bool readonly; final bool readonly;
String? labelText;
@override @override
_CwtchButtonTextFieldState createState() => _CwtchButtonTextFieldState(); _CwtchButtonTextFieldState createState() => _CwtchButtonTextFieldState();
@ -40,31 +39,29 @@ class _CwtchButtonTextFieldState extends State<CwtchButtonTextField> {
focusNode: _focusNode, focusNode: _focusNode,
enableIMEPersonalizedLearning: false, enableIMEPersonalizedLearning: false,
decoration: InputDecoration( decoration: InputDecoration(
labelText: widget.labelText,
labelStyle: TextStyle(color: theme.current().mainTextColor, backgroundColor: theme.current().textfieldBackgroundColor),
suffixIcon: IconButton( suffixIcon: IconButton(
onPressed: widget.onPressed, onPressed: widget.onPressed,
icon: widget.icon, icon: widget.icon,
padding: EdgeInsets.fromLTRB(0.0, 4.0, 2.0, 2.0), padding: EdgeInsets.fromLTRB(0.0, 4.0, 2.0, 2.0),
tooltip: widget.tooltip, tooltip: widget.tooltip,
enableFeedback: true, enableFeedback: true,
color: theme.current().mainTextColor, color: theme.current().mainTextColor(),
highlightColor: theme.current().defaultButtonColor, highlightColor: theme.current().defaultButtonColor(),
focusColor: theme.current().defaultButtonActiveColor, focusColor: theme.current().defaultButtonActiveColor(),
splashColor: theme.current().defaultButtonActiveColor, splashColor: theme.current().defaultButtonActiveColor(),
), ),
floatingLabelBehavior: FloatingLabelBehavior.never, floatingLabelBehavior: FloatingLabelBehavior.never,
filled: true, filled: true,
fillColor: theme.current().textfieldBackgroundColor, fillColor: theme.current().textfieldBackgroundColor(),
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 3.0)), focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor(), width: 3.0)),
focusedErrorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.0)), focusedErrorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor(), width: 3.0)),
errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.0)), errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor(), width: 3.0)),
errorStyle: TextStyle( errorStyle: TextStyle(
color: theme.current().textfieldErrorColor, color: theme.current().textfieldErrorColor(),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 3.0))), enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor(), width: 3.0))),
); );
}); });
} }

View File

@ -23,7 +23,7 @@ class _ContactRowState extends State<ContactRow> {
var contact = Provider.of<ContactInfoState>(context); var contact = Provider.of<ContactInfoState>(context);
return Card( return Card(
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
color: Provider.of<AppState>(context).selectedConversation == contact.identifier ? Provider.of<Settings>(context).theme.backgroundHilightElementColor : null, color: Provider.of<AppState>(context).selectedConversation == contact.onion ? Provider.of<Settings>(context).theme.backgroundHilightElementColor() : null,
borderOnForeground: false, borderOnForeground: false,
margin: EdgeInsets.all(0.0), margin: EdgeInsets.all(0.0),
child: InkWell( child: InkWell(
@ -32,16 +32,16 @@ class _ContactRowState extends State<ContactRow> {
padding: const EdgeInsets.all(6.0), //border size padding: const EdgeInsets.all(6.0), //border size
child: ProfileImage( child: ProfileImage(
badgeCount: contact.unreadMessages, badgeCount: contact.unreadMessages,
badgeColor: Provider.of<Settings>(context).theme.portraitContactBadgeColor, badgeColor: Provider.of<Settings>(context).theme.portraitContactBadgeColor(),
badgeTextColor: Provider.of<Settings>(context).theme.portraitContactBadgeTextColor, badgeTextColor: Provider.of<Settings>(context).theme.portraitContactBadgeTextColor(),
diameter: 64.0, diameter: 64.0,
imagePath: contact.imagePath, imagePath: contact.imagePath,
maskOut: !contact.isOnline(), maskOut: !contact.isOnline(),
border: contact.isOnline() border: contact.isOnline()
? Provider.of<Settings>(context).theme.portraitOnlineBorderColor ? Provider.of<Settings>(context).theme.portraitOnlineBorderColor()
: contact.isBlocked : contact.isBlocked
? Provider.of<Settings>(context).theme.portraitBlockedBorderColor ? Provider.of<Settings>(context).theme.portraitBlockedBorderColor()
: Provider.of<Settings>(context).theme.portraitOfflineBorderColor), : Provider.of<Settings>(context).theme.portraitOfflineBorderColor()),
), ),
Expanded( Expanded(
child: Padding( child: Padding(
@ -55,20 +55,20 @@ class _ContactRowState extends State<ContactRow> {
style: TextStyle( style: TextStyle(
fontSize: Provider.of<Settings>(context).theme.contactOnionTextSize(), fontSize: Provider.of<Settings>(context).theme.contactOnionTextSize(),
color: contact.isBlocked color: contact.isBlocked
? Provider.of<Settings>(context).theme.portraitBlockedTextColor ? Provider.of<Settings>(context).theme.portraitBlockedTextColor()
: Provider.of<Settings>(context).theme.mainTextColor), //Provider.of<FlwtchState>(context).biggerFont, : Provider.of<Settings>(context).theme.mainTextColor()), //Provider.of<FlwtchState>(context).biggerFont,
softWrap: true, softWrap: true,
overflow: TextOverflow.visible, overflow: TextOverflow.visible,
), ),
Visibility( Visibility(
visible: contact.isGroup && contact.status == "Authenticated", visible: contact.isGroup && contact.status == "Authenticated",
child: LinearProgressIndicator( child: LinearProgressIndicator(
color: Provider.of<Settings>(context).theme.defaultButtonActiveColor, color: Provider.of<Settings>(context).theme.defaultButtonActiveColor(),
)), )),
Visibility( Visibility(
visible: !Provider.of<Settings>(context).streamerMode, visible: !Provider.of<Settings>(context).streamerMode,
child: Text(contact.onion, child: Text(contact.onion,
style: TextStyle(color: contact.isBlocked ? Provider.of<Settings>(context).theme.portraitBlockedTextColor : Provider.of<Settings>(context).theme.mainTextColor)), style: TextStyle(color: contact.isBlocked ? Provider.of<Settings>(context).theme.portraitBlockedTextColor() : Provider.of<Settings>(context).theme.mainTextColor())),
) )
], ],
))), ))),
@ -81,7 +81,7 @@ class _ContactRowState extends State<ContactRow> {
iconSize: 16, iconSize: 16,
icon: Icon( icon: Icon(
Icons.favorite, Icons.favorite,
color: Provider.of<Settings>(context).theme.mainTextColor, color: Provider.of<Settings>(context).theme.mainTextColor(),
), ),
tooltip: AppLocalizations.of(context)!.tooltipAcceptContactRequest, tooltip: AppLocalizations.of(context)!.tooltipAcceptContactRequest,
onPressed: _btnApprove, onPressed: _btnApprove,
@ -89,7 +89,7 @@ class _ContactRowState extends State<ContactRow> {
IconButton( IconButton(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
iconSize: 16, iconSize: 16,
icon: Icon(Icons.delete, color: Provider.of<Settings>(context).theme.mainTextColor), icon: Icon(Icons.delete, color: Provider.of<Settings>(context).theme.mainTextColor()),
tooltip: AppLocalizations.of(context)!.tooltipRejectContactRequest, tooltip: AppLocalizations.of(context)!.tooltipRejectContactRequest,
onPressed: _btnReject, onPressed: _btnReject,
) )
@ -98,7 +98,7 @@ class _ContactRowState extends State<ContactRow> {
? IconButton( ? IconButton(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
iconSize: 16, iconSize: 16,
icon: Icon(Icons.block, color: Provider.of<Settings>(context).theme.mainTextColor), icon: Icon(Icons.block, color: Provider.of<Settings>(context).theme.mainTextColor()),
onPressed: () {}, onPressed: () {},
) )
: Text(dateToNiceString(contact.lastMessageTime))), : Text(dateToNiceString(contact.lastMessageTime))),
@ -111,8 +111,6 @@ class _ContactRowState extends State<ContactRow> {
} }
void _btnApprove() { void _btnApprove() {
// Update the UI
Provider.of<ContactInfoState>(context, listen: false).authorization = ContactAuthorization.approved;
Provider.of<FlwtchState>(context, listen: false) Provider.of<FlwtchState>(context, listen: false)
.cwtch .cwtch
.AcceptContact(Provider.of<ContactInfoState>(context, listen: false).profileOnion, Provider.of<ContactInfoState>(context, listen: false).identifier); .AcceptContact(Provider.of<ContactInfoState>(context, listen: false).profileOnion, Provider.of<ContactInfoState>(context, listen: false).identifier);
@ -121,7 +119,7 @@ class _ContactRowState extends State<ContactRow> {
void _btnReject() { void _btnReject() {
ContactInfoState contact = Provider.of<ContactInfoState>(context, listen: false); ContactInfoState contact = Provider.of<ContactInfoState>(context, listen: false);
if (contact.isGroup == true) { if (contact.isGroup == true) {
// FIXME This flow is incrorect. Groups never just show up on the contact list anymore Provider.of<FlwtchState>(context, listen: false).cwtch.RejectInvite(Provider.of<ContactInfoState>(context, listen: false).profileOnion, contact.identifier);
Provider.of<ProfileInfoState>(context, listen: false).removeContact(contact.onion); Provider.of<ProfileInfoState>(context, listen: false).removeContact(contact.onion);
} else { } else {
Provider.of<FlwtchState>(context, listen: false).cwtch.BlockContact(Provider.of<ContactInfoState>(context, listen: false).profileOnion, contact.identifier); Provider.of<FlwtchState>(context, listen: false).cwtch.BlockContact(Provider.of<ContactInfoState>(context, listen: false).profileOnion, contact.identifier);

View File

@ -18,7 +18,7 @@ class _CwtchLabelState extends State<CwtchLabel> {
return Consumer<Settings>(builder: (context, theme, child) { return Consumer<Settings>(builder: (context, theme, child) {
return Text( return Text(
widget.label, widget.label,
style: TextStyle(fontSize: 20, color: theme.current().mainTextColor), style: TextStyle(fontSize: 20, color: theme.current().mainTextColor()),
); );
}); });
} }

View File

@ -1,8 +1,6 @@
import 'dart:io'; import 'dart:io';
import 'package:cwtch/config.dart';
import 'package:cwtch/models/message.dart'; import 'package:cwtch/models/message.dart';
import 'package:cwtch/widgets/malformedbubble.dart';
import 'package:file_picker_desktop/file_picker_desktop.dart'; import 'package:file_picker_desktop/file_picker_desktop.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -23,9 +21,8 @@ class FileBubble extends StatefulWidget {
final String nonce; final String nonce;
final int fileSize; final int fileSize;
final bool interactive; final bool interactive;
final bool isAuto;
FileBubble(this.nameSuggestion, this.rootHash, this.nonce, this.fileSize, {this.isAuto = false, this.interactive = true}); FileBubble(this.nameSuggestion, this.rootHash, this.nonce, this.fileSize, {this.interactive = true});
@override @override
FileBubbleState createState() => FileBubbleState(); FileBubbleState createState() => FileBubbleState();
@ -36,8 +33,6 @@ class FileBubble extends StatefulWidget {
} }
class FileBubbleState extends State<FileBubble> { class FileBubbleState extends State<FileBubble> {
File? myFile;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -45,150 +40,105 @@ class FileBubbleState extends State<FileBubble> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var fromMe = Provider.of<MessageMetadata>(context, listen: false).senderHandle == Provider.of<ProfileInfoState>(context).onion; var fromMe = Provider.of<MessageMetadata>(context).senderHandle == Provider.of<ProfileInfoState>(context).onion;
var flagStarted = Provider.of<MessageMetadata>(context).attributes["file-downloaded"] == "true"; var flagStarted = Provider.of<MessageMetadata>(context).flags & 0x02 > 0;
var borderRadiousEh = 15.0; var borderRadiousEh = 15.0;
var showFileSharing = Provider.of<Settings>(context, listen: false).isExperimentEnabled(FileSharingExperiment); var showFileSharing = Provider.of<Settings>(context).isExperimentEnabled(FileSharingExperiment);
var prettyDate = DateFormat.yMd(Platform.localeName).add_jm().format(Provider.of<MessageMetadata>(context).timestamp); var prettyDate = DateFormat.yMd(Platform.localeName).add_jm().format(Provider.of<MessageMetadata>(context).timestamp);
var downloadComplete = Provider.of<ProfileInfoState>(context).downloadComplete(widget.fileKey());
var downloadInterrupted = Provider.of<ProfileInfoState>(context).downloadInterrupted(widget.fileKey());
var path = Provider.of<ProfileInfoState>(context).downloadFinalPath(widget.fileKey());
if (downloadComplete) {
var lpath = path!.toLowerCase();
if (lpath.endsWith(".jpg") || lpath.endsWith(".jpeg") || lpath.endsWith(".png") || lpath.endsWith(".gif") || lpath.endsWith(".webp") || lpath.endsWith(".bmp")) {
if (myFile == null) {
setState(() {
myFile = new File(path);
});
}
}
}
var downloadActive = Provider.of<ProfileInfoState>(context).downloadActive(widget.fileKey());
var downloadGotManifest = Provider.of<ProfileInfoState>(context).downloadGotManifest(widget.fileKey());
// If the sender is not us, then we want to give them a nickname... // If the sender is not us, then we want to give them a nickname...
var senderDisplayStr = ""; var senderDisplayStr = "";
var senderIsContact = false;
if (!fromMe) { if (!fromMe) {
ContactInfoState? contact = Provider.of<ProfileInfoState>(context).contactList.findContact(Provider.of<MessageMetadata>(context).senderHandle); ContactInfoState? contact = Provider.of<ProfileInfoState>(context).contactList.findContact(Provider.of<MessageMetadata>(context).senderHandle);
if (contact != null) { if (contact != null) {
senderDisplayStr = contact.nickname; senderDisplayStr = contact.nickname;
senderIsContact = true;
} else { } else {
senderDisplayStr = Provider.of<MessageMetadata>(context).senderHandle; senderDisplayStr = Provider.of<MessageMetadata>(context).senderHandle;
} }
} }
return LayoutBuilder(builder: (bcontext, constraints) {
var wdgSender = Visibility(
visible: widget.interactive,
child: SelectableText(senderDisplayStr + '\u202F',
style: TextStyle(fontSize: 9.0, color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeTextColor : Provider.of<Settings>(context).theme.messageFromOtherTextColor)));
var isPreview = false;
var wdgMessage = !showFileSharing
? Text(AppLocalizations.of(context)!.messageEnableFileSharing)
: fromMe
? senderFileChrome(AppLocalizations.of(context)!.messageFileSent, widget.nameSuggestion, widget.rootHash, widget.fileSize)
: (fileChrome(AppLocalizations.of(context)!.messageFileOffered + ":", widget.nameSuggestion, widget.rootHash, widget.fileSize,
Provider.of<ProfileInfoState>(context).downloadSpeed(widget.fileKey())));
Widget wdgDecorations;
if (!showFileSharing) { var wdgSender = Center(
wdgDecorations = Text('\u202F'); widthFactor: 1,
} else if (fromMe) { child: SelectableText(senderDisplayStr + '\u202F',
wdgDecorations = Visibility( style: TextStyle(fontSize: 9.0, color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeTextColor() : Provider.of<Settings>(context).theme.messageFromOtherTextColor())));
visible: widget.interactive,
child: MessageBubbleDecoration(ackd: Provider.of<MessageMetadata>(context).ackd, errored: Provider.of<MessageMetadata>(context).error, fromMe: fromMe, prettyDate: prettyDate)); var wdgMessage = !showFileSharing
} else if (downloadComplete) { ? Text(AppLocalizations.of(context)!.messageEnableFileSharing)
// in this case, whatever marked download.complete would have also set the path : fromMe
if (Provider.of<Settings>(context).shouldPreview(path!)) { ? senderFileChrome(AppLocalizations.of(context)!.messageFileSent, widget.nameSuggestion, widget.rootHash, widget.fileSize)
isPreview = true; : (fileChrome(AppLocalizations.of(context)!.messageFileOffered + ":", widget.nameSuggestion, widget.rootHash, widget.fileSize,
wdgDecorations = Center( Provider.of<ProfileInfoState>(context).downloadSpeed(widget.fileKey())));
child: MouseRegion( Widget wdgDecorations;
cursor: SystemMouseCursors.click, if (!showFileSharing) {
child: GestureDetector( wdgDecorations = Text('\u202F');
child: Padding( } else if (fromMe) {
padding: EdgeInsets.all(1.0), wdgDecorations = MessageBubbleDecoration(ackd: Provider.of<MessageMetadata>(context).ackd, errored: Provider.of<MessageMetadata>(context).error, fromMe: fromMe, prettyDate: prettyDate);
child: Image.file( } else if (Provider.of<ProfileInfoState>(context).downloadComplete(widget.fileKey())) {
myFile!, // in this case, whatever marked download.complete would have also set the path
cacheWidth: 2048, var path = Provider.of<ProfileInfoState>(context).downloadFinalPath(widget.fileKey())!;
// limit the amount of space the image can decode too, we keep this high-ish to allow quality previews... wdgDecorations = Text(AppLocalizations.of(context)!.fileSavedTo + ': ' + path + '\u202F');
filterQuality: FilterQuality.medium, } else if (Provider.of<ProfileInfoState>(context).downloadActive(widget.fileKey())) {
fit: BoxFit.scaleDown, if (!Provider.of<ProfileInfoState>(context).downloadGotManifest(widget.fileKey())) {
alignment: Alignment.center, wdgDecorations = Text(AppLocalizations.of(context)!.retrievingManifestMessage + '\u202F');
height: MediaQuery.of(bcontext).size.height * 0.30,
isAntiAlias: false,
errorBuilder: (context, error, stackTrace) {
return MalformedBubble();
},
)),
onTap: () {
pop(bcontext, myFile!, wdgMessage);
},
)));
} else {
wdgDecorations = Visibility(visible: widget.interactive, child: Text(AppLocalizations.of(context)!.fileSavedTo + ': ' + path + '\u202F'));
}
} else if (downloadActive) {
if (!downloadGotManifest) {
wdgDecorations = Visibility(visible: widget.interactive, child: Text(AppLocalizations.of(context)!.retrievingManifestMessage + '\u202F'));
} else {
wdgDecorations = Visibility(
visible: widget.interactive,
child: LinearProgressIndicator(
value: Provider.of<ProfileInfoState>(context).downloadProgress(widget.fileKey()),
color: Provider.of<Settings>(context).theme.defaultButtonActiveColor,
));
}
} else if (flagStarted) {
// in this case, the download was done in a previous application launch,
// so we probably have to request an info lookup
if (!downloadInterrupted) {
wdgDecorations = Text(AppLocalizations.of(context)!.fileCheckingStatus + '...' + '\u202F');
} else {
var path = Provider.of<ProfileInfoState>(context).downloadFinalPath(widget.fileKey()) ?? "";
wdgDecorations = Visibility(
visible: widget.interactive,
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Text(AppLocalizations.of(context)!.fileInterrupted + ': ' + path + '\u202F'),
ElevatedButton(onPressed: _btnResume, child: Text(AppLocalizations.of(context)!.verfiyResumeButton))
]));
}
} else if (!senderIsContact) {
wdgDecorations = Text(AppLocalizations.of(context)!.msgAddToAccept);
} else if (!widget.isAuto) {
wdgDecorations = Visibility(
visible: widget.interactive,
child: Center(
widthFactor: 1,
child: Wrap(children: [
Padding(padding: EdgeInsets.all(5), child: ElevatedButton(child: Text(AppLocalizations.of(context)!.downloadFileButton + '\u202F'), onPressed: _btnAccept)),
])));
} else { } else {
wdgDecorations = Container(); wdgDecorations = LinearProgressIndicator(
value: Provider.of<ProfileInfoState>(context).downloadProgress(widget.fileKey()),
color: Provider.of<Settings>(context).theme.defaultButtonActiveColor(),
);
} }
} else if (flagStarted) {
// in this case, the download was done in a previous application launch,
// so we probably have to request an info lookup
if (!Provider.of<ProfileInfoState>(context).downloadInterrupted(widget.fileKey())) {
wdgDecorations = Text(AppLocalizations.of(context)!.fileCheckingStatus + '...' + '\u202F');
Provider.of<FlwtchState>(context, listen: false).cwtch.CheckDownloadStatus(Provider.of<ProfileInfoState>(context, listen: false).onion, widget.fileKey());
} else {
var path = Provider.of<ProfileInfoState>(context).downloadFinalPath(widget.fileKey()) ?? "";
wdgDecorations = Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Text(AppLocalizations.of(context)!.fileInterrupted + ': ' + path + '\u202F'),
ElevatedButton(onPressed: _btnResume, child: Text(AppLocalizations.of(context)!.verfiyResumeButton))
]);
}
} else {
wdgDecorations = Center(
widthFactor: 1,
child: Wrap(children: [
Padding(padding: EdgeInsets.all(5), child: ElevatedButton(child: Text(AppLocalizations.of(context)!.downloadFileButton + '\u202F'), onPressed: _btnAccept)),
]));
}
return Container( return LayoutBuilder(builder: (context, constraints) {
constraints: constraints, //print(constraints.toString()+", "+constraints.maxWidth.toString());
decoration: BoxDecoration( return Center(
color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeBackgroundColor : Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor, widthFactor: 1.0,
border: Border.all(color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeBackgroundColor : Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor, width: 1), child: Container(
borderRadius: BorderRadius.only( decoration: BoxDecoration(
topLeft: Radius.circular(borderRadiousEh), color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeBackgroundColor() : Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor(),
topRight: Radius.circular(borderRadiousEh), border:
bottomLeft: fromMe ? Radius.circular(borderRadiousEh) : Radius.zero, Border.all(color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeBackgroundColor() : Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor(), width: 1),
bottomRight: fromMe ? Radius.zero : Radius.circular(borderRadiousEh), borderRadius: BorderRadius.only(
), topLeft: Radius.circular(borderRadiousEh),
), topRight: Radius.circular(borderRadiousEh),
child: Padding( bottomLeft: fromMe ? Radius.circular(borderRadiousEh) : Radius.zero,
padding: EdgeInsets.all(9.0), bottomRight: fromMe ? Radius.zero : Radius.circular(borderRadiousEh),
child: Column( ),
crossAxisAlignment: fromMe ? CrossAxisAlignment.end : CrossAxisAlignment.start, ),
mainAxisAlignment: fromMe ? MainAxisAlignment.end : MainAxisAlignment.start, child: Center(
mainAxisSize: MainAxisSize.min, widthFactor: 1.0,
children: fromMe ? [wdgMessage, Visibility(visible: widget.interactive, child: wdgDecorations)] : [wdgSender, isPreview ? Container() : wdgMessage, wdgDecorations]), child: Padding(
)); padding: EdgeInsets.all(9.0),
child: Wrap(alignment: WrapAlignment.start, children: [
Center(
widthFactor: 1.0,
child: Column(
crossAxisAlignment: fromMe ? CrossAxisAlignment.end : CrossAxisAlignment.start,
mainAxisAlignment: fromMe ? MainAxisAlignment.end : MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: fromMe
? [wdgMessage, Visibility(visible: widget.interactive, child: wdgDecorations)]
: [wdgSender, wdgMessage, Visibility(visible: widget.interactive, child: wdgDecorations)]),
)
])))));
}); });
} }
@ -196,13 +146,14 @@ class FileBubbleState extends State<FileBubble> {
String? selectedFileName; String? selectedFileName;
File? file; File? file;
var profileOnion = Provider.of<ProfileInfoState>(context, listen: false).onion; var profileOnion = Provider.of<ProfileInfoState>(context, listen: false).onion;
var conversation = Provider.of<ContactInfoState>(context, listen: false).identifier; var handle = Provider.of<MessageMetadata>(context, listen: false).senderHandle;
var idx = Provider.of<MessageMetadata>(context, listen: false).messageID; var contact = Provider.of<ContactInfoState>(context, listen: false).onion;
var idx = Provider.of<MessageMetadata>(context, listen: false).messageIndex;
if (Platform.isAndroid) { if (Platform.isAndroid) {
Provider.of<ProfileInfoState>(context, listen: false).downloadInit(widget.fileKey(), (widget.fileSize / 4096).ceil()); Provider.of<ProfileInfoState>(context, listen: false).downloadInit(widget.fileKey(), (widget.fileSize / 4096).ceil());
Provider.of<FlwtchState>(context, listen: false).cwtch.SetMessageAttribute(profileOnion, conversation, 0, idx, "file-downloaded", "true"); //Provider.of<FlwtchState>(context, listen: false).cwtch.UpdateMessageFlags(profileOnion, contact, idx, Provider.of<MessageMetadata>(context, listen: false).flags | 0x02);
//Provider.of<MessageMetadata>(context, listen: false).attributes |= 0x02; Provider.of<MessageMetadata>(context, listen: false).flags |= 0x02;
ContactInfoState? contact = Provider.of<ProfileInfoState>(context).contactList.findContact(Provider.of<MessageMetadata>(context).senderHandle); ContactInfoState? contact = Provider.of<ProfileInfoState>(context).contactList.findContact(Provider.of<MessageMetadata>(context).senderHandle);
if (contact != null) { if (contact != null) {
Provider.of<FlwtchState>(context, listen: false).cwtch.CreateDownloadableFile(profileOnion, contact.identifier, widget.nameSuggestion, widget.fileKey()); Provider.of<FlwtchState>(context, listen: false).cwtch.CreateDownloadableFile(profileOnion, contact.identifier, widget.nameSuggestion, widget.fileKey());
@ -214,12 +165,12 @@ class FileBubbleState extends State<FileBubble> {
); );
if (selectedFileName != null) { if (selectedFileName != null) {
file = File(selectedFileName); file = File(selectedFileName);
EnvironmentConfig.debugLog("saving to " + file.path); print("saving to " + file.path);
var manifestPath = file.path + ".manifest"; var manifestPath = file.path + ".manifest";
Provider.of<ProfileInfoState>(context, listen: false).downloadInit(widget.fileKey(), (widget.fileSize / 4096).ceil()); Provider.of<ProfileInfoState>(context, listen: false).downloadInit(widget.fileKey(), (widget.fileSize / 4096).ceil());
Provider.of<FlwtchState>(context, listen: false).cwtch.SetMessageAttribute(profileOnion, conversation, 0, idx, "file-downloaded", "true"); //Provider.of<FlwtchState>(context, listen: false).cwtch.UpdateMessageFlags(profileOnion, contact, idx, Provider.of<MessageMetadata>(context, listen: false).flags | 0x02);
//Provider.of<MessageMetadata>(context, listen: false).flags |= 0x02; Provider.of<MessageMetadata>(context, listen: false).flags |= 0x02;
ContactInfoState? contact = Provider.of<ProfileInfoState>(context, listen: false).contactList.findContact(Provider.of<MessageMetadata>(context).senderHandle); ContactInfoState? contact = Provider.of<ProfileInfoState>(context).contactList.findContact(Provider.of<MessageMetadata>(context).senderHandle);
if (contact != null) { if (contact != null) {
Provider.of<FlwtchState>(context, listen: false).cwtch.DownloadFile(profileOnion, contact.identifier, file.path, manifestPath, widget.fileKey()); Provider.of<FlwtchState>(context, listen: false).cwtch.DownloadFile(profileOnion, contact.identifier, file.path, manifestPath, widget.fileKey());
} }
@ -245,7 +196,7 @@ class FileBubbleState extends State<FileBubble> {
SelectableText( SelectableText(
chrome + '\u202F', chrome + '\u202F',
style: TextStyle( style: TextStyle(
color: Provider.of<Settings>(context).theme.messageFromMeTextColor, color: Provider.of<Settings>(context).theme.messageFromMeTextColor(),
), ),
textAlign: TextAlign.left, textAlign: TextAlign.left,
maxLines: 2, maxLines: 2,
@ -254,7 +205,7 @@ class FileBubbleState extends State<FileBubble> {
SelectableText( SelectableText(
fileName + '\u202F', fileName + '\u202F',
style: TextStyle( style: TextStyle(
color: Provider.of<Settings>(context).theme.messageFromMeTextColor, color: Provider.of<Settings>(context).theme.messageFromMeTextColor(),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
@ -265,7 +216,7 @@ class FileBubbleState extends State<FileBubble> {
SelectableText( SelectableText(
prettyBytes(fileSize) + '\u202F' + '\n', prettyBytes(fileSize) + '\u202F' + '\n',
style: TextStyle( style: TextStyle(
color: Provider.of<Settings>(context).theme.messageFromMeTextColor, color: Provider.of<Settings>(context).theme.messageFromMeTextColor(),
), ),
textAlign: TextAlign.left, textAlign: TextAlign.left,
maxLines: 2, maxLines: 2,
@ -274,7 +225,7 @@ class FileBubbleState extends State<FileBubble> {
subtitle: SelectableText( subtitle: SelectableText(
'sha512: ' + rootHash + '\u202F', 'sha512: ' + rootHash + '\u202F',
style: TextStyle( style: TextStyle(
color: Provider.of<Settings>(context).theme.messageFromMeTextColor, color: Provider.of<Settings>(context).theme.messageFromMeTextColor(),
fontSize: 10, fontSize: 10,
fontFamily: "monospace", fontFamily: "monospace",
), ),
@ -282,7 +233,7 @@ class FileBubbleState extends State<FileBubble> {
maxLines: 4, maxLines: 4,
textWidthBasis: TextWidthBasis.parent, textWidthBasis: TextWidthBasis.parent,
), ),
leading: Icon(Icons.attach_file, size: 32, color: Provider.of<Settings>(context).theme.messageFromMeTextColor)); leading: Icon(Icons.attach_file, size: 32, color: Provider.of<Settings>(context).theme.messageFromMeTextColor()));
} }
// Construct an file chrome // Construct an file chrome
@ -293,7 +244,7 @@ class FileBubbleState extends State<FileBubble> {
SelectableText( SelectableText(
chrome + '\u202F', chrome + '\u202F',
style: TextStyle( style: TextStyle(
color: Provider.of<Settings>(context).theme.messageFromOtherTextColor, color: Provider.of<Settings>(context).theme.messageFromOtherTextColor(),
), ),
textAlign: TextAlign.left, textAlign: TextAlign.left,
maxLines: 2, maxLines: 2,
@ -302,7 +253,7 @@ class FileBubbleState extends State<FileBubble> {
SelectableText( SelectableText(
fileName + '\u202F', fileName + '\u202F',
style: TextStyle( style: TextStyle(
color: Provider.of<Settings>(context).theme.messageFromOtherTextColor, color: Provider.of<Settings>(context).theme.messageFromOtherTextColor(),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
@ -313,7 +264,7 @@ class FileBubbleState extends State<FileBubble> {
SelectableText( SelectableText(
AppLocalizations.of(context)!.labelFilesize + ': ' + prettyBytes(fileSize) + '\u202F' + '\n', AppLocalizations.of(context)!.labelFilesize + ': ' + prettyBytes(fileSize) + '\u202F' + '\n',
style: TextStyle( style: TextStyle(
color: Provider.of<Settings>(context).theme.messageFromOtherTextColor, color: Provider.of<Settings>(context).theme.messageFromOtherTextColor(),
), ),
textAlign: TextAlign.left, textAlign: TextAlign.left,
maxLines: 2, maxLines: 2,
@ -322,7 +273,7 @@ class FileBubbleState extends State<FileBubble> {
subtitle: SelectableText( subtitle: SelectableText(
'sha512: ' + rootHash + '\u202F', 'sha512: ' + rootHash + '\u202F',
style: TextStyle( style: TextStyle(
color: Provider.of<Settings>(context).theme.messageFromMeTextColor, color: Provider.of<Settings>(context).theme.messageFromMeTextColor(),
fontSize: 10, fontSize: 10,
fontFamily: "monospace", fontFamily: "monospace",
), ),
@ -330,13 +281,13 @@ class FileBubbleState extends State<FileBubble> {
maxLines: 4, maxLines: 4,
textWidthBasis: TextWidthBasis.parent, textWidthBasis: TextWidthBasis.parent,
), ),
leading: Icon(Icons.attach_file, size: 32, color: Provider.of<Settings>(context).theme.messageFromOtherTextColor), leading: Icon(Icons.attach_file, size: 32, color: Provider.of<Settings>(context).theme.messageFromOtherTextColor()),
trailing: Visibility( trailing: Visibility(
visible: speed != "0 B/s", visible: speed != "0 B/s",
child: SelectableText( child: SelectableText(
speed + '\u202F', speed + '\u202F',
style: TextStyle( style: TextStyle(
color: Provider.of<Settings>(context).theme.messageFromMeTextColor, color: Provider.of<Settings>(context).theme.messageFromMeTextColor(),
), ),
textAlign: TextAlign.left, textAlign: TextAlign.left,
maxLines: 1, maxLines: 1,
@ -344,43 +295,4 @@ class FileBubbleState extends State<FileBubble> {
)), )),
); );
} }
void pop(context, File myFile, Widget meta) async {
await showDialog(
context: context,
builder: (_) => Dialog(
alignment: Alignment.center,
child: Container(
padding: EdgeInsets.all(10),
child: Column(children: [
ListTile(
title: meta,
trailing: IconButton(
icon: Icon(Icons.close),
color: Provider.of<Settings>(context, listen: false).theme.toolbarIconColor,
iconSize: 32,
onPressed: () {
Navigator.pop(context, true);
})),
Image.file(
myFile,
cacheWidth: (MediaQuery.of(context).size.width * 0.6).floor(),
width: (MediaQuery.of(context).size.width * 0.6),
height: (MediaQuery.of(context).size.height * 0.6),
fit: BoxFit.scaleDown,
),
SizedBox(
height: 20,
),
Visibility(visible: !Platform.isAndroid, child: Text(myFile.path, textAlign: TextAlign.center)),
Visibility(visible: Platform.isAndroid, child: IconButton(icon: Icon(Icons.arrow_downward), onPressed: androidExport)),
]),
)));
}
void androidExport() async {
if (myFile != null) {
Provider.of<FlwtchState>(context, listen: false).cwtch.ExportPreviewedFile(myFile!.path, widget.nameSuggestion);
}
}
} }

View File

@ -1,67 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'dart:io';
import 'package:file_picker_desktop/file_picker_desktop.dart';
import 'buttontextfield.dart';
import 'cwtchlabel.dart';
class CwtchFolderPicker extends StatefulWidget {
final String label;
final String initialValue;
final Function(String)? onSave;
const CwtchFolderPicker({Key? key, this.label = "", this.initialValue = "", this.onSave}) : super(key: key);
@override
_CwtchFolderPickerState createState() => _CwtchFolderPickerState();
}
class _CwtchFolderPickerState extends State<CwtchFolderPicker> {
final TextEditingController ctrlrVal = TextEditingController();
@override
void initState() {
super.initState();
ctrlrVal.text = widget.initialValue;
}
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.all(10),
padding: EdgeInsets.all(2),
child: Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [
CwtchLabel(label: widget.label),
SizedBox(
height: 20,
),
CwtchButtonTextField(
controller: ctrlrVal,
readonly: Platform.isAndroid,
onPressed: () async {
if (Platform.isAndroid) {
return;
}
try {
var selectedDirectory = await getDirectoryPath();
if (selectedDirectory != null) {
//File directory = File(selectedDirectory);
selectedDirectory += "/";
ctrlrVal.text = selectedDirectory;
if (widget.onSave != null) {
widget.onSave!(selectedDirectory);
}
} else {
// User canceled the picker
}
} catch (e) {
print(e);
}
},
icon: Icon(Icons.folder),
tooltip: "Browse", //todo: l18n
)
]));
}
}

View File

@ -39,7 +39,7 @@ class InvitationBubbleState extends State<InvitationBubble> {
isAccepted = Provider.of<ProfileInfoState>(context).contactList.findContact(widget.inviteTarget) != null; isAccepted = Provider.of<ProfileInfoState>(context).contactList.findContact(widget.inviteTarget) != null;
var borderRadiousEh = 15.0; var borderRadiousEh = 15.0;
var showGroupInvite = Provider.of<Settings>(context).isExperimentEnabled(TapirGroupsExperiment); var showGroupInvite = Provider.of<Settings>(context).isExperimentEnabled(TapirGroupsExperiment);
rejected = Provider.of<MessageMetadata>(context).attributes["rejected-invite"] == "true"; rejected = Provider.of<MessageMetadata>(context).flags & 0x01 == 0x01;
var prettyDate = DateFormat.yMd(Platform.localeName).add_jm().format(Provider.of<MessageMetadata>(context).timestamp); var prettyDate = DateFormat.yMd(Platform.localeName).add_jm().format(Provider.of<MessageMetadata>(context).timestamp);
// If the sender is not us, then we want to give them a nickname... // If the sender is not us, then we want to give them a nickname...
@ -56,7 +56,7 @@ class InvitationBubbleState extends State<InvitationBubble> {
var wdgSender = Center( var wdgSender = Center(
widthFactor: 1, widthFactor: 1,
child: SelectableText(senderDisplayStr + '\u202F', child: SelectableText(senderDisplayStr + '\u202F',
style: TextStyle(fontSize: 9.0, color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeTextColor : Provider.of<Settings>(context).theme.messageFromOtherTextColor))); style: TextStyle(fontSize: 9.0, color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeTextColor() : Provider.of<Settings>(context).theme.messageFromOtherTextColor())));
// If we receive an invite for ourselves, treat it as a bug. The UI no longer allows this so it could have only come from // If we receive an invite for ourselves, treat it as a bug. The UI no longer allows this so it could have only come from
// some kind of malfeasance. // some kind of malfeasance.
@ -96,8 +96,9 @@ class InvitationBubbleState extends State<InvitationBubble> {
widthFactor: 1.0, widthFactor: 1.0,
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeBackgroundColor : Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor, color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeBackgroundColor() : Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor(),
border: Border.all(color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeBackgroundColor : Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor, width: 1), border:
Border.all(color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeBackgroundColor() : Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor(), width: 1),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(borderRadiousEh), topLeft: Radius.circular(borderRadiousEh),
topRight: Radius.circular(borderRadiousEh), topRight: Radius.circular(borderRadiousEh),
@ -127,10 +128,10 @@ class InvitationBubbleState extends State<InvitationBubble> {
void _btnReject() { void _btnReject() {
setState(() { setState(() {
var profileOnion = Provider.of<ProfileInfoState>(context, listen: false).onion; var profileOnion = Provider.of<ProfileInfoState>(context, listen: false).onion;
var conversation = Provider.of<ContactInfoState>(context, listen: false).identifier; var contact = Provider.of<ContactInfoState>(context, listen: false).onion;
var idx = Provider.of<MessageMetadata>(context, listen: false).messageID; var idx = Provider.of<MessageMetadata>(context, listen: false).messageIndex;
Provider.of<FlwtchState>(context, listen: false).cwtch.SetMessageAttribute(profileOnion, conversation, 0, idx, "rejected-invite", "true"); //Provider.of<FlwtchState>(context, listen: false).cwtch.UpdateMessageFlags(profileOnion, contact, idx, Provider.of<MessageMetadata>(context, listen: false).flags | 0x01);
//Provider.of<MessageMetadata>(context, listen: false).flags |= 0x01; Provider.of<MessageMetadata>(context, listen: false).flags |= 0x01;
}); });
} }
@ -148,7 +149,7 @@ class InvitationBubbleState extends State<InvitationBubble> {
SelectableText( SelectableText(
chrome + '\u202F', chrome + '\u202F',
style: TextStyle( style: TextStyle(
color: Provider.of<Settings>(context).theme.messageFromMeTextColor, color: Provider.of<Settings>(context).theme.messageFromMeTextColor(),
), ),
textAlign: TextAlign.left, textAlign: TextAlign.left,
maxLines: 2, maxLines: 2,
@ -157,7 +158,7 @@ class InvitationBubbleState extends State<InvitationBubble> {
SelectableText( SelectableText(
targetName + '\u202F', targetName + '\u202F',
style: TextStyle( style: TextStyle(
color: Provider.of<Settings>(context).theme.messageFromMeTextColor, color: Provider.of<Settings>(context).theme.messageFromMeTextColor(),
), ),
textAlign: TextAlign.left, textAlign: TextAlign.left,
maxLines: 2, maxLines: 2,
@ -172,7 +173,7 @@ class InvitationBubbleState extends State<InvitationBubble> {
SelectableText( SelectableText(
chrome + '\u202F', chrome + '\u202F',
style: TextStyle( style: TextStyle(
color: Provider.of<Settings>(context).theme.messageFromOtherTextColor, color: Provider.of<Settings>(context).theme.messageFromOtherTextColor(),
), ),
textAlign: TextAlign.left, textAlign: TextAlign.left,
textWidthBasis: TextWidthBasis.longestLine, textWidthBasis: TextWidthBasis.longestLine,
@ -180,7 +181,7 @@ class InvitationBubbleState extends State<InvitationBubble> {
), ),
SelectableText( SelectableText(
targetName + '\u202F', targetName + '\u202F',
style: TextStyle(color: Provider.of<Settings>(context).theme.messageFromOtherTextColor), style: TextStyle(color: Provider.of<Settings>(context).theme.messageFromOtherTextColor()),
textAlign: TextAlign.left, textAlign: TextAlign.left,
maxLines: 2, maxLines: 2,
textWidthBasis: TextWidthBasis.longestLine, textWidthBasis: TextWidthBasis.longestLine,

View File

@ -48,7 +48,7 @@ class MessageBubbleState extends State<MessageBubble> {
} }
} }
var wdgSender = SelectableText(senderDisplayStr, var wdgSender = SelectableText(senderDisplayStr,
style: TextStyle(fontSize: 9.0, color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeTextColor : Provider.of<Settings>(context).theme.messageFromOtherTextColor)); style: TextStyle(fontSize: 9.0, color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeTextColor() : Provider.of<Settings>(context).theme.messageFromOtherTextColor()));
var wdgMessage; var wdgMessage;
@ -58,7 +58,7 @@ class MessageBubbleState extends State<MessageBubble> {
//key: Key(myKey), //key: Key(myKey),
focusNode: _focus, focusNode: _focus,
style: TextStyle( style: TextStyle(
color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeTextColor : Provider.of<Settings>(context).theme.messageFromOtherTextColor, color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeTextColor() : Provider.of<Settings>(context).theme.messageFromOtherTextColor(),
), ),
textAlign: TextAlign.left, textAlign: TextAlign.left,
textWidthBasis: TextWidthBasis.longestLine, textWidthBasis: TextWidthBasis.longestLine,
@ -67,7 +67,7 @@ class MessageBubbleState extends State<MessageBubble> {
wdgMessage = SelectableLinkify( wdgMessage = SelectableLinkify(
text: widget.content + '\u202F', text: widget.content + '\u202F',
// TODO: onOpen breaks the "selectable" functionality. Maybe something to do with gesture handler? // TODO: onOpen breaks the "selectable" functionality. Maybe something to do with gesture handler?
options: LinkifyOptions(humanize: false, removeWww: false, looseUrl: true, defaultToHttps: true), options: LinkifyOptions(humanize: false),
linkifiers: [UrlLinkifier()], linkifiers: [UrlLinkifier()],
onOpen: (link) { onOpen: (link) {
_modalOpenLink(context, link); _modalOpenLink(context, link);
@ -75,10 +75,10 @@ class MessageBubbleState extends State<MessageBubble> {
//key: Key(myKey), //key: Key(myKey),
focusNode: _focus, focusNode: _focus,
style: TextStyle( style: TextStyle(
color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeTextColor : Provider.of<Settings>(context).theme.messageFromOtherTextColor, color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeTextColor() : Provider.of<Settings>(context).theme.messageFromOtherTextColor(),
), ),
linkStyle: TextStyle( linkStyle: TextStyle(
color: Provider.of<Settings>(context).current().mainTextColor, color: Provider.of<Settings>(context).current().mainTextColor(),
), ),
textAlign: TextAlign.left, textAlign: TextAlign.left,
textWidthBasis: TextWidthBasis.longestLine, textWidthBasis: TextWidthBasis.longestLine,
@ -95,11 +95,13 @@ class MessageBubbleState extends State<MessageBubble> {
child: Container( child: Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: error ? malformedColor : (fromMe ? Provider.of<Settings>(context).theme.messageFromMeBackgroundColor : Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor), color: error
? malformedColor
: (fromMe ? Provider.of<Settings>(context).theme.messageFromMeBackgroundColor() : Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor()),
border: Border.all( border: Border.all(
color: error color: error
? malformedColor ? malformedColor
: (fromMe ? Provider.of<Settings>(context).theme.messageFromMeBackgroundColor : Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor), : (fromMe ? Provider.of<Settings>(context).theme.messageFromMeBackgroundColor() : Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor()),
width: 1), width: 1),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(borderRadiousEh), topLeft: Radius.circular(borderRadiousEh),
@ -157,7 +159,6 @@ class MessageBubbleState extends State<MessageBubble> {
onPressed: () async { onPressed: () async {
if (await canLaunch(link.url)) { if (await canLaunch(link.url)) {
await launch(link.url); await launch(link.url);
Navigator.pop(bcontext);
} else { } else {
throw 'Could not launch $link'; throw 'Could not launch $link';
} }

View File

@ -25,7 +25,8 @@ class _MessageBubbleDecoration extends State<MessageBubbleDecoration> {
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Text(widget.prettyDate, Text(widget.prettyDate,
style: TextStyle(fontSize: 9.0, color: widget.fromMe ? Provider.of<Settings>(context).theme.messageFromMeTextColor : Provider.of<Settings>(context).theme.messageFromOtherTextColor), style:
TextStyle(fontSize: 9.0, color: widget.fromMe ? Provider.of<Settings>(context).theme.messageFromMeTextColor() : Provider.of<Settings>(context).theme.messageFromOtherTextColor()),
textAlign: widget.fromMe ? TextAlign.right : TextAlign.left), textAlign: widget.fromMe ? TextAlign.right : TextAlign.left),
!widget.fromMe !widget.fromMe
? SizedBox(width: 1, height: 1) ? SizedBox(width: 1, height: 1)
@ -34,14 +35,14 @@ class _MessageBubbleDecoration extends State<MessageBubbleDecoration> {
child: widget.ackd == true child: widget.ackd == true
? Tooltip( ? Tooltip(
message: AppLocalizations.of(context)!.acknowledgedLabel, message: AppLocalizations.of(context)!.acknowledgedLabel,
child: Icon(Icons.check_circle_outline, color: Provider.of<Settings>(context).theme.messageFromMeTextColor, size: 16)) child: Icon(Icons.check_circle_outline, color: Provider.of<Settings>(context).theme.messageFromMeTextColor(), size: 16))
: (widget.errored == true : (widget.errored == true
? Tooltip( ? Tooltip(
message: AppLocalizations.of(context)!.couldNotSendMsgError, message: AppLocalizations.of(context)!.couldNotSendMsgError,
child: Icon(Icons.error_outline, color: Provider.of<Settings>(context).theme.messageFromMeTextColor, size: 16)) child: Icon(Icons.error_outline, color: Provider.of<Settings>(context).theme.messageFromMeTextColor(), size: 16))
: Tooltip( : Tooltip(
message: AppLocalizations.of(context)!.pendingLabel, message: AppLocalizations.of(context)!.pendingLabel,
child: Icon(Icons.hourglass_bottom_outlined, color: Provider.of<Settings>(context).theme.messageFromMeTextColor, size: 16)))) child: Icon(Icons.hourglass_bottom_outlined, color: Provider.of<Settings>(context).theme.messageFromMeTextColor(), size: 16))))
], ],
)); ));
} }

View File

@ -35,66 +35,65 @@ class _MessageListState extends State<MessageList> {
return RepaintBoundary( return RepaintBoundary(
child: Container( child: Container(
color: Provider.of<Settings>(context).theme.backgroundMainColor,
child: Column(children: [ child: Column(children: [
Visibility( Visibility(
visible: showMessageWarning, visible: showMessageWarning,
child: Container( child: Container(
padding: EdgeInsets.all(5.0), padding: EdgeInsets.all(5.0),
color: Provider.of<Settings>(context).theme.defaultButtonActiveColor, color: Provider.of<Settings>(context).theme.defaultButtonActiveColor(),
child: DefaultTextStyle( child: DefaultTextStyle(
style: TextStyle(color: Provider.of<Settings>(context).theme.defaultButtonTextColor), style: TextStyle(color: Provider.of<Settings>(context).theme.defaultButtonTextColor()),
child: showSyncing child: showSyncing
? Text(AppLocalizations.of(context)!.serverNotSynced, textAlign: TextAlign.center) ? Text(AppLocalizations.of(context)!.serverNotSynced, textAlign: TextAlign.center)
: showOfflineWarning : showOfflineWarning
? Text(Provider.of<ContactInfoState>(context).isGroup ? AppLocalizations.of(context)!.serverConnectivityDisconnected : AppLocalizations.of(context)!.peerOfflineMessage, ? Text(Provider.of<ContactInfoState>(context).isGroup ? AppLocalizations.of(context)!.serverConnectivityDisconnected : AppLocalizations.of(context)!.peerOfflineMessage,
textAlign: TextAlign.center) textAlign: TextAlign.center)
// Only show the ephemeral status for peer conversations, not for groups... // Only show the ephemeral status for peer conversations, not for groups...
: (showEphemeralWarning : (showEphemeralWarning
? Text(AppLocalizations.of(context)!.chatHistoryDefault, textAlign: TextAlign.center) ? Text(AppLocalizations.of(context)!.chatHistoryDefault, textAlign: TextAlign.center)
: :
// We are not allowed to put null here, so put an empty text widget // We are not allowed to put null here, so put an empty text widget
Text("")), Text("")),
))), ))),
Expanded( Expanded(
child: Container( child: Container(
// Only show broken heart is the contact is offline... // Only show broken heart is the contact is offline...
decoration: BoxDecoration( decoration: BoxDecoration(
image: Provider.of<ContactInfoState>(outerContext).isOnline() image: Provider.of<ContactInfoState>(outerContext).isOnline()
? null ? null
: DecorationImage( : DecorationImage(
fit: BoxFit.scaleDown, fit: BoxFit.scaleDown,
alignment: Alignment.center, alignment: Alignment.center,
image: AssetImage("assets/core/negative_heart_512px.png"), image: AssetImage("assets/core/negative_heart_512px.png"),
colorFilter: ColorFilter.mode(Provider.of<Settings>(context).theme.hilightElementColor, BlendMode.srcIn))), colorFilter: ColorFilter.mode(Provider.of<Settings>(context).theme.hilightElementTextColor(), BlendMode.srcIn))),
// Don't load messages for syncing server... // Don't load messages for syncing server...
child: loadMessages child: loadMessages
? ScrollablePositionedList.builder( ? ScrollablePositionedList.builder(
itemPositionsListener: widget.scrollListener, itemPositionsListener: widget.scrollListener,
itemScrollController: widget.scrollController, itemScrollController: widget.scrollController,
initialScrollIndex: initi > 4 ? initi - 4 : 0, initialScrollIndex: initi > 4 ? initi - 4 : 0,
itemCount: Provider.of<ContactInfoState>(outerContext).totalMessages, itemCount: Provider.of<ContactInfoState>(outerContext).totalMessages,
reverse: true, // NOTE: There seems to be a bug in flutter that corrects the mouse wheel scroll, but not the drag direction... reverse: true, // NOTE: There seems to be a bug in flutter that corrects the mouse wheel scroll, but not the drag direction...
itemBuilder: (itemBuilderContext, index) { itemBuilder: (itemBuilderContext, index) {
var profileOnion = Provider.of<ProfileInfoState>(outerContext, listen: false).onion; var profileOnion = Provider.of<ProfileInfoState>(outerContext, listen: false).onion;
var contactHandle = Provider.of<ContactInfoState>(outerContext, listen: false).identifier; var contactHandle = Provider.of<ContactInfoState>(outerContext, listen: false).identifier;
var messageIndex = index; var messageIndex = index;
return FutureBuilder( return FutureBuilder(
future: messageHandler(outerContext, profileOnion, contactHandle, messageIndex), future: messageHandler(outerContext, profileOnion, contactHandle, messageIndex),
builder: (context, snapshot) { builder: (context, snapshot) {
if (snapshot.hasData) { if (snapshot.hasData) {
var message = snapshot.data as Message; var message = snapshot.data as Message;
var key = Provider.of<ContactInfoState>(outerContext, listen: false).getMessageKey(contactHandle, message.getMetadata().messageID); // Already includes MessageRow,,
return message.getWidget(context, key); return message.getWidget(context);
} else { } else {
return MessageLoadingBubble(); return Text(''); //MessageLoadingBubble();
} }
}, },
); );
}, },
) )
: null)) : null))
]))); ])));
} }
} }

View File

@ -1,4 +1,9 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../model.dart';
import 'package:intl/intl.dart';
import '../settings.dart';
class MessageLoadingBubble extends StatefulWidget { class MessageLoadingBubble extends StatefulWidget {
@override @override

View File

@ -15,7 +15,6 @@ import '../settings.dart';
class MessageRow extends StatefulWidget { class MessageRow extends StatefulWidget {
final Widget child; final Widget child;
MessageRow(this.child, {Key? key}) : super(key: key); MessageRow(this.child, {Key? key}) : super(key: key);
@override @override
@ -29,12 +28,9 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
late Alignment _dragAlignment = Alignment.center; late Alignment _dragAlignment = Alignment.center;
Alignment _dragAffinity = Alignment.center; Alignment _dragAffinity = Alignment.center;
late int index;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
index = Provider.of<MessageMetadata>(context, listen: false).messageID;
_controller = AnimationController(vsync: this); _controller = AnimationController(vsync: this);
_controller.addListener(() { _controller.addListener(() {
setState(() { setState(() {
@ -45,9 +41,7 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
@override @override
void dispose() { void dispose() {
if (_controller != null) { _controller.dispose();
_controller.dispose();
}
super.dispose(); super.dispose();
} }
@ -56,7 +50,7 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
var fromMe = Provider.of<MessageMetadata>(context).senderHandle == Provider.of<ProfileInfoState>(context).onion; var fromMe = Provider.of<MessageMetadata>(context).senderHandle == Provider.of<ProfileInfoState>(context).onion;
var isContact = Provider.of<ProfileInfoState>(context).contactList.findContact(Provider.of<MessageMetadata>(context).senderHandle) != null; var isContact = Provider.of<ProfileInfoState>(context).contactList.findContact(Provider.of<MessageMetadata>(context).senderHandle) != null;
var isBlocked = isContact ? Provider.of<ProfileInfoState>(context).contactList.findContact(Provider.of<MessageMetadata>(context).senderHandle)!.isBlocked : false; var isBlocked = isContact ? Provider.of<ProfileInfoState>(context).contactList.findContact(Provider.of<MessageMetadata>(context).senderHandle)!.isBlocked : false;
var actualMessage = Flexible(flex: Platform.isAndroid ? 10 : 3, fit: FlexFit.loose, child: widget.child); var actualMessage = Flexible(flex: 3, fit: FlexFit.loose, child: widget.child);
_dragAffinity = fromMe ? Alignment.centerRight : Alignment.centerLeft; _dragAffinity = fromMe ? Alignment.centerRight : Alignment.centerLeft;
@ -74,22 +68,19 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
} }
} }
Widget wdgIcons = Platform.isAndroid Widget wdgIcons = Visibility(
? SizedBox.shrink() visible: Provider.of<AppState>(context).hoveredIndex == Provider.of<MessageMetadata>(context).messageIndex,
: Visibility( maintainSize: true,
visible: Provider.of<AppState>(context).hoveredIndex == Provider.of<MessageMetadata>(context).messageID, maintainAnimation: true,
maintainSize: true, maintainState: true,
maintainAnimation: true, maintainInteractivity: false,
maintainState: true, child: IconButton(
maintainInteractivity: false, tooltip: AppLocalizations.of(context)!.tooltipReplyToThisMessage,
child: IconButton( onPressed: () {
tooltip: AppLocalizations.of(context)!.tooltipReplyToThisMessage, Provider.of<AppState>(context, listen: false).selectedIndex = Provider.of<MessageMetadata>(context, listen: false).messageID;
onPressed: () { },
Provider.of<AppState>(context, listen: false).selectedIndex = Provider.of<MessageMetadata>(context, listen: false).messageID; icon: Icon(Icons.reply, color: Provider.of<Settings>(context).theme.dropShadowColor())));
}, Widget wdgSpacer = Flexible(child: SizedBox(width: 60, height: 10));
icon: Icon(Icons.reply, color: Provider.of<Settings>(context).theme.dropShadowColor)));
Widget wdgSpacer = Flexible(flex: 1, child: SizedBox(width: Platform.isAndroid ? 20 : 60, height: 10));
var widgetRow = <Widget>[]; var widgetRow = <Widget>[];
if (fromMe) { if (fromMe) {
@ -99,7 +90,7 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
actualMessage, actualMessage,
]; ];
} else if (isBlocked && !showBlockedMessage) { } else if (isBlocked && !showBlockedMessage) {
Color blockedMessageBackground = Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor; Color blockedMessageBackground = Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor();
Widget wdgPortrait = Padding(padding: EdgeInsets.all(4.0), child: Icon(CwtchIcons.account_blocked)); Widget wdgPortrait = Padding(padding: EdgeInsets.all(4.0), child: Icon(CwtchIcons.account_blocked));
widgetRow = <Widget>[ widgetRow = <Widget>[
wdgPortrait, wdgPortrait,
@ -121,7 +112,7 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
AppLocalizations.of(context)!.blockedMessageMessage, AppLocalizations.of(context)!.blockedMessageMessage,
//key: Key(myKey), //key: Key(myKey),
style: TextStyle( style: TextStyle(
color: Provider.of<Settings>(context).theme.messageFromOtherTextColor, color: Provider.of<Settings>(context).theme.messageFromOtherTextColor(),
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
textWidthBasis: TextWidthBasis.longestLine, textWidthBasis: TextWidthBasis.longestLine,
@ -155,9 +146,8 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
diameter: 48.0, diameter: 48.0,
imagePath: Provider.of<MessageMetadata>(context).senderImage ?? contact.imagePath, imagePath: Provider.of<MessageMetadata>(context).senderImage ?? contact.imagePath,
//maskOut: contact.status != "Authenticated", //maskOut: contact.status != "Authenticated",
border: contact.status == "Authenticated" ? Provider.of<Settings>(context).theme.portraitOnlineBorderColor : Provider.of<Settings>(context).theme.portraitOfflineBorderColor, border: contact.status == "Authenticated" ? Provider.of<Settings>(context).theme.portraitOnlineBorderColor() : Provider.of<Settings>(context).theme.portraitOfflineBorderColor(),
badgeTextColor: Colors.red, badgeTextColor: Colors.red, badgeColor: Colors.red,
badgeColor: Colors.red,
tooltip: isContact ? AppLocalizations.of(context)!.contactGoto.replaceFirst("%1", senderDisplayStr) : AppLocalizations.of(context)!.addContact, tooltip: isContact ? AppLocalizations.of(context)!.contactGoto.replaceFirst("%1", senderDisplayStr) : AppLocalizations.of(context)!.addContact,
))); )));
@ -173,7 +163,7 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
// For desktop... // For desktop...
onHover: (event) { onHover: (event) {
setState(() { setState(() {
Provider.of<AppState>(context, listen: false).hoveredIndex = Provider.of<MessageMetadata>(context, listen: false).messageID; Provider.of<AppState>(context, listen: false).hoveredIndex = Provider.of<MessageMetadata>(context, listen: false).messageIndex;
}); });
}, },
onExit: (event) { onExit: (event) {
@ -208,9 +198,7 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
children: widgetRow, children: widgetRow,
))))); )))));
var mark = Provider.of<ContactInfoState>(context).newMarker; var mark = Provider.of<ContactInfoState>(context).newMarker;
if (mark > 0 && if (mark > 0 && mark == Provider.of<MessageMetadata>(context).messageIndex + 1) {
Provider.of<ContactInfoState>(context).messageCache.length > mark &&
Provider.of<ContactInfoState>(context).messageCache[mark - 1]?.metadata.messageID == Provider.of<MessageMetadata>(context).messageID) {
return Column(crossAxisAlignment: fromMe ? CrossAxisAlignment.end : CrossAxisAlignment.start, children: [Align(alignment: Alignment.center, child: _bubbleNew()), mr]); return Column(crossAxisAlignment: fromMe ? CrossAxisAlignment.end : CrossAxisAlignment.start, children: [Align(alignment: Alignment.center, child: _bubbleNew()), mr]);
} else { } else {
return mr; return mr;
@ -220,8 +208,8 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
Widget _bubbleNew() { Widget _bubbleNew() {
return Container( return Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: Provider.of<Settings>(context).theme.messageFromMeBackgroundColor, color: Provider.of<Settings>(context).theme.messageFromMeBackgroundColor(),
border: Border.all(color: Provider.of<Settings>(context).theme.messageFromMeBackgroundColor, width: 1), border: Border.all(color: Provider.of<Settings>(context).theme.messageFromMeBackgroundColor(), width: 1),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(8), topLeft: Radius.circular(8),
topRight: Radius.circular(8), topRight: Radius.circular(8),
@ -257,17 +245,12 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
} }
void _btnGoto() { void _btnGoto() {
var id = Provider.of<ProfileInfoState>(context, listen: false).contactList.findContact(Provider.of<MessageMetadata>(context, listen: false).senderHandle)?.identifier; selectConversation(context, Provider.of<MessageMetadata>(context, listen: false).conversationIdentifier);
if (id == null) {
// Can't happen
} else {
selectConversation(context, id);
}
} }
void _btnAdd() { void _btnAdd() {
var sender = Provider.of<MessageMetadata>(context, listen: false).senderHandle; var sender = Provider.of<MessageMetadata>(context, listen: false).senderHandle;
if (sender == "") { if (sender == null || sender == "") {
print("sender not yet loaded"); print("sender not yet loaded");
return; return;
} }

View File

@ -53,21 +53,21 @@ class _CwtchTextFieldState extends State<CwtchPasswordField> {
}, },
icon: Icon((obscureText ? CwtchIcons.eye_closed : CwtchIcons.eye_open), semanticLabel: label), icon: Icon((obscureText ? CwtchIcons.eye_closed : CwtchIcons.eye_open), semanticLabel: label),
tooltip: label, tooltip: label,
color: theme.current().mainTextColor, color: theme.current().mainTextColor(),
highlightColor: theme.current().defaultButtonColor, highlightColor: theme.current().defaultButtonColor(),
focusColor: theme.current().defaultButtonActiveColor, focusColor: theme.current().defaultButtonActiveColor(),
splashColor: theme.current().defaultButtonActiveColor, splashColor: theme.current().defaultButtonActiveColor(),
), ),
errorStyle: TextStyle( errorStyle: TextStyle(
color: theme.current().textfieldErrorColor, color: theme.current().textfieldErrorColor(),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 3.0)), focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor(), width: 3.0)),
focusedErrorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.0)), focusedErrorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor(), width: 3.0)),
errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.0)), errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor(), width: 3.0)),
filled: true, filled: true,
fillColor: theme.current().textfieldBackgroundColor, fillColor: theme.current().textfieldBackgroundColor(),
enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 3.0)), enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor(), width: 3.0)),
), ),
); );
}); });

View File

@ -1,5 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cwtch/themes/opaque.dart'; import 'package:cwtch/opaque.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../settings.dart'; import '../settings.dart';
@ -28,11 +28,11 @@ class _ProfileImageState extends State<ProfileImage> {
filterQuality: FilterQuality.medium, filterQuality: FilterQuality.medium,
// We need some theme specific blending here...we might want to consider making this a theme level attribute // We need some theme specific blending here...we might want to consider making this a theme level attribute
colorBlendMode: !widget.maskOut colorBlendMode: !widget.maskOut
? Provider.of<Settings>(context).theme.mode == mode_dark ? Provider.of<Settings>(context).theme.identifier() == "dark"
? BlendMode.softLight ? BlendMode.softLight
: BlendMode.darken : BlendMode.darken
: BlendMode.srcOut, : BlendMode.srcOut,
color: Provider.of<Settings>(context).theme.portraitBackgroundColor, color: Provider.of<Settings>(context).theme.backgroundHilightElementColor(),
isAntiAlias: true, isAntiAlias: true,
width: widget.diameter, width: widget.diameter,
height: widget.diameter, height: widget.diameter,

View File

@ -32,11 +32,11 @@ class _ProfileRowState extends State<ProfileRow> {
padding: const EdgeInsets.all(6.0), //border size padding: const EdgeInsets.all(6.0), //border size
child: ProfileImage( child: ProfileImage(
badgeCount: 0, badgeCount: 0,
badgeColor: Provider.of<Settings>(context).theme.portraitProfileBadgeColor, badgeColor: Provider.of<Settings>(context).theme.portraitProfileBadgeColor(),
badgeTextColor: Provider.of<Settings>(context).theme.portraitProfileBadgeTextColor, badgeTextColor: Provider.of<Settings>(context).theme.portraitProfileBadgeTextColor(),
diameter: 64.0, diameter: 64.0,
imagePath: profile.imagePath, imagePath: profile.imagePath,
border: profile.isOnline ? Provider.of<Settings>(context).theme.portraitOnlineBorderColor : Provider.of<Settings>(context).theme.portraitOfflineBorderColor)), border: profile.isOnline ? Provider.of<Settings>(context).theme.portraitOnlineBorderColor() : Provider.of<Settings>(context).theme.portraitOfflineBorderColor())),
Expanded( Expanded(
child: Column( child: Column(
children: [ children: [
@ -60,7 +60,7 @@ class _ProfileRowState extends State<ProfileRow> {
IconButton( IconButton(
enableFeedback: true, enableFeedback: true,
tooltip: AppLocalizations.of(context)!.editProfile + " " + profile.nickname, tooltip: AppLocalizations.of(context)!.editProfile + " " + profile.nickname,
icon: Icon(Icons.create, color: Provider.of<Settings>(context).current().mainTextColor), icon: Icon(Icons.create, color: Provider.of<Settings>(context).current().mainTextColor()),
onPressed: () { onPressed: () {
_pushEditProfile(onion: profile.onion, displayName: profile.nickname, profileImage: profile.imagePath, encrypted: profile.isEncrypted); _pushEditProfile(onion: profile.onion, displayName: profile.nickname, profileImage: profile.imagePath, encrypted: profile.isEncrypted);
}, },
@ -102,7 +102,7 @@ class _ProfileRowState extends State<ProfileRow> {
} }
void _pushEditProfile({onion: "", displayName: "", profileImage: "", encrypted: true}) { void _pushEditProfile({onion: "", displayName: "", profileImage: "", encrypted: true}) {
Provider.of<ErrorHandler>(context, listen: false).reset(); Provider.of<ErrorHandler>(context).reset();
Navigator.of(context).push(MaterialPageRoute<void>( Navigator.of(context).push(MaterialPageRoute<void>(
builder: (BuildContext context) { builder: (BuildContext context) {
return MultiProvider( return MultiProvider(

View File

@ -42,13 +42,13 @@ class QuotedMessageBubbleState extends State<QuotedMessageBubble> {
} }
} }
var wdgSender = SelectableText(senderDisplayStr, var wdgSender = SelectableText(senderDisplayStr,
style: TextStyle(fontSize: 9.0, color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeTextColor : Provider.of<Settings>(context).theme.messageFromOtherTextColor)); style: TextStyle(fontSize: 9.0, color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeTextColor() : Provider.of<Settings>(context).theme.messageFromOtherTextColor()));
var wdgMessage = SelectableText( var wdgMessage = SelectableText(
widget.body + '\u202F', widget.body + '\u202F',
focusNode: _focus, focusNode: _focus,
style: TextStyle( style: TextStyle(
color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeTextColor : Provider.of<Settings>(context).theme.messageFromOtherTextColor, color: fromMe ? Provider.of<Settings>(context).theme.messageFromMeTextColor() : Provider.of<Settings>(context).theme.messageFromOtherTextColor(),
), ),
textAlign: TextAlign.left, textAlign: TextAlign.left,
textWidthBasis: TextWidthBasis.longestLine, textWidthBasis: TextWidthBasis.longestLine,
@ -61,11 +61,11 @@ class QuotedMessageBubbleState extends State<QuotedMessageBubble> {
try { try {
var qMessage = (snapshot.data! as Message); var qMessage = (snapshot.data! as Message);
// Swap the background color for quoted tweets.. // Swap the background color for quoted tweets..
var qTextColor = fromMe ? Provider.of<Settings>(context).theme.messageFromOtherTextColor : Provider.of<Settings>(context).theme.messageFromMeTextColor; var qTextColor = fromMe ? Provider.of<Settings>(context).theme.messageFromOtherTextColor() : Provider.of<Settings>(context).theme.messageFromMeTextColor();
return Container( return Container(
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
padding: EdgeInsets.all(5), padding: EdgeInsets.all(5),
color: fromMe ? Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor : Provider.of<Settings>(context).theme.messageFromMeBackgroundColor, color: fromMe ? Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor() : Provider.of<Settings>(context).theme.messageFromMeBackgroundColor(),
child: Wrap(runAlignment: WrapAlignment.spaceEvenly, alignment: WrapAlignment.spaceEvenly, runSpacing: 1.0, crossAxisAlignment: WrapCrossAlignment.center, children: [ child: Wrap(runAlignment: WrapAlignment.spaceEvenly, alignment: WrapAlignment.spaceEvenly, runSpacing: 1.0, crossAxisAlignment: WrapCrossAlignment.center, children: [
Center(widthFactor: 1, child: Padding(padding: EdgeInsets.all(10.0), child: Icon(Icons.reply, size: 32, color: qTextColor))), Center(widthFactor: 1, child: Padding(padding: EdgeInsets.all(10.0), child: Icon(Icons.reply, size: 32, color: qTextColor))),
Center(widthFactor: 1.0, child: DefaultTextStyle(child: qMessage.getPreviewWidget(context), style: TextStyle(color: qTextColor))) Center(widthFactor: 1.0, child: DefaultTextStyle(child: qMessage.getPreviewWidget(context), style: TextStyle(color: qTextColor)))
@ -90,11 +90,13 @@ class QuotedMessageBubbleState extends State<QuotedMessageBubble> {
child: Container( child: Container(
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: error ? malformedColor : (fromMe ? Provider.of<Settings>(context).theme.messageFromMeBackgroundColor : Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor), color: error
? malformedColor
: (fromMe ? Provider.of<Settings>(context).theme.messageFromMeBackgroundColor() : Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor()),
border: Border.all( border: Border.all(
color: error color: error
? malformedColor ? malformedColor
: (fromMe ? Provider.of<Settings>(context).theme.messageFromMeBackgroundColor : Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor), : (fromMe ? Provider.of<Settings>(context).theme.messageFromMeBackgroundColor() : Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor()),
width: 1), width: 1),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(borderRadiousEh), topLeft: Radius.circular(borderRadiousEh),

View File

@ -1,74 +0,0 @@
import 'package:cwtch/main.dart';
import 'package:cwtch/models/profileservers.dart';
import 'package:cwtch/models/servers.dart';
import 'package:cwtch/views/addeditservers.dart';
import 'package:cwtch/views/remoteserverview.dart';
import 'package:cwtch/widgets/profileimage.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:provider/provider.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../cwtch_icons_icons.dart';
import '../errorHandler.dart';
import '../model.dart';
import '../settings.dart';
class RemoteServerRow extends StatefulWidget {
@override
_RemoteServerRowState createState() => _RemoteServerRowState();
}
class _RemoteServerRowState extends State<RemoteServerRow> {
@override
Widget build(BuildContext context) {
var server = Provider.of<RemoteServerInfoState>(context);
var description = server.description.isNotEmpty ? server.description : server.onion;
var running = server.status == "Synced";
return Consumer<ProfileInfoState>(builder: (context, profile, child) {
return Card(
clipBehavior: Clip.antiAlias,
margin: EdgeInsets.all(0.0),
child: InkWell(
child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
Padding(
padding: const EdgeInsets.all(6.0), //border size
child: Icon(CwtchIcons.dns_24px,
color: running ? Provider.of<Settings>(context).theme.portraitOnlineBorderColor : Provider.of<Settings>(context).theme.portraitOfflineBorderColor, size: 64)),
Expanded(
child: Column(
children: [
Text(
description,
semanticsLabel: description,
style: Provider.of<FlwtchState>(context)
.biggerFont
.apply(color: running ? Provider.of<Settings>(context).theme.portraitOnlineBorderColor : Provider.of<Settings>(context).theme.portraitOfflineBorderColor),
softWrap: true,
overflow: TextOverflow.ellipsis,
),
Visibility(
visible: !Provider.of<Settings>(context).streamerMode,
child: ExcludeSemantics(
child: Text(
server.onion,
softWrap: true,
overflow: TextOverflow.ellipsis,
style: TextStyle(color: running ? Provider.of<Settings>(context).theme.portraitOnlineBorderColor : Provider.of<Settings>(context).theme.portraitOfflineBorderColor),
)))
],
)),
]),
onTap: () {
Navigator.of(context).push(MaterialPageRoute<void>(
settings: RouteSettings(name: "remoteserverview"),
builder: (BuildContext context) {
return MultiProvider(
providers: [Provider.value(value: profile), ChangeNotifierProvider(create: (context) => server), Provider.value(value: Provider.of<FlwtchState>(context))],
child: RemoteServerView(),
);
}));
}));
});
}
}

View File

@ -0,0 +1,26 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
// From https://github.com/flutter/flutter/issues/75675#issuecomment-846601115
// necessary to fix bug in flutter engine on Windows.
// todo: hopefully we can remove this soon
class ShiftRightFixer extends StatefulWidget {
ShiftRightFixer({required this.child});
final Widget child;
@override
State<StatefulWidget> createState() => _ShiftRightFixerState();
}
class _ShiftRightFixerState extends State<ShiftRightFixer> {
final FocusNode focus = FocusNode(skipTraversal: true, canRequestFocus: false);
@override
Widget build(BuildContext context) {
return Focus(
focusNode: focus,
onKey: (_, RawKeyEvent event) {
return event.physicalKey == PhysicalKeyboardKey.shiftRight ? KeyEventResult.handled : KeyEventResult.ignored;
},
child: widget.child,
);
}
}

View File

@ -26,57 +26,54 @@ class _ServerRowState extends State<ServerRow> {
margin: EdgeInsets.all(0.0), margin: EdgeInsets.all(0.0),
child: InkWell( child: InkWell(
child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ child: Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
Padding( Padding(
padding: const EdgeInsets.all(6.0), //border size padding: const EdgeInsets.all(6.0), //border size
child: Icon(CwtchIcons.dns_24px, child: Icon(CwtchIcons.dns_24px,
color: server.running ? Provider.of<Settings>(context).theme.portraitOnlineBorderColor : Provider.of<Settings>(context).theme.portraitOfflineBorderColor, size: 64)), color: server.running ? Provider.of<Settings>(context).theme.portraitOnlineBorderColor() : Provider.of<Settings>(context).theme.portraitOfflineBorderColor(), size: 64)),
Expanded( Expanded(
child: Column( child: Column(
children: [ children: [
Text( Text(
server.description, server.description,
semanticsLabel: server.description, semanticsLabel: server.description,
style: Provider.of<FlwtchState>(context) style: Provider.of<FlwtchState>(context)
.biggerFont .biggerFont
.apply(color: server.running ? Provider.of<Settings>(context).theme.portraitOnlineBorderColor : Provider.of<Settings>(context).theme.portraitOfflineBorderColor), .apply(color: server.running ? Provider.of<Settings>(context).theme.portraitOnlineBorderColor() : Provider.of<Settings>(context).theme.portraitOfflineBorderColor()),
softWrap: true,
overflow: TextOverflow.ellipsis,
),
Visibility(
visible: !Provider.of<Settings>(context).streamerMode,
child: ExcludeSemantics(
child: Text(
server.onion,
softWrap: true, softWrap: true,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), style: TextStyle(color: server.running ? Provider.of<Settings>(context).theme.portraitOnlineBorderColor() : Provider.of<Settings>(context).theme.portraitOfflineBorderColor()),
Visibility( )))
visible: !Provider.of<Settings>(context).streamerMode, ],
child: ExcludeSemantics( )),
child: Text(
server.onion,
softWrap: true,
overflow: TextOverflow.ellipsis,
style: TextStyle(color: server.running ? Provider.of<Settings>(context).theme.portraitOnlineBorderColor : Provider.of<Settings>(context).theme.portraitOfflineBorderColor),
)))
],
)),
// Copy server button // Copy server button
IconButton( IconButton(
enableFeedback: true, enableFeedback: true,
tooltip: AppLocalizations.of(context)!.copyServerKeys, tooltip: AppLocalizations.of(context)!.copyServerKeys,
icon: Icon(CwtchIcons.address_copy_2, color: Provider.of<Settings>(context).current().mainTextColor), icon: Icon(CwtchIcons.address_copy_2, color: Provider.of<Settings>(context).current().mainTextColor()),
onPressed: () { onPressed: () {
Clipboard.setData(new ClipboardData(text: server.serverBundle)); Clipboard.setData(new ClipboardData(text: server.serverBundle));
}, },
), ),
// Edit button // Edit button
IconButton( IconButton(
enableFeedback: true, enableFeedback: true,
tooltip: AppLocalizations.of(context)!.editServerTitle, tooltip: AppLocalizations.of(context)!.editServerTitle,
icon: Icon(Icons.create, color: Provider.of<Settings>(context).current().mainTextColor), icon: Icon(Icons.create, color: Provider.of<Settings>(context).current().mainTextColor()),
onPressed: () { onPressed: () {
_pushEditServer(server);
},
)
]),
onTap: () {
_pushEditServer(server); _pushEditServer(server);
})); },
)
])));
} }
void _pushEditServer(ServerInfoState server) { void _pushEditServer(ServerInfoState server) {

View File

@ -7,9 +7,9 @@ doNothing(String x) {}
// Provides a styled Text Field for use in Form Widgets. // Provides a styled Text Field for use in Form Widgets.
// Callers must provide a text controller, label helper text and a validator. // Callers must provide a text controller, label helper text and a validator.
class CwtchTextField extends StatefulWidget { class CwtchTextField extends StatefulWidget {
CwtchTextField({required this.controller, required this.hintText, this.validator, this.autofocus = false, this.onChanged = doNothing}); CwtchTextField({required this.controller, required this.labelText, this.validator, this.autofocus = false, this.onChanged = doNothing});
final TextEditingController controller; final TextEditingController controller;
final String hintText; final String labelText;
final FormFieldValidator? validator; final FormFieldValidator? validator;
final Function(String) onChanged; final Function(String) onChanged;
final bool autofocus; final bool autofocus;
@ -42,19 +42,20 @@ class _CwtchTextFieldState extends State<CwtchTextField> {
enableIMEPersonalizedLearning: false, enableIMEPersonalizedLearning: false,
focusNode: _focusNode, focusNode: _focusNode,
decoration: InputDecoration( decoration: InputDecoration(
hintText: widget.hintText, labelText: widget.labelText,
labelStyle: TextStyle(color: theme.current().mainTextColor(), backgroundColor: theme.current().textfieldBackgroundColor()),
floatingLabelBehavior: FloatingLabelBehavior.never, floatingLabelBehavior: FloatingLabelBehavior.never,
filled: true, filled: true,
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 3.0)), focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor(), width: 3.0)),
focusedErrorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.0)), focusedErrorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor(), width: 3.0)),
errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor, width: 3.0)), errorBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldErrorColor(), width: 3.0)),
errorStyle: TextStyle( errorStyle: TextStyle(
color: theme.current().textfieldErrorColor, color: theme.current().textfieldErrorColor(),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
fillColor: theme.current().textfieldBackgroundColor, fillColor: theme.current().textfieldBackgroundColor(),
contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0),
enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor, width: 3.0))), enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(15.0), borderSide: BorderSide(color: theme.current().textfieldBorderColor(), width: 3.0))),
); );
}); });
} }

View File

@ -19,7 +19,7 @@ class _TorIconState extends State<TorIcon> {
return RepaintBoundary( return RepaintBoundary(
child: Icon( child: Icon(
Provider.of<TorStatus>(context).progress == 0 ? CwtchIcons.onion_off : (Provider.of<TorStatus>(context).progress == 100 ? CwtchIcons.onion_on : CwtchIcons.onion_waiting), Provider.of<TorStatus>(context).progress == 0 ? CwtchIcons.onion_off : (Provider.of<TorStatus>(context).progress == 100 ? CwtchIcons.onion_on : CwtchIcons.onion_waiting),
color: Provider.of<Settings>(context).theme.mainTextColor, color: Provider.of<Settings>(context).theme.mainTextColor(),
semanticLabel: Provider.of<TorStatus>(context).progress == 100 semanticLabel: Provider.of<TorStatus>(context).progress == 100
? AppLocalizations.of(context)!.networkStatusOnline ? AppLocalizations.of(context)!.networkStatusOnline
: (Provider.of<TorStatus>(context).progress == 0 ? AppLocalizations.of(context)!.networkStatusDisconnected : AppLocalizations.of(context)!.networkStatusAttemptingTor), : (Provider.of<TorStatus>(context).progress == 0 ? AppLocalizations.of(context)!.networkStatusDisconnected : AppLocalizations.of(context)!.networkStatusAttemptingTor),

View File

@ -6,10 +6,6 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <url_launcher_linux/url_launcher_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) { void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
} }

View File

@ -3,7 +3,6 @@
# #
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
url_launcher_linux
) )
set(PLUGIN_BUNDLED_LIBRARIES) set(PLUGIN_BUNDLED_LIBRARIES)

View File

@ -473,7 +473,7 @@ packages:
name: vector_math name: vector_math
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.1.1" version: "2.1.0"
win32: win32:
dependency: transitive dependency: transitive
description: description:

View File

@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.5.0+23 version: 1.4.0+22
environment: environment:
sdk: ">=2.12.0 <3.0.0" sdk: ">=2.12.0 <3.0.0"

50
regenerate_opaque_theme.sh Executable file
View File

@ -0,0 +1,50 @@
#!/bin/bash
themes="/home/erinn/go/src/git.openprivacy.ca/openprivacy/opaque/theme"
outfile="./lib/opaque.dart"
if [ -e "$outfile" ]; then
mv "$outfile" "${outfile}.bak"
fi
echo "// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT BY HAND AS CHANGES WILL BE OVERRIDDEN." > "$outfile"
echo "// TO EDIT THE THEME, SEE https://git.openprivacy.ca/openprivacy/opaque/" >> "$outfile"
echo "// FOR HOW THIS FILE IS GENERATED, SEE ../regenerate_opaque_theme.sh" >> "$outfile"
sed 's/import QtQuick 2\.0//g' "${themes}/ThemeType.qml" | \
sed "s/QtObject ./import 'dart:ui\';\nimport 'dart:core';\nabstract class OpaqueThemeType {\n static final Color red = Color(0xFFFF0000);/g" | \
sed 's/\(property color\|var\)/Color/g' | \
sed 's/\(:\| =\) ".*"/(){return red;}/g' >> "$outfile"
echo -e "\n\n" >> "$outfile"
sed 's/ThemeType/class CwtchDark extends OpaqueThemeType/g' "${themes}/CwtchDark.qml" | \
sed 's/readonly property color \(.*\): "#\(\w*\)"/static final Color \1 = Color(0xFF\2);/g' | \
sed 's/\(\w*\): \(\w*\)/Color \1() { return \2; }/g' >> "$outfile"
echo -e "\n\n" >> "$outfile"
sed 's/ThemeType/class CwtchLight extends OpaqueThemeType/g' "${themes}/CwtchLight.qml" | \
sed 's/readonly property color \(.*\): "#\(\w*\)"/static final Color \1 = Color(0xFF\2);/g' | \
sed 's/\(\w*\): \(\w*\)/Color \1() { return \2; }/g' >> "$outfile"
echo -e "\n\n" >> "$outfile"
sed 's/\(pragma Singleton\|import QtQuick 2\.0\)//g' "${themes}/Theme.qml" | \
sed 's|//.*$||g' | \
sed 's/theme\./current./g' | \
sed 's/property color/property Color/g' | \
sed 's/readonly property Color \(.*\): \([a-zA-Z0-9._]*\)/Color \1() { return \2(); }/g' | \
#to preserve int values: #static int \1() { return \2; }/g' | \
sed 's/readonly property int \(.*\): \(.*\)/int \1() { return \2; }/g' | \
sed 's/readonly property variant \([a-zA-Z0-9._]*\): \(.*\)$/var \1 = \2;/g' | \
sed 's/color/Color/g' | \
sed 's/: \(.+\)/ = \1;/g' | \
sed 's/property ThemeType \(\w*\): \(.*\)../static final OpaqueThemeType \1 = \2();/g' | \
sed 's/final OpaqueThemeType theme = .*$/Opaque current() { return dark; }/' | \
sed 's/^.*themeScaleNew.*$/int scale = 2;\n static final String gcdOS = "linux";/g' | \
sed 's/gcd.os/gcdOS/g' | \
sed 's/return \([a-zA-Z]\+\) ;/return \1();/g' | \
sed 's/return \([a-zA-Z]\+\) + \([a-zA-Z]\+\);/return \1() + \2();/g' | \
sed 's/Item/class Opaque extends OpaqueThemeType/' | \
sed 's/current\./current()./g' >> "$outfile"

View File

@ -5,9 +5,8 @@
// gestures. You can also use WidgetTester to find child widgets in the widget // gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct. // tree, read text, and verify that the values of widget properties are correct.
import 'package:cwtch/themes/cwtch.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cwtch/themes/opaque.dart'; import 'package:cwtch/opaque.dart';
import 'package:cwtch/settings.dart'; import 'package:cwtch/settings.dart';
import 'package:cwtch/widgets/buttontextfield.dart'; import 'package:cwtch/widgets/buttontextfield.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
@ -15,8 +14,8 @@ import 'package:provider/provider.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart';
var settingsEnglishDark = Settings(Locale("en", ''), CwtchDark()); var settingsEnglishDark = Settings(Locale("en", ''), OpaqueDark());
var settingsEnglishLight = Settings(Locale("en", ''), CwtchLight()); var settingsEnglishLight = Settings(Locale("en", ''), OpaqueLight());
ChangeNotifierProvider<Settings> getSettingsEnglishDark() => ChangeNotifierProvider.value(value: settingsEnglishDark); ChangeNotifierProvider<Settings> getSettingsEnglishDark() => ChangeNotifierProvider.value(value: settingsEnglishDark);
void main() { void main() {

View File

@ -5,9 +5,8 @@
// gestures. You can also use WidgetTester to find child widgets in the widget // gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct. // tree, read text, and verify that the values of widget properties are correct.
import 'package:cwtch/themes/cwtch.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cwtch/themes/opaque.dart'; import 'package:cwtch/opaque.dart';
import 'package:cwtch/settings.dart'; import 'package:cwtch/settings.dart';
import 'package:cwtch/widgets/cwtchlabel.dart'; import 'package:cwtch/widgets/cwtchlabel.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
@ -15,8 +14,8 @@ import 'package:provider/provider.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart';
var settingsEnglishDark = Settings(Locale("en", ''), CwtchDark()); var settingsEnglishDark = Settings(Locale("en", ''), OpaqueDark());
var settingsEnglishLight = Settings(Locale("en", ''), CwtchLight()); var settingsEnglishLight = Settings(Locale("en", ''), OpaqueLight());
ChangeNotifierProvider<Settings> getSettingsEnglishDark() => ChangeNotifierProvider.value(value: settingsEnglishDark); ChangeNotifierProvider<Settings> getSettingsEnglishDark() => ChangeNotifierProvider.value(value: settingsEnglishDark);
void main() { void main() {

View File

@ -5,9 +5,8 @@
// gestures. You can also use WidgetTester to find child widgets in the widget // gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct. // tree, read text, and verify that the values of widget properties are correct.
import 'package:cwtch/themes/cwtch.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cwtch/themes/opaque.dart'; import 'package:cwtch/opaque.dart';
import 'package:cwtch/settings.dart'; import 'package:cwtch/settings.dart';
import 'package:cwtch/widgets/profileimage.dart'; import 'package:cwtch/widgets/profileimage.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
@ -15,8 +14,8 @@ import 'package:provider/provider.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart';
var settingsEnglishDark = Settings(Locale("en", ''), CwtchDark()); var settingsEnglishDark = Settings(Locale("en", ''), OpaqueDark());
var settingsEnglishLight = Settings(Locale("en", ''), CwtchLight()); var settingsEnglishLight = Settings(Locale("en", ''), OpaqueLight());
ChangeNotifierProvider<Settings> getSettingsEnglishDark() => ChangeNotifierProvider.value(value: settingsEnglishDark); ChangeNotifierProvider<Settings> getSettingsEnglishDark() => ChangeNotifierProvider.value(value: settingsEnglishDark);
String file(String slug) { String file(String slug) {
@ -34,10 +33,10 @@ void main() {
Widget testWidget = ProfileImage( Widget testWidget = ProfileImage(
imagePath: "profiles/001-centaur.png", imagePath: "profiles/001-centaur.png",
badgeTextColor: settingsEnglishDark.theme.portraitProfileBadgeTextColor, badgeTextColor: settingsEnglishDark.theme.portraitProfileBadgeTextColor(),
badgeColor: settingsEnglishDark.theme.portraitProfileBadgeColor, badgeColor: settingsEnglishDark.theme.portraitProfileBadgeColor(),
maskOut: false, maskOut: false,
border: settingsEnglishDark.theme.portraitOfflineBorderColor, border: settingsEnglishDark.theme.portraitOfflineBorderColor(),
diameter: 64.0, diameter: 64.0,
badgeCount: 10, badgeCount: 10,
); );

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -6,8 +6,7 @@
// tree, read text, and verify that the values of widget properties are correct. // tree, read text, and verify that the values of widget properties are correct.
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:cwtch/themes/opaque.dart'; import 'package:cwtch/opaque.dart';
import 'package:cwtch/themes/cwtch.dart';
import 'package:cwtch/settings.dart'; import 'package:cwtch/settings.dart';
import 'package:cwtch/widgets/textfield.dart'; import 'package:cwtch/widgets/textfield.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
@ -15,8 +14,8 @@ import 'package:provider/provider.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart';
var settingsEnglishDark = Settings(Locale("en", ''), CwtchDark()); var settingsEnglishDark = Settings(Locale("en", ''), OpaqueDark());
var settingsEnglishLight = Settings(Locale("en", ''), CwtchLight()); var settingsEnglishLight = Settings(Locale("en", ''), OpaqueLight());
ChangeNotifierProvider<Settings> getSettingsEnglishDark() => ChangeNotifierProvider.value(value: settingsEnglishDark); ChangeNotifierProvider<Settings> getSettingsEnglishDark() => ChangeNotifierProvider.value(value: settingsEnglishDark);
String file(String slug) { String file(String slug) {
@ -28,7 +27,7 @@ void main() {
tester.binding.window.physicalSizeTestValue = Size(800, 300); tester.binding.window.physicalSizeTestValue = Size(800, 300);
final TextEditingController ctrlr1 = TextEditingController(); final TextEditingController ctrlr1 = TextEditingController();
Widget testWidget = CwtchTextField(controller: ctrlr1, validator: (value) { }, hintText: '',); Widget testWidget = CwtchTextField(controller: ctrlr1, validator: (value) { }, labelText: '',);
Widget testHarness = MultiProvider( Widget testHarness = MultiProvider(
providers:[getSettingsEnglishDark()], providers:[getSettingsEnglishDark()],
@ -70,7 +69,7 @@ void main() {
Widget testWidget = CwtchTextField( Widget testWidget = CwtchTextField(
controller: ctrlr1, controller: ctrlr1,
hintText: strLabel1, labelText: strLabel1,
validator: (value) { validator: (value) {
if (value == null || value == "") return strFail1; if (value == null || value == "") return strFail1;
final number = num.tryParse(value); final number = num.tryParse(value);

View File

@ -6,9 +6,6 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <url_launcher_windows/url_launcher_windows.h>
void RegisterPlugins(flutter::PluginRegistry* registry) { void RegisterPlugins(flutter::PluginRegistry* registry) {
UrlLauncherWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
} }

View File

@ -3,7 +3,6 @@
# #
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
url_launcher_windows
) )
set(PLUGIN_BUNDLED_LIBRARIES) set(PLUGIN_BUNDLED_LIBRARIES)

View File

@ -65,11 +65,6 @@ ShowInstDetails show
!insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH !insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH
; Languages -------------------------------- ; Languages --------------------------------
!insertmacro MUI_LANGUAGE "English" !insertmacro MUI_LANGUAGE "English"
@ -86,20 +81,12 @@ Section
FILE /r "..\..\build\windows\runner\Release\" FILE /r "..\..\build\windows\runner\Release\"
#FILESLISTEND #FILESLISTEND
CreateDirectory "$SMPROGRAMS\Cwtch"
# create a shortcut in the start menu programs directory # create a shortcut in the start menu programs directory
CreateDirectory "$SMPROGRAMS\Cwtch"
CreateShortcut "$SMPROGRAMS\Cwtch\Cwtch.lnk" "$INSTDIR\cwtch.exe" "" "$INSTDIR\cwtch.ico" CreateShortcut "$SMPROGRAMS\Cwtch\Cwtch.lnk" "$INSTDIR\cwtch.exe" "" "$INSTDIR\cwtch.ico"
;Store installation folder ;Store installation folder
WriteRegStr HKCU "Software\Cwtch" "installLocation" $INSTDIR WriteRegStr HKCU "Software\Cwtch" "installLocation" $INSTDIR
WriteUninstaller "$INSTDIR\uninstall.exe"
SectionEnd SectionEnd
Section "Uninstall"
RMDir /r /REBOOTOK "$INSTDIR"
DeleteRegKey /ifempty HKCU "Software\Cwtch\installLocation"
SectionEnd