Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ class InternetArchiveFragment : BaseFragment(), ToolbarConfigurable {
fun newInstance() = newInstance(args = bundleWithNewSpace())
}

override fun getToolbarTitle() = "Internet Archive"
override fun getToolbarTitle() = getString(R.string.internet_archive)
override fun shouldShowBackButton() = true
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class SpaceSetupFragment : BaseFragment() {
const val RESULT_VAL_GDRIVE = "gdrive"
}

override fun getToolbarTitle() = "Select a Server"
override fun getToolbarTitle() = getString(R.string.space_setup_title)
override fun getToolbarSubtitle(): String? = null
override fun shouldShowBackButton() = true
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import android.view.View
import android.view.ViewGroup
import androidx.core.os.bundleOf
import androidx.fragment.app.setFragmentResult
import net.opendasharchive.openarchive.R
import net.opendasharchive.openarchive.databinding.FragmentSpaceSetupSuccessBinding
import net.opendasharchive.openarchive.features.core.BaseFragment
import net.opendasharchive.openarchive.features.main.MainActivity
Expand Down Expand Up @@ -60,6 +61,6 @@ class SpaceSetupSuccessFragment : BaseFragment() {
}
}

override fun getToolbarTitle() = "Setup Complete"
override fun getToolbarTitle() = getString(R.string.space_setup_success_title)
override fun shouldShowBackButton() = false
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,8 @@ class HapticManager(
}
}
}

