Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Commit

Permalink
Update new-user and update intro
Browse files Browse the repository at this point in the history
  • Loading branch information
pfrazee committed May 29, 2017
1 parent 79f120d commit 7bd06cc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
24 changes: 18 additions & 6 deletions app/builtin-pages/views/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {pluralize} from '../../lib/strings'

const colorThief = new ColorThief()

const LATEST_VERSION = 7000 // semver where major*1mm and minor*1k; thus 3.2.1 = 3002001
const LATEST_VERSION = 7001 // semver where major*1mm and minor*1k; thus 3.2.1 = 3002001

// globals
// =
Expand Down Expand Up @@ -49,7 +49,8 @@ async function setup () {
// render version update info if appropriate
let latestVersion = await beakerSitedata.get('beaker://start', 'latest-version')
if (+latestVersion < LATEST_VERSION) {
showReleaseNotes = true
if (!latestVersion) showReleaseNotes = 'welcome'
else showReleaseNotes = 'update'
update()
beakerSitedata.set('beaker://start', 'latest-version', LATEST_VERSION)
}
Expand Down Expand Up @@ -105,13 +106,24 @@ function renderNetworkLink () {

function renderWelcome () {
if (!showReleaseNotes) return ''
if (showReleaseNotes === 'welcome') {
return yo`
<div class="beaker-welcome">
<p>
Welcome to Beaker 0.7.1!
<a href="https://www.youtube.com/watch?v=U2B9mwRFE8U" target="_blank">Watch the intro</a>
or
<a href="https://github.com/beakerbrowser/beaker/releases/tag/0.7.1" target="_blank">See what’s new</a>.
<i onclick=${dismissWelcome} class="fa fa-close"></i>
</p>
</div>
`
}
return yo`
<div class="beaker-welcome">
<p>
Welcome to Beaker 0.7!
<a href="https://beakerbrowser.com/docs/using-beaker" target="_blank">Take a tour</a>
or
<a href="https://github.com/beakerbrowser/beaker/releases/tag/0.7.0" target="_blank">See what’s new</a>.
Beaker has updated to 0.7.1.
<a href="https://github.com/beakerbrowser/beaker/releases/tag/0.7.1" target="_blank">See what’s new</a>.
<i onclick=${dismissWelcome} class="fa fa-close"></i>
</p>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/stylesheets/builtin-pages/start.less
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ body {


.beaker-welcome {
width: 400px;
width: 410px;
text-align: center;
padding: 7px 26px 7px 13px;
margin-left: auto;
Expand Down

0 comments on commit 7bd06cc

Please sign in to comment.