diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 2eb411a23..68c90c59e 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -158,4 +158,10 @@
android:name="flutterEmbedding"
android:value="2" />
+
+
+
+
+
+
diff --git a/assets/l10n/intl_en.arb b/assets/l10n/intl_en.arb
index 83de9e423..b5310c8e3 100644
--- a/assets/l10n/intl_en.arb
+++ b/assets/l10n/intl_en.arb
@@ -2563,7 +2563,7 @@
"type": "text",
"placeholders": {}
},
- "interactiveTranslatorAllowedDesc": "Students can choose whether to use translation assistance in space group chats in Main Menu > My Learning Settings.",
+ "interactiveTranslatorAllowedDesc": "Students can choose whether to use translation assistance in space group chats in Main Menu > Learning Settings.",
"@interactiveTranslatorAllowedDesc": {
"type": "text",
"placeholders": {}
@@ -3030,9 +3030,9 @@
"errorDisableLanguageAssistanceClassDesc": "Translation assistance and grammar assistance are turned off for the space that this chat is in.",
"itIsDisabled": "Interactive Translation is disabled",
"igcIsDisabled": "Interactive Grammar Checking is disabled",
- "goToLearningSettings": "Go to My Learning Settings",
+ "goToLearningSettings": "Go to Learning Settings",
"error405Title": "Languages not set",
- "error405Desc": "Please set your languages in Main Menu > My Learning Settings.",
+ "error405Desc": "Please set your languages in Main Menu > Learning Settings.",
"loginOrSignup": "Sign in with",
"@loginOrSignup": {
"type": "text",
@@ -3095,7 +3095,7 @@
"type": "text",
"placeholders": {}
},
- "learningSettings": "My Learning Settings",
+ "learningSettings": "Learning settings",
"classNameRequired": "Please enter a space name",
"@classNameRequired": {
"type": "text",
@@ -3656,11 +3656,6 @@
"unknownPrivateChat": "Unknown private chat",
"copyClassCodeDesc": "Users who are already in the app can 'Join space' via the main menu.",
"addToSpaceDesc": "Adding a chat to a space will make the chat appear within the space for students and give them access.",
- "@addToSpaceDesc": {
- "placeholders": {
- "roomtype": {}
- }
- },
"invitedToSpace": "{user} has invited you to join a space: {space}! Do you wish to accept?",
"@invitedToSpace": {
"placeholders": {
@@ -3904,7 +3899,6 @@
"listen": "Listen",
"addConversationBot": "Enable Conversation Bot",
"addConversationBotDesc": "Add a bot to this chat",
- "convoBotSettingsTitle": "Conversation Bot Settings",
"convoBotSettingsDescription": "Edit conversation topic and difficulty",
"enterAConversationTopic": "Enter a conversation topic",
"conversationTopic": "Conversation topic",
@@ -4009,7 +4003,7 @@
"accuracy": "Accuracy",
"points": "Points",
"noPaymentInfo": "No payment info necessary!",
- "conversationBotModeSelectDescription": "Bot mode",
+ "conversationBotModeSelectDescription": "Chat activity",
"conversationBotModeSelectOption_discussion": "Discussion",
"conversationBotModeSelectOption_custom": "Custom",
"conversationBotModeSelectOption_conversation": "Conversation",
@@ -4017,9 +4011,9 @@
"conversationBotModeSelectOption_storyGame": "Story Game",
"conversationBotDiscussionZone_title": "Discussion Settings",
"conversationBotDiscussionZone_discussionTopicLabel": "Discussion Topic",
- "conversationBotDiscussionZone_discussionTopicPlaceholder": "Set Discussion Topic",
+ "conversationBotDiscussionZone_discussionTopicPlaceholder": "Set discussion topic",
"conversationBotDiscussionZone_discussionKeywordsLabel": "Discussion Keywords",
- "conversationBotDiscussionZone_discussionKeywordsPlaceholder": "Set Discussion Keywords",
+ "conversationBotDiscussionZone_discussionKeywordsPlaceholder": "Set discussion keywords",
"conversationBotDiscussionZone_discussionKeywordsHintText": "Comma separated list of keywords to guide the discussion",
"conversationBotDiscussionZone_discussionTriggerScheduleEnabledLabel": "Send discussion prompt on a schedule",
"conversationBotDiscussionZone_discussionTriggerScheduleHourIntervalLabel": "Hours between discussion prompts",
@@ -4030,7 +4024,7 @@
"conversationBotCustomZone_customSystemPromptPlaceholder": "Set custom system prompt",
"conversationBotCustomZone_customSystemPromptEmptyError": "Missing custom system prompt",
"conversationBotCustomZone_customTriggerReactionEnabledLabel": "Responds on ⏩ reaction",
- "botConfig": "Conversation Bot Settings",
+ "botConfig": "Chat settings",
"addConversationBotDialogTitleInvite": "Confirm inviting conversation bot",
"addConversationBotButtonInvite": "Invite",
"addConversationBotDialogInviteConfirmation": "Invite",
@@ -4038,7 +4032,7 @@
"addConversationBotButtonRemove": "Remove",
"addConversationBotDialogRemoveConfirmation": "Remove",
"conversationBotConfigConfirmChange": "Confirm",
- "conversationBotStatus": "Bot Status",
+ "conversationBotStatus": "Invite bot",
"conversationBotTextAdventureZone_title": "Text Adventure",
"conversationBotTextAdventureZone_instructionLabel": "Game Master Instructions",
"conversationBotTextAdventureZone_instructionPlaceholder": "Set game master instructions",
@@ -4060,39 +4054,21 @@
"tooltipInstructionsMobileBody": "Press and hold items to view tooltips.",
"tooltipInstructionsBrowserBody": "Hover over items to view tooltips.",
"addSpaceToSpaceDescription": "Select a space to add as a parent",
- "roomCapacity": "{roomType} Capacity",
- "@roomCapacity": {
- "type": "text",
- "placeholders": {
- "roomType": {}
- }
- },
+ "chatCapacity": "Chat capacity",
+ "spaceCapacity": "Space capacity",
"roomFull": "This room is already at capacity.",
"topicNotSet": "The topic has not been set.",
- "capacityNotSet": "This room has no capacity limit.",
- "roomCapacityHasBeenChanged": "{roomType} capacity changed",
- "@roomCapacityHasBeenChanged": {
- "type": "text",
- "placeholders": {
- "roomType": {}
- }
- },
- "roomExceedsCapacity": "Room exceeds capacity. Consider removing students from the room, or raising the capacity.",
- "capacitySetTooLow": "{roomType} capacity cannot be set below the current number of non-admins.",
- "@capacitySetTooLow": {
- "type": "text",
- "placeholders": {
- "roomType": {}
- }
- },
- "roomCapacityExplanation": "{roomType} capacity limits the number of non-admins allowed in a room.",
+ "chatCapacityNotSet": "This chat has no capacity limit.",
+ "spaceCapacityNotSet": "This space has no capacity limit.",
+ "chatCapacityHasBeenChanged": "Chat capacity changed",
+ "spaceCapacityHasBeenChanged": "Space capacity changed",
+ "chatCapacitySetTooLow": "Chat capacity cannot be set below the current number of non-admins.",
+ "spaceCapacitySetTooLow": "Space capacity cannot be set below the current number of non-admins.",
+ "chatCapacityExplanation": "Chat capacity limits the number of non-admins allowed in a chat.",
+ "spaceCapacityExplanation": "Space capacity limits the number of non-admins allowed in a space.",
+ "chatExceedsCapacity": "This chat exceeds its capacity.",
+ "spaceExceedsCapacity": "This space exceeds its capacity.",
"tooManyRequest": "Too many request, please try again later.",
- "@roomCapacityExplanation": {
- "type": "text",
- "placeholders": {
- "roomType": {}
- }
- },
"enterNumber": "Please enter a whole number value.",
"buildTranslation": "Build your translation from the choices above",
"noDatabaseEncryption": "Database encryption is not supported on this platform",
@@ -4115,14 +4091,14 @@
"placeholders": {}
},
"addChatToSpaceDesc": "Adding a chat to a space will make the chat appear within the space for students and give them access.",
- "addSpaceToSpaceDesc": "Adding a sub space to space will make the sub space appear in the main space''s chat list.",
+ "addSpaceToSpaceDesc": "Adding a sub space to space will make the sub space appear in the main space's chat list.",
"spaceAnalytics": "Space Analytics",
"changeAnalyticsLanguage": "Change Analytics Language",
"suggestToSpace": "Suggest this space",
- "suggestToSpaceDesc": "Suggested sub spaces will appear in their main space''s chat list",
+ "suggestToSpaceDesc": "Suggested sub spaces will appear in their main space's chat list",
"practice": "Practice",
"noLanguagesSet": "No languages set",
- "noActivitiesFound": "That''s enough on this for now! Come back later for more.",
+ "noActivitiesFound": "That's enough on this for now! Come back later for more.",
"hintTitle": "Hint:",
"speechToTextBody": "See how well you did by looking at your Accuracy and Words Per Minute scores",
"previous": "Previous",
@@ -4226,19 +4202,23 @@
"discoverHomeservers": "Discover homeservers",
"whatIsAHomeserver": "What is a homeserver?",
"homeserverDescription": "All your data is stored on the homeserver, just like an email provider. You can choose which homeserver you want to use, while you can still communicate with everyone. Learn more at at https://matrix.org.",
- "doesNotSeemToBeAValidHomeserver": "Doesn''t seem to be a compatible homeserver. Wrong URL?",
+ "doesNotSeemToBeAValidHomeserver": "Doesn't seem to be a compatible homeserver. Wrong URL?",
"grammar": "Grammar",
"contactHasBeenInvitedToTheChat": "Contact has been invited to the chat",
"inviteChat": "📨 Invite chat",
"chatName": "Chat name",
"reportContentIssueTitle": "Report content issue",
"feedback": "Optional feedback",
- "reportContentIssueDescription": "Uh oh! AI can faciliate personalized learning experiences but... also hallucinates. Please provide any feedback you have and we''ll try again.",
+ "reportContentIssueDescription": "Uh oh! AI can faciliate personalized learning experiences but... also hallucinates. Please provide any feedback you have and we'll try again.",
"clickTheWordAgainToDeselect": "Click the selected word to deselect it.",
"l2SupportNa": "Not Available",
"l2SupportAlpha": "Alpha",
"l2SupportBeta": "Beta",
"l2SupportFull": "Full",
+ "voiceNotAvailable": "It looks like you don't have a voice installed for this language.",
+ "openVoiceSettings": "Click here to open voice settings",
+ "playAudio": "Play",
+ "stop": "Stop",
"grammarCopySCONJ": "Subordinating Conjunction",
"grammarCopyNUM": "Number",
"grammarCopyVERB": "Verb",
@@ -4323,6 +4303,7 @@
"grammarCopyAccDat": "Accusative, Dative",
"grammarCopyInf": "Infinitive",
"grammarCopyLong": "Long",
+ "grammarCopyLoc": "Locative",
"grammarCopyInd": "Indicative",
"grammarCopyCmp": "Comparative",
"grammarCopyRelative_case": "Relative Case",
@@ -4352,9 +4333,16 @@
"grammarCopyNumber": "Number",
"grammarCopyConjType": "Conjunction Type",
"grammarCopyPolarity": "Polarity",
- "grammarCopyNumberPsor": "Possessor''s Number",
+ "grammarCopyNumberPsor": "Possessor's Number",
"grammarCopyCase": "Case",
"grammarCopyDefinite": "Definiteness",
"grammarCopyNumForm": "Numeral Form",
- "grammarCopyUnknown": "Unknown"
+ "grammarCopyUnknown": "Unknown",
+ "enterPrompt": "Please enter a system prompt",
+ "selectBotLanguage": "Select bot language",
+ "chooseVoice": "Choose a voice",
+ "enterLanguageLevel": "Please enter a language level",
+ "enterDiscussionTopic": "Please enter a discussion topic",
+ "selectBotChatMode": "Select chat mode",
+ "messageNotInTargetLang": "Message not in target language"
}
\ No newline at end of file
diff --git a/assets/l10n/intl_es.arb b/assets/l10n/intl_es.arb
index dd8312d8f..fd478e870 100644
--- a/assets/l10n/intl_es.arb
+++ b/assets/l10n/intl_es.arb
@@ -4576,14 +4576,8 @@
"roomDataMissing": "Es posible que falten algunos datos de las salas de las que no es miembro.",
"suggestToChat": "Sugerir este chat",
"suggestToChatDesc": "Los chats sugeridos aparecerán en las listas de chats",
- "roomCapacity": "Capacidad de la sala",
"roomFull": "Esta sala ya está al límite de su capacidad.",
"topicNotSet": "El tema no se ha fijado.",
- "capacityNotSet": "Esta sala no tiene límite de capacidad.",
- "roomCapacityHasBeenChanged": "Capacidad de la sala modificada",
- "roomExceedsCapacity": "La sala supera su capacidad. Considere la posibilidad de retirar a los alumnos de la sala o de aumentar la capacidad.",
- "capacitySetTooLow": "La capacidad de la sala no puede fijarse por debajo del número actual de no administradores.",
- "roomCapacityExplanation": "La capacidad de la sala limita el número de personas que pueden entrar en ella.",
"enterNumber": "Introduzca un valor numérico entero.",
"autoIGCToolName": "Ejecutar automáticamente la asistencia lingüística",
"autoIGCToolDescription": "Ejecutar automáticamente la asistencia lingüística después de escribir mensajes",
@@ -4731,5 +4725,288 @@
}
},
"commandHint_googly": "Enviar unos ojos saltones",
- "reportContentIssue": "Problema de contenido"
+ "reportContentIssue": "Problema de contenido",
+ "alwaysUse24HourFormat": "falso",
+ "countChatsAndCountParticipants": "{chats} chats y {participants} participantes",
+ "@countChatsAndCountParticipants": {
+ "type": "text",
+ "placeholders": {
+ "chats": {},
+ "participants": {}
+ }
+ },
+ "noMoreChatsFound": "No se encontraron más chats...",
+ "noChatsFoundHere": "Aún no se encontraron chats aquí. Inicia un nuevo chat con alguien usando el botón de abajo. ⤵️",
+ "joinedChats": "Chats unidos",
+ "unread": "No leído",
+ "space": "Espacio",
+ "spaces": "Espacios",
+ "enterASpacepName": "Ingresa un nombre",
+ "invitedBy": "📩 Invitado por {user}",
+ "@invitedBy": {
+ "placeholders": {
+ "user": {}
+ }
+ },
+ "clickMessageBody": "Haz clic en un mensaje para herramientas de idioma como traducción, reproducción y más!",
+ "searchIn": "Buscar en el chat \"{chat}\"...",
+ "@searchIn": {
+ "type": "text",
+ "placeholders": {
+ "chat": {}
+ }
+ },
+ "subscribedToUnlockTools": "¡Suscríbete para desbloquear la traducción interactiva y la verificación gramatical, la reproducción de audio, las actividades de práctica personalizadas y la analítica de aprendizaje!",
+ "conversationBotModeSelectOption_storyGame": "Juego de Historia",
+ "conversationBotCustomZone_title": "Configuraciones Personalizadas",
+ "conversationBotCustomZone_customSystemPromptLabel": "Mensaje del sistema",
+ "conversationBotCustomZone_customSystemPromptPlaceholder": "Establecer mensaje del sistema personalizado",
+ "conversationBotCustomZone_customSystemPromptEmptyError": "Falta mensaje del sistema personalizado",
+ "conversationBotCustomZone_customTriggerReactionEnabledLabel": "Responde a la reacción ⏩",
+ "addConversationBotDialogTitleInvite": "Confirmar la invitación del bot de conversación",
+ "addConversationBotButtonInvite": "Invitar",
+ "addConversationBotDialogInviteConfirmation": "Invitar",
+ "addConversationBotButtonTitleRemove": "Confirmar la eliminación del bot de conversación",
+ "addConversationBotButtonRemove": "Eliminar",
+ "addConversationBotDialogRemoveConfirmation": "Eliminar",
+ "conversationBotConfigConfirmChange": "Confirmar",
+ "conversationBotStatus": "Estado del Bot",
+ "conversationBotTextAdventureZone_title": "Aventura de Texto",
+ "conversationBotTextAdventureZone_instructionLabel": "Instrucciones del Maestro del Juego",
+ "conversationBotTextAdventureZone_instructionPlaceholder": "Establecer instrucciones del maestro del juego",
+ "conversationBotCustomZone_instructionSystemPromptEmptyError": "Faltan instrucciones del maestro del juego",
+ "suggestToSpace": "Sugerir este espacio",
+ "suggestToSpaceDesc": "Los subespacios sugeridos aparecerán en la lista de chats de su espacio principal",
+ "practice": "Práctica",
+ "noLanguagesSet": "No hay idiomas configurados",
+ "hintTitle": "Sugerencia:",
+ "speechToTextBody": "Ve qué tan bien lo hiciste al mirar tus puntajes de Precisión y Palabras Por Minuto.",
+ "previous": "Anterior",
+ "languageButtonLabel": "Idioma: {currentLanguage}",
+ "@languageButtonLabel": {
+ "type": "text",
+ "placeholders": {
+ "currentLanguage": {}
+ }
+ },
+ "changeAnalyticsView": "Cambiar Vista de Análisis",
+ "l1TranslationBody": "Los mensajes en tu idioma base no serán traducidos.",
+ "continueText": "Continuar",
+ "deleteSubscriptionWarningTitle": "YTienes una suscripción activa",
+ "deleteSubscriptionWarningBody": "Eliminar tu cuenta no cancelará automáticamente tu suscripción.",
+ "manageSubscription": "Gestionar Suscripción",
+ "createSpace": "Crear espacio",
+ "createChat": "Crear chat",
+ "error520Title": "Por favor, intenta de nuevo.",
+ "error520Desc": "Lo sentimos, no pudimos entender tu mensaje...",
+ "wordsUsed": "Palabras Usadas",
+ "errorTypes": "Tipos de Error",
+ "level": "Nivel",
+ "canceledSend": "Envío cancelado",
+ "morphsUsed": "Morphs Usados",
+ "translationChoicesBody": "Haz clic y mantén presionada una opción para una pista.",
+ "sendCanceled": "Envío cancelado",
+ "goToSpace": "Ir al espacio: {space}",
+ "@goToSpace": {
+ "type": "text",
+ "space": {}
+ },
+ "markAsUnread": "Marcar como no leído",
+ "userLevel": "{level} - Usuario",
+ "@userLevel": {
+ "type": "text",
+ "placeholders": {
+ "level": {}
+ }
+ },
+ "moderatorLevel": "{level} - Moderador",
+ "@moderatorLevel": {
+ "type": "text",
+ "placeholders": {
+ "level": {}
+ }
+ },
+ "adminLevel": "{level} - Administrador",
+ "@adminLevel": {
+ "type": "text",
+ "placeholders": {
+ "level": {}
+ }
+ },
+ "changeGeneralChatSettings": "Cambiar la configuración general del chat.",
+ "inviteOtherUsers": "Invitar a otros usuarios a este chat",
+ "changeTheChatPermissions": "Cambiar los permisos del chat",
+ "changeTheVisibilityOfChatHistory": "Cambiar la visibilidad del historial de chat",
+ "changeTheCanonicalRoomAlias": "Cambiar la dirección del chat público principal.",
+ "sendRoomNotifications": "Enviar una notificación a @room",
+ "changeTheDescriptionOfTheGroup": "Cambiar la descripción del chat",
+ "chatPermissionsDescription": "Define qué nivel de poder es necesario para ciertas acciones en este chat. Los niveles de poder 0, 50 y 100 suelen representar a usuarios, moderadores y administradores, pero cualquier graduación es posible.",
+ "updateInstalled": "🎉 ¡Actualización {version} instalada!",
+ "@updateInstalled": {
+ "type": "text",
+ "placeholders": {
+ "version": {}
+ }
+ },
+ "loginWithMatrixId": "Iniciar sesión con Matrix-ID.",
+ "discoverHomeservers": "Descubrir homeservers",
+ "whatIsAHomeserver": "¿Qué es un homeserver?",
+ "homeserverDescription": "Todos tus datos se almacenan en el homeserver, al igual que un proveedor de correo electrónico. Puedes elegir qué homeserver deseas utilizar, mientras que aún puedes comunicarte con todos. Aprende más en https://matrix.org.",
+ "doesNotSeemToBeAValidHomeserver": "No parece ser un homeserver compatible. ¿URL incorrecta?",
+ "grammar": "Gramática",
+ "contactHasBeenInvitedToTheChat": "El contacto ha sido invitado al chat",
+ "inviteChat": "📨 Invitar al chat",
+ "chatName": "Nombre del chat",
+ "reportContentIssueTitle": "Informar sobre un problema de contenido",
+ "feedback": "Comentarios opcionales",
+ "reportContentIssueDescription": "¡Ups! La IA puede facilitar experiencias de aprendizaje personalizadas, pero... también alucina. Por favor, proporciona cualquier comentario que tengas y lo intentaremos de nuevo.",
+ "clickTheWordAgainToDeselect": "Click the selected word to deselect it.",
+ "l2SupportNa": "Haz clic en la palabra seleccionada para deseleccionarla",
+ "l2SupportAlpha": "Alfa",
+ "l2SupportBeta": "Beta",
+ "l2SupportFull": "Lleno",
+ "chatCapacity": "Capacidad de chat",
+ "spaceCapacity": "Capacidad espacial",
+ "chatCapacityHasBeenChanged": "Capacidad de chat modificada",
+ "spaceCapacityHasBeenChanged": "Capacidad espacial modificada",
+ "chatCapacitySetTooLow": "La capacidad del chat no se puede establecer por debajo del número actual de no administradores.",
+ "spaceCapacitySetTooLow": "La capacidad de espacio no puede fijarse por debajo del número actual de no administradores.",
+ "chatCapacityExplanation": "La capacidad del chat limita el número de usuarios no administradores permitidos en un chat.",
+ "spaceCapacityExplanation": "La capacidad del espacio limita el número de no administradores permitidos en un espacio.",
+ "tooManyRequest": "Demasiadas solicitudes, por favor inténtelo más tarde.",
+ "voiceNotAvailable": "Parece que no tienes una voz instalada para este idioma.",
+ "openVoiceSettings": "Haz clic aquí para abrir los ajustes de voz",
+ "playAudio": "Jugar",
+ "stop": "Stop",
+ "grammarCopySCONJ": "Conjunción subordinante",
+ "grammarCopyNUM": "Número",
+ "grammarCopyVERB": "Verbo",
+ "grammarCopyAFFIX": "Coloque",
+ "grammarCopyPARTpos": "Partículas",
+ "grammarCopyADJ": "Adjetivo",
+ "grammarCopyCCONJ": "Conjunción de coordinación",
+ "grammarCopyPUNCT": "Puntuación",
+ "grammarCopyADV": "Adverbio",
+ "grammarCopyAUX": "Auxiliar",
+ "grammarCopySPACE": "Espacio",
+ "grammarCopySYM": "Símbolo",
+ "grammarCopyDET": "Determinante",
+ "grammarCopyPRON": "Pronombre",
+ "grammarCopyADP": "Adposición",
+ "grammarCopyPROPN": "Nombre propio",
+ "grammarCopyNOUN": "Sustantivo",
+ "grammarCopyINTJ": "Interjección",
+ "grammarCopyX": "Otros",
+ "grammarCopyFem": "Femenino",
+ "grammarCopy2": "Segunda persona",
+ "grammarCopyImp": "Imperativo",
+ "grammarCopyQest": "Pregunta",
+ "grammarCopyPerf": "Perfecto",
+ "grammarCopyAccNom": "Acusativo, Nominativo",
+ "grammarCopyObl": "Caso oblicuo",
+ "grammarCopyAct": "Activo",
+ "grammarCopyBrck": "Soporte",
+ "grammarCopyArt": "Artículo",
+ "grammarCopySing": "Singular",
+ "grammarCopyMasc": "Hombre",
+ "grammarCopyMod": "Modal",
+ "grammarCopyAdverbial": "Adverbial",
+ "grammarCopyPeri": "Perifrástico",
+ "grammarCopyDigit": "Dígitos",
+ "grammarCopyNot_proper": "No procede",
+ "grammarCopyCard": "Cardenal",
+ "grammarCopyProp": "Adecuado",
+ "grammarCopyDash": "Dash",
+ "grammarCopyYes": "Sí",
+ "grammarCopySemi": "Punto y coma",
+ "grammarCopyComm": "Coma",
+ "grammarCopyCnd": "Condicional",
+ "grammarCopyIntRel": "Interrogativo, relativo",
+ "grammarCopyAcc": "Acusativo",
+ "grammarCopyPartTag": "Partitivo",
+ "grammarCopyInt": "Preguntas",
+ "grammarCopyPast": "Anterior",
+ "grammarCopySup": "Superlativo",
+ "grammarCopyColo": "Colon",
+ "grammarCopy3": "Tercera persona",
+ "grammarCopyPlur": "Plural",
+ "grammarCopyNpr": "Nombre propio",
+ "grammarCopyInterrogative": "Preguntas",
+ "grammarCopyInfm": "Informal",
+ "grammarCopyTim": "Tiempo",
+ "grammarCopyNeg": "Negativo",
+ "grammarCopyTot": "Total",
+ "grammarCopyAdnomial": "Adnominal",
+ "grammarCopyProg": "Progresiva",
+ "grammarCopySub": "Subjuntivo",
+ "grammarCopyComplementive": "Complementive",
+ "grammarCopyNom": "Nominativo",
+ "grammarCopyFut": "Futuro",
+ "grammarCopyDat": "Dativo",
+ "grammarCopyPres": "Presente",
+ "grammarCopyNeut": "Esterilizar",
+ "grammarCopyRel": "Relativa",
+ "grammarCopyFinal_ending": "Final",
+ "grammarCopyDem": "Demostrativo",
+ "grammarCopyPre": "Preposición",
+ "grammarCopyFin": "Finito",
+ "grammarCopyPos": "Positivo",
+ "grammarCopyQuot": "Presupuesto",
+ "grammarCopyGer": "Redondo",
+ "grammarCopyPass": "Pasivo",
+ "grammarCopyGen": "Genitivo",
+ "grammarCopyPrs": "Presente",
+ "grammarCopyDef": "Definitivo",
+ "grammarCopyOrd": "Ordinal",
+ "grammarCopyIns": "Instrumental",
+ "grammarCopyAccDat": "Acusativo, Dativo",
+ "grammarCopyInf": "Infinitivo",
+ "grammarCopyLong": "Largo",
+ "grammarCopyLoc": "Locativa",
+ "grammarCopyInd": "Indicativo",
+ "grammarCopyCmp": "Comparativa",
+ "grammarCopyRelative_case": "Caso relativo",
+ "grammarCopyExcl": "Exclamativo",
+ "grammarCopy1": "En primera persona",
+ "grammarCopyIni": "Inicial",
+ "grammarCopyPerson": "Persona",
+ "grammarCopyForeign": "Extranjero",
+ "grammarCopyVoice": "Voz",
+ "grammarCopyVerbType": "Tipo de verbo",
+ "grammarCopyPoss": "Posesivo",
+ "grammarCopyPrepCase": "Caso preposicional",
+ "grammarCopyNumType": "Tipo de número",
+ "grammarCopyNounType": "Tipo de sustantivo",
+ "grammarCopyReflex": "Reflexivo",
+ "grammarCopyPronType": "Tipo de pronombre",
+ "grammarCopyPunctSide": "Puntuación Lado",
+ "grammarCopyVerbForm": "Forma verbal",
+ "grammarCopyGender": "Género",
+ "grammarCopyMood": "Estado de ánimo",
+ "grammarCopyAspect": "Aspecto",
+ "grammarCopyPunctType": "Tipo de puntuación",
+ "grammarCopyTense": "Tense",
+ "grammarCopyDegree": "Titulación",
+ "grammarCopyPolite": "Cortesía",
+ "grammarCopyAdvType": "Tipo de adverbio",
+ "grammarCopyNumber": "Número",
+ "grammarCopyConjType": "Tipo de conjunción",
+ "grammarCopyPolarity": "Polaridad",
+ "grammarCopyNumberPsor": "Número del poseedor",
+ "grammarCopyCase": "Caso",
+ "grammarCopyDefinite": "Definitividad",
+ "grammarCopyNumForm": "Forma numérica",
+ "grammarCopyUnknown": "Desconocido",
+ "enterPrompt": "Introduzca un mensaje del sistema",
+ "selectBotLanguage": "Selecciona el idioma del bot",
+ "chooseVoice": "Elige una voz",
+ "enterLanguageLevel": "Introduzca un nivel de idioma",
+ "enterDiscussionTopic": "Introduzca un tema de debate",
+ "selectBotChatMode": "Selecciona el modo de chat",
+ "messageNotInTargetLang": "El mensaje no está en la lengua de llegada",
+ "botConfig": "Configuración del chat",
+ "chatCapacityNotSet": "Este chat no tiene límite de capacidad.",
+ "spaceCapacityNotSet": "Este espacio no tiene límite de capacidad.",
+ "chatExceedsCapacity": "Este chat supera su capacidad.",
+ "spaceExceedsCapacity": "Este espacio supera su capacidad."
}
\ No newline at end of file
diff --git a/lib/config/app_config.dart b/lib/config/app_config.dart
index 5a0706fe8..ab05ffd99 100644
--- a/lib/config/app_config.dart
+++ b/lib/config/app_config.dart
@@ -23,6 +23,8 @@ abstract class AppConfig {
static const bool allowOtherHomeservers = true;
static const bool enableRegistration = true;
static const double toolbarMaxHeight = 300.0;
+ static const double toolbarMinHeight = 70.0;
+ static const double toolbarMinWidth = 270.0;
// #Pangea
// static const Color primaryColor = Color(0xFF5625BA);
// static const Color primaryColorLight = Color(0xFFCCBDEA);
diff --git a/lib/config/routes.dart b/lib/config/routes.dart
index 0ee135e7d..86a0ca75e 100644
--- a/lib/config/routes.dart
+++ b/lib/config/routes.dart
@@ -29,7 +29,6 @@ import 'package:fluffychat/pages/settings_style/settings_style.dart';
import 'package:fluffychat/pangea/guard/p_vguard.dart';
import 'package:fluffychat/pangea/pages/find_partner/find_partner.dart';
import 'package:fluffychat/pangea/pages/p_user_age/p_user_age.dart';
-import 'package:fluffychat/pangea/pages/settings_learning/settings_learning.dart';
import 'package:fluffychat/pangea/pages/settings_subscription/settings_subscription.dart';
import 'package:fluffychat/pangea/pages/sign_up/signup.dart';
import 'package:fluffychat/pangea/widgets/class/join_with_link.dart';
@@ -233,11 +232,7 @@ abstract class AppRoutes {
pageBuilder: (context, state) => defaultPageBuilder(
context,
state,
- NewGroup(
- // #Pangea
- spaceId: state.uri.queryParameters['spaceId'],
- // Pangea#
- ),
+ const NewGroup(),
),
redirect: loggedOutRedirect,
// #Pangea
@@ -410,15 +405,6 @@ abstract class AppRoutes {
],
),
// #Pangea
- GoRoute(
- path: 'learning',
- pageBuilder: (context, state) => defaultPageBuilder(
- context,
- state,
- const SettingsLearning(),
- ),
- redirect: loggedOutRedirect,
- ),
GoRoute(
path: 'subscription',
pageBuilder: (context, state) => defaultPageBuilder(
diff --git a/lib/main.dart b/lib/main.dart
index 6be6edc91..9f5e656bd 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -1,5 +1,6 @@
import 'package:collection/collection.dart';
import 'package:fluffychat/config/app_config.dart';
+import 'package:fluffychat/pangea/config/environment.dart';
import 'package:fluffychat/pangea/controllers/language_list_controller.dart';
import 'package:fluffychat/pangea/utils/error_handler.dart';
import 'package:fluffychat/pangea/utils/firebase_analytics.dart';
@@ -100,6 +101,19 @@ Future startGui(List clients, SharedPreferences store) async {
await firstClient?.accountDataLoading;
ErrorWidget.builder = (details) => FluffyChatErrorWidget(details);
+
+ // #Pangea
+ // errors seems to happen a lot when users switch better production / staging
+ // while testing by accident. If the account is a production account but server is
+ // staging or vice versa, logout.
+ if (firstClient?.userID?.domain != null) {
+ final isStagingUser = firstClient!.userID!.domain!.contains("staging");
+ final isStagingServer = Environment.isStaging;
+ if (isStagingServer != isStagingUser) {
+ await firstClient.logout();
+ }
+ }
+ // Pangea#
runApp(FluffyChatApp(clients: clients, pincode: pin, store: store));
}
diff --git a/lib/pages/chat/chat.dart b/lib/pages/chat/chat.dart
index a51a86b37..db5041623 100644
--- a/lib/pages/chat/chat.dart
+++ b/lib/pages/chat/chat.dart
@@ -485,6 +485,15 @@ class ChatController extends State
Future? setReadMarkerFuture;
void setReadMarker({String? eventId}) {
+ // #Pangea
+ if (room.client.userID == null ||
+ eventId != null &&
+ (eventId.contains("web") ||
+ eventId.contains("android") ||
+ eventId.contains("ios"))) {
+ return;
+ }
+ // Pangea#
if (setReadMarkerFuture != null) return;
if (_scrolledUp) return;
if (scrollUpBannerEventId != null) return;
@@ -560,6 +569,7 @@ class ChatController extends State
//#Pangea
choreographer.stateListener.close();
choreographer.dispose();
+ clearSelectedEvents();
MatrixState.pAnyState.closeOverlay();
//Pangea#
super.dispose();
@@ -1334,13 +1344,18 @@ class ChatController extends State
}
// Pangea#
- void clearSelectedEvents() => setState(() {
- // #Pangea
- closeSelectionOverlay();
- // Pangea#
- selectedEvents.clear();
- showEmojiPicker = false;
- });
+ void clearSelectedEvents() {
+ // #Pangea
+ if (!mounted) return;
+ // Pangea#
+ setState(() {
+ // #Pangea
+ closeSelectionOverlay();
+ // Pangea#
+ selectedEvents.clear();
+ showEmojiPicker = false;
+ });
+ }
void clearSingleSelectedEvent() {
if (selectedEvents.length <= 1) {
@@ -1405,7 +1420,7 @@ class ChatController extends State
void onSelectMessage(Event event) {
// #Pangea
- if (choreographer.itController.isOpen) {
+ if (choreographer.itController.willOpen) {
return;
}
// Pangea#
diff --git a/lib/pages/chat/chat_input_row.dart b/lib/pages/chat/chat_input_row.dart
index cc931ef12..57360d25d 100644
--- a/lib/pages/chat/chat_input_row.dart
+++ b/lib/pages/chat/chat_input_row.dart
@@ -321,6 +321,7 @@ class ChatInputRow extends StatelessWidget {
// #Pangea
// hintText: L10n.of(context)!.writeAMessage,
hintText: hintText(),
+ disabledBorder: InputBorder.none,
// Pangea#
hintMaxLines: 1,
border: InputBorder.none,
diff --git a/lib/pages/chat/events/audio_player.dart b/lib/pages/chat/events/audio_player.dart
index 3213d085f..c79fc9cb3 100644
--- a/lib/pages/chat/events/audio_player.dart
+++ b/lib/pages/chat/events/audio_player.dart
@@ -21,11 +21,18 @@ class AudioPlayerWidget extends StatefulWidget {
final Event? event;
final PangeaAudioFile? matrixFile;
final bool autoplay;
+ final Function(bool)? setIsPlayingAudio;
// Pangea#
static String? currentId;
- static const int wavesCount = 40;
+ // #Pangea
+ // static const int wavesCount = 40;
+ static const int wavesCount = kIsWeb ? 100 : 40;
+
+ final int? sectionStartMS;
+ final int? sectionEndMS;
+ // Pangea#
const AudioPlayerWidget(
this.event, {
@@ -33,6 +40,9 @@ class AudioPlayerWidget extends StatefulWidget {
// #Pangea
this.matrixFile,
this.autoplay = false,
+ this.sectionStartMS,
+ this.sectionEndMS,
+ this.setIsPlayingAudio,
// Pangea#
super.key,
});
@@ -72,6 +82,24 @@ class AudioPlayerState extends State {
super.dispose();
}
+ // #Pangea
+ // @override
+ // void didUpdateWidget(covariant oldWidget) {
+ // if ((oldWidget.sectionEndMS != widget.sectionEndMS) ||
+ // (oldWidget.sectionStartMS != widget.sectionStartMS)) {
+ // debugPrint('selection changed');
+ // if (widget.sectionStartMS != null) {
+ // audioPlayer?.seek(Duration(milliseconds: widget.sectionStartMS!));
+ // audioPlayer?.play();
+ // } else {
+ // audioPlayer?.stop();
+ // audioPlayer?.seek(null);
+ // }
+ // }
+ // super.didUpdateWidget(oldWidget);
+ // }
+ // Pangea#
+
Future _downloadAction() async {
// #Pangea
// if (status != AudioPlayerStatus.notDownloaded) return;
@@ -160,7 +188,16 @@ class AudioPlayerState extends State {
AudioPlayerWidget.wavesCount)
.round();
});
+ // #Pangea
+ // if (widget.sectionStartMS != null &&
+ // widget.sectionEndMS != null &&
+ // state.inMilliseconds.toDouble() >= widget.sectionEndMS!) {
+ // audioPlayer.stop();
+ // audioPlayer.seek(Duration(milliseconds: widget.sectionStartMS!));
+ // } else
if (state.inMilliseconds.toDouble() == maxPosition) {
+ // if (state.inMilliseconds.toDouble() == maxPosition) {
+ // Pangea#
audioPlayer.stop();
audioPlayer.seek(null);
}
@@ -169,8 +206,13 @@ class AudioPlayerState extends State {
if (max == null || max == Duration.zero) return;
setState(() => maxPosition = max.inMilliseconds.toDouble());
});
- onPlayerStateChanged ??=
- audioPlayer.playingStream.listen((_) => setState(() {}));
+ onPlayerStateChanged ??= audioPlayer.playingStream.listen(
+ (isPlaying) => setState(() {
+ // #Pangea
+ widget.setIsPlayingAudio?.call(isPlaying);
+ // Pangea#
+ }),
+ );
final audioFile = this.audioFile;
if (audioFile != null) {
audioPlayer.setFilePath(audioFile.path);
@@ -194,6 +236,11 @@ class AudioPlayerState extends State {
}
// Pangea#
}
+ // #Pangea
+ // if (widget.sectionStartMS != null) {
+ // audioPlayer.seek(Duration(milliseconds: widget.sectionStartMS!));
+ // }
+ // Pangea#
audioPlayer.play().onError(
ErrorReporter(context, 'Unable to play audio message')
.onErrorCallback,
@@ -311,6 +358,17 @@ class AudioPlayerState extends State {
final statusText = this.statusText ??= _durationString ?? '00:00';
final audioPlayer = this.audioPlayer;
+
+ // #Pangea
+ final msPerWave = (maxPosition / AudioPlayerWidget.wavesCount);
+ final int? startWave = widget.sectionStartMS != null && msPerWave > 0
+ ? (widget.sectionStartMS! / msPerWave).floor()
+ : null;
+ final int? endWave = widget.sectionEndMS != null && msPerWave > 0
+ ? (widget.sectionEndMS! / msPerWave).ceil()
+ : null;
+ // Pangea#
+
return Padding(
// #Pangea
// padding: const EdgeInsets.all(12.0),
@@ -352,44 +410,98 @@ class AudioPlayerState extends State {
// #Pangea
// const SizedBox(width: 8),
const SizedBox(width: 5),
- // Pangea#
+ // Row(
+ // mainAxisSize: MainAxisSize.min,
+ // children: [
+ // for (var i = 0; i < AudioPlayerWidget.wavesCount; i++)
+ // GestureDetector(
+ // onTapDown: (_) => audioPlayer?.seek(
+ // Duration(
+ // milliseconds:
+ // (maxPosition / AudioPlayerWidget.wavesCount).round() *
+ // i,
+ // ),
+ // ),
+ // child: Container(
+ // height: 32,
+ // color: widget.color.withAlpha(0),
+ // alignment: Alignment.center,
+ // child: Opacity(
+ // opacity: currentPosition > i ? 1 : 0.5,
+ // child: Container(
+ // margin: const EdgeInsets.symmetric(horizontal: 1),
+ // decoration: BoxDecoration(
+ // color: widget.color,
+ // borderRadius: BorderRadius.circular(2),
+ // ),
+ // // #Pangea
+ // // width: 2,
+ // width: 1,
+ // // Pangea#
+ // height: 32 * (waveform[i] / 1024),
+ // ),
+ // ),
+ // ),
+ // ),
+ // ],
+ // ),
+ // const SizedBox(width: 8),
Row(
- mainAxisSize: MainAxisSize.min,
children: [
for (var i = 0; i < AudioPlayerWidget.wavesCount; i++)
- GestureDetector(
- onTapDown: (_) => audioPlayer?.seek(
- Duration(
- milliseconds:
- (maxPosition / AudioPlayerWidget.wavesCount).round() *
- i,
- ),
- ),
- child: Container(
- height: 32,
- color: widget.color.withAlpha(0),
- alignment: Alignment.center,
- child: Opacity(
- opacity: currentPosition > i ? 1 : 0.5,
- child: Container(
- margin: const EdgeInsets.symmetric(horizontal: 1),
- decoration: BoxDecoration(
- color: widget.color,
- borderRadius: BorderRadius.circular(2),
- ),
- // #Pangea
- // width: 2,
- width: 1,
- // Pangea#
- height: 32 * (waveform[i] / 1024),
+ Builder(
+ builder: (context) {
+ final double barOpacity = currentPosition > i ? 1 : 0.5;
+ return GestureDetector(
+ onTapDown: (_) {
+ audioPlayer?.seek(
+ Duration(
+ milliseconds:
+ (maxPosition / AudioPlayerWidget.wavesCount)
+ .round() *
+ i,
+ ),
+ );
+ },
+ child: Stack(
+ children: [
+ Container(
+ margin: const EdgeInsets.symmetric(
+ horizontal: 0.5,
+ ),
+ decoration: BoxDecoration(
+ color: widget.color.withOpacity(barOpacity),
+ borderRadius: BorderRadius.circular(2),
+ ),
+ height: 32 * (waveform[i] / 1024),
+ width: 3,
+ ),
+ ],
),
- ),
- ),
+ );
+ // return Container(
+ // height: 32,
+ // width: 2,
+ // alignment: Alignment.center,
+ // child: Opacity(
+ // opacity: barOpacity,
+ // child: Container(
+ // margin: const EdgeInsets.symmetric(
+ // horizontal: 1,
+ // ),
+ // decoration: BoxDecoration(
+ // color: widget.color,
+ // borderRadius: BorderRadius.circular(2),
+ // ),
+ // height: 32 * (waveform[i] / 1024),
+ // width: 2,
+ // ),
+ // ),
+ // );
+ },
),
],
),
- // #Pangea
- // const SizedBox(width: 8),
const SizedBox(width: 5),
// SizedBox(
// width: 36,
diff --git a/lib/pages/chat/events/message.dart b/lib/pages/chat/events/message.dart
index a5e60687d..ba8e35ae2 100644
--- a/lib/pages/chat/events/message.dart
+++ b/lib/pages/chat/events/message.dart
@@ -186,7 +186,11 @@ class Message extends StatelessWidget {
if (animateIn && resetAnimateIn != null) {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
animateIn = false;
- setState(resetAnimateIn);
+ // #Pangea
+ if (context.mounted) {
+ // Pangea#
+ setState(resetAnimateIn);
+ }
});
}
return AnimatedSize(
diff --git a/lib/pages/chat/events/message_content.dart b/lib/pages/chat/events/message_content.dart
index 2cddb6f67..4e21f00ac 100644
--- a/lib/pages/chat/events/message_content.dart
+++ b/lib/pages/chat/events/message_content.dart
@@ -123,7 +123,6 @@ class MessageContent extends StatelessWidget {
@override
Widget build(BuildContext context) {
- // debugger(when: overlayController != null);
final fontSize = AppConfig.messageFontSize * AppConfig.fontSizeFactor;
final buttonTextColor = textColor;
switch (event.type) {
@@ -307,7 +306,6 @@ class MessageContent extends StatelessWidget {
height: 1.3,
);
- // debugger(when: overlayController != null);
if (overlayController != null && pangeaMessageEvent != null) {
return OverlayMessageText(
pangeaMessageEvent: pangeaMessageEvent!,
diff --git a/lib/pages/chat/input_bar.dart b/lib/pages/chat/input_bar.dart
index c0939f278..347d68786 100644
--- a/lib/pages/chat/input_bar.dart
+++ b/lib/pages/chat/input_bar.dart
@@ -478,6 +478,8 @@ class InputBar extends StatelessWidget {
// builder: (context, controller, focusNode) => TextField(
builder: (context, _, focusNode) => TextField(
enableSuggestions: false,
+ readOnly:
+ controller != null && controller!.choreographer.isRunningIT,
// Pangea#
controller: controller,
focusNode: focusNode,
diff --git a/lib/pages/chat_details/chat_details.dart b/lib/pages/chat_details/chat_details.dart
index 050a1b272..a94430da1 100644
--- a/lib/pages/chat_details/chat_details.dart
+++ b/lib/pages/chat_details/chat_details.dart
@@ -5,7 +5,6 @@ import 'package:fluffychat/pages/chat_details/chat_details_view.dart';
import 'package:fluffychat/pages/settings/settings.dart';
import 'package:fluffychat/pangea/pages/class_settings/p_class_widgets/class_description_button.dart';
import 'package:fluffychat/pangea/utils/set_class_name.dart';
-import 'package:fluffychat/pangea/widgets/class/add_space_toggles.dart';
import 'package:fluffychat/utils/platform_infos.dart';
import 'package:fluffychat/widgets/app_lock.dart';
import 'package:fluffychat/widgets/matrix.dart';
@@ -41,9 +40,7 @@ class ChatDetailsController extends State {
String? get roomId => widget.roomId;
// #Pangea
- final GlobalKey addToSpaceKey = GlobalKey();
- final GlobalKey
- addConversationBotKey =
+ final GlobalKey addConversationBotKey =
GlobalKey();
bool displayAddStudentOptions = false;
diff --git a/lib/pages/chat_details/chat_details_view.dart b/lib/pages/chat_details/chat_details_view.dart
index edf277e86..72441e450 100644
--- a/lib/pages/chat_details/chat_details_view.dart
+++ b/lib/pages/chat_details/chat_details_view.dart
@@ -7,10 +7,8 @@ import 'package:fluffychat/pangea/pages/class_settings/class_name_header.dart';
import 'package:fluffychat/pangea/pages/class_settings/p_class_widgets/class_description_button.dart';
import 'package:fluffychat/pangea/pages/class_settings/p_class_widgets/class_details_toggle_add_students_tile.dart';
import 'package:fluffychat/pangea/pages/class_settings/p_class_widgets/class_invitation_buttons.dart';
-import 'package:fluffychat/pangea/pages/class_settings/p_class_widgets/class_name_button.dart';
import 'package:fluffychat/pangea/pages/class_settings/p_class_widgets/room_capacity_button.dart';
import 'package:fluffychat/pangea/utils/lock_room.dart';
-import 'package:fluffychat/pangea/widgets/class/add_space_toggles.dart';
import 'package:fluffychat/pangea/widgets/conversation_bot/conversation_bot_settings.dart';
import 'package:fluffychat/utils/fluffy_share.dart';
import 'package:fluffychat/utils/matrix_sdk_extensions/matrix_locals.dart';
@@ -214,11 +212,6 @@ class ChatDetailsView extends StatelessWidget {
),
Divider(color: theme.dividerColor),
// #Pangea
- if (room.isRoomAdmin)
- ClassNameButton(
- room: room,
- controller: controller,
- ),
if (room.canSendEvent('m.room.topic'))
ClassDescriptionButton(
room: room,
@@ -395,13 +388,6 @@ class ChatDetailsView extends StatelessWidget {
room: room,
),
const Divider(height: 1),
- if (!room.isDirectChat && room.isRoomAdmin)
- AddToSpaceToggles(
- roomId: room.id,
- key: controller.addToSpaceKey,
- startOpen: false,
- ),
- const Divider(height: 1),
ListTile(
title: Text(
L10n.of(context)!.leave,
diff --git a/lib/pages/chat_list/chat_list_header.dart b/lib/pages/chat_list/chat_list_header.dart
index 4c018355c..1f7a1fbe9 100644
--- a/lib/pages/chat_list/chat_list_header.dart
+++ b/lib/pages/chat_list/chat_list_header.dart
@@ -23,7 +23,10 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget {
return SliverAppBar(
floating: true,
- toolbarHeight: 175,
+ // #Pangea
+ // toolbarHeight: 72,
+ toolbarHeight: controller.isSearchMode ? 72 : 175,
+ // Pangea#
pinned:
FluffyThemes.isColumnMode(context) || selectMode != SelectMode.normal,
scrolledUnderElevation: selectMode == SelectMode.normal ? 0 : null,
@@ -32,111 +35,124 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget {
// selectMode == SelectMode.normal ? Colors.transparent : null,
// Pangea#
automaticallyImplyLeading: false,
- leading: selectMode == SelectMode.normal
- ? null
- : IconButton(
- tooltip: L10n.of(context)!.cancel,
- icon: const Icon(Icons.close_outlined),
- onPressed: controller.cancelAction,
- color: theme.colorScheme.primary,
- ),
- title: selectMode == SelectMode.share
- ? Text(
- L10n.of(context)!.share,
- key: const ValueKey(SelectMode.share),
- )
+ // #Pangea
+ // leading: selectMode == SelectMode.normal
+ // ? null
+ // : IconButton(
+ // tooltip: L10n.of(context)!.cancel,
+ // icon: const Icon(Icons.close_outlined),
+ // onPressed: controller.cancelAction,
+ // color: theme.colorScheme.primary,
+ // ),
+ // Pangea#
+ title:
// #Pangea
- : Column(
- children: [
- ClientChooserButton(controller),
- const LearningProgressIndicators(),
- ],
+ // selectMode == SelectMode.share
+ // ? Text(
+ // L10n.of(context)!.share,
+ // key: const ValueKey(SelectMode.share),
+ // )
+ // :
+ // Pangea#
+ Column(
+ children: [
+ TextField(
+ controller: controller.searchController,
+ focusNode: controller.searchFocusNode,
+ textInputAction: TextInputAction.search,
+ onChanged: (text) => controller.onSearchEnter(
+ text,
+ globalSearch: globalSearch,
),
- // : TextField(
- // controller: controller.searchController,
- // focusNode: controller.searchFocusNode,
- // textInputAction: TextInputAction.search,
- // onChanged: (text) => controller.onSearchEnter(
- // text,
- // globalSearch: globalSearch,
- // ),
- // decoration: InputDecoration(
- // filled: true,
- // fillColor: theme.colorScheme.secondaryContainer,
- // border: OutlineInputBorder(
- // borderSide: BorderSide.none,
- // borderRadius: BorderRadius.circular(99),
- // ),
- // contentPadding: EdgeInsets.zero,
- // hintText: L10n.of(context)!.searchChatsRooms,
- // hintStyle: TextStyle(
- // color: theme.colorScheme.onPrimaryContainer,
- // fontWeight: FontWeight.normal,
- // ),
- // floatingLabelBehavior: FloatingLabelBehavior.never,
- // prefixIcon: controller.isSearchMode
- // ? IconButton(
- // tooltip: L10n.of(context)!.cancel,
- // icon: const Icon(Icons.close_outlined),
- // onPressed: controller.cancelSearch,
- // color: theme.colorScheme.onPrimaryContainer,
- // )
- // : IconButton(
- // onPressed: controller.startSearch,
- // icon: Icon(
- // Icons.search_outlined,
- // color: theme.colorScheme.onPrimaryContainer,
- // ),
- // ),
- // suffixIcon: controller.isSearchMode && globalSearch
- // ? controller.isSearching
- // ? const Padding(
- // padding: EdgeInsets.symmetric(
- // vertical: 10.0,
- // horizontal: 12,
- // ),
- // child: SizedBox.square(
- // dimension: 24,
- // child: CircularProgressIndicator.adaptive(
- // strokeWidth: 2,
- // ),
- // ),
- // )
- // : TextButton.icon(
- // onPressed: controller.setServer,
- // style: TextButton.styleFrom(
- // shape: RoundedRectangleBorder(
- // borderRadius: BorderRadius.circular(99),
- // ),
- // textStyle: const TextStyle(fontSize: 12),
- // ),
- // icon: const Icon(Icons.edit_outlined, size: 16),
- // label: Text(
- // controller.searchServer ??
- // Matrix.of(context).client.homeserver!.host,
- // maxLines: 2,
- // ),
- // )
- // : SizedBox(
- // width: 0,
- // child: ClientChooserButton(controller),
- // ),
- // ),
- // ),
+ decoration: InputDecoration(
+ filled: true,
+ fillColor: theme.colorScheme.secondaryContainer,
+ border: OutlineInputBorder(
+ borderSide: BorderSide.none,
+ borderRadius: BorderRadius.circular(99),
+ ),
+ contentPadding: EdgeInsets.zero,
+ hintText: L10n.of(context)!.searchChatsRooms,
+ hintStyle: TextStyle(
+ color: theme.colorScheme.onPrimaryContainer,
+ fontWeight: FontWeight.normal,
+ ),
+ floatingLabelBehavior: FloatingLabelBehavior.never,
+ prefixIcon: controller.isSearchMode
+ ? IconButton(
+ tooltip: L10n.of(context)!.cancel,
+ icon: const Icon(Icons.close_outlined),
+ onPressed: controller.cancelSearch,
+ color: theme.colorScheme.onPrimaryContainer,
+ )
+ : IconButton(
+ onPressed: controller.startSearch,
+ icon: Icon(
+ Icons.search_outlined,
+ color: theme.colorScheme.onPrimaryContainer,
+ ),
+ ),
+ suffixIcon: controller.isSearchMode && globalSearch
+ ? controller.isSearching
+ ? const Padding(
+ padding: EdgeInsets.symmetric(
+ vertical: 10.0,
+ horizontal: 12,
+ ),
+ child: SizedBox.square(
+ dimension: 24,
+ child: CircularProgressIndicator.adaptive(
+ strokeWidth: 2,
+ ),
+ ),
+ )
+ // #Pangea
+ : SizedBox(
+ width: 0,
+ child: ClientChooserButton(controller),
+ )
+ // : TextButton.icon(
+ // onPressed: controller.setServer,
+ // style: TextButton.styleFrom(
+ // shape: RoundedRectangleBorder(
+ // borderRadius: BorderRadius.circular(99),
+ // ),
+ // textStyle: const TextStyle(fontSize: 12),
+ // ),
+ // icon: const Icon(Icons.edit_outlined, size: 16),
+ // label: Text(
+ // controller.searchServer ??
+ // Matrix.of(context).client.homeserver!.host,
+ // maxLines: 2,
+ // ),
+ // )
+ // Pangea#
+ : SizedBox(
+ width: 0,
+ child: ClientChooserButton(controller),
+ ),
+ ),
+ ),
+ if (!controller.isSearchMode)
+ const Padding(
+ padding: EdgeInsets.only(top: 16.0),
+ child: LearningProgressIndicators(),
+ ),
+ ],
+ ),
+ // #Pangea
+ // actions: selectMode == SelectMode.share
+ // ? [
+ // Padding(
+ // padding: const EdgeInsets.symmetric(
+ // horizontal: 16.0,
+ // vertical: 8.0,
+ // ),
+ // child: ClientChooserButton(controller),
+ // ),
+ // ]
+ // : null,
// Pangea#
- actions: selectMode == SelectMode.share
- ? [
- // #Pangea
- // Padding(
- // padding: const EdgeInsets.symmetric(
- // horizontal: 16.0,
- // vertical: 8.0,
- // ),
- // child: ClientChooserButton(controller),
- // ),
- // Pangea#
- ]
- : null,
);
}
diff --git a/lib/pages/chat_list/client_chooser_button.dart b/lib/pages/chat_list/client_chooser_button.dart
index 0a406fa2c..0ac5ff0a8 100644
--- a/lib/pages/chat_list/client_chooser_button.dart
+++ b/lib/pages/chat_list/client_chooser_button.dart
@@ -1,15 +1,16 @@
import 'package:adaptive_dialog/adaptive_dialog.dart';
-import 'package:fluffychat/pangea/utils/find_conversation_partner_dialog.dart';
+import 'package:fluffychat/pangea/pages/settings_learning/settings_learning.dart';
import 'package:fluffychat/pangea/utils/logout.dart';
import 'package:fluffychat/pangea/utils/space_code.dart';
+import 'package:fluffychat/widgets/avatar.dart';
import 'package:fluffychat/widgets/matrix.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:go_router/go_router.dart';
+// import 'package:keyboard_shortcuts/keyboard_shortcuts.dart';
import 'package:matrix/matrix.dart';
-import '../../utils/fluffy_share.dart';
import 'chat_list.dart';
class ClientChooserButton extends StatelessWidget {
@@ -42,34 +43,6 @@ class ClientChooserButton extends StatelessWidget {
),
),
// PopupMenuItem(
- // enabled: matrix.client.rooms.any(
- // (room) =>
- // room.isSpace &&
- // room.ownPowerLevel >= ClassDefaultValues.powerLevelOfAdmin,
- // ),
- // value: SettingsAction.spaceAnalytics,
- // child: Row(
- // children: [
- // const Icon(Icons.analytics_outlined),
- // const SizedBox(width: 18),
- // Expanded(child: Text(L10n.of(context)!.spaceAnalytics)),
- // ],
- // ),
- // ),
- // PopupMenuItem(
- // enabled: matrix.client.rooms.any(
- // (room) => !room.isSpace && !room.isArchived && !room.isAnalyticsRoom,
- // ),
- // value: SettingsAction.myAnalytics,
- // child: Row(
- // children: [
- // const Icon(Icons.analytics_outlined),
- // const SizedBox(width: 18),
- // Expanded(child: Text(L10n.of(context)!.myLearning)),
- // ],
- // ),
- // ),
- // PopupMenuItem(
// value: SettingsAction.newGroup,
// child: Row(
// children: [
@@ -87,13 +60,23 @@ class ClientChooserButton extends StatelessWidget {
const Icon(Icons.workspaces_outlined),
const SizedBox(width: 18),
// #Pangea
- Expanded(child: Text(L10n.of(context)!.createNewSpace)),
+ Text(L10n.of(context)!.createNewSpace),
// Text(L10n.of(context)!.createNewSpace),
// Pangea#
],
),
),
// #Pangea
+ PopupMenuItem(
+ value: SettingsAction.learning,
+ child: Row(
+ children: [
+ const Icon(Icons.psychology_outlined),
+ const SizedBox(width: 18),
+ Expanded(child: Text(L10n.of(context)!.learningSettings)),
+ ],
+ ),
+ ),
// PopupMenuItem(
// value: SettingsAction.setStatus,
// child: Row(
@@ -123,36 +106,34 @@ class ClientChooserButton extends StatelessWidget {
children: [
const Icon(Icons.archive_outlined),
const SizedBox(width: 18),
- Text(L10n.of(context)!.archive),
+ Text(L10n.of(context)!!.archive),
],
),
),*/
- // #Pangea
PopupMenuItem(
- value: SettingsAction.learning,
+ value: SettingsAction.settings,
child: Row(
children: [
- const Icon(Icons.psychology_outlined),
+ const Icon(Icons.settings_outlined),
const SizedBox(width: 18),
- Expanded(child: Text(L10n.of(context)!.learningSettings)),
+ // #Pangea
+ Text(L10n.of(context)!.settings),
+ // Text(L10n.of(context)!.settings),
+ // Pangea#
],
),
),
- // Pangea#
+ // #Pangea
PopupMenuItem(
- value: SettingsAction.settings,
+ value: SettingsAction.logout,
child: Row(
children: [
- const Icon(Icons.settings_outlined),
+ const Icon(Icons.logout_outlined),
const SizedBox(width: 18),
- // #Pangea
- // Text(L10n.of(context)!.settings),
- Expanded(child: Text(L10n.of(context)!.settings)),
- // Pangea#
+ Expanded(child: Text(L10n.of(context)!.logout)),
],
),
),
- // #Pangea
// const PopupMenuDivider(),
// for (final bundle in bundles) ...[
// if (matrix.accountBundles[bundle]!.length != 1 ||
@@ -223,16 +204,6 @@ class ClientChooserButton extends StatelessWidget {
// ],
// ),
// ),
- PopupMenuItem(
- value: SettingsAction.logout,
- child: Row(
- children: [
- const Icon(Icons.logout_outlined),
- const SizedBox(width: 18),
- Expanded(child: Text(L10n.of(context)!.logout)),
- ],
- ),
- ),
// Pangea#
];
}
@@ -243,76 +214,71 @@ class ClientChooserButton extends StatelessWidget {
var clientCount = 0;
matrix.accountBundles.forEach((key, value) => clientCount += value.length);
- return FutureBuilder(
- future: matrix.client.fetchOwnProfile(),
- builder: (context, snapshot) => Stack(
- alignment: Alignment.center,
- children: [
- // #Pangea
- // ...List.generate(
- // clientCount,
- // (index) => KeyBoardShortcuts(
- // keysToPress: _buildKeyboardShortcut(index + 1),
- // helpLabel: L10n.of(context)!.switchToAccount(index + 1),
- // onKeysPressed: () => _handleKeyboardShortcut(
- // matrix,
- // index,
- // context,
- // ),
- // child: const SizedBox.shrink(),
- // ),
- // ),
- // KeyBoardShortcuts(
- // keysToPress: {
- // LogicalKeyboardKey.controlLeft,
- // LogicalKeyboardKey.tab,
- // },
- // helpLabel: L10n.of(context)!.nextAccount,
- // onKeysPressed: () => _nextAccount(matrix, context),
- // child: const SizedBox.shrink(),
- // ),
- // KeyBoardShortcuts(
- // keysToPress: {
- // LogicalKeyboardKey.controlLeft,
- // LogicalKeyboardKey.shiftLeft,
- // LogicalKeyboardKey.tab,
- // },
- // helpLabel: L10n.of(context)!.previousAccount,
- // onKeysPressed: () => _previousAccount(matrix, context),
- // child: const SizedBox.shrink(),
- // ),
- ClipRRect(
- borderRadius: BorderRadius.circular(16),
- child: Material(
- color: Colors.transparent,
- child:
- // Pangea#
- PopupMenuButton