diff --git a/package.json b/package.json index 94d8a96..96978e8 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,6 @@ "@microsoft/microsoft-graph-types": "^2.11.0", "@types/chai": "^4.2.22", "@types/chai-as-promised": "^7.1.4", - "@types/feather-icons": "^4.7.0", "@types/jsdom": "^16.2.13", "@types/lodash": "^4.14.178", "@types/mime-types": "^2.1.1", @@ -69,11 +68,11 @@ "codemirror": "^5.63.1", "crypto-browserify": "^3.12.0", "dropbox": "^10.22.0", - "feather-icons": "^4.28.0", "http-status-codes": "^2.2.0", "localforage": "^1.10.0", "lodash": "^4.17.21", "loglevel": "^1.8.0", + "lucide": "^0.17.12", "mime-types": "^2.1.33", "mustache": "^4.2.0", "nanoid": "^3.1.30", diff --git a/src/main.ts b/src/main.ts index 88855f2..97b54cd 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,7 +1,7 @@ import { Modal, Notice, Plugin, Setting, addIcon, setIcon } from "obsidian"; import cloneDeep from "lodash/cloneDeep"; import { nanoid } from "nanoid"; -import feather from "feather-icons"; +import { createElement, RotateCcw, RefreshCcw } from "lucide"; import type { RemotelySavePluginSettings } from "./baseTypes"; import { COMMAND_CALLBACK, @@ -76,14 +76,13 @@ type SyncTriggerSourceType = "manual" | "auto" | "dry" | "autoOnceInit"; const iconNameSyncWait = `remotely-save-sync-wait`; const iconNameSyncRunning = `remotely-save-sync-running`; -const iconSvgSyncWait = feather.icons["rotate-ccw"].toSvg({ - width: 100, - height: 100, -}); -const iconSvgSyncRunning = feather.icons["refresh-ccw"].toSvg({ - width: 100, - height: 100, -}); + +const iconSvgSyncWait = createElement(RotateCcw); +iconSvgSyncWait.setAttribute("width", "100"); +iconSvgSyncWait.setAttribute("height", "100"); +const iconSvgSyncRunning = createElement(RefreshCcw); +iconSvgSyncRunning.setAttribute("width", "100"); +iconSvgSyncRunning.setAttribute("height", "100"); export default class RemotelySavePlugin extends Plugin { settings: RemotelySavePluginSettings; @@ -345,8 +344,8 @@ export default class RemotelySavePlugin extends Plugin { async onload() { log.info(`loading plugin ${this.manifest.id}`); - addIcon(iconNameSyncWait, iconSvgSyncWait); - addIcon(iconNameSyncRunning, iconSvgSyncRunning); + addIcon(iconNameSyncWait, iconSvgSyncWait.outerHTML); + addIcon(iconNameSyncRunning, iconSvgSyncRunning.outerHTML); this.oauth2Info = { verifier: "",