Skip to content

Commit

Permalink
Fix for upgrade notice system
Browse files Browse the repository at this point in the history
Fix for upgrade notice system
  • Loading branch information
taoteh1221 committed Feb 13, 2022
1 parent e9784d3 commit e7dc58f
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 20 deletions.
8 changes: 8 additions & 0 deletions DOCUMENTATION-ETC/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,14 @@ v3.08.0
---------------------------------------------------------


---------------------------------------------------------
v3.08.1

-Fix for upgrade notice system

---------------------------------------------------------





Expand Down
6 changes: 3 additions & 3 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ var orient_screen = 0; // Normal (upright) = 0, Flipped (upside down) = 180, Sid

// Vertical position (adjusts the ticker's vertical position up/down)
// CAN BE NEGATIVE, TO GO THE OPPOSITE WAY
var vertical_position = 75; // Default = 37 (SMALL SCREEN), 75 (LARGE SCREEN)
var vertical_position = 82; // Default = 41 (SMALL SCREEN), 82 (LARGE SCREEN)


// Horizontal position (adjusts the ticker's horizontal position left/right)
Expand All @@ -120,11 +120,11 @@ var show_empty_volume = 'on'; // 'off' / 'on', Default = 'on'

// SECONDS between "slideshowing" multiple tickers (if multiple assets configured)
// SET TO 0 FOR AUTO MODE (trys to show all tickers in 1 minute, BUT has a 5 second per-ticker MINIMUM)
var slideshow_speed = 4; // Default = 4
var slideshow_speed = 6; // Default = 6


// Slideshow transition speed (fade out / fade in) IN SECONDS (can be decimals)
var transition_speed = 0.75; // Default = 0.75
var transition_speed = 1.65; // Default = 1.65


// ALL font weights (for ALL ticker text)
Expand Down
46 changes: 30 additions & 16 deletions js/core/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,26 +122,40 @@ function upgrade_check() {

var latest_version = data.tag_name;

var latest_version_description = data.body;

var latest_version_download = data.zipball_url;

var latest_version_installer = "wget --no-cache -O TICKER-INSTALL.bash https://git.io/Jqzjk;chmod +x TICKER-INSTALL.bash;sudo ./TICKER-INSTALL.bash";

// Remove anything AFTER formatting in brackets in the description (including the brackets)
// (removes the auto-added sourceforge download link)
latest_version_description = latest_version_description.split('[')[0];

latest_version_description = "Upgrade Description:\n\n" + latest_version_description.trim();

latest_version_description = latest_version_description + "\n\nAutomatic install terminal command:\n\n" + latest_version_installer + "\n\n";

window.latest_version_description = latest_version_description + "Manual Install File:\n\n" + latest_version_download + "\n\n(select all the text of either install method to auto-copy to clipboard)";


if ( app_version != latest_version ) {

var latest_version_description = data.body;

var latest_version_download = data.zipball_url;

var latest_version_installer = "wget --no-cache -O TICKER-INSTALL.bash https://git.io/Jqzjk;chmod +x TICKER-INSTALL.bash;sudo ./TICKER-INSTALL.bash";

// Remove anything AFTER formatting in brackets in the description (including the brackets)
// (removes the auto-added sourceforge download link)
latest_version_description = latest_version_description.split('[')[0];

latest_version_description = "Upgrade Description:\n\n" + latest_version_description.trim();

latest_version_description = latest_version_description
+ "\n\nAutomatic install terminal command:\n\n" + latest_version_installer + "\n\n";

window.latest_version_description = latest_version_description
+ "Manual Install File:\n\n" + latest_version_download
+ "\n\n(select all the text of either install method to auto-copy to clipboard)";

$("#upgrade_alert").css({ "display": "block" });

$("#upgrade_alert").html("<img id='upgrade_icon' src='images/upload-cloud-fill.svg' alt='' title='' /><span class='more_info' title=''>Upgrade available: v" + latest_version + "<br />(running v" + app_version + ")</span>").css("color", "#FFFF00");

}
else {
var latest_version_description;
var latest_version_download;
var latest_version_installer;
window.latest_version_description = '';
$("#upgrade_alert").css({ "display": "none" });
$("#upgrade_alert").html("").css("color", "#FFFF00");
}


Expand Down
2 changes: 1 addition & 1 deletion js/core/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


// Application version
var app_version = '3.08.0'; // 2022/FEBUARY/11TH
var app_version = '3.08.1'; // 2022/FEBUARY/13TH


// BLANK var inits
Expand Down

0 comments on commit e7dc58f

Please sign in to comment.