Added link to V2
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
</app-drawer>
|
||||
{{> yield}}
|
||||
</app-drawer-layout>
|
||||
{{#if disconnected}}
|
||||
<div style="
|
||||
{{#if disconnected}}
|
||||
<div style="
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 00;
|
||||
@@ -15,9 +15,9 @@
|
||||
background: rgb(209 59 46);;
|
||||
color: white;
|
||||
text-align: center;">
|
||||
Disconnected, changes won't be saved. {{#if connectionStatus}}({{connectionStatus}}){{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
Disconnected, changes won't be saved. {{#if connectionStatus}}({{connectionStatus}}){{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<paper-toast id="global-toast" duration="5000">
|
||||
{{> Template.dynamic template=globalToastTemplate data=globalToastData }}
|
||||
</paper-toast>
|
||||
@@ -31,17 +31,23 @@
|
||||
<app-header id="accountSummary" effects="waterfall parallax-background" condenses fixed>
|
||||
<app-toolbar>
|
||||
{{#if currentUser}}
|
||||
<a href="/account" style="text-decoration: underline; cursor: pointer; font-size: 16px;">
|
||||
{{profileLink}}
|
||||
</a>
|
||||
<a href="/account" style="text-decoration: underline; cursor: pointer; font-size: 16px;">
|
||||
{{profileLink}}
|
||||
</a>
|
||||
{{else}}
|
||||
<a href="/sign-in" style="text-decoration: underline; cursor: pointer; font-size: 16px;">
|
||||
Sign in
|
||||
</a>
|
||||
<a href="/sign-in" style="text-decoration: underline; cursor: pointer; font-size: 16px;">
|
||||
Sign in
|
||||
</a>
|
||||
{{/if}}
|
||||
</app-toolbar>
|
||||
</app-header>
|
||||
<div id="navPanel">
|
||||
<a class="version-2" href="https://beta.dicecloud.com" tabindex="-1" style="color: rgb(182, 39, 26);">
|
||||
<paper-icon-item>
|
||||
<iron-icon id="v2-icon" icon="arrow-upward" item-icon></iron-icon>
|
||||
<b>Try Version 2</b>
|
||||
</paper-icon-item>
|
||||
</a>
|
||||
<a href="/" tabindex="-1">
|
||||
<paper-icon-item id="homeNav">
|
||||
<iron-icon icon="home" item-icon></iron-icon>
|
||||
@@ -74,11 +80,8 @@
|
||||
<paper-icon-item>
|
||||
<iron-icon id="patreon-link-icon" icon="dicecloud:patreon" item-icon></iron-icon>
|
||||
{{#if showPatreonBadge}}
|
||||
<paper-badge
|
||||
icon="av:new-releases"
|
||||
for="patreon-link-icon"
|
||||
label="New post">
|
||||
</paper-badge>
|
||||
<paper-badge icon="av:new-releases" for="patreon-link-icon" label="New post">
|
||||
</paper-badge>
|
||||
{{/if}}
|
||||
Patreon
|
||||
</paper-icon-item>
|
||||
@@ -93,4 +96,4 @@
|
||||
{{> characterSideList}}
|
||||
</div>
|
||||
</app-header-layout>
|
||||
</template>
|
||||
</template>
|
||||
@@ -1,53 +1,53 @@
|
||||
Template.layout.onCreated(function() {
|
||||
Template.layout.onCreated(function () {
|
||||
this.subscribe("user");
|
||||
});
|
||||
|
||||
Template.layout.helpers({
|
||||
connectionStatus: function(){
|
||||
let status = Meteor.status()
|
||||
return status.reason || status.status;
|
||||
},
|
||||
disconnected: function(){
|
||||
return !Meteor.status().connected;
|
||||
},
|
||||
connectionStatus: function () {
|
||||
let status = Meteor.status()
|
||||
return status.reason || status.status;
|
||||
},
|
||||
disconnected: function () {
|
||||
return !Meteor.status().connected;
|
||||
},
|
||||
});
|
||||
|
||||
Template.appDrawer.helpers({
|
||||
profileLink: function() {
|
||||
profileLink: function () {
|
||||
var user = Meteor.user();
|
||||
return user.profile && user.profile.username || user.username || "My Account";
|
||||
},
|
||||
showPatreonBadge: function(){
|
||||
let post = PatreonPosts.findOne({}, {sort: {date: -1}});
|
||||
showPatreonBadge: function () {
|
||||
let post = PatreonPosts.findOne({}, { sort: { date: -1 } });
|
||||
let user = Meteor.user();
|
||||
if (!post || !user) return false;
|
||||
return post.link !== user.lastPatreonPostClicked;
|
||||
},
|
||||
patreonLink: function(){
|
||||
let post = PatreonPosts.findOne({}, {sort: {date: -1}});
|
||||
patreonLink: function () {
|
||||
let post = PatreonPosts.findOne({}, { sort: { date: -1 } });
|
||||
return (post && post.link) || 'https://www.patreon.com/dicecloud';
|
||||
},
|
||||
});
|
||||
|
||||
let drawerLayout;
|
||||
const closeDrawer = function(instance){
|
||||
const closeDrawer = function (instance) {
|
||||
if (!drawerLayout) drawerLayout = $("app-drawer-layout")[0];
|
||||
if (drawerLayout && drawerLayout.narrow){
|
||||
if (drawerLayout && drawerLayout.narrow) {
|
||||
drawerLayout.drawer.close();
|
||||
}
|
||||
}
|
||||
|
||||
Template.appDrawer.events({
|
||||
"click a": function(event, instance){
|
||||
"click a": function (event, instance) {
|
||||
closeDrawer(instance);
|
||||
},
|
||||
"click .feedback": function(event, instance) {
|
||||
"click .feedback": function (event, instance) {
|
||||
pushDialogStack({
|
||||
template: "feedback",
|
||||
element: event.currentTarget,
|
||||
callback: function(report){
|
||||
callback: function (report) {
|
||||
if (!report) return;
|
||||
Meteor.call("insertReport", report, function(e, result){
|
||||
Meteor.call("insertReport", report, function (e, result) {
|
||||
GlobalUI.toast({
|
||||
text: e && e.details || "Feedback submitted"
|
||||
});
|
||||
@@ -56,13 +56,17 @@ Template.appDrawer.events({
|
||||
});
|
||||
closeDrawer(instance);
|
||||
},
|
||||
"click .patreon": function(event, instance){
|
||||
let post = PatreonPosts.findOne({}, {sort: {date: -1}});
|
||||
"click .patreon": function (event, instance) {
|
||||
let post = PatreonPosts.findOne({}, { sort: { date: -1 } });
|
||||
let link = (post && post.link) || 'https://www.patreon.com/dicecloud';
|
||||
Meteor.call('clickPatreonPost', link);
|
||||
ga("send", "event", "externalLink", "patreon");
|
||||
},
|
||||
"click .github": function(event, instance){
|
||||
"click .github": function (event, instance) {
|
||||
ga("send", "event", "externalLink", "github");
|
||||
},
|
||||
"click .version-2": function (event, instance) {
|
||||
ga("send", "event", "externalLink", "version-2");
|
||||
window.location = 'https://beta.dicecloud.com';
|
||||
},
|
||||
});
|
||||
|
||||
2134
app/package-lock.json
generated
2134
app/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user