From 55a4eb35d85901eeaa976abd065653764de8ebcf Mon Sep 17 00:00:00 2001 From: Dannie Hansen Date: Mon, 11 Mar 2024 22:53:42 +0100 Subject: [PATCH] Possible fix for svg icons --- src/capabilities/board-buttons/index.ts | 6 +++--- src/capabilities/card-back-section/index.ts | 4 ++-- src/capabilities/card-badges/index.ts | 8 ++++---- src/capabilities/card-buttons/index.ts | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/capabilities/board-buttons/index.ts b/src/capabilities/board-buttons/index.ts index 973015c..b38e7f6 100644 --- a/src/capabilities/board-buttons/index.ts +++ b/src/capabilities/board-buttons/index.ts @@ -1,5 +1,5 @@ import { Trello } from '../../types/trello'; -import ClockImageWhite from '../../assets/images/clock_white.svg?url'; +import ClockImageWhite from '../../assets/images/clock_white.svg'; import { clearToken, getMemberId } from '../../components/trello'; import { isVisible } from '../../utils/visibility'; import { Card } from '../../components/card'; @@ -16,8 +16,8 @@ export async function getBoardButtons(): Promise< return [ { icon: { - light: `${window.location.origin}${ClockImageWhite}`, - dark: `${window.location.origin}${ClockImageWhite}` + light: ClockImageWhite, + dark: ClockImageWhite }, text: 'Activity timer', callback: async (t) => { diff --git a/src/capabilities/card-back-section/index.ts b/src/capabilities/card-back-section/index.ts index a886406..43afb0d 100644 --- a/src/capabilities/card-back-section/index.ts +++ b/src/capabilities/card-back-section/index.ts @@ -1,12 +1,12 @@ import { Trello } from '../../types/trello'; -import ClockImageBlack from '../../assets/images/clock_black.svg?url'; +import ClockImageBlack from '../../assets/images/clock_black.svg'; export async function getCardBackSection( t: Trello.PowerUp.IFrame ): Promise { return { title: 'Activity timer', - icon: `${window.location.origin}${ClockImageBlack}`, + icon: ClockImageBlack, content: { type: 'iframe', url: t.signUrl('./index.html', { diff --git a/src/capabilities/card-badges/index.ts b/src/capabilities/card-badges/index.ts index c35d6c0..016207e 100644 --- a/src/capabilities/card-badges/index.ts +++ b/src/capabilities/card-badges/index.ts @@ -1,6 +1,6 @@ import { Trello } from '../../types/trello'; -import EstimateImage from '../../assets/images/estimate.svg?url'; -import ClockImageBlack from '../../assets/images/clock_black.svg?url'; +import EstimateImage from '../../assets/images/estimate.svg'; +import ClockImageBlack from '../../assets/images/clock_black.svg'; import { Card } from '../../components/card'; import { formatTime } from '../../utils/formatting'; import { @@ -19,8 +19,8 @@ import { import { isVisible } from '../../utils/visibility'; import { hasAutoTimer } from '../../utils/auto-timer'; -const clockIcon = `${window.location.origin}${ClockImageBlack}`; -const estimateImage = `${window.location.origin}${EstimateImage}`; +const clockIcon = ClockImageBlack; +const estimateImage = EstimateImage; export async function getCardBadges( t: Trello.PowerUp.IFrame diff --git a/src/capabilities/card-buttons/index.ts b/src/capabilities/card-buttons/index.ts index 4c48680..4d1eaac 100644 --- a/src/capabilities/card-buttons/index.ts +++ b/src/capabilities/card-buttons/index.ts @@ -1,12 +1,12 @@ import { Trello } from '../../types/trello'; -import ClockImageBlack from '../../assets/images/clock_black.svg?url'; +import ClockImageBlack from '../../assets/images/clock_black.svg'; import { manageTimeCallback } from './callbacks/ManageTime'; import { notificationsCallback } from './callbacks/Notifications'; import { settingsCallback } from './callbacks/Settings'; import { timeSpentCallback } from './callbacks/TimeSpent'; import { isVisible } from '../../utils/visibility'; -const icon = `${window.location.origin}${ClockImageBlack}`; +const icon = ClockImageBlack; export async function getCardButtons(): Promise { const visible = await isVisible();