ShareShortcuts

App Locker

This shortcut allows you to add another layer of security on your apps

quackimpala7321
Bifurcar “App Locker”

¿Creaste algo nuevo a partir de este atajo? Compártelo como bifurcación: se convierte en un atajo tuyo, que tú administras, y ambas páginas se enlazan entre sí para que quackimpala7321 reciba el crédito.

  1. 1Obtén el atajo y modifícalo en la app Atajos. Ponle un nombre propio.
  2. 2Compártelo desde la app Atajos y copia el enlace de iCloud.
  3. 3Vuelve aquí, pega el enlace y describe qué es diferente, p. ej., “Se añadió un paso que usa Apple Intelligence para personalizar el texto”.
Descargas
37K
Guardado
0
Acciones
317
Categoría
Productivity
Versión
1.0
Idioma
EN

Vista previa

This shortcut allows you to add another layer of security on your apps.

READ HELP FOR INFO ON SETUP

Features

  • Able to use different passcodes for each app
  • Toggle locks
  • Change Re-lock interval

Novedades

Versión 1.0

First release

Historial de versiones
1.0 12 de dic. de 2022

First release

Qué hace

317 acciones
  1. Dictionary
  2. Set Variable
    Main Variables
  3. Get Text from Input
  4. If
  5. Text
  6. Set Variable
    fastLaunch
  7. If
  8. List
  9. Repeat with Each
  10. If
  11. Set Variable
    function
  12. Replace Text
  13. Replace Text
  14. Split Text
  15. Set Variable
    INPUT
  16. If
  17. Text
  18. Repeat with Each
  19. Set Value
    dk.simonbs.DataJar
  20. Stop This Shortcut
  21. If
  22. Text
  23. Repeat with Each
  24. Set Value
    dk.simonbs.DataJar
  25. Stop This Shortcut
  26. If
  27. Text
  28. Repeat with Each
  29. Get Value
    dk.simonbs.DataJar
  30. If
  31. Text
  32. If
  33. Text
  34. Set Value
    dk.simonbs.DataJar
  35. Stop This Shortcut
  36. Comment
    Developer Functions (**) DO NOT use these!
  37. If
  38. Get My Shortcuts
  39. Get Name
  40. Repeat with Each
  41. Get Index Of List Item
    com.sindresorhus.Actions
  42. Text
  43. If
  44. Add to Variable
  45. Stop and Output
  46. If
  47. Check If Value Exists
    dk.simonbs.DataJar
  48. If
  49. Ask for Input
    Enter New Master Password
  50. If
  51. Text
  52. If
  53. Base64 Encode
  54. Set Value
    dk.simonbs.DataJar
  55. Text
  56. Stop and Output
  57. If
  58. Get Value
    dk.simonbs.DataJar
  59. If
  60. Get Clipboard
  61. Set Variable
    prevClipboard
  62. Authenticate
    com.sindresorhus.Actions
  63. Wait to Return
  64. Hide Shortcuts
    com.sindresorhus.Actions
  65. Get Clipboard
  66. Copy to Clipboard
  67. Get Clipboard
  68. Stop and Output
  69. Base64 Encode
  70. Set Variable
    masterPasscode
  71. Ask for Input
    Enter Master Password
  72. If
  73. Text
  74. If
  75. Text
  76. Stop and Output
  77. Stop This Shortcut
  78. If
  79. Split Text
  80. Get Numbers from Input
  81. Split Text
  82. Get Numbers from Input
  83. Repeat with Each
  84. Get Item from List
  85. If
  86. Text
  87. Stop and Output
  88. Text
  89. Stop and Output
  90. Check If Value Exists
    dk.simonbs.DataJar
  91. If
  92. Number
  93. Set Value
    dk.simonbs.DataJar
  94. Get Value
    dk.simonbs.DataJar
  95. Set Variable
    waitTime
  96. If
  97. Text
  98. If
  99. If
  100. Text
  101. If
  102. Text
  103. If
  104. Get File
  105. If
  106. Dictionary
  107. Pretty Print Dictionaries
    com.sindresorhus.Actions
  108. Save File
  109. Set Variable
    lastVersion
  110. Get Variable
  111. If
  112. Get Dictionary from Input
  113. Set Variable
    lastVersion
  114. Set Dictionary Value
  115. Pretty Print Dictionaries
    com.sindresorhus.Actions
  116. Save File
  117. Get Variable
  118. Set Variable
    details
  119. If
  120. If
  121. Comment
    If you just updated
  122. Text
  123. Run Shortcut
    App Locker
  124. If
  125. Get Dictionary Value
  126. Text
  127. Run Shortcut
    App Locker
  128. If
  129. Repeat with Each
  130. Text
  131. Text
  132. Show Alert
    Other Shortcuts Required
  133. Repeat with Each
  134. Get Dictionary Value
  135. Open URLs
  136. Stop This Shortcut
  137. Choose from Menu
    App Locker v…
  138. Choose from Menu
    Toggle Locks
  139. Text
  140. Run Shortcut
    App Locker
  141. If
  142. If
  143. Text
  144. Run Shortcut
    App Locker
  145. Stop This Shortcut
  146. Get Keys
    dk.simonbs.DataJar
  147. Filter Files
  148. Set Variable
    myApps
  149. Repeat with Each
  150. Get Value
    dk.simonbs.DataJar
  151. If
  152. Text
  153. If
  154. Text
  155. Text
  156. Add to Variable
  157. Choose from List
  158. Set Variable
    choices
  159. Repeat with Each
  160. Replace Text
  161. Replace Text
  162. Add to Variable
  163. Repeat with Each
  164. Get Value
    dk.simonbs.DataJar
  165. If
  166. Text
  167. If
  168. Text
  169. Set Value
    dk.simonbs.DataJar
  170. Text
  171. Run Shortcut
    App Locker
  172. Choose from Menu
    Manage Passwords
  173. Text
  174. Run Shortcut
    App Locker
  175. If
  176. If
  177. Text
  178. Run Shortcut
    App Locker
  179. Stop This Shortcut
  180. Get Keys
    dk.simonbs.DataJar
  181. Filter Files
  182. Set Variable
    myApps
  183. Text
  184. Add To List
    com.sindresorhus.Actions
  185. Set Variable
    myApps
  186. Choose from List
  187. If
  188. Text
  189. If
  190. Text
  191. Set Variable
    path
  192. Get Value
    dk.simonbs.DataJar
  193. If
  194. Number
  195. If
  196. Base64 Encode
  197. Ask for Input
    …
  198. If
  199. Choose from Menu
    What to do with …?
  200. Choose from Menu
    Touch/Face ID

