1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2020-11-13 09:30:04 +02:00
parent 6d0c07b3d1
commit e6fe8f6643

View File

@ -1,6 +1,5 @@
import type { InstalledExtension } from "./extension-manager";
import { action, observable, reaction } from "mobx";
import { compile } from "path-to-regexp"
import logger from "../main/logger";
export type LensExtensionId = string; // path to manifest (package.json)
@ -44,15 +43,6 @@ export class LensExtension {
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
async enable() {
if (this.isEnabled) return;