Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jhqwqmc committed Sep 16, 2024
2 parents 0625ce8 + 2ba5f0b commit 5427695
Show file tree
Hide file tree
Showing 566 changed files with 3,073 additions and 842 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-development-jars-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Test Extensions
uses: gradle/gradle-build-action@v2
with:
arguments: test --scan
arguments: test clean --scan
build-root-directory: ./extensions
# ----------------------------------------------------------------------------------------------------
- name: Publish Engine to Beta Maven Repository
Expand Down Expand Up @@ -86,6 +86,7 @@ jobs:
build-root-directory: ./engine
- name: Add Tag
uses: mathieudutour/[email protected]
continue-on-error: true
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
default_bump: false
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
2 changes: 1 addition & 1 deletion app/lib/app_router.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ final appRouter = Provider<AppRouter>((ref) => AppRouter(ref: ref.passing));
@AutoRouterConfig(
replaceInRouteName: "Page,Route",
)
class AppRouter extends _$AppRouter {
class AppRouter extends RootStackRouter {
AppRouter({
required this.ref,
});
Expand Down
159 changes: 69 additions & 90 deletions app/lib/app_router.gr.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions app/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ class TypeWriterApp extends HookConsumerWidget {
borderSide: BorderSide.none,
),
fillColor: brightness == Brightness.light
? Colors.black.withOpacity(0.05)
: Colors.black.withOpacity(0.2),
? Colors.black.withValues(alpha: 0.05)
: Colors.black.withValues(alpha: 0.2),
filled: true,
hoverColor: Colors.black.withOpacity(0.1),
hoverColor: Colors.black.withValues(alpha: 0.1),
errorStyle: const TextStyle(
color: Colors.redAccent,
fontSize: 12,
Expand All @@ -88,7 +88,7 @@ class TypeWriterApp extends HookConsumerWidget {
borderSide: const BorderSide(color: Colors.red, width: 2),
),
),
hoverColor: Colors.black.withOpacity(0.1),
hoverColor: Colors.black.withValues(alpha: 0.1),
colorScheme: baseTheme.colorScheme.copyWith(
primary: Colors.blueAccent,
brightness: brightness,
Expand Down
5 changes: 3 additions & 2 deletions app/lib/models/communicator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class SocketNotifier extends StateNotifier<Socket?> {
state == ConnectionState.connected;
}

void init(String hostname, int port, [String? token]) {
void init(String hostname, int? port, [String? token]) {
if (state != null) return;
if (_connectionState != ConnectionState.none) return;
_connectionState = ConnectionState.connecting;
Expand All @@ -112,7 +112,8 @@ class SocketNotifier extends StateNotifier<Socket?> {
return;
}

var url = "//$hostname:$port";
var url = "//$hostname";
if (port != null) url += ":$port";
if (token != null) url += "?token=$token";

debugPrint("初始化套接字");
Expand Down
4 changes: 2 additions & 2 deletions app/lib/models/entry_blueprint.dart
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ final _customEditorCustomLayout = [
"item",
"skin",
"color",
"floatRange",
"closedRange",
];

/// Since freezed does not support methods on data models, we have to create a separate extension class.
Expand All @@ -270,7 +270,7 @@ extension DataBlueprintExtension on DataBlueprint {
(_) => null,
primitive: (data) {
if (data.type.validate(data.internalDefaultValue)) {
return data.defaultValue;
return data.internalDefaultValue;
}
return _defaultPrimitiveValue(data.type);
},
Expand Down
2 changes: 1 addition & 1 deletion app/lib/pages/book_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class _RailButton extends HookConsumerWidget {
final tabRouter = context.tabsRouter;
final isSelected = tabRouter.activeIndex == index;
return Material(
color: isSelected ? Colors.white.withOpacity(0.15) : Colors.transparent,
color: isSelected ? Colors.white.withValues(alpha:0.15) : Colors.transparent,
borderRadius: BorderRadius.circular(8),
child: InkWell(
onTap: () => tabRouter.setActiveIndex(index),
Expand Down
4 changes: 2 additions & 2 deletions app/lib/pages/connect_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ import "package:typewriter/widgets/components/general/text_scroller.dart";
class ConnectPage extends HookConsumerWidget {
const ConnectPage({
@QueryParam("host") this.hostname = "",
@QueryParam() this.port = 9092,
@QueryParam() this.port,
@QueryParam() this.token = "",
super.key,
});

final String hostname;
final int port;
final int? port;
final String token;

@override
Expand Down
2 changes: 1 addition & 1 deletion app/lib/pages/page_editor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ String? currentPageId(CurrentPageIdRef ref) {

@riverpod
String currentPageLabel(CurrentPageLabelRef ref) {
return ref.watch(currentPageIdProvider)?.formatted ?? "";
return ref.watch(currentPageProvider)?.pageName.formatted ?? "";
}

@riverpod
Expand Down
2 changes: 1 addition & 1 deletion app/lib/pages/page_editor.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5427695

Please sign in to comment.