Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add info icon to tooltips #794

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import Icon from "../misccomponents/Icon.svelte";
import { htmlHintRules, customHtmlHintRules } from "../../../../docker/rules.js";
import LoadingCircle from "../misccomponents/LoadingCircle.svelte";
import { tooltip } from '../misccomponents/tooltip';

export let errors = [];
export let codeIssues = [];
Expand Down Expand Up @@ -136,7 +137,7 @@
<tr>
<th class="w-2/12 px-4 py-2">Page ({error.pages.length})</th>
<th class="w-9/12 px-4 py-2">Locations (line:col)</th>
<th class="w-1/12 px-4 py-2">Ignore</th>
<th class="w-1/12 px-4 py-2" title="Ignore URL for this rule in future scans" use:tooltip>Ignore</th>
</tr>
</thead>
<tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import { createEventDispatcher } from "svelte";
import Icon from "../misccomponents/Icon.svelte";
import LoadingCircle from "../misccomponents/LoadingCircle.svelte";
import { tooltip } from '../misccomponents/tooltip';

export let errors = [];
export let codeIssues = [];
Expand Down Expand Up @@ -115,7 +116,7 @@
Issues ({Object.keys(url.errors).length})
</th>
<th class="w-9/12 px-4 py-2">Locations</th>
<th class="w-1/12 px-4 py-2">Ignore</th>
<th class="w-1/12 px-4 py-2" title="Ignore rule on this URL in future scans" use:tooltip>Ignore</th>
</tr>
</thead>
<tbody>
Expand Down
31 changes: 16 additions & 15 deletions ui/src/components/misccomponents/TooltipFromAction.svelte
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
<script>
export let title;
export let x;
export let y;
export let title;
export let x;
export let y;
</script>
<div style="
top: {y + 5}px;
left: {x + 5}px;">{title}</div>

<div style="top: {y + 5}px; left: {x + 5}px;">
<i class="fa-solid fa-circle-info text-blue-600"></i> {title}
</div>

<style>
div {
border: 1px solid #ddd;
box-shadow: 1px 1px 1px #ddd;
background: white;
border-radius: 4px;
padding: 4px;
position: absolute;
}
</style>
div {
border: 1px solid #ddd;
box-shadow: 1px 1px 1px #ddd;
background: white;
border-radius: 4px;
padding: 4px;
position: absolute;
}
</style>
Loading