Skip to content

Commit

Permalink
novel page <=> illust page
Browse files Browse the repository at this point in the history
  • Loading branch information
Notsfsssf committed Nov 24, 2024
1 parent 0be786c commit 69b0f11
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
20 changes: 16 additions & 4 deletions lib/page/novel/user/novel_users_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,11 @@ class _NovelUsersPageState extends State<NovelUsersPage>
final dio = Dio(BaseOptions(headers: Hoster.header(url: url)));
if (!userSetting.disableBypassSni) {
dio.httpClientAdapter = IOHttpClientAdapter()
..createHttpClient = () {
return HttpClient()
..badCertificateCallback =
(X509Certificate cert, String host, int port) => true;};
..createHttpClient = () {
return HttpClient()
..badCertificateCallback =
(X509Certificate cert, String host, int port) => true;
};
}
await dio.download(url.toTrueUrl(), tempFile, deleteOnError: true);
File file = File(tempFile);
Expand Down Expand Up @@ -389,6 +390,13 @@ class _NovelUsersPageState extends State<NovelUsersPage>
widget.id.toString(), userStore.userDetail!.user.name));
break;
}
case 4:
Navigator.of(context)
.push(MaterialPageRoute(builder: (BuildContext context) {
return UsersPage(
id: widget.id,
);
}));
default:
}
},
Expand All @@ -410,6 +418,10 @@ class _NovelUsersPageState extends State<NovelUsersPage>
value: 3,
child: Text(I18n.of(context).report),
),
PopupMenuItem<int>(
value: 4,
child: Text('illust page'),
),
];
},
);
Expand Down
1 change: 1 addition & 0 deletions lib/page/novel/viewer/novel_viewer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ class _NovelViewerPageState extends State<NovelViewerPage> {
Future _showMessage(BuildContext context) {
return showModalBottomSheet(
context: context,
isScrollControlled: true,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(top: Radius.circular(16.0))),
builder: (context) {
Expand Down
12 changes: 12 additions & 0 deletions lib/page/user/users_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import 'package:pixez/main.dart';
import 'package:pixez/models/illust.dart';
import 'package:pixez/network/api_client.dart';
import 'package:pixez/page/follow/follow_list.dart';
import 'package:pixez/page/novel/user/novel_users_page.dart';
import 'package:pixez/page/picture/user_follow_button.dart';
import 'package:pixez/page/report/report_items_page.dart';
import 'package:pixez/page/shield/shield_page.dart';
Expand Down Expand Up @@ -533,6 +534,13 @@ class _UsersPageState extends State<UsersPage> with TickerProviderStateMixin {
widget.id.toString(), userStore.userDetail!.user.name));
break;
}
case 4:
Navigator.of(context)
.push(MaterialPageRoute(builder: (BuildContext context) {
return NovelUsersPage(
id: widget.id,
);
}));
default:
}
},
Expand All @@ -555,6 +563,10 @@ class _UsersPageState extends State<UsersPage> with TickerProviderStateMixin {
value: 3,
child: Text(I18n.of(context).report),
),
PopupMenuItem<int>(
value: 4,
child: Text('Novel page'),
),
];
},
);
Expand Down

0 comments on commit 69b0f11

Please sign in to comment.