mirror of
https://github.com/logos-storage/logos-storage-installer.git
synced 2026-01-03 22:13:07 +00:00
wip
This commit is contained in:
parent
367b889055
commit
cf66b4ec8e
@ -28,39 +28,18 @@ export class MainMenu {
|
|||||||
};
|
};
|
||||||
|
|
||||||
promptMainMenu = async () => {
|
promptMainMenu = async () => {
|
||||||
if ((await this.processControl.getNumberOfCodexProcesses()) > 0) {
|
await this.ui.askMultipleChoice("Select an option", [
|
||||||
await this.showRunningMenu();
|
|
||||||
} else {
|
|
||||||
if (await this.installer.isCodexInstalled()) {
|
|
||||||
await this.showNotRunningMenu();
|
|
||||||
} else {
|
|
||||||
await this.showNotInstalledMenu();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
showNotInstalledMenu = async () => {
|
|
||||||
await this.ui.askMultipleChoice("Codex is not installed", [
|
|
||||||
{
|
{
|
||||||
label: "Install Codex",
|
label: "Download and install Codex",
|
||||||
action: this.installMenu.show,
|
action: this.installMenu.show,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Exit",
|
label: "Start Codex node",
|
||||||
action: this.loop.stopLoop,
|
action: this.startCodex,
|
||||||
},
|
|
||||||
]);
|
|
||||||
};
|
|
||||||
|
|
||||||
showRunningMenu = async () => {
|
|
||||||
await this.ui.askMultipleChoice("Codex is running", [
|
|
||||||
{
|
|
||||||
label: "Open Codex app",
|
|
||||||
action: this.codexApp.openCodexApp,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Stop Codex",
|
label: "Check node status",
|
||||||
action: this.stopCodex,
|
action: this.dataMenu.showNodeStatus,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Upload a file",
|
label: "Upload a file",
|
||||||
@ -71,26 +50,21 @@ export class MainMenu {
|
|||||||
action: this.dataMenu.performDownload,
|
action: this.dataMenu.performDownload,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Exit (Codex keeps running)",
|
label: "Show local data",
|
||||||
action: this.loop.stopLoop,
|
action: this.dataMenu.showLocalData,
|
||||||
},
|
|
||||||
]);
|
|
||||||
};
|
|
||||||
|
|
||||||
showNotRunningMenu = async () => {
|
|
||||||
await this.ui.askMultipleChoice("Codex is installed but not running", [
|
|
||||||
{
|
|
||||||
label: "Start Codex",
|
|
||||||
action: this.startCodex,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Edit Codex config",
|
label: "Stop Codex node",
|
||||||
action: this.configMenu.show,
|
action: this.stopCodex,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Uninstall Codex",
|
label: "Uninstall Codex node",
|
||||||
action: this.installMenu.show,
|
action: this.installMenu.show,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "Submit feedback",
|
||||||
|
action: ,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "Exit",
|
label: "Exit",
|
||||||
action: this.loop.stopLoop,
|
action: this.loop.stopLoop,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user