Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加隐藏设置页 #28

Closed
wants to merge 88 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
5530712
update .gitignore
orz12 Jan 20, 2024
33b80a6
Merge branch 'mod-not-login-recommend2'
orz12 Jan 20, 2024
9702185
Merge branch 'mod-video-detail-reply'
orz12 Jan 20, 2024
dc4bb75
Create CI.yml
orz12 Jan 20, 2024
e3fd70d
mod: 推荐、搜索页添加时间,修复视频搜索页无法筛选和回顶
orz12 Jan 20, 2024
be0a27b
fix: app端推荐屏蔽时间显示,播放量与弹幕组件改为动态类型
orz12 Jan 20, 2024
fdef234
Merge branch 'guozhigq:main' into main
orz12 Jan 21, 2024
54ca42f
Merge branch 'main' of https://github.com/guozhigq/pilipala into guoz…
orz12 Jan 22, 2024
c6e4bbe
Merge branch 'guozhigq-main'
orz12 Jan 22, 2024
e4a85f3
opt: 切换页面时销毁播放器组件提升性能
orz12 Jan 22, 2024
f541dce
fix: 修复部分手机横屏两侧不等宽
orz12 Jan 22, 2024
3fc657b
fix: 旋转横屏仍有状态栏
orz12 Jan 22, 2024
2612126
fix: 竖屏全屏异常
orz12 Jan 22, 2024
738a440
feat: 新增无痕播放模式
orz12 Jan 23, 2024
89fb393
fix: typo
orz12 Jan 23, 2024
39c5c49
fix: 点击视频评论区用户头像后返回详情页灰屏
orz12 Jan 23, 2024
d68cec7
mod: 图标统一,提示词调整
orz12 Jan 23, 2024
37ff851
提示调整
orz12 Jan 23, 2024
2cf720c
无痕模式补充设置,美化snackbar
orz12 Jan 23, 2024
2511b22
fix: 重力旋转后划出下方的详情页
orz12 Jan 24, 2024
fbea5a1
添加动态转发未支持提示
orz12 Jan 24, 2024
772a6a9
mod: 私信列表页支持未读条数显示
orz12 Jan 24, 2024
65e4d6f
feat: 消息添加未阅读数量
orz12 Jan 24, 2024
1b64628
fix: 解决RxList的value受保护警告
orz12 Jan 24, 2024
15fa430
mod: 新增两处报错提示
orz12 Jan 24, 2024
8e6eba4
mod: 缓解投稿视频接口风控
orz12 Jan 24, 2024
12a8226
mod: 包月充电视频异常处理(部分)
orz12 Jan 24, 2024
e6f9a76
mod: AI视频总结未支持提醒
orz12 Jan 24, 2024
59908e5
fix: 不直接使用value
orz12 Jan 25, 2024
8dded51
mod: 完善提示信息
orz12 Jan 25, 2024
5f299d9
feat: 新增弹幕描边粗细设置,默认值降低
orz12 Jan 25, 2024
1393e02
mod: 弹幕时长采用下凸函数调整,兼顾微调与更大范围
orz12 Jan 25, 2024
3bff0c8
fix: 评论区图片拉伸
orz12 Jan 25, 2024
16d2bbe
mod: 自动播放按钮改为官方版
orz12 Jan 25, 2024
144e6c2
feat: 私信已读状态更新+补充部分api
orz12 Jan 25, 2024
692d178
feat: 私信显示分享视频内容、富文本表情,补充信息类型枚举
orz12 Jan 25, 2024
bf6cef3
Merge branch 'guozhigq:main' into main
orz12 Jan 26, 2024
283262c
mod: 不使用FixedCrossAxisCount,改为MaxCrossAxisExtent
orz12 Jan 26, 2024
adf8301
opt: 调整红点颜色为primary,降低刺激性
orz12 Jan 26, 2024
9cb6c93
mod: 首页支持横竖屏
orz12 Jan 26, 2024
1da311c
mod: minSdkVersion 19->21
orz12 Jan 26, 2024
7bf9acb
feat: 折叠屏内屏(展开状态)竖屏全屏适配
orz12 Jan 26, 2024
8c1a34c
feat: 新增设置:横屏时返回可以直接返回为横屏页面,无需经过竖屏
orz12 Jan 26, 2024
e072e14
Merge remote-tracking branch 'upstream/main'
orz12 Jan 27, 2024
5ab8d8f
mod: 对齐搜索栏调整
orz12 Jan 27, 2024
aed2345
fix: 评论区识别逻辑重构,修复含有关键词的评论重复出现的问题
orz12 Jan 27, 2024
471ecd8
fix: 评论区时间正则拼接顺序
orz12 Jan 27, 2024
a1cce4d
Merge remote-tracking branch 'upstream/main'
orz12 Feb 1, 2024
e3de782
opt: 加快音量调整手势速度,并避免调整时数值抖动
orz12 Feb 1, 2024
2d2fc15
fix: 修复没有关键词时无法匹配时间、修复不显示关键词时不替换超链接、时间添加中文冒号匹配并提升分支判定严格程度
orz12 Feb 1, 2024
4cec572
fix: 只有时间的评论区不高亮
orz12 Feb 1, 2024
919feee
fix:评论区HTML实体转义;逻辑错误短路
orz12 Feb 1, 2024
29aa4c1
fix: 尝试修复掉无痕模式
orz12 Feb 1, 2024
18f1daf
fix: 查询在线人数错误时没有返回status
orz12 Feb 1, 2024
f8b8082
fix: 九图部分位置无法点击
orz12 Feb 1, 2024
040f030
Update CI.yml
orz12 Feb 1, 2024
b9517e0
feat: 特关投稿私信显示支持
orz12 Feb 2, 2024
12fa5b8
mod: kotlin与pub更新
orz12 Feb 2, 2024
a95082f
feat: 自动推送回复私信显示支持
orz12 Feb 2, 2024
8abbab4
mod: 添加特关投稿私信错误处理
orz12 Feb 2, 2024
4d9e15a
feat: 初步支持查看【回复我的】【at我】【收到的赞】内容
orz12 Feb 2, 2024
63d4dd5
fix: 个人面板无法跳转设置页面
guozhigq Feb 2, 2024
edf9b37
fix: 自动推送播放量解析错误
orz12 Feb 3, 2024
7e03216
fix: 刷新时重置参数
orz12 Feb 4, 2024
173abd8
Merge remote-tracking branch 'upstream/main'
orz12 Feb 4, 2024
8b387e9
fix: 尝试修复焦点恢复时错误播放的问题
orz12 Feb 4, 2024
aec70d9
mod: gradle添加阿里云镜像
Feb 7, 2024
e2bd514
Merge remote-tracking branch 'upstream/main'
Feb 7, 2024
2f4753e
feat: 点赞支持显示最新与人数
orz12 Feb 7, 2024
a5aaec7
feat: 动态瀑布流横屏支持
orz12 Feb 7, 2024
88bc9e3
fix: 使用导航键点不到合集列表末项与错误日志
orz12 Feb 7, 2024
2ed7d00
mod: 详情页横屏布局(bug很多不要下载!)
orz12 Feb 8, 2024
0d1f738
fix: 播放页横屏适配修复
orz12 Feb 11, 2024
d1ed6eb
mod: 调整平板、折叠屏内屏、普通手机横屏尺寸,状态栏动态恢复
orz12 Feb 11, 2024
4ea2f3b
fix: 导航键底色透明
orz12 Feb 13, 2024
9afa475
mod: 移除pip弹幕
orz12 Feb 13, 2024
fc834a7
mod: 未开启横屏时不转屏
orz12 Feb 13, 2024
46b6c5a
Merge remote-tracking branch 'upstream/main'
orz12 Feb 14, 2024
186d381
fix: 速度设置无法取消
orz12 Feb 14, 2024
f7c1aa0
mod: 全屏手势反向
orz12 Feb 14, 2024
63481ab
fix: 竖屏评论区加载失败
orz12 Feb 14, 2024
251d098
revert: 暂时回退guozhigq关于直播的分支feature-liveRoomRender修改
orz12 Feb 14, 2024
6028f20
mod: 图片预览页,安卓也隐藏状态栏
orz12 Feb 16, 2024
ff6845f
fix: 日期转换失败导致日志无法显示,新增fatal等级记录,统一日志文件获取
orz12 Feb 16, 2024
7706cec
增加隐藏设置页
KoolShow Feb 16, 2024
94c7da2
修复无法跳转到隐藏设置页面
KoolShow Feb 16, 2024
fa8ddc0
添加异常测试功能
KoolShow Feb 16, 2024
b7c7e9b
Merge branch 'main' into feat-hidden-settings
KoolShow Feb 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 143 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
name: CI

