{
- props.store.getSender().send({
- type: MessageType.OpenExternalURL,
- id: uuid.v4(),
- payload: 'https://github.com/meetalva/alva/labels/type%3A%20bug'
- });
- }}
- onDoubleClick={event => {
- event.stopPropagation();
- }}
- />
+
+ {
+ props.store.getSender().send({
+ type: MessageType.OpenExternalURL,
+ id: uuid.v4(),
+ payload: 'https://github.com/meetalva/alva/labels/type%3A%20bug'
+ });
+ }}
+ onDoubleClick={event => {
+ event.stopPropagation();
+ }}
+ />
+
+ }
+ onClick={() => {
+ props.store.getSender().send({
+ id: uuid.v4(),
+ type: MessageType.ExportHtmlProject,
+ payload: { path: undefined }
+ });
+ }}
+ onDoubleClick={event => {
+ event.stopPropagation();
+ }}
+ />
+
{props.children}
);
diff --git a/src/container/element-list/element-list.tsx b/src/container/element-list/element-list.tsx
index bf90d0de1..064cb1f1d 100644
--- a/src/container/element-list/element-list.tsx
+++ b/src/container/element-list/element-list.tsx
@@ -10,6 +10,8 @@ import * as Store from '../../store';
import * as Types from '../../types';
import * as utils from '../../alva-util';
+import { Images } from '../../components/icons';
+
@MobxReact.inject('store')
@MobxReact.observer
export class ElementList extends React.Component {
@@ -384,6 +386,7 @@ export class ElementList extends React.Component {
return null;
}
const childContent = rootElement.getContentBySlotType(Types.SlotType.Children);
+ const hasChildren = childContent && childContent.getElements().length > 0;
return (
{childContent ? : null}
+ {!hasChildren && (
+
+ )}
-
-
- Details
-
-
<>
{mayUpdate && (
diff --git a/src/container/page-list/page-list-container.tsx b/src/container/page-list/page-list-container.tsx
index 592be75b0..afba4f145 100644
--- a/src/container/page-list/page-list-container.tsx
+++ b/src/container/page-list/page-list-container.tsx
@@ -115,7 +115,8 @@ export class PageListContainer extends React.Component {
page={page}
/>
))}
-
store.getSender().send({
id: uuid.v4(),
@@ -123,7 +124,9 @@ export class PageListContainer extends React.Component {
type: MessageType.CreateNewPage
})
}
- />
+ >
+ Add Page
+
);
diff --git a/src/container/project-settings-container.tsx b/src/container/project-settings-container.tsx
index 88a392f1a..61ee54e5a 100644
--- a/src/container/project-settings-container.tsx
+++ b/src/container/project-settings-container.tsx
@@ -3,6 +3,10 @@ import * as MobxReact from 'mobx-react';
import * as React from 'react';
import { WithStore } from '../store';
import { LibrarySettingsContainer } from './library-settings-container';
+import { SpaceSize } from '../components/space';
+import { Color } from '../components/colors';
+import { MessageType } from '../message';
+import * as uuid from 'uuid';
@MobxReact.inject('store')
@MobxReact.observer
@@ -12,12 +16,43 @@ export class ProjectSettingsContainer extends React.Component {
return (
- Connected Libraries
+
+ Connected Libraries
+
+ You can connect one or multiple React component libraries.
+
+
+
+
+ store.getSender().send({
+ type: MessageType.OpenExternalURL,
+ id: uuid.v4(),
+ payload: 'https://github.com/meetalva/alva#pattern-requirements'
+ })
+ }
+ >
+ See Library Requirements
+
+
{store
.getPatternLibraries()
.map(library => (
))}
+
+ store.getSender().send({
+ id: uuid.v4(),
+ payload: { library: undefined },
+ type: MessageType.ConnectPatternLibraryRequest
+ })
+ }
+ >
+ Connect Library
+
);
}
diff --git a/src/electron/create-main-menu/create-file-menu.ts b/src/electron/create-main-menu/create-file-menu.ts
index c68c99f38..18e5695f3 100644
--- a/src/electron/create-main-menu/create-file-menu.ts
+++ b/src/electron/create-main-menu/create-file-menu.ts
@@ -74,58 +74,20 @@ export function createFileMenu(
type: 'separator'
},
{
- label: '&Export',
- submenu: [
- {
- label: 'Export Page as Sketch',
- enabled: Boolean(activePage),
- click: async () => {
- if (!activePage) {
- return;
- }
-
- injection.sender.send({
- id: uuid.v4(),
- type: MessageType.ExportSketchPage,
- payload: { path: undefined }
- });
- }
- },
- {
- label: 'Export Page as PNG',
- enabled: Boolean(activePage),
- click: async () => {
- if (!activePage) {
- return;
- }
-
- injection.sender.send({
- id: uuid.v4(),
- type: MessageType.ExportPngPage,
- payload: { path: undefined }
- });
- }
- },
- {
- type: 'separator'
- },
- {
- label: 'Export Project as HTML',
- enabled: Boolean(activePage),
- accelerator: 'CmdOrCtrl+Shift+E',
- click: async () => {
- if (!ctx.project) {
- return;
- }
-
- injection.sender.send({
- id: uuid.v4(),
- type: MessageType.ExportHtmlProject,
- payload: { path: undefined }
- });
- }
+ label: 'Export Prototype as HTML',
+ enabled: Boolean(activePage),
+ accelerator: 'CmdOrCtrl+E',
+ click: async () => {
+ if (!ctx.project) {
+ return;
}
- ]
+
+ injection.sender.send({
+ id: uuid.v4(),
+ type: MessageType.ExportHtmlProject,
+ payload: { path: undefined }
+ });
+ }
},
{
type: 'separator',
diff --git a/src/model/project.ts b/src/model/project.ts
index 776129cdd..6d8bbafbf 100644
--- a/src/model/project.ts
+++ b/src/model/project.ts
@@ -180,9 +180,9 @@ export class Project {
{
bundle: '',
bundleId: '',
- description: 'Basic building blocks available to every new Alva project',
+ description: 'Built-in components for basic layouts and logic',
id: uuid.v4(),
- name: 'Built-In Components',
+ name: 'Essentials',
origin: Types.PatternLibraryOrigin.BuiltIn,
patternProperties: [],
patterns: [],