@@ -70,9 +70,9 @@ <h2 class="heading-wsubtitle__heading">Release Version {{ release.version }}</h2
70
70
< i class ="fa fa-download " aria-hidden ="true "> </ i >
71
71
Download
72
72
</ a >
73
- < a href ="{{ request.route_url('packaging.file', path=file.path) }} " class ="dropdown__link -js-copy-sha256-link ">
74
- < i class ="fa fa-copy " aria-hidden ="true "> </ i >
75
- Copy Checksum
73
+ < a href ="#copy-checksum-modal- {{ loop.index }} " class ="dropdown__link ">
74
+ < i class ="fa fa-hashtag " aria-hidden ="true "> </ i >
75
+ View Checksums
76
76
</ a >
77
77
< a href ="#delete-file-modal-{{ loop.index }} " class ="dropdown__link ">
78
78
< i class ="fa fa-trash " aria-hidden ="true "> </ i >
@@ -141,33 +141,87 @@ <h3 class="modal__title">Delete Release {{ release.version }}?</h3>
141
141
</ div >
142
142
143
143
{% if files %}
144
- {% for file in files %}
145
- < div id ="delete-file-modal-{{ loop.index }} " class ="modal ">
146
- {% set project_name = project.normalized_name %}
147
- < div class ="modal__content " role ="dialog ">
148
- < form method ="POST " class ="modal__form " action ="{{ request.current_route_path() }} ">
149
- < input name ="csrf_token " type ="hidden " value ="{{ request.session.get_csrf_token() }} ">
150
- < input name ="file_id " type ="hidden " value ="{{ file.id }} ">
151
- < a href ="#modal-close " title ="Close " class ="modal__close ">
152
- < i class ="fa fa-times " aria-hidden ="true "> </ i >
153
- < span class ="sr-only "> close</ span >
154
- </ a >
155
- < div class ="modal__body ">
156
- < h3 class ="modal__title "> Delete {{ file.filename }}?</ h3 >
157
- < div class ="callout-block callout-block--danger callout-block--bottom-margin no-top-margin ">
158
- < p > Warning: This action cannot be undone!</ p >
144
+ {% for file in files %}
145
+ < div id ="delete-file-modal-{{ loop.index }} " class ="modal ">
146
+ {% set project_name = project.normalized_name %}
147
+ < div class ="modal__content " role ="dialog ">
148
+ < form method ="POST " class ="modal__form " action ="{{ request.current_route_path() }} ">
149
+ < input name ="csrf_token " type ="hidden " value ="{{ request.session.get_csrf_token() }} ">
150
+ < input name ="file_id " type ="hidden " value ="{{ file.id }} ">
151
+ < a href ="#modal-close " title ="Close " class ="modal__close ">
152
+ < i class ="fa fa-times " aria-hidden ="true "> </ i >
153
+ < span class ="sr-only "> close</ span >
154
+ </ a >
155
+ < div class ="modal__body ">
156
+ < h3 class ="modal__title "> Delete {{ file.filename }}?</ h3 >
157
+ < div class ="callout-block callout-block--danger callout-block--bottom-margin no-top-margin ">
158
+ < p > Warning: This action cannot be undone!</ p >
159
+ </ div >
160
+ < p > Confirm the project name to continue.</ p >
161
+ < label for ="confirm_filename "> File name</ label >
162
+ < input name ="confirm_filename " type ="text " placeholder ="Confirm file name " autocomplete ="off " autocorrect ="off " autocapitalize ="off ">
159
163
</ div >
160
- < p > Confirm the project name to continue.</ p >
161
- < label for ="confirm_filename "> File name</ label >
162
- < input name ="confirm_filename " type ="text " placeholder ="Confirm file name " autocomplete ="off " autocorrect ="off " autocapitalize ="off ">
163
- </ div >
164
- < div class ="modal__footer ">
165
- < a href ="#modal-close " class ="button modal__action "> Cancel</ a >
166
- < button class ="button button--primary modal__action " type ="submit "> Delete File</ button >
167
- </ div >
168
- </ form >
164
+ < div class ="modal__footer ">
165
+ < a href ="#modal-close " class ="button modal__action "> Cancel</ a >
166
+ < button class ="button button--primary modal__action " type ="submit "> Delete File</ button >
167
+ </ div >
168
+ </ form >
169
+ </ div >
169
170
</ div >
170
- </ div >
171
- {% endfor %}
171
+
172
+ < div id ="copy-checksum-modal-{{ loop.index }} " class ="modal modal--wide ">
173
+ < div class ="modal__content " role ="dialog ">
174
+ < a href ="#modal-close " title ="Close " class ="modal__close ">
175
+ < i class ="fa fa-times " aria-hidden ="true "> </ i >
176
+ < span class ="sr-only "> close</ span >
177
+ </ a >
178
+ < div class ="modal__body ">
179
+ < h3 class ="modal__title "> Checksums for {{ file.filename }}</ h3 >
180
+ < table class ="table table--light table--checksums ">
181
+ < thead >
182
+ < tr >
183
+ < th class ="table__algorithm "> Algorithm</ th >
184
+ < th class ="table__checksum "> Checksum</ th >
185
+ < th class ="table__copy "> </ th >
186
+ </ tr >
187
+ </ thead >
188
+ < tbody >
189
+ < tr >
190
+ < td class ="table__algorithm "> SHA256</ td >
191
+ < td class ="table__checksum "> {{ file.sha256_digest }}</ td >
192
+ < td class ="table__copy ">
193
+ < a class ="button button--primary -js-copy-checksum tooltipped tooltipped-w " aria-label ="Copy to clipboard " data-original-label ="Copy to clipboard " data-clipboard-text ="{{ file.sha256_digest }} ">
194
+ Copy
195
+ </ a >
196
+ </ td >
197
+ </ tr >
198
+ < tr >
199
+ < td class ="table__algorithm "> MD5</ td >
200
+ < td class ="table__checksum "> {{ file.md5_digest }}</ td >
201
+ < td class ="table__copy ">
202
+ < a class ="button button--primary -js-copy-checksum tooltipped tooltipped-w " aria-label ="Copy to clipboard " data-original-label ="Copy to clipboard " data-clipboard-text ="{{ file.md5_digest }} ">
203
+ Copy
204
+ </ a >
205
+ </ td >
206
+ </ tr >
207
+ < tr >
208
+ < td class ="table__algorithm "> BLAKE2-256</ td >
209
+ < td class ="table__checksum "> {{ file.blake2_256_digest }}</ td >
210
+ < td class ="table__copy ">
211
+ < a class ="button button--primary -js-copy-checksum tooltipped tooltipped-w " aria-label ="Copy to clipboard " data-original-label ="Copy to clipboard " data-clipboard-text ="{{ file.blake2_256_digest }} ">
212
+ Copy
213
+ </ a >
214
+ </ td >
215
+ </ tr >
216
+ </ tbody >
217
+ </ table >
218
+ </ div >
219
+ < div class ="modal__footer ">
220
+ < a href ="#modal-close " class ="button button--primary modal__action "> Ok</ a >
221
+ </ div >
222
+ </ form >
223
+ </ div >
224
+ </ div >
225
+ {% endfor %}
172
226
{% endif %}
173
227
{% endblock %}
0 commit comments