mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
cleanup
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
6d0c07b3d1
commit
e6fe8f6643
@ -1,6 +1,5 @@
|
|||||||
import type { InstalledExtension } from "./extension-manager";
|
import type { InstalledExtension } from "./extension-manager";
|
||||||
import { action, observable, reaction } from "mobx";
|
import { action, observable, reaction } from "mobx";
|
||||||
import { compile } from "path-to-regexp"
|
|
||||||
import logger from "../main/logger";
|
import logger from "../main/logger";
|
||||||
|
|
||||||
export type LensExtensionId = string; // path to manifest (package.json)
|
export type LensExtensionId = string; // path to manifest (package.json)
|
||||||
@ -44,15 +43,6 @@ export class LensExtension {
|
|||||||
return this.manifest.description
|
return this.manifest.description
|
||||||
}
|
}
|
||||||
|
|
||||||
getPageUrl(baseUrl = "") {
|
|
||||||
const validUrlName = this.name.replace("@", "").replace("/", "-");
|
|
||||||
return compile(this.routePrefix)({ name: validUrlName }) + baseUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
getPageRoute(baseRoute = "") {
|
|
||||||
return this.getPageUrl() + baseRoute;
|
|
||||||
}
|
|
||||||
|
|
||||||
@action
|
@action
|
||||||
async enable() {
|
async enable() {
|
||||||
if (this.isEnabled) return;
|
if (this.isEnabled) return;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user