Skip to content

Commit

Permalink
Import fontawesome icon classes
Browse files Browse the repository at this point in the history
  • Loading branch information
guerler committed Nov 15, 2023
1 parent 49c9be6 commit a96a381
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions client/src/components/Grid/configs/visualizations.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { faCopy, faEdit, faEye, faShareAlt, faTrash, faTrashRestore } from "@fortawesome/free-solid-svg-icons";
import axios from "axios";
import type Router from "vue-router";

Expand Down Expand Up @@ -68,23 +69,23 @@ const fields = [
operations: [
{
title: "Open",
icon: "eye",
icon: faEye,
condition: (data: VisualizationEntry) => !data.deleted,
handler: (data: VisualizationEntry) => {
window.location.href = withPrefix(`/plugins/visualizations/${data.type}/saved?id=${data.id}`);
},
},
{
title: "Edit Attributes",
icon: "edit",
icon: faEdit,
condition: (data: VisualizationEntry) => !data.deleted,
handler: (data: VisualizationEntry, router: Router) => {
router.push(`/visualizations/edit?id=${data.id}`);
},
},
{
title: "Copy",
icon: "copy",
icon: faCopy,
condition: (data: VisualizationEntry) => !data.deleted,
handler: async (data: VisualizationEntry) => {
try {
Expand All @@ -110,15 +111,15 @@ const fields = [
},
{
title: "Share and Publish",
icon: "share-alt",
icon: faShareAlt,
condition: (data: VisualizationEntry) => !data.deleted,
handler: (data: VisualizationEntry, router: Router) => {
router.push(`/visualizations/sharing?id=${data.id}`);
},
},
{
title: "Delete",
icon: "trash",
icon: faTrash,
condition: (data: VisualizationEntry) => !data.deleted,
handler: async (data: VisualizationEntry) => {
try {
Expand All @@ -137,7 +138,7 @@ const fields = [
},
{
title: "Restore",
icon: "trash-restore",
icon: faTrashRestore,
condition: (data: VisualizationEntry) => data.deleted,
handler: async (data: VisualizationEntry) => {
try {
Expand Down

0 comments on commit a96a381

Please sign in to comment.