Ver como código
Beta

Todas las acciones de este atajo escritas en Cherri, un lenguaje de programación para Atajos. Ideal para aprender cómo funciona.

#include 'actions/text'
#define color darkorange
#define glyph lock

@MainVariables = {
	"Dep": {
		"Open App URL": "https://routinehub.co/shortcut/13560/"
	},
	"Name": "App Locker",
	"ShareShortcuts ID": "13384",
	"Version": "1.2.4"
}
const origText = getText(ShortcutInput)

if origText == "**FAST_LAUNCH" {
	@fastLaunch = "true"
}

if origText endsWith ")" {
	const functions = list("**askMaster", "**justUpdated", "**dependOutput", "lock", "unlock", "toggle")
	for _ in functions {
		if origText beginsWith "{@RepeatItem}(" {
			@function = @RepeatItem
		}
	}
	replaceText("{@function}(", "", origText)
	const UpdatedText = replaceText(")", "")
	splitText(UpdatedText)
	@INPUT
	if @function == "lock" {
		const Text = "true"
		for _ in @INPUT {
			rawAction("dk.simonbs.DataJar.SetValueIntent", {
				"keyPath": "AppLocker.apps.{@RepeatItem}.locked",
				"overwriteStrategy": "alwaysAllow",
				"values": "Text"
			})
		}
		stop()
	}
	if @function == "unlock" {
		const Text1 = "false"
		for _ in @INPUT {
			rawAction("dk.simonbs.DataJar.SetValueIntent", {
				"keyPath": "AppLocker.apps.{@RepeatItem}.locked",
				"overwriteStrategy": "alwaysAllow",
				"values": "Text1"
			})
		}
		stop()
	}
	if @function == "toggle" {
		const Text2 = "false"
		for _ in @INPUT {
			rawAction("dk.simonbs.DataJar.GetValueIntent", {
				"fallbackValues": "Text2",
				"keyPath": "AppLocker.apps.{@RepeatItem}.locked"
			})
			if Value ==  {
			} else {
			}
			rawAction("dk.simonbs.DataJar.SetValueIntent", {
				"keyPath": "AppLocker.apps.{@INPUT}.locked",
				"overwriteStrategy": "alwaysAllow",
				"values": "IfResult"
			})
		}
		stop()
	}
	/*
	Developer Functions (**)
	DO NOT use these!
	*/
	if @function == "**dependOutput" {
		const MyShortcuts = getShortcuts()
		const Name = getName(MyShortcuts)
		for _ in @INPUT {
			rawAction("com.sindresorhus.Actions.GetIndexOfListItem", {
				"AppIntentDescriptor": "",
				"item": "{@RepeatItem}",
				"list": "Name"
			})
			const Text3 = "-1"
			if IndexOfListItem == Text3 {
				@OUTPUT = @RepeatItem
			}
		}
		output(@OUTPUT)
	}
	if @function == "**askMaster" {
		rawAction("dk.simonbs.DataJar.CheckIfValueExistsIntent", {
			"keyPath": "AppLocker.pass"
		})
		if ValueExists == 0 {
			const ProvidedInput = prompt("Enter New Master Password", "Number")
			if ProvidedInput < 0 {
			} else {
				base64Encode(ProvidedInput)
			}
			rawAction("dk.simonbs.DataJar.SetValueIntent", {
				"keyPath": "AppLocker.pass",
				"overwriteStrategy": "alwaysAllow",
				"values": "IfResult1"
			})
			output()
		} else {
			rawAction("dk.simonbs.DataJar.GetValueIntent", {
				"keyPath": "AppLocker.pass"
			})
			if Value1 == "BIO AUTH" {
				getClipboard()
				@prevClipboard
				rawAction("com.sindresorhus.Actions.Authenticate", {
					"AppIntentDescriptor": "",
					"openURL": ""
				})
				waitToReturn()
				rawAction("com.sindresorhus.Actions.HideShortcutsAppIntent", {
					"AppIntentDescriptor": ""
				})
				const AuthResult = getClipboard()
				setClipboard(@prevClipboard, true)
				getClipboard()
				output(AuthResult)
			}
			base64Encode(Value1)
			@masterPasscode
			const ProvidedInput1 = prompt("Enter Master Password", "Number")
			if ProvidedInput1 == @masterPasscode {
			} else {
			}
			output()
		}
		stop()
	}
	if @function == "**justUpdated" {
		const SplitText = splitText(@MainVariables, ".")
		const version = getNumbers(SplitText)
		const SplitText1 = splitText(@INPUT, ".")
		const lastVersion = getNumbers(SplitText1)
		for _ in version {
			const ItemFromList = getListItem(lastVersion, @RepeatIndex)
			if @RepeatItem > ItemFromList {
				output()
			}
		}
		output()
	}
}
rawAction("dk.simonbs.DataJar.CheckIfValueExistsIntent", {
	"keyPath": "AppLocker.waitTime"
})

