Skip to content

Commit

Permalink
Add setting's button to clear all extension's data
Browse files Browse the repository at this point in the history
  • Loading branch information
leeroybrun committed Nov 16, 2014
1 parent a87b498 commit bcd4491
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 2 deletions.
8 changes: 8 additions & 0 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,13 @@
"cancel": {
"message": "Cancel",
"description": ""
},
"clearData": {
"message": "Clear all data",
"description": ""
},
"clearDataText": {
"message": "If you have some troubles with the extension, you can clear all it's stored data here.",
"description": ""
}
}
8 changes: 8 additions & 0 deletions _locales/fr/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,13 @@
"cancel": {
"message": "Annuler",
"description": ""
},
"clearData": {
"message": "Effacer toutes les données",
"description": ""
},
"clearDataText": {
"message": "Si vous avez des problèmes avec l'extension, vous pouvez effacer toutes les données enregistrées ici.",
"description": ""
}
}
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Shazam2Spotify",
"version": "0.1.4",
"version": "0.1.6",
"manifest_version": 2,
"description": "__MSG_appDesc__",
"homepage_url": "http://www.leeroy.me",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chrome-shazam2spotify",
"version": "0.1.4",
"version": "0.1.6",
"author": "Leeroy Brun <[email protected]>",
"private": true,
"description": "Chrome extension used to export your Shazam tags to a Spotify playlist",
Expand Down
5 changes: 5 additions & 0 deletions popup/partials/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,9 @@ <h3>Spotify</h3>
<p><a class="pure-button button-warning" ng-click="spotify.disconnect()" chrome-translate>logout</a></p>
</div>
</div>
<div class="advanced-settings">
<h3 chrome-translate>clearData</h3>
<p chrome-translate>clearDataText</p>
<p><a class="pure-button pure-button-warning" ng-click="resetAll()" chrome-translate>clearData</a></p>
</div>
</div>
5 changes: 5 additions & 0 deletions src/popup/js/controllers/SettingsCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ angular.module('Shazam2Spotify').controller('SettingsCtrl', function($scope, $lo
$scope.spotify.loginStatus = status;
});

$scope.resetAll = function() {
chrome.storage.local.clear();
chrome.storage.sync.clear();
};

$scope.return = function() {
$location.path('/');
};
Expand Down

0 comments on commit bcd4491

Please sign in to comment.