From c5ddf11dbda95c42023b7549be01b5ef29d711f5 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 11 Dec 2023 10:28:39 +0100 Subject: [PATCH] add address in new tab, #426 --- lang/de.yaml | 1 + src/View/Graph.elm | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/lang/de.yaml b/lang/de.yaml index 77d76c8d..5b2e2029 100644 --- a/lang/de.yaml +++ b/lang/de.yaml @@ -332,3 +332,4 @@ Start a new investigation: Starte eine neue Nachforschung or: oder Load graph from .gs file: Eine bestehende .gs Datei laden try an example: Beispiele +open in new tab: In neuem Tab öffnen diff --git a/src/View/Graph.elm b/src/View/Graph.elm index a5247f2d..10f3490d 100644 --- a/src/View/Graph.elm +++ b/src/View/Graph.elm @@ -21,6 +21,8 @@ import Model.Graph.Layer as Layer exposing (Layer) import Msg.Graph exposing (Msg(..)) import Plugin.Model exposing (ModelState) import Plugin.View as Plugin exposing (Plugins) +import Route +import Route.Graph import Svg.Styled exposing (..) import Svg.Styled.Attributes as Svg exposing (..) import Svg.Styled.Events as Svg exposing (..) @@ -375,6 +377,16 @@ contextMenu plugins states vc model cm = |> optionWithIcon "Annotate address" FontAwesome.userTag , UserClickedRemoveAddress address.id |> optionWithIcon "Remove from graph" FontAwesome.eraser + , Route.Graph.addressRoute + { currency = address.address.currency + , address = address.address.address + , layer = Nothing + , table = Nothing + } + |> Route.graphRoute + |> Route.toUrl + |> UserClickedExternalLink + |> optionWithIcon "Open in new tab" FontAwesome.externalLinkAlt ] ++ contextMenuRule vc ++ addBlockExplorerLinks address.address.currency address.address.address