11import { observer } from 'mobx-react' ;
22import { FC , useContext } from 'react' ;
3- import { Card , Col , Container , Row } from 'react-bootstrap' ;
3+ import { Card , Col , Container , Ratio , Row } from 'react-bootstrap' ;
44
55import { PageHead } from '../components/Layout/PageHead' ;
66import { I18nContext } from '../models/Translation' ;
@@ -10,74 +10,30 @@ interface BountyViewProps {
1010 title : string ;
1111 url : string ;
1212 icon : string ;
13+ colspan ?: number ;
1314}
1415
15- const BountyView : FC < BountyViewProps > = ( { title, url, icon } ) => (
16- < Col md = { 6 } lg = { 4 } >
17- < Card className = { styles . bountyCard } >
18- < Card . Body >
19- < h5 className = { styles . cardTitle } >
20- { icon } { title }
21- </ h5 >
22- < div className = { styles . iframeContainer } >
23- < iframe
24- src = { url }
25- className = { styles . bountyIframe }
26- title = { title }
27- allow = "clipboard-read; clipboard-write"
28- />
29- </ div >
30- </ Card . Body >
16+ const BountyView : FC < BountyViewProps > = ( { title, url, icon, colspan = 6 } ) => (
17+ < Col md = { colspan } >
18+ < Card className = { styles . bountyCard } body >
19+ < Card . Title as = "h2" className = { `fs-5 ${ styles . cardTitle } ` } >
20+ { icon } { title }
21+ </ Card . Title >
22+ < Ratio aspectRatio = "4x3" className = { styles . iframeContainer } >
23+ < iframe
24+ src = { url }
25+ className = { styles . bountyIframe }
26+ title = { title }
27+ allow = "clipboard-read; clipboard-write"
28+ />
29+ </ Ratio >
3130 </ Card >
3231 </ Col >
3332) ;
3433
3534const BountyPage : FC = observer ( ( ) => {
3635 const { t } = useContext ( I18nContext ) ;
3736
38- const bountyViews : BountyViewProps [ ] = [
39- {
40- title : t ( 'bounty_dashboard' ) ,
41- url : 'https://open-source-bazaar.feishu.cn/share/base/dashboard/shrcnt4EaAxn3zx9faRarERgEqf' ,
42- icon : '📊' ,
43- } ,
44- {
45- title : t ( 'bounty_token_leaderboard' ) ,
46- url : 'https://open-source-bazaar.feishu.cn/share/base/view/shrcn6QBgImHEjFH5qDf5tjmrzb' ,
47- icon : '🪙' ,
48- } ,
49- {
50- title : t ( 'bounty_task_leaderboard' ) ,
51- url : 'https://open-source-bazaar.feishu.cn/share/base/view/shrcnUVgb8E73UthaB2Tk4glnSb' ,
52- icon : '📋' ,
53- } ,
54- {
55- title : t ( 'bounty_task_submission' ) ,
56- url : 'https://open-source-bazaar.feishu.cn/share/base/form/shrcn2Ss97TSu3XgPi7mbZbrXLe' ,
57- icon : '📝' ,
58- } ,
59- {
60- title : t ( 'bounty_achievement_leaderboard' ) ,
61- url : 'https://open-source-bazaar.feishu.cn/share/base/view/shrcne4IY9mYAfoo9a69oxyAdTb' ,
62- icon : '🏆' ,
63- } ,
64- {
65- title : t ( 'bounty_achievement_submission' ) ,
66- url : 'https://open-source-bazaar.feishu.cn/share/base/form/shrcn7yHGIOnPNjdZck3eBaiMVc' ,
67- icon : '✅' ,
68- } ,
69- {
70- title : t ( 'bounty_hero_leaderboard' ) ,
71- url : 'https://open-source-bazaar.feishu.cn/share/base/view/shrcnyrOkRfqSAjWEjCQ9T4OOwc' ,
72- icon : '🦸' ,
73- } ,
74- {
75- title : t ( 'bounty_debt_leaderboard' ) ,
76- url : 'https://open-source-bazaar.feishu.cn/share/base/view/shrcnImOzkBXW3okKp3nLskPMgd' ,
77- icon : '💳' ,
78- } ,
79- ] ;
80-
8137 return (
8238 < >
8339 < PageHead title = { t ( 'bounty_page_title' ) } />
@@ -91,10 +47,72 @@ const BountyPage: FC = observer(() => {
9147 </ section >
9248
9349 < Container className = "my-5" >
94- < Row className = "g-4" >
95- { bountyViews . map ( view => (
96- < BountyView key = { view . url } { ...view } />
97- ) ) }
50+ { /* Dashboard - full width */ }
51+ < Row className = "g-4 mb-4" >
52+ < BountyView
53+ title = { t ( 'bounty_dashboard' ) }
54+ url = "https://open-source-bazaar.feishu.cn/share/base/dashboard/shrcnt4EaAxn3zx9faRarERgEqf"
55+ icon = "📊"
56+ colspan = { 12 }
57+ />
58+ </ Row >
59+
60+ { /* Task Rank and Submission Form - same row */ }
61+ < Row className = "g-4 mb-4" >
62+ < BountyView
63+ title = { t ( 'bounty_task_rank' ) }
64+ url = "https://open-source-bazaar.feishu.cn/share/base/view/shrcnUVgb8E73UthaB2Tk4glnSb"
65+ icon = "📋"
66+ />
67+ < BountyView
68+ title = { t ( 'bounty_task_submission' ) }
69+ url = "https://open-source-bazaar.feishu.cn/share/base/form/shrcn2Ss97TSu3XgPi7mbZbrXLe"
70+ icon = "📝"
71+ />
72+ </ Row >
73+
74+ { /* Achievement Rank and Submission Form - same row */ }
75+ < Row className = "g-4 mb-4" >
76+ < BountyView
77+ title = { t ( 'bounty_achievement_rank' ) }
78+ url = "https://open-source-bazaar.feishu.cn/share/base/view/shrcne4IY9mYAfoo9a69oxyAdTb"
79+ icon = "🏆"
80+ />
81+ < BountyView
82+ title = { t ( 'bounty_achievement_submission' ) }
83+ url = "https://open-source-bazaar.feishu.cn/share/base/form/shrcn7yHGIOnPNjdZck3eBaiMVc"
84+ icon = "✅"
85+ />
86+ </ Row >
87+
88+ { /* Token Rank - full width */ }
89+ < Row className = "g-4 mb-4" >
90+ < BountyView
91+ title = { t ( 'bounty_token_rank' ) }
92+ url = "https://open-source-bazaar.feishu.cn/share/base/view/shrcn6QBgImHEjFH5qDf5tjmrzb"
93+ icon = "🪙"
94+ colspan = { 12 }
95+ />
96+ </ Row >
97+
98+ { /* Hero Rank - full width */ }
99+ < Row className = "g-4 mb-4" >
100+ < BountyView
101+ title = { t ( 'bounty_hero_rank' ) }
102+ url = "https://open-source-bazaar.feishu.cn/share/base/view/shrcnyrOkRfqSAjWEjCQ9T4OOwc"
103+ icon = "🦸"
104+ colspan = { 12 }
105+ />
106+ </ Row >
107+
108+ { /* Debt Rank - full width */ }
109+ < Row className = "g-4 mb-4" >
110+ < BountyView
111+ title = { t ( 'bounty_debt_rank' ) }
112+ url = "https://open-source-bazaar.feishu.cn/share/base/view/shrcnImOzkBXW3okKp3nLskPMgd"
113+ icon = "💳"
114+ colspan = { 12 }
115+ />
98116 </ Row >
99117 </ Container >
100118 </ >
0 commit comments