From 55682cf2165ebaab0cae2a7f62f5cf996d4479a0 Mon Sep 17 00:00:00 2001 From: darken Date: Wed, 28 Aug 2024 17:54:05 +0200 Subject: [PATCH] Deprecate J-Server: Prevent creating new accounts and add info to switch to K-Server --- .../eu/darken/octi/sync/ui/add/SyncAddVM.kt | 7 +++--- .../layout/sync_actions_jserver_fragment.xml | 1 + .../res/layout/sync_list_item_jserver.xml | 23 +++++++++++++++---- app/src/main/res/values/strings.xml | 3 ++- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/eu/darken/octi/sync/ui/add/SyncAddVM.kt b/app/src/main/java/eu/darken/octi/sync/ui/add/SyncAddVM.kt index 3cb2231a..73613a77 100644 --- a/app/src/main/java/eu/darken/octi/sync/ui/add/SyncAddVM.kt +++ b/app/src/main/java/eu/darken/octi/sync/ui/add/SyncAddVM.kt @@ -6,7 +6,6 @@ import eu.darken.octi.common.coroutine.DispatcherProvider import eu.darken.octi.common.debug.logging.logTag import eu.darken.octi.common.uix.ViewModel3 import eu.darken.octi.syncs.gdrive.ui.add.AddGDriveVH -import eu.darken.octi.syncs.jserver.ui.add.AddJServerDataVH import eu.darken.octi.syncs.kserver.ui.add.AddKServerDataVH import kotlinx.coroutines.flow.flow import javax.inject.Inject @@ -24,9 +23,9 @@ class SyncAddVM @Inject constructor( AddGDriveVH.Item { SyncAddFragmentDirections.actionSyncAddFragmentToGDriveAddFragment().navigate() }.run { items.add(this) } - AddJServerDataVH.Item { - SyncAddFragmentDirections.actionSyncAddFragmentToAddJServerFragment().navigate() - }.run { items.add(this) } +// AddJServerDataVH.Item { +// SyncAddFragmentDirections.actionSyncAddFragmentToAddJServerFragment().navigate() +// }.run { items.add(this) } AddKServerDataVH.Item { SyncAddFragmentDirections.actionSyncAddFragmentToAddKServerFragment().navigate() }.run { items.add(this) } diff --git a/app/src/main/res/layout/sync_actions_jserver_fragment.xml b/app/src/main/res/layout/sync_actions_jserver_fragment.xml index 34467e18..73751e5c 100644 --- a/app/src/main/res/layout/sync_actions_jserver_fragment.xml +++ b/app/src/main/res/layout/sync_actions_jserver_fragment.xml @@ -52,6 +52,7 @@ @@ -91,9 +91,9 @@ android:id="@+id/quota_text" style="@style/TextAppearance.Material3.BodyMedium" android:layout_width="0dp" - android:visibility="gone" android:layout_height="wrap_content" android:layout_marginEnd="16dp" + android:visibility="gone" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/quota_label" @@ -120,6 +120,21 @@ app:layout_constraintTop_toBottomOf="@id/devices_label" tools:text="4 devices (2 unique)" /> + + + app:layout_constraintTop_toBottomOf="@id/deprecation_hint" /> \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 266fdc22..7159c224 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -116,7 +116,7 @@ Add new Google Drive Click the sign-in button below to setup Google Drive access. Reset all Octi data stored on Google Drive. Your device stays logged into Google Drive. - Log out from Google Drive and delete data from this device. + Log out from Google Drive and delete data related to this device. This device is not signed into any Google account. J-Server @@ -143,6 +143,7 @@ Start camera Link device Looking for NFC host. Hold it close to the device offering to share account access. + Please switch to \'K-Server\'. The hardware behind \'J-Server\' will soon no longer be available. K-Server A open-source sync server for Octi made by this app\'s developer. Data is encrypted client-side, only your devices can decrypt it.\n\nAs both the app and the server are still being improved, it may be less stable than other sync options.