on:
workflow_dispatch:
push:
branches:
- '*'
paths-ignore:
- '**.md'
- '**.txt'
- '.github/**'
- '.idea/**'
- '!.github/workflows/**'

jobs:
android:
name: Build CI (Android)
runs-on: ubuntu-latest

steps:
- name: 代码迁出
uses: actions/checkout@v3

- name: 构建Java环境
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "17"
token: ${{secrets.GIT_TOKEN}}

- name: 检查缓存
uses: actions/cache@v2
id: cache-flutter
with:
path: /root/flutter-sdk
key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.lock') }}

- name: 安装Flutter
if: steps.cache-flutter.outputs.cache-hit != 'true'
uses: subosito/flutter-action@v2
with:
flutter-version: 3.16.5
channel: any

- name: 下载项目依赖
run: flutter pub get

- name: 解码生成 jks
run: echo $KEYSTORE_BASE64 | base64 -di > android/app/vvex.jks
env:
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}

- name: flutter build apk
run: flutter build apk --release --split-per-abi
env:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD}}

- name: 获取版本号
id: version
run: echo "version=${GITHUB_SHA::7}" >>$GITHUB_OUTPUT

- name: 重命名应用
run: |
for file in build/app/outputs/flutter-apk/app-*.apk; do
if [[ $file =~ app-(.?*)release.apk ]]; then
new_file_name="build/app/outputs/flutter-apk/Pili-${BASH_REMATCH[1]}${{ steps.version.outputs.version }}.apk"
mv "$file" "$new_file_name"
fi
done

