├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ └── bug_report.md └── workflows │ ├── benchmark.yml │ ├── build.yml │ ├── integration-test.yml │ ├── release.yml │ └── static-analysis.yml ├── .gitignore ├── .gitmodules ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── SECURITY.md ├── commet ├── .gitignore ├── .metadata ├── .vscode │ └── launch.json ├── analysis_options.yaml ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ ├── AndroidManifest.xml │ │ │ ├── google-services.json │ │ │ └── res │ │ │ │ └── values │ │ │ │ └── strings.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── chat │ │ │ │ │ └── commet │ │ │ │ │ └── commet │ │ │ │ │ ├── MainActivity.kt │ │ │ │ │ └── UnifiedPushService.kt │ │ │ └── res │ │ │ │ ├── drawable-hdpi │ │ │ │ ├── drawable-hdpi │ │ │ │ │ └── ic_bg_service_small.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ └── notification_icon.png │ │ │ │ ├── drawable-mdpi │ │ │ │ ├── ic_bg_service_small.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ └── notification_icon.png │ │ │ │ ├── drawable-v21 │ │ │ │ ├── background.png │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-xhdpi │ │ │ │ ├── ic_bg_service_small.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ └── notification_icon.png │ │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── ic_bg_service_small.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ └── notification_icon.png │ │ │ │ ├── drawable-xxxhdpi │ │ │ │ ├── ic_bg_service_small.png │ │ │ │ ├── ic_launcher_foreground.png │ │ │ │ └── notification_icon.png │ │ │ │ ├── drawable │ │ │ │ ├── background.png │ │ │ │ ├── ic_launcher_monochrome.xml │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ └── ic_launcher.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── values-night-v31 │ │ │ │ └── styles.xml │ │ │ │ ├── values-night │ │ │ │ └── styles.xml │ │ │ │ ├── values-v31 │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ │ ├── profile │ │ │ └── AndroidManifest.xml │ │ │ └── release │ │ │ └── google-services.json │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle ├── assets │ ├── config │ │ └── global_config.json │ ├── emoji_data │ │ ├── data.json │ │ ├── readme.md │ │ └── shortcodes │ │ │ └── en.json │ ├── font │ │ ├── code │ │ │ ├── JetBrainsMono-Regular.ttf │ │ │ └── OFL.txt │ │ ├── emoji-font │ │ │ ├── LICENSE │ │ │ └── NotoColorEmoji.ttf │ │ ├── jellee │ │ │ ├── Jellee-Bold.ttf │ │ │ └── Jellee-OFL.txt │ │ └── roboto │ │ │ ├── LICENSE.txt │ │ │ ├── Roboto-Black.ttf │ │ │ ├── Roboto-BlackItalic.ttf │ │ │ ├── Roboto-Bold.ttf │ │ │ ├── Roboto-BoldItalic.ttf │ │ │ ├── Roboto-Italic.ttf │ │ │ ├── Roboto-Light.ttf │ │ │ ├── Roboto-LightItalic.ttf │ │ │ ├── Roboto-Medium.ttf │ │ │ ├── Roboto-MediumItalic.ttf │ │ │ ├── Roboto-Regular.ttf │ │ │ ├── Roboto-Thin.ttf │ │ │ └── Roboto-ThinItalic.ttf │ ├── images │ │ ├── app_icon │ │ │ ├── app_icon_filled.png │ │ │ ├── app_icon_rounded.png │ │ │ ├── app_icon_transparent.png │ │ │ ├── app_icon_transparent_cropped.png │ │ │ └── icon.svg │ │ └── effects │ │ │ └── particles │ │ │ ├── confetti.webp │ │ │ ├── fluent-emoji-alien-monster.png │ │ │ ├── fluent-emoji-eyes.webp │ │ │ ├── fluent-emoji-smile-with-hearts.webp │ │ │ ├── fluent-emoji-snowflake.webp │ │ │ └── fluent-emoji-source.txt │ ├── js │ │ └── package │ │ │ └── .gitkeep │ ├── l10n │ │ ├── intl_be.arb │ │ ├── intl_de.arb │ │ ├── intl_en.arb │ │ ├── intl_es.arb │ │ ├── intl_et.arb │ │ ├── intl_eu.arb │ │ ├── intl_fa.arb │ │ ├── intl_fr.arb │ │ ├── intl_ja.arb │ │ ├── intl_ko.arb │ │ ├── intl_nb.arb │ │ ├── intl_pl.arb │ │ ├── intl_pt.arb │ │ ├── intl_pt_BR.arb │ │ ├── intl_ru.arb │ │ ├── intl_ta.arb │ │ ├── intl_uk.arb │ │ └── intl_zh.arb │ └── shader │ │ ├── star_trails.frag │ │ └── texture_coordinate.frag ├── build.yaml ├── devtools_options.yaml ├── integration_test │ ├── README.md │ ├── benchmark │ │ ├── benchmark.dart │ │ └── benchmarks │ │ │ └── timeline_viewer_benchmark.dart │ ├── extensions │ │ ├── common_flows.dart │ │ └── wait_for.dart │ ├── matrix │ │ ├── change_space_name_test.dart │ │ ├── create_space_test.dart │ │ ├── key_verification_test.dart │ │ ├── login_test.dart │ │ └── multi_account_test.dart │ ├── runner.dart │ └── synapse │ │ └── data │ │ ├── homeserver.yaml │ │ ├── localhost.log.config │ │ └── localhost.signing.key ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-50x50@1x.png │ │ │ ├── Icon-App-50x50@2x.png │ │ │ ├── Icon-App-57x57@1x.png │ │ │ ├── Icon-App-57x57@2x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-72x72@1x.png │ │ │ ├── Icon-App-72x72@2x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── Runner-Bridging-Header.h ├── l10n.yaml ├── lib │ ├── cache │ │ ├── cache_file_provider.dart │ │ ├── drift_file_cache.dart │ │ ├── file_cache.dart │ │ ├── file_cache_stub.dart │ │ └── file_provider.dart │ ├── client │ │ ├── alert.dart │ │ ├── attachment.dart │ │ ├── auth.dart │ │ ├── client.dart │ │ ├── client_manager.dart │ │ ├── components │ │ │ ├── command │ │ │ │ └── command_component.dart │ │ │ ├── component.dart │ │ │ ├── component_registry.dart │ │ │ ├── direct_messages │ │ │ │ ├── direct_message_aggregator.dart │ │ │ │ └── direct_message_component.dart │ │ │ ├── emoticon │ │ │ │ ├── emoji_pack.dart │ │ │ │ ├── emoticon.dart │ │ │ │ └── emoticon_component.dart │ │ │ ├── event_search │ │ │ │ └── event_search_component.dart │ │ │ ├── gif │ │ │ │ ├── gif_component.dart │ │ │ │ └── gif_search_result.dart │ │ │ ├── invitation │ │ │ │ ├── invitation.dart │ │ │ │ └── invitation_component.dart │ │ │ ├── message_effects │ │ │ │ ├── message_effect_component.dart │ │ │ │ └── message_effect_particles.dart │ │ │ ├── pinned_messages │ │ │ │ └── pinned_messages_component.dart │ │ │ ├── push_notification │ │ │ │ ├── android │ │ │ │ │ ├── android_notifier.dart │ │ │ │ │ ├── firebase_push_notifier.dart │ │ │ │ │ └── unified_push_notifier.dart │ │ │ │ ├── linux │ │ │ │ │ └── linux_notifier.dart │ │ │ │ ├── modifiers │ │ │ │ │ ├── do_not_disturb.dart │ │ │ │ │ ├── hide_content.dart │ │ │ │ │ ├── notification_modifiers.dart │ │ │ │ │ ├── suppress_active_room.dart │ │ │ │ │ └── suppress_other_device_active.dart │ │ │ │ ├── notification_content.dart │ │ │ │ ├── notification_manager.dart │ │ │ │ ├── notifier.dart │ │ │ │ ├── push_notification_component.dart │ │ │ │ └── windows │ │ │ │ │ └── windows_notifier.dart │ │ │ ├── read_receipts │ │ │ │ └── read_receipt_component.dart │ │ │ ├── room_component.dart │ │ │ ├── space_component.dart │ │ │ ├── threads │ │ │ │ └── thread_component.dart │ │ │ ├── typing_indicators │ │ │ │ └── typing_indicator_component.dart │ │ │ └── url_preview │ │ │ │ └── url_preview_component.dart │ │ ├── error_profile.dart │ │ ├── matrix │ │ │ ├── auth │ │ │ │ ├── matrix_sso_login_flow.dart │ │ │ │ └── matrix_username_password_login_flow.dart │ │ │ ├── components │ │ │ │ ├── command_component │ │ │ │ │ └── matrix_command_component.dart │ │ │ │ ├── direct_messages │ │ │ │ │ └── matrix_direct_messages_component.dart │ │ │ │ ├── emoticon │ │ │ │ │ ├── matrix_emoticon.dart │ │ │ │ │ ├── matrix_emoticon_component.dart │ │ │ │ │ ├── matrix_emoticon_pack.dart │ │ │ │ │ ├── matrix_emoticon_state_manager.dart │ │ │ │ │ ├── matrix_import_emoticon_pack_task.dart │ │ │ │ │ ├── matrix_room_emoticon_component.dart │ │ │ │ │ └── matrix_space_emoticon_component.dart │ │ │ │ ├── event_search │ │ │ │ │ └── matrix_event_search_component.dart │ │ │ │ ├── gif │ │ │ │ │ └── matrix_gif_component.dart │ │ │ │ ├── invitation │ │ │ │ │ └── matrix_invitation_component.dart │ │ │ │ ├── matrix_sync_listener.dart │ │ │ │ ├── message_effects │ │ │ │ │ └── matrix_message_effects_component.dart │ │ │ │ ├── pinned_messages │ │ │ │ │ └── matrix_pinned_messages_component.dart │ │ │ │ ├── push_notifications │ │ │ │ │ └── matrix_push_notification_component.dart │ │ │ │ ├── read_receipts │ │ │ │ │ └── matrix_read_receipt_component.dart │ │ │ │ ├── threads │ │ │ │ │ ├── matrix_thread_timeline.dart │ │ │ │ │ └── matrix_threads_component.dart │ │ │ │ ├── typing_indicators │ │ │ │ │ └── matrix_typing_indicators_component.dart │ │ │ │ └── url_preview │ │ │ │ │ └── matrix_url_preview_component.dart │ │ │ ├── database │ │ │ │ ├── matrix_database.dart │ │ │ │ ├── matrix_database_html.dart │ │ │ │ ├── matrix_database_io.dart │ │ │ │ └── matrix_database_stub.dart │ │ │ ├── extensions │ │ │ │ ├── matrix_client_extensions.dart │ │ │ │ └── matrix_event_extensions.dart │ │ │ ├── matrix_attachment.dart │ │ │ ├── matrix_client.dart │ │ │ ├── matrix_member.dart │ │ │ ├── matrix_mxc_file_provider.dart │ │ │ ├── matrix_mxc_image_provider.dart │ │ │ ├── matrix_peer.dart │ │ │ ├── matrix_profile.dart │ │ │ ├── matrix_role.dart │ │ │ ├── matrix_room.dart │ │ │ ├── matrix_room_permissions.dart │ │ │ ├── matrix_room_preview.dart │ │ │ ├── matrix_space.dart │ │ │ ├── matrix_timeline.dart │ │ │ └── timeline_events │ │ │ │ ├── matrix_timeline_event.dart │ │ │ │ ├── matrix_timeline_event_add_reaction.dart │ │ │ │ ├── matrix_timeline_event_edit.dart │ │ │ │ ├── matrix_timeline_event_emote.dart │ │ │ │ ├── matrix_timeline_event_encrypted.dart │ │ │ │ ├── matrix_timeline_event_membership.dart │ │ │ │ ├── matrix_timeline_event_message.dart │ │ │ │ ├── matrix_timeline_event_mixin_reactions.dart │ │ │ │ ├── matrix_timeline_event_mixin_related.dart │ │ │ │ ├── matrix_timeline_event_pinned_messages.dart │ │ │ │ ├── matrix_timeline_event_redaction.dart │ │ │ │ ├── matrix_timeline_event_sticker.dart │ │ │ │ └── matrix_timeline_event_unknown.dart │ │ ├── member.dart │ │ ├── peer.dart │ │ ├── permissions.dart │ │ ├── profile.dart │ │ ├── role.dart │ │ ├── room.dart │ │ ├── room_preview.dart │ │ ├── space.dart │ │ ├── stale_info.dart │ │ ├── tasks │ │ │ └── client_connection_status_task.dart │ │ ├── timeline.dart │ │ └── timeline_events │ │ │ ├── timeline_event.dart │ │ │ ├── timeline_event_add_reaction.dart │ │ │ ├── timeline_event_edit.dart │ │ │ ├── timeline_event_emote.dart │ │ │ ├── timeline_event_encrypted.dart │ │ │ ├── timeline_event_feature_reactions.dart │ │ │ ├── timeline_event_feature_related.dart │ │ │ ├── timeline_event_generic.dart │ │ │ ├── timeline_event_message.dart │ │ │ ├── timeline_event_redaction.dart │ │ │ ├── timeline_event_sticker.dart │ │ │ └── timeline_event_unknown.dart │ ├── config │ │ ├── app_config.dart │ │ ├── build_config.dart │ │ ├── global_config.dart │ │ ├── layout_config.dart │ │ ├── platform_utils.dart │ │ ├── preferences.dart │ │ └── theme_config.dart │ ├── debug │ │ ├── l10n_debug_lookup.dart │ │ └── log.dart │ ├── diagnostic │ │ ├── benchmark_values.dart │ │ ├── diagnostics.dart │ │ └── mocks │ │ │ └── matrix_client_component_mocks.dart │ ├── generator │ │ ├── builder.dart │ │ └── unicode_emoji_generator.dart │ ├── main.dart │ ├── service │ │ ├── background_service.dart │ │ ├── background_service_notifications │ │ │ └── background_service_task_notification.dart │ │ └── background_service_task.dart │ ├── ui │ │ ├── atoms │ │ │ ├── blurred_image_background.dart │ │ │ ├── code_block.dart │ │ │ ├── dot_indicator.dart │ │ │ ├── drag_drop_file_target.dart │ │ │ ├── emoji_reaction.dart │ │ │ ├── emoji_widget.dart │ │ │ ├── floating_tile.dart │ │ │ ├── gradient_background.dart │ │ │ ├── icon_button.dart │ │ │ ├── keyboard_adaptor.dart │ │ │ ├── lightbox.dart │ │ │ ├── message_attachment.dart │ │ │ ├── notification_badge.dart │ │ │ ├── pill.dart │ │ │ ├── rich_text │ │ │ │ ├── matrix_html_parser.dart │ │ │ │ └── spans │ │ │ │ │ └── link.dart │ │ │ ├── rich_text_field.dart │ │ │ ├── role_view.dart │ │ │ ├── room_created.dart │ │ │ ├── room_header.dart │ │ │ ├── room_panel.dart │ │ │ ├── room_preview.dart │ │ │ ├── room_text_button.dart │ │ │ ├── scaled_safe_area.dart │ │ │ ├── shader │ │ │ │ └── star_trails.dart │ │ │ ├── shimmer_loading.dart │ │ │ ├── space_header.dart │ │ │ ├── space_icon.dart │ │ │ ├── space_list.dart │ │ │ ├── thread_reply_footer.dart │ │ │ └── tiny_pill.dart │ │ ├── molecules │ │ │ ├── account_selector.dart │ │ │ ├── alert_view.dart │ │ │ ├── attachment_icon.dart │ │ │ ├── direct_message_list.dart │ │ │ ├── editable_label.dart │ │ │ ├── emoji_picker.dart │ │ │ ├── emoticon_picker.dart │ │ │ ├── file_preview.dart │ │ │ ├── gif_picker.dart │ │ │ ├── image_picker.dart │ │ │ ├── invitation_display.dart │ │ │ ├── message.dart │ │ │ ├── message_input.dart │ │ │ ├── overlapping_panels.dart │ │ │ ├── popup_icon_menu.dart │ │ │ ├── profile │ │ │ │ └── mini_profile_view.dart │ │ │ ├── read_indicator.dart │ │ │ ├── room_timeline_widget │ │ │ │ ├── room_timeline_overlay.dart │ │ │ │ ├── room_timeline_overlay_button.dart │ │ │ │ ├── room_timeline_widget.dart │ │ │ │ └── room_timeline_widget_view.dart │ │ │ ├── space_selector.dart │ │ │ ├── space_viewer.dart │ │ │ ├── sticker_picker.dart │ │ │ ├── timeline_events │ │ │ │ ├── events │ │ │ │ │ ├── timeline_event_view_attachments.dart │ │ │ │ │ ├── timeline_event_view_generic.dart │ │ │ │ │ ├── timeline_event_view_message.dart │ │ │ │ │ ├── timeline_event_view_reactions.dart │ │ │ │ │ ├── timeline_event_view_reply.dart │ │ │ │ │ ├── timeline_event_view_sticker.dart │ │ │ │ │ ├── timeline_event_view_thread.dart │ │ │ │ │ └── timeline_event_view_url_previews.dart │ │ │ │ ├── layouts │ │ │ │ │ └── timeline_event_layout_message.dart │ │ │ │ ├── timeline_event_date_time_marker.dart │ │ │ │ ├── timeline_event_layout.dart │ │ │ │ ├── timeline_event_menu.dart │ │ │ │ ├── timeline_event_menu_dialog.dart │ │ │ │ ├── timeline_event_view_single.dart │ │ │ │ └── timeline_view_entry.dart │ │ │ ├── typing_indicators_widget.dart │ │ │ ├── url_preview_widget.dart │ │ │ ├── user_list.dart │ │ │ ├── user_panel.dart │ │ │ └── video_player │ │ │ │ ├── video_player.dart │ │ │ │ ├── video_player_controller.dart │ │ │ │ └── video_player_implementation.dart │ │ ├── navigation │ │ │ ├── adaptive_dialog.dart │ │ │ └── navigation_utils.dart │ │ ├── organisms │ │ │ ├── attachment_processor │ │ │ │ └── attachment_processor.dart │ │ │ ├── background_task_view │ │ │ │ ├── background_task_view.dart │ │ │ │ └── background_task_view_container.dart │ │ │ ├── chat │ │ │ │ ├── chat.dart │ │ │ │ └── chat_view.dart │ │ │ ├── home_screen │ │ │ │ ├── home_screen.dart │ │ │ │ └── home_screen_view.dart │ │ │ ├── invitation_view │ │ │ │ ├── incoming_invitations_view.dart │ │ │ │ ├── send_invitation.dart │ │ │ │ └── single_invitation_component_view.dart │ │ │ ├── particle_player │ │ │ │ ├── particle_player.dart │ │ │ │ ├── particle_system_confetti.dart │ │ │ │ ├── particle_system_eyes.dart │ │ │ │ ├── particle_system_hug.dart │ │ │ │ ├── particle_system_snow.dart │ │ │ │ └── particle_system_space_invaders.dart │ │ │ ├── room_event_search │ │ │ │ └── room_event_search_widget.dart │ │ │ ├── room_members_list │ │ │ │ └── room_members_list.dart │ │ │ ├── room_pinned_messages │ │ │ │ └── room_pinned_messages_widget.dart │ │ │ ├── room_quick_access_menu │ │ │ │ ├── room_quick_access_menu.dart │ │ │ │ ├── room_quick_access_menu_desktop.dart │ │ │ │ └── room_quick_access_menu_mobile.dart │ │ │ ├── room_side_panel │ │ │ │ └── room_side_panel.dart │ │ │ ├── side_navigation_bar │ │ │ │ ├── side_navigation_bar.dart │ │ │ │ └── side_navigation_bar_direct_messages.dart │ │ │ ├── space_summary │ │ │ │ ├── space_summary.dart │ │ │ │ └── space_summary_view.dart │ │ │ └── user_profile │ │ │ │ ├── user_profile.dart │ │ │ │ └── user_profile_view.dart │ │ └── pages │ │ │ ├── add_space_or_room │ │ │ ├── add_space_or_room.dart │ │ │ └── add_space_or_room_view.dart │ │ │ ├── bubble │ │ │ └── bubble_page.dart │ │ │ ├── developer │ │ │ ├── app_inspector │ │ │ │ ├── app_inspector_page.dart │ │ │ │ ├── field_inspector.dart │ │ │ │ ├── reflectable_extensions.dart │ │ │ │ ├── reflectable_matrix_client.dart │ │ │ │ └── value_reflector_widget.dart │ │ │ └── benchmarks │ │ │ │ ├── benchmark_utils.dart │ │ │ │ └── timeline_viewer_benchmark.dart │ │ │ ├── fatal_error │ │ │ └── fatal_error_page.dart │ │ │ ├── login │ │ │ ├── login_page.dart │ │ │ └── login_page_view.dart │ │ │ ├── main │ │ │ ├── main_page.dart │ │ │ ├── main_page_view_desktop.dart │ │ │ └── main_page_view_mobile.dart │ │ │ ├── matrix │ │ │ ├── authentication │ │ │ │ ├── matrix_uia_request.dart │ │ │ │ └── matrix_uia_request_view.dart │ │ │ ├── room_address_settings │ │ │ │ ├── matrix_room_add_local_alias_view.dart │ │ │ │ ├── matrix_room_address_settings.dart │ │ │ │ └── matrix_room_address_settings_view.dart │ │ │ └── verification │ │ │ │ ├── matrix_verification_page.dart │ │ │ │ └── matrix_verification_view.dart │ │ │ ├── settings │ │ │ ├── app_settings_page.dart │ │ │ ├── categories │ │ │ │ ├── about │ │ │ │ │ └── settings_category_about.dart │ │ │ │ ├── account │ │ │ │ │ ├── account_emoji │ │ │ │ │ │ ├── account_emoji_tab.dart │ │ │ │ │ │ └── account_emoji_view.dart │ │ │ │ │ ├── account_management │ │ │ │ │ │ └── account_management_tab.dart │ │ │ │ │ ├── account_state │ │ │ │ │ │ └── account_state_tab.dart │ │ │ │ │ ├── profile │ │ │ │ │ │ ├── profile_edit_tab.dart │ │ │ │ │ │ └── profile_edit_view.dart │ │ │ │ │ ├── security │ │ │ │ │ │ ├── matrix │ │ │ │ │ │ │ ├── cross_signing │ │ │ │ │ │ │ │ ├── cross_signing_page.dart │ │ │ │ │ │ │ │ └── cross_signing_view.dart │ │ │ │ │ │ │ ├── matrix_security_tab.dart │ │ │ │ │ │ │ └── session │ │ │ │ │ │ │ │ ├── matrix_session.dart │ │ │ │ │ │ │ │ └── matrix_session_view.dart │ │ │ │ │ │ └── security_tab.dart │ │ │ │ │ └── settings_category_account.dart │ │ │ │ ├── app │ │ │ │ │ ├── advanced_settings_page.dart │ │ │ │ │ ├── appearance_settings_page.dart │ │ │ │ │ ├── general_settings_page.dart │ │ │ │ │ ├── notification_settings │ │ │ │ │ │ ├── notification_settings_page.dart │ │ │ │ │ │ ├── notifier_component_view │ │ │ │ │ │ │ ├── matrix_notifier_component_view.dart │ │ │ │ │ │ │ └── notifier_component_view.dart │ │ │ │ │ │ └── notifier_debug_view.dart │ │ │ │ │ ├── settings_category_app.dart │ │ │ │ │ ├── theme_settings │ │ │ │ │ │ └── theme_settings_widget.dart │ │ │ │ │ └── window_settings.dart │ │ │ │ ├── developer │ │ │ │ │ ├── cumulative_diagnostics_widget.dart │ │ │ │ │ ├── developer_settings_page.dart │ │ │ │ │ └── log_page.dart │ │ │ │ ├── room │ │ │ │ │ ├── appearance │ │ │ │ │ │ ├── room_appearance_settings_page.dart │ │ │ │ │ │ └── room_appearance_settings_view.dart │ │ │ │ │ ├── developer │ │ │ │ │ │ └── room_developer_settings_view.dart │ │ │ │ │ ├── emoji_packs │ │ │ │ │ │ ├── bulk_import_view.dart │ │ │ │ │ │ ├── room_emoji_pack_settings_page.dart │ │ │ │ │ │ └── room_emoji_pack_settings_view.dart │ │ │ │ │ ├── general │ │ │ │ │ │ ├── room_general_settings_page.dart │ │ │ │ │ │ └── room_general_settings_view.dart │ │ │ │ │ ├── permissions │ │ │ │ │ │ └── matrix │ │ │ │ │ │ │ ├── matrix_room_permissions_page.dart │ │ │ │ │ │ │ └── matrix_room_permissions_view.dart │ │ │ │ │ ├── security │ │ │ │ │ │ ├── room_security_settings_page.dart │ │ │ │ │ │ └── room_security_settings_view.dart │ │ │ │ │ └── settings_category_room.dart │ │ │ │ └── space │ │ │ │ │ ├── settings_category_space.dart │ │ │ │ │ ├── space_appearance_settings_page.dart │ │ │ │ │ ├── space_developer_settings_view.dart │ │ │ │ │ ├── space_emoji_pack_settings.dart │ │ │ │ │ └── space_general_settings_page.dart │ │ │ ├── desktop_settings_page.dart │ │ │ ├── mobile_settings_page.dart │ │ │ ├── room_settings_page.dart │ │ │ ├── settings_button.dart │ │ │ ├── settings_category.dart │ │ │ ├── settings_page.dart │ │ │ ├── settings_tab.dart │ │ │ └── space_settings_page.dart │ │ │ └── setup │ │ │ ├── menus │ │ │ └── unified_push_setup.dart │ │ │ ├── setup_menu.dart │ │ │ └── setup_page.dart │ └── utils │ │ ├── android_intent_helper.dart │ │ ├── autofill_utils.dart │ │ ├── background_tasks │ │ ├── background_task_manager.dart │ │ └── mock_tasks.dart │ │ ├── common_animation.dart │ │ ├── common_strings.dart │ │ ├── custom_uri.dart │ │ ├── database │ │ ├── database_server.dart │ │ ├── database_server_io.dart │ │ ├── database_server_stub.dart │ │ └── multiple_database_server.dart │ │ ├── debounce.dart │ │ ├── download_utils.dart │ │ ├── emoji │ │ ├── emoji_matcher.dart │ │ ├── unicode_emoji.dart │ │ └── unicode_emoji_data.dart │ │ ├── event_bus.dart │ │ ├── file_utils.dart │ │ ├── first_time_setup.dart │ │ ├── image │ │ └── lod_image.dart │ │ ├── image_utils.dart │ │ ├── link_utils.dart │ │ ├── list_extension.dart │ │ ├── mime.dart │ │ ├── notifying_list.dart │ │ ├── rng.dart │ │ ├── scaled_app.dart │ │ ├── shortcuts_manager.dart │ │ ├── stored_stream_controller.dart │ │ ├── text_utils.dart │ │ └── window_management.dart ├── linux │ ├── .gitignore │ ├── CMakeLists.txt │ ├── debian │ │ ├── DEBIAN │ │ │ ├── control-ubuntu-22.04 │ │ │ └── control-ubuntu-24.04 │ │ └── usr │ │ │ ├── lib │ │ │ └── .gitkeep │ │ │ └── share │ │ │ ├── applications │ │ │ └── chat.commet.commetapp.desktop │ │ │ └── icons │ │ │ └── hicolor │ │ │ ├── 128x128 │ │ │ └── apps │ │ │ │ └── commet-desktop.png │ │ │ ├── 16x16 │ │ │ └── apps │ │ │ │ └── commet-desktop.png │ │ │ ├── 256x256 │ │ │ └── apps │ │ │ │ └── commet-desktop.png │ │ │ ├── 32x32 │ │ │ └── apps │ │ │ │ └── commet-desktop.png │ │ │ ├── 512x512 │ │ │ └── apps │ │ │ │ └── commet-desktop.png │ │ │ └── 64x64 │ │ │ └── apps │ │ │ └── commet-desktop.png │ ├── flatpak │ │ ├── chat.commet.commetapp.desktop │ │ ├── chat.commet.commetapp.metainfo.xml │ │ ├── chat.commet.commetapp.yaml │ │ ├── flathub.json │ │ └── icon.png │ ├── flutter │ │ ├── CMakeLists.txt │ │ ├── generated_plugin_registrant.cc │ │ ├── generated_plugin_registrant.h │ │ └── generated_plugins.cmake │ ├── main.cc │ ├── my_application.cc │ └── my_application.h ├── macos │ ├── .gitignore │ ├── Flutter │ │ ├── Flutter-Debug.xcconfig │ │ ├── Flutter-Release.xcconfig │ │ └── GeneratedPluginRegistrant.swift │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── app_icon_1024.png │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_512.png │ │ │ └── app_icon_64.png │ │ ├── Base.lproj │ │ └── MainMenu.xib │ │ ├── Configs │ │ ├── AppInfo.xcconfig │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── Warnings.xcconfig │ │ ├── DebugProfile.entitlements │ │ ├── Info.plist │ │ ├── MainFlutterWindow.swift │ │ └── Release.entitlements ├── pubspec.lock ├── pubspec.yaml ├── scripts │ ├── apply_google_services.patch │ ├── build_release.dart │ ├── codegen.dart │ ├── extract_strings.dart │ ├── generate-from-arb.sh │ ├── integration-prepare-homeserver.sh │ ├── integration-server-synapse.sh │ ├── integration-test.sh │ ├── run_widgetbook.sh │ ├── setup-env.sh │ ├── setup_android_release.dart │ └── unit-test.sh ├── test_driver │ └── benchmark_driver.dart ├── unit_test │ ├── notifying_list_test.dart │ └── password_validator_test.dart ├── web │ ├── auth.html │ ├── favicon.png │ ├── icons │ │ ├── Icon-192.png │ │ ├── Icon-512.png │ │ ├── Icon-maskable-192.png │ │ └── Icon-maskable-512.png │ ├── index.html │ ├── manifest.json │ ├── splash │ │ └── img │ │ │ ├── dark-1x.png │ │ │ ├── dark-2x.png │ │ │ ├── dark-3x.png │ │ │ ├── dark-4x.png │ │ │ ├── light-1x.png │ │ │ ├── light-2x.png │ │ │ ├── light-3x.png │ │ │ └── light-4x.png │ └── static │ │ └── _headers └── windows │ ├── .gitignore │ ├── CMakeLists.txt │ ├── flutter │ ├── CMakeLists.txt │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ └── generated_plugins.cmake │ └── runner │ ├── CMakeLists.txt │ ├── Runner.rc │ ├── flutter_window.cpp │ ├── flutter_window.h │ ├── main.cpp │ ├── resource.h │ ├── resources │ └── app_icon.ico │ ├── runner.exe.manifest │ ├── utils.cpp │ ├── utils.h │ ├── win32_window.cpp │ └── win32_window.h ├── flake.lock ├── flake.nix └── tiamat ├── .gitignore ├── .metadata ├── .vscode └── launch.json ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── tiamat │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets ├── font │ ├── code │ │ └── RobotoMono.ttf │ ├── emoji-font │ │ ├── LICENSE │ │ └── NotoColorEmoji.ttf │ └── roboto │ │ ├── LICENSE.txt │ │ ├── Roboto-Black.ttf │ │ ├── Roboto-BlackItalic.ttf │ │ ├── Roboto-Bold.ttf │ │ ├── Roboto-BoldItalic.ttf │ │ ├── Roboto-Italic.ttf │ │ ├── Roboto-Light.ttf │ │ ├── Roboto-LightItalic.ttf │ │ ├── Roboto-Medium.ttf │ │ ├── Roboto-MediumItalic.ttf │ │ ├── Roboto-Regular.ttf │ │ ├── Roboto-Thin.ttf │ │ └── Roboto-ThinItalic.ttf ├── images │ └── placeholder │ │ └── generic │ │ ├── License.txt │ │ ├── checker_dark.png │ │ ├── checker_green.png │ │ ├── checker_orange.png │ │ ├── checker_purple.png │ │ └── checker_red.png └── shader │ └── texture_coordinate.frag ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── atoms │ ├── avatar.dart │ ├── button.dart │ ├── checkbox.dart │ ├── circle_button.dart │ ├── context_menu.dart │ ├── dropdown_selector.dart │ ├── dropdown_text_field.dart │ ├── foundation.dart │ ├── glass_tile.dart │ ├── icon_button.dart │ ├── icon_toggle.dart │ ├── image_button.dart │ ├── panel.dart │ ├── popup_dialog.dart │ ├── radio_button.dart │ ├── seperator.dart │ ├── shader_background.dart │ ├── slider.dart │ ├── switch.dart │ ├── text.dart │ ├── text_button.dart │ ├── text_button_expander.dart │ ├── text_input.dart │ ├── texture_coordinate_painter.dart │ ├── tile.dart │ ├── toggleable_list.dart │ └── tooltip.dart ├── config │ ├── config.dart │ └── style │ │ ├── theme_amoled.dart │ │ ├── theme_base.dart │ │ ├── theme_changer.dart │ │ ├── theme_common.dart │ │ ├── theme_dark.dart │ │ ├── theme_extensions.dart │ │ ├── theme_json_converter.dart │ │ ├── theme_light.dart │ │ └── theme_you.dart ├── tiamat.dart └── widgetbook.dart ├── linux ├── .gitignore ├── CMakeLists.txt ├── flutter │ ├── CMakeLists.txt │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ └── generated_plugins.cmake ├── main.cc ├── my_application.cc └── my_application.h ├── macos ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── app_icon_1024.png │ │ ├── app_icon_128.png │ │ ├── app_icon_16.png │ │ ├── app_icon_256.png │ │ ├── app_icon_32.png │ │ ├── app_icon_512.png │ │ └── app_icon_64.png │ ├── Base.lproj │ └── MainMenu.xib │ ├── Configs │ ├── AppInfo.xcconfig │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── Warnings.xcconfig │ ├── DebugProfile.entitlements │ ├── Info.plist │ ├── MainFlutterWindow.swift │ └── Release.entitlements ├── pubspec.lock ├── pubspec.yaml ├── scripts └── codegen.sh ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── index.html └── manifest.json └── windows ├── .gitignore ├── CMakeLists.txt ├── flutter ├── CMakeLists.txt ├── generated_plugin_registrant.cc ├── generated_plugin_registrant.h └── generated_plugins.cmake └── runner ├── CMakeLists.txt ├── Runner.rc ├── flutter_window.cpp ├── flutter_window.h ├── main.cpp ├── resource.h ├── resources └── app_icon.ico ├── runner.exe.manifest ├── utils.cpp ├── utils.h ├── win32_window.cpp └── win32_window.h /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Additional context** 27 | Add any other context about the problem here. 28 | 29 | 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | commet/coverage/lcov.info 3 | commet/assets/js/package/olm.js 4 | commet/assets/js/package/olm.wasm 5 | commet/assets/js/package/olm_legacy.js 6 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/.gitmodules -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | If you believe you have found a security vulnerability in either Commet, or one of its dependencies, please send details to [security@commet.chat](mailto:security@commet.chat) 6 | -------------------------------------------------------------------------------- /commet/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | *.g.dart 12 | *.reflectable.dart 13 | *.widgetbook.dart 14 | migrate_working_dir/ 15 | 16 | # IntelliJ related 17 | *.iml 18 | *.ipr 19 | *.iws 20 | .idea/ 21 | 22 | # The .vscode folder contains launch configuration and tasks you configure in 23 | # VS Code which you may wish to be included in version control, so this line 24 | # is commented out by default. 25 | .vscode/ 26 | 27 | # Flutter/Dart/Pub related 28 | **/doc/api/ 29 | **/ios/Flutter/.last_build_id 30 | .dart_tool/ 31 | .flutter-plugins 32 | .flutter-plugins-dependencies 33 | .packages 34 | .pub-cache/ 35 | .pub/ 36 | /build/ 37 | 38 | # Symbolication related 39 | app.*.symbols 40 | 41 | # Obfuscation related 42 | app.*.map.json 43 | 44 | # Android Studio will place build artifacts here 45 | /android/app/debug 46 | /android/app/profile 47 | /android/app/release 48 | /lib/generated 49 | /integration_test/generated 50 | /linux/flatpak/.flatpak-builder 51 | /linux/flatpak/commet/bundle 52 | /linux/flatpak/repo 53 | *.flatpak -------------------------------------------------------------------------------- /commet/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | 3 | analyzer: 4 | errors: 5 | curly_braces_in_flow_control_structures: ignore 6 | exclude: 7 | - lib/*.g.dart 8 | - lib/generated/*.dart 9 | - lib/generated/l10n/*.dart 10 | - lib/main.widgetbook.dart -------------------------------------------------------------------------------- /commet/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | **/*.jks.b64 -------------------------------------------------------------------------------- /commet/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /commet/android/app/src/debug/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "714066565492", 4 | "project_id": "commet-16334", 5 | "storage_bucket": "commet-16334.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:714066565492:android:5769795fa988f8abe5b421", 11 | "android_client_info": { 12 | "package_name": "chat.commet.commetapp.debug" 13 | } 14 | }, 15 | "oauth_client": [], 16 | "api_key": [ 17 | { 18 | "current_key": "AIzaSyB9p6VqktUpinkfK8AkBUvWtW7P9yebtCs" 19 | } 20 | ], 21 | "services": { 22 | "appinvite_service": { 23 | "other_platform_oauth_client": [] 24 | } 25 | } 26 | } 27 | ], 28 | "configuration_version": "1" 29 | } -------------------------------------------------------------------------------- /commet/android/app/src/debug/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Commet (dev) 4 | 5 | 6 | -------------------------------------------------------------------------------- /commet/android/app/src/main/kotlin/chat/commet/commet/UnifiedPushService.kt: -------------------------------------------------------------------------------- 1 | package chat.commet.commetapp 2 | 3 | import io.flutter.embedding.engine.FlutterEngine 4 | import io.flutter.embedding.engine.dart.DartExecutor 5 | import org.unifiedpush.flutter.connector.UnifiedPushReceiver 6 | 7 | import android.content.Context 8 | 9 | class UnifiedPushReceiver : UnifiedPushReceiver() { 10 | override fun getEngine(context: Context): FlutterEngine { 11 | var engine = MainActivity.engine 12 | if (engine == null) { 13 | engine = MainActivity.provideEngine(context) 14 | engine.localizationPlugin.sendLocalesToFlutter( 15 | context.resources.configuration 16 | ) 17 | engine.dartExecutor.executeDartEntrypoint( 18 | DartExecutor.DartEntrypoint.createDefault() 19 | ) 20 | } 21 | return engine 22 | } 23 | } -------------------------------------------------------------------------------- /commet/android/app/src/main/res/drawable-hdpi/drawable-hdpi/ic_bg_service_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/drawable-hdpi/drawable-hdpi/ic_bg_service_small.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/drawable-hdpi/notification_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/drawable-hdpi/notification_icon.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/drawable-mdpi/ic_bg_service_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/drawable-mdpi/ic_bg_service_small.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/drawable-mdpi/notification_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/drawable-mdpi/notification_icon.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/drawable-v21/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/drawable-v21/background.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /commet/android/app/src/main/res/drawable-xhdpi/ic_bg_service_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/drawable-xhdpi/ic_bg_service_small.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/drawable-xhdpi/notification_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/drawable-xhdpi/notification_icon.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/drawable-xxhdpi/ic_bg_service_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/drawable-xxhdpi/ic_bg_service_small.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/drawable-xxhdpi/notification_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/drawable-xxhdpi/notification_icon.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/drawable-xxxhdpi/ic_bg_service_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/drawable-xxxhdpi/ic_bg_service_small.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/drawable-xxxhdpi/notification_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/drawable-xxxhdpi/notification_icon.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/drawable/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/drawable/background.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /commet/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /commet/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /commet/android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #534CDD 4 | -------------------------------------------------------------------------------- /commet/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Commet 4 | 5 | -------------------------------------------------------------------------------- /commet/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /commet/android/app/src/release/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "714066565492", 4 | "project_id": "commet-16334", 5 | "storage_bucket": "commet-16334.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:714066565492:android:5769795fa988f8abe5b421", 11 | "android_client_info": { 12 | "package_name": "chat.commet.commetapp" 13 | } 14 | }, 15 | "oauth_client": [], 16 | "api_key": [ 17 | { 18 | "current_key": "AIzaSyB9p6VqktUpinkfK8AkBUvWtW7P9yebtCs" 19 | } 20 | ], 21 | "services": { 22 | "appinvite_service": { 23 | "other_platform_oauth_client": [] 24 | } 25 | } 26 | } 27 | ], 28 | "configuration_version": "1" 29 | } -------------------------------------------------------------------------------- /commet/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.9.20' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.2.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | // classpath 'com.google.gms:google-services:4.3.8' 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | mavenCentral() 19 | } 20 | } 21 | 22 | rootProject.buildDir = '../build' 23 | subprojects { 24 | project.buildDir = "${rootProject.buildDir}/${project.name}" 25 | } 26 | 27 | subprojects { 28 | afterEvaluate { project -> 29 | if (project.plugins.hasPlugin("com.android.application") || 30 | project.plugins.hasPlugin("com.android.library")) { 31 | project.android { 32 | compileSdkVersion 34 33 | buildToolsVersion "34.0.0" 34 | } 35 | } 36 | } 37 | } 38 | 39 | subprojects { 40 | project.evaluationDependsOn(':app') 41 | } 42 | 43 | tasks.register("clean", Delete) { 44 | delete rootProject.buildDir 45 | } 46 | -------------------------------------------------------------------------------- /commet/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | org.gradle.java.installations.fromEnv=JAVA_8_HOME,JAVA_17_HOME -------------------------------------------------------------------------------- /commet/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 6 | -------------------------------------------------------------------------------- /commet/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /commet/assets/config/global_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "default_homeserver": "matrix.org" 3 | } -------------------------------------------------------------------------------- /commet/assets/emoji_data/readme.md: -------------------------------------------------------------------------------- 1 | This data is from https://github.com/milesj/emojibase -------------------------------------------------------------------------------- /commet/assets/font/code/JetBrainsMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/font/code/JetBrainsMono-Regular.ttf -------------------------------------------------------------------------------- /commet/assets/font/emoji-font/NotoColorEmoji.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/font/emoji-font/NotoColorEmoji.ttf -------------------------------------------------------------------------------- /commet/assets/font/jellee/Jellee-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/font/jellee/Jellee-Bold.ttf -------------------------------------------------------------------------------- /commet/assets/font/roboto/Roboto-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/font/roboto/Roboto-Black.ttf -------------------------------------------------------------------------------- /commet/assets/font/roboto/Roboto-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/font/roboto/Roboto-BlackItalic.ttf -------------------------------------------------------------------------------- /commet/assets/font/roboto/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/font/roboto/Roboto-Bold.ttf -------------------------------------------------------------------------------- /commet/assets/font/roboto/Roboto-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/font/roboto/Roboto-BoldItalic.ttf -------------------------------------------------------------------------------- /commet/assets/font/roboto/Roboto-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/font/roboto/Roboto-Italic.ttf -------------------------------------------------------------------------------- /commet/assets/font/roboto/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/font/roboto/Roboto-Light.ttf -------------------------------------------------------------------------------- /commet/assets/font/roboto/Roboto-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/font/roboto/Roboto-LightItalic.ttf -------------------------------------------------------------------------------- /commet/assets/font/roboto/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/font/roboto/Roboto-Medium.ttf -------------------------------------------------------------------------------- /commet/assets/font/roboto/Roboto-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/font/roboto/Roboto-MediumItalic.ttf -------------------------------------------------------------------------------- /commet/assets/font/roboto/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/font/roboto/Roboto-Regular.ttf -------------------------------------------------------------------------------- /commet/assets/font/roboto/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/font/roboto/Roboto-Thin.ttf -------------------------------------------------------------------------------- /commet/assets/font/roboto/Roboto-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/font/roboto/Roboto-ThinItalic.ttf -------------------------------------------------------------------------------- /commet/assets/images/app_icon/app_icon_filled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/images/app_icon/app_icon_filled.png -------------------------------------------------------------------------------- /commet/assets/images/app_icon/app_icon_rounded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/images/app_icon/app_icon_rounded.png -------------------------------------------------------------------------------- /commet/assets/images/app_icon/app_icon_transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/images/app_icon/app_icon_transparent.png -------------------------------------------------------------------------------- /commet/assets/images/app_icon/app_icon_transparent_cropped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/images/app_icon/app_icon_transparent_cropped.png -------------------------------------------------------------------------------- /commet/assets/images/effects/particles/confetti.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/images/effects/particles/confetti.webp -------------------------------------------------------------------------------- /commet/assets/images/effects/particles/fluent-emoji-alien-monster.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/images/effects/particles/fluent-emoji-alien-monster.png -------------------------------------------------------------------------------- /commet/assets/images/effects/particles/fluent-emoji-eyes.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/images/effects/particles/fluent-emoji-eyes.webp -------------------------------------------------------------------------------- /commet/assets/images/effects/particles/fluent-emoji-smile-with-hearts.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/images/effects/particles/fluent-emoji-smile-with-hearts.webp -------------------------------------------------------------------------------- /commet/assets/images/effects/particles/fluent-emoji-snowflake.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/images/effects/particles/fluent-emoji-snowflake.webp -------------------------------------------------------------------------------- /commet/assets/images/effects/particles/fluent-emoji-source.txt: -------------------------------------------------------------------------------- 1 | Sourced from: https://github.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis 2 | Provided under MIT License, as of 16th February, 2025 -------------------------------------------------------------------------------- /commet/assets/js/package/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/assets/js/package/.gitkeep -------------------------------------------------------------------------------- /commet/assets/l10n/intl_be.arb: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /commet/assets/l10n/intl_fa.arb: -------------------------------------------------------------------------------- 1 | { 2 | "messagePlaceholderUserCreatedRoom": "{user} اتاق را ایجاد کرد!", 3 | "@messagePlaceholderUserCreatedRoom": { 4 | "description": "Message body for when a user created the room", 5 | "type": "text", 6 | "placeholders": { 7 | "user": {} 8 | } 9 | }, 10 | "messageFailedToDecrypt": "رمزگشایی رویداد انجام نشد", 11 | "@messageFailedToDecrypt": { 12 | "description": "Placeholde text for when a message fails to decrypt", 13 | "type": "text", 14 | "placeholders": {} 15 | }, 16 | "labelRoomsList": "اتاق‌ها", 17 | "@labelRoomsList": { 18 | "description": "Header label for the list of rooms", 19 | "type": "text", 20 | "placeholders": {} 21 | }, 22 | "fileDragDropPrompt": "برای بارگذاری پرونده را رها کنید...", 23 | "@fileDragDropPrompt": { 24 | "description": "Text that is shown when a user is dragging a file", 25 | "type": "text", 26 | "placeholders": {} 27 | }, 28 | "messagePlaceholderSticker": "{user} یک شکلک فرستاد", 29 | "@messagePlaceholderSticker": { 30 | "description": "Message body for when a user sends a sticker", 31 | "type": "text", 32 | "placeholders": { 33 | "user": {} 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /commet/assets/shader/star_trails.frag: -------------------------------------------------------------------------------- 1 | // Ported from: https://www.shadertoy.com/view/Wtl3D7 2 | 3 | #include 4 | 5 | uniform vec2 uSize; 6 | uniform float time; 7 | out vec4 fragColor; 8 | 9 | 10 | #define PI 3.1415926 11 | 12 | float rand(float t) 13 | { 14 | return fract(sin(dot(vec2(t,t) ,vec2(12.9898,78.233))) * 43758.5453); 15 | } 16 | 17 | void main(void) { 18 | vec2 fragCoord = FlutterFragCoord(); 19 | 20 | vec2 uv=(fragCoord.xy*2.0-uSize.xy)/uSize.y; 21 | vec2 uv1=uv-vec2(0.8,.4); 22 | float r = length(uv1)*111.; 23 | 24 | float t = ceil(r); 25 | float rt = rand(t); 26 | float a = fract(atan(uv1.y, uv1.x)/PI+time*rt*.1 +t*0.1); 27 | 28 | float ang = rt; 29 | float c = smoothstep(ang,ang-1.5,a*5.) ; 30 | 31 | vec3 col = vec3(.3,0.3,.5)*3.; 32 | float rr = length(uv-vec2(0.6,1.4))-0.8; 33 | vec3 coll=vec3(0.,rr*0.1,rr*0.24); 34 | 35 | coll=mix(coll,col*rt,c*step(0.1,r/111.)); 36 | 37 | 38 | fragColor=vec4(coll,1.0); 39 | } -------------------------------------------------------------------------------- /commet/assets/shader/texture_coordinate.frag: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | precision mediump sampler2D; 4 | 5 | uniform float top; 6 | uniform float left; 7 | uniform float right; 8 | uniform float bottom; 9 | uniform float windowWidth; 10 | uniform float windowHeight; 11 | uniform sampler2D image; 12 | 13 | out vec4 fragColor; 14 | 15 | void main(void) { 16 | vec2 fragCoord = FlutterFragCoord(); 17 | vec2 p = (fragCoord + vec2(left, top)) / vec2(windowWidth, windowHeight); 18 | fragColor = texture(image, p); 19 | } -------------------------------------------------------------------------------- /commet/build.yaml: -------------------------------------------------------------------------------- 1 | # Read about `build.yaml` at https://pub.dev/packages/build_config 2 | builders: 3 | 4 | emojiBuilder: 5 | import: "package:commet/generator/builder.dart" 6 | builder_factories: ["emojiBuilder"] 7 | build_extensions: {"assets/emoji_data/data.json": ["lib/utils/emoji/unicode_emoji_data_groups.g.dart"]} 8 | build_to: source 9 | auto_apply: root_package -------------------------------------------------------------------------------- /commet/devtools_options.yaml: -------------------------------------------------------------------------------- 1 | description: This file stores settings for Dart & Flutter DevTools. 2 | documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states 3 | extensions: 4 | -------------------------------------------------------------------------------- /commet/integration_test/README.md: -------------------------------------------------------------------------------- 1 | # Integration Testing 2 | 3 | To run unit tests, there are a few prerequisites. 4 | 5 | - Make sure you have `libolm3` installed `sudo apt install libolm3` 6 | - Run Code Generation [scripts/codegen.dart](../scripts/codegen.dart) 7 | - Configure environment variables [. scripts/setup-env.sh](../scripts/setup-env.sh) 8 | - Start the synapse docker server [scripts/integration-server-synapse.sh](../scripts/integration-server-synapse.sh) 9 | - Configure synapse [scripts/integration-prepare-homeserver.sh](../scripts/integration-server-synapse.sh) 10 | 11 | If you have done all this you should be ready to test! [scripts/integration-test.sh](../scripts/integration-test.sh) 12 | -------------------------------------------------------------------------------- /commet/integration_test/benchmark/benchmark.dart: -------------------------------------------------------------------------------- 1 | import 'package:integration_test/integration_test.dart'; 2 | import 'benchmarks/timeline_viewer_benchmark.dart' as timeline; 3 | 4 | main() { 5 | IntegrationTestWidgetsFlutterBinding.ensureInitialized(); 6 | 7 | timeline.main(); 8 | } 9 | -------------------------------------------------------------------------------- /commet/integration_test/extensions/wait_for.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | 3 | /// Workaround for https://github.com/flutter/flutter/issues/88765 4 | extension WaitForExtension on WidgetTester { 5 | Future waitFor( 6 | bool Function() finder, { 7 | Duration timeout = const Duration(seconds: 20), 8 | bool skipPumpAndSettle = false, 9 | }) async { 10 | final end = DateTime.now().add(timeout); 11 | 12 | while (finder.call() != true) { 13 | if (DateTime.now().isAfter(end)) { 14 | throw Exception('Timed out waiting for $finder'); 15 | } 16 | 17 | if (!skipPumpAndSettle) { 18 | await pump(); 19 | } 20 | 21 | await Future.delayed(const Duration(milliseconds: 100)); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /commet/integration_test/runner.dart: -------------------------------------------------------------------------------- 1 | // This file is a workaround for the issue: https://github.com/flutter/flutter/issues/101031 2 | 3 | import 'package:commet/main.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:integration_test/integration_test.dart'; 6 | import 'generated/l10n.dart'; 7 | import 'matrix/login_test.dart' as login_test; 8 | import 'matrix/key_verification_test.dart' as key_verification_test; 9 | import 'matrix/create_space_test.dart' as create_space_test; 10 | import 'matrix/multi_account_test.dart' as multi_account_test; 11 | import 'matrix/change_space_name_test.dart' as change_space_name_test; 12 | 13 | void main() async { 14 | IntegrationTestWidgetsFlutterBinding.ensureInitialized(); 15 | await T.load(const Locale("en")); 16 | await preferences.init(); 17 | 18 | login_test.main(); 19 | key_verification_test.main(); 20 | create_space_test.main(); 21 | multi_account_test.main(); 22 | change_space_name_test.main(); 23 | } 24 | -------------------------------------------------------------------------------- /commet/integration_test/synapse/data/localhost.log.config: -------------------------------------------------------------------------------- 1 | version: 1 2 | 3 | formatters: 4 | precise: 5 | format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s' 6 | 7 | handlers: 8 | 9 | 10 | console: 11 | class: logging.StreamHandler 12 | formatter: precise 13 | 14 | loggers: 15 | synapse.storage.SQL: 16 | # beware: increasing this to DEBUG will make synapse log sensitive 17 | # information such as access tokens. 18 | level: INFO 19 | 20 | root: 21 | level: INFO 22 | 23 | 24 | handlers: [console] 25 | 26 | 27 | disable_existing_loggers: false -------------------------------------------------------------------------------- /commet/integration_test/synapse/data/localhost.signing.key: -------------------------------------------------------------------------------- 1 | ed25519 a_SLrz 0Ho/81rZZve88zdRxhaXWHUT6K3OqzmP35rNMZBUr6I 2 | -------------------------------------------------------------------------------- /commet/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /commet/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /commet/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /commet/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /commet/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /commet/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /commet/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /commet/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /commet/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /commet/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /commet/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /commet/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /commet/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /commet/l10n.yaml: -------------------------------------------------------------------------------- 1 | arb-dir: assets/l10n 2 | template-arb-file: intl_en.arb 3 | output-localization-file: l10n.dart 4 | output-class: T 5 | preferred-supported-locales: ["en"] -------------------------------------------------------------------------------- /commet/lib/cache/cache_file_provider.dart: -------------------------------------------------------------------------------- 1 | import 'dart:typed_data'; 2 | 3 | import 'package:commet/cache/file_provider.dart'; 4 | import 'package:commet/main.dart'; 5 | 6 | class CacheFileProvider implements FileProvider { 7 | @override 8 | late String fileIdentifier; 9 | Future Function() getter; 10 | CacheFileProvider(this.fileIdentifier, this.getter); 11 | 12 | CacheFileProvider.thumbnail(String fileId, this.getter) 13 | : fileIdentifier = "thumbnail_$fileId"; 14 | 15 | @override 16 | Future resolve({String? savePath}) async { 17 | return fileCache?.fetchFile(fileIdentifier, getter); 18 | } 19 | 20 | @override 21 | Future save(String filepath) async {} 22 | 23 | @override 24 | Stream? get onProgressChanged => null; 25 | } 26 | -------------------------------------------------------------------------------- /commet/lib/cache/file_cache.dart: -------------------------------------------------------------------------------- 1 | import 'file_cache_stub.dart' 2 | if (dart.library.io) "package:commet/cache/drift_file_cache.dart"; 3 | 4 | import 'package:flutter/foundation.dart'; 5 | 6 | abstract class FileCache { 7 | Future init(); 8 | 9 | Future close(); 10 | 11 | Future hasFile(String identifier); 12 | 13 | Future getFile(String identifier); 14 | 15 | Future putFile(String identifier, Uint8List bytes); 16 | 17 | Future fetchFile(String identifier, Future Function() getter); 18 | 19 | Future clean(); 20 | 21 | static FileCache? getFileCacheInstance() { 22 | return getFileCacheImplementation(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /commet/lib/cache/file_cache_stub.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/cache/file_cache.dart'; 2 | 3 | FileCache? getFileCacheImplementation() => null; 4 | -------------------------------------------------------------------------------- /commet/lib/cache/file_provider.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | class DownloadProgress { 4 | int downloaded; 5 | int total; 6 | 7 | DownloadProgress(this.downloaded, this.total); 8 | } 9 | 10 | abstract class FileProvider { 11 | Future resolve(); 12 | 13 | Future save(String filepath); 14 | 15 | Stream? get onProgressChanged; 16 | 17 | String get fileIdentifier; 18 | } 19 | 20 | class SystemFileProvider implements FileProvider { 21 | File file; 22 | 23 | @override 24 | String get fileIdentifier => file.path; 25 | 26 | @override 27 | Future resolve() async { 28 | return file.uri; 29 | } 30 | 31 | @override 32 | Future save(String filepath) { 33 | throw UnimplementedError(); 34 | } 35 | 36 | SystemFileProvider(this.file); 37 | 38 | @override 39 | Stream? get onProgressChanged => null; 40 | } 41 | -------------------------------------------------------------------------------- /commet/lib/client/alert.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/utils/notifying_list.dart'; 2 | 3 | enum AlertType { info, warning, critical } 4 | 5 | class Alert { 6 | late String Function() _messageGetter; 7 | late String Function() _titleGetter; 8 | late Function()? action; 9 | AlertType type; 10 | 11 | String get title => _titleGetter(); 12 | String get message => _messageGetter(); 13 | 14 | Alert(this.type, 15 | {required String Function() messageGetter, 16 | required String Function() titleGetter, 17 | this.action}) { 18 | _messageGetter = messageGetter; 19 | _titleGetter = titleGetter; 20 | } 21 | } 22 | 23 | class AlertManager { 24 | final NotifyingList _alerts = NotifyingList.empty(growable: true); 25 | 26 | Stream get onAlertAdded => _alerts.onAdd; 27 | 28 | Stream get onAlertRemoved => _alerts.onRemove; 29 | 30 | List get alerts => _alerts; 31 | 32 | void addAlert(Alert alert) { 33 | _alerts.add(alert); 34 | } 35 | 36 | void clearAlert(Alert alert) { 37 | _alerts.remove(alert); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /commet/lib/client/auth.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | abstract class LoginFlow { 5 | Future submit(Client client); 6 | } 7 | 8 | abstract class PasswordLoginFlow implements LoginFlow { 9 | String? username; 10 | String? password; 11 | } 12 | 13 | abstract class SsoLoginFlow implements LoginFlow { 14 | ImageProvider? icon; 15 | String get name; 16 | } 17 | -------------------------------------------------------------------------------- /commet/lib/client/components/command/command_component.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | import 'package:commet/client/components/component.dart'; 3 | import 'package:commet/client/timeline_events/timeline_event.dart'; 4 | import 'package:commet/ui/organisms/chat/chat.dart'; 5 | 6 | abstract class CommandComponent implements Component { 7 | List getCommands(); 8 | 9 | bool isExecutable(String string); 10 | 11 | Future executeCommand(String string, Room room, 12 | {TimelineEvent? interactingEvent, EventInteractionType? type}); 13 | } 14 | -------------------------------------------------------------------------------- /commet/lib/client/components/component.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | import 'package:commet/main.dart'; 3 | 4 | abstract class Component { 5 | final T client; 6 | Component(this.client); 7 | } 8 | 9 | abstract class NeedsPostLoginInit { 10 | void postLoginInit(); 11 | 12 | static void doPostLoginInit() { 13 | for (var client in clientManager!.clients) { 14 | if (!client.isLoggedIn()) continue; 15 | 16 | var components = client.getAllComponents()!; 17 | 18 | for (var component in components) { 19 | if (component is! NeedsPostLoginInit) continue; 20 | 21 | (component as NeedsPostLoginInit).postLoginInit(); 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /commet/lib/client/components/direct_messages/direct_message_component.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | import 'package:commet/client/components/component.dart'; 3 | 4 | abstract class DirectMessagesInterface { 5 | List get directMessageRooms; 6 | 7 | List get highlightedRoomsList; 8 | 9 | Stream get onRoomsListUpdated; 10 | 11 | Stream get onHighlightedRoomsListUpdated; 12 | } 13 | 14 | abstract class DirectMessagesComponent 15 | implements Component, DirectMessagesInterface { 16 | bool isRoomDirectMessage(Room room); 17 | 18 | String? getDirectMessagePartnerId(Room room); 19 | 20 | /// Open a new direct message with another user 21 | Future createDirectMessage(String userId); 22 | } 23 | -------------------------------------------------------------------------------- /commet/lib/client/components/emoticon/emoticon.dart: -------------------------------------------------------------------------------- 1 | import 'dart:core'; 2 | import 'package:flutter/material.dart'; 3 | 4 | enum EmoticonUsage { 5 | sticker, 6 | emoji, 7 | all, 8 | inherit, 9 | } 10 | 11 | abstract class Emoticon { 12 | ImageProvider? get image; 13 | String get slug; 14 | String? get shortcode; 15 | String get key; 16 | 17 | EmoticonUsage get usage; 18 | 19 | bool get isSticker => 20 | usage == EmoticonUsage.sticker || usage == EmoticonUsage.all; 21 | 22 | bool get isEmoji => 23 | usage == EmoticonUsage.emoji || usage == EmoticonUsage.all; 24 | } 25 | -------------------------------------------------------------------------------- /commet/lib/client/components/event_search/event_search_component.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | import 'package:commet/client/components/component.dart'; 3 | import 'package:commet/client/timeline_events/timeline_event.dart'; 4 | 5 | abstract class EventSearchSession { 6 | Stream> startSearch(String searchTerm); 7 | 8 | bool get currentlySearching; 9 | } 10 | 11 | abstract class EventSearchComponent implements Component { 12 | Future createSearchSession(Room room); 13 | } 14 | -------------------------------------------------------------------------------- /commet/lib/client/components/gif/gif_component.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | import 'package:commet/client/components/gif/gif_search_result.dart'; 3 | import 'package:commet/client/components/room_component.dart'; 4 | import 'package:commet/client/timeline_events/timeline_event.dart'; 5 | 6 | abstract class GifComponent 7 | implements RoomComponent { 8 | Future> search(String query); 9 | 10 | Future sendGif(GifSearchResult gif, TimelineEvent? inReplyTo); 11 | 12 | String get searchPlaceholder; 13 | } 14 | -------------------------------------------------------------------------------- /commet/lib/client/components/gif/gif_search_result.dart: -------------------------------------------------------------------------------- 1 | class GifSearchResult { 2 | final Uri previewUrl; 3 | final Uri fullResUrl; 4 | final double x; 5 | final double y; 6 | 7 | GifSearchResult(this.previewUrl, this.fullResUrl, this.x, this.y); 8 | } 9 | -------------------------------------------------------------------------------- /commet/lib/client/components/invitation/invitation.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Invitation { 4 | String roomId; 5 | String? displayName; 6 | String? senderId; 7 | Color? color; 8 | ImageProvider? avatar; 9 | 10 | Invitation( 11 | {required this.roomId, 12 | this.displayName, 13 | this.color, 14 | this.avatar, 15 | this.senderId}); 16 | 17 | @override 18 | bool operator ==(Object other) { 19 | if (other is! Invitation) return false; 20 | return roomId == other.roomId; 21 | } 22 | 23 | @override 24 | int get hashCode => roomId.hashCode; 25 | } 26 | -------------------------------------------------------------------------------- /commet/lib/client/components/invitation/invitation_component.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | import 'package:commet/client/components/component.dart'; 3 | import 'package:commet/client/components/invitation/invitation.dart'; 4 | import 'package:commet/client/profile.dart'; 5 | import 'package:commet/utils/notifying_list.dart'; 6 | 7 | abstract class InvitationComponent implements Component { 8 | NotifyingList get invitations; 9 | 10 | Future acceptInvitation(Invitation invitation); 11 | 12 | Future rejectInvitation(Invitation invitation); 13 | 14 | Future inviteUserToRoom( 15 | {required String userId, required String roomId}); 16 | 17 | Future> searchUsers(String term); 18 | } 19 | -------------------------------------------------------------------------------- /commet/lib/client/components/message_effects/message_effect_component.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | import 'package:commet/client/components/component.dart'; 3 | import 'package:commet/client/timeline_events/timeline_event.dart'; 4 | 5 | abstract class MessageEffectComponent 6 | implements Component { 7 | void doEffect(TimelineEvent event); 8 | 9 | bool hasEffect(TimelineEvent event); 10 | } 11 | -------------------------------------------------------------------------------- /commet/lib/client/components/message_effects/message_effect_particles.dart: -------------------------------------------------------------------------------- 1 | import 'package:starfield/starfield.dart'; 2 | 3 | abstract class MessageEffectParticles { 4 | EcsParticleSystem? system; 5 | 6 | MessageEffectParticles(this.system); 7 | 8 | Future init(); 9 | } 10 | -------------------------------------------------------------------------------- /commet/lib/client/components/pinned_messages/pinned_messages_component.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | import 'package:commet/client/components/room_component.dart'; 3 | 4 | abstract class PinnedMessagesComponent 5 | implements RoomComponent { 6 | List getPinnedMessages(); 7 | 8 | Future pinMessage(String eventId); 9 | 10 | Future unpinMessage(String eventId); 11 | 12 | bool isMessagePinned(String eventId); 13 | 14 | bool get canPinMessages; 15 | } 16 | -------------------------------------------------------------------------------- /commet/lib/client/components/push_notification/modifiers/do_not_disturb.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/components/push_notification/modifiers/notification_modifiers.dart'; 2 | import 'package:commet/client/components/push_notification/notification_content.dart'; 3 | 4 | class NotificationModifierDoNotDisturb implements NotificationModifier { 5 | @override 6 | Future process(NotificationContent content) async { 7 | return null; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /commet/lib/client/components/push_notification/modifiers/hide_content.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/components/push_notification/modifiers/notification_modifiers.dart'; 2 | import 'package:commet/client/components/push_notification/notification_content.dart'; 3 | import 'package:intl/intl.dart'; 4 | 5 | class NotificationModifierHideContent implements NotificationModifier { 6 | String get notificationModifiersPrivacyEnhanced => Intl.message( 7 | "Sent a message", 8 | name: "notificationModifiersPrivacyEnhanced", 9 | desc: 10 | "Placeholder text to put in a notification when the user has privacy enhanced notifications enabled."); 11 | 12 | @override 13 | Future process(NotificationContent content) async { 14 | content.content = "A Notification was received"; 15 | 16 | if (content is MessageNotificationContent) { 17 | content.content = notificationModifiersPrivacyEnhanced; 18 | } 19 | 20 | return content; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /commet/lib/client/components/push_notification/modifiers/notification_modifiers.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/components/push_notification/notification_content.dart'; 2 | 3 | abstract class NotificationModifier { 4 | Future process(NotificationContent content); 5 | } 6 | -------------------------------------------------------------------------------- /commet/lib/client/components/push_notification/notifier.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/components/push_notification/notification_content.dart'; 2 | import 'package:commet/client/room.dart'; 3 | 4 | abstract class Notifier { 5 | Future notify(NotificationContent notification); 6 | 7 | bool get hasPermission; 8 | 9 | bool get needsToken; 10 | 11 | bool get enabled; 12 | 13 | Future getToken(); 14 | 15 | Future requestPermission(); 16 | 17 | Map? extraRegistrationData(); 18 | 19 | Future init(); 20 | 21 | Future clearNotifications(Room room); 22 | } 23 | -------------------------------------------------------------------------------- /commet/lib/client/components/push_notification/push_notification_component.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | import 'package:commet/client/components/component.dart'; 3 | import 'package:commet/main.dart'; 4 | 5 | abstract class PushNotificationComponent 6 | implements Component, NeedsPostLoginInit { 7 | Future ensurePushNotificationsRegistered( 8 | String pushKey, Uri pushServer, String deviceName, 9 | {Map? extraData}); 10 | 11 | Future updatePushers(); 12 | 13 | static Future updateAllPushers() async { 14 | for (var client in clientManager!.clients) { 15 | var notifier = client.getComponent(); 16 | await notifier?.updatePushers(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /commet/lib/client/components/read_receipts/read_receipt_component.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | import 'package:commet/client/components/room_component.dart'; 3 | 4 | abstract class ReadReceiptComponent 5 | implements RoomComponent { 6 | Stream get onReadReceiptsUpdated; 7 | 8 | List get receipts; 9 | } 10 | -------------------------------------------------------------------------------- /commet/lib/client/components/room_component.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | import 'package:commet/client/components/component.dart'; 3 | 4 | abstract class RoomComponent 5 | extends Component { 6 | late T _room; 7 | T get room => _room; 8 | 9 | RoomComponent(R client, T room) : super(client) { 10 | _room = room; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /commet/lib/client/components/space_component.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | import 'package:commet/client/components/component.dart'; 3 | 4 | abstract class SpaceComponent 5 | extends Component { 6 | late T _space; 7 | T get space => _space; 8 | 9 | SpaceComponent(R client, T space) : super(client) { 10 | _space = space; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /commet/lib/client/components/threads/thread_component.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/attachment.dart'; 2 | import 'package:commet/client/client.dart'; 3 | import 'package:commet/client/components/component.dart'; 4 | import 'package:commet/client/timeline_events/timeline_event.dart'; 5 | 6 | abstract class ThreadsComponent implements Component { 7 | bool isEventInResponseToThread(TimelineEvent event, Timeline timeline); 8 | 9 | bool isHeadOfThread(TimelineEvent event, Timeline timeline); 10 | 11 | Future getThreadTimeline( 12 | {required Timeline roomTimeline, required String threadRootEventId}); 13 | 14 | Future sendMessage({ 15 | required String threadRootEventId, 16 | required Room room, 17 | String? message, 18 | TimelineEvent? inReplyTo, 19 | TimelineEvent? replaceEvent, 20 | List? processedAttachments, 21 | }); 22 | 23 | TimelineEvent? getFirstReplyToThread(TimelineEvent event, Timeline timeline); 24 | } 25 | -------------------------------------------------------------------------------- /commet/lib/client/components/typing_indicators/typing_indicator_component.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | import 'package:commet/client/components/room_component.dart'; 3 | import 'package:commet/client/member.dart'; 4 | 5 | abstract class TypingIndicatorComponent 6 | implements RoomComponent { 7 | Stream get onTypingUsersUpdated; 8 | 9 | List get typingUsers; 10 | 11 | Future setTypingStatus(bool status); 12 | } 13 | -------------------------------------------------------------------------------- /commet/lib/client/components/url_preview/url_preview_component.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | import 'package:commet/client/components/component.dart'; 3 | import 'package:commet/client/timeline_events/timeline_event.dart'; 4 | import 'package:flutter/widgets.dart'; 5 | 6 | abstract class UrlPreviewComponent implements Component { 7 | bool shouldGetPreviewData(Timeline timeline, TimelineEvent event); 8 | 9 | Future getPreview(Timeline timeline, TimelineEvent event); 10 | 11 | UrlPreviewData? getCachedPreview(Timeline timeline, TimelineEvent event); 12 | } 13 | 14 | class UrlPreviewData { 15 | Uri uri; 16 | String? siteName; 17 | String? title; 18 | String? description; 19 | ImageProvider? image; 20 | 21 | UrlPreviewData( 22 | this.uri, { 23 | this.siteName, 24 | this.title, 25 | this.description, 26 | this.image, 27 | }); 28 | } 29 | -------------------------------------------------------------------------------- /commet/lib/client/error_profile.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/profile.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class ErrorProfile implements Profile { 5 | @override 6 | ImageProvider? get avatar => null; 7 | 8 | @override 9 | Color get defaultColor => Colors.red; 10 | 11 | @override 12 | String? get detail => null; 13 | 14 | @override 15 | String get displayName => "Error"; 16 | 17 | @override 18 | String get identifier => "Error"; 19 | 20 | @override 21 | String get userName => "Error"; 22 | } 23 | -------------------------------------------------------------------------------- /commet/lib/client/matrix/components/matrix_sync_listener.dart: -------------------------------------------------------------------------------- 1 | import 'package:matrix/matrix.dart' as matrix; 2 | 3 | abstract class MatrixRoomSyncListener { 4 | onSync(matrix.JoinedRoomUpdate update); 5 | } 6 | -------------------------------------------------------------------------------- /commet/lib/client/matrix/database/matrix_database.dart: -------------------------------------------------------------------------------- 1 | import 'matrix_database_stub.dart' 2 | if (dart.library.html) "matrix_database_html.dart" 3 | if (dart.library.io) "matrix_database_io.dart"; 4 | 5 | import 'package:matrix/matrix.dart'; 6 | 7 | Future getMatrixDatabase(String clientName) { 8 | return getMatrixDatabaseImplementation(clientName); 9 | } 10 | 11 | Future getLegacyMatrixDatabase(String clientName) { 12 | return getLegacyMatrixDatabaseImplementation(clientName); 13 | } 14 | -------------------------------------------------------------------------------- /commet/lib/client/matrix/database/matrix_database_html.dart: -------------------------------------------------------------------------------- 1 | import 'package:matrix/matrix.dart'; 2 | 3 | import 'package:universal_html/html.dart' as html; 4 | 5 | Future getMatrixDatabaseImplementation(String clientName) async { 6 | await html.window.navigator.storage?.persist(); 7 | var db = MatrixSdkDatabase(clientName); 8 | await db.open(); 9 | return db; 10 | } 11 | 12 | Future getLegacyMatrixDatabaseImplementation( 13 | String clientName) async { 14 | return null; 15 | } 16 | -------------------------------------------------------------------------------- /commet/lib/client/matrix/database/matrix_database_stub.dart: -------------------------------------------------------------------------------- 1 | import 'package:matrix/matrix.dart'; 2 | 3 | Future getMatrixDatabaseImplementation(String clientName) async { 4 | throw UnimplementedError(); 5 | } 6 | 7 | Future getLegacyMatrixDatabaseImplementation( 8 | String clientName) async { 9 | throw UnimplementedError(); 10 | } 11 | -------------------------------------------------------------------------------- /commet/lib/client/matrix/matrix_attachment.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/attachment.dart'; 2 | import 'package:matrix/matrix.dart'; 3 | 4 | class MatrixProcessedAttachment extends ProcessedAttachment { 5 | MatrixFile file; 6 | 7 | MatrixImageFile? thumbnailFile; 8 | 9 | MatrixProcessedAttachment(this.file, {this.thumbnailFile}); 10 | } 11 | -------------------------------------------------------------------------------- /commet/lib/client/matrix/matrix_profile.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/matrix/matrix_member.dart'; 2 | import 'package:commet/client/matrix/matrix_mxc_image_provider.dart'; 3 | import 'package:commet/client/profile.dart'; 4 | import 'package:commet/ui/pages/developer/app_inspector/value_reflector_widget.dart'; 5 | import 'package:flutter/widgets.dart'; 6 | import 'package:matrix/matrix.dart' as matrix; 7 | 8 | @Reflector() 9 | class MatrixProfile implements Profile { 10 | matrix.Profile profile; 11 | matrix.Client client; 12 | 13 | @override 14 | ImageProvider? get avatar => profile.avatarUrl != null 15 | ? MatrixMxcImage(profile.avatarUrl!, client, 16 | autoLoadFullRes: false, thumbnailHeight: 128, fullResHeight: 128) 17 | : null; 18 | 19 | @override 20 | Color get defaultColor => MatrixMember.hashColor(profile.userId); 21 | 22 | @override 23 | String? get detail => profile.userId; 24 | 25 | @override 26 | String get displayName => profile.displayName ?? profile.userId; 27 | 28 | @override 29 | String get identifier => profile.userId; 30 | 31 | @override 32 | String get userName => profile.userId; 33 | 34 | MatrixProfile(this.client, this.profile); 35 | } 36 | -------------------------------------------------------------------------------- /commet/lib/client/matrix/matrix_role.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/role.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class MatrixRole implements Role { 5 | int powerLevel; 6 | late int rank; 7 | 8 | MatrixRole(this.powerLevel) { 9 | if (powerLevel >= 100) { 10 | name = "Admin"; 11 | rank = 100; 12 | icon = Icons.security; 13 | } else if (powerLevel >= 50) { 14 | name = "Moderator"; 15 | rank = 50; 16 | icon = Icons.shield_rounded; 17 | } else { 18 | name = "Member"; 19 | icon = Icons.groups; 20 | rank = 0; 21 | } 22 | } 23 | 24 | @override 25 | late String name; 26 | 27 | @override 28 | bool operator ==(Object other) { 29 | if (other is! MatrixRole) return false; 30 | if (identical(this, other)) return true; 31 | return rank == other.rank; 32 | } 33 | 34 | @override 35 | int get hashCode => powerLevel.hashCode; 36 | 37 | @override 38 | late IconData icon; 39 | } 40 | -------------------------------------------------------------------------------- /commet/lib/client/matrix/matrix_room_permissions.dart: -------------------------------------------------------------------------------- 1 | import 'package:matrix/matrix.dart' as matrix; 2 | 3 | import '../permissions.dart'; 4 | 5 | class MatrixRoomPermissions extends Permissions { 6 | late matrix.Room room; 7 | 8 | MatrixRoomPermissions(this.room); 9 | 10 | @override 11 | bool get canBan => room.canBan; 12 | 13 | @override 14 | bool get canKick => room.canKick; 15 | 16 | @override 17 | bool get canSendMessage => room.canSendDefaultMessages; 18 | 19 | @override 20 | bool get canEditAvatar => room.canChangeStateEvent("m.room.avatar"); 21 | 22 | @override 23 | bool get canEditName => room.canChangeStateEvent("m.room.name"); 24 | 25 | @override 26 | bool get canEnableE2EE => room.canChangeStateEvent("m.room.encryption"); 27 | 28 | @override 29 | bool get canEditRoomEmoticons => room.canSendDefaultStates; 30 | 31 | @override 32 | bool get canDeleteOtherUserMessages => room.canRedact; 33 | 34 | @override 35 | bool get canEditChildren => 36 | room.canChangeStateEvent(matrix.EventTypes.SpaceChild); 37 | 38 | @override 39 | bool get canInviteUser => room.canInvite; 40 | } 41 | -------------------------------------------------------------------------------- /commet/lib/client/matrix/timeline_events/matrix_timeline_event_add_reaction.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/matrix/timeline_events/matrix_timeline_event.dart'; 2 | import 'package:commet/client/timeline_events/timeline_event_add_reaction.dart'; 3 | 4 | class MatrixTimelineEventAddReaction extends MatrixTimelineEvent 5 | implements TimelineEventAddReaction { 6 | MatrixTimelineEventAddReaction(super.event, {required super.client}); 7 | } 8 | -------------------------------------------------------------------------------- /commet/lib/client/matrix/timeline_events/matrix_timeline_event_edit.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/matrix/timeline_events/matrix_timeline_event.dart'; 2 | import 'package:commet/client/timeline_events/timeline_event_edit.dart'; 3 | 4 | class MatrixTimelineEventEdit extends MatrixTimelineEvent 5 | implements TimelineEventEdit { 6 | MatrixTimelineEventEdit(super.event, {required super.client}); 7 | } 8 | -------------------------------------------------------------------------------- /commet/lib/client/matrix/timeline_events/matrix_timeline_event_encrypted.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | import 'package:commet/client/matrix/timeline_events/matrix_timeline_event.dart'; 3 | import 'package:commet/client/timeline_events/timeline_event.dart'; 4 | import 'package:commet/client/timeline_events/timeline_event_encrypted.dart'; 5 | 6 | class MatrixTimelineEventEncrypted extends MatrixTimelineEvent 7 | implements TimelineEventEncrypted { 8 | MatrixTimelineEventEncrypted(super.event, {required super.client}); 9 | 10 | @override 11 | Future?> attemptDecrypt(Room room) async { 12 | if (room is! MatrixTimelineEvent) { 13 | return null; 14 | } 15 | await event.requestKey(); 16 | return room.getEvent(event.eventId); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /commet/lib/client/matrix/timeline_events/matrix_timeline_event_redaction.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/matrix/timeline_events/matrix_timeline_event.dart'; 2 | import 'package:commet/client/timeline_events/timeline_event_redaction.dart'; 3 | 4 | class MatrixTimelineEventRedaction extends MatrixTimelineEvent 5 | implements TimelineEventRedaction { 6 | MatrixTimelineEventRedaction(super.event, {required super.client}); 7 | } 8 | -------------------------------------------------------------------------------- /commet/lib/client/matrix/timeline_events/matrix_timeline_event_unknown.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/matrix/timeline_events/matrix_timeline_event.dart'; 2 | import 'package:commet/client/timeline_events/timeline_event_unknown.dart'; 3 | 4 | class MatrixTimelineEventUnknown extends MatrixTimelineEvent 5 | implements TimelineEventUnknown { 6 | MatrixTimelineEventUnknown(super.event, {required super.client}); 7 | 8 | @override 9 | String get plainTextBody => "Unknown Event Type: ${event.type}"; 10 | } 11 | -------------------------------------------------------------------------------- /commet/lib/client/member.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | abstract class Member { 4 | String get identifier; 5 | String get userName; 6 | String get displayName; 7 | String? get detail; 8 | ImageProvider? get avatar; 9 | Color get defaultColor; 10 | } 11 | -------------------------------------------------------------------------------- /commet/lib/client/peer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | abstract class Peer { 4 | String get identifier; 5 | String get userName; 6 | String get displayName; 7 | String? get detail; 8 | ImageProvider? get avatar; 9 | Color get defaultColor; 10 | } 11 | -------------------------------------------------------------------------------- /commet/lib/client/permissions.dart: -------------------------------------------------------------------------------- 1 | class Permissions { 2 | bool get canBan => false; 3 | 4 | bool get canKick => false; 5 | 6 | bool get canSendMessage => false; 7 | 8 | bool get canEditName => false; 9 | 10 | bool get canEditAvatar => false; 11 | 12 | bool get canEditAnything => 13 | (canEditName || canEditAvatar || canChangeNotificationSettings); 14 | 15 | bool get canEditAppearance => (canEditAvatar || canEditName); 16 | 17 | bool get canEnableE2EE => false; 18 | 19 | bool get canEditRoomSecurity => canEnableE2EE; 20 | 21 | bool get canChangeNotificationSettings => true; 22 | 23 | bool get canUserEditMessages => true; 24 | 25 | bool get canDeleteOtherUserMessages => true; 26 | 27 | bool get canEditRoomEmoticons => true; 28 | 29 | bool get canEditChildren => true; 30 | 31 | bool get canInviteUser => true; 32 | } 33 | -------------------------------------------------------------------------------- /commet/lib/client/profile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | abstract class Profile { 4 | String get identifier; 5 | String get userName; 6 | String get displayName; 7 | String? get detail; 8 | ImageProvider? get avatar; 9 | Color get defaultColor; 10 | } 11 | -------------------------------------------------------------------------------- /commet/lib/client/role.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/widgets.dart'; 2 | 3 | abstract class Role { 4 | String get name; 5 | 6 | IconData get icon; 7 | } 8 | -------------------------------------------------------------------------------- /commet/lib/client/room_preview.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum RoomPreviewType { room, space } 4 | 5 | abstract class RoomPreview { 6 | String get roomId; 7 | ImageProvider? get avatar; 8 | String get displayName; 9 | String? get topic; 10 | Color get color; 11 | RoomPreviewType get type; 12 | } 13 | 14 | class GenericRoomPreview implements RoomPreview { 15 | @override 16 | String roomId; 17 | 18 | @override 19 | ImageProvider? avatar; 20 | 21 | @override 22 | String displayName; 23 | 24 | @override 25 | String? topic; 26 | 27 | GenericRoomPreview(this.roomId, 28 | {this.avatar, required this.displayName, required this.type, this.topic}); 29 | 30 | @override 31 | Color get color => Colors.grey; 32 | 33 | @override 34 | RoomPreviewType type; 35 | } 36 | -------------------------------------------------------------------------------- /commet/lib/client/stale_info.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class StalePeerInfo { 4 | int index; 5 | String? displayName; 6 | String? identifier; 7 | ImageProvider? avatar; 8 | StalePeerInfo( 9 | {required this.index, this.displayName, this.identifier, this.avatar}); 10 | } 11 | 12 | class StaleSpaceInfo { 13 | int index; 14 | String? name; 15 | ImageProvider? avatar; 16 | ImageProvider? userAvatar; 17 | StaleSpaceInfo( 18 | {required this.index, this.name, this.avatar, this.userAvatar}); 19 | } 20 | 21 | class StaleRoomInfo { 22 | String? name; 23 | String? topic; 24 | ImageProvider? avatar; 25 | 26 | StaleRoomInfo({this.name, this.avatar, this.topic}); 27 | } 28 | -------------------------------------------------------------------------------- /commet/lib/client/timeline_events/timeline_event.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | 3 | abstract class TimelineEvent { 4 | TimelineEventStatus get status; 5 | 6 | String get plainTextBody; 7 | 8 | String get eventId; 9 | String get senderId; 10 | DateTime get originServerTs; 11 | String get source; 12 | 13 | bool get editable; 14 | 15 | @override 16 | int get hashCode => eventId.hashCode; 17 | 18 | @override 19 | bool operator ==(Object other) { 20 | return identical(this, other); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /commet/lib/client/timeline_events/timeline_event_add_reaction.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/timeline_events/timeline_event.dart'; 2 | 3 | abstract class TimelineEventAddReaction extends TimelineEvent {} 4 | -------------------------------------------------------------------------------- /commet/lib/client/timeline_events/timeline_event_edit.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/timeline_events/timeline_event.dart'; 2 | 3 | abstract class TimelineEventEdit extends TimelineEvent {} 4 | -------------------------------------------------------------------------------- /commet/lib/client/timeline_events/timeline_event_emote.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/timeline_events/timeline_event.dart'; 2 | 3 | abstract class TimelineEventEmote extends TimelineEvent {} 4 | -------------------------------------------------------------------------------- /commet/lib/client/timeline_events/timeline_event_encrypted.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | import 'package:commet/client/timeline_events/timeline_event.dart'; 3 | 4 | abstract class TimelineEventEncrypted extends TimelineEvent { 5 | Future attemptDecrypt(Room room); 6 | } 7 | -------------------------------------------------------------------------------- /commet/lib/client/timeline_events/timeline_event_feature_reactions.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/components/emoticon/emoticon.dart'; 2 | import 'package:commet/client/timeline.dart'; 3 | 4 | abstract class TimelineEventFeatureReactions { 5 | bool hasReactions(Timeline timeline); 6 | 7 | Map> getReactions(Timeline timeline); 8 | } 9 | -------------------------------------------------------------------------------- /commet/lib/client/timeline_events/timeline_event_feature_related.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/timeline.dart'; 2 | 3 | abstract class TimelineEventFeatureRelated { 4 | EventRelationshipType? get relationshipType; 5 | 6 | String? get relatedEventId; 7 | } 8 | -------------------------------------------------------------------------------- /commet/lib/client/timeline_events/timeline_event_generic.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/timeline.dart'; 2 | import 'package:commet/client/timeline_events/timeline_event.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | abstract class TimelineEventGeneric extends TimelineEvent { 6 | String getBody({Timeline? timeline}); 7 | 8 | IconData? get icon; 9 | 10 | bool get showSenderAvatar; 11 | } 12 | -------------------------------------------------------------------------------- /commet/lib/client/timeline_events/timeline_event_message.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/attachment.dart'; 2 | import 'package:commet/client/timeline.dart'; 3 | import 'package:commet/client/timeline_events/timeline_event.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | abstract class TimelineEventMessage extends TimelineEvent { 7 | Widget? buildFormattedContent({Timeline? timeline}); 8 | String? get body; 9 | 10 | List? get attachments; 11 | 12 | bool isEdited(Timeline timeline); 13 | 14 | List? getLinks({Timeline? timeline}); 15 | } 16 | -------------------------------------------------------------------------------- /commet/lib/client/timeline_events/timeline_event_redaction.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/timeline_events/timeline_event.dart'; 2 | 3 | abstract class TimelineEventRedaction extends TimelineEvent {} 4 | -------------------------------------------------------------------------------- /commet/lib/client/timeline_events/timeline_event_sticker.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/timeline_events/timeline_event.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | abstract class TimelineEventSticker extends TimelineEvent { 5 | String get stickerName; 6 | 7 | ImageProvider get stickerImage; 8 | } 9 | -------------------------------------------------------------------------------- /commet/lib/client/timeline_events/timeline_event_unknown.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/timeline_events/timeline_event.dart'; 2 | 3 | abstract class TimelineEventUnknown extends TimelineEvent {} 4 | -------------------------------------------------------------------------------- /commet/lib/config/app_config.dart: -------------------------------------------------------------------------------- 1 | library config; 2 | 3 | import 'package:commet/config/build_config.dart'; 4 | import 'package:path/path.dart'; 5 | import 'package:path_provider/path_provider.dart'; 6 | 7 | class AppConfig { 8 | static Future getDatabasePath() async { 9 | if (BuildConfig.WEB) { 10 | return "commet"; 11 | } 12 | final dir = await getApplicationSupportDirectory(); 13 | return join(dir.path, "db"); 14 | } 15 | 16 | static Future getDriftDatabasePath() async { 17 | if (BuildConfig.WEB) { 18 | return "commet"; 19 | } 20 | final dir = await getDatabasePath(); 21 | return join(dir, "account", "drift"); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /commet/lib/config/global_config.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:commet/debug/log.dart'; 4 | import 'package:flutter/services.dart'; 5 | 6 | class GlobalConfig { 7 | static late Map data; 8 | 9 | static String get defaultHomeserver { 10 | return data["default_homeserver"] ?? "matrix.org"; 11 | } 12 | 13 | static Future init() async { 14 | try { 15 | String jsonData = await rootBundle 16 | .loadString('assets/config/global_config.json', cache: false); 17 | 18 | data = const JsonDecoder().convert(jsonData); 19 | Log.i(jsonData); 20 | } catch (_) { 21 | Log.e("Failed to load global config"); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /commet/lib/config/platform_utils.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter/foundation.dart'; 4 | 5 | // This exists as a replacement for `Platform` because currently things like `Platform.isLinux` doesnt work on web... 6 | class PlatformUtils { 7 | static bool get isLinux { 8 | if (kIsWeb) return false; 9 | return Platform.isLinux; 10 | } 11 | 12 | static bool get isWindows { 13 | if (kIsWeb) return false; 14 | return Platform.isWindows; 15 | } 16 | 17 | static bool get isAndroid { 18 | if (kIsWeb) return false; 19 | return Platform.isAndroid; 20 | } 21 | 22 | static bool get isWeb { 23 | return kIsWeb; 24 | } 25 | 26 | static String get displayServer { 27 | if (kIsWeb) return "unknown"; 28 | 29 | final env = Platform.environment; 30 | 31 | if (env.containsKey("XDG_SESSION_TYPE")) { 32 | return env["XDG_SESSION_TYPE"]!; 33 | } 34 | 35 | return "unknown"; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /commet/lib/debug/l10n_debug_lookup.dart: -------------------------------------------------------------------------------- 1 | // ignore: implementation_imports 2 | import 'package:intl/src/intl_helpers.dart'; 3 | 4 | /// User programs should call this before using [localeName] for messages. 5 | Future initializeMessagesDebug() async { 6 | initializeInternalMessageLookup(() => DebugLookup()); 7 | return Future.value(true); 8 | } 9 | 10 | class DebugLookup implements MessageLookup { 11 | @override 12 | void addLocale(String localeName, Function findLocale) {} 13 | 14 | @override 15 | String? lookupMessage(String? messageText, String? locale, String? name, 16 | List? args, String? meaning, 17 | {MessageIfAbsent? ifAbsent}) { 18 | return "$name"; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /commet/lib/diagnostic/benchmark_values.dart: -------------------------------------------------------------------------------- 1 | class BenchmarkValues { 2 | static int numTimelineEventsBuilt = 0; 3 | static int numTimelineMessageBodyBuilt = 0; 4 | static int numTimelineReplyBodyBuilt = 0; 5 | static int numTimelineUrlPreviewBuilt = 0; 6 | } 7 | -------------------------------------------------------------------------------- /commet/lib/generator/builder.dart: -------------------------------------------------------------------------------- 1 | import 'package:build/build.dart'; 2 | import 'package:commet/generator/unicode_emoji_generator.dart'; 3 | 4 | Builder emojiBuilder(BuilderOptions options) => UnicodeEmojiBuilder(); 5 | -------------------------------------------------------------------------------- /commet/lib/service/background_service_task.dart: -------------------------------------------------------------------------------- 1 | abstract class BackgroundServiceTask {} 2 | -------------------------------------------------------------------------------- /commet/lib/ui/atoms/dot_indicator.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class DotIndicator extends StatelessWidget { 4 | const DotIndicator({super.key}); 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | return SizedBox( 9 | width: 10, 10 | height: 10, 11 | child: DecoratedBox( 12 | decoration: BoxDecoration( 13 | color: Theme.of(context).colorScheme.secondary, 14 | borderRadius: BorderRadius.circular(5)), 15 | ), 16 | ); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /commet/lib/ui/atoms/gradient_background.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GradientBackground extends StatelessWidget { 4 | const GradientBackground( 5 | {required this.begin, 6 | required this.end, 7 | super.key, 8 | this.child, 9 | required this.backgroundColor}); 10 | final Color backgroundColor; 11 | final Widget? child; 12 | final Alignment begin; 13 | final Alignment end; 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return DecoratedBox( 18 | decoration: BoxDecoration( 19 | gradient: LinearGradient( 20 | colors: [Colors.transparent, backgroundColor], 21 | begin: begin, 22 | stops: const [0, 1], 23 | end: end)), 24 | child: child, 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /commet/lib/ui/atoms/keyboard_adaptor.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:commet/ui/atoms/scaled_safe_area.dart'; 4 | import 'package:commet/utils/scaled_app.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | class KeyboardAdaptor extends StatelessWidget { 8 | const KeyboardAdaptor(Widget this.child, {super.key, this.ignore = false}); 9 | final Widget? child; 10 | final bool ignore; 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | var scaledQuery = MediaQuery.of(context).scale(); 15 | var offset = max(scaledQuery.viewInsets.bottom, scaledQuery.padding.bottom); 16 | 17 | return ScaledSafeArea( 18 | bottom: false, 19 | child: Padding( 20 | padding: EdgeInsets.fromLTRB(0, 0, 0, offset), child: child)); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /commet/lib/ui/atoms/notification_badge.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class NotificationBadge extends StatelessWidget { 4 | const NotificationBadge(this.count, {super.key, this.size = 15}); 5 | final double size; 6 | final int count; 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return SizedBox( 11 | width: size, 12 | height: size, 13 | child: DecoratedBox( 14 | decoration: BoxDecoration( 15 | borderRadius: BorderRadius.circular(size / 2), 16 | color: Colors.red.shade600), 17 | child: Center( 18 | child: Text( 19 | count > 9 ? "9+" : count.toString(), 20 | textAlign: TextAlign.center, 21 | style: Theme.of(context).textTheme.bodySmall!.copyWith( 22 | fontWeight: FontWeight.bold, 23 | fontSize: 10, 24 | color: Colors.white, 25 | shadows: [const BoxShadow(blurRadius: 2)]), 26 | ), 27 | ), 28 | )); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /commet/lib/ui/atoms/rich_text/spans/link.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/utils/link_utils.dart'; 2 | import 'package:flutter/gestures.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:tiamat/config/style/theme_extensions.dart'; 5 | 6 | class LinkSpan { 7 | static InlineSpan create(String text, 8 | {required BuildContext context, destination, TextStyle? style}) { 9 | var color = Theme.of(context).extension()?.linkColor ?? 10 | Theme.of(context).colorScheme.primary; 11 | 12 | return TextSpan( 13 | text: text, 14 | style: (style ?? const TextStyle()) 15 | .copyWith(color: color, decorationColor: color), 16 | recognizer: TapGestureRecognizer() 17 | ..onTap = () { 18 | if (destination != null) { 19 | LinkUtils.open(destination); 20 | } 21 | }); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /commet/lib/ui/atoms/room_preview.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/room_preview.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:tiamat/tiamat.dart'; 4 | import 'package:tiamat/tiamat.dart' as tiamat; 5 | 6 | class RoomPreviewView extends StatelessWidget { 7 | const RoomPreviewView({required this.previewData, super.key}); 8 | final RoomPreview previewData; 9 | @override 10 | Widget build(BuildContext context) { 11 | return Row( 12 | crossAxisAlignment: CrossAxisAlignment.start, 13 | mainAxisAlignment: MainAxisAlignment.start, 14 | children: [ 15 | if (previewData.avatar != null) 16 | ImageButton(size: 90, image: previewData.avatar!), 17 | Padding( 18 | padding: const EdgeInsets.all(8.0), 19 | child: Column( 20 | crossAxisAlignment: CrossAxisAlignment.start, 21 | children: [ 22 | Flexible(child: tiamat.Text.largeTitle(previewData.displayName)), 23 | if (previewData.topic != null) 24 | Flexible(child: tiamat.Text.label(previewData.topic!)) 25 | ], 26 | ), 27 | ) 28 | ], 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /commet/lib/ui/atoms/tiny_pill.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:tiamat/tiamat.dart' as tiamat; 4 | 5 | class TinyPill extends StatelessWidget { 6 | const TinyPill(this.text, {this.background, this.foreground, super.key}); 7 | final String text; 8 | final Color? background; 9 | final Color? foreground; 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Padding( 14 | padding: const EdgeInsets.fromLTRB(0, 0, 0, 0), 15 | child: Container( 16 | decoration: BoxDecoration( 17 | borderRadius: BorderRadius.circular(5), 18 | color: 19 | background ?? Theme.of(context).colorScheme.primaryContainer), 20 | child: Padding( 21 | padding: const EdgeInsets.all(2.0), 22 | child: tiamat.Text.tiny( 23 | text, 24 | color: 25 | foreground ?? Theme.of(context).colorScheme.onPrimaryContainer, 26 | ), 27 | ), 28 | ), 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /commet/lib/ui/molecules/timeline_events/events/timeline_event_view_attachments.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/attachment.dart'; 2 | import 'package:commet/ui/atoms/message_attachment.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class TimelineEventViewAttachments extends StatelessWidget { 6 | const TimelineEventViewAttachments( 7 | {required this.attachments, this.previewMedia = false, super.key}); 8 | final List attachments; 9 | final bool previewMedia; 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Wrap( 14 | children: attachments 15 | .map((e) => Padding( 16 | padding: const EdgeInsets.fromLTRB(0, 2, 2, 2), 17 | child: RepaintBoundary( 18 | child: MessageAttachment( 19 | e, 20 | previewMedia: previewMedia, 21 | ), 22 | ), 23 | )) 24 | .toList(), 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /commet/lib/ui/molecules/timeline_events/timeline_event_layout.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/widgets.dart'; 2 | 3 | abstract class TimelineEventViewWidget { 4 | void update(int newIndex); 5 | } 6 | 7 | abstract class SelectableEventViewWidget { 8 | void select(LayerLink link); 9 | 10 | void deselect(); 11 | } 12 | -------------------------------------------------------------------------------- /commet/lib/ui/navigation/navigation_utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class NavigationUtils { 4 | static void navigateTo(BuildContext context, Widget page) { 5 | Navigator.push( 6 | context, 7 | PageRouteBuilder( 8 | pageBuilder: (_, __, ___) => page, 9 | transitionDuration: const Duration(milliseconds: 500), 10 | transitionsBuilder: (_, animation, __, child) => SlideTransition( 11 | position: Tween( 12 | begin: const Offset(0, 1.5), 13 | end: Offset.zero, 14 | ).animate(CurvedAnimation( 15 | parent: animation, curve: Curves.easeOutCubic)), 16 | child: child))); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /commet/lib/ui/organisms/room_quick_access_menu/room_quick_access_menu_desktop.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | import 'package:commet/ui/organisms/room_quick_access_menu/room_quick_access_menu.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:tiamat/tiamat.dart' as tiamat; 5 | 6 | class RoomQuickAccessMenuViewDesktop extends StatelessWidget { 7 | const RoomQuickAccessMenuViewDesktop({required this.room, super.key}); 8 | final Room room; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | final menu = RoomQuickAccessMenu(room: room); 13 | 14 | return Row( 15 | children: menu.actions 16 | .map((e) => SizedBox( 17 | width: 25, 18 | height: 25, 19 | child: tiamat.IconButton( 20 | icon: e.icon, 21 | onPressed: () => e.action?.call(context), 22 | ))) 23 | .toList(), 24 | ); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /commet/lib/ui/pages/developer/app_inspector/reflectable_extensions.dart: -------------------------------------------------------------------------------- 1 | // ignore: implementation_imports 2 | import 'package:reflectable/src/reflectable_builder_based.dart' as builder; 3 | 4 | class ReflectableExtensions { 5 | static Object? invoke(dynamic object, String name) { 6 | var getter = builder.data.values.first.getters[name]!; 7 | var result = getter(object); 8 | return result; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /commet/lib/ui/pages/settings/app_settings_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/main.dart'; 2 | import 'package:commet/ui/pages/settings/categories/about/settings_category_about.dart'; 3 | import 'package:commet/ui/pages/settings/settings_page.dart'; 4 | import 'package:flutter/widgets.dart'; 5 | 6 | import 'categories/account/settings_category_account.dart'; 7 | import 'categories/app/settings_category_app.dart'; 8 | 9 | class AppSettingsPage extends StatelessWidget { 10 | const AppSettingsPage({super.key}); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return SettingsPage(settings: [ 15 | if (clientManager!.clients.isNotEmpty) SettingsCategoryAccount(), 16 | SettingsCategoryApp(), 17 | SettingsCategoryAbout(), 18 | ]); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /commet/lib/ui/pages/settings/categories/room/emoji_packs/room_emoji_pack_settings_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | import 'package:commet/client/components/emoticon/emoticon_component.dart'; 3 | import 'package:commet/ui/pages/settings/categories/room/emoji_packs/room_emoji_pack_settings_view.dart'; 4 | import 'package:flutter/widgets.dart'; 5 | 6 | class RoomEmojiPackSettingsPage extends StatefulWidget { 7 | const RoomEmojiPackSettingsPage(this.room, {super.key}); 8 | final Room room; 9 | 10 | @override 11 | State createState() => 12 | _RoomEmojiPackSettingsPageState(); 13 | } 14 | 15 | class _RoomEmojiPackSettingsPageState extends State { 16 | late RoomEmoticonComponent component; 17 | 18 | @override 19 | void initState() { 20 | component = widget.room.getComponent()!; 21 | super.initState(); 22 | } 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return RoomEmojiPackSettingsView( 27 | component: component, 28 | editable: widget.room.permissions.canEditRoomEmoticons, 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /commet/lib/ui/pages/settings/categories/room/security/room_security_settings_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | import 'package:commet/ui/pages/settings/categories/room/security/room_security_settings_view.dart'; 3 | import 'package:flutter/widgets.dart'; 4 | 5 | class RoomSecuritySettingsPage extends StatefulWidget { 6 | const RoomSecuritySettingsPage({super.key, required this.room}); 7 | final Room room; 8 | 9 | @override 10 | State createState() => 11 | _RoomSecuritySettingsPageState(); 12 | } 13 | 14 | class _RoomSecuritySettingsPageState extends State { 15 | @override 16 | Widget build(BuildContext context) { 17 | return RoomSecuritySettingsView( 18 | isE2EEEnabled: widget.room.isE2EE, 19 | enableE2EE: enableE2EE, 20 | supportsE2EE: widget.room.client.supportsE2EE, 21 | ); 22 | } 23 | 24 | void enableE2EE() { 25 | widget.room.enableE2EE(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /commet/lib/ui/pages/settings/categories/space/space_emoji_pack_settings.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/client/client.dart'; 2 | import 'package:commet/client/components/emoticon/emoticon_component.dart'; 3 | import 'package:commet/ui/pages/settings/categories/room/emoji_packs/room_emoji_pack_settings_view.dart'; 4 | import 'package:flutter/widgets.dart'; 5 | 6 | class SpaceEmojiPackSettings extends StatefulWidget { 7 | final Space space; 8 | const SpaceEmojiPackSettings(this.space, {super.key}); 9 | 10 | @override 11 | State createState() => _SpaceEmojiPackSettingsState(); 12 | } 13 | 14 | class _SpaceEmojiPackSettingsState extends State { 15 | late EmoticonComponent component; 16 | 17 | @override 18 | void initState() { 19 | component = widget.space.getComponent()!; 20 | super.initState(); 21 | } 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return RoomEmojiPackSettingsView( 26 | component: component, 27 | editable: widget.space.permissions.canEditRoomEmoticons, 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /commet/lib/ui/pages/settings/settings_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class SettingsButton { 4 | final String label; 5 | final Function() onPress; 6 | final IconData? icon; 7 | final Color? color; 8 | SettingsButton({ 9 | required this.label, 10 | required this.onPress, 11 | this.icon, 12 | this.color, 13 | }); 14 | } 15 | -------------------------------------------------------------------------------- /commet/lib/ui/pages/settings/settings_category.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/ui/pages/settings/settings_tab.dart'; 2 | 3 | abstract class SettingsCategory { 4 | String? get title; 5 | List get tabs; 6 | } 7 | -------------------------------------------------------------------------------- /commet/lib/ui/pages/settings/settings_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/config/layout_config.dart'; 2 | import 'package:commet/ui/pages/settings/mobile_settings_page.dart'; 3 | import 'package:commet/ui/pages/settings/settings_button.dart'; 4 | import 'package:commet/ui/pages/settings/settings_category.dart'; 5 | import 'package:flutter/widgets.dart'; 6 | 7 | import 'desktop_settings_page.dart'; 8 | 9 | class SettingsPage extends StatelessWidget { 10 | const SettingsPage({required this.settings, this.buttons, super.key}); 11 | final List settings; 12 | final List? buttons; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return pickChatView(context); 17 | } 18 | 19 | Widget pickChatView(BuildContext context) { 20 | if (Layout.desktop) { 21 | return DesktopSettingsPage( 22 | settings: settings, 23 | buttons: buttons, 24 | ); 25 | } 26 | if (Layout.mobile) { 27 | return MobileSettingsPage( 28 | settings: settings, 29 | buttons: buttons, 30 | ); 31 | } 32 | 33 | throw Exception( 34 | "No SettingsPage has been defined for the current build config"); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /commet/lib/ui/pages/settings/settings_tab.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class SettingsTab { 4 | final String label; 5 | final Widget Function(BuildContext context) pageBuilder; 6 | final IconData? icon; 7 | final bool makeScrollable; 8 | 9 | SettingsTab( 10 | {required this.label, 11 | required this.pageBuilder, 12 | this.icon, 13 | this.makeScrollable = true}); 14 | } 15 | -------------------------------------------------------------------------------- /commet/lib/ui/pages/setup/setup_menu.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | enum SetupMenuState { 4 | canProgress, 5 | cannotProgress, 6 | } 7 | 8 | abstract class SetupMenu { 9 | Widget builder(BuildContext context); 10 | 11 | SetupMenuState get state; 12 | 13 | Stream get onStateChanged; 14 | 15 | Future submit(); 16 | } 17 | -------------------------------------------------------------------------------- /commet/lib/utils/android_intent_helper.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/utils/custom_uri.dart'; 2 | import 'package:receive_intent/receive_intent.dart'; 3 | 4 | class AndroidIntentHelper { 5 | static CustomURI? getUriFromIntent(Intent? intent) { 6 | var key = "flutter_shortcuts"; 7 | 8 | if (intent?.action == "SELECT_NOTIFICATION") { 9 | key = "payload"; 10 | } 11 | 12 | if (intent?.extra?.containsKey(key) == true) { 13 | var uri = CustomURI.parse(intent!.extra![key]); 14 | return uri; 15 | } 16 | 17 | return null; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /commet/lib/utils/common_animation.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/widgets.dart'; 2 | 3 | class CommonAnimations { 4 | static Animation easeOut(Animation animation) { 5 | return animation.drive(CurveTween(curve: Curves.easeOutCubic)); 6 | } 7 | 8 | static Animation easeIn(Animation animation) { 9 | return animation.drive(CurveTween(curve: Curves.easeInCubic)); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /commet/lib/utils/database/database_server.dart: -------------------------------------------------------------------------------- 1 | import 'database_server_stub.dart' 2 | if (dart.library.io) 'database_server_io.dart'; 3 | 4 | Future initDatabaseServer() async { 5 | await initDatabaseServerImpl(); 6 | } 7 | -------------------------------------------------------------------------------- /commet/lib/utils/database/database_server_io.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/utils/database/multiple_database_server.dart'; 2 | 3 | Future? initDatabaseServerImpl() async { 4 | await DatabaseIsolate.start(); 5 | } 6 | -------------------------------------------------------------------------------- /commet/lib/utils/database/database_server_stub.dart: -------------------------------------------------------------------------------- 1 | Future? initDatabaseServerImpl() => null; 2 | -------------------------------------------------------------------------------- /commet/lib/utils/debounce.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | class Debouncer { 4 | final Duration delay; 5 | Timer? _timer; 6 | 7 | bool get running => _timer != null; 8 | 9 | Debouncer({required this.delay}); 10 | 11 | run(void Function() action) { 12 | _timer?.cancel(); 13 | _timer = Timer(delay, action); 14 | } 15 | 16 | cancel() { 17 | _timer?.cancel(); 18 | _timer = null; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /commet/lib/utils/download_utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/cache/file_provider.dart'; 2 | import 'package:commet/client/attachment.dart'; 3 | import 'package:commet/main.dart'; 4 | import 'package:commet/utils/background_tasks/background_task_manager.dart'; 5 | import 'package:commet/utils/file_utils.dart'; 6 | 7 | class DownloadUtils { 8 | static Future downloadAttachment(Attachment attachment) async { 9 | FileProvider? file; 10 | String name = "untitled"; 11 | 12 | if (attachment is FileAttachment) { 13 | file = attachment.file; 14 | name = attachment.name; 15 | } 16 | 17 | backgroundTaskManager.addTask(AsyncTask(() async { 18 | if (file == null) { 19 | return BackgroundTaskStatus.failed; 20 | } 21 | 22 | var path = await FileUtils.getSaveFilePath(fileName: name); 23 | if (path != null) { 24 | file.save(path); 25 | } 26 | 27 | return BackgroundTaskStatus.completed; 28 | }, "Downloading: $name")); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /commet/lib/utils/emoji/unicode_emoji_data.dart: -------------------------------------------------------------------------------- 1 | class UnicodeEmojiData { 2 | final String unicode; 3 | final String shortcode; 4 | 5 | const UnicodeEmojiData({required this.unicode, required this.shortcode}); 6 | } 7 | -------------------------------------------------------------------------------- /commet/lib/utils/first_time_setup.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/ui/pages/setup/setup_menu.dart'; 2 | 3 | class FirstTimeSetup { 4 | static final List _postLogin = List.empty(growable: true); 5 | 6 | static List get postLogin => _postLogin; 7 | 8 | static void registerPostLoginSetup(SetupMenu menu) { 9 | _postLogin.add(menu); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /commet/lib/utils/image_utils.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/widgets.dart'; 4 | import 'dart:ui' as ui; 5 | 6 | class ImageUtils { 7 | static Future imageProviderToImage(ImageProvider provider) async { 8 | Completer completer = Completer(); 9 | 10 | provider 11 | .resolve(const ImageConfiguration()) 12 | .addListener(ImageStreamListener((info, synchronousCall) { 13 | if (!completer.isCompleted) { 14 | completer.complete(info.image); 15 | } 16 | })); 17 | return completer.future; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /commet/lib/utils/link_utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:url_launcher/url_launcher.dart'; 2 | 3 | class LinkUtils { 4 | static void open(Uri uri) { 5 | launchUrl(uri, mode: LaunchMode.externalApplication); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /commet/lib/utils/list_extension.dart: -------------------------------------------------------------------------------- 1 | extension ListExtension on List { 2 | T? tryFirstWhere(bool Function(T element) test) { 3 | try { 4 | return firstWhere( 5 | test, 6 | ); 7 | } catch (exception) { 8 | return null; 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /commet/lib/utils/rng.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | class RandomUtils { 4 | static const _chars = 5 | 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890'; 6 | static final _words = 7 | "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum." 8 | .split(' '); 9 | 10 | static String getRandomString(int length) { 11 | Random rnd = Random(); 12 | return String.fromCharCodes(Iterable.generate( 13 | length, (_) => _chars.codeUnitAt(rnd.nextInt(_chars.length)))); 14 | } 15 | 16 | static String getRandomSentence(int length, {int? seed}) { 17 | var r = Random(seed); 18 | String msg = ""; 19 | for (int i = 0; i < length; i++) { 20 | msg += "${_words[r.nextInt(_words.length)]} "; 21 | } 22 | return msg; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /commet/lib/utils/stored_stream_controller.dart: -------------------------------------------------------------------------------- 1 | // Shamelessly borrowing this from matrix-dart-sdk, just so my usage of it isnt bound to that dependency 2 | 3 | import 'dart:async'; 4 | 5 | class StoredStreamController { 6 | T? _value; 7 | Object? _lastError; 8 | final StreamController _streamController = StreamController.broadcast(); 9 | 10 | StoredStreamController([T? value]) : _value = value; 11 | 12 | T? get value => _value; 13 | Object? get lastError => _lastError; 14 | Stream get stream => _streamController.stream; 15 | 16 | void add(T value) { 17 | _value = value; 18 | _streamController.add(value); 19 | } 20 | 21 | void addError(Object error, [StackTrace? stackTrace]) { 22 | _lastError = value; 23 | _streamController.addError(error, stackTrace); 24 | } 25 | 26 | Future close() => _streamController.close(); 27 | bool get isClosed => _streamController.isClosed; 28 | } 29 | -------------------------------------------------------------------------------- /commet/lib/utils/window_management.dart: -------------------------------------------------------------------------------- 1 | import 'package:commet/config/build_config.dart'; 2 | import 'package:commet/main.dart'; 3 | import 'package:window_manager/window_manager.dart'; 4 | 5 | class WindowManagement { 6 | static Future init() async { 7 | if (!BuildConfig.DESKTOP) return; 8 | 9 | await windowManager.ensureInitialized(); 10 | _WindowListener listener = _WindowListener(); 11 | 12 | windowManager.setPreventClose(preferences.minimizeOnClose); 13 | windowManager.addListener(listener); 14 | } 15 | } 16 | 17 | class _WindowListener extends WindowListener { 18 | @override 19 | void onWindowClose() { 20 | super.onWindowClose(); 21 | 22 | if (preferences.minimizeOnClose) { 23 | windowManager.minimize(); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /commet/linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /commet/linux/debian/DEBIAN/control-ubuntu-22.04: -------------------------------------------------------------------------------- 1 | Package: commet 2 | Version: {{VERSION_TAG}} 3 | Architecture: all 4 | Essential: no 5 | Priority: optional 6 | Depends: libmpv1, libolm3 7 | Maintainer: Airyz 8 | Description: Your space to connect! 9 | -------------------------------------------------------------------------------- /commet/linux/debian/DEBIAN/control-ubuntu-24.04: -------------------------------------------------------------------------------- 1 | Package: commet 2 | Version: {{VERSION_TAG}} 3 | Architecture: all 4 | Essential: no 5 | Priority: optional 6 | Depends: libmpv2, libolm3 7 | Maintainer: Airyz 8 | Description: Your space to connect! 9 | -------------------------------------------------------------------------------- /commet/linux/debian/usr/lib/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/linux/debian/usr/lib/.gitkeep -------------------------------------------------------------------------------- /commet/linux/debian/usr/share/applications/chat.commet.commetapp.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Commet 3 | Exec=/usr/lib/chat.commet.commetapp/commet %U 4 | Terminal=false 5 | Type=Application 6 | Icon=commet-desktop 7 | StartupWMClass=Commet 8 | Comment=Your space to connect! 9 | Categories=Network;InstantMessaging;Chat; 10 | -------------------------------------------------------------------------------- /commet/linux/debian/usr/share/icons/hicolor/128x128/apps/commet-desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/linux/debian/usr/share/icons/hicolor/128x128/apps/commet-desktop.png -------------------------------------------------------------------------------- /commet/linux/debian/usr/share/icons/hicolor/16x16/apps/commet-desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/linux/debian/usr/share/icons/hicolor/16x16/apps/commet-desktop.png -------------------------------------------------------------------------------- /commet/linux/debian/usr/share/icons/hicolor/256x256/apps/commet-desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/linux/debian/usr/share/icons/hicolor/256x256/apps/commet-desktop.png -------------------------------------------------------------------------------- /commet/linux/debian/usr/share/icons/hicolor/32x32/apps/commet-desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/linux/debian/usr/share/icons/hicolor/32x32/apps/commet-desktop.png -------------------------------------------------------------------------------- /commet/linux/debian/usr/share/icons/hicolor/512x512/apps/commet-desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/linux/debian/usr/share/icons/hicolor/512x512/apps/commet-desktop.png -------------------------------------------------------------------------------- /commet/linux/debian/usr/share/icons/hicolor/64x64/apps/commet-desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/linux/debian/usr/share/icons/hicolor/64x64/apps/commet-desktop.png -------------------------------------------------------------------------------- /commet/linux/flatpak/chat.commet.commetapp.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version={{VERSION_TAG}} 3 | Type=Application 4 | 5 | Name=Commet 6 | Comment=Your space to connect! 7 | Categories=Utility;Amusement; 8 | 9 | Icon=chat.commet.commetapp 10 | Exec=commet 11 | Terminal=false 12 | StartupWMClass=commet 13 | -------------------------------------------------------------------------------- /commet/linux/flatpak/chat.commet.commetapp.metainfo.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | chat.commet.commetapp 4 | Commet 5 | Your space to connect! 6 | Airyz 7 | https://commet.chat 8 | CC-BY-SA-4.0 9 | AGPL-3.0-only 10 | 11 | pointing 12 | keyboard 13 | touch 14 | 15 | 16 |

