Skip to content

Commit

Permalink
[fea]校务头像隐蔽,更换“关于天外天”
Browse files Browse the repository at this point in the history
  • Loading branch information
hxphieno committed Sep 25, 2024
1 parent 45a6700 commit 6e08432
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion lib/auth/view/user/about_twt_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import '../../../commons/themes/wpy_theme.dart';
import '../../../commons/widgets/w_button.dart';

class AboutTwtPage extends StatelessWidget {
static const URL = "https://i.twt.edu.cn/#/about";
static const URL = "https://www.twt.edu.cn/";

@override
Widget build(BuildContext context) {
Expand Down
32 changes: 21 additions & 11 deletions lib/feedback/view/components/widget/round_taggings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import 'package:we_pei_yang_flutter/feedback/util/splitscreen_util.dart';
import 'package:we_pei_yang_flutter/feedback/view/person_page.dart';
import 'package:we_pei_yang_flutter/feedback/view/search_result_page.dart';

import '../../../../commons/preferences/common_prefs.dart';
import '../../../../commons/themes/template/wpy_theme_data.dart';
import '../../../../commons/themes/wpy_theme.dart';
import '../../../../commons/widgets/w_button.dart';
Expand Down Expand Up @@ -310,19 +311,28 @@ class ProfileImageWithDetailedPopup extends StatefulWidget {

class _ProfileImageWithDetailedPopupState
extends State<ProfileImageWithDetailedPopup> {

bool get hasAdmin =>
CommonPreferences.isSchAdmin.value ||
CommonPreferences.isStuAdmin.value ||
CommonPreferences.isSuper.value;

@override
Widget build(BuildContext ctx) {
return WButton(
onPressed: () => Navigator.pushNamed(context, FeedbackRouter.person,
arguments: PersonPageArgs(
widget.postOrCommentId,
widget.fromPostCard,
widget.type,
widget.uid,
widget.avatar,
widget.nickName,
widget.level,
widget.heroTag)),
onPressed: () {
if ((widget.type != 1) || hasAdmin)
Navigator.pushNamed(context, FeedbackRouter.person,
arguments: PersonPageArgs(
widget.postOrCommentId,
widget.fromPostCard,
widget.type,
widget.uid,
widget.avatar,
widget.nickName,
widget.level,
widget.heroTag));
},
child: Hero(
tag: widget.heroTag,
child: SizedBox(
Expand All @@ -340,7 +350,7 @@ class _ProfileImageWithDetailedPopupState
borderRadius:
BorderRadius.all(Radius.circular(SplitUtil.w * 18)),
child: WpyPic(
widget.avatar == ""
(widget.avatar == "" || widget.type == 1)
? '${EnvConfig.QNHD}avatar/beam/20/${widget.uid}.svg'
: 'https://qnhdpic.twt.edu.cn/download/origin/${widget.avatar}',
width: SplitUtil.w * 17 > SplitUtil.h * 32
Expand Down
1 change: 1 addition & 0 deletions lib/feedback/view/post_detail_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ class _PostDetailPageState extends State<PostDetailPage>
child: ConstrainedBox(
constraints: constraints,
child: NCommentCard(
type: widget.post.type,
uid: widget.post.uid,
comment: data,
ancestorUId: widget.post.id,
Expand Down

0 comments on commit 6e08432

Please sign in to comment.