mirror of
https://github.com/jlengrand/bugsink.git
synced 2026-03-10 08:01:17 +00:00
show raise/show in-app jump-to-location
TODO: when multiple buttons are pressed in quick succession, the transitions may create some race-condition
This commit is contained in:
@@ -30,6 +30,9 @@
|
||||
{% with frame=frame|pygmentize %}
|
||||
|
||||
<div class="bg-white w-full font-mono"> {# per frame div #}
|
||||
{% if frame.raise_point %}<a name="raise"/>{% endif %}
|
||||
{% if frame.in_app %}<a name="in-app"/>{% endif %}
|
||||
{% if forloop.first and forloop.parentloop.first %}<a name="topp"/>{% endif %}
|
||||
|
||||
<div class="flex pl-4 pt-2 pb-2 border-b-2 {% if forloop.first %}border-t-2{% endif %} bg-slate-100 border-slate-400 cursor-pointer" onclick="toggleFrameVisibility(this)"> {# per frame header div #}
|
||||
|
||||
|
||||
@@ -117,6 +117,9 @@ function showInAppFrames() {
|
||||
frameDetails.parentNode.querySelector(".js-chevron").classList.remove("rotate-180");
|
||||
}
|
||||
});
|
||||
// this works because when there are repeated anchors a browser will just jump to the first one.
|
||||
// the less lazy way would be to just have a single such anchor
|
||||
window.location = window.location.origin + window.location.pathname + '#in-app';
|
||||
}
|
||||
|
||||
function showRaisingFrame() {
|
||||
@@ -129,6 +132,7 @@ function showRaisingFrame() {
|
||||
frameDetails.parentNode.querySelector(".js-chevron").classList.remove("rotate-180");
|
||||
}
|
||||
});
|
||||
window.location = window.location.origin + window.location.pathname + '#raise';
|
||||
}
|
||||
|
||||
function hideAllFrames() {
|
||||
|
||||
Reference in New Issue
Block a user