Skip to content

Commit f46a4cd

Browse files
Added menu item to edit author field.
1 parent 7726b6d commit f46a4cd

3 files changed

Lines changed: 20 additions & 3 deletions

File tree

gui-js/apps/minsky-electron/src/app/managers/ApplicationMenuManager.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {
1+
import {
22
Functions,
33
importCSVvariableName,
44
InstallCase,
@@ -368,6 +368,18 @@ export class ApplicationMenuManager {
368368
label: 'Group selection',
369369
async click() {minsky.canvas.groupSelection();},
370370
},
371+
{
372+
label: 'Author',
373+
async click() {
374+
let author=encodeURIComponent(await minsky.author());
375+
WindowManager.createPopupWindowWithRouting({
376+
width: 400,
377+
height: 80,
378+
title: 'Author',
379+
url: `#/headless/menu/edit/author?author=${author}`,
380+
});
381+
},
382+
},
371383
{
372384
label: 'Dimensions',
373385
click() {

gui-js/libs/menu/src/lib/edit/edit-routing.module.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
import { NgModule } from '@angular/core';
22
import { RouterModule, Routes } from '@angular/router';
33
import { DimensionsComponent } from './dimensions/dimensions.component';
4+
import {AuthorComponent } from './author/author';
45

5-
const routes: Routes = [{ path: 'dimensions', component: DimensionsComponent }];
6+
const routes: Routes = [
7+
{ path: 'author', component: AuthorComponent },
8+
{ path: 'dimensions', component: DimensionsComponent },
9+
];
610

711
@NgModule({
812
imports: [RouterModule.forChild(routes)],
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import { CommonModule } from '@angular/common';
22
import { NgModule } from '@angular/core';
3+
import {AuthorComponent } from './author/author';
34
import { DimensionsComponent } from './dimensions/dimensions.component';
45
import { EditRoutingModule } from './edit-routing.module';
56

67
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
78

89
@NgModule({
9-
imports: [CommonModule, EditRoutingModule, FormsModule, ReactiveFormsModule, DimensionsComponent],
10+
imports: [CommonModule, EditRoutingModule, FormsModule, ReactiveFormsModule, AuthorComponent, DimensionsComponent],
1011
})
1112
export class EditModule {}

0 commit comments

Comments
 (0)