mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-05-18 13:28:12 -04:00
Tweak app scheme to shorthand aliasvault (#1347)
This commit is contained in:
@@ -398,7 +398,7 @@ class AutofillService : AutofillService() {
|
||||
val encodedUrl = appInfo?.let { java.net.URLEncoder.encode(it, "UTF-8") } ?: ""
|
||||
|
||||
// Create deep link URL
|
||||
val deepLinkUrl = "net.aliasvault.app://credentials/add-edit-page?serviceUrl=$encodedUrl"
|
||||
val deepLinkUrl = "aliasvault://credentials/add-edit-page?serviceUrl=$encodedUrl"
|
||||
|
||||
// Add a click listener to open AliasVault app with deep link
|
||||
val intent = Intent(Intent.ACTION_VIEW).apply {
|
||||
@@ -477,7 +477,7 @@ class AutofillService : AutofillService() {
|
||||
val dataSetBuilder = Dataset.Builder(presentation)
|
||||
|
||||
// Create deep link URL
|
||||
val deepLinkUrl = "net.aliasvault.app://reinitialize"
|
||||
val deepLinkUrl = "aliasvault://reinitialize"
|
||||
|
||||
// Add a click listener to open AliasVault app with deep link
|
||||
val intent = Intent(Intent.ACTION_VIEW).apply {
|
||||
@@ -526,7 +526,7 @@ class AutofillService : AutofillService() {
|
||||
val encodedUrl = appInfo?.let { java.net.URLEncoder.encode(it, "UTF-8") } ?: ""
|
||||
|
||||
// Create deep link URL to credentials page with service URL
|
||||
val deepLinkUrl = "net.aliasvault.app://credentials?serviceUrl=$encodedUrl"
|
||||
val deepLinkUrl = "aliasvault://credentials?serviceUrl=$encodedUrl"
|
||||
|
||||
// Add a click listener to open AliasVault app with deep link
|
||||
val intent = Intent(Intent.ACTION_VIEW).apply {
|
||||
@@ -569,7 +569,7 @@ class AutofillService : AutofillService() {
|
||||
// Create deep link URL to open the credentials page
|
||||
val appInfo = fieldFinder.getAppInfo()
|
||||
val encodedUrl = appInfo?.let { java.net.URLEncoder.encode(it, "UTF-8") } ?: ""
|
||||
val deepLinkUrl = "net.aliasvault.app://credentials?serviceUrl=$encodedUrl"
|
||||
val deepLinkUrl = "aliasvault://credentials?serviceUrl=$encodedUrl"
|
||||
|
||||
// Add a click listener to open AliasVault app with deep link
|
||||
val intent = Intent(Intent.ACTION_VIEW).apply {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"version": "0.25.0-alpha",
|
||||
"orientation": "portrait",
|
||||
"icon": "./assets/images/icon.png",
|
||||
"scheme": ["aliasvault", "net.aliasvault.app"],
|
||||
"scheme": "aliasvault",
|
||||
"userInterfaceStyle": "automatic",
|
||||
"newArchEnabled": true,
|
||||
"platforms": [
|
||||
|
||||
@@ -103,7 +103,7 @@ public struct CredentialCard: View {
|
||||
}
|
||||
|
||||
Button(action: {
|
||||
if let url = URL(string: "net.aliasvault.app://credentials/\(credential.id.uuidString)") {
|
||||
if let url = URL(string: "aliasvault://credentials/\(credential.id.uuidString)") {
|
||||
UIApplication.shared.open(url)
|
||||
}
|
||||
}, label: {
|
||||
@@ -111,7 +111,7 @@ public struct CredentialCard: View {
|
||||
})
|
||||
|
||||
Button(action: {
|
||||
if let url = URL(string: "net.aliasvault.app://credentials/add-edit-page?id=\(credential.id.uuidString)") {
|
||||
if let url = URL(string: "aliasvault://credentials/add-edit-page?id=\(credential.id.uuidString)") {
|
||||
UIApplication.shared.open(url)
|
||||
}
|
||||
}, label: {
|
||||
|
||||
@@ -60,7 +60,7 @@ public struct CredentialProviderView: View {
|
||||
if !viewModel.isChoosingTextToInsert {
|
||||
VStack(spacing: 12) {
|
||||
Button(action: {
|
||||
var urlString = "net.aliasvault.app://credentials/add-edit-page"
|
||||
var urlString = "aliasvault://credentials/add-edit-page"
|
||||
if let serviceUrl = viewModel.serviceUrl {
|
||||
let encodedUrl = serviceUrl.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) ?? ""
|
||||
urlString += "?serviceUrl=\(encodedUrl)"
|
||||
@@ -121,7 +121,7 @@ public struct CredentialProviderView: View {
|
||||
ToolbarItem(placement: .navigationBarTrailing) {
|
||||
HStack {
|
||||
Button(action: {
|
||||
var urlString = "net.aliasvault.app://credentials/add-edit-page"
|
||||
var urlString = "aliasvault://credentials/add-edit-page"
|
||||
if let serviceUrl = viewModel.serviceUrl {
|
||||
let encodedUrl = serviceUrl.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) ?? ""
|
||||
urlString += "?serviceUrl=\(encodedUrl)"
|
||||
|
||||
Reference in New Issue
Block a user