Skip to content

Commit fa1f994

Browse files
Editor: Separate stored MicroPython version and fix rtd link.
The URL used to get generated based on the UPY_VERSION global, however the current v2 documentation URL doesn't follow this patter and might not exists forever (right now is a branch in the micropython repository). So for now the editor will link to the docs entry point.
1 parent 682096d commit fa1f994

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

editor.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@
7979
<script type="application/javascript">
8080
// VERSION INFORMATION
8181
EDITOR_VERSION = "2.1.0-beta.6";
82-
UPY_VERSION = "1.0.1/2.0-3e09245a46";
82+
UPY_1_VERSION = "1.0.1";
83+
UPY_2_VERSION = "2.0-3e09245a46";
8384
</script>
8485
<script id="files-template" type="x-tmpl-mustache">
8586
<div id="files-modal" tabindex="-1" role="dialog" aria-label="load/save modal" aria-modal="true" class="modal-div">
@@ -345,7 +346,7 @@ <h2><i class="fa fa-unlock-alt"></i> <strong>{{ title }}</strong></h2>
345346
</div>
346347
<div class="buttons_menu_rhs">
347348
<div class="buttons_menu_item"><span id="editor-ver">Editor Version:</span> <script>document.write(EDITOR_VERSION);</script></div>
348-
<div class="buttons_menu_item"><span id="mp-ver">MicroPython Version:</span> <script>document.write(UPY_VERSION);</script></div>
349+
<div class="buttons_menu_item"><span id="mp-ver">MicroPython Version:</span> <script>document.write(UPY_1_VERSION + '/' + UPY_2_VERSION);</script></div>
349350
</div>
350351
</div>
351352
<div id="small-icons-left" class="vbox small-icons">

python-main.js

-4
Original file line numberDiff line numberDiff line change
@@ -1807,10 +1807,6 @@ function web_editor(config) {
18071807
})
18081808
});
18091809

1810-
// Update the MicroPython docs link to append the version to the URL
1811-
var docsAnchor = $('#docs-link');
1812-
docsAnchor.attr('href', docsAnchor.attr('href') + 'en/v' + UPY_VERSION);
1813-
18141810
window.addEventListener('resize', function() {
18151811
formatMenuContainer('command-options', 'options_container');
18161812
formatMenuContainer('command-help', 'helpsupport_container');

0 commit comments

Comments
 (0)