Improve home page, hide cards depending on account type
This commit is contained in:
parent
e492b36ead
commit
4be006fe8e
@ -93,9 +93,4 @@ function loadHomePage(callback) {
|
||||
callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
setTimeout(function () {
|
||||
loadHomePage(function () {
|
||||
});
|
||||
}, 500);
|
||||
}
|
@ -51,6 +51,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#if receiver}}
|
||||
<div class="col-100 tablet-50 desktop-33">
|
||||
<div class="card card-expandable card-expandable-animate-width elevation-2" id="receive-card" style="margin-top: var(--f7-card-margin-vertical);" onclick="openReceiveCard()">
|
||||
|
||||
@ -80,7 +81,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{else}}
|
||||
<div class="col-100 tablet-50 desktop-33">
|
||||
<div class="card card-expandable elevation-2" id="map-card" style="margin-top: var(--f7-card-margin-vertical);" onclick="openMapCard()">
|
||||
|
||||
@ -114,6 +115,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -10,17 +10,17 @@ var routes = [
|
||||
path: '/home',
|
||||
templateUrl: './pages/home.html',
|
||||
name: 'home',
|
||||
async: function (routeTo, routeFrom, resolve, reject) {
|
||||
var giver = localStorage.getItem("accttype") == "giver";
|
||||
var receiver = localStorage.getItem("accttype") == "receiver";
|
||||
resolve({
|
||||
templateUrl: './pages/home.html'
|
||||
}, {
|
||||
context: {
|
||||
giver: giver,
|
||||
receiver: receiver
|
||||
}
|
||||
});
|
||||
keepAlive: true,
|
||||
options: {
|
||||
context: {
|
||||
giver: localStorage.getItem("accttype") == "giver",
|
||||
receiver: localStorage.getItem("accttype") == "receiver"
|
||||
}
|
||||
},
|
||||
on: {
|
||||
pageAfterIn: function () {
|
||||
loadHomePage(function () {});
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user