mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 10:01:40 -05:00
finishing work on update package
This commit is contained in:
parent
70026cfbce
commit
e16a0b56c1
2 changed files with 9 additions and 4 deletions
|
@ -4,7 +4,11 @@
|
|||
<h3 class="update-version">{{version}}</h3>
|
||||
<div class="update-content">
|
||||
<h4 class="update-prompt">A new version of Telescope is available.</h4>
|
||||
<p class="update-message">You have: {{currentVersion}}. Note: this message is only displayed to admins. <a href="http://telesc.pe/docs/updating" target="_blank">Update instructions</a>.</p>
|
||||
<p class="update-message">
|
||||
You have: {{currentVersion}}. Note: this message is only displayed to admins.
|
||||
<a href="https://github.com/TelescopeJS/Telescope/blob/master/History.md" target="_blank">View changelog</a> |
|
||||
<a href="http://telesc.pe/docs/updating" target="_blank">View update instructions</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
|
@ -11,17 +11,18 @@ compareVersions = function (v1, v2) { // return true if v2 is newer than v1
|
|||
|
||||
Meteor.startup(function () {
|
||||
if(Meteor.user() && isAdmin(Meteor.user())){
|
||||
var url = 'http://localhost:3000/';
|
||||
var url = 'http://version.telescopeapp.org/';
|
||||
HTTP.get(url, {
|
||||
data: {
|
||||
params: {
|
||||
currentVersion: telescopeVersion,
|
||||
siteTitle: getSetting('title'),
|
||||
siteUrl: getSiteUrl()
|
||||
}
|
||||
}, function (error, result) {
|
||||
if(result){
|
||||
// console.log(result);
|
||||
var currentVersion = telescopeVersion;
|
||||
var newVersion = "0.9.5";
|
||||
var newVersion = result.content;
|
||||
var message = "";
|
||||
if (compareVersions(currentVersion, newVersion)){
|
||||
Session.set('updateVersion', newVersion);
|
||||
|
|
Loading…
Add table
Reference in a new issue