Escanea con tu iPhone para instalar
# Welcome to Pro Chat
A chat app I made
Novedades
Versión 1.0
First release
Qué hace
98 acciones-
URLpro-chat.glitch.me
-
Set Variableendpoint
-
Dictionary
-
Get File
-
If
-
Text
-
Set Name
-
Choose from List
-
If
-
Ask for InputEnter a username
-
Ask for InputEnter a secure password
-
Count
-
If
-
Show AlertERROR
-
Run ShortcutChat App Test
-
If
-
Get Contents of URL…/signup
-
Get Dictionary Value
-
Get Dictionary Value
-
Show Result
-
If
-
Dictionary
-
Save File
-
If
-
Stop This Shortcut
-
If
-
Ask for InputEnter your username
-
Ask for InputEnter your password
-
Get Contents of URL…/login
-
Get Dictionary Value
-
Get Dictionary Value
-
Show Result
-
If
-
Dictionary
-
Save File
-
If
-
Stop This Shortcut
-
If
-
Set Variableuser-data
-
Get Dictionary Value
-
Set Variableusername
-
Get Dictionary Value
-
Set Variablepassword
-
If
-
Get Contents of URL…/getUsers
-
Choose from List
-
Text
-
Set Name
-
Choose from List
-
If
-
Ask for InputEnter your message
-
Get Contents of URL…/sendDm
-
If
-
Get Contents of URLhttps://pro-chat.glitch.me/readDmsFrom
-
Repeat with Each
-
Get Dictionary Value
-
Get Dictionary Value
-
If
-
Text
-
If
-
Text
-
Text
-
Combine Text
-
Text
-
Make Rich Text from HTML
-
Quick Look
-
If
-
Run ShortcutChat App Test
-
Text
-
Run ShortcutChat App Test
-
If
-
Text
-
Set Name
-
Choose from List
-
If
-
Ask for InputEnter your message to send
-
If
-
Show AlertERROR
-
Run ShortcutChat App Test
-
Get Contents of URL…/send
-
Run ShortcutChat App Test
-
If
-
Get Contents of URLpro-chat.glitch.me/messages
-
Get Item from List
-
Repeat with Each
-
Format Date
-
Text
-
Combine Text
-
Text
-
Make Rich Text from HTML
-
Quick Look
-
Run ShortcutChat App Test
-
If
-
Text
-
Run ShortcutChat App Test
-
If
-
Show Result
-
Run ShortcutChat App Test
Ver como código
Todas las acciones de este atajo escritas en Cherri, un lenguaje de programación para Atajos. Ideal para aprender cómo funciona.
#include 'actions/web'
#define color blue
#define glyph person
url("pro-chat.glitch.me")
@endpoint
const File = getFileFromFolder(, "pro-chat/user-data.json", false)
if !File {
const Text = "BEGIN:VCARD\rN;CHARSET=utf-8:Signup;;;;\r\nORG:Make an Pro Chat account\nPHOTO;ENCODING=b:{['icons.signup']}\rEND:VCARD\n\n\n\nBEGIN:VCARD\rN;CHARSET=utf-8:Login;;;;\r\nORG:Login to your existing Pro Chat account\nPHOTO;ENCODING=b:{['icons.login']}\rEND:VCARD\n\n\n\nBEGIN:VCARD\rN;CHARSET=utf-8:Exit;;;;\r\nORG:Exit Pro Chat\nPHOTO;ENCODING=b:{['icons.X']}\rEND:VCARD\n"
const RenamedItem = setName(Text, "sign-in.vcf")
const ChosenItem = chooseFromList(RenamedItem, "Pro Chat - Signup")
if ChosenItem == "Signup" {
prompt("Enter a username")
const ProvidedInput = prompt("Enter a secure password")
const Count = count(ProvidedInput, "Characters")
if Count < 6 {
alert("Password must be above 6 characters.", "ERROR")
runSelf()
} else {
const ContentsOfURL = jsonRequest("{@endpoint}/signup", "POST", {
"password": "{ProvidedInput}",
"user": "{}"
})
const DictionaryValue = getValue(ContentsOfURL, "success")
show()
if DictionaryValue == "Login" {
const Dictionary = {
"password": "{ProvidedInput}",
"user": "{}"
}
saveFile("/pro-chat/user-data.json", Dictionary)
} else {
stop()
}
}
}
if ChosenItem == "Login" {
prompt("Enter your username")
prompt("Enter your password")
const ContentsOfURL1 = jsonRequest("{@endpoint}/login", "POST", {
"password": "{}",
"user": "{}"
})
const DictionaryValue1 = getValue(ContentsOfURL1, "success")
show()
if DictionaryValue1 == "Login" {
const Dictionary1 = {
"password": "{}",
"user": "{}"
}
saveFile("/pro-chat/user-data.json", Dictionary1)
} else {
stop()
}
}
} else {
@userdata = File
@username = @userdata['user']
@password = @userdata['password']
if ShortcutInput contains "DM's" {
const ContentsOfURL2 = jsonRequest("{@endpoint}/getUsers", "GET", {
"message": "{ProvidedInput1}",
"password": "{@password}",
"user": "{@username}"
})
chooseFromList(ContentsOfURL2, "Select a user")
const Text1 = "BEGIN:VCARD\rN;CHARSET=utf-8:Send message;;;;\r\nORG:Send a to {}\nPHOTO;ENCODING=b:{['icons.send']}\rEND:VCARD\n\n\n\n\n\nBEGIN:VCARD\rN;CHARSET=utf-8:View messages;;;;\r\nORG:View the messages {} has sent to you\nPHOTO;ENCODING=b:{['icons.view']}\rEND:VCARD\n\n\n\nBEGIN:VCARD\rN;CHARSET=utf-8:Back;;;;\r\nORG:Exit DM's\nPHOTO;ENCODING=b:{['icons.X']}\rEND:VCARD\n"
const RenamedItem1 = setName(Text1, "dms.vcf")
const ChosenItem1 = chooseFromList(RenamedItem1, "Pro Chat- DM's")
if ChosenItem1 contains "Send" {
prompt("Enter your message")
jsonRequest("{@endpoint}/sendDm", "POST", {
"message": "{}",
"password": "{@password}",
"receiver": "{}",
"sender": "{@username}"
})
}
if ChosenItem1 contains "View" {
const ContentsOfURL3 = jsonRequest("https://pro-chat.glitch.me/readDmsFrom", "GET", {
"message": "Hello world (test)",
"password": "Agee",
"receiver": "Omegabird113",
"sender": "ProCreations"
}, {
"from": "{}",
"password": "{@password}",
"user": "{@username}"
})
for _ in ContentsOfURL3 {
const message = @RepeatItem['message']
const DictionaryValue2 = getValue(@RepeatItem, "sender")
if DictionaryValue2 {
} else {
}
}
joinText(RepeatResults, "<hr>")
const Text2 = "<html lang=\\"en\\">\n<head>\n <meta charset=\\"UTF-8\\" />\n <meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0, user-scalable=no\\" />\n <title>Pro Chat</title>\n <style>\n body {\n font-family: Arial, sans-serif;\n margin: 0;\n padding: 0;\n background-color: #121212;\n color: #aaa;\n }\n #messages-container {\n max-width: 100%;\n margin: 20px;\n padding: 2rem;\n background-color: #0A0A0A;\n box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);\n overflow-y: auto;\n overflow-x: hidden;\n border: none;\n border-radius: 20px;\n }\n\n #messages {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n\n .message {\n margin-bottom: 2rem;\n padding: 1.8rem;\n border: 1px solid #333;\n border-radius: 15px;\n background-color: #3D3D3D;\n }\n\nsmall {\n font-size: 70%;\n}\n\n </style>\n</head>\n<body>\n <div id=\\"messages-container\\">\n <h2 style=\\"color: #aaa;\\">{} DM's</h2>\n <ul id=\\"messages\\">\n{}\n </ul>\n </div>\n<script>\n</script>\n</body>\n</html>"
const RichTextFromHTML = getRichTextFromHTML(Text2)
quicklook(RichTextFromHTML)
}
if ChosenItem1 == "Back" {
runSelf()
}
const Text3 = "DM's"
runSelf(Text3)
} else {
const Text4 = "BEGIN:VCARD\rN;CHARSET=utf-8:Send message;;;;\r\nORG:Send a message in Pro Chat!\nPHOTO;ENCODING=b:{['icons.send']}\rEND:VCARD\n\n\n\n\n\n\nBEGIN:VCARD\rN;CHARSET=utf-8:View messages;;;;\r\nORG:View the messages sent in Pro Chat\nPHOTO;ENCODING=b:{['icons.view']}\rEND:VCARD\n\n\n\nBEGIN:VCARD\rN;CHARSET=utf-8:Direct Messages;;;;\r\nORG:Chat privately with other Pro Chat users!\nPHOTO;ENCODING=b:{['icons.dm']}\rEND:VCARD\n\n\n\nBEGIN:VCARD\rN;CHARSET=utf-8:Settings;;;;\r\nORG:Pro Chat settings\nPHOTO;ENCODING=b:{['icons.settings']}\rEND:VCARD\n\n\n\nBEGIN:VCARD\rN;CHARSET=utf-8:Exit;;;;\r\nORG:Exit Pro Chat\nPHOTO;ENCODING=b:{['icons.X']}\rEND:VCARD\n"
const RenamedItem2 = setName(Text4, "menu.vcf")
const ChosenItem2 = chooseFromList(RenamedItem2, "Pro Chat- menu")
if ChosenItem2 contains "Send" {
const ProvidedInput1 = prompt("Enter your message to send")
if ProvidedInput1 == {
alert("Your message was empty. It has not been sent.", "ERROR")
runSelf()
}
jsonRequest("{@endpoint}/send", "POST", {
"message": "{ProvidedInput1}",
"password": "{@password}",
"user": "{@username}"
})
runSelf()
}
if ChosenItem2 contains "View" {
const ContentsOfURL4 = downloadURL("pro-chat.glitch.me/messages")
const ItemFromList = getListItems(ContentsOfURL4, 1, 200)
for _ in ItemFromList {
formatDate(@RepeatItem['date'], "Custom", "MMM d, h:mm a")
}
joinText(RepeatResults1, "
")
const Text5 = "<html lang=\\"en\\">\n<head>\n <meta charset=\\"UTF-8\\" />\n <meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0, user-scalable=no\\" />\n <title>Pro Chat</title>\n <style>\n body {\n font-family: Arial, sans-serif;\n margin: 0;\n padding: 0;\n background-color: #121212;\n color: #aaa;\n }\n #messages-container {\n max-width: 100%;\n margin: 20px;\n padding: 2rem;\n background-color: #0A0A0A;\n box-shadow: 0 0 25px rgba(255, 255, 255, 0.2);\n overflow-y: auto;\n overflow-x: hidden;\n border: none;\n border-radius: 20px;\n }\n\n #messages {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n\n .message {\n margin-bottom: 2rem;\n padding: 1.8rem;\n border: 1px solid #333;\n border-radius: 15px;\n background-color: #3D3D3D;\n }\n\nsmall {\n font-size: 70%;\n}\n\n </style>\n</head>\n<body>\n <div id=\\"messages-container\\">\n <h2 style=\\"color: #aaa;\\">Messages</h2>\n <ul id=\\"messages\\">\n{}\n </ul>\n<p>Pro Chat shortcut only loads 200 messages to save speed.</p>\n </div>\n<script>\n</script>\n</body>\n</html>"
const RichTextFromHTML1 = getRichTextFromHTML(Text5)
quicklook(RichTextFromHTML1)
runSelf()
}
if ChosenItem2 contains "Direct" {
const Text6 = "DM's"
runSelf(Text6)
}
if ChosenItem2 == "Settings" {
show("Settings option coming soon!")
runSelf()
}
}
}
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
Más de procreations
También te puede gustar
Publicidad