fun clear() {
hapticFeedback = null
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private fun NumberButton(
label: String,
enabled: Boolean = true,
onClick: () -> Unit,
//hapticManager: HapticManager = koinInject()
hapticManager: HapticManager = koinInject()
) {

val interactionSource = remember { MutableInteractionSource() }
Expand Down Expand Up @@ -190,7 +190,7 @@ private fun NumberButton(
indication = null,
enabled = enabled,
onClick = {
//hapticManager.performHapticFeedback(AppHapticFeedbackType.KeyPress)
hapticManager.performHapticFeedback(AppHapticFeedbackType.KeyPress)
onClick()
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ import androidx.activity.compose.setContent
import net.opendasharchive.openarchive.R
import net.opendasharchive.openarchive.core.presentation.theme.SaveAppTheme
import net.opendasharchive.openarchive.features.core.BaseActivity
import net.opendasharchive.openarchive.features.settings.passcode.HapticManager
import net.opendasharchive.openarchive.features.settings.passcode.PasscodeRepository
import net.opendasharchive.openarchive.features.settings.passcode.components.DefaultScaffold
import org.koin.android.ext.android.inject

class PasscodeEntryActivity : BaseActivity() {

private val repository: PasscodeRepository by inject()
private val hapticManager: HapticManager by inject()

private val onBackPressedCallback = object : OnBackPressedCallback(enabled = true) {
override fun handleOnBackPressed() {
Expand Down Expand Up @@ -55,4 +57,9 @@ class PasscodeEntryActivity : BaseActivity() {
}
}
}

override fun onDestroy() {
super.onDestroy()
hapticManager.clear() // Clear the reference to prevent leaks
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ import net.opendasharchive.openarchive.R
import net.opendasharchive.openarchive.core.presentation.theme.SaveAppTheme
import net.opendasharchive.openarchive.features.core.BaseActivity
import net.opendasharchive.openarchive.features.internetarchive.presentation.login.ComposeAppBar
import net.opendasharchive.openarchive.features.settings.passcode.HapticManager
import net.opendasharchive.openarchive.features.settings.passcode.components.DefaultScaffold
import org.koin.android.ext.android.inject

class PasscodeSetupActivity : BaseActivity() {

private val hapticManager: HapticManager by inject()

companion object {
const val EXTRA_PASSCODE_ENABLED = "passcode_enabled"
}
Expand Down Expand Up @@ -70,4 +74,9 @@ class PasscodeSetupActivity : BaseActivity() {
}
return super.onOptionsItemSelected(item)
}

override fun onDestroy() {
super.onDestroy()
hapticManager.clear() // Clear the reference to prevent leaks
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.fragment.compose.content
import androidx.navigation.fragment.findNavController
import net.opendasharchive.openarchive.R
import net.opendasharchive.openarchive.core.presentation.theme.SaveAppTheme
import net.opendasharchive.openarchive.databinding.FragmentSpaceListBinding
import net.opendasharchive.openarchive.db.Space
Expand Down Expand Up @@ -49,7 +50,7 @@ class SpaceListFragment : BaseFragment() {
return binding.root
}

override fun getToolbarTitle() = "Media Servers"
override fun getToolbarTitle() = getString(R.string.pref_title_media_servers)

private fun startSpaceAuthActivity(spaceId: Long?) {
val space = Space.get(spaceId ?: return) ?: return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,5 @@ class GDriveFragment : BaseFragment() {
}
}

override fun getToolbarTitle() = "Google Drive"
override fun getToolbarTitle() = getString(R.string.gdrive)
}
49 changes: 35 additions & 14 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

<!-- Activities -->
<string name="app_name" translatable="false">Save</string>
<string name="app_subtext">Archive Your Media\n<a href="#">learn more</a></string>
<!-- <string name="app_subtext">Archive Your Media\n<a href="#">learn more</a></string>-->
<string name="app_subtext">Archive Your Media&#10;&lt;a href="#"&gt;learn more&lt;/a&gt;</string>
<string name="web_client_id">741316235729-ohg8quvto8ajl8qpil4r9rm1o3gfml3t.apps.googleusercontent.com</string>

<string name="title_activity_login">Log in</string>
Expand Down Expand Up @@ -96,7 +97,8 @@

<string name="prefs_user_interface_title">Presentation</string>
<string name="prefs_theme_title">Theme</string>
<string name="prefs_theme_summary">Change Save\'s theme to light/dark</string>
<!-- <string name="prefs_theme_summary">Change Save\'s theme to light/dark</string>-->
<string name="prefs_theme_summary">Change Save&apos;s theme to light/dark</string>
<string name="prefs_theme_system">System Controlled</string>
<string name="prefs_theme_light">Light</string>
<string name="prefs_theme_dark">Dark</string>
Expand All @@ -106,11 +108,16 @@

<string name="prefs_use_proofmode_title">Enable ProofMode</string>
<string name="prefs_use_proofmode_summary">Share ProofMode public key</string>
<!-- <string name="prefs_use_proofmode_description">-->
<!-- <![CDATA[-->
<!-- ProofMode is a system that enables authentication and verification of multimedia content, <a href="%1$s" style="text-decoration: underline;">learn more here</a>-->
<!-- ]]>-->
<!-- </string>-->
<string name="prefs_use_proofmode_description">
<![CDATA[
ProofMode is a system that enables authentication and verification of multimedia content, <a href="%1$s" style="text-decoration: underline;">learn more here</a>
]]>
ProofMode is a system that enables authentication and verification of multimedia content, &lt;a href="%1$s" style="text-decoration: underline;"&gt;learn more here&lt;/a&gt;
</string>


<string name="proof_mode_warning_text">ProofMode gathers metadata from local cell towers to help verify media. Android requires permission to enable this setting. <b>Save</b> will only use this setting to capture data and will NOT access your phone to make/manage calls.</string>

<string name="prefs_share_proofmode_title">ProofMode Identity</string>
Expand Down Expand Up @@ -232,6 +239,8 @@
<string name="unsecured_internet_connection">Detected an unsecured internet connection</string>
<string name="version__">Version %s</string>

<!-- Space Setup -->
<string name="space_setup_title">Select a Server</string>
<!-- WebDAV related strings -->
<string name="private_server">Private Server</string>
<string name="edit_private_server">Edit Private Server</string>
Expand All @@ -245,6 +254,9 @@
<!-- WebDAV setup License -->
<string name="name_your_server">Name your server and choose a license</string>

<!-- Space Setup Success -->
<string name="space_setup_success_title">Setup Complete</string>

<!-- Upload Manager Bottom Sheet -->
<string name="edit_queue">Edit Queue</string>
<string name="uploading_is_paused">Uploading is paused</string>
Expand Down Expand Up @@ -288,12 +300,17 @@
<string name="intro_text_secure">
Send your media securely to private servers and lock the app with a pin.
</string>
<!-- <string name="intro_text_archive">-->
<!-- <![CDATA[-->
<!-- Keep your media verifiable, safe and organized for the long-term by uploading it to private or public servers like Nextcloud or the Internet Archive.<br>-->
<!-- Communicate your intentions for future use by adding a <a href="%1$s" style="text-decoration: underline;">Creative Commons License</a>.-->
<!-- ]]>-->
<!-- </string>-->
<string name="intro_text_archive">
<![CDATA[
Keep your media verifiable, safe and organized for the long-term by uploading it to private or public servers like Nextcloud or the Internet Archive.<br>
Communicate your intentions for future use by adding a <a href="%1$s" style="text-decoration: underline;">Creative Commons License</a>.
]]>
Keep your media verifiable, safe and organized for the long-term by uploading it to private or public servers like Nextcloud or the Internet Archive.&lt;br&gt;
Communicate your intentions for future use by adding a &lt;a href="%1$s" style="text-decoration: underline;"&gt;Creative Commons License&lt;/a&gt;.
</string>

<string name="intro_link_archive" translatable="false">https://creativecommons.org</string>
<string name="intro_text_verify">
<![CDATA[
Expand All @@ -304,11 +321,15 @@
<string name="intro_text_encrypt_old">
Automatically upload over TLS (Transport Layer Security) and use Orbot to protect your media in transit over the Tor network.
</string>
<string name="intro_text_encrypt" translatable="false">
<![CDATA[
<b><i>Save</i></b> always uploads over TLS (Transport Layer Security) to protect your media in transit.<br>
To further enhance security, enable <a href="%1$s" style="text-decoration: underline;">Tor</a> to prevent interception of your media from your phone to the server.
]]>
<!-- <string name="intro_text_encrypt" translatable="false">-->
<!-- <![CDATA[-->
<!-- <b><i>Save</i></b> always uploads over TLS (Transport Layer Security) to protect your media in transit.<br>-->
<!-- To further enhance security, enable <a href="%1$s" style="text-decoration: underline;">Tor</a> to prevent interception of your media from your phone to the server.-->
<!-- ]]>-->
<!-- </string>-->
<string name="intro_text_encrypt">
&lt;b&gt;&lt;i&gt;Save&lt;/i&gt;&lt;/b&gt; always uploads over TLS (Transport Layer Security) to protect your media in transit.&lt;br&gt;
To further enhance security, enable &lt;a href="%1$s" style="text-decoration: underline;"&gt;Tor&lt;/a&gt; to prevent interception of your media from your phone to the server.
</string>
<string name="intro_link_encrypt" translatable="false">https://www.torproject.org</string>

Expand Down