diff --git a/src/browser/js/app/callbacks.js b/src/browser/js/app/callbacks.js
index a9ecf14b..67e158e2 100644
--- a/src/browser/js/app/callbacks.js
+++ b/src/browser/js/app/callbacks.js
@@ -60,14 +60,16 @@ module.exports = {
sessionList: function(event,data){
var data = data || event
- $('#lobby').append(`
+ var lobby = $(`
`)
+ `),
+ list = lobby.find('.list'),
+ footer = lobby.find('.footer')
for (i in data) {
var max = 50
@@ -79,27 +81,31 @@ module.exports = {
path = path.substr(0,Math.floor((path.length)/2)-(length-max)/2) + '...' + path.substr(Math.ceil((path.length)/2)+(length-max)/2, path.length)
}
- $('#lobby .list').append(''+file+' ('+path+')'+icon('remove')+'')
+ list.append(''+file+' ('+path+')'+icon('remove')+'')
}
- $('#lobby .footer').append(''+icon('folder-open')+' Browse')
- $('#lobby .footer').append(''+icon('file-o')+' New')
- $('#lobby .load').click(function(e){
+ footer.append(''+icon('folder-open')+' Browse')
+ footer.append(''+icon('file-o')+' New')
+ lobby.find('.load').click(function(e){
e.stopPropagation()
IPC.send('sessionOpen',{path:$(this).data('session')})
})
- $('#lobby a span').click(function(e){
+ lobby.find('a span').click(function(e){
e.stopPropagation()
IPC.send('sessionRemoveFromHistory',$(this).parent().data('session'))
$(this).parents('a').remove()
})
- $('#lobby .browse').click(function(e){
+ lobby.find('.browse').click(function(e){
e.stopPropagation()
actions.sessionBrowse()
})
- $('#lobby .new').click(function(e){
+ lobby.find('.new').click(function(e){
e.stopPropagation()
init([{}],function(){$('#open-toggle, .enable-editor').click();$('.editor-root').trigger('mousedown.editor')})
})
+ $('#lobby').append(lobby)
+ setTimeout(()=>{
+ lobby.addClass('loaded')
+ })
},
sessionOpen: function(event,data){
diff --git a/src/browser/scss/style.scss b/src/browser/scss/style.scss
index ea9e0113..bd82eaae 100644
--- a/src/browser/scss/style.scss
+++ b/src/browser/scss/style.scss
@@ -103,12 +103,19 @@ i {
justify-content: center;
overflow-y: auto;
padding:20rem;
+
.main {
width:600rem;
max-width: 100%;
max-height:100%;
display: flex;
flex-direction: column;
+ opacity: 0;
+ transition: opacity .25s;
+ &.loaded {
+ opacity: 1;
+ overflow: auto;
+ }
}
.list {
flex:1;