mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-30 23:29:47 +08:00
@@ -574,11 +574,12 @@ class _EpisodePanelState extends State<EpisodePanel>
|
||||
|
||||
Widget _buildFavBtn(LoadingState<bool> loadingState) {
|
||||
return switch (loadingState) {
|
||||
Success(:var response) => mediumButton(
|
||||
Success(:var response) => iconButton(
|
||||
iconSize: 22,
|
||||
tooltip: response ? '取消订阅' : '订阅',
|
||||
icon: response
|
||||
? Icons.notifications_off_outlined
|
||||
: Icons.notifications_active_outlined,
|
||||
? const Icon(Icons.notifications_off_outlined)
|
||||
: const Icon(Icons.notifications_active_outlined),
|
||||
onPressed: () async {
|
||||
var result = await FavHttp.seasonFav(
|
||||
isFav: response,
|
||||
@@ -596,11 +597,12 @@ class _EpisodePanelState extends State<EpisodePanel>
|
||||
};
|
||||
}
|
||||
|
||||
Widget get _buildReverseBtn => mediumButton(
|
||||
Widget get _buildReverseBtn => iconButton(
|
||||
iconSize: 22,
|
||||
tooltip: widget.isReversed == true ? '正序播放' : '倒序播放',
|
||||
icon: widget.isReversed == true
|
||||
? MdiIcons.sortDescending
|
||||
: MdiIcons.sortAscending,
|
||||
? const Icon(MdiIcons.sortDescending)
|
||||
: const Icon(MdiIcons.sortAscending),
|
||||
onPressed: () => widget.onReverse?.call(),
|
||||
);
|
||||
|
||||
@@ -632,19 +634,22 @@ class _EpisodePanelState extends State<EpisodePanel>
|
||||
style: theme.textTheme.titleMedium,
|
||||
),
|
||||
if (_favState != null) Obx(() => _buildFavBtn(_favState!.value)),
|
||||
mediumButton(
|
||||
iconButton(
|
||||
iconSize: 22,
|
||||
tooltip: '跳至顶部',
|
||||
icon: Icons.vertical_align_top,
|
||||
icon: const Icon(Icons.vertical_align_top),
|
||||
onPressed: _animToTopOrBottom,
|
||||
),
|
||||
mediumButton(
|
||||
iconButton(
|
||||
iconSize: 22,
|
||||
tooltip: '跳至底部',
|
||||
icon: Icons.vertical_align_bottom,
|
||||
icon: const Icon(Icons.vertical_align_bottom),
|
||||
onPressed: () => _animToTopOrBottom(top: false),
|
||||
),
|
||||
mediumButton(
|
||||
iconButton(
|
||||
iconSize: 22,
|
||||
tooltip: '跳至当前',
|
||||
icon: Icons.my_location,
|
||||
icon: const Icon(Icons.my_location),
|
||||
onPressed: () async {
|
||||
final currentTabIndex = _currentTabIndex.value;
|
||||
if (currentTabIndex != widget.initialTabIndex) {
|
||||
@@ -669,11 +674,12 @@ class _EpisodePanelState extends State<EpisodePanel>
|
||||
Obx(
|
||||
() {
|
||||
final currentTabIndex = _currentTabIndex.value;
|
||||
return mediumButton(
|
||||
return iconButton(
|
||||
iconSize: 22,
|
||||
tooltip: _isReversed[currentTabIndex] ? '顺序' : '倒序',
|
||||
icon: !_isReversed[currentTabIndex]
|
||||
? MdiIcons.sortNumericAscending
|
||||
: MdiIcons.sortNumericDescending,
|
||||
? const Icon(MdiIcons.sortNumericAscending)
|
||||
: const Icon(MdiIcons.sortNumericDescending),
|
||||
onPressed: () => setState(() {
|
||||
_isReversed[currentTabIndex] = !_isReversed[currentTabIndex];
|
||||
}),
|
||||
@@ -681,9 +687,10 @@ class _EpisodePanelState extends State<EpisodePanel>
|
||||
},
|
||||
),
|
||||
if (widget.onClose != null)
|
||||
mediumButton(
|
||||
iconButton(
|
||||
iconSize: 22,
|
||||
tooltip: '关闭',
|
||||
icon: Icons.close,
|
||||
icon: const Icon(Icons.close),
|
||||
onPressed: widget.onClose,
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user