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

feat: update design #528

Merged
merged 7 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from 4 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
Binary file modified doc/img/overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions e2e/home-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export class HomePage {

constructor(page: Page) {
this.page = page
this.urlBtn = page.getByRole("button", { name: "URL" })
this.fileBtn = page.getByRole("button", { name: "File" })
this.urlBtn = page.getByRole("button", { name: "Get file from URL" })
this.fileBtn = page.getByRole("button", { name: "Upload a File" })
}

async goto(urlQueryParam?: string) {
Expand Down Expand Up @@ -87,7 +87,7 @@ export class HomePage {
}

async setSeverityFilter(severity: string) {
await this.page.getByRole("tab", { name: severity }).click()
await this.page.getByRole("button", { name: severity }).click()
}

async checkAllResults() {
Expand Down
Binary file modified public/favicon.ico
Binary file not shown.
Binary file removed public/logo.png
Binary file not shown.
53 changes: 53 additions & 0 deletions public/logo_bright_bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions public/logo_dark_bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 12 additions & 6 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
</div>

<v-app-bar app color="primary" dark>
<template v-slot:prepend>
<img class="icon" src="/logo_dark_bg.svg" alt="" />
</template>
<v-app-bar-title>Trivy Vulnerability Explorer</v-app-bar-title>
</v-app-bar>

Expand All @@ -18,11 +21,14 @@
</v-app>
</template>

<script lang="ts" setup>
//
</script>
<script lang="ts" setup></script>

<style scoped>
img.icon {
width: 30px;
margin-left: 0.5rem;
}

#forkongithub a {
background: #000;
color: #fff;
Expand All @@ -33,7 +39,7 @@
padding: 5px 40px;
font-size: 1rem;
line-height: 2rem;
position: relative;
position: fixed;
transition: 0.5s;
}

Expand Down Expand Up @@ -61,7 +67,7 @@

@media screen and (min-width: 800px) {
#forkongithub {
position: absolute;
position: fixed;
display: block;
top: 0;
right: 0;
Expand All @@ -73,7 +79,7 @@

#forkongithub a {
width: 240px;
position: absolute;
position: fixed;
top: 50px;
right: -50px;
transform: rotate(45deg);
Expand Down
Binary file removed src/assets/logo.png
Binary file not shown.
6 changes: 0 additions & 6 deletions src/assets/logo.svg

This file was deleted.

67 changes: 34 additions & 33 deletions src/components/DataInput.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
<template>
<v-toolbar class="mt-3" color="white" elevation="1">
<v-btn-toggle
v-model="reportSource"
mandatory
color="primary"
variant="outlined"
class="mx-3"
<v-btn-toggle
v-model="reportSource"
mandatory
rounded="pill"
color="primary"
variant="outlined"
class="mb-6"
>
<v-btn :value="ReportSource.File" prepend-icon="mdi-file-upload"
>Upload a File</v-btn
>
<v-btn :value="ReportSource.File">File</v-btn>
<v-btn :value="ReportSource.Url">URL</v-btn>
</v-btn-toggle>

<v-btn :value="ReportSource.Url" prepend-icon="mdi-link"
>Get File from URL</v-btn
>
</v-btn-toggle>
<v-container>
<v-file-upload
v-if="reportSource === ReportSource.File"
density="compact"
Expand All @@ -22,28 +26,25 @@
color="#f2f2f2"
@update:model-value="handleFileUpload($event)"
/>

<ReportUrlFetcher
:onNewReport="onNewReportFromUrl"
v-if="reportSource === ReportSource.Url"
:presetUrl="presetUrl"
/>

<v-autocomplete
v-model="selectedTarget"
clearable
:disabled="vulnerabilityReport.length === 0"
:items="vulnerabilityReport"
item-title="Target"
item-value="Target"
:label="
vulnerabilityReport.length === 0
? 'No targets available'
: 'Select Target'
"
hide-details
/>
</v-toolbar>
</v-container>

<ReportUrlFetcher
:onNewReport="onNewReportFromUrl"
v-if="reportSource === ReportSource.Url"
:presetUrl="presetUrl"
/>

<v-autocomplete
v-model="selectedTarget"
clearable
v-if="vulnerabilityReport.length > 1"
:items="vulnerabilityReport"
item-title="Target"
item-value="Target"
label="Select Target"
hide-details
class="mt-8"
/>

<v-alert
v-if="reportError"
Expand Down
Loading
Loading