Skip to content

Commit

Permalink
1. 修复发帖按钮不见了的 bug
Browse files Browse the repository at this point in the history
2. 修复每 8 个小时就要重新登录的 bug
  • Loading branch information
share121 committed Sep 16, 2024
1 parent 002d888 commit 9de347d
Show file tree
Hide file tree
Showing 7 changed files with 162 additions and 26 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.16.3+30

1. 修复发帖按钮不见了的 bug
2. 修复每 8 个小时就要重新登录的 bug

## 2.16.2+29

1. 优化手机端样式
Expand Down
1 change: 1 addition & 0 deletions lib/api_user/refresh_token.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Future<bool> refreshToken() async {
'https://github.com/login/oauth/access_token',
queryParameters: {
'client_id': clientId,
'client_secret': clientSecret,
'grant_type ': 'refresh_token',
'refresh_token': c.getRefreshToken(),
});
Expand Down
39 changes: 39 additions & 0 deletions lib/pages/edit_page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import 'package:flutter/material.dart';
import 'package:flutter_quill/flutter_quill.dart';

class EditPage extends StatefulWidget {
const EditPage({super.key});

@override
State<EditPage> createState() => _EditPageState();
}

class _EditPageState extends State<EditPage> {
final _controller = QuillController.basic();

@override
void dispose() {
_controller.dispose();
super.dispose();
}

@override
Widget build(BuildContext context) {
return Scaffold(
body: Column(
children: [
QuillSimpleToolbar(
controller: _controller,
configurations: const QuillSimpleToolbarConfigurations(),
),
Expanded(
child: QuillEditor.basic(
controller: _controller,
configurations: const QuillEditorConfigurations(),
),
)
],
),
);
}
}
62 changes: 40 additions & 22 deletions lib/pages/search_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:flutter_keyboard_visibility/flutter_keyboard_visibility.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
import 'package:url_launcher/url_launcher_string.dart';

import '../widget/discussions_grid.dart';
import '../common.dart';
Expand Down Expand Up @@ -39,31 +41,47 @@ class _SearchPageState extends State<SearchPage>
@override
Widget build(BuildContext context) {
super.build(context);
return Column(
return Stack(
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: SearchBar(
controller: c.searchController,
onSubmitted: c.searchQuery.call,
backgroundColor: const WidgetStatePropertyAll(Color(0xff222222)),
leading: const Padding(
padding: EdgeInsets.only(left: 8),
child: Icon(Icons.search),
Column(
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: SearchBar(
controller: c.searchController,
onSubmitted: c.searchQuery.call,
backgroundColor:
const WidgetStatePropertyAll(Color(0xff222222)),
leading: const Padding(
padding: EdgeInsets.only(left: 8),
child: Icon(Icons.search),
),
hintText: 'Search for discussions'.tr,
),
),
hintText: 'Search for discussions'.tr,
),
),
const SizedBox(height: 8),
Expanded(
child: Obx(() {
return DiscussionGrid(
list: c.searchResult(),
hasNextPage: c.searchHasNextPage(),
fetchData: fetchData,
);
}),
const SizedBox(height: 8),
Expanded(
child: Obx(() {
return DiscussionGrid(
list: c.searchResult(),
hasNextPage: c.searchHasNextPage(),
fetchData: fetchData,
);
}),
),
],
),
Positioned(
right: 24,
bottom: 24,
child: IconButton.filledTonal(
iconSize: 32,
padding: const EdgeInsets.all(12),
onPressed: () => launchUrlString(
'https://github.com/share121/inter-knot/discussions/new/choose'),
icon: Icon(MdiIcons.pen),
),
)
],
);
}
Expand Down
74 changes: 73 additions & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,14 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0"
charcode:
dependency: transitive
description:
name: charcode
sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.1"
checked_yaml:
dependency: transitive
description:
Expand Down Expand Up @@ -294,6 +302,14 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.14.0"
dart_quill_delta:
dependency: transitive
description:
name: dart_quill_delta
sha256: "4e8e949cfa18fd29978e11b7077f655b73ac00ebbcaaf95880391a7375872f28"
url: "https://pub.flutter-io.cn"
source: hosted
version: "10.6.1"
dart_style:
dependency: transitive
description:
Expand Down Expand Up @@ -350,6 +366,14 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "6.0.3"
diff_match_patch:
dependency: transitive
description:
name: diff_match_patch
sha256: "2efc9e6e8f449d0abe15be240e2c2a3bcd977c8d126cfd70598aee60af35c0a4"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.4.1"
dio:
dependency: "direct main"
description:
Expand Down Expand Up @@ -435,6 +459,14 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.4.1"
flutter_colorpicker:
dependency: transitive
description:
name: flutter_colorpicker
sha256: "969de5f6f9e2a570ac660fb7b501551451ea2a1ab9e2097e89475f60e07816ea"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
flutter_gen:
dependency: "direct main"
description:
Expand Down Expand Up @@ -528,6 +560,22 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_quill:
dependency: "direct main"
description:
name: flutter_quill
sha256: fea5c213ab5f0c7af42cdb815a735ad0f18aa453bd7ac28da666f9878165ea46
url: "https://pub.flutter-io.cn"
source: hosted
version: "10.6.1"
flutter_quill_delta_from_html:
dependency: transitive
description:
name: flutter_quill_delta_from_html
sha256: fd6e18af21d35277524302d95e24cd3ebedc59b976ddb4605aaf775d38892d40
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.4.1"
flutter_svg:
dependency: transitive
description:
Expand Down Expand Up @@ -850,6 +898,14 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.2-main.4"
markdown:
dependency: transitive
description:
name: markdown
sha256: ef2a1298144e3f985cc736b22e0ccdaf188b5b3970648f2d9dc13efd1d9df051
url: "https://pub.flutter-io.cn"
source: hosted
version: "7.2.2"
matcher:
dependency: transitive
description:
Expand Down Expand Up @@ -1090,6 +1146,22 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.0"
quill_native_bridge:
dependency: transitive
description:
name: quill_native_bridge
sha256: a36013831441d995bbaf2d571ebbd1208ee05ff59cf9a0a6946ad007f9f96eec
url: "https://pub.flutter-io.cn"
source: hosted
version: "10.6.1"
quiver:
dependency: transitive
description:
name: quiver
sha256: ea0b925899e64ecdfbf9c7becb60d5b50e706ade44a85b2363be2a22d88117d2
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.2.2"
rxdart:
dependency: transitive
description:
Expand Down Expand Up @@ -1616,5 +1688,5 @@ packages:
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.5.0 <4.0.0"
dart: ">=3.5.1 <4.0.0"
flutter: ">=3.24.0"
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: inter_knot
description: 绳网是一个游戏、技术交流平台
publish_to: none
version: 2.16.2+29
version: 2.16.3+30
repository: https://github.com/share121/inter_knot

environment:
Expand Down Expand Up @@ -29,6 +29,7 @@ dependencies:
pub_semver: ^2.1.4
flutter_keyboard_visibility: ^6.0.0
material_design_icons_flutter: ^7.0.7296
flutter_quill: ^10.6.1

dev_dependencies:
flutter_test:
Expand Down
4 changes: 2 additions & 2 deletions release-content.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1. 大大提升还原度
2. 优化手机端样式
1. 修复发帖按钮不见了的 bug
2. 修复每 8 个小时就要重新登录的 bug

0 comments on commit 9de347d

Please sign in to comment.