if ValueExists1 == 0 {
	const Number = 80
	rawAction("dk.simonbs.DataJar.SetValueIntent", {
		"keyPath": "AppLocker.waitTime",
		"overwriteStrategy": "alwaysAllow",
		"values": "Number"
	})
}
rawAction("dk.simonbs.DataJar.GetValueIntent", {
	"keyPath": "AppLocker.waitTime"
})
@waitTime

if !ShortcutInput {
} else {
	if @fastLaunch ==  {
	} else {
	}
}

if OpenMenu ==  {
	const File = getFile("Local Shortcuts/AppLocker/details.json", false)
	if !File {
		const defaultDetails = {
			"version": "{@MainVariables['Version']}"
		}
		rawAction("com.sindresorhus.Actions.PrettyPrintDictionariesIntent", {
			"AppIntentDescriptor": "",
			"dictionaries": "defaultDetails",
			"dictionary": "defaultDetails"
		})
		saveFile("Local Shortcuts/AppLocker/details.json", PrettyPrintedDictionary, true)
		@lastVersion = nil
		// TODO: Get Variable not supported: Assign variable here to 'defaultDetails'.
	} else {
		const Dictionary = getDictionary(File)
		@lastVersion = Dictionary['version']
		const Dictionary1 = setValue(Dictionary, "version", @MainVariables['Version'])
		rawAction("com.sindresorhus.Actions.PrettyPrintDictionariesIntent", {
			"AppIntentDescriptor": "",
			"dictionaries": "Dictionary",
			"dictionary": "Dictionary1"
		})
		saveFile("Local Shortcuts/AppLocker/details.json", PrettyPrintedDictionary1, true)
		// TODO: Get Variable not supported: Assign variable here to 'Dictionary1'.
	}
	@details
	if @fastLaunch ==  {
	} else {
		// If you just updated

		const Text4 = "**justUpdated({@lastVersion})"
		const ShortcutResult = runSelf(Text4)
		if ShortcutResult ==  {
		}
		const Dependencies = getKeys(@MainVariables)
		const Text5 = "**dependOutput({Dependencies})"
		const ShortcutResult1 = runSelf(Text5)
		if ShortcutResult1 {
			for _ in Dependencies {
			}
			alert(, "Other Shortcuts Required")
			for _ in ShortcutResult1 {
			}
			openURL(RepeatResults)
			stop()
		}
	}
	menu "App Locker v{@MainVariables['Version']}" {
	item "Toggle Locks":
		const Text6 = "**askMaster()"
		const ShortcutResult2 = runSelf(Text6)
		if ShortcutResult2 ==  {
		} else {
			const Text7 = "**FAST_LAUNCH"
			runSelf(Text7)
			stop()
		}
		rawAction("dk.simonbs.DataJar.GetKeysIntent", {
			"errorWhenValueNotFound": false,
			"keyPath": "AppLocker.apps",
			"source": "dictionary"
		})
		filterFiles(Keys, "Name", "A to Z")
		@myApps
		for _ in @myApps {
			rawAction("dk.simonbs.DataJar.GetValueIntent", {
				"keyPath": "AppLocker.apps.{@RepeatItem}.locked"
			})
			if Value2 ==  {
			} else {
			}
			@choices += "{} {@RepeatItem}"
		}
		const ChosenItem = chooseFromList(@choices, "Toggle which locks?", true)
		@choices = nil
		for _ in ChosenItem {
			replaceText("🔒 ", "", @RepeatItem, false, false)
			replaceText("🔓 ", "", false, false)
			@choices
		}
		for _ in @choices {
			rawAction("dk.simonbs.DataJar.GetValueIntent", {
				"keyPath": "AppLocker.apps.{@RepeatItem}.locked"
			})
			if Value3 ==  {
			} else {
			}
			rawAction("dk.simonbs.DataJar.SetValueIntent", {
				"keyPath": "AppLocker.apps.{@RepeatItem}.locked",
				"overwriteStrategy": "alwaysAllow",
				"values": "IfResult2"
			})
		}
		const Text8 = "**FAST_LAUNCH"
		runSelf(Text8)
	item "Manage Passwords":
		const Text9 = "**askMaster()"
		const ShortcutResult3 = runSelf(Text9)
		if ShortcutResult3 ==  {
		} else {
			const Text10 = "**FAST_LAUNCH"
			runSelf(Text10)
			stop()
		}
		rawAction("dk.simonbs.DataJar.GetKeysIntent", {
			"errorWhenValueNotFound": false,
			"keyPath": "AppLocker.apps",
			"source": "dictionary"
		})
		filterFiles(Keys1, "Name", "A to Z")
		@myApps
		const Text11 = "Master Passcode"
		rawAction("com.sindresorhus.Actions.AddToListIntent", {
			"AppIntentDescriptor": "",
			"item": "Text11",
			"list": "@myApps",
			"prepend": 1
		})
		@myApps
		const ChosenApp = chooseFromList(@myApps, "Manage which password?")
		if ChosenApp == "Master Passcode" {
		} else {
		}
		@path = "AppLocker.apps.{ChosenApp}"
		rawAction("dk.simonbs.DataJar.GetValueIntent", {
			"keyPath": "{@path}.pass"
		})
		if Value4 == "BIO AUTH" {
		} else {
			base64Encode(Value4)
		}
		const ProvidedInput2 = prompt(ChosenApp, "Number")
		if ProvidedInput2 < 0 {
			menu "What to do with {ChosenApp}?" {
			item "Touch/Face ID":
			item "Remove Lock":
				if ChosenApp == "Master Passcode" {
					rawAction("dk.simonbs.DataJar.DeleteValueIntent", {
						"deleteStrategy": "alwaysAllow",
						"errorWhenValueNotFound": false,
						"keyPath": "{@path}.pass"
					})
				} else {
					rawAction("dk.simonbs.DataJar.DeleteValueIntent", {
						"deleteStrategy": "alwaysAllow",
						"errorWhenValueNotFound": false,
						"keyPath": "{@path}"
					})
				}
				const Text12 = "**FAST_LAUNCH"
				runSelf(Text12)
				stop()
			}
		} else {
			const SplitText2 = splitText(ProvidedInput2, ",")
			const CombinedText = joinText(SplitText2, "Custom")
			base64Encode(CombinedText)
		}
		rawAction("dk.simonbs.DataJar.SetValueIntent", {
			"keyPath": "{@path}.pass",
			"overwriteStrategy": "alwaysAllow",
			"valueConversionMode": "text",
			"values": "IfResult4"
		})
		const Text13 = "**FAST_LAUNCH"
		runSelf(Text13)
	item "Change Re-lock Interval":
		const Text14 = "**askMaster()"
		const ShortcutResult4 = runSelf(Text14)
		if ShortcutResult4 ==  {
		} else {
			const Text15 = "**FAST_LAUNCH"
			runSelf(Text15)
			stop()
		}
		const ProvidedInput3 = prompt("Change Interval to… (sec)", "Number")
		rawAction("dk.simonbs.DataJar.SetValueIntent", {
			"keyPath": "AppLocker.waitTime",
			"values": "ProvidedInput3"
		})
		const Text16 = "**FAST_LAUNCH"
		runSelf(Text16)
	item "Check for Updates":
		getDeviceDetail("System Version")
		const ContentsOfURL = jsonRequest("https://updatekit.mikebeas.com/v1", "POST", {
			"ios": "{}",
			"shortcut": {
				"id": "{@MainVariables['ShareShortcuts ID']}",
				"module": "shareshortcuts",
				"version": "{@MainVariables['Version']}"
			}
		})
		const DictionaryValue = getValue(ContentsOfURL, "update")
		if DictionaryValue ==  {
			menu  {
			item "Install":
				openURL(ContentsOfURL['payload.download'])
				stop()
			item "Changes":
				show(ContentsOfURL['payload.notes'])
			}
		} else {
			alert("No update available", "{@MainVariables['Name']} is up to date.")
		}
		const Text17 = "**FAST_LAUNCH"
		runSelf(Text17)
	item "Help":
		const File1 = getFile("Local Shortcuts/AppLocker/helpVideo.mp4", false)
		if !File1 {
			rawAction("com.sindresorhus.Actions.IsOnlineIntent", {
				"AppIntentDescriptor": ""
			})
			if IsOnline == 1 {
				const ContentsOfURL1 = downloadURL("https://drive.google.com/uc?id=1Lz8QAfC36t4pOX8shTox07PW34SY1w4A&export=download")
				saveFile("Local Shortcuts/AppLocker/helpVideo.mp4", ContentsOfURL1)
			}
		}
		const helpVideo = getFile("Local Shortcuts/AppLocker/helpVideo.mp4", false)
		show()
		if helpVideo {
			quicklook(helpVideo)
		} else {
			alert("Could not fetch photo", "Connection Error")
		}
		alert("Would you like to add some?", "Change Automations")
		openURL("shortcuts://automations")
	}
	stop()
}
@APP = origText

