Get install flow working in main window

// FREEBIE
This commit is contained in:
lilia 2017-03-30 18:11:13 -07:00 committed by Scott Nonnenberg
parent beb058aed6
commit 285b5ce062
No known key found for this signature in database
GPG key ID: A4931C09644C654B
7 changed files with 1159 additions and 18 deletions

View file

@ -623,7 +623,7 @@
<div id='step1' class='step'> <div id='step1' class='step'>
<div class='inner'> <div class='inner'>
<div class='step-body'> <div class='step-body'>
<img id='signal-icon' src='/images/icon_250.png'/> <img id='signal-icon' src='images/icon_250.png'/>
<h1>{{ installWelcome }}</h1> <h1>{{ installWelcome }}</h1>
<p>{{ installTagline }}</p> <p>{{ installTagline }}</p>
</div> </div>
@ -639,7 +639,7 @@
<div id='step2' class='step'> <div id='step2' class='step'>
<div class='inner'> <div class='inner'>
<div class='step-body'> <div class='step-body'>
<img id='signal-phone' src='/images/signal-phone.png'> <img id='signal-phone' src='images/signal-phone.png'>
<p>{{{ installSignalLink }}}</p> <p>{{{ installSignalLink }}}</p>
</div> </div>
<div class='nav'> <div class='nav'>
@ -670,7 +670,7 @@
<div class='step-body'> <div class='step-body'>
<p>{{ installLinkingWithNumber }}</p> <p>{{ installLinkingWithNumber }}</p>
<h2 class='number'></h2> <h2 class='number'></h2>
<img id='signal-computer' src='/images/signal-laptop.png'> <img id='signal-computer' src='images/signal-laptop.png'>
<p>{{ installComputerName }}</p> <p>{{ installComputerName }}</p>
<div> <div>
<input type='text' id='device-name' spellcheck='false' maxlength='50' /> <input type='text' id='device-name' spellcheck='false' maxlength='50' />
@ -687,7 +687,7 @@
<div id='step5' class='step'> <div id='step5' class='step'>
<div class='inner'> <div class='inner'>
<div class='step-body'> <div class='step-body'>
<img id='signal-icon' src='/images/icon_250.png'/> <img id='signal-icon' src='images/icon_250.png'/>
<div class='progress-dialog'> <div class='progress-dialog'>
<p class='status'></p> <p class='status'></p>
<div class='bar-container'><div class='bar progress-bar'></div></div> <div class='bar-container'><div class='bar progress-bar'></div></div>
@ -765,6 +765,7 @@
<script type='text/javascript' src='js/views/banner_view.js'></script> <script type='text/javascript' src='js/views/banner_view.js'></script>
<script type='text/javascript' src='js/views/identity_key_send_error_view.js'></script> <script type='text/javascript' src='js/views/identity_key_send_error_view.js'></script>
<script type='text/javascript' src='js/views/migration_view.js'></script> <script type='text/javascript' src='js/views/migration_view.js'></script>
<script type="text/javascript" src="js/views/phone-input-view.js"></script>
<script type='text/javascript' src='js/wall_clock_listener.js'></script> <script type='text/javascript' src='js/wall_clock_listener.js'></script>
<script type='text/javascript' src='js/rotate_signed_prekey_listener.js'></script> <script type='text/javascript' src='js/rotate_signed_prekey_listener.js'></script>

View file

@ -96,6 +96,13 @@
Whisper.WallClockListener.init(Whisper.events); Whisper.WallClockListener.init(Whisper.events);
Whisper.RotateSignedPreKeyListener.init(Whisper.events); Whisper.RotateSignedPreKeyListener.init(Whisper.events);
Whisper.ExpiringMessagesListener.init(Whisper.events); Whisper.ExpiringMessagesListener.init(Whisper.events);
if (Whisper.Registration.everDone()) {
openInbox();
}
if (!Whisper.Registration.isDone()) {
extension.install();
}
}); });
window.getSyncRequest = function() { window.getSyncRequest = function() {

View file

@ -166,21 +166,21 @@
}; };
extension.install = function(mode) { extension.install = function(mode) {
var id = 'installer';
var url = 'options.html';
if (mode === 'standalone') { if (mode === 'standalone') {
id = 'standalone-installer'; return; // TODO
url = 'register.html';
} }
if (!chrome.app.window.get(id)) { var installView = new Whisper.InstallView({
extension.windows.open({ el: $('body').empty()
id: id, });
url: url, if (Whisper.Registration.everDone()) {
bounds: { width: 800, height: 666, }, installView.selectStep(3);
minWidth: 800, installView.hideDots();
minHeight: 666
});
} }
installView.$el.show();
Whisper.events.once('contactsync', function() {
openInbox();
installView.remove();
});
}; };
var notification_pending = Promise.resolve(); var notification_pending = Promise.resolve();

File diff suppressed because it is too large Load diff

View file

@ -19,3 +19,6 @@
@import 'ios'; @import 'ios';
@import 'android'; @import 'android';
@import 'android-dark'; @import 'android-dark';
// Installer
@import 'options';

View file

@ -869,7 +869,6 @@ input, button, select, textarea {
line-height: inherit; } line-height: inherit; }
#install { #install {
display: none;
height: 100%; } height: 100%; }
@media screen and (max-height: 665px) { @media screen and (max-height: 665px) {
#install { #install {

View file

@ -40,7 +40,6 @@ input, button, select, textarea {
} }
#install { #install {
display: none;
height: 100%; height: 100%;
// 666px is the minimum window height in chromium.js // 666px is the minimum window height in chromium.js