Merge branch 'main' into 368-turn-bot-invite-ui-to-a-button
This commit is contained in:
commit
44d4083eec
10 changed files with 114 additions and 60 deletions
19
.github/workflows/main_deploy.yaml
vendored
19
.github/workflows/main_deploy.yaml
vendored
|
|
@ -28,6 +28,7 @@ jobs:
|
|||
run: ./scripts/prepare-web.sh
|
||||
- name: Build Release Web
|
||||
run: ./scripts/build-web.sh
|
||||
|
||||
- name: Upload files
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
|
@ -64,19 +65,19 @@ jobs:
|
|||
environment: staging
|
||||
env:
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
SENTRY_BASE_TOKEN: ${{ secrets.SENTRY_BASE_TOKEN }}
|
||||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
||||
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
|
||||
CI_COMMIT_SHA: ${{ github.sha }}
|
||||
SENTRY_RELEASE: ${{ github.sha }}
|
||||
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }}
|
||||
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
- name: Download web
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: web
|
||||
path: build/web
|
||||
- name: Install sentry CLI
|
||||
run: |
|
||||
curl -sL https://sentry.io/get-cli/ | bash
|
||||
- name: Update sentry
|
||||
run: ./scripts/upload-sentry.sh
|
||||
run: flutter packages pub run sentry_dart_plugin
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import 'package:fluffychat/pages/chat/seen_by_row.dart';
|
|||
import 'package:fluffychat/pages/chat/typing_indicators.dart';
|
||||
import 'package:fluffychat/pages/user_bottom_sheet/user_bottom_sheet.dart';
|
||||
import 'package:fluffychat/pangea/extensions/pangea_room_extension/pangea_room_extension.dart';
|
||||
import 'package:fluffychat/pangea/utils/instructions.dart';
|
||||
import 'package:fluffychat/pangea/widgets/chat/locked_chat_message.dart';
|
||||
import 'package:fluffychat/utils/account_config.dart';
|
||||
import 'package:fluffychat/utils/adaptive_bottom_sheet.dart';
|
||||
|
|
@ -40,6 +41,19 @@ class ChatEventList extends StatelessWidget {
|
|||
final hasWallpaper =
|
||||
controller.room.client.applicationAccountConfig.wallpaperUrl != null;
|
||||
|
||||
// #Pangea
|
||||
// after the chat event list mounts, if the user hasn't yet seen this instruction
|
||||
// card, attach it on top of the first shown message
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
controller.pangeaController.instructions.show(
|
||||
context,
|
||||
InstructionsEnum.clickMessage,
|
||||
events[0].eventId,
|
||||
true,
|
||||
);
|
||||
});
|
||||
// Pangea#
|
||||
|
||||
return SelectionArea(
|
||||
child: ListView.custom(
|
||||
padding: EdgeInsets.only(
|
||||
|
|
|
|||
|
|
@ -60,11 +60,15 @@ extension EventsRoomExtension on Room {
|
|||
future: () async {
|
||||
final List<Room> children = await getChildRooms();
|
||||
for (final Room child in children) {
|
||||
if (!child.isAnalyticsRoom) {
|
||||
if (!child.isAnalyticsRoom && !child.isArchived) {
|
||||
if (child.membership != Membership.join) {
|
||||
child.join;
|
||||
}
|
||||
await child.archive();
|
||||
if (child.isSpace) {
|
||||
await child.archiveSubspace();
|
||||
} else {
|
||||
await child.archive();
|
||||
}
|
||||
}
|
||||
}
|
||||
await _archive();
|
||||
|
|
@ -77,6 +81,23 @@ extension EventsRoomExtension on Room {
|
|||
return success.error == null;
|
||||
}
|
||||
|
||||
Future<void> _archiveSubspace() async {
|
||||
final List<Room> children = await getChildRooms();
|
||||
for (final Room child in children) {
|
||||
if (!child.isAnalyticsRoom && !child.isArchived) {
|
||||
if (child.membership != Membership.join) {
|
||||
child.join;
|
||||
}
|
||||
if (child.isSpace) {
|
||||
await child.archiveSubspace();
|
||||
} else {
|
||||
await child.archive();
|
||||
}
|
||||
}
|
||||
}
|
||||
await _archive();
|
||||
}
|
||||
|
||||
Future<bool> _leaveSpace(BuildContext context, Client client) async {
|
||||
final confirmed = await showOkCancelAlertDialog(
|
||||
useRootNavigator: false,
|
||||
|
|
@ -94,12 +115,18 @@ extension EventsRoomExtension on Room {
|
|||
try {
|
||||
final List<Room> children = await getChildRooms();
|
||||
for (final Room child in children) {
|
||||
if (!child.isSpace &&
|
||||
child.membership == Membership.join &&
|
||||
child.isUnread) {
|
||||
await child.markUnread(false);
|
||||
if (!child.isAnalyticsRoom && !child.isArchived) {
|
||||
if (!child.isSpace &&
|
||||
child.membership == Membership.join &&
|
||||
child.isUnread) {
|
||||
await child.markUnread(false);
|
||||
}
|
||||
if (child.isSpace) {
|
||||
await child.leaveSubspace();
|
||||
} else {
|
||||
await child.leave();
|
||||
}
|
||||
}
|
||||
await child.leave();
|
||||
}
|
||||
await leave();
|
||||
} catch (err, stack) {
|
||||
|
|
@ -116,6 +143,25 @@ extension EventsRoomExtension on Room {
|
|||
return success.error == null;
|
||||
}
|
||||
|
||||
Future<void> _leaveSubspace() async {
|
||||
final List<Room> children = await getChildRooms();
|
||||
for (final Room child in children) {
|
||||
if (!child.isAnalyticsRoom && !child.isArchived) {
|
||||
if (!child.isSpace &&
|
||||
child.membership == Membership.join &&
|
||||
child.isUnread) {
|
||||
await child.markUnread(false);
|
||||
}
|
||||
if (child.isSpace) {
|
||||
await child.leaveSubspace();
|
||||
} else {
|
||||
await child.leave();
|
||||
}
|
||||
}
|
||||
}
|
||||
await leave();
|
||||
}
|
||||
|
||||
Future<Event?> _sendPangeaEvent({
|
||||
required Map<String, dynamic> content,
|
||||
required String parentEventId,
|
||||
|
|
|
|||
|
|
@ -152,9 +152,13 @@ extension PangeaRoom on Room {
|
|||
}) async =>
|
||||
await _archiveSpace(context, client, onlyAdmin: onlyAdmin);
|
||||
|
||||
Future<void> archiveSubspace() async => await _archiveSubspace();
|
||||
|
||||
Future<bool> leaveSpace(BuildContext context, Client client) async =>
|
||||
await _leaveSpace(context, client);
|
||||
|
||||
Future<void> leaveSubspace() async => await _leaveSubspace();
|
||||
|
||||
Future<Event?> sendPangeaEvent({
|
||||
required Map<String, dynamic> content,
|
||||
required String parentEventId,
|
||||
|
|
|
|||
|
|
@ -247,22 +247,27 @@ class ChoreoRecord {
|
|||
choreoSteps.isNotEmpty ? choreoSteps.last.text : "";
|
||||
}
|
||||
|
||||
/// new step are saved
|
||||
/// A new ChoreoRecordStep is saved in the following cases:
|
||||
/// 1) before every system-provided text is accepted, if final text is different
|
||||
/// from last step
|
||||
/// 2) on the acceptance of system-provided text
|
||||
/// 3) on message send, if final text is different from last step
|
||||
/// 4) on the acceptance of an it step
|
||||
/// 5) on the start of it
|
||||
///
|
||||
/// user edit
|
||||
/// "hey ther"
|
||||
/// Example 1:
|
||||
/// the user types "hey ther"
|
||||
/// IGC suggests "there"
|
||||
/// user accepts "there" correction
|
||||
/// "hey there"
|
||||
/// step made for user edits and step made for system suggestion
|
||||
/// user goes through IT, chooses "hola"
|
||||
/// "hola"
|
||||
/// step saved
|
||||
/// adds "amigo"
|
||||
/// step saved
|
||||
/// text is now "hey there"
|
||||
/// A step is made for the original input 'hey there' and a step is made for system suggestion
|
||||
///
|
||||
/// Example 2:
|
||||
/// user write "hi friend"
|
||||
/// a step is made for the original input 'hi friend'
|
||||
/// the user selects IT and a step is made
|
||||
/// the user chooses "hola" and a step is saved
|
||||
/// adds "amigo" and a step saved
|
||||
class ChoreoRecordStep {
|
||||
/// text after changes have been made
|
||||
String text;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/pangea/pages/p_user_age/p_user_age.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
|
|
@ -18,11 +19,15 @@ class PUserAgeView extends StatelessWidget {
|
|||
children: [
|
||||
Container(
|
||||
margin: const EdgeInsets.only(top: 10),
|
||||
padding: const EdgeInsets.all(12),
|
||||
padding: const EdgeInsets.all(15),
|
||||
child: Text(
|
||||
L10n.of(context)!.yourBirthdayPlease,
|
||||
textAlign: TextAlign.justify,
|
||||
style: const TextStyle(color: Colors.white),
|
||||
style: const TextStyle(
|
||||
color: Colors.black,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
|
|
@ -41,23 +46,25 @@ class PUserAgeView extends StatelessWidget {
|
|||
ListTile(
|
||||
title: Text(
|
||||
L10n.of(context)!.certifyAge(13),
|
||||
style: const TextStyle(color: Colors.white, fontSize: 14),
|
||||
style: const TextStyle(color: Colors.black, fontSize: 14),
|
||||
),
|
||||
leading: Radio<int>(
|
||||
value: 13,
|
||||
groupValue: controller.selectedAge,
|
||||
onChanged: controller.setSelectedAge,
|
||||
activeColor: AppConfig.primaryColor,
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(
|
||||
L10n.of(context)!.certifyAge(18),
|
||||
style: const TextStyle(color: Colors.white, fontSize: 14),
|
||||
style: const TextStyle(color: Colors.black, fontSize: 14),
|
||||
),
|
||||
leading: Radio<int>(
|
||||
value: 18,
|
||||
groupValue: controller.selectedAge,
|
||||
onChanged: controller.setSelectedAge,
|
||||
activeColor: AppConfig.primaryColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -121,13 +121,6 @@ class PangeaRichTextState extends State<PangeaRichText> {
|
|||
InstructionsEnum.blurMeansTranslate,
|
||||
widget.pangeaMessageEvent.eventId,
|
||||
);
|
||||
} else {
|
||||
pangeaController.instructions.show(
|
||||
context,
|
||||
InstructionsEnum.clickMessage,
|
||||
widget.pangeaMessageEvent.eventId,
|
||||
true,
|
||||
);
|
||||
}
|
||||
|
||||
//TODO - take out of build function of every message
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ dev_dependencies:
|
|||
sdk: flutter
|
||||
license_checker: ^1.6.0
|
||||
msix: ^3.6.2
|
||||
sentry_dart_plugin: ^1.0.0
|
||||
translations_cleaner: ^0.0.5
|
||||
|
||||
flutter_native_splash:
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
#!/bin/sh -ve
|
||||
|
||||
# Build a release version of the app for a platform and upload symbols
|
||||
export OUTPUT_FOLDER_WEB=./build/web/
|
||||
export SENTRY_RELEASE=$CI_COMMIT_SHA
|
||||
export SENTRY_PROJECT="${SENTRY_PROJECT:-client}"
|
||||
export SENTRY_ORG="${SENTRY_ORG:-pangea-chat}"
|
||||
|
||||
echo "[run] Uploading sourcemaps for $SENTRY_RELEASE"
|
||||
echo "[run] $SENTRY_PROJECT @ $SENTRY_ORG / $OUTPUT_FOLDER_WEB"
|
||||
sentry-cli releases new $SENTRY_RELEASE --org $SENTRY_ORG
|
||||
sentry-cli releases set-commits $CI_COMMIT_SHA --auto
|
||||
sentry-cli releases files $SENTRY_RELEASE upload-sourcemaps . \
|
||||
--ext dart \
|
||||
--rewrite
|
||||
|
||||
(cd $OUTPUT_FOLDER_WEB
|
||||
sentry-cli releases files $SENTRY_RELEASE upload-sourcemaps . \
|
||||
--ext map \
|
||||
--ext js \
|
||||
--rewrite)
|
||||
|
||||
sentry-cli releases finalize $SENTRY_RELEASE
|
||||
6
sentry.properties
Normal file
6
sentry.properties
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
upload_debug_symbols=true
|
||||
upload_source_maps=true
|
||||
upload_sources=true
|
||||
wait_for_processing=false
|
||||
log_level=info
|
||||
commits=auto
|
||||
Loading…
Add table
Reference in a new issue