Skip to content
Merged
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
10 changes: 6 additions & 4 deletions dist/doboard-widget-bundle.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/doboard-widget-bundle.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/doboard-widget-bundle.min.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ function bundle_src_js() {
const cssStream = processCSS();
const jsStream = gulp.src([
'js/src/api.js',
'js/src/constants.js',
'js/src/handlers.js',
'js/src/widget.js',
'js/src/main.js',
Expand Down
1 change: 1 addition & 0 deletions js/src/constants.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
const SPOTFIX_VERSION = "1.1.5";
6 changes: 3 additions & 3 deletions js/src/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,9 @@ class CleanTalkWidgetDoboard {
break;
case 'user_menu':
templateName = 'user_menu';
const versionFromLS = localStorage.getItem('spotfix_app_version');
const version = localStorage.getItem('spotfix_app_version') || SPOTFIX_VERSION;
templateVariables = {
spotfixVersion: versionFromLS ? 'Spotfix version ' + versionFromLS + '.' : '',
spotfixVersion: version ? 'Spotfix version ' + version + '.' : '',
avatar: SpotFixSVGLoader.getAsDataURI('iconAvatar'),
iconEye: SpotFixSVGLoader.getAsDataURI('iconEye'),
iconDoor: SpotFixSVGLoader.getAsDataURI('iconDoor'),
Expand Down Expand Up @@ -519,7 +519,7 @@ class CleanTalkWidgetDoboard {
const user = await getUserDetails(this.params);
const gitHubAppVersion = await getReleaseVersion();
let spotfixVersion = '';
const version = localStorage.getItem('spotfix_app_version') || gitHubAppVersion;
const version = localStorage.getItem('spotfix_app_version') || gitHubAppVersion || SPOTFIX_VERSION;
spotfixVersion = version ? `Spotfix version ${version}.` : '';

templateVariables.spotfixVersion = spotfixVersion || '';
Expand Down