-
Notifications
You must be signed in to change notification settings - Fork 974
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #104 from mylxsw/develop
Develop
- Loading branch information
Showing
110 changed files
with
8,025 additions
and
925 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ on: | |
push: | ||
branches: | ||
- main | ||
- develop | ||
|
||
jobs: | ||
build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivity$g | ||
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter$Args | ||
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter$Error | ||
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningActivityStarter | ||
-dontwarn com.stripe.android.pushProvisioning.PushProvisioningEphemeralKeyProvider |
6 changes: 3 additions & 3 deletions
6
android/app/src/main/kotlin/cc/aicode/flutter/askaide/askaide/MainActivity.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
package cc.aicode.flutter.askaide.askaide | ||
|
||
import io.flutter.embedding.android.FlutterActivity | ||
import io.flutter.embedding.android.FlutterFragmentActivity | ||
|
||
class MainActivity: FlutterActivity() { | ||
|
||
} | ||
class MainActivity: FlutterFragmentActivity() { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
dart run msix:create --release -v --output-path build/windows/runner --output-name AIdea | ||
flutter build windows --release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
VERSION=1.0.13 | ||
VERSION=1.0.13.1 | ||
|
||
rm -fr build/web | ||
|
||
flutter build web --web-renderer canvaskit --release --dart-define=API_SERVER_URL=/ | ||
cd scripts && go run main.go ../build/web/main.dart.js && cd .. | ||
rm -fr build/web/fonts/ && mkdir build/web/fonts | ||
cp -r scripts/s build/web/fonts/s | ||
|
||
docker buildx build --platform=linux/amd64,linux/arm64 -t mylxsw/aidea-web:$VERSION . --push | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import 'package:askaide/repo/api/admin/payment.dart'; | ||
import 'package:askaide/repo/api/page.dart'; | ||
import 'package:askaide/repo/api_server.dart'; | ||
import 'package:bloc/bloc.dart'; | ||
import 'package:meta/meta.dart'; | ||
|
||
part 'admin_payment_event.dart'; | ||
part 'admin_payment_state.dart'; | ||
|
||
class AdminPaymentBloc extends Bloc<AdminPaymentEvent, AdminPaymentState> { | ||
AdminPaymentBloc() : super(AdminPaymentInitial()) { | ||
on<AdminPaymentHistoriesLoadEvent>((event, emit) async { | ||
final histories = await APIServer().adminPaymentHistories( | ||
page: event.page, | ||
perPage: event.perPage, | ||
keyword: event.keyword, | ||
); | ||
emit(AdminPaymentHistoriesLoaded(histories)); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
part of 'admin_payment_bloc.dart'; | ||
|
||
@immutable | ||
sealed class AdminPaymentEvent {} | ||
|
||
class AdminPaymentHistoriesLoadEvent extends AdminPaymentEvent { | ||
final int page; | ||
final int perPage; | ||
final String? keyword; | ||
|
||
AdminPaymentHistoriesLoadEvent({ | ||
this.page = 1, | ||
this.perPage = 20, | ||
this.keyword, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
part of 'admin_payment_bloc.dart'; | ||
|
||
@immutable | ||
sealed class AdminPaymentState {} | ||
|
||
final class AdminPaymentInitial extends AdminPaymentState {} | ||
|
||
class AdminPaymentOperationResult extends AdminPaymentState { | ||
final bool success; | ||
final String message; | ||
|
||
AdminPaymentOperationResult(this.success, this.message); | ||
} | ||
|
||
class AdminPaymentHistoriesLoaded extends AdminPaymentState { | ||
final PagedData<AdminPaymentHistory> histories; | ||
|
||
AdminPaymentHistoriesLoaded(this.histories); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import 'package:askaide/repo/api/admin/channels.dart'; | ||
import 'package:askaide/repo/api_server.dart'; | ||
import 'package:bloc/bloc.dart'; | ||
import 'package:meta/meta.dart'; | ||
|
||
part 'channel_event.dart'; | ||
part 'channel_state.dart'; | ||
|
||
class ChannelBloc extends Bloc<ChannelEvent, ChannelState> { | ||
ChannelBloc() : super(ChannelInitial()) { | ||
/// 加载所有渠道 | ||
on<ChannelsLoadEvent>((event, emit) async { | ||
final channels = await APIServer().adminChannels(); | ||
emit(ChannelsLoaded(channels)); | ||
}); | ||
|
||
/// 加载单个渠道 | ||
on<ChannelLoadEvent>((event, emit) async { | ||
final channel = await APIServer().adminChannel(id: event.channelId); | ||
emit(ChannelLoaded(channel)); | ||
}); | ||
|
||
/// 创建渠道 | ||
on<ChannelCreateEvent>((event, emit) async { | ||
try { | ||
await APIServer().adminCreateChannel(event.req); | ||
emit(ChannelOperationResult(true, '创建成功')); | ||
} catch (e) { | ||
emit(ChannelOperationResult(false, e.toString())); | ||
} | ||
}); | ||
|
||
/// 更新渠道 | ||
on<ChannelUpdateEvent>((event, emit) async { | ||
try { | ||
await APIServer().adminUpdateChannel( | ||
id: event.channelId, | ||
req: event.req, | ||
); | ||
emit(ChannelOperationResult(true, '更新成功')); | ||
} catch (e) { | ||
emit(ChannelOperationResult(false, e.toString())); | ||
} | ||
}); | ||
|
||
/// 删除渠道 | ||
on<ChannelDeleteEvent>((event, emit) async { | ||
try { | ||
await APIServer().adminDeleteChannel(id: event.channelId); | ||
emit(ChannelOperationResult(true, '删除成功')); | ||
} catch (e) { | ||
emit(ChannelOperationResult(false, e.toString())); | ||
} | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
part of 'channel_bloc.dart'; | ||
|
||
@immutable | ||
sealed class ChannelEvent {} | ||
|
||
class ChannelsLoadEvent extends ChannelEvent {} | ||
|
||
class ChannelLoadEvent extends ChannelEvent { | ||
final int channelId; | ||
|
||
ChannelLoadEvent(this.channelId); | ||
} | ||
|
||
class ChannelCreateEvent extends ChannelEvent { | ||
final AdminChannelAddReq req; | ||
|
||
ChannelCreateEvent(this.req); | ||
} | ||
|
||
class ChannelUpdateEvent extends ChannelEvent { | ||
final int channelId; | ||
final AdminChannelUpdateReq req; | ||
|
||
ChannelUpdateEvent(this.channelId, this.req); | ||
} | ||
|
||
class ChannelDeleteEvent extends ChannelEvent { | ||
final int channelId; | ||
|
||
ChannelDeleteEvent(this.channelId); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
part of 'channel_bloc.dart'; | ||
|
||
@immutable | ||
sealed class ChannelState {} | ||
|
||
final class ChannelInitial extends ChannelState {} | ||
|
||
class ChannelsLoaded extends ChannelState { | ||
final List<AdminChannel> channels; | ||
|
||
ChannelsLoaded(this.channels); | ||
} | ||
|
||
class ChannelLoaded extends ChannelState { | ||
final AdminChannel channel; | ||
|
||
ChannelLoaded(this.channel); | ||
} | ||
|
||
class ChannelOperationResult extends ChannelState { | ||
final bool success; | ||
final String message; | ||
|
||
ChannelOperationResult(this.success, this.message); | ||
} |
Oops, something went wrong.