- name: 上传
uses: actions/upload-artifact@v3
with:
name: Pilipala-CI
path: |
build/app/outputs/flutter-apk/Pili-*.apk

iOS:
name: Build CI (iOS)
runs-on: macos-latest

steps:
- name: 代码迁出
uses: actions/checkout@v4

- name: 安装Flutter
if: steps.cache-flutter.outputs.cache-hit != 'true'
uses: subosito/[email protected]
with:
cache: true
flutter-version: 3.16.5

- name: flutter build ipa
run: |
flutter build ios --release --no-codesign
ln -sf ./build/ios/iphoneos Payload
zip -r9 app.ipa Payload/runner.app

- name: 获取版本号
id: version
run: echo "version=${GITHUB_SHA::7}" >>$GITHUB_OUTPUT

- name: 重命名应用
run: |
DATE=${{ steps.date.outputs.date }}
for file in app.ipa; do
new_file_name="build/Pili-${{ steps.version.outputs.version }}.ipa"
mv "$file" "$new_file_name"
done

- name: 上传
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
name: Pilipala-CI
path: |
build/Pili-*.ipa

upload:
runs-on: ubuntu-latest

needs:
- android
- iOS
steps:

- uses: actions/download-artifact@v3
with:
name: Pilipala-CI
path: ./Pilipala-CI

