Merge pull request #1879 from ethereum/swap_it_style_fixes_l

error msg after loading gist when input has no gist id
pull/1/head
yann300 6 years ago committed by GitHub
commit c57fb5b7f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 36
      src/app/ui/landing-page/landing-page.js
  2. 4
      src/lib/gist-handler.js

@ -6,41 +6,6 @@ var modalDialogCustom = require('../modal-dialog-custom')
var tooltip = require('../tooltip') var tooltip = require('../tooltip')
let css = csjs` let css = csjs`
.sectionContainer {
display : flex;
flex-direction : column;
flex-wrap : wrap;
align-content : space-around;
padding : 20px;
max-width : 300px;
min-height : 200px;
background-color: var(--light);
}
.landingPage {
height : 100%;
width : 100%;
flex-wrap : wrap;
justify-content : space-evenly;
user-select : none;
}
.im {
display : grid;
max-width : 200px;
max-height : 200px;
width : 100%;
height : 100%;
padding : 20px;
background-color: var(--bg-light);
align-self : center;
}
.im:hover {
}
.getStarted {
margin-top : 50px;
width : 100%;
font-size : xx-large;
align-self : center;
}
.text { .text {
cursor: pointer; cursor: pointer;
font-weight: normal; font-weight: normal;
@ -195,6 +160,7 @@ export class LandingPage extends BaseApi {
let importFromGist = () => { let importFromGist = () => {
let app = globalRegistry.get('app').api let app = globalRegistry.get('app').api
app.loadFromGist({gist: ''}) app.loadFromGist({gist: ''})
globalRegistry.get('verticalicon').api.select('fileExplorers')
} }
let container = yo`<div class="${css.homeContainer} bg-light"> let container = yo`<div class="${css.homeContainer} bg-light">

@ -12,11 +12,13 @@ function GistHandler (_window) {
var gistId var gistId
if (params['gist'] === '') { if (params['gist'] === '') {
loadingFromGist = true loadingFromGist = true
modalDialogCustom.prompt(null, 'Enter the ID of the Gist you would like to load.', null, (target) => { modalDialogCustom.prompt(null, 'Enter the ID of the Gist or URL you would like to load.', null, (target) => {
if (target !== '') { if (target !== '') {
gistId = getGistId(target) gistId = getGistId(target)
if (gistId) { if (gistId) {
cb(gistId) cb(gistId)
} else {
modalDialogCustom.alert('Error while loading gist. Please provide a valid Gist ID or URL.')
} }
} }
}) })

Loading…
Cancel
Save