-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added an 'about streamus' menu option
It's boring for now. has the version/change log/website links in it, but I'll spice it up in the future.
- Loading branch information
Showing
14 changed files
with
181 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
define(function(require) { | ||
'use strict'; | ||
|
||
var Dialog = require('foreground/model/dialog'); | ||
var AboutStreamusView = require('foreground/view/dialog/aboutStreamusView'); | ||
var DialogView = require('foreground/view/dialog/dialogView'); | ||
|
||
var AboutStreamusDialogView = DialogView.extend({ | ||
id: 'aboutStreamusDialog', | ||
|
||
initialize: function() { | ||
this.model = new Dialog(); | ||
|
||
this.contentView = new AboutStreamusView({ | ||
}); | ||
|
||
DialogView.prototype.initialize.apply(this, arguments); | ||
} | ||
}); | ||
|
||
return AboutStreamusDialogView; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
define(function(require) { | ||
'use strict'; | ||
|
||
var DialogContentView = require('foreground/view/dialog/dialogContentView'); | ||
var AboutStreamusTemplate = require('text!template/dialog/aboutStreamus.html'); | ||
|
||
var AboutStreamusView = DialogContentView.extend({ | ||
id: 'aboutStreamus', | ||
template: _.template(AboutStreamusTemplate), | ||
|
||
templateHelpers: { | ||
applicationDetails: chrome.app.getDetails(), | ||
applicationDetailsMessage: chrome.i18n.getMessage('applicationDetails'), | ||
openHomepageMessage: chrome.i18n.getMessage('openHomepage'), | ||
versionMessage: chrome.i18n.getMessage('version'), | ||
openPatchNotesMessage: chrome.i18n.getMessage('openPatchNotes') | ||
}, | ||
|
||
ui: { | ||
openHomepage: '.openHomepage', | ||
openPatchNotes: '.openPatchNotes' | ||
}, | ||
|
||
events: { | ||
'click @ui.openHomepage': '_onClickOpenHomepage', | ||
'click @ui.openPatchNotes': '_onClickOpenPatchNotes' | ||
}, | ||
|
||
tabManager: null, | ||
|
||
initialize: function() { | ||
this.tabManager = Streamus.backgroundPage.tabManager; | ||
}, | ||
|
||
onRender: function() { | ||
|
||
}, | ||
|
||
_onClickOpenHomepage: function() { | ||
var homepageUrl = chrome.app.getDetails().homepage_url; | ||
this.tabManager.showWebsite(homepageUrl); | ||
}, | ||
|
||
_onClickOpenPatchNotes: function() { | ||
this.tabManager.showWebsite('https://github.com/MeoMix/StreamusChromeExtension/releases'); | ||
} | ||
}); | ||
|
||
return AboutStreamusView; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<section class='grouping'> | ||
<div class='grouping-header'> | ||
<%= applicationDetailsMessage %> | ||
</div> | ||
|
||
<div class='grouping-content'> | ||
<ul> | ||
<li class="openHomepage grouping-item listItem listItem--small listItem--clickable"> | ||
<%= openHomepageMessage %> | ||
</li> | ||
<li class="openPatchNotes grouping-item listItem listItem--small listItem--clickable"> | ||
<%= openPatchNotesMessage %> | ||
</li> | ||
<li class="grouping-item version"> | ||
<div class="simpleListItem listItem listItem--medium"> | ||
<div class="listItem-content"> | ||
<div class="listItem-title"> | ||
<%= versionMessage %> | ||
</div> | ||
|
||
<div class="listItem-details"> | ||
<%= applicationDetails.version %> | ||
</div> | ||
</div> | ||
</div> | ||
</li> | ||
</ul> | ||
</div> | ||
</section> |
Oops, something went wrong.