Skip to content

Commit

Permalink
Support inbox message
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonflylee committed Apr 27, 2024
1 parent c871f9d commit 800bcf1
Show file tree
Hide file tree
Showing 34 changed files with 1,326 additions and 4 deletions.
25 changes: 25 additions & 0 deletions resources/i18n/zh-Hans/wiliwili.json
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,31 @@
"all": "全部动态",
"refresh": "刷新列表"
},
"inbox": {
"chat": {
"tab": "聊天列表"
},
"feed": {
"like": "收到的赞",
"at": "@我的",
"reply": "回复我的"
},
"like": {
"video": "赞了我的视频",
"reply": "赞了我的评论",
"article": "赞了我的文章"
},
"at": {
"video": "在视频中@了我",
"reply": "在评论中@了我",
"article": "在文章中@了我"
},
"reply": {
"video": "对我的视频发表了评论",
"reply": "回复我的评论",
"article": "对我的文章发表了评论"
}
},
"mine": {
"login": {
"check": "检查登录信息...",
Expand Down
4 changes: 4 additions & 0 deletions resources/svg/ico-inbox-activate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions resources/svg/ico-inbox.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions resources/xml/activity/main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
alignItems="center"
positionType="absolute"
positionBottom="20">

<CustomButton
id="main/setting"
focusable="true"
Expand All @@ -57,6 +58,19 @@
height="48"
SVG="@res/svg/ico-setting.svg"/>
</CustomButton>

<CustomButton
id="main/inbox"
focusable="true"
highlightCornerRadius="50"
cornerRadius="50"
wireframe="false">
<SVGImage
focusable="true"
width="48"
height="48"
SVG="@res/svg/ico-inbox.svg"/>
</CustomButton>
</brls:Box>
</brls:Box>
</brls:AppletFrame>
29 changes: 29 additions & 0 deletions resources/xml/fragment/inbox_chat.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<brls:Box
wireframe="false"
axis="column"
height="auto"
width="auto">

<ButtonClose
id="button/close"
focusable="true"
positionType="absolute"
positionTop="10"
positionRight="10" />

<brls:Box
height="50">

</brls:Box>

<RecyclingGrid
grow="1"
preFetchLine="2"
spanCount="1"
flowMode="true"
itemHeight="1000"
paddingLeft="15"
paddingRight="20"
wireframe="false"
id="inbox/msgList" />
</brls:Box>
16 changes: 16 additions & 0 deletions resources/xml/fragment/inbox_feed.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<brls:Box
axis="column"
width="auto"
height="auto">

<RecyclingGrid
grow="1"
preFetchLine="2"
spanCount="1"
flowMode="true"
paddingLeft="15"
paddingRight="15"
itemHeight="500"
wireframe="false"
id="inbox/feedList" />
</brls:Box>
72 changes: 72 additions & 0 deletions resources/xml/fragment/inbox_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<brls:Box
width="auto"
height="auto"
justifyContent="flexEnd"
backgroundColor="@theme/brls/backdrop">

<brls:Box
id="player/cancel"
height="100%"
hideClickAnimation="true"
grow="1" />

<brls:AppletFrame
width="600"
height="100%"
axis="column"
headerHidden="true"
footerHidden="true"
backgroundColor="@theme/brls/background">
<brls:Box>
<AutoTabFrame
id="inbox/tab/frame"
defaultTab="0"
tabHeight="70"
grow="1"
tabItemActiveTextColor="@theme/color/bilibili"
disableNavigationRight="true"
sidebarPosition="top">

<Tab label="@i18n/wiliwili/inbox/chat/tab"
fontSize="22">
<brls:Box
width="auto"
height="auto"
paddingTop="10">
<RecyclingGrid
grow="1"
preFetchLine="2"
spanCount="1"
itemHeight="60"
paddingLeft="15"
paddingRight="15"
wireframe="false"
id="inbox/chatList" />
</brls:Box>
</Tab>

<Tab label="@i18n/wiliwili/inbox/feed/reply"
fontSize="22">
<InboxFeed mode="reply" />
</Tab>

<Tab label="@i18n/wiliwili/inbox/feed/at"
fontSize="22">
<InboxFeed mode="at" />
</Tab>

<Tab label="@i18n/wiliwili/inbox/feed/like"
fontSize="22">
<InboxFeed mode="like" />
</Tab>
</AutoTabFrame>

<ButtonClose
id="button/close"
focusable="true"
positionType="absolute"
positionTop="10"
positionRight="10" />
</brls:Box>
</brls:AppletFrame>
</brls:Box>
78 changes: 78 additions & 0 deletions resources/xml/views/feed_card.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<brls:Box
wireframe="false"
highlightCornerRadius="8"
cornerRadius="8"
backgroundColor="@theme/color/grey_1"
padding="15"
width="auto"
height="auto">

<brls:Box
wireframe="false"
marginRight="30">
<brls:Image
id="feed/avatar"
width="60"
aspectRatio="1"
scalingType="fit"
borderThickness="4"
borderColor="@theme/color/grey_1"
cornerRadius="100"
image="@res/pictures/default_avatar.png" />
</brls:Box>

<brls:Box
id="feed/content_box"
axis="column"
marginRight="30"
grow="1">
<brls:Box>
<brls:Label
id="feed/label/author"
width="auto"
height="auto"
wireframe="false"
grow="1"
fontSize="20"
marginBottom="4"
verticalAlign="bottom" />

<brls:Label
id="feed/label/misc"
width="auto"
height="auto"
fontSize="16"
marginTop="4"
verticalAlign="top"
wireframe="false"
textColor="@theme/font/grey" />
</brls:Box>

<TextBox
id="feed/content"
lineHeight="1.5"
marginTop="10"
grow="1"
maxRows="4"
showMore="true" />

<brls:Label
fontSize="16"
id="feed/time"
marginTop="10"
wireframe="false"
textColor="@theme/font/grey" />

</brls:Box>

<brls:Box
id="feed/card/pic_box"
height="80"
width="80">
<brls:Image
id="feed/card/picture"
scalingType="fill"
image="@res/pictures/video-card-bg.png"
cornerRadius="4" />
</brls:Box>
</brls:Box>
85 changes: 85 additions & 0 deletions resources/xml/views/inbox_msg.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<brls:Box
wireframe="false"
axis="column"
width="auto"
height="auto">

<brls:Label
width="100%"
height="auto"
fontSize="16"
marginBottom="10"
horizontalAlign="center"
visibility="gone"
id="msg/time"
wireframe="false"
textColor="@theme/font/grey" />

<brls:Box
focusable="true"
wireframe="false"
paddingLeft="10"
paddingRight="10"
width="auto"
height="auto">

<brls:Box
wireframe="false"
marginRight="15">
<brls:Image
id="avatar/talker"
width="40"
height="40"
visibility="invisible"
aspectRatio="1"
scalingType="fit"
borderThickness="4"
borderColor="@theme/color/grey_1"
cornerRadius="100"
image="@res/pictures/default_avatar.png" />
</brls:Box>

<brls:Box
id="msg/content_box"
backgroundColor="@theme/color/grey_1"
highlightCornerRadius="16"
cornerRadius="16"
visibility="gone"
axis="column"
grow="1"
padding="15">
<TextBox
id="msg/content"
lineHeight="1.5"
width="100%" />
</brls:Box>

<brls:Box
id="msg/picture_box"
visibility="gone"
grow="1">
<brls:Image
id="msg/picture"
scalingType="fit"
image="@res/pictures/video-card-bg.png" />
</brls:Box>

<brls:Box
wireframe="false"
marginLeft="15">
<brls:Image
id="avatar/mine"
width="40"
height="40"
visibility="invisible"
aspectRatio="1"
scalingType="fit"
borderThickness="4"
borderColor="@theme/color/grey_1"
cornerRadius="100"
image="@res/pictures/default_avatar.png" />
</brls:Box>

</brls:Box>

</brls:Box>
25 changes: 25 additions & 0 deletions resources/xml/views/inbox_user.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<brls:Box
wireframe="false"
highlightCornerRadius="8"
cornerRadius="8"
alignItems="center"
justifyContent="spaceBetween"
paddingLeft="20"
paddingRight="20"
width="auto"
height="auto">

<UserInfoView
height="100%"
id="chat/talker" />

<brls:Label
id="inbox/lastTime"
width="80"
height="auto"
fontSize="16"
horizontalAlign="right"
wireframe="false"
textColor="@theme/font/grey" />

</brls:Box>
1 change: 1 addition & 0 deletions wiliwili/include/activity/main_activity.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ class MainActivity : public brls::Activity {

private:
BRLS_BIND(CustomButton, settingBtn, "main/setting");
BRLS_BIND(CustomButton, inboxBtn, "main/inbox");
BRLS_BIND(AutoTabFrame, tabFrame, "main/tabFrame");
};
Loading

0 comments on commit 800bcf1

Please sign in to comment.