Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1f2ae68

Browse files
authored
Merge pull request#32 from MozillaSecurity/ui-polish
Some UI+UX polish
2 parents32940b1 +5361e4a commit1f2ae68

File tree

3 files changed

+71
-102
lines changed

3 files changed

+71
-102
lines changed

‎server/frontend/src/components/Buckets/ReportPreviewRow.vue‎

Lines changed: 62 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
<template>
22
<trv-on:click="report.view_url">
3-
<tdclass="wrap-normal">{{ report.reported_at | date }}</td>
4-
<tdclass="wrap-anywhere">
5-
<spanclass="two-line-limit">{{ report.url }}</span>
3+
<tdclass="wrap-normal">
4+
{{ report.reported_at | shorterDate }}<br />
5+
(<a:href="report.view_url">Full details</a>)
6+
</td>
7+
<tdclass="url-col">
8+
<a:href="report.url"target="_blank"rel="noreferrer">
9+
{{ report.url }}
10+
</a>
11+
</td>
12+
<tdclass="wrap-normal comments-col">
13+
<div>
14+
<strong>{{ report.breakage_category }}</strong
15+
>: {{ maybeTranslatedComments(report) }}
16+
</div>
617
</td>
7-
<tdclass="wrap-normal">{{ maybeTranslatedComments(report) }}</td>
818
<td>
919
<img
1020
v-if="report.os === 'Linux'"
@@ -35,34 +45,36 @@
3545
:src="staticLogo('android')"
3646
/>
3747
<spanv-else>{{ report.os }}</span>
48+
{{ report.app_name }}
49+
{{ report.app_version }}
50+
({{ report.app_channel }})
3851
</td>
39-
<td>{{ report.app_name }}</td>
40-
<td>{{ report.app_channel }}</td>
41-
<td>{{ report.app_version }}</td>
42-
<td>{{ report.breakage_category }}</td>
4352
<td>
53+
PBM:
4454
{{
4555
report.details.boolean
46-
.broken_site_report_tab_info_antitracking_has_tracking_content_blocked
47-
}}
48-
</td>
49-
<td>
56+
.broken_site_report_tab_info_antitracking_is_private_browsing
57+
| humanBool
58+
}}<br />
59+
60+
Blocklist:
5061
{{
5162
report.details.string
52-
.broken_site_report_tab_info_antitracking_block_list
53-
}}
54-
</td>
55-
<td>
63+
.broken_site_report_tab_info_antitracking_block_list || "n/a"
64+
}}<br />
65+
66+
Any content blocked:
5667
{{
5768
report.details.boolean
58-
.broken_site_report_tab_info_antitracking_is_private_browsing
69+
.broken_site_report_tab_info_antitracking_has_tracking_content_blocked
70+
| humanBool
5971
}}
6072
</td>
6173
</tr>
6274
</template>
6375

