1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 23:33:31 +00:00

never option on save login notification

closes #85
This commit is contained in:
Kyle Spearrin
2017-06-13 13:59:16 -04:00
parent a598f08dce
commit 34696ed85f
8 changed files with 115 additions and 9 deletions

View File

@@ -54,7 +54,7 @@ img {
padding: 5px 0;
}
button {
button:not(.link) {
background-color: #3c8dbc;
padding: 5px 15px;
border-radius: 3px;
@@ -62,7 +62,20 @@ button {
border: 0;
}
button:hover {
button:not(.link):hover {
cursor: pointer;
background-color: #3681ad;
}
button.link {
background: none;
padding: 5px 15px;
color: #3c8dbc;
border: 0;
}
button.link:hover {
cursor: pointer;
background: none;
text-decoration: underline;
}

View File

@@ -28,7 +28,8 @@
<tbody>
<tr>
<td class="add-text"></td>
<td align="right" width="150">
<td align="right" width="300">
<button class="never-save link"></button>
<button class="add-save"></button>
</td>
</tr>

View File

@@ -6,13 +6,15 @@
$('#logo-link').attr('title', chrome.i18n.getMessage('appName'));
closeButton.attr('title', chrome.i18n.getMessage('close'));
$('#template-add .add-save').text(chrome.i18n.getMessage('notificationAddSave'));
$('#template-add .never-save').text(chrome.i18n.getMessage('notificationNeverSave'));
$('#template-add .add-text').text(chrome.i18n.getMessage('notificationAddDesc'));
if (getQueryVariable('add')) {
setContent(document.getElementById('template-add'));
var add = $('#template-add-clone'),
addButton = $('#template-add-clone .add-save');
addButton = $('#template-add-clone .add-save'),
neverButton = $('#template-add-clone .never-save');
$(addButton).click(function (e) {
e.preventDefault();
@@ -20,6 +22,13 @@
command: 'bgAddSave'
});
});
$(neverButton).click(function (e) {
e.preventDefault();
chrome.runtime.sendMessage({
command: 'bgNeverSave'
});
});
}
else if (getQueryVariable('info')) {
setContent(document.getElementById('template-alert'));