reduce size by using lucide not feather-icons
This commit is contained in:
parent
51f6d600a6
commit
1cd02913bb
@ -26,7 +26,6 @@
|
|||||||
"@microsoft/microsoft-graph-types": "^2.11.0",
|
"@microsoft/microsoft-graph-types": "^2.11.0",
|
||||||
"@types/chai": "^4.2.22",
|
"@types/chai": "^4.2.22",
|
||||||
"@types/chai-as-promised": "^7.1.4",
|
"@types/chai-as-promised": "^7.1.4",
|
||||||
"@types/feather-icons": "^4.7.0",
|
|
||||||
"@types/jsdom": "^16.2.13",
|
"@types/jsdom": "^16.2.13",
|
||||||
"@types/lodash": "^4.14.178",
|
"@types/lodash": "^4.14.178",
|
||||||
"@types/mime-types": "^2.1.1",
|
"@types/mime-types": "^2.1.1",
|
||||||
@ -69,11 +68,11 @@
|
|||||||
"codemirror": "^5.63.1",
|
"codemirror": "^5.63.1",
|
||||||
"crypto-browserify": "^3.12.0",
|
"crypto-browserify": "^3.12.0",
|
||||||
"dropbox": "^10.22.0",
|
"dropbox": "^10.22.0",
|
||||||
"feather-icons": "^4.28.0",
|
|
||||||
"http-status-codes": "^2.2.0",
|
"http-status-codes": "^2.2.0",
|
||||||
"localforage": "^1.10.0",
|
"localforage": "^1.10.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"loglevel": "^1.8.0",
|
"loglevel": "^1.8.0",
|
||||||
|
"lucide": "^0.17.12",
|
||||||
"mime-types": "^2.1.33",
|
"mime-types": "^2.1.33",
|
||||||
"mustache": "^4.2.0",
|
"mustache": "^4.2.0",
|
||||||
"nanoid": "^3.1.30",
|
"nanoid": "^3.1.30",
|
||||||
|
|||||||
21
src/main.ts
21
src/main.ts
@ -1,7 +1,7 @@
|
|||||||
import { Modal, Notice, Plugin, Setting, addIcon, setIcon } from "obsidian";
|
import { Modal, Notice, Plugin, Setting, addIcon, setIcon } from "obsidian";
|
||||||
import cloneDeep from "lodash/cloneDeep";
|
import cloneDeep from "lodash/cloneDeep";
|
||||||
import { nanoid } from "nanoid";
|
import { nanoid } from "nanoid";
|
||||||
import feather from "feather-icons";
|
import { createElement, RotateCcw, RefreshCcw } from "lucide";
|
||||||
import type { RemotelySavePluginSettings } from "./baseTypes";
|
import type { RemotelySavePluginSettings } from "./baseTypes";
|
||||||
import {
|
import {
|
||||||
COMMAND_CALLBACK,
|
COMMAND_CALLBACK,
|
||||||
@ -76,14 +76,13 @@ type SyncTriggerSourceType = "manual" | "auto" | "dry" | "autoOnceInit";
|
|||||||
|
|
||||||
const iconNameSyncWait = `remotely-save-sync-wait`;
|
const iconNameSyncWait = `remotely-save-sync-wait`;
|
||||||
const iconNameSyncRunning = `remotely-save-sync-running`;
|
const iconNameSyncRunning = `remotely-save-sync-running`;
|
||||||
const iconSvgSyncWait = feather.icons["rotate-ccw"].toSvg({
|
|
||||||
width: 100,
|
const iconSvgSyncWait = createElement(RotateCcw);
|
||||||
height: 100,
|
iconSvgSyncWait.setAttribute("width", "100");
|
||||||
});
|
iconSvgSyncWait.setAttribute("height", "100");
|
||||||
const iconSvgSyncRunning = feather.icons["refresh-ccw"].toSvg({
|
const iconSvgSyncRunning = createElement(RefreshCcw);
|
||||||
width: 100,
|
iconSvgSyncRunning.setAttribute("width", "100");
|
||||||
height: 100,
|
iconSvgSyncRunning.setAttribute("height", "100");
|
||||||
});
|
|
||||||
|
|
||||||
export default class RemotelySavePlugin extends Plugin {
|
export default class RemotelySavePlugin extends Plugin {
|
||||||
settings: RemotelySavePluginSettings;
|
settings: RemotelySavePluginSettings;
|
||||||
@ -345,8 +344,8 @@ export default class RemotelySavePlugin extends Plugin {
|
|||||||
async onload() {
|
async onload() {
|
||||||
log.info(`loading plugin ${this.manifest.id}`);
|
log.info(`loading plugin ${this.manifest.id}`);
|
||||||
|
|
||||||
addIcon(iconNameSyncWait, iconSvgSyncWait);
|
addIcon(iconNameSyncWait, iconSvgSyncWait.outerHTML);
|
||||||
addIcon(iconNameSyncRunning, iconSvgSyncRunning);
|
addIcon(iconNameSyncRunning, iconSvgSyncRunning.outerHTML);
|
||||||
|
|
||||||
this.oauth2Info = {
|
this.oauth2Info = {
|
||||||
verifier: "",
|
verifier: "",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user