if @APP == "Actions" {
	alert("\"Actions\" is not a legal statement.", "An error occurred")
	stop()
}
rawAction("dk.simonbs.DataJar.CheckIfValueExistsIntent", {
	"keyPath": "AppLocker.apps.{@APP}.locked"
})

if ValueExists2 == 0 {
	const Text18 = "true"
	rawAction("dk.simonbs.DataJar.SetValueIntent", {
		"keyPath": "AppLocker.apps.{@APP}.locked",
		"overwriteStrategy": "alwaysAllow",
		"values": "Text18"
	})
}
rawAction("dk.simonbs.DataJar.GetValueIntent", {
	"keyPath": "AppLocker.apps.{@APP}.locked"
})
@locked

if @locked ==  {
} else {
	stop()
}
rawAction("com.sindresorhus.Actions.DateToUnixTimeIntent", {
	"AppIntentDescriptor": "",
	"date": "{CurrentDate}"
})
@now
const CalculationResult = @waitTime + 120
const CalculationResult1 = @now - CalculationResult
rawAction("dk.simonbs.DataJar.GetValueIntent", {
	"fallbackValues": "CalculationResult1",
	"keyPath": "AppLocker.apps.{@APP}.lastUsed"
})
@lastUsed
const CalculationResult2 = @now - @lastUsed

