Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

option to add custom icons. As requested in #16 and #15 #18

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ The connection banner will attempt to fetch custom text from `Meteor.settings`.
"connectionLostText":"Ooops. Something is wrong.",
"tryReconnectText":"Try to reconnect now",
"reconnectBeforeCountdownText":"Attempting to reconnect in",
"reconnectAfterCountdownText":"seconds."
"reconnectAfterCountdownText":"seconds.",
"connectionLostTextIcon":"fa fa-exclamation-triangle fa-lg",
"tryReconnectTextIcon":"fa fa-refresh fa-lg"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some formatting issue with my text editor(sublime) I think, Format looks fine in my local but not here.

}
}
}
```
Settings are only required if you desire customized text
Settings are only required if you desire customized text and icons


----
Expand Down
4 changes: 2 additions & 2 deletions client/banner.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
</div>
{{#if showBanner}}
<div id="connection-lost-banner" class="alert alert-danger">
<b><i class="fa fa-exclamation-triangle fa-lg"></i> {{connectionLostText}}</b>
<b><i class="{{connectionLostTextIcon}}"></i> {{connectionLostText}}</b>
&nbsp;
{{reconnectBeforeCountdownText}} {{retryTimeSeconds}} {{reconnectAfterCountdownText}}
&nbsp;
<a href="" id="connection-try-reconnect" class="alert-link"><i class="fa fa-refresh fa-lg"></i> {{tryReconnectText}}</a>
<a href="" id="connection-try-reconnect" class="alert-link"><i class="{{tryReconnectTextIcon}}"></i> {{tryReconnectText}}</a>
{{#if failedReason}}
<br>
{{failedReason}}
Expand Down
8 changes: 7 additions & 1 deletion client/banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,11 @@ Template.connectionBanner.helpers({
},
reconnectAfterCountdownText() {
return getSetting('reconnectAfterCountdownText', 'seconds.');
}
},
connectionLostTextIcon() {
return getSetting('connectionLostTextIcon', 'fa fa-exclamation-triangle fa-lg');
},
tryReconnectTextIcon() {
return getSetting('tryReconnectTextIcon', 'fa fa-refresh fa-lg');
},
});