Skip to content

Commit

Permalink
Add links to older version
Browse files Browse the repository at this point in the history
  • Loading branch information
UnHumbleBen committed Nov 17, 2020
1 parent 6aa32c9 commit 4f69b72
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import 'state/grid.dart';
// WARNING: Do not modify line below, except for the version string.
const String CURRENT_VERSION = "0.13.0";
const String INITIAL_VERSION = "0.1.0";
final scadnano_versions = [
"0.13.0",
"0.12.1"
];

const BUG_REPORT_URL = 'https://github.com/UC-Davis-molecular-computing/scadnano/issues';
const NO_DESIGN_MESSAGE = 'No Design loaded.\n'
Expand Down
11 changes: 11 additions & 0 deletions lib/src/view/menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,16 @@ When selected, the length of each loopout is displayed next to it.'''
// help menu

help_menu() {
List<dynamic> older_versions_links = [for (var version in constants.scadnano_versions) DropdownItem(
{
'href': 'https://scadnano.org/v${version}',
'target': '_blank',
'title': '''\
Version v${version} of scadnano, located at https://scadnano.org/v${version}.'''
},
'scadnano v${version}',
)];

return NavDropdown(
{
'title': 'Help',
Expand Down Expand Up @@ -730,6 +740,7 @@ However, it may be less stable than the main site.'''
},
'scadnano dev version',
),
older_versions_links,
DropdownItem(
{
'href':
Expand Down

0 comments on commit 4f69b72

Please sign in to comment.