if CalculationResult2 <= @waitTime {
	rawAction("dk.simonbs.DataJar.SetValueIntent", {
		"keyPath": "AppLocker.apps.{@APP}.lastUsed",
		"overwriteStrategy": "alwaysAllow",
		"valueConversionMode": "automatic",
		"values": "@now"
	})
	stop()
}
rawAction("dk.simonbs.DataJar.CheckIfValueExistsIntent", {
	"keyPath": "AppLocker.apps.{@APP}.pass"
})

if ValueExists3 == 0 {
	const ProvidedInput4 = prompt("Enter New Passcode for {@APP}", "Number")
	if ProvidedInput4 < 0 {
	} else {
		base64Encode(ProvidedInput4)
	}
	rawAction("dk.simonbs.DataJar.SetValueIntent", {
		"keyPath": "AppLocker.apps.{@APP}.pass",
		"values": "IfResult5"
	})
	stop()
}
rawAction("dk.simonbs.DataJar.GetValueIntent", {
	"keyPath": "AppLocker.apps.{@APP}.pass"
})

if Value5 == "BIO AUTH" {
	getClipboard()
	@prevClipboard
	rawAction("com.sindresorhus.Actions.Authenticate", {
		"AppIntentDescriptor": "",
		"openURL": ""
	})
	waitToReturn()
	const Clipboard = getClipboard()
	if Clipboard ==  {
	} else {
		setClipboard(@prevClipboard)
		getClipboard()
		stop()
	}
	setClipboard(@prevClipboard)
	getClipboard()
} else {
	openURL("shortcuts://run-shortcut?name=Open%20App%20URL&input=text&text=Home%20Screen")
	base64Encode(Value5)
	@passcode
	const ProvidedInput5 = prompt("Enter Passcode for {@APP}", "Number")
	if ProvidedInput5 != @passcode {
		stop()
	}
}
rawAction("dk.simonbs.DataJar.SetValueIntent", {
	"keyPath": "AppLocker.apps.{@APP}.lastUsed",
	"overwriteStrategy": "alwaysAllow",
	"valueConversionMode": "automatic",
	"values": "@now"
})
openApp()
rawAction("dk.simonbs.DataJar.SetValueIntent", {
	"keyPath": "AppLocker.lastApp",
	"overwriteStrategy": "alwaysAllow",
	"valueConversionMode": "text",
	"values": "@APP"
})
Descompilado con cherri 2.3.0 (GPL-2.0). Puede que necesite pequeños ajustes antes de compilarse.

Valoraciones y reseñas

Escribe una reseña
–
de 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aún no hay reseñas. ¡Sé el primero en compartir tu opinión!

Publicidad

También te puede gustar

Ver todo
Publicidad