6476
<script>
65-
import {date }from"../../helpers";
77+
import {shorterDate }from"../../helpers";
6678
6779
exportdefault {
6880
props: {
@@ -72,7 +84,14 @@ export default {
7284
},
7385
},
7486
filters: {
75-
date: date,
87+
shorterDate: shorterDate,
88+
humanBool: (value)=> {
89+
if (value===undefined|| value===null) {
90+
return"n/a";
91+
}
92+
93+
return value?"yes":"no";
94+
},
7695
},
7796
methods: {
7897
staticLogo(name) {
@@ -96,3 +115,27 @@ export default {
96115
},
97116
};
98117
</script>
118+
119+
<style scoped>
120+
.comments-col {
121+
overflow-wrap: anywhere;
122+
123+
div {
124+
max-height:150px;
125+
overflow:scroll;
126+
}
127+
}
128+
129+
.url-cola {
130+
display:block;
131+
max-width:300px;
132+
overflow:scroll;
133+
text-overflow:ellipsis;
134+
135+
/*
136+
* This is to ensure the overlay scrollbar isn't overlaying the text. Ideally,
137+
* this link would be `height: 100%`, but bug 1598458 is a thing.
138+
*/
139+
padding-bottom:1.2em;
140+
}
141+
</style>

‎server/frontend/src/components/Buckets/View.vue‎

Lines changed: 3 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -90,81 +90,10 @@
9090
:data="bucket.report_history"
9191
:range="activityRange"
9292
/>
93-
<divclass="btn-group">
94-
<a:href="reportsUrl"class="btn btn-default">View Reports</a>
95-
<a
96-
title="Add/Update"
97-
class="btn btn-danger"
98-
v-on:click="submitWatchForm"
99-
>Notify on New Reports</a
100-
>
101-
</div>
102-
<form:action="watchUrl"ref="bucketWatchForm"method="post">
103-
<inputtype="hidden"name="bucket":value="bucket.id" />
104-
<input
105-
type="hidden"
106-
name="report"
107-
:value="bucket.latest_entry_id"
108-
/>
109-
</form>
110-
</td>
111-
</tr>
112-
<tr>
113-
<td>Latest Report</td>
114-
<td>{{ bucket.latest_report | date }}</td>
115-
</tr>
116-
<tr>
117-
<td>Priority</td>
118-
<td>{{ bucket.priority }}</td>
119-
</tr>
120-
<tr>
121-
<td>Signature</td>
122-
<td>
123-
<divid="signature"class="collapse">
124-
<pre><code>{{ prettySignature }}</code></pre>
125-
</div>
126-
<button
127-
aria-controls="signature"
128-
aria-expanded="false"
129-
class="btn btn-default btn-xs"
130-
data-target="#signature"
131-
data-toggle="collapse"
132-
>
133-
<span
134-
aria-label="Show signature field"
135-
class="bi bi-eye-fill"
136-
title="Show signature field"
137-
></span>
138-
<span
139-
aria-label="Hide signature field"
140-
class="bi bi-eye-slash-fill"
141-
title="Hide signature field"
142-
></span>
143-
</button>
14493
</td>
14594
</tr>
14695
</tbody>
14796
</table>
148-
149-
<divv-if="canEdit"class="btn-group">
150-
<a
151-
aria-label="Edit bucket"
152-
class="btn btn-default"
153-
:href="editUrl"
154-
title="Edit bucket"
155-
>Edit</a
156-
>
157-
<a
158-
aria-label="Delete bucket"
159-
class="btn btn-danger"
160-
:href="delUrl"
161-
title="Delete bucket"
162-
>Delete</a
163-
>
164-
<br />
165-
<br />
166-
</div>
167-
16897
<divclass="table-responsive">
16998
<table
17099
class="table table-condensed table-hover table-bordered table-db wrap-none"
@@ -174,14 +103,8 @@
174103
<th>Date Reported</th>
175104
<th>URL</th>
176105
<th>User Comments</th>
177-
<th>OS</th>
178-
<th>App</th>
179-
<th>Channel</th>
180-
<th>Version</th>
181-
<th>Breakage Category</th>
182-
<th>ETP content blocked?</th>
183-
<th>ETP blocklist</th>
184-
<th>Is PBM?</th>
106+
<th>Product</th>
107+
<th>ETP&amp; PBM</th>
185108
</tr>
186109
</thead>
187110
<tbody>
@@ -317,10 +240,7 @@ export default {
317240
required:true,
318241
},
319242
},
320-
mounted() {
321-
constel=document.getElementsByName("csrfmiddlewaretoken")[0];
322-
this.$refs.bucketWatchForm.appendChild(el);
323-
},
243+
mounted() {},
324244
methods: {
325245
buildQueryParams() {
326246
constresult= {

‎server/frontend/src/helpers.js‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ export const date = (datetime) => {
5252
returnnewDate(datetime).toUTCString();
5353
};
5454

55+
exportconstshorterDate=(datetime)=>{
56+
const[date,time]=newDate(datetime).toISOString().split("T");
57+
consthhmm=time.split(":").slice(0,2).join(":");
58+
return`${date}${hhmm}`;
59+
};
60+
5561
exportconstassignExternalBug=(bucketId,bugId,providerId)=>{
5662
constpayload={
5763
bug:bugId,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp