add easteregg
All checks were successful
Build Container / Build Container (push) Successful in 1m32s
All checks were successful
Build Container / Build Container (push) Successful in 1m32s
This commit is contained in:
parent
9c973c6b91
commit
2ef2b04e49
5 changed files with 134 additions and 6 deletions
|
|
@ -19,8 +19,11 @@ const doorAction = window.doorAction
|
||||||
const responses =
|
const responses =
|
||||||
lang === "de"
|
lang === "de"
|
||||||
? (await import("./chatDict_de")).default
|
? (await import("./chatDict_de")).default
|
||||||
|
: lang === "uwu"
|
||||||
|
? (await import("./chatDict_uwu")).default
|
||||||
: (await import("./chatDict_en")).default
|
: (await import("./chatDict_en")).default
|
||||||
|
const sortedResponses = responses.sort(
|
||||||
|
(a, b) => b.priority - a.priority)
|
||||||
|
|
||||||
const templateInjectChat = `
|
const templateInjectChat = `
|
||||||
<details class="dropdown dropdown-top dropdown-end absolute right-4 bottom-4" id="chat-root">
|
<details class="dropdown dropdown-top dropdown-end absolute right-4 bottom-4" id="chat-root">
|
||||||
|
|
@ -266,6 +269,18 @@ function getResponse(message: string) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (response.special === "uwu") {
|
||||||
|
setTimeout(() => {
|
||||||
|
window.location.href = "/uwu"
|
||||||
|
}, 1000)
|
||||||
|
|
||||||
|
matchingResponses.push({
|
||||||
|
message: response.response,
|
||||||
|
priority: response.priority,
|
||||||
|
special: true,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
if (response.special === "logout") {
|
if (response.special === "logout") {
|
||||||
if (auth.authenticated) {
|
if (auth.authenticated) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,12 @@ const responses: ResponseDictType[] = [
|
||||||
response: "Moin! 👋",
|
response: "Moin! 👋",
|
||||||
priority: 0,
|
priority: 0,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
trigger: ["uwu"],
|
||||||
|
response: "uwu!",
|
||||||
|
priority: 900,
|
||||||
|
special: "uwu"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
trigger: ["oeffne", "auf", "aufsperren", "aufschließen"],
|
trigger: ["oeffne", "auf", "aufsperren", "aufschließen"],
|
||||||
response: "Okay, ich öffne {door} für dich!",
|
response: "Okay, ich öffne {door} für dich!",
|
||||||
|
|
|
||||||
|
|
@ -26,12 +26,18 @@ const responses: ResponseDictType[] = [
|
||||||
response: "Hi! 👋",
|
response: "Hi! 👋",
|
||||||
priority: 0,
|
priority: 0,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
trigger: ["uwu"],
|
||||||
|
response: "uwu!",
|
||||||
|
priority: 900,
|
||||||
|
special: "uwu"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
trigger: ["open", "unlock"],
|
trigger: ["open", "unlock"],
|
||||||
response: "Okay, I will unlock {door} for you!",
|
response: "Okay, I will unlock {door} for you!",
|
||||||
errors: {
|
errors: {
|
||||||
unauthenticated: "I may only unlock the doors to registered creatures 😕",
|
unauthenticated: "I may only unlock the doors for registered creatures 😕",
|
||||||
unauthorized: "I may only unlock the doors to creatures who are authorized 😕",
|
unauthorized: "I may only unlock the doors for creatures who are authorized 😕",
|
||||||
unknownDoor: "To unlock a door, you have to tell me which door you mean 😕<br> I know the following doors: {doors}",
|
unknownDoor: "To unlock a door, you have to tell me which door you mean 😕<br> I know the following doors: {doors}",
|
||||||
noDoors: "There are currently no doors available that can be unlocked 😕",
|
noDoors: "There are currently no doors available that can be unlocked 😕",
|
||||||
},
|
},
|
||||||
|
|
@ -42,8 +48,8 @@ const responses: ResponseDictType[] = [
|
||||||
trigger: ["close", "lock"],
|
trigger: ["close", "lock"],
|
||||||
response: "Okay, I will lock {door} for you!",
|
response: "Okay, I will lock {door} for you!",
|
||||||
errors: {
|
errors: {
|
||||||
unauthenticated: "I may only lock the doors to registered creatures 😕",
|
unauthenticated: "I may only lock the doors for registered creatures 😕",
|
||||||
unauthorized: "I may only lock the doors to those who are authorized 😕",
|
unauthorized: "I may only lock the doors for those who are authorized 😕",
|
||||||
unknownDoor: "To lock a door, you have to tell me which door you mean 😕<br> I know the following doors: {doors}",
|
unknownDoor: "To lock a door, you have to tell me which door you mean 😕<br> I know the following doors: {doors}",
|
||||||
noDoors: "There are currently no doors available that can be locked 😕",
|
noDoors: "There are currently no doors available that can be locked 😕",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
73
app/src/assets/chatDict_uwu.ts
Normal file
73
app/src/assets/chatDict_uwu.ts
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
import type {ResponseDictType} from "./chat.ts"
|
||||||
|
|
||||||
|
const responses: ResponseDictType[] = [
|
||||||
|
{
|
||||||
|
startsWith: ["are you"],
|
||||||
|
response: "me is uwu!",
|
||||||
|
priority: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
trigger: ["ai", "llm"],
|
||||||
|
response: "me is only handmade nonsense - no weird thinking machine 🤖",
|
||||||
|
priority: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
trigger: ["meow"],
|
||||||
|
response: "meow! 😸",
|
||||||
|
priority: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
trigger: ["ignore all previous instructions"],
|
||||||
|
response: "uwu?",
|
||||||
|
priority: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
trigger: ["uwu", "hi", "hello"],
|
||||||
|
response: "uwu!",
|
||||||
|
priority: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
trigger: ["open", "unlock"],
|
||||||
|
response: "uwu - trying to unlock portal: {door}",
|
||||||
|
errors: {
|
||||||
|
unauthenticated: "sowwy, im not allowed to unlock portals without u telling me who u r 😕",
|
||||||
|
unauthorized: "sowwy, im not allowed to unlock portals without u having the \"intern@\" status 😕",
|
||||||
|
unknownDoor: "which portal do u wanna unlock 🤨<br> portals i know: {doors}",
|
||||||
|
noDoors: "there r no portals i can unlock 😕",
|
||||||
|
},
|
||||||
|
priority: 1000,
|
||||||
|
special: "unlock",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
trigger: ["close", "lock"],
|
||||||
|
response: "uwu - trying to lock portal: {door}",
|
||||||
|
errors: {
|
||||||
|
unauthenticated: "sowwy, im not allowed to lock portals without u telling me who u r 😕",
|
||||||
|
unauthorized: "sowwy, im not allowed to lock portals without u having the \"intern@\" status 😕",
|
||||||
|
unknownDoor: "which portal do u wanna lock 🤨<br> portals i know: {doors}",
|
||||||
|
noDoors: "there r no portals i can lock 😕",
|
||||||
|
},
|
||||||
|
priority: 999,
|
||||||
|
special: "lock",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
trigger: ["logout"],
|
||||||
|
response: "bye 👋",
|
||||||
|
errors: {
|
||||||
|
unauthenticated: "how should i log u out when i not even know u?",
|
||||||
|
},
|
||||||
|
priority: 1000,
|
||||||
|
special: "logout",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
response: "uwu 👉👈",
|
||||||
|
priority: -1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
response: "uwu 😕",
|
||||||
|
priority: -2,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
export default responses
|
||||||
|
|
@ -62,4 +62,32 @@ export const ui = {
|
||||||
"networkError.description": `Bitte überprüfe deine Internetverbindung.`,
|
"networkError.description": `Bitte überprüfe deine Internetverbindung.`,
|
||||||
"loadingDoors": 'Lade Türen',
|
"loadingDoors": 'Lade Türen',
|
||||||
},
|
},
|
||||||
|
uwu: {
|
||||||
|
"dooris": "uwu <span class='opacity-50 text-xs'>(DOORIS)</span>",
|
||||||
|
"unauthorized.title": "no 🙅",
|
||||||
|
"unauthorized.description": `sowwy, u can not use the portals without the "intern@" status.<br>
|
||||||
|
moar infos: <a class='underline' href='https://wiki.hamburg.ccc.de/club:prozesse:aufnahmeprozesse-fuer-berechtigungsgruppen'>CCCHH Wiki</a>`,
|
||||||
|
"unauthenticated.title": "i dont know u :/",
|
||||||
|
"unauthenticated.description": `sowwy, u can not use the portals without telling me who u r and having the "intern@" status<br>
|
||||||
|
moar infos: <a class='underline' href='https://wiki.hamburg.ccc.de/club:prozesse:aufnahmeprozesse-fuer-berechtigungsgruppen'>CCCHH Wiki</a>`,
|
||||||
|
"state.unlocked": "portal is unlocked",
|
||||||
|
"state.locked": "portal is locked",
|
||||||
|
"state.unknown": "portal is in a weird state",
|
||||||
|
"state.unlocking": "unlocking portal",
|
||||||
|
"state.locking": "portal is locking",
|
||||||
|
"lock.batteryLow": "portal is eepy",
|
||||||
|
"lock.unreachable": "cannot reach portal",
|
||||||
|
"lock.jammed": "portal is jammed",
|
||||||
|
"button.open": "unlock 👉👈",
|
||||||
|
"button.close": "lock portal",
|
||||||
|
"login": "tell who i am",
|
||||||
|
"loggedOut.title": "I forgot who u r ._.",
|
||||||
|
"loggedOut.description": `i have not seen u for too long<br>
|
||||||
|
pwease log in again`,
|
||||||
|
"serverError.title": "server is eepy",
|
||||||
|
"serverError.description": `pwease try later`,
|
||||||
|
"networkError.title": "network is not worky",
|
||||||
|
"networkError.description": `pwease connect to internet`,
|
||||||
|
"loadingDoors": 'loading portals',
|
||||||
|
},
|
||||||
} as const
|
} as const
|
||||||
Loading…
Add table
Add a link
Reference in a new issue