Commet is a client for Matrix focused on providing a feature rich experience while maintaining a simple interface. The goal is to build a secure, privacy respecting app without compromising on the features you have come to expect from a modern chat client.

17 |
18 | chat.commet.commetapp.desktop 19 | 20 | 21 | 22 | 23 |
24 | -------------------------------------------------------------------------------- /commet/linux/flatpak/flathub.json: -------------------------------------------------------------------------------- 1 | { 2 | "only-arches": [ 3 | "x86_64" 4 | ], 5 | "automerge-flathubbot-prs": false 6 | } 7 | -------------------------------------------------------------------------------- /commet/linux/flatpak/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/linux/flatpak/icon.png -------------------------------------------------------------------------------- /commet/linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /commet/linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | desktop_drop 7 | dynamic_color 8 | media_kit_libs_linux 9 | media_kit_video 10 | pasteboard 11 | screen_retriever 12 | sqlite3_flutter_libs 13 | url_launcher_linux 14 | window_manager 15 | window_to_front 16 | ) 17 | 18 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 19 | media_kit_native_event_loop 20 | ) 21 | 22 | set(PLUGIN_BUNDLED_LIBRARIES) 23 | 24 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 25 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 26 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 27 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 28 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 29 | endforeach(plugin) 30 | 31 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 32 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 33 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 34 | endforeach(ffi_plugin) 35 | -------------------------------------------------------------------------------- /commet/linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /commet/linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /commet/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /commet/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /commet/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /commet/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /commet/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /commet/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /commet/macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /commet/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /commet/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /commet/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /commet/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /commet/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /commet/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /commet/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /commet/macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = commet 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = chat.commet.commetapp 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 commet.chat. All rights reserved. 15 | -------------------------------------------------------------------------------- /commet/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /commet/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /commet/macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /commet/macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /commet/macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /commet/macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /commet/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /commet/scripts/extract_strings.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: avoid_print 2 | 3 | import 'dart:io'; 4 | 5 | import './codegen.dart' as codegen; 6 | 7 | void extractStrings(List files) async { 8 | var process = await Process.run( 9 | "flutter", 10 | [ 11 | "pub", 12 | "run", 13 | "intl_translation:extract_to_arb", 14 | "--sources-list-file", 15 | files[0].absolute.path, 16 | "--output-dir=./assets/l10n/", 17 | "--output-file=intl_en.arb" 18 | ], 19 | runInShell: true, 20 | ); 21 | 22 | print(process.stdout); 23 | print(process.stderr); 24 | } 25 | 26 | main() async { 27 | var files = await codegen.generateFileLists(); 28 | extractStrings(files); 29 | } 30 | -------------------------------------------------------------------------------- /commet/scripts/generate-from-arb.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | mkdir -p lib/generated/l10n 3 | flutter pub run intl_translation:generate_from_arb $(find lib/ -name '*.dart') assets/l10n/*.arb --output-dir=lib/generated/l10n -------------------------------------------------------------------------------- /commet/scripts/integration-server-synapse.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | docker run -d --name synapse --tmpfs /data \ 3 | --volume="$(pwd)/integration_test/synapse/data/homeserver.yaml":/data/homeserver.yaml:rw \ 4 | --volume="$(pwd)/integration_test/synapse/data/localhost.log.config":/data/localhost.log.config:rw \ 5 | -p 80:80 matrixdotorg/synapse:latest 6 | -------------------------------------------------------------------------------- /commet/scripts/integration-test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | flutter test integration_test/runner.dart -d linux --dart-define=HOMESERVER=$HOMESERVER --dart-define=BUILD_MODE=release --dart-define=USER1_NAME=$USER1_NAME --dart-define=USER1_PW=$USER1_PW -------------------------------------------------------------------------------- /commet/scripts/run_widgetbook.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | flutter pub run build_runner build -------------------------------------------------------------------------------- /commet/scripts/setup-env.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | export USER1_NAME="alice" 4 | export USER1_PW="AliceInWonderland" 5 | export USER2_NAME="bob" 6 | export USER2_PW="CanWeFixIt" 7 | export HOMESERVER="localhost" -------------------------------------------------------------------------------- /commet/scripts/unit-test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | flutter test unit_test -d linux --dart-define=HOMESERVER=$HOMESERVER --dart-define=BUILD_MODE=release --dart-define=USER1_NAME=$USER1_NAME --dart-define=USER1_PW=$USER1_PW -------------------------------------------------------------------------------- /commet/web/auth.html: -------------------------------------------------------------------------------- 1 | 2 | Authentication complete 3 |

Authentication is complete. If this does not happen automatically, please close the window.

4 | -------------------------------------------------------------------------------- /commet/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/web/favicon.png -------------------------------------------------------------------------------- /commet/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/web/icons/Icon-192.png -------------------------------------------------------------------------------- /commet/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/web/icons/Icon-512.png -------------------------------------------------------------------------------- /commet/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /commet/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /commet/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "commet", 3 | "short_name": "commet", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "Your space to connect!", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } -------------------------------------------------------------------------------- /commet/web/splash/img/dark-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/web/splash/img/dark-1x.png -------------------------------------------------------------------------------- /commet/web/splash/img/dark-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/web/splash/img/dark-2x.png -------------------------------------------------------------------------------- /commet/web/splash/img/dark-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/web/splash/img/dark-3x.png -------------------------------------------------------------------------------- /commet/web/splash/img/dark-4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/web/splash/img/dark-4x.png -------------------------------------------------------------------------------- /commet/web/splash/img/light-1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/web/splash/img/light-1x.png -------------------------------------------------------------------------------- /commet/web/splash/img/light-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/web/splash/img/light-2x.png -------------------------------------------------------------------------------- /commet/web/splash/img/light-3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/web/splash/img/light-3x.png -------------------------------------------------------------------------------- /commet/web/splash/img/light-4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/web/splash/img/light-4x.png -------------------------------------------------------------------------------- /commet/web/static/_headers: -------------------------------------------------------------------------------- 1 | /* 2 | X-Frame-Options: DENY 3 | X-Content-Type-Options: nosniff 4 | Referrer-Policy: no-referrer -------------------------------------------------------------------------------- /commet/windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /commet/windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /commet/windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /commet/windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /commet/windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/commet/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /commet/windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /commet/windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /tiamat/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | *.g.dart 12 | migrate_working_dir/ 13 | 14 | # IntelliJ related 15 | *.iml 16 | *.ipr 17 | *.iws 18 | .idea/ 19 | 20 | # The .vscode folder contains launch configuration and tasks you configure in 21 | # VS Code which you may wish to be included in version control, so this line 22 | # is commented out by default. 23 | #.vscode/ 24 | 25 | # Flutter/Dart/Pub related 26 | **/doc/api/ 27 | **/ios/Flutter/.last_build_id 28 | .dart_tool/ 29 | .flutter-plugins 30 | .flutter-plugins-dependencies 31 | .packages 32 | .pub-cache/ 33 | .pub/ 34 | /build/ 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Android Studio will place build artifacts here 43 | /android/app/debug 44 | /android/app/profile 45 | /android/app/release 46 | 47 | #ignore generated code 48 | lib/tiamat.widgetbook.dart -------------------------------------------------------------------------------- /tiamat/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "tiamat widgetbook", 9 | "request": "launch", 10 | "type": "dart", 11 | "program": "lib/widgetbook.dart" 12 | }, 13 | ] 14 | } -------------------------------------------------------------------------------- /tiamat/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /tiamat/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tiamat/android/app/src/main/kotlin/com/example/tiamat/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.tiamat 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /tiamat/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /tiamat/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /tiamat/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /tiamat/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /tiamat/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tiamat/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tiamat/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tiamat/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /tiamat/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /tiamat/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tiamat/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.7.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.2.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /tiamat/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /tiamat/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 6 | -------------------------------------------------------------------------------- /tiamat/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /tiamat/assets/font/code/RobotoMono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/assets/font/code/RobotoMono.ttf -------------------------------------------------------------------------------- /tiamat/assets/font/emoji-font/NotoColorEmoji.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/assets/font/emoji-font/NotoColorEmoji.ttf -------------------------------------------------------------------------------- /tiamat/assets/font/roboto/Roboto-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/assets/font/roboto/Roboto-Black.ttf -------------------------------------------------------------------------------- /tiamat/assets/font/roboto/Roboto-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/assets/font/roboto/Roboto-BlackItalic.ttf -------------------------------------------------------------------------------- /tiamat/assets/font/roboto/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/assets/font/roboto/Roboto-Bold.ttf -------------------------------------------------------------------------------- /tiamat/assets/font/roboto/Roboto-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/assets/font/roboto/Roboto-BoldItalic.ttf -------------------------------------------------------------------------------- /tiamat/assets/font/roboto/Roboto-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/assets/font/roboto/Roboto-Italic.ttf -------------------------------------------------------------------------------- /tiamat/assets/font/roboto/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/assets/font/roboto/Roboto-Light.ttf -------------------------------------------------------------------------------- /tiamat/assets/font/roboto/Roboto-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/assets/font/roboto/Roboto-LightItalic.ttf -------------------------------------------------------------------------------- /tiamat/assets/font/roboto/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/assets/font/roboto/Roboto-Medium.ttf -------------------------------------------------------------------------------- /tiamat/assets/font/roboto/Roboto-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/assets/font/roboto/Roboto-MediumItalic.ttf -------------------------------------------------------------------------------- /tiamat/assets/font/roboto/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/assets/font/roboto/Roboto-Regular.ttf -------------------------------------------------------------------------------- /tiamat/assets/font/roboto/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/assets/font/roboto/Roboto-Thin.ttf -------------------------------------------------------------------------------- /tiamat/assets/font/roboto/Roboto-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/assets/font/roboto/Roboto-ThinItalic.ttf -------------------------------------------------------------------------------- /tiamat/assets/images/placeholder/generic/License.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Prototype Textures 1.0 4 | 5 | Created/distributed by Kenney (www.kenney.nl) 6 | Creation date: 08-04-2020 7 | 8 | ------------------------------ 9 | 10 | License: (Creative Commons Zero, CC0) 11 | http://creativecommons.org/publicdomain/zero/1.0/ 12 | 13 | This content is free to use in personal, educational and commercial projects. 14 | Support us by crediting Kenney or www.kenney.nl (this is not mandatory) 15 | 16 | ------------------------------ 17 | 18 | Donate: http://support.kenney.nl 19 | Request: http://request.kenney.nl 20 | Patreon: http://patreon.com/kenney/ 21 | 22 | Follow on Twitter for updates: 23 | http://twitter.com/KenneyNL -------------------------------------------------------------------------------- /tiamat/assets/images/placeholder/generic/checker_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/assets/images/placeholder/generic/checker_dark.png -------------------------------------------------------------------------------- /tiamat/assets/images/placeholder/generic/checker_green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/assets/images/placeholder/generic/checker_green.png -------------------------------------------------------------------------------- /tiamat/assets/images/placeholder/generic/checker_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/assets/images/placeholder/generic/checker_orange.png -------------------------------------------------------------------------------- /tiamat/assets/images/placeholder/generic/checker_purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/assets/images/placeholder/generic/checker_purple.png -------------------------------------------------------------------------------- /tiamat/assets/images/placeholder/generic/checker_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/assets/images/placeholder/generic/checker_red.png -------------------------------------------------------------------------------- /tiamat/assets/shader/texture_coordinate.frag: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | precision mediump sampler2D; 4 | 5 | uniform float top; 6 | uniform float left; 7 | uniform float right; 8 | uniform float bottom; 9 | uniform float windowWidth; 10 | uniform float windowHeight; 11 | uniform sampler2D image; 12 | 13 | out vec4 fragColor; 14 | 15 | void main(void) { 16 | vec2 fragCoord = FlutterFragCoord(); 17 | vec2 p = (fragCoord + vec2(left, top)) / vec2(windowWidth, windowHeight); 18 | fragColor = texture(image, p); 19 | } -------------------------------------------------------------------------------- /tiamat/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /tiamat/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /tiamat/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /tiamat/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /tiamat/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tiamat/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tiamat/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tiamat/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tiamat/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tiamat/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tiamat/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /tiamat/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /tiamat/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /tiamat/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /tiamat/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /tiamat/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /tiamat/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /tiamat/lib/atoms/checkbox.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/src/widgets/framework.dart'; 2 | import 'package:flutter/src/widgets/placeholder.dart'; 3 | import 'package:flutter/widgets.dart'; 4 | import 'package:tiamat/atoms/seperator.dart'; 5 | import 'package:widgetbook_annotation/widgetbook_annotation.dart'; 6 | import 'package:flutter/material.dart' as material; 7 | 8 | @UseCase(name: 'Large', type: Checkbox) 9 | Widget wbCheckBox(BuildContext context) { 10 | return Center( 11 | child: Column( 12 | mainAxisAlignment: MainAxisAlignment.center, 13 | children: [ 14 | Checkbox( 15 | value: false, 16 | ), 17 | Seperator(), 18 | Checkbox( 19 | value: true, 20 | ) 21 | ], 22 | )); 23 | } 24 | 25 | class Checkbox extends StatelessWidget { 26 | const Checkbox({super.key, this.value, this.onChanged}); 27 | final bool? value; 28 | final Function(bool? value)? onChanged; 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | return material.Checkbox( 33 | value: value, 34 | onChanged: (newValue) { 35 | onChanged?.call(newValue); 36 | }, 37 | ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /tiamat/lib/atoms/seperator.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart' as material; 2 | import 'package:flutter/widgets.dart'; 3 | import 'package:tiamat/atoms/text.dart' as tiamat; 4 | 5 | import 'package:widgetbook_annotation/widgetbook_annotation.dart'; 6 | 7 | @UseCase(name: 'Default', type: Seperator) 8 | Widget wbseperatorUseCase(BuildContext context) { 9 | return Align( 10 | alignment: Alignment.center, 11 | child: SizedBox( 12 | width: 300, 13 | height: 500, 14 | child: Column( 15 | children: const [ 16 | tiamat.Text.body( 17 | "Hello!", 18 | ), 19 | Seperator(), 20 | tiamat.Text.body( 21 | "World!", 22 | ) 23 | ], 24 | ), 25 | ), 26 | ); 27 | } 28 | 29 | class Seperator extends StatelessWidget { 30 | const Seperator({super.key, this.padding = 8}); 31 | final double padding; 32 | @override 33 | Widget build(BuildContext context) { 34 | return Padding( 35 | padding: EdgeInsets.all(padding), 36 | child: const material.Divider( 37 | height: 1, 38 | ), 39 | ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /tiamat/lib/atoms/texture_coordinate_painter.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | import 'dart:ui' as ui; 3 | 4 | import 'package:flutter/material.dart'; 5 | 6 | class TextureCoordinatePainter extends CustomPainter { 7 | final FragmentShader shader; 8 | final Rect offset; 9 | final double windowWidth; 10 | final double windowHeight; 11 | final ui.Image image; 12 | 13 | TextureCoordinatePainter(FragmentShader fragmentShader, this.image, this.windowWidth, this.windowHeight, this.offset) 14 | : shader = fragmentShader; 15 | @override 16 | void paint(Canvas canvas, Size size) { 17 | final paint = Paint(); 18 | 19 | shader.setImageSampler(0, image); 20 | shader.setFloat(0, offset.top); 21 | shader.setFloat(1, offset.left); 22 | shader.setFloat(2, offset.right); 23 | shader.setFloat(3, offset.bottom); 24 | 25 | shader.setFloat(4, windowWidth); 26 | shader.setFloat(5, windowHeight); 27 | 28 | paint.shader = shader; 29 | canvas.drawRect(Offset.zero & size, paint); 30 | } 31 | 32 | @override 33 | bool shouldRepaint(covariant CustomPainter oldDelegate) => true; 34 | } 35 | -------------------------------------------------------------------------------- /tiamat/lib/config/config.dart: -------------------------------------------------------------------------------- 1 | export './style/theme_changer.dart'; 2 | export './style/theme_dark.dart'; 3 | export './style/theme_extensions.dart'; 4 | export './style/theme_light.dart'; 5 | export './style/theme_amoled.dart'; 6 | export './style/theme_you.dart'; 7 | -------------------------------------------------------------------------------- /tiamat/lib/config/style/theme_common.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'dart:io' show Platform; 3 | 4 | class ThemeCommon { 5 | static List? fontFamilyFallback() { 6 | const fonts = ["EmojiFont"]; 7 | 8 | // Platform.isWindows isnt available on web so just jump out early here! 9 | if (kIsWeb) return fonts; 10 | 11 | // Windows doesnt support our current emoji font :( 12 | if (Platform.isWindows) return null; 13 | 14 | return fonts; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tiamat/lib/tiamat.dart: -------------------------------------------------------------------------------- 1 | export './atoms/text.dart'; 2 | export './atoms/text_button.dart'; 3 | export './atoms/avatar.dart'; 4 | export './atoms/button.dart'; 5 | export './atoms/circle_button.dart'; 6 | export './atoms/image_button.dart'; 7 | export './atoms/popup_dialog.dart'; 8 | export './atoms/seperator.dart'; 9 | export './atoms/slider.dart'; 10 | export './atoms/switch.dart'; 11 | export './atoms/tile.dart'; 12 | export './atoms/text_input.dart'; 13 | export './atoms/dropdown_selector.dart'; 14 | export './atoms/icon_button.dart'; 15 | export './atoms/panel.dart'; 16 | export './atoms/toggleable_list.dart'; 17 | export './atoms/radio_button.dart'; 18 | export './atoms/icon_toggle.dart'; 19 | export './atoms/dropdown_text_field.dart'; 20 | export './atoms/context_menu.dart'; 21 | export './atoms/tooltip.dart'; 22 | export './atoms/foundation.dart'; 23 | export './atoms/text_button_expander.dart'; 24 | -------------------------------------------------------------------------------- /tiamat/linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /tiamat/linux/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | 11 | void fl_register_plugins(FlPluginRegistry* registry) { 12 | g_autoptr(FlPluginRegistrar) dynamic_color_registrar = 13 | fl_plugin_registry_get_registrar_for_plugin(registry, "DynamicColorPlugin"); 14 | dynamic_color_plugin_register_with_registrar(dynamic_color_registrar); 15 | } 16 | -------------------------------------------------------------------------------- /tiamat/linux/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void fl_register_plugins(FlPluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /tiamat/linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | dynamic_color 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /tiamat/linux/main.cc: -------------------------------------------------------------------------------- 1 | #include "my_application.h" 2 | 3 | int main(int argc, char** argv) { 4 | g_autoptr(MyApplication) app = my_application_new(); 5 | return g_application_run(G_APPLICATION(app), argc, argv); 6 | } 7 | -------------------------------------------------------------------------------- /tiamat/linux/my_application.h: -------------------------------------------------------------------------------- 1 | #ifndef FLUTTER_MY_APPLICATION_H_ 2 | #define FLUTTER_MY_APPLICATION_H_ 3 | 4 | #include 5 | 6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, 7 | GtkApplication) 8 | 9 | /** 10 | * my_application_new: 11 | * 12 | * Creates a new Flutter-based application. 13 | * 14 | * Returns: a new #MyApplication. 15 | */ 16 | MyApplication* my_application_new(); 17 | 18 | #endif // FLUTTER_MY_APPLICATION_H_ 19 | -------------------------------------------------------------------------------- /tiamat/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /tiamat/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /tiamat/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /tiamat/macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import dynamic_color 9 | 10 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 11 | DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin")) 12 | } 13 | -------------------------------------------------------------------------------- /tiamat/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tiamat/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tiamat/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tiamat/macos/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | @NSApplicationMain 5 | class AppDelegate: FlutterAppDelegate { 6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { 7 | return true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tiamat/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /tiamat/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /tiamat/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /tiamat/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /tiamat/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /tiamat/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /tiamat/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /tiamat/macos/Runner/Configs/AppInfo.xcconfig: -------------------------------------------------------------------------------- 1 | // Application-level settings for the Runner target. 2 | // 3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the 4 | // future. If not, the values below would default to using the project name when this becomes a 5 | // 'flutter create' template. 6 | 7 | // The application's name. By default this is also the title of the Flutter window. 8 | PRODUCT_NAME = tiamat 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.tiamat 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /tiamat/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /tiamat/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /tiamat/macos/Runner/Configs/Warnings.xcconfig: -------------------------------------------------------------------------------- 1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings 2 | GCC_WARN_UNDECLARED_SELECTOR = YES 3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES 4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE 5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES 6 | CLANG_WARN_PRAGMA_PACK = YES 7 | CLANG_WARN_STRICT_PROTOTYPES = YES 8 | CLANG_WARN_COMMA = YES 9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES 10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES 11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES 12 | GCC_WARN_SHADOW = YES 13 | CLANG_WARN_UNREACHABLE_CODE = YES 14 | -------------------------------------------------------------------------------- /tiamat/macos/Runner/DebugProfile.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | com.apple.security.cs.allow-jit 8 | 9 | com.apple.security.network.server 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tiamat/macos/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSMinimumSystemVersion 24 | $(MACOSX_DEPLOYMENT_TARGET) 25 | NSHumanReadableCopyright 26 | $(PRODUCT_COPYRIGHT) 27 | NSMainNibFile 28 | MainMenu 29 | NSPrincipalClass 30 | NSApplication 31 | 32 | 33 | -------------------------------------------------------------------------------- /tiamat/macos/Runner/MainFlutterWindow.swift: -------------------------------------------------------------------------------- 1 | import Cocoa 2 | import FlutterMacOS 3 | 4 | class MainFlutterWindow: NSWindow { 5 | override func awakeFromNib() { 6 | let flutterViewController = FlutterViewController.init() 7 | let windowFrame = self.frame 8 | self.contentViewController = flutterViewController 9 | self.setFrame(windowFrame, display: true) 10 | 11 | RegisterGeneratedPlugins(registry: flutterViewController) 12 | 13 | super.awakeFromNib() 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tiamat/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tiamat/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: tiamat 2 | description: A new Flutter project. 3 | 4 | publish_to: 'none' 5 | version: 1.0.0+1 6 | 7 | environment: 8 | sdk: '>=3.1.0 <4.0.0' 9 | 10 | dependencies: 11 | flutter: 12 | sdk: flutter 13 | 14 | cupertino_icons: ^1.0.2 15 | widgetbook_annotation: ^3.0.0 16 | dropdown_button2: ^2.0.0 17 | just_the_tooltip: ^0.0.12 18 | path: ^1.9.0 19 | dynamic_color: 20 | git: 21 | url: https://github.com/Airyzz/material-flutter-packages.git 22 | path: ./packages/dynamic_color 23 | 24 | dev_dependencies: 25 | build_runner: 26 | widgetbook_generator: ^3.1.0 27 | widgetbook: 28 | flutter_lints: ^2.0.0 29 | 30 | flutter: 31 | uses-material-design: true 32 | assets: 33 | - assets/images/placeholder/generic/ 34 | shaders: 35 | - assets/shader/texture_coordinate.frag 36 | fonts: 37 | - family: EmojiFont 38 | fonts: 39 | - asset: assets/font/emoji-font/NotoColorEmoji.ttf 40 | 41 | - family: RobotoCustom 42 | fonts: 43 | - asset: assets/font/roboto/Roboto-Regular.ttf 44 | - asset: assets/font/roboto/Roboto-Bold.ttf 45 | weight: 700 46 | 47 | -------------------------------------------------------------------------------- /tiamat/scripts/codegen.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | flutter pub get 4 | flutter pub run build_runner build -------------------------------------------------------------------------------- /tiamat/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/web/favicon.png -------------------------------------------------------------------------------- /tiamat/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/web/icons/Icon-192.png -------------------------------------------------------------------------------- /tiamat/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/web/icons/Icon-512.png -------------------------------------------------------------------------------- /tiamat/web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /tiamat/web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /tiamat/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tiamat", 3 | "short_name": "tiamat", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /tiamat/windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /tiamat/windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | 11 | void RegisterPlugins(flutter::PluginRegistry* registry) { 12 | DynamicColorPluginCApiRegisterWithRegistrar( 13 | registry->GetRegistrarForPlugin("DynamicColorPluginCApi")); 14 | } 15 | -------------------------------------------------------------------------------- /tiamat/windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /tiamat/windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | dynamic_color 7 | ) 8 | 9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 10 | ) 11 | 12 | set(PLUGIN_BUNDLED_LIBRARIES) 13 | 14 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 19 | endforeach(plugin) 20 | 21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 24 | endforeach(ffi_plugin) 25 | -------------------------------------------------------------------------------- /tiamat/windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /tiamat/windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /tiamat/windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/commetchat/commet/712ea4624ecf488c8708e6264cc385768f64691f/tiamat/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /tiamat/windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tiamat/windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | --------------------------------------------------------------------------------