Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use info as default instead of overview #119

Merged
merged 1 commit into from
Sep 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/js/components/package.info.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class PackageInfo {
}

enableNavigation(name) {
const div = this.menus.get(name);
const div = this.menus.has(name) ? this.menus.get(name) : this.menus.get("info");

const isActive = div.classList.contains("active");
const isDisabled = div.classList.contains("disabled");
Expand Down
4 changes: 3 additions & 1 deletion public/js/components/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import { getJSON } from "@nodesecure/vis-network";

export class Settings {
static defaultMenuName = "info";

constructor() {
this.saveEnabled = false;
this.dom = {
Expand Down Expand Up @@ -49,7 +51,7 @@ export class Settings {
}

const newConfig = {
defaultPackageMenu: this.dom.defaultPackageMenu.value,
defaultPackageMenu: this.dom.defaultPackageMenu.value || Settings.defaultMenuName,
ignore: { flags: [], warnings: [] }
};

Expand Down
2 changes: 1 addition & 1 deletion src/http-server/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export async function get() {
}
catch (error) {
const defaultValue = {
defaultPackageMenu: "overview",
defaultPackageMenu: "info",
ignore: { flags: [], warnings: [] }
};

Expand Down