Skip to content

Commit dd0d156

Browse files
committed
chore: update readme
1 parent 007adf0 commit dd0d156

8 files changed

Lines changed: 140 additions & 99 deletions

File tree

README.md

Lines changed: 51 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,66 @@
1-
# AcFun Client Multiplatform
1+
<br/>
2+
<div align="center">
3+
<img width="160" height="160" style="display: block; border: 1px solid #f5f5f5; border-radius: 9999px;" src="./art/ic_acfun_title.png">
4+
</div>
5+
<br/>
6+
<br/>
7+
<div align="center">
8+
<img src="https://img.shields.io/static/v1?label=version&message=1.0.3&color=success"/>
9+
<img src="https://img.shields.io/static/v1?label=platform&message=Android&color=green"/> <img src="https://img.shields.io/static/v1?label=platform&message=Desktop&color=blue"/>
10+
</div>
11+
<br/>
12+
<div align="center">
13+
<h1>AcFun-Client-Multiplatform</h1>
14+
<p>这是一个旨在使用 Compose Multiplatform 技术来构建一个多平台的在线流媒体客户端, 同时支持 Android Phone,Android Pad,
15+
Android TV, Windows, Mac OS, Linux。
16+
</p>
217

3-
这是一个旨在使用 Compose 技术来构建一个多平台的在线流媒体客户端, 同时支持 Android Phone,Android Pad, Android TV, Windows, Mac OS, Linux,目标达到 90% UI 代码的通用率,包括接口请求和弹幕显示等。
18+
</div>
419

5-
# Download
20+
## 下载
621

722
https://github.com/succlz123/AcFun-Client-Multiplatform/releases
823

9-
# Feature
24+
- Linux 有需要的可以自行编译打包。
25+
- Mac OS 拖动安装后,需要去系统-偏好设置-安全性与隐私里面允许打开。
26+
- Windows 安装后没有桌面快捷方式,exe 文件在 C:\Program Files\AcFun 里。
1027

11-
- 首页展示
12-
- 分区内容展示
13-
- 视频详情展示
14-
- UP主投稿视频查看
15-
- 视频播放
16-
- 直播
17-
- 搜索
18-
- 支持播放多清晰度选择
19-
- 播放功能增强,变速,音量调节等
20-
- 分区支持筛选排序
21-
- 弹幕 (简易弹幕-实验/Experimental)
22-
- Android Phone, Android Pad,Desktop 适配
23-
- 下载
28+
## 功能
2429

25-
# Todo
30+
- 首页展示,分区内容展示,视频详情展示,UP主投稿视频查看。
31+
- 视频播放,直播,弹幕 (简易弹幕-实验性质),播放功能增强,变速等。
32+
- 搜索,下载。
33+
- Android Phone, Android Pad,Desktop 适配。
2634

27-
- 支持播放选集功能
28-
- Android TV 适配
29-
- DLNA 投屏
30-
- 番剧
31-
- 文章区
35+
## 开发中功能
3236

33-
# Screenshot
37+
- 支持播放选集功能。
38+
- Android TV 适配。
39+
- DLNA 投屏。
40+
- 番剧,文章区。
3441

35-
## 桌面和平板
42+
## 不同平台下展示
3643

37-
<img src="https://github.com/succlz123/AcFun-Client-Multiplatform/blob/master/screenshot/1.png?raw=true" width="750" height="500"/><br/>
44+
### 桌面和平板
3845

39-
## 手机
40-
<img src="https://github.com/succlz123/AcFun-Client-Multiplatform/blob/master/screenshot/9.png?raw=true" width="360" height="800"/><br/>
46+
<div align="center">
47+
<img width="750" height="500" src="./art/1.png">
48+
</div>
4149

42-
## 下载
50+
### 手机
51+
52+
<div align="center">
53+
<img width="360" height="800" src="./art/9.png">
54+
</div>
55+
56+
### 下载
57+
58+
<div align="center">
59+
<img width="750" height="500" src="./art/15.png">
60+
</div>
4361

44-
<img src="https://github.com/succlz123/AcFun-Client-Multiplatform/blob/master/screenshot/15.png?raw=true" width="750" height="500"/><br/>
62+
### 播放和弹幕
4563

46-
## 播放和弹幕
47-
<img src="https://github.com/succlz123/AcFun-Client-Multiplatform/blob/master/screenshot/12.png?raw=true" width="750" height="500"/><br/>
64+
<div align="center">
65+
<img width="750" height="500" src="./art/12.png">
66+
</div>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

art/ic_acfun_title.png

22.1 KB
Loading
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
package org.succlz123.app.acfun.ui.main.tab.item
2+
3+
import androidx.compose.foundation.background
4+
import androidx.compose.foundation.border
5+
import androidx.compose.foundation.layout.*
6+
import androidx.compose.foundation.shape.RoundedCornerShape
7+
import androidx.compose.material.MaterialTheme
8+
import androidx.compose.material.Text
9+
import androidx.compose.runtime.Composable
10+
import androidx.compose.ui.Alignment
11+
import androidx.compose.ui.Modifier
12+
import androidx.compose.ui.draw.clip
13+
import androidx.compose.ui.graphics.Color
14+
import androidx.compose.ui.unit.dp
15+
import org.succlz123.app.acfun.Manifest
16+
import org.succlz123.app.acfun.api.bean.AcContent
17+
import org.succlz123.app.acfun.api.bean.HomeRecommendItem
18+
import org.succlz123.app.acfun.theme.ColorResource
19+
import org.succlz123.lib.click.noRippleClickable
20+
import org.succlz123.lib.image.AsyncImageUrlMultiPlatform
21+
import org.succlz123.lib.screen.LocalScreenNavigator
22+
import org.succlz123.lib.screen.ScreenArgs
23+
24+
@Composable
25+
fun MainHomeContentInfo(item: HomeRecommendItem) {
26+
val screenNavigator = LocalScreenNavigator.current
27+
Box(
28+
modifier = Modifier.background(Color.White).clip(MaterialTheme.shapes.medium)
29+
.border(1.dp, ColorResource.border, MaterialTheme.shapes.medium).fillMaxWidth()
30+
) {
31+
Column(modifier = Modifier.noRippleClickable {
32+
if (item.item?.type == AcContent.TYPE_LIVE) {
33+
screenNavigator.push(
34+
Manifest.LiveStreamPlayerScreen,
35+
screenKey = item.item?.url,
36+
arguments = ScreenArgs.putValue("KEY_ID", item.item?.url).putValue("KEY_TITLE", item.item?.title)
37+
)
38+
} else if (item.item?.type == AcContent.TYPE_VIDEO) {
39+
screenNavigator.push(
40+
Manifest.VideoDetailScreen,
41+
screenKey = item.item?.url,
42+
arguments = ScreenArgs.putValue("KEY_AC_CONTENT", item.item)
43+
)
44+
}
45+
}.fillMaxSize()) {
46+
Box(
47+
modifier = Modifier.fillMaxWidth().aspectRatio(1.82f).background(ColorResource.background),
48+
contentAlignment = Alignment.BottomEnd
49+
) {
50+
AsyncImageUrlMultiPlatform(
51+
url = item.item?.img.orEmpty(), modifier = Modifier.fillMaxSize()
52+
)
53+
if (item.item?.view != null && item.item?.type == AcContent.TYPE_LIVE) {
54+
Text(
55+
modifier = Modifier.padding(6.dp).background(ColorResource.black60, RoundedCornerShape(4.dp))
56+
.padding(6.dp),
57+
text = "在线:${item.item?.view.toString()}",
58+
maxLines = 1,
59+
color = Color.White,
60+
style = MaterialTheme.typography.overline
61+
)
62+
}
63+
}
64+
Text(
65+
modifier = Modifier.padding(12.dp, 12.dp, 12.dp, 0.dp),
66+
text = item.item?.title.orEmpty() + "\n",
67+
maxLines = 2,
68+
style = MaterialTheme.typography.h6
69+
)
70+
Row {
71+
Spacer(modifier = Modifier.weight(1f))
72+
Text(
73+
modifier = Modifier.padding(12.dp, 6.dp),
74+
text = item.item?.up.orEmpty(),
75+
color = ColorResource.subText,
76+
maxLines = 1,
77+
style = MaterialTheme.typography.body2
78+
)
79+
}
80+
}
81+
}
82+
}

shared/src/commonMain/kotlin/org/succlz123/app/acfun/ui/main/tab/item/MainHomeContentItem.kt

Lines changed: 7 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,24 @@
11
package org.succlz123.app.acfun.ui.main.tab.item
22

33
import androidx.compose.animation.AnimatedVisibility
4-
import androidx.compose.foundation.background
5-
import androidx.compose.foundation.border
64
import androidx.compose.foundation.layout.*
75
import androidx.compose.foundation.lazy.grid.*
8-
import androidx.compose.foundation.shape.RoundedCornerShape
96
import androidx.compose.material.MaterialTheme
107
import androidx.compose.material.Text
118
import androidx.compose.runtime.Composable
129
import androidx.compose.runtime.remember
1310
import androidx.compose.runtime.rememberCoroutineScope
1411
import androidx.compose.ui.Alignment
1512
import androidx.compose.ui.Modifier
16-
import androidx.compose.ui.draw.clip
17-
import androidx.compose.ui.graphics.Color
1813
import androidx.compose.ui.unit.dp
1914
import kotlinx.coroutines.launch
2015
import org.succlz123.app.acfun.Manifest
21-
import org.succlz123.app.acfun.api.bean.AcContent
2216
import org.succlz123.app.acfun.api.bean.HomeRecommendItem
2317
import org.succlz123.app.acfun.base.AcGo2TopButton
2418
import org.succlz123.app.acfun.base.AcRefreshButton
2519
import org.succlz123.app.acfun.base.LoadingView
26-
import org.succlz123.app.acfun.theme.ColorResource
2720
import org.succlz123.app.acfun.ui.main.vm.HomeAreaViewModel
2821
import org.succlz123.lib.click.noRippleClickable
29-
import org.succlz123.lib.image.AsyncImageUrlMultiPlatform
3022
import org.succlz123.lib.screen.LocalScreenNavigator
3123
import org.succlz123.lib.screen.ScreenArgs
3224
import org.succlz123.lib.screen.operation.PushOptions
@@ -77,10 +69,13 @@ fun MainHomeContentItem(
7769

7870
@Composable
7971
private fun MainHomeContentItemSuccess(
80-
modifier: Modifier, content: ArrayList<HomeRecommendItem>,
81-
changeTitleSelectIfExist: (Int) -> Unit, selectTitleIfExist: () -> Int,
72+
modifier: Modifier,
73+
content: ArrayList<HomeRecommendItem>,
74+
changeTitleSelectIfExist: (Int) -> Unit,
75+
selectTitleIfExist: () -> Int,
8276
isExpandedScreen: Boolean,
83-
refreshClick: () -> Unit, onLoadMore: (() -> Unit)?
77+
refreshClick: () -> Unit,
78+
onLoadMore: (() -> Unit)?
8479
) {
8580
val screenNavigator = LocalScreenNavigator.current
8681
val gridCount = if (isExpandedScreen) {
@@ -136,62 +131,7 @@ private fun MainHomeContentItemSuccess(
136131
}
137132
}, item.titleStr.orEmpty())
138133
} else {
139-
Box(
140-
modifier = Modifier.background(Color.White).clip(MaterialTheme.shapes.medium)
141-
.border(1.dp, ColorResource.border, MaterialTheme.shapes.medium).fillMaxWidth()
142-
) {
143-
Column(modifier = Modifier.noRippleClickable {
144-
if (item.item?.type == AcContent.TYPE_LIVE) {
145-
screenNavigator.push(
146-
Manifest.LiveStreamPlayerScreen,
147-
screenKey = item.item?.url,
148-
arguments = ScreenArgs.putValue("KEY_ID", item.item?.url)
149-
.putValue("KEY_TITLE", item.item?.title)
150-
)
151-
} else if (item.item?.type == AcContent.TYPE_VIDEO) {
152-
screenNavigator.push(
153-
Manifest.VideoDetailScreen,
154-
screenKey = item.item?.url,
155-
arguments = ScreenArgs.putValue("KEY_AC_CONTENT", item.item)
156-
)
157-
}
158-
}.fillMaxSize()) {
159-
Box(
160-
modifier = Modifier.fillMaxWidth().aspectRatio(1.82f)
161-
.background(ColorResource.background), contentAlignment = Alignment.BottomEnd
162-
) {
163-
AsyncImageUrlMultiPlatform(
164-
url = item.item?.img.orEmpty(), modifier = Modifier.fillMaxSize()
165-
)
166-
if (item.item?.view != null && item.item?.type == AcContent.TYPE_LIVE) {
167-
Text(
168-
modifier = Modifier.padding(6.dp)
169-
.background(ColorResource.black60, RoundedCornerShape(4.dp)).padding(6.dp),
170-
text = "在线:${item.item?.view.toString()}",
171-
maxLines = 1,
172-
color = Color.White,
173-
style = MaterialTheme.typography.overline
174-
)
175-
}
176-
}
177-
Text(
178-
modifier = Modifier.padding(12.dp, 12.dp, 12.dp, 0.dp),
179-
text = item.item?.title.orEmpty() + "\n",
180-
maxLines = 2,
181-
style = MaterialTheme.typography.h6
182-
)
183-
Row {
184-
Spacer(modifier = Modifier.weight(1f))
185-
Text(
186-
modifier = Modifier.padding(12.dp, 6.dp),
187-
text = item.item?.up.orEmpty(),
188-
color = ColorResource.subText,
189-
maxLines = 1,
190-
style = MaterialTheme.typography.body2
191-
)
192-
}
193-
}
194-
}
134+
MainHomeContentInfo(item)
195135
}
196136
}
197137
}

0 commit comments

Comments
 (0)