use feather icon
This commit is contained in:
parent
4035218706
commit
a78a2a88cf
@ -25,6 +25,7 @@
|
|||||||
"@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",
|
||||||
@ -61,6 +62,7 @@
|
|||||||
"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",
|
||||||
"localforage": "^1.10.0",
|
"localforage": "^1.10.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"loglevel": "^1.8.0",
|
"loglevel": "^1.8.0",
|
||||||
|
|||||||
16
src/main.ts
16
src/main.ts
@ -1,6 +1,7 @@
|
|||||||
import { Modal, Notice, Plugin, Setting } from "obsidian";
|
import { Modal, Notice, Plugin, Setting, addIcon } 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 type { RemotelySavePluginSettings } from "./baseTypes";
|
import type { RemotelySavePluginSettings } from "./baseTypes";
|
||||||
import {
|
import {
|
||||||
COMMAND_CALLBACK,
|
COMMAND_CALLBACK,
|
||||||
@ -71,6 +72,17 @@ export default class RemotelySavePlugin extends Plugin {
|
|||||||
async onload() {
|
async onload() {
|
||||||
log.info(`loading plugin ${this.manifest.id}`);
|
log.info(`loading plugin ${this.manifest.id}`);
|
||||||
|
|
||||||
|
const iconNameSyncWait = `${this.manifest.id}-sync-wait`;
|
||||||
|
const iconNameSyncRunning = `${this.manifest.id}-sync-running`;
|
||||||
|
addIcon(
|
||||||
|
iconNameSyncWait,
|
||||||
|
feather.icons["rotate-ccw"].toSvg({ width: 100, height: 100 })
|
||||||
|
);
|
||||||
|
addIcon(
|
||||||
|
iconNameSyncRunning,
|
||||||
|
feather.icons["refresh-ccw"].toSvg({ width: 100, height: 100 })
|
||||||
|
);
|
||||||
|
|
||||||
this.oauth2Info = {
|
this.oauth2Info = {
|
||||||
verifier: "",
|
verifier: "",
|
||||||
helperModal: undefined,
|
helperModal: undefined,
|
||||||
@ -292,7 +304,7 @@ export default class RemotelySavePlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
this.addRibbonIcon("switch", "Remotely Save", async () => {
|
this.addRibbonIcon(iconNameSyncWait, "Remotely Save", async () => {
|
||||||
if (this.syncStatus !== "idle") {
|
if (this.syncStatus !== "idle") {
|
||||||
new Notice(
|
new Notice(
|
||||||
`Remotely Save already running in stage ${this.syncStatus}!`
|
`Remotely Save already running in stage ${this.syncStatus}!`
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user