@@ -8,6 +8,7 @@ import useAPI from '@/core/composables/useAPI'
88import WithdrawFormModal from ' @/builtins/withdraw/WithdrawFormModal.vue'
99import InformedConsentModal from ' @/builtins/simple_consent/InformedConsentModal.vue'
1010import ReportIssueModal from ' @/builtins/report_issue/ReportIssueModal.vue'
11+ import { Button } from ' @/uikit/components/ui/button'
1112
1213const router = useRouter ()
1314const smilestore = useSmileStore () // get the global store
@@ -50,13 +51,13 @@ function submitWithdraw() {
5051 </script >
5152
5253<template >
53- <div class =" infobar " role =" navigation" aria-label =" main navigation" >
54- <div class =" infobar-brand " >
55- <a class =" infobar-logo " :href =" appconfig.labURL" target =" _new" v-if =" !appconfig.anonymousMode" >
54+ <div class =" flex flex-row items-stretch relative px-5 " role =" navigation" aria-label =" main navigation" >
55+ <div class =" flex items-stretch flex-shrink-0 min-h-[3.25rem] " >
56+ <a class =" flex items-center pt-3 " :href =" appconfig.labURL" target =" _new" v-if =" !appconfig.anonymousMode" >
5657 <img :src =" api.getStaticUrl(appconfig.brandLogoFn)" width =" 90" />
5758 </a >
58- <div class =" infobar-item " >
59- <p class =" is-size-7 studyinfo pt-2" >
59+ <div class =" flex items-center pt-1 " >
60+ <p class =" text-xs text-left pl-2.5 text-foreground pt-2 sm:block hidden font-mono " >
6061 Study: {{ smilestore.config.codeName }}<br />Version: {{ smilestore.config.github.lastCommitHash
6162 }}{{
6263 appconfig.mode === 'testing' || appconfig.mode === 'development' || appconfig.mode === 'presentation'
@@ -67,49 +68,55 @@ function submitWithdraw() {
6768 </p >
6869 </div >
6970 </div >
70- <div id =" infobar" class =" infobar-menu is-active" >
71- <div class =" infobar-end" >
72- <div class =" infobar-item" v-if =" !appconfig.anonymousMode" >
73- <div class =" buttons" >
74- <button
75- class =" button is-info is-small is-light"
76- v-if =" api.store.browserPersisted.consented"
77- @click =" toggleConsent()"
78- >
79- <FAIcon icon="magnifying-glass" />  ;  ; View consent
80- </button >
81- <button
82- class =" button is-danger is-small is-light"
71+ <div id =" infobar" class =" flex-grow flex-shrink-0 flex items-stretch z-10" >
72+ <div class =" flex justify-end ml-auto items-stretch" >
73+ <div class =" flex items-center pt-1" v-if =" !appconfig.anonymousMode" >
74+ <div class =" flex gap-2" >
75+ <Button variant="outline" size="xs" v-if =" api .store .browserPersisted .consented " @click =" toggleConsent ()" >
76+ <FAIcon icon="magnifying-glass" />
77+ View consent
78+ </Button >
79+ <Button
80+ variant="destructive"
81+ size="xs"
8382 v-if =" api .store .browserPersisted .consented && ! api .store .browserPersisted .withdrawn "
8483 @click =" toggleWithdraw ()"
8584 >
86- <FAIcon icon="circle-xmark" />  ;  ; Withdraw
87- </button >
88- <button class =" button is-warning is-small is-light" @click =" toggleReport()" v-if =" false" >
89- <FAIcon icon="hand" />  ;  ; Report issue
90- </button >
85+ <FAIcon icon="circle-xmark" />
86+ Withdraw
87+ </Button >
88+ <Button variant="secondary" size="xs" @click =" toggleReport ()" v-if =" false " >
89+ <FAIcon icon="hand" />
90+ Report issue
91+ </Button >
9192 </div >
9293 </div >
9394 </div >
9495 </div >
9596 </div >
9697
9798 <!-- modal for viewing consent form -->
98- <div class =" modal " :class =" { 'is-active': showconsentmodal }" >
99- <div class =" modal-background " @click =" toggleConsent()" ></div >
100- <div class =" modal-content " >
101- <div class =" modaltext " >
99+ <div class =" absolute inset-0 z-50 flex items-center justify-center p-8 " :class =" { hidden: ! showconsentmodal }" >
100+ <div class =" absolute inset-0 bg-black bg-opacity-50 " @click =" toggleConsent()" ></div >
101+ <div class =" relative bg-white rounded-lg shadow-xl w-full max-w-4xl max-h-[90vh] overflow-y-auto " >
102+ <div class =" p-8 " >
102103 <InformedConsentModal @toggle-consent =" toggleConsent ()" />
103104 </div >
104105 </div >
105- <button class =" modal-close is-large" aria-label =" close" @click =" toggleConsent()" ></button >
106+ <button
107+ class =" absolute top-8 right-8 text-gray-400 hover:text-gray-600 text-2xl z-10"
108+ aria-label =" close"
109+ @click =" toggleConsent()"
110+ >
111+ ×
112+ </button >
106113 </div >
107114
108115 <!-- modal for withdrawing from study -->
109- <div class =" modal " :class =" { 'is-active': showwithdrawmodal }" >
110- <div class =" modal-background " @click =" toggleWithdraw()" ></div >
111- <div class =" modal-content " >
112- <div class =" modaltext " >
116+ <div class =" absolute inset-0 z-50 flex items-center justify-center p-8 " :class =" { hidden: ! showwithdrawmodal }" >
117+ <div class =" absolute inset-0 bg-black bg-opacity-50 " @click =" toggleWithdraw()" ></div >
118+ <div class =" relative bg-white rounded-lg shadow-xl w-full max-w-4xl max-h-[90vh] overflow-y-auto " >
119+ <div class =" p-8 " >
113120 <WithdrawFormModal
114121 :prefill-email =" email "
115122 ref="withdrawform"
@@ -118,100 +125,33 @@ function submitWithdraw() {
118125 />
119126 </div >
120127 </div >
121- <button class =" modal-close is-large" aria-label =" close" @click =" toggleWithdraw()" ></button >
128+ <button
129+ class =" absolute top-8 right-8 text-gray-400 hover:text-gray-600 text-2xl z-10"
130+ aria-label =" close"
131+ @click =" toggleWithdraw()"
132+ >
133+ ×
134+ </button >
122135 </div >
123136
124137 <!-- modal for reporting issues -->
125- <div class =" modal " :class =" { 'is-active': showreportissuemodal }" >
126- <div class =" modal-background " @click =" toggleReport()" ></div >
127- <div class =" modal-content " >
128- <div class =" modaltext " >
138+ <div class =" absolute inset-0 z-50 flex items-center justify-center p-8 " :class =" { hidden: ! showreportissuemodal }" >
139+ <div class =" absolute inset-0 bg-black bg-opacity-50 " @click =" toggleReport()" ></div >
140+ <div class =" relative bg-white rounded-lg shadow-xl w-full max-w-4xl max-h-[90vh] overflow-y-auto " >
141+ <div class =" p-8 " >
129142 <ReportIssueModal @toggle-report =" toggleReport ()" />
130143 </div >
131144 </div >
132- <button class =" modal-close is-large" aria-label =" close" @click =" toggleReport()" ></button >
145+ <button
146+ class =" absolute top-8 right-8 text-gray-400 hover:text-gray-600 text-2xl z-10"
147+ aria-label =" close"
148+ @click =" toggleReport()"
149+ >
150+ ×
151+ </button >
133152 </div >
134153</template >
135154
136155<style scoped>
137- .infobar {
138- display : flex ;
139- flex-flow : row nowrap ;
140- align-items : stretch ;
141- position : relative ;
142- }
143-
144- .infobar-brand {
145- align-items : stretch ;
146- display : flex ;
147- flex-shrink : 0 ;
148- min-height : var (--bulma-navbar-height );
149- }
150-
151- .infobar {
152- padding-left : 20px ;
153- padding-right : 20px ;
154- }
155-
156- .infobar-logo {
157- align-items : center ;
158- padding-top : 12px ;
159- }
160-
161- .infobar-item {
162- align-items : center ;
163- display : flex ;
164- padding-top : 3px ;
165- }
166-
167- .infobar-end {
168- justify-content : flex-end ;
169- margin-inline-start : auto ;
170- display : flex ;
171- align-items : stretch ;
172- }
173-
174- .infobar-menu {
175- flex-grow : 1 ;
176- flex-shrink : 0 ;
177- align-items : stretch ;
178- display : flex ;
179- z-index : 999 ;
180- }
181-
182- /* scoped css for this component */
183- .modaltext {
184- background-color : #fff ;
185- padding : 30px ;
186- }
187-
188- .navbar {
189- z-index : 10 ;
190- background-color : var (--status-bar-bg-color );
191- color : var (--status-bar-text-color );
192- }
193-
194- .modal-content {
195- width : 80% ;
196- }
197-
198- .studyinfo {
199- text-align : left ;
200- padding-left : 10px ;
201- color : var (--status-bar-text-color );
202- }
203-
204- .navbar-start {
205- margin-right : 10px ;
206- }
207-
208- .navbar-end {
209- margin-left : auto ;
210- }
211-
212- @media screen and (max-width : 560px ) {
213- .studyinfo {
214- display : none ;
215- }
216- }
156+ /* All styling has been converted to Tailwind classes */
217157 </style >
0 commit comments