Skip to content

Commit f2fb3c3

Browse files
author
yggverse
committed
update external redirect indication
1 parent 7818eb8 commit f2fb3c3

File tree

1 file changed

+10
-31
lines changed
  • src/app/browser/window/tab/item/page/navigation/request/info

1 file changed

+10
-31
lines changed

src/app/browser/window/tab/item/page/navigation/request/info/dialog.rs

Lines changed: 10 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -223,41 +223,14 @@ impl Dialog for PreferencesDialog {
223223
.build();
224224
a.add_prefix(&{
225225
let c = i + 1;
226-
let (css_class, tooltip_text) = if r
227-
.redirect
228-
.as_ref()
229-
.is_some_and(|this| this.is_external(r).is_some_and(|v| v))
230-
{
231-
if c == l {
232-
("warning", "Current (External)")
233-
} else {
234-
(
235-
"warning",
236-
if i == 0 {
237-
"Initial request"
238-
} else {
239-
"External redirect"
240-
},
241-
)
242-
}
243-
} else if c == l {
244-
("success", "Current")
245-
} else {
246-
(
247-
"accent",
248-
if i == 0 {
249-
"Initial request"
250-
} else {
251-
"Internal redirect"
252-
},
253-
)
254-
};
255226
Button::builder()
256-
.css_classes(["circular", css_class])
227+
.css_classes([
228+
"circular",
229+
if c == l { "success" } else { "accent" },
230+
])
257231
.halign(Align::Center)
258232
.label(c.to_string())
259233
.sensitive(false)
260-
.tooltip_text(tooltip_text)
261234
.valign(Align::Center)
262235
.build()
263236
});
@@ -267,6 +240,12 @@ impl Dialog for PreferencesDialog {
267240
redirect.method.to_string(),
268241
))
269242
}
243+
if r.redirect
244+
.as_ref()
245+
.is_some_and(|this| this.is_external(r).is_some_and(|v| v))
246+
{
247+
a.add_suffix(&suffix("application-exit", "External redirect"))
248+
}
270249
// calculate total redirections time in ms
271250
let c = r.event.last().unwrap().time();
272251
a.set_subtitle(&if i == 0 {

0 commit comments

Comments
 (0)