Merge branch 'main' into merge-main-into-production
This commit is contained in:
commit
f0b8bc79aa
8 changed files with 35 additions and 48 deletions
30
.github/workflows/issue_closed.yaml
vendored
30
.github/workflows/issue_closed.yaml
vendored
|
|
@ -17,33 +17,3 @@ jobs:
|
|||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
NUMBER: ${{ github.event.issue.number }}
|
||||
- name: Set project ID
|
||||
run: |
|
||||
echo "PROJECT_ID=PVT_kwDOBndSo84A7FWL" >> $GITHUB_ENV
|
||||
- name: Get item ID for issue in project
|
||||
id: get_item_id
|
||||
run: |
|
||||
ITEM_ID=$(gh api graphql -f query='query { repository(owner: "${{ github.repository_owner }}", name: "${{ github.event.repository.name }}") { issue(number: ${{ github.event.issue.number }}) { projectItems(first: 10) { nodes { id project { id } } } } }' --jq '.data.repository.issue.projectItems.nodes[] | select(.project.id==env.PROJECT_ID) | .id')
|
||||
echo "ITEM_ID=$ITEM_ID" >> $GITHUB_ENV
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Get status field and Done option IDs
|
||||
id: get_status_ids
|
||||
run: |
|
||||
STATUS_FIELD_ID=$(gh api graphql -f query='query { node(id: "'$PROJECT_ID'") { ... on ProjectV2 { fields(first: 20) { nodes { id name } } } } }' --jq '.data.node.fields.nodes[] | select(.name=="Status") | .id')
|
||||
DONE_OPTION_ID=$(gh api graphql -f query='query { node(id: "'$STATUS_FIELD_ID'") { ... on ProjectV2Field { options { id name } } } }' --jq '.data.node.options[] | select(.name=="Done") | .id')
|
||||
echo "STATUS_FIELD_ID=$STATUS_FIELD_ID" >> $GITHUB_ENV
|
||||
echo "DONE_OPTION_ID=$DONE_OPTION_ID" >> $GITHUB_ENV
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Set status to Done in project
|
||||
run: |
|
||||
gh api graphql -f query='mutation($project:ID!, $item:ID!, $field:ID!, $option:ID!) { updateProjectV2ItemFieldValue(input: {projectId: $project, itemId: $item, fieldId: $field, value: { singleSelectOptionId: $option } }) { projectV2Item { id } } }' -f project=$PROJECT_ID -f item=$ITEM_ID -f field=$STATUS_FIELD_ID -f option=$DONE_OPTION_ID
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PROJECT_ID: ${{ env.PROJECT_ID }}
|
||||
ITEM_ID: ${{ env.ITEM_ID }}
|
||||
STATUS_FIELD_ID: ${{ env.STATUS_FIELD_ID }}
|
||||
DONE_OPTION_ID: ${{ env.DONE_OPTION_ID }}
|
||||
# To get your project, field, and option IDs, see the instructions in the new issue_opened_project.yaml file.
|
||||
# You must replace the placeholders with your actual project and field IDs.
|
||||
|
|
|
|||
|
|
@ -61,24 +61,25 @@ class LoginController extends State<Login> {
|
|||
// TODO: implement initState
|
||||
super.initState();
|
||||
loadingSignIn = true;
|
||||
pangeaController.checkHomeServerAction().then((value) {
|
||||
setState(() {
|
||||
loadingSignIn = false;
|
||||
});
|
||||
pangeaController.checkHomeServerAction().then((client) {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
loadingSignIn = false;
|
||||
this.client = client;
|
||||
});
|
||||
}
|
||||
}).catchError((e) {
|
||||
final String err = e.toString();
|
||||
setState(() {
|
||||
loadingSignIn = false;
|
||||
passwordError = err.toLocalizedString(context);
|
||||
});
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
loadingSignIn = false;
|
||||
passwordError = err.toLocalizedString(context);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
usernameController.addListener(() => setState(() {}));
|
||||
passwordController.addListener(() => setState(() {}));
|
||||
|
||||
Matrix.of(context).getLoginClient().then((client) {
|
||||
if (mounted) setState(() => this.client = client);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -276,6 +276,7 @@ extension ActivityRoomExtension on Room {
|
|||
activityResults: messages,
|
||||
contentFeedback: [],
|
||||
analytics: analytics,
|
||||
roleState: activityRoles,
|
||||
),
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ class _ActivityStatsButtonState extends State<ActivityStatsButton> {
|
|||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
_StatsBadge(
|
||||
icon: Icons.radar,
|
||||
icon: Icons.star,
|
||||
value: "$_xpCount XP",
|
||||
),
|
||||
_StatsBadge(
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
// Add this import for the participant summary model
|
||||
|
||||
import 'package:fluffychat/pangea/activity_planner/activity_plan_model.dart';
|
||||
import 'package:fluffychat/pangea/activity_sessions/activity_roles_model.dart';
|
||||
import 'package:fluffychat/pangea/activity_summary/activity_summary_analytics_model.dart';
|
||||
import 'package:fluffychat/pangea/activity_summary/activity_summary_response_model.dart';
|
||||
|
||||
|
|
@ -66,6 +67,7 @@ class ContentFeedbackModel {
|
|||
|
||||
class ActivitySummaryRequestModel {
|
||||
final ActivityPlanModel activity;
|
||||
final ActivityRolesModel? roleState;
|
||||
final List<ActivitySummaryResultsMessage> activityResults;
|
||||
final List<ContentFeedbackModel> contentFeedback;
|
||||
final ActivitySummaryAnalyticsModel analytics;
|
||||
|
|
@ -75,6 +77,7 @@ class ActivitySummaryRequestModel {
|
|||
required this.activityResults,
|
||||
required this.contentFeedback,
|
||||
required this.analytics,
|
||||
this.roleState,
|
||||
});
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
|
|
@ -83,6 +86,7 @@ class ActivitySummaryRequestModel {
|
|||
'activity_results': activityResults.map((e) => e.toJson()).toList(),
|
||||
'content_feedback': contentFeedback.map((e) => e.toJson()).toList(),
|
||||
'analytics': analytics.toJson(),
|
||||
'role_state': roleState?.toJson() ?? {},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,9 @@ void chatListHandleSpaceTap(
|
|||
Room space,
|
||||
) {
|
||||
void setActiveSpaceAndCloseChat() {
|
||||
context.go("/rooms/spaces/${space.id}/details");
|
||||
// push to refresh space details
|
||||
// https://github.com/pangeachat/client/issues/4292#issuecomment-3426794043
|
||||
context.push("/rooms/spaces/${space.id}/details");
|
||||
}
|
||||
|
||||
void autoJoin(Room space) {
|
||||
|
|
|
|||
|
|
@ -142,11 +142,11 @@ class PangeaController {
|
|||
await Future.wait(futures);
|
||||
}
|
||||
|
||||
Future<void> checkHomeServerAction() async {
|
||||
Future<Client> checkHomeServerAction() async {
|
||||
final client = await matrixState.getLoginClient();
|
||||
if (client.homeserver != null) {
|
||||
await Future.delayed(Duration.zero);
|
||||
return;
|
||||
return client;
|
||||
}
|
||||
|
||||
final String homeServer =
|
||||
|
|
@ -163,8 +163,7 @@ class PangeaController {
|
|||
matrixState.loginRegistrationSupported =
|
||||
e.requireAdditionalAuthentication;
|
||||
}
|
||||
|
||||
// setState(() => error = (e).toLocalizedString(context));
|
||||
return client;
|
||||
}
|
||||
|
||||
/// check user information if not found then redirect to Date of birth page
|
||||
|
|
|
|||
|
|
@ -199,6 +199,12 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||
});
|
||||
// #Pangea
|
||||
candidate.homeserver = Uri.parse("https://${AppConfig.defaultHomeserver}");
|
||||
|
||||
// This listener is not set for the new login client until the user is logged in,
|
||||
// but if the user tries to sign up without this listener set, the signup UIA request
|
||||
// will hang. So set the listener here.
|
||||
onUiaRequest[candidate.clientName] ??=
|
||||
candidate.onUiaRequest.stream.listen(uiaRequestHandler);
|
||||
// Pangea#
|
||||
if (widget.clients.isEmpty) widget.clients.add(candidate);
|
||||
return candidate;
|
||||
|
|
@ -411,6 +417,10 @@ class MatrixState extends State<Matrix> with WidgetsBindingObserver {
|
|||
onLoginStateChanged.remove(name);
|
||||
onNotification[name]?.cancel();
|
||||
onNotification.remove(name);
|
||||
// #Pangea
|
||||
onUiaRequest[name]?.cancel();
|
||||
onUiaRequest.remove(name);
|
||||
// Pangea#
|
||||
}
|
||||
|
||||
void initMatrix() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue