Skip to content

Commit 9198e5b

Browse files
Merge branch 'develop' of https://github.com/live-codes/livecodes into i18n/develop
2 parents ec96362 + a39e3e3 commit 9198e5b

8 files changed

Lines changed: 15 additions & 15 deletions

File tree

src/livecodes/UI/deploy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ export const createDeployUI = async ({
222222
await publish(user, name, message, commitSource, newRepo);
223223
});
224224

225-
modal.show(deployContainer, { isAsync: true });
225+
modal.show(deployContainer, { isAsync: true, autoFocus: false });
226226
newRepoNameInput.focus();
227227

228228
if (!user) return;

src/livecodes/UI/import.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,6 @@ export const createImportUI = ({
268268
showScreen('open');
269269
});
270270

271-
modal.show(importContainer, { isAsync: true });
271+
modal.show(importContainer, { isAsync: true, autoFocus: false });
272272
getUrlImportInput(importContainer).focus();
273273
};

src/livecodes/UI/info.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const createProjectInfoUI = async (
2929
const div = document.createElement('div');
3030
div.innerHTML = infoScreen;
3131
const projectInfoContainer = div.firstChild as HTMLElement;
32-
modal.show(projectInfoContainer, { onClose: () => updateInfo() });
32+
modal.show(projectInfoContainer, { onClose: () => updateInfo(), autoFocus: false });
3333

3434
const titleInput = UI.getInfoTitleInput();
3535
titleInput.value = config.title;

src/livecodes/UI/modal.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ export const createModal = (deps: {
6161
modal.showModal();
6262
}
6363
overlay.classList.remove('hidden');
64-
6564
setTimeout(() => {
6665
if (scrollToSelector) {
6766
const target = container.querySelector<HTMLElement>(scrollToSelector);

src/livecodes/UI/resources.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const createExternalResourcesUI = ({
3131
const div = document.createElement('div');
3232
div.innerHTML = resourcesScreen;
3333
const resourcesContainer = div.firstChild as HTMLElement;
34-
modal.show(resourcesContainer, { onClose: () => updateResources() });
34+
modal.show(resourcesContainer, { onClose: () => updateResources(), autoFocus: false });
3535

3636
const externalResources = getExternalResourcesTextareas();
3737
externalResources.forEach((textarea) => {

src/livecodes/UI/sync-ui.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export const createSyncUI = async ({
202202
updateSyncStatus({ inProgress: false, lastSync });
203203
});
204204

205-
modal.show(syncContainer, { isAsync: true });
205+
modal.show(syncContainer, { isAsync: true, autoFocus: false });
206206
newRepoNameInput.focus();
207207

208208
if (!user) return;

src/livecodes/core.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ const updateEditors = async (editors: Editors, config: Config) => {
579579

580580
const showMode = (mode?: Config['mode'], view?: Config['view']) => {
581581
if (!mode) {
582-
mode = 'full';
582+
mode = getConfig().mode;
583583
}
584584
if (!view) {
585585
view = getConfig().view;
@@ -1404,7 +1404,7 @@ const applyConfig = async (newConfig: Partial<Config>) => {
14041404
loadSettings(currentConfig);
14051405
}
14061406
if (newConfig.mode || newConfig.view) {
1407-
window.deps.showMode(
1407+
window.deps?.showMode?.(
14081408
newConfig.mode ?? currentConfig.mode,
14091409
newConfig.view ?? currentConfig.view,
14101410
);
@@ -2877,7 +2877,7 @@ const handleEditorTools = () => {
28772877
if (newMode === 'focus' && consoleIsEnabled) {
28782878
toolsPane?.setActiveTool('console');
28792879
}
2880-
showMode(newMode, config.view);
2880+
window.deps?.showMode?.(newMode, config.view);
28812881
});
28822882

28832883
eventsManager.addEventListener(UI.getCopyButton(), 'click', () => {
@@ -3455,7 +3455,7 @@ const handleOpen = () => {
34553455

34563456
const handleImport = () => {
34573457
const createImportUI = async () => {
3458-
modal.show(loadingMessage(), { size: 'small' });
3458+
modal.show(loadingMessage(), { size: 'small', autoFocus: false });
34593459
const importModule: typeof import('./UI/import') = await import(baseUrl + '{{hash:import.js}}');
34603460
importModule.createImportUI({
34613461
baseUrl,
@@ -3639,7 +3639,7 @@ const handleDeploy = () => {
36393639
);
36403640
return;
36413641
}
3642-
modal.show(loadingMessage(), { size: 'small' });
3642+
modal.show(loadingMessage(), { size: 'small', autoFocus: false });
36433643

36443644
const getProjectDeployRepo = async () => {
36453645
if (!projectId) return;
@@ -3690,7 +3690,7 @@ const handleSync = () => {
36903690
);
36913691
return;
36923692
}
3693-
modal.show(loadingMessage(), { size: 'small' });
3693+
modal.show(loadingMessage(), { size: 'small', autoFocus: false });
36943694

36953695
const syncUIModule: typeof import('./UI/sync-ui') = await import(
36963696
baseUrl + '{{hash:sync-ui.js}}'
@@ -4374,7 +4374,7 @@ const handleExternalResources = () => {
43744374
dispatchChangeEvent();
43754375
};
43764376

4377-
modal.show(loadingMessage(), { size: 'small' });
4377+
modal.show(loadingMessage(), { size: 'small', autoFocus: false });
43784378
const resourcesModule: typeof import('./UI/resources') = await import(
43794379
baseUrl + '{{hash:resources.js}}'
43804380
);

src/livecodes/styles/app.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,7 @@ a#result-button {
887887
display: flex;
888888
flex-direction: column;
889889
height: 100%;
890+
justify-content: flex-end;
890891
overflow: hidden;
891892
position: relative;
892893
top: 0;
@@ -981,9 +982,8 @@ a#result-button {
981982

982983
&#editor-tools {
983984
align-items: center;
984-
bottom: 0;
985985
display: flex;
986-
position: absolute;
986+
flex-grow: 0;
987987

988988
#editor-status {
989989
background-color: transparent;
@@ -1274,6 +1274,7 @@ a.tools-pane-title {
12741274
color: var(--link);
12751275
display: flex !important;
12761276
justify-content: center;
1277+
overflow: hidden;
12771278
position: relative;
12781279

12791280
&.gutter-vertical {

0 commit comments

Comments
 (0)