Skip to content
This repository has been archived by the owner on Mar 28, 2021. It is now read-only.

Commit

Permalink
removed welcome page, redirect to random address instead.
Browse files Browse the repository at this point in the history
Fixed mail count.
Use correct backend url.
Change wording.
  • Loading branch information
synox committed Mar 5, 2017
1 parent fc8372a commit 9aabbb2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
5 changes: 3 additions & 2 deletions src/client-libs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ app.filter("autolink", function () {
app.controller('MailboxController', ["$interval", "$http", "$log", function ($interval, $http, $log) {
var self = this;

self.backend_url = backend_url;

self.updateUsername = function (username) {
username = username.replace(/[@].*$/, ''); // remove part after "@"
if (self.username !== username) {
Expand All @@ -50,8 +52,7 @@ app.controller('MailboxController', ["$interval", "$http", "$log", function ($in
self.address = self.username; // use username until real address has been loaded
self.updateMails();
} else {
self.address = null;
self.mails = [];
self.randomize();
}
}
self.inputFieldUsername = self.username;
Expand Down
15 changes: 6 additions & 9 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
 
{{$ctrl.address}}
 
<span ng-if="$ctrl.mailcount" class="tag tag-pill tag-default">{{$ctrl.mailcount}}</span>
<span ng-if="$ctrl.mails.length" class="tag tag-pill tag-default">{{$ctrl.mails.length}}</span>
</a>

<form class="form-inline float-xs-right" ng-submit="$ctrl.updateUsername($ctrl.inputFieldUsername)">
Expand All @@ -53,17 +53,14 @@
browser and your php error logs. </p>
</div>

<p ng-if="!$ctrl.username">
Use the buttons above to create a new inbox, or open a specific mailbox.
</p>

<div ng-if="$ctrl.username && $ctrl.mails.length == 0">
<div class="waiting-screen">
<p class="lead">Inbox is empty.</p>
<p class="lead">Your mailbox <strong>{{$ctrl.address}}</strong> is ready. </p>
<p>You have no emails yet. They will appear here automatically. </p>
<p><br/>
<img src="client-libs/spinner.gif">
<br/></p>
<p class="lead">Emails to {{address}} will be automatically displayed on this page. </p>
<br/>
</p>
</div>
</div>

Expand All @@ -75,7 +72,7 @@
<div class="col-sm-12 email-summary">{{mail.subject}}
<form class="form-inline float-xs-right">
<a role="button" class="btn btn-sm btn-outline-primary"
href="backend.php?download_email_id={{mail.id}}&username={{$ctrl.username}}"
href="{{$ctrl.backend_url}}?download_email_id={{mail.id}}&username={{$ctrl.username}}"
download="true">Download
</a>

Expand Down

0 comments on commit 9aabbb2

Please sign in to comment.