From 980c8beb8984b6369aae5283738b5c3fcfa15eee Mon Sep 17 00:00:00 2001 From: Steven Hugg Date: Wed, 22 May 2019 14:18:44 -0400 Subject: [PATCH] vcs: moved control instructions; DEFAULT main file in repo if none given --- index.html | 8 ++++---- src/ui.ts | 7 ++++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 907df63e..58181485 100644 --- a/index.html +++ b/index.html @@ -240,6 +240,10 @@ if (window.location.host.endsWith('8bitworkshop.com')) {
+ - diff --git a/src/ui.ts b/src/ui.ts index 87f06998..e7886b5a 100644 --- a/src/ui.ts +++ b/src/ui.ts @@ -1708,7 +1708,12 @@ function startPlatform() { if (hasLocalStorage) { lastid = localStorage.getItem("__lastid_"+store_id); } - qs['file'] = lastid || PRESETS[0].id; + // load first preset file, unless we're in a repo + var defaultfile = lastid || (repo_id ? null : PRESETS[0].id); + qs['file'] = defaultfile || 'DEFAULT'; + if (!defaultfile) { + alertError("There is no default main file for this project. Try selecting one from the pulldown."); + } } // legacy vcs stuff if (platform_id == 'vcs' && qs['file'].startsWith('examples/') && !qs['file'].endsWith('.a')) {