Skip to content

Commit 7ecb6bc

Browse files
committed
Add tag for app
1 parent 0ae9ee8 commit 7ecb6bc

2 files changed

Lines changed: 29 additions & 1 deletion

File tree

src/assets/scss/app.scss

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,24 @@ File: Main Css File
137137
text-decoration: line-through;
138138
/* 改变颜色 */
139139
color: gray;
140+
}
141+
142+
143+
.appstore-item-content {
144+
position: relative;
145+
/* 为绝对定位标签添加参照 */
146+
}
147+
148+
.app-todo-label {
149+
position: absolute;
150+
top: 8px;
151+
right: 8px;
152+
background: #ffd700;
153+
color: #000;
154+
padding: 2px 8px;
155+
border-radius: 12px;
156+
font-size: 0.75rem;
157+
font-weight: bold;
158+
z-index: 1;
159+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
140160
}

src/pages/appstore.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,9 +915,17 @@ const AppStore = (): React$Element<React$FragmentType> => {
915915

916916
const renderAppItem = (app, i, isAppFavorite) => {
917917
const imageName = app?.logo?.imageurl?.split("/").pop();
918+
const isProduction = app?.production !== false; // 检查production属性
919+
918920
return (
919921
<Col xxl={3} sm={6} md={4} key={"app-" + i} className="appstore-item">
920922
<div className='appstore-item-content highlight' onClick={() => { handleClick(app, isAppFavorite) }}>
923+
{/* 添加标签容器 */}
924+
{!isProduction && (
925+
<div className="app-todo-label">
926+
To do
927+
</div>
928+
)}
921929
<div className='appstore-item-content-icon col-same-height'>
922930
<LazyLoad>
923931
<img
@@ -937,7 +945,7 @@ const AppStore = (): React$Element<React$FragmentType> => {
937945
</div>
938946
</div>
939947
</div>
940-
</Col >
948+
</Col>
941949
);
942950
};
943951

0 commit comments

Comments
 (0)