Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate J-Server: Prevent creating new accounts and add info to switch to K-Server #51

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions app/src/main/java/eu/darken/octi/sync/ui/add/SyncAddVM.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) }
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/sync_actions_jserver_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
<com.google.android.material.button.MaterialButton
android:id="@+id/link_action"
style="@style/Widget.Material3.Button.TonalButton"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/sync_jserver_link_device_action"
Expand Down
23 changes: 19 additions & 4 deletions app/src/main/res/layout/sync_list_item_jserver.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:background="?selectableItemBackground"
android:layout_height="wrap_content"
android:background="?selectableItemBackground"
android:padding="16dp">

<com.google.android.material.progressindicator.CircularProgressIndicator
Expand Down Expand Up @@ -80,20 +80,20 @@
android:id="@+id/quota_label"
style="@style/TextAppearance.Material3.LabelMedium"
android:layout_width="0dp"
android:visibility="gone"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="@string/general_quota_label"
android:visibility="gone"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/last_sync_text" />

<com.google.android.material.textview.MaterialTextView
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"
Expand All @@ -120,6 +120,21 @@
app:layout_constraintTop_toBottomOf="@id/devices_label"
tools:text="4 devices (2 unique)" />

<com.google.android.material.textview.MaterialTextView
android:id="@+id/deprecation_hint"
style="@style/TextAppearance.Material3.BodyMedium"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="8dp"
android:textColor="?colorError"
android:text="@string/sync_jserver_deprecation_hint"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/devices_text" />

<ImageView
android:id="@+id/manage_hint_icon"
android:layout_width="16dp"
Expand All @@ -142,7 +157,7 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/devices_text" />
app:layout_constraintTop_toBottomOf="@id/deprecation_hint" />


</androidx.constraintlayout.widget.ConstraintLayout>
3 changes: 2 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
<string name="sync_gdrive_add_label">Add new Google Drive</string>
<string name="sync_gdrive_add_description">Click the sign-in button below to setup Google Drive access.</string>
<string name="sync_gdrive_wipe_confirmation_desc">Reset all Octi data stored on Google Drive. Your device stays logged into Google Drive.</string>
<string name="sync_gdrive_disconnect_confirmation_desc">Log out from Google Drive and delete data from this device.</string>
<string name="sync_gdrive_disconnect_confirmation_desc">Log out from Google Drive and delete data related to this device.</string>
<string name="sync_gdrive_error_no_account_on_device">This device is not signed into any Google account.</string>

<string name="sync_jserver_type_label">J-Server</string>
Expand All @@ -143,6 +143,7 @@
<string name="sync_jserver_link_client_startcamera_action">Start camera</string>
<string name="sync_jserver_link_client_link_action">Link device</string>
<string name="sync_jserver_link_client_nfc_action">Looking for NFC host. Hold it close to the device offering to share account access.</string>
<string name="sync_jserver_deprecation_hint">Please switch to \'K-Server\'. The hardware behind \'J-Server\' will soon no longer be available.</string>

<string name="sync_kserver_type_label">K-Server</string>
<string name="sync_kserver_type_description">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.</string>
Expand Down
Loading