Merge pull request #1879 from ethereum/swap_it_style_fixes_l

error msg after loading gist when input has no gist id
pull/3094/head
yann300 6 years ago committed by GitHub
commit 2d1d7c5bed
  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')
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 {
cursor: pointer;
font-weight: normal;
@ -195,6 +160,7 @@ export class LandingPage extends BaseApi {
let importFromGist = () => {
let app = globalRegistry.get('app').api
app.loadFromGist({gist: ''})
globalRegistry.get('verticalicon').api.select('fileExplorers')
}
let container = yo`<div class="${css.homeContainer} bg-light">

@ -12,11 +12,13 @@ function GistHandler (_window) {
var gistId
if (params['gist'] === '') {
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 !== '') {
gistId = getGistId(target)
if (gistId) {
cb(gistId)
} else {
modalDialogCustom.alert('Error while loading gist. Please provide a valid Gist ID or URL.')
}
}
})

Loading…
Cancel
Save