Skip to content
This repository was archived by the owner on Aug 15, 2023. It is now read-only.

Commit 4d63e1c

Browse files
authored
Merge pull request #298 from Developer-Autodesk/feature/INVGEN-40309
feature/invgen-40309: add a link to the about dialog
2 parents 343925c + 35bb4ff commit 4d63e1c

File tree

6 files changed

+74
-6
lines changed

6 files changed

+74
-6
lines changed

WebApplication/ClientApp/src/actions/parametersActions.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ describe('fetchParameters', () => {
297297
const first = {
298298
value: "12000 mm",
299299
units: "mm"
300-
}
300+
};
301301

302302
it('makes exact match', () => {
303303
expect(compareParamaters(first, first)).toBeTruthy();

WebApplication/ClientApp/src/components/bomUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function getMaxColumnTextWidth(strings) {
2929
const width = context2d.measureText(element).width;
3030
maxWidth = width>maxWidth ? width : maxWidth;
3131
});
32-
32+
3333
// round to 10times number, like 81.5 -> 90, 87.1 -> 90, etc
3434
const roundTo = 10;
3535
const rounded = (maxWidth % roundTo==0) ? maxWidth : maxWidth-maxWidth%roundTo + roundTo;

WebApplication/ClientApp/src/components/userDetails.css

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,20 @@ span.user {
2626
margin-right: 12px !important;
2727
}
2828

29-
span.username {
29+
span.username, span.hyperlink {
3030
width: 70px;
3131
height: 20px;
32-
color: rgb(60, 60, 60);
3332
font-size: 14px;
3433
font-family: ArtifaktElement, sans-serif;
35-
font-weight: 700;
3634
line-height: 20px;
3735
margin: 12px;
3836
}
3937

38+
span.username {
39+
color: rgb(60, 60, 60);
40+
font-weight: 700;
41+
}
42+
4043
div.auth-button {
4144
width: 244px;
4245
height: 36px;

WebApplication/ClientApp/src/components/userDetails.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import Avatar from '@hig/avatar';
2121
import "./userDetails.css";
2222
import Button from '@hig/button';
2323

24-
class UserDetails extends Component {
24+
export class UserDetails extends Component {
2525
constructor(props) {
2626
super(props);
2727
this.handleAuthClick = this.handleAuthClick.bind(this);
@@ -50,6 +50,9 @@ class UserDetails extends Component {
5050
title={this.props.profile.isLoggedIn ? "Sign Out" : "Sign In"}
5151
onClick={this.handleAuthClick}
5252
/>
53+
<span className="hyperlink">
54+
<a href="https://github.com/Developer-Autodesk/forge-configurator-inventor/blob/master/about.md">About application</a>
55+
</span>
5356
</div>
5457
);
5558
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/////////////////////////////////////////////////////////////////////
2+
// Copyright (c) Autodesk, Inc. All rights reserved
3+
// Written by Forge Design Automation team for Inventor
4+
//
5+
// Permission to use, copy, modify, and distribute this software in
6+
// object code form for any purpose and without fee is hereby granted,
7+
// provided that the above copyright notice appears in all copies and
8+
// that both that copyright notice and the limited warranty and
9+
// restricted rights notice below appear in all supporting
10+
// documentation.
11+
//
12+
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
13+
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
14+
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
15+
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
16+
// UNINTERRUPTED OR ERROR FREE.
17+
/////////////////////////////////////////////////////////////////////
18+
19+
import React from 'react';
20+
import Enzyme, { shallow } from 'enzyme';
21+
import Adapter from 'enzyme-adapter-react-16';
22+
import { UserDetails } from './userDetails';
23+
24+
Enzyme.configure({ adapter: new Adapter() });
25+
26+
describe('user dialog ', () => {
27+
28+
it('check there is contained a hyperlink to README.md', () => {
29+
30+
const props = {
31+
profile: {
32+
name: 'profileName',
33+
avatarUrl: 'avatarUrl',
34+
isLoggedIn: true,
35+
}
36+
};
37+
38+
const wrapper = shallow(<UserDetails {...props} />);
39+
40+
const hyperlinkSpan = wrapper.find('.hyperlink');
41+
42+
expect(hyperlinkSpan.length).toBe(1);
43+
expect(hyperlinkSpan.find('a').prop('href')).toContain('about.md');
44+
});
45+
46+
});

about.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Autodesk Configuration with Design Automation for Inventor
2+
Using the Autodesk Configuration with Design Automation for Inventor web application one can easily manage and edit Inventor projects using only a web browser and an internet connection. The following operations are available:
3+
- manage custom Inventor projects (list, upload, delete)
4+
- interactively display the model
5+
- change editable parameters and update the model
6+
- list bill of materials
7+
- generate model drawing
8+
- download individual Inventor project assemblies (.IAM), Revit 3D model (.RFA), bill of material (.CSV) and model drawing (.PDF)
9+
10+
The application is available using this link: https://inventor-config-demo.autodesk.io
11+
12+
Non authenticated anonymous users can work with two predefined projects: Wheel and Wrench.
13+
14+
To be able to upload custom projects, one needs to authenticate using their Autodesk Forge account. To sign up for the Forge account, follow the instructions at https://forge.autodesk.com/.
15+
16+
Every operation (i.e. model update after change of parameters, drawing creation) is computed in the cloud. For this purpose, Cloud Credits are required. Free Cloud Credits are provided to try Forge after signing up. For more information about pricing, please see https://forge.autodesk.com/pricing.

0 commit comments

Comments
 (0)