Compare commits
43 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
5c4135ddb1 |
|||
|
4e94b4a3bb |
|||
|
c44a8cddc3 |
|||
|
06a25b89e6 |
|||
| db2a169f34 | |||
|
82b6f2c647 |
|||
|
cafdf43fd3 |
|||
|
d62626858d |
|||
|
985b6d52e0 |
|||
|
2372ecd141 |
|||
|
34f45c929a |
|||
|
4f66bdc817 |
|||
|
6cc5971919 |
|||
|
75be47554f |
|||
|
2878412573 |
|||
|
07b492d0f4 |
|||
|
132efbdfd1 |
|||
|
bfd0b1ec47 |
|||
|
0df327d125 |
|||
|
3d341ac4d8 |
|||
|
15ccddfad5 |
|||
|
e59632bb07 |
|||
|
5f96c8e57f |
|||
|
7b0fea3a07 |
|||
|
f51d773885 |
|||
|
6afa169af9 |
|||
|
27fba2cdb5 |
|||
|
5424dda62a |
|||
|
e447540062 |
|||
|
7c6ddab6a3 |
|||
|
5e0ba1029d |
|||
|
96ca282d5a |
|||
|
8be9a4f2f6 |
|||
|
d1c4a69b40 |
|||
|
5c6440894b |
|||
|
e8f4ff072d |
|||
|
b2da534a32 |
|||
|
ede26c9a27 |
|||
|
66d4ef18b4 |
|||
|
362819b464 |
|||
|
2a86bdafeb |
|||
|
77d9f9bdc1 |
|||
| 32d5f30e03 |
18 changed files with 225 additions and 214 deletions
31
README.md
31
README.md
|
|
@ -15,7 +15,7 @@ A simple and user-friendly Matrix client made with Flutter and the Matrix Dart S
|
||||||
|
|
||||||
## Progress
|
## Progress
|
||||||
|
|
||||||
- [ ] Move from the Dart SDK to the Gomuks SDK with bindings: WIP
|
- [x] Move from the Dart SDK to the Gomuks SDK with Dart bindings: https://git.federated.nexus/Henry-Hiles/nexus/pulls/2
|
||||||
- [ ] Platform Support
|
- [ ] Platform Support
|
||||||
- [x] Linux
|
- [x] Linux
|
||||||
- [x] Windows
|
- [x] Windows
|
||||||
|
|
@ -33,14 +33,17 @@ A simple and user-friendly Matrix client made with Flutter and the Matrix Dart S
|
||||||
- [ ] Searching
|
- [ ] Searching
|
||||||
- [ ] Creating (Rooms, Spaces, and DMs)
|
- [ ] Creating (Rooms, Spaces, and DMs)
|
||||||
- [x] Joining
|
- [x] Joining
|
||||||
- [x] Using alias/id/link
|
- [x] Using a text/uri/link
|
||||||
|
- [x] Plain text
|
||||||
|
- [x] `matrix:` Uri
|
||||||
|
- [ ] Matrix.to link: I just need to fix my regex, I should do this next.
|
||||||
- [ ] From space
|
- [ ] From space
|
||||||
- [ ] Exploring
|
- [ ] Exploring
|
||||||
- [x] Leaving
|
- [x] Leaving
|
||||||
- [x] Subspaces
|
- [x] Subspaces
|
||||||
- [x] Messages
|
- [x] Messages
|
||||||
- [x] Encryption
|
- [x] Encryption
|
||||||
- [ ] Restoring crypto identity from passphrase/key or verification
|
- [x] Restoring crypto identity from passphrase/key or verification
|
||||||
- [x] Sending
|
- [x] Sending
|
||||||
- [x] Plain text
|
- [x] Plain text
|
||||||
- [x] HTML/Markdown
|
- [x] HTML/Markdown
|
||||||
|
|
@ -105,7 +108,7 @@ A simple and user-friendly Matrix client made with Flutter and the Matrix Dart S
|
||||||
- [ ] About
|
- [ ] About
|
||||||
- [x] Log Out
|
- [x] Log Out
|
||||||
|
|
||||||
## Development
|
## Build Instructions
|
||||||
|
|
||||||
First, clone and open the repo:
|
First, clone and open the repo:
|
||||||
|
|
||||||
|
|
@ -119,13 +122,13 @@ cd nexus
|
||||||
#### Linux
|
#### Linux
|
||||||
|
|
||||||
- With Nix: Either use direnv, or `nix flake develop`
|
- With Nix: Either use direnv, or `nix flake develop`
|
||||||
- Without Nix: Install Flutter, Rust, the libsecret dev package for your distro (must be in `PKG_CONFIG_PATH`), and sqlite (must be in `LD_LIBRARY_PATH`).
|
- Without Nix: Install Flutter, Go, Olm, Git, Clang, and GLibc.
|
||||||
|
|
||||||
#### Windows / MacOS
|
#### Windows / MacOS
|
||||||
|
|
||||||
I don't really know. You will need Flutter and Rust, and otherwise I guess just keep installing stuff until there aren't any errors.
|
I don't really know. You will need Flutter, Git, Olm, Go, and Visual Studio tools, and otherwise I guess just keep installing stuff until there aren't any errors. I will look into this sometimeTM.
|
||||||
|
|
||||||
###
|
### Set up Flutter
|
||||||
|
|
||||||
Get dependencies:
|
Get dependencies:
|
||||||
|
|
||||||
|
|
@ -133,6 +136,18 @@ Get dependencies:
|
||||||
flutter pub get
|
flutter pub get
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Get dependencies:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
flutter pub get
|
||||||
|
```
|
||||||
|
|
||||||
|
Clone Gomuks and generate bindings:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
scripts/generate.sh
|
||||||
|
```
|
||||||
|
|
||||||
Build generated files, and watch for new changes:
|
Build generated files, and watch for new changes:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
|
@ -147,4 +162,4 @@ flutter run
|
||||||
|
|
||||||
## Community
|
## Community
|
||||||
|
|
||||||
Come chat in the [Federated Nexus Community](https://matrix.to/#/#space:federated.nexus) for questions or help with developing or using Nexus Client.
|
Join the [Nexus Client Matrix Room](https://matrix.to/#/#nexus:federated.nexus) for questions or help with developing or using Nexus Client.
|
||||||
|
|
|
||||||
10
flake.nix
10
flake.nix
|
|
@ -45,17 +45,11 @@
|
||||||
olm
|
olm
|
||||||
git
|
git
|
||||||
clang
|
clang
|
||||||
(flutter.override { extraPkgConfigPackages = [ pkgs.libsecret ]; })
|
flutter
|
||||||
|
|
||||||
(pkgs.writeShellScriptBin "rustup" (builtins.readFile ./nix/fake-rustup.sh))
|
|
||||||
];
|
];
|
||||||
|
|
||||||
env = {
|
env = {
|
||||||
LD_LIBRARY_PATH = "${
|
LD_LIBRARY_PATH = "./build/native_assets/linux";
|
||||||
pkgs.lib.makeLibraryPath ([
|
|
||||||
pkgs.sqlite
|
|
||||||
])
|
|
||||||
}:./build/native_assets/linux";
|
|
||||||
CPATH = lib.makeSearchPath "include" [ pkgs.glibc.dev ];
|
CPATH = lib.makeSearchPath "include" [ pkgs.glibc.dev ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import "package:nexus/models/paginate.dart";
|
||||||
import "package:nexus/models/requests/get_event_request.dart";
|
import "package:nexus/models/requests/get_event_request.dart";
|
||||||
import "package:nexus/models/requests/get_related_events_request.dart";
|
import "package:nexus/models/requests/get_related_events_request.dart";
|
||||||
import "package:nexus/models/requests/get_room_state_request.dart";
|
import "package:nexus/models/requests/get_room_state_request.dart";
|
||||||
|
import "package:nexus/models/requests/join_room_request.dart";
|
||||||
import "package:nexus/models/requests/login_request.dart";
|
import "package:nexus/models/requests/login_request.dart";
|
||||||
import "package:nexus/models/profile.dart";
|
import "package:nexus/models/profile.dart";
|
||||||
import "package:nexus/models/requests/paginate_request.dart";
|
import "package:nexus/models/requests/paginate_request.dart";
|
||||||
|
|
@ -138,6 +139,11 @@ class ClientController extends AsyncNotifier<int> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<String> joinRoom(JoinRoomRequest request) async {
|
||||||
|
final response = await _sendCommand("join_room", request.toJson());
|
||||||
|
return response["room_id"];
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> leaveRoom(Room room) async {
|
Future<void> leaveRoom(Room room) async {
|
||||||
if (room.metadata == null) return;
|
if (room.metadata == null) return;
|
||||||
await _sendCommand("leave_room", {"room_id": room.metadata!.id});
|
await _sendCommand("leave_room", {"room_id": room.metadata!.id});
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
|
||||||
import "package:flutter_secure_storage/flutter_secure_storage.dart";
|
|
||||||
|
|
||||||
class SecureStorageController extends Notifier<FlutterSecureStorage> {
|
|
||||||
@override
|
|
||||||
FlutterSecureStorage build() => FlutterSecureStorage();
|
|
||||||
|
|
||||||
Future<String?> get(String key) => state.read(key: key);
|
|
||||||
|
|
||||||
Future<void> set(String key, String value) =>
|
|
||||||
state.write(key: key, value: value);
|
|
||||||
|
|
||||||
Future<void> clear() => state.deleteAll();
|
|
||||||
|
|
||||||
static final provider =
|
|
||||||
NotifierProvider<SecureStorageController, FlutterSecureStorage>(
|
|
||||||
SecureStorageController.new,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +1,12 @@
|
||||||
import "package:collection/collection.dart";
|
import "package:collection/collection.dart";
|
||||||
|
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
import "package:hooks_riverpod/hooks_riverpod.dart";
|
import "package:hooks_riverpod/hooks_riverpod.dart";
|
||||||
import "package:nexus/controllers/client_controller.dart";
|
import "package:nexus/controllers/client_controller.dart";
|
||||||
import "package:nexus/controllers/key_controller.dart";
|
import "package:nexus/controllers/key_controller.dart";
|
||||||
import "package:nexus/controllers/spaces_controller.dart";
|
import "package:nexus/controllers/spaces_controller.dart";
|
||||||
|
import "package:nexus/helpers/extensions/link_to_mention.dart";
|
||||||
|
import "package:nexus/models/requests/join_room_request.dart";
|
||||||
|
|
||||||
extension JoinRoomWithSnackbars on ClientController {
|
extension JoinRoomWithSnackbars on ClientController {
|
||||||
Future<void> joinRoomWithSnackBars(
|
Future<void> joinRoomWithSnackBars(
|
||||||
|
|
@ -11,77 +14,77 @@ extension JoinRoomWithSnackbars on ClientController {
|
||||||
String roomAlias,
|
String roomAlias,
|
||||||
WidgetRef ref,
|
WidgetRef ref,
|
||||||
) async {
|
) async {
|
||||||
// final parsed = roomAlias.parseIdentifierIntoParts();
|
final roomIdOrAlias = roomAlias.mention ?? roomAlias;
|
||||||
// final alias = parsed?.primaryIdentifier ?? roomAlias;
|
|
||||||
|
|
||||||
// final scaffoldMessenger = ScaffoldMessenger.of(context);
|
final scaffoldMessenger = ScaffoldMessenger.of(context);
|
||||||
|
|
||||||
// final snackbar = scaffoldMessenger.showSnackBar(
|
final snackbar = scaffoldMessenger.showSnackBar(
|
||||||
// SnackBar(
|
SnackBar(
|
||||||
// content: Text("Joining room $alias."),
|
content: Text("Joining room $roomIdOrAlias."),
|
||||||
// duration: Duration(days: 999),
|
duration: Duration(days: 999),
|
||||||
// ),
|
),
|
||||||
// );
|
);
|
||||||
|
|
||||||
// try {
|
try {
|
||||||
// final id = await joinRoom(alias, via: parsed?.via.toList());
|
final id = await joinRoom(
|
||||||
|
JoinRoomRequest(
|
||||||
|
roomIdOrAlias: roomIdOrAlias,
|
||||||
|
via: IList(Uri.tryParse(roomAlias)?.queryParametersAll["via"] ?? []),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
// snackbar.close();
|
snackbar.close();
|
||||||
|
|
||||||
// scaffoldMessenger.showSnackBar(
|
scaffoldMessenger.showSnackBar(
|
||||||
// SnackBar(
|
SnackBar(
|
||||||
// content: Text("Room $alias successfully joined."),
|
content: Text("Room $roomIdOrAlias successfully joined."),
|
||||||
// action: SnackBarAction(
|
action: SnackBarAction(
|
||||||
// label: "Open",
|
label: "Open",
|
||||||
// onPressed: () async {
|
onPressed: () async {
|
||||||
// final spaces = await ref.refresh(
|
final spaces = ref.watch(SpacesController.provider);
|
||||||
// SpacesController.provider.future,
|
final space = spaces.firstWhereOrNull((space) => space.id == id);
|
||||||
// );
|
|
||||||
// final space = spaces.firstWhereOrNull((space) => space.id == id);
|
|
||||||
|
|
||||||
// await ref
|
await ref
|
||||||
// .watch(
|
.watch(
|
||||||
// KeyController.provider(KeyController.spaceKey).notifier,
|
KeyController.provider(KeyController.spaceKey).notifier,
|
||||||
// )
|
)
|
||||||
// .set(
|
.set(
|
||||||
// space?.id ??
|
space?.id ??
|
||||||
// spaces
|
spaces
|
||||||
// .firstWhere(
|
.firstWhere(
|
||||||
// (space) =>
|
(space) => space.children.any(
|
||||||
// space.children.firstWhereOrNull(
|
(child) => child.metadata?.id == id,
|
||||||
// (child) => child.roomData.id == id,
|
),
|
||||||
// ) !=
|
)
|
||||||
// null,
|
.id,
|
||||||
// )
|
);
|
||||||
// .id,
|
|
||||||
// );
|
|
||||||
|
|
||||||
// if (space == null) {
|
if (space == null) {
|
||||||
// await ref
|
await ref
|
||||||
// .watch(
|
.watch(
|
||||||
// KeyController.provider(KeyController.roomKey).notifier,
|
KeyController.provider(KeyController.roomKey).notifier,
|
||||||
// )
|
)
|
||||||
// .set(id);
|
.set(id);
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
// ),
|
),
|
||||||
// ),
|
),
|
||||||
// );
|
);
|
||||||
// } catch (error) {
|
} catch (error) {
|
||||||
// snackbar.close();
|
snackbar.close();
|
||||||
// if (context.mounted) {
|
if (context.mounted) {
|
||||||
// scaffoldMessenger.showSnackBar(
|
scaffoldMessenger.showSnackBar(
|
||||||
// SnackBar(
|
SnackBar(
|
||||||
// backgroundColor: Theme.of(context).colorScheme.errorContainer,
|
backgroundColor: Theme.of(context).colorScheme.errorContainer,
|
||||||
// content: Text(
|
content: Text(
|
||||||
// error.toString(),
|
error.toString(),
|
||||||
// style: TextStyle(
|
style: TextStyle(
|
||||||
// color: Theme.of(context).colorScheme.onErrorContainer,
|
color: Theme.of(context).colorScheme.onErrorContainer,
|
||||||
// ),
|
),
|
||||||
// ),
|
),
|
||||||
// ),
|
),
|
||||||
// );
|
);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,11 @@ extension LinkToMention on String {
|
||||||
if (uri.pathSegments.isNotEmpty) {
|
if (uri.pathSegments.isNotEmpty) {
|
||||||
final identifier = uri.pathSegments.last;
|
final identifier = uri.pathSegments.last;
|
||||||
if (identifier.isNotEmpty) {
|
if (identifier.isNotEmpty) {
|
||||||
return Uri.decodeComponent(identifier);
|
return "${switch (uri.pathSegments.firstOrNull) {
|
||||||
|
"r" || "roomid" => "#",
|
||||||
|
"u" => "@",
|
||||||
|
_ => "",
|
||||||
|
}}${Uri.decodeComponent(identifier)}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
|
|
|
||||||
15
lib/models/requests/join_room_request.dart
Normal file
15
lib/models/requests/join_room_request.dart
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||||
|
import "package:freezed_annotation/freezed_annotation.dart";
|
||||||
|
part "join_room_request.freezed.dart";
|
||||||
|
part "join_room_request.g.dart";
|
||||||
|
|
||||||
|
@freezed
|
||||||
|
abstract class JoinRoomRequest with _$JoinRoomRequest {
|
||||||
|
const factory JoinRoomRequest({
|
||||||
|
required String roomIdOrAlias,
|
||||||
|
required IList<String> via,
|
||||||
|
}) = _JoinRoomRequest;
|
||||||
|
|
||||||
|
factory JoinRoomRequest.fromJson(Map<String, Object?> json) =>
|
||||||
|
_$JoinRoomRequestFromJson(json);
|
||||||
|
}
|
||||||
|
|
@ -1,18 +1,11 @@
|
||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||||
import "package:nexus/controllers/secure_storage_controller.dart";
|
|
||||||
|
|
||||||
class SettingsPage extends ConsumerWidget {
|
class SettingsPage extends ConsumerWidget {
|
||||||
const SettingsPage({super.key});
|
const SettingsPage({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
return Scaffold(
|
return Placeholder();
|
||||||
appBar: AppBar(title: Text("Settings")),
|
|
||||||
body: ElevatedButton(
|
|
||||||
onPressed: ref.watch(SecureStorageController.provider.notifier).clear,
|
|
||||||
child: Text("Log out"),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,8 @@
|
||||||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
import "package:flutter/services.dart";
|
|
||||||
import "package:flutter_hooks/flutter_hooks.dart";
|
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||||
import "package:nexus/controllers/client_controller.dart";
|
import "package:nexus/controllers/client_controller.dart";
|
||||||
import "package:nexus/models/room.dart";
|
import "package:nexus/models/room.dart";
|
||||||
import "package:nexus/widgets/form_text_input.dart";
|
|
||||||
|
|
||||||
class RoomMenu extends ConsumerWidget {
|
class RoomMenu extends ConsumerWidget {
|
||||||
final Room room;
|
final Room room;
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
#include <dynamic_system_colors/dynamic_color_plugin.h>
|
#include <dynamic_system_colors/dynamic_color_plugin.h>
|
||||||
#include <file_selector_linux/file_selector_plugin.h>
|
#include <file_selector_linux/file_selector_plugin.h>
|
||||||
#include <flutter_secure_storage_linux/flutter_secure_storage_linux_plugin.h>
|
|
||||||
#include <screen_retriever_linux/screen_retriever_linux_plugin.h>
|
#include <screen_retriever_linux/screen_retriever_linux_plugin.h>
|
||||||
#include <url_launcher_linux/url_launcher_plugin.h>
|
#include <url_launcher_linux/url_launcher_plugin.h>
|
||||||
#include <window_manager/window_manager_plugin.h>
|
#include <window_manager/window_manager_plugin.h>
|
||||||
|
|
@ -21,9 +20,6 @@ void fl_register_plugins(FlPluginRegistry* registry) {
|
||||||
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
|
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
|
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
|
||||||
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
|
file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
|
||||||
g_autoptr(FlPluginRegistrar) flutter_secure_storage_linux_registrar =
|
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "FlutterSecureStorageLinuxPlugin");
|
|
||||||
flutter_secure_storage_linux_plugin_register_with_registrar(flutter_secure_storage_linux_registrar);
|
|
||||||
g_autoptr(FlPluginRegistrar) screen_retriever_linux_registrar =
|
g_autoptr(FlPluginRegistrar) screen_retriever_linux_registrar =
|
||||||
fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverLinuxPlugin");
|
fl_plugin_registry_get_registrar_for_plugin(registry, "ScreenRetrieverLinuxPlugin");
|
||||||
screen_retriever_linux_plugin_register_with_registrar(screen_retriever_linux_registrar);
|
screen_retriever_linux_plugin_register_with_registrar(screen_retriever_linux_registrar);
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
dynamic_system_colors
|
dynamic_system_colors
|
||||||
file_selector_linux
|
file_selector_linux
|
||||||
flutter_secure_storage_linux
|
|
||||||
screen_retriever_linux
|
screen_retriever_linux
|
||||||
url_launcher_linux
|
url_launcher_linux
|
||||||
window_manager
|
window_manager
|
||||||
|
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
# Fake rustup for nix-managed Rust toolchains
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
run)
|
|
||||||
if [[ "$2" == "stable" ]]; then
|
|
||||||
shift 2
|
|
||||||
if [[ $# -eq 0 ]]; then
|
|
||||||
echo "fake rustup: no command given" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
exec "$@"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
toolchain)
|
|
||||||
if [[ "$2" == "list" ]]; then
|
|
||||||
echo "stable (default)"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
target)
|
|
||||||
if [[ "$2" == "list" && "$3" == "--toolchain" && "$4" == "stable" && "$5" == "--installed" ]]; then
|
|
||||||
echo "x86_64-unknown-linux-gnu"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
echo "fake rustup: the command:" >&2
|
|
||||||
echo " rustup $*" >&2
|
|
||||||
echo "…is not mocked yet" >&2
|
|
||||||
exit 1
|
|
||||||
56
pubspec.lock
56
pubspec.lock
|
|
@ -533,54 +533,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "3.1.0"
|
version: "3.1.0"
|
||||||
flutter_secure_storage:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: flutter_secure_storage
|
|
||||||
sha256: da922f2aab2d733db7e011a6bcc4a825b844892d4edd6df83ff156b09a9b2e40
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "10.0.0"
|
|
||||||
flutter_secure_storage_darwin:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: flutter_secure_storage_darwin
|
|
||||||
sha256: "8878c25136a79def1668c75985e8e193d9d7d095453ec28730da0315dc69aee3"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.2.0"
|
|
||||||
flutter_secure_storage_linux:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: flutter_secure_storage_linux
|
|
||||||
sha256: "2b5c76dce569ab752d55a1cee6a2242bcc11fdba927078fb88c503f150767cda"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "3.0.0"
|
|
||||||
flutter_secure_storage_platform_interface:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: flutter_secure_storage_platform_interface
|
|
||||||
sha256: "8ceea1223bee3c6ac1a22dabd8feefc550e4729b3675de4b5900f55afcb435d6"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.0.1"
|
|
||||||
flutter_secure_storage_web:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: flutter_secure_storage_web
|
|
||||||
sha256: "6a1137df62b84b54261dca582c1c09ea72f4f9a4b2fcee21b025964132d5d0c3"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.1.0"
|
|
||||||
flutter_secure_storage_windows:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: flutter_secure_storage_windows
|
|
||||||
sha256: "3b7c8e068875dfd46719ff57c90d8c459c87f2302ed6b00ff006b3c9fcad1613"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "4.1.0"
|
|
||||||
flutter_svg:
|
flutter_svg:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -928,14 +880,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.11.1"
|
version: "0.11.1"
|
||||||
mention_tag_text_field:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: mention_tag_text_field
|
|
||||||
sha256: ba7b9d8003e0f340a65c6dcdb7770f4340f653ae1612a9e31e11d12f7f1dd80f
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.0.9"
|
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
|
|
@ -59,9 +59,7 @@ dependencies:
|
||||||
flutter_svg: ^2.2.2
|
flutter_svg: ^2.2.2
|
||||||
json_annotation: ^4.9.0
|
json_annotation: ^4.9.0
|
||||||
shared_preferences: ^2.5.3
|
shared_preferences: ^2.5.3
|
||||||
mention_tag_text_field: ^0.0.9
|
|
||||||
fluttertagger: ^2.3.1
|
fluttertagger: ^2.3.1
|
||||||
flutter_secure_storage: ^10.0.0
|
|
||||||
dynamic_polls: ^0.0.6
|
dynamic_polls: ^0.0.6
|
||||||
flutter_hooks: ^0.21.3+1
|
flutter_hooks: ^0.21.3+1
|
||||||
cross_cache: ^1.1.0
|
cross_cache: ^1.1.0
|
||||||
|
|
|
||||||
105
src/gomuks/libgomuks.h
Normal file
105
src/gomuks/libgomuks.h
Normal file
|
|
@ -0,0 +1,105 @@
|
||||||
|
/* Code generated by cmd/cgo; DO NOT EDIT. */
|
||||||
|
|
||||||
|
/* package go.mau.fi/gomuks/pkg/ffi */
|
||||||
|
|
||||||
|
|
||||||
|
#line 1 "cgo-builtin-export-prolog"
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#ifndef GO_CGO_EXPORT_PROLOGUE_H
|
||||||
|
#define GO_CGO_EXPORT_PROLOGUE_H
|
||||||
|
|
||||||
|
#ifndef GO_CGO_GOSTRING_TYPEDEF
|
||||||
|
typedef struct { const char *p; ptrdiff_t n; } _GoString_;
|
||||||
|
extern size_t _GoStringLen(_GoString_ s);
|
||||||
|
extern const char *_GoStringPtr(_GoString_ s);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Start of preamble from import "C" comments. */
|
||||||
|
|
||||||
|
|
||||||
|
#line 9 "ffi.go"
|
||||||
|
|
||||||
|
#include "gomuksffi.h"
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
static inline void _gomuks_callEventCallback(EventCallback cb, const char *command, int64_t request_id, GomuksOwnedBuffer data) {
|
||||||
|
cb(command, request_id, data);
|
||||||
|
}
|
||||||
|
|
||||||
|
#line 1 "cgo-generated-wrapper"
|
||||||
|
|
||||||
|
|
||||||
|
/* End of preamble from import "C" comments. */
|
||||||
|
|
||||||
|
|
||||||
|
/* Start of boilerplate cgo prologue. */
|
||||||
|
#line 1 "cgo-gcc-export-header-prolog"
|
||||||
|
|
||||||
|
#ifndef GO_CGO_PROLOGUE_H
|
||||||
|
#define GO_CGO_PROLOGUE_H
|
||||||
|
|
||||||
|
typedef signed char GoInt8;
|
||||||
|
typedef unsigned char GoUint8;
|
||||||
|
typedef short GoInt16;
|
||||||
|
typedef unsigned short GoUint16;
|
||||||
|
typedef int GoInt32;
|
||||||
|
typedef unsigned int GoUint32;
|
||||||
|
typedef long long GoInt64;
|
||||||
|
typedef unsigned long long GoUint64;
|
||||||
|
typedef GoInt64 GoInt;
|
||||||
|
typedef GoUint64 GoUint;
|
||||||
|
typedef size_t GoUintptr;
|
||||||
|
typedef float GoFloat32;
|
||||||
|
typedef double GoFloat64;
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#if !defined(__cplusplus) || _MSVC_LANG <= 201402L
|
||||||
|
#include <complex.h>
|
||||||
|
typedef _Fcomplex GoComplex64;
|
||||||
|
typedef _Dcomplex GoComplex128;
|
||||||
|
#else
|
||||||
|
#include <complex>
|
||||||
|
typedef std::complex<float> GoComplex64;
|
||||||
|
typedef std::complex<double> GoComplex128;
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
typedef float _Complex GoComplex64;
|
||||||
|
typedef double _Complex GoComplex128;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
static assertion to make sure the file is being used on architecture
|
||||||
|
at least with matching size of GoInt.
|
||||||
|
*/
|
||||||
|
typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1];
|
||||||
|
|
||||||
|
#ifndef GO_CGO_GOSTRING_TYPEDEF
|
||||||
|
typedef _GoString_ GoString;
|
||||||
|
#endif
|
||||||
|
typedef void *GoMap;
|
||||||
|
typedef void *GoChan;
|
||||||
|
typedef struct { void *t; void *v; } GoInterface;
|
||||||
|
typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* End of boilerplate cgo prologue. */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern GomuksHandle GomuksInit(void);
|
||||||
|
extern int GomuksStart(GomuksHandle handle, EventCallback callback);
|
||||||
|
extern void GomuksDestroy(GomuksHandle handle);
|
||||||
|
extern GomuksResponse GomuksSubmitCommand(GomuksHandle handle, char* command, GomuksBorrowedBuffer data);
|
||||||
|
extern GomuksAccountInfo GomuksGetAccountInfo(GomuksHandle handle);
|
||||||
|
extern void GomuksFreeAccountInfo(GomuksAccountInfo info);
|
||||||
|
extern void GomuksFreeBuffer(GomuksOwnedBuffer buf);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
BIN
src/gomuks/libgomuks.so
Normal file
BIN
src/gomuks/libgomuks.so
Normal file
Binary file not shown.
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
#include <dynamic_system_colors/dynamic_color_plugin_c_api.h>
|
#include <dynamic_system_colors/dynamic_color_plugin_c_api.h>
|
||||||
#include <file_selector_windows/file_selector_windows.h>
|
#include <file_selector_windows/file_selector_windows.h>
|
||||||
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
|
|
||||||
#include <screen_retriever_windows/screen_retriever_windows_plugin_c_api.h>
|
#include <screen_retriever_windows/screen_retriever_windows_plugin_c_api.h>
|
||||||
#include <url_launcher_windows/url_launcher_windows.h>
|
#include <url_launcher_windows/url_launcher_windows.h>
|
||||||
#include <window_manager/window_manager_plugin.h>
|
#include <window_manager/window_manager_plugin.h>
|
||||||
|
|
@ -19,8 +18,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||||
registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
|
registry->GetRegistrarForPlugin("DynamicColorPluginCApi"));
|
||||||
FileSelectorWindowsRegisterWithRegistrar(
|
FileSelectorWindowsRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("FileSelectorWindows"));
|
registry->GetRegistrarForPlugin("FileSelectorWindows"));
|
||||||
FlutterSecureStorageWindowsPluginRegisterWithRegistrar(
|
|
||||||
registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
|
|
||||||
ScreenRetrieverWindowsPluginCApiRegisterWithRegistrar(
|
ScreenRetrieverWindowsPluginCApiRegisterWithRegistrar(
|
||||||
registry->GetRegistrarForPlugin("ScreenRetrieverWindowsPluginCApi"));
|
registry->GetRegistrarForPlugin("ScreenRetrieverWindowsPluginCApi"));
|
||||||
UrlLauncherWindowsRegisterWithRegistrar(
|
UrlLauncherWindowsRegisterWithRegistrar(
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
list(APPEND FLUTTER_PLUGIN_LIST
|
list(APPEND FLUTTER_PLUGIN_LIST
|
||||||
dynamic_system_colors
|
dynamic_system_colors
|
||||||
file_selector_windows
|
file_selector_windows
|
||||||
flutter_secure_storage_windows
|
|
||||||
screen_retriever_windows
|
screen_retriever_windows
|
||||||
url_launcher_windows
|
url_launcher_windows
|
||||||
window_manager
|
window_manager
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue