update analytics access request copy

change copy to reflect that only requesting admins can view analytics (from both ends), and also includes a list of requesting admins to see who user is giving access to.
This commit is contained in:
avashilling 2025-11-05 11:44:37 -05:00
parent a0d6d6360f
commit d311b8e955
3 changed files with 21 additions and 13 deletions

View file

@ -5052,8 +5052,8 @@
"requestSummaries": "Request summaries",
"loadingActivitySummary": "Loading activity summary...",
"generatingNewActivities": "You're the first user of this language pair! Please give us a minute, we're preparing activities just for you.",
"requestAccessTitle": "Request to analytics view access?",
"requestAccessDesc": "Would you like to request access to view participant analytics?\n\nIf participants agree, admins of this course will be able to view their:\n • total vocabulary\n • total grammar concepts\n • total activity sessions completed\n • the specific grammar concepts used, correctly and incorrectly\n\nThey will not be able to view their:\n • messages in chats outside the course\n • vocabulary list",
"requestAccessTitle": "Request analytics access?",
"requestAccessDesc": "Would you like to request access to view participant analytics?\n\nIf participants agree, you will be able to view their:\n • total vocabulary\n • total grammar concepts\n • total activity sessions completed\n • the specific grammar concepts used, correctly and incorrectly\n\nYou will not be able to view their:\n • messages in chats outside the course\n • vocabulary list",
"requestAccess": "Request access ({count})",
"@requestAccess": {
"type": "String",
@ -5066,10 +5066,13 @@
"analyticsInactiveTitle": "Requests to inactive users couldnt be sent",
"analyticsInactiveDesc": "Inactive users who haven't logged in since this feature was introduced won't see your request.\n\nThe Request button will appear once they return. You can resend the request later by clicking the Request button under their name when it's available.",
"accessRequestedTitle": "Analytics Access Request",
"accessRequestedDesc": "The administrators of “{space}” are requesting to view your learning analytics.\n\nIf you agree, admins of this course will be able to view your:\n • total vocabulary\n • total grammar concepts\n • total activity sessions completed\n • the specific grammar concepts used, correctly and incorrectly\n\nThey will not be able to view your:\n • messages in chats outside the course\n • vocabulary list",
"accessRequestedDesc": "Requesting admin(s): {admin} \n\nAdmins from “{space}” are requesting to view your learning analytics.\n\nIf you agree, They will be able to view your:\n • total vocabulary\n • total grammar concepts\n • total activity sessions completed\n • the specific grammar concepts used, correctly and incorrectly\n\nThey will not be able to view your:\n • messages in chats outside the course\n • vocabulary list",
"@accessRequestedDesc": {
"type": "String",
"placeholders": {
"admin": {
"type": "String"
},
"space": {
"type": "String"
}

View file

@ -1,15 +1,13 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:matrix/matrix.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/config/themes.dart';
import 'package:fluffychat/l10n/l10n.dart';
import 'package:fluffychat/pangea/analytics_misc/client_analytics_extension.dart';
import 'package:fluffychat/pangea/space_analytics/space_analytics_requested_dialog.dart';
import 'package:fluffychat/widgets/future_loading_dialog.dart';
import 'package:flutter/material.dart';
import 'package:matrix/matrix.dart';
class AnalyticsRequestIndicator extends StatefulWidget {
final Room room;
@ -70,10 +68,14 @@ class AnalyticsRequestIndicatorState extends State<AnalyticsRequestIndicator> {
}
Future<void> _onTap(BuildContext context) async {
final requestingUsers = _knockingAdmins.keys.toList();
final resp = await showDialog(
context: context,
builder: (context) {
return SpaceAnalyticsRequestedDialog(room: widget.room);
return SpaceAnalyticsRequestedDialog(
room: widget.room,
requestingUsers: requestingUsers,
);
},
);

View file

@ -1,20 +1,20 @@
import 'package:flutter/material.dart';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:material_symbols_icons/symbols.dart';
import 'package:matrix/matrix.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/config/themes.dart';
import 'package:fluffychat/l10n/l10n.dart';
import 'package:fluffychat/pangea/analytics_page/analytics_page_constants.dart';
import 'package:fluffychat/pangea/common/widgets/full_width_dialog.dart';
import 'package:flutter/material.dart';
import 'package:material_symbols_icons/symbols.dart';
import 'package:matrix/matrix.dart';
class SpaceAnalyticsRequestedDialog extends StatelessWidget {
final Room room;
final List<User> requestingUsers;
const SpaceAnalyticsRequestedDialog({
super.key,
required this.room,
required this.requestingUsers,
});
@override
@ -39,6 +39,9 @@ class SpaceAnalyticsRequestedDialog extends StatelessWidget {
),
Text(
L10n.of(context).accessRequestedDesc(
requestingUsers
.map((u) => u.calcDisplayname())
.join(", "),
room.getLocalizedDisplayname(),
),
style: TextStyle(fontSize: isColumnMode ? 16.0 : 14.0),