- name: Upload Pre-release
uses: ncipollo/release-action@v1
with:
name: v${{ github.run_number }}
token: ${{ secrets.GIT_TOKEN }}
commit: main
tag: v${{ github.run_number }}
prerelease: true
allowUpdates: true
artifacts: Pilipala-CI/*
16 changes: 15 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
buildscript {
ext.kotlin_version = '1.7.10'
ext.kotlin_version = '1.9.22'
repositories {
maven { url "https://maven.aliyun.com/repository/google" }
maven { url "https://maven.aliyun.com/repository/central" }
maven { url "https://maven.aliyun.com/repository/jcenter" }
maven { url "https://maven.aliyun.com/repository/public" }
maven { url "http://download.flutter.io"
allowInsecureProtocol = true
}
google()
mavenCentral()
}
Expand All @@ -13,6 +20,13 @@ buildscript {

allprojects {
repositories {
maven { url "https://maven.aliyun.com/repository/google" }
maven { url "https://maven.aliyun.com/repository/central" }
maven { url "https://maven.aliyun.com/repository/jcenter" }
maven { url "https://maven.aliyun.com/repository/public" }
maven { url "http://download.flutter.io"
allowInsecureProtocol = true
}
google()
mavenCentral()
}
Expand Down
Binary file removed assets/images/live/default_bg.webp
Binary file not shown.
31 changes: 9 additions & 22 deletions lib/common/widgets/network_img_layer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,16 @@ class NetworkImgLayer extends StatelessWidget {
final String imageUrl =
'${src!.startsWith('//') ? 'https:${src!}' : src!}@${quality ?? 100}q.webp';
int? memCacheWidth, memCacheHeight;
double aspectRatio = (width / height).toDouble();

void setMemCacheSizes() {
if (aspectRatio > 1) {
memCacheHeight = height.cacheSize(context);
} else if (aspectRatio < 1) {
memCacheWidth = width.cacheSize(context);
} else {
if (origAspectRatio != null && origAspectRatio! > 1) {
memCacheWidth = width.cacheSize(context);
} else if (origAspectRatio != null && origAspectRatio! < 1) {
memCacheHeight = height.cacheSize(context);
} else {
memCacheWidth = width.cacheSize(context);
memCacheHeight = height.cacheSize(context);
}
}
}

setMemCacheSizes();

if (memCacheWidth == null && memCacheHeight == null) {
memCacheWidth = width.toInt();
if (width > height || (origAspectRatio != null && origAspectRatio! > 1)) {
memCacheWidth = width.cacheSize(context);
} else if (width < height ||
(origAspectRatio != null && origAspectRatio! < 1)) {
memCacheHeight = height.cacheSize(context);
} else {
// 不能同时设置,否则会导致图片变形
memCacheWidth = width.cacheSize(context);
// memCacheHeight = height.cacheSize(context);
}

return src != '' && src != null
Expand Down
110 changes: 5 additions & 105 deletions lib/common/widgets/video_card_h.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import '../../http/search.dart';
import '../../http/user.dart';
import '../../http/video.dart';
import '../../utils/utils.dart';
import '../constants.dart';
import 'badge.dart';
import 'network_img_layer.dart';
import 'stat/danmu.dart';
import 'stat/view.dart';
import 'video_popup_menu.dart';

// 视频卡片 - 水平布局
class VideoCardH extends StatelessWidget {
Expand Down Expand Up @@ -240,113 +239,14 @@ class VideoContent extends StatelessWidget {
),

const Spacer(),
// SizedBox(
// width: 20,
// height: 20,
// child: IconButton(
// tooltip: '稍后再看',
// style: ButtonStyle(
// padding: MaterialStateProperty.all(EdgeInsets.zero),
// ),
// onPressed: () async {
// var res =
// await UserHttp.toViewLater(bvid: videoItem.bvid);
// SmartDialog.showToast(res['msg']);
// },
// icon: Icon(
// Icons.more_vert_outlined,
// color: Theme.of(context).colorScheme.outline,
// size: 14,
// ),
// ),
// ),
if (source == 'normal')
SizedBox(
width: 24,
height: 24,
child: PopupMenuButton<String>(
padding: EdgeInsets.zero,
icon: Icon(
Icons.more_vert_outlined,
color: Theme.of(context).colorScheme.outline,
size: 14,
),
position: PopupMenuPosition.under,
// constraints: const BoxConstraints(maxHeight: 35),
onSelected: (String type) {},
itemBuilder: (BuildContext context) =>
<PopupMenuEntry<String>>[
PopupMenuItem<String>(
onTap: () async {
var res = await UserHttp.toViewLater(
bvid: videoItem.bvid as String);
SmartDialog.showToast(res['msg']);
},
value: 'pause',
height: 40,
child: const Row(
children: [
Icon(Icons.watch_later_outlined, size: 16),
SizedBox(width: 6),
Text('稍后再看', style: TextStyle(fontSize: 13))
],
),
),
const PopupMenuDivider(),
PopupMenuItem<String>(
onTap: () async {
SmartDialog.show(
useSystem: true,
animationType:
SmartAnimationType.centerFade_otherSlide,
builder: (BuildContext context) {
return AlertDialog(
title: const Text('提示'),
content: Text(
'确定拉黑:${videoItem.owner.name}(${videoItem.owner.mid})?'
'\n\n注:被拉黑的Up可以在隐私设置-黑名单管理中解除'),
actions: [
TextButton(
onPressed: () => SmartDialog.dismiss(),
child: Text(
'点错了',
style: TextStyle(
color: Theme.of(context)
.colorScheme
.outline),
),
),
TextButton(
onPressed: () async {
var res = await VideoHttp.relationMod(
mid: videoItem.owner.mid,
act: 5,
reSrc: 11,
);
SmartDialog.dismiss();
SmartDialog.showToast(res['code'] == 0
? '成功'
: res['msg']);
},
child: const Text('确认'),
)
],
);
},
);
},
value: 'pause',
height: 40,
child: Row(
children: [
const Icon(Icons.block, size: 16),
const SizedBox(width: 6),
Text('拉黑:${videoItem.owner.name}',
style: const TextStyle(fontSize: 13))
],
),
),
],
child: VideoPopupMenu(
size: 32,
iconSize: 18,
videoItem: videoItem,
),
),
],
Expand Down
Loading
Loading