From a1fe7d01e4561e2eda229d9f2d117cdc970a55e7 Mon Sep 17 00:00:00 2001 From: David Cruciani Date: Mon, 16 May 2022 11:16:25 +0200 Subject: [PATCH] fix: [tracker] UI for other than typosquat --- .../modules/hunter/templates/showTracker.html | 60 ++++++++++--------- .../hunter/templates/trackersManagement.html | 20 +++++-- 2 files changed, 46 insertions(+), 34 deletions(-) diff --git a/var/www/modules/hunter/templates/showTracker.html b/var/www/modules/hunter/templates/showTracker.html index fef0e808..ca6eb2bc 100644 --- a/var/www/modules/hunter/templates/showTracker.html +++ b/var/www/modules/hunter/templates/showTracker.html @@ -67,40 +67,44 @@
  • - +
    - - - - - - - - - {% if tracker_metadata['webhook'] %} - - {% endif %} - - - + + + + + + + + + {% if tracker_metadata['webhook'] %} + + {% endif %} + + + - + + {% else %} + + {% endif %}
    TypeTrackerDate addedAccess LevelCreated byFirst seenLast seenWebhookTags Email
    TypeTrackerDate addedAccess LevelCreated byFirst seenLast seenWebhookTags Email
    {{ tracker_metadata['type'] }} - -
    -
    - {{ tracker_metadata['tracker'] }} + {% if tracker_metadata['type'] == 'typosquat' %} +
    + +
    +
    + {{ tracker_metadata['tracker'] }} +
    - -
    {{ tracker_metadata['tracker'] }}{{ tracker_metadata['date'][0:4] }}/{{ tracker_metadata['date'][4:6] }}/{{ tracker_metadata['date'][6:8] }} {% if tracker_metadata['level'] == 0 %} diff --git a/var/www/modules/hunter/templates/trackersManagement.html b/var/www/modules/hunter/templates/trackersManagement.html index 999093ba..09e19994 100644 --- a/var/www/modules/hunter/templates/trackersManagement.html +++ b/var/www/modules/hunter/templates/trackersManagement.html @@ -70,10 +70,14 @@ {% if dict_uuid['term'] %} - {% if dict_uuid['term']|length > 100 %} - {{ dict_uuid['term'][0:100] }}... + {% if dict_uuid['term']|length > 2000 %} + {{ dict_uuid['term'][0:50] }}... {% else %} - {{ dict_uuid['term'] }} + {% if dict_uuid['term']|length > 100 %} + {{ dict_uuid['term'][0:100] }}... + {% else %} + {{ dict_uuid['term'] }} + {% endif %} {% endif %} {% endif %} @@ -135,10 +139,14 @@ {% if dict_uuid['term'] %} - {% if dict_uuid['term']|length > 100 %} - {{ dict_uuid['term'][0:100] }}... + {% if dict_uuid['term']|length > 2000 %} + {{ dict_uuid['term'][0:50] }}... {% else %} - {{ dict_uuid['term'] }} + {% if dict_uuid['term']|length > 100 %} + {{ dict_uuid['term'][0:100] }}... + {% else %} + {{ dict_uuid['term'] }} + {% endif %} {% endif %} {% endif %}