Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.
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
8 changes: 7 additions & 1 deletion src/sidebar/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function getPadStats(editor) {
* if false, animate to savingLayout (sync icon on left)
* @param {Boolean} warning Apply yellow warning styling on toolbar
*/
function setAnimation( animateSyncIcon = true, syncingLayout, warning ) { // animateSyncIcon, syncingLayout, warning
function setAnimation( animateSyncIcon = true, syncingLayout, warning, syncSuccess ) { // animateSyncIcon, syncingLayout, warning, syncSuccess
const footerButtons = document.getElementById('footer-buttons');
const enableSync = document.getElementById('enable-sync');
const savingIndicator = document.getElementById('saving-indicator');
Expand Down Expand Up @@ -170,6 +170,12 @@ function setAnimation( animateSyncIcon = true, syncingLayout, warning ) { // ani
} else if (warning === false && footerButtons.classList.contains('warning')) {
footerButtons.classList.remove('warning');
}

if (syncSuccess === true) {
footerButtons.classList.add('actionable');
} else {
footerButtons.classList.remove('actionable');
}
}

/**
Expand Down
4 changes: 1 addition & 3 deletions src/sidebar/panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,13 +326,11 @@ function getLastSyncedTime() {

if (isAuthenticated) {
giveFeedbackButton.style.display = 'none';
savingIndicator.classList.add('actionable');
savingIndicator.innerHTML = browser.i18n.getMessage('syncComplete3', formatFooterTime(lastModified));
disconnectSync.style.display = 'block';
isAuthenticated = true;
setAnimation(false, true);
setAnimation(false, true, false, true); // animateSyncIcon, syncingLayout, warning, syncSuccess
} else {
savingIndicator.classList.remove('actionable');
savingIndicator.textContent = browser.i18n.getMessage('changesSaved', formatFooterTime());
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/sidebar/styles-dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ body {
background-color: #3d4352;
}

#footer-buttons.actionable div:first-child
{
color: white;
}

::-moz-selection {
background-color: #5675B9;
color: #fff;
Expand Down
14 changes: 6 additions & 8 deletions src/sidebar/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@ footer {
transition: background var(--sync-animation-duration) cubic-bezier(.07,.95,0,1);
}

#footer-buttons.warning div:first-child {
color: black;
}

#footer-buttons div:first-child {
position: relative;
flex: 1 0;
Expand All @@ -144,6 +140,12 @@ footer {
transition: padding 0s .2s;
}

#footer-buttons.warning div:first-child,
#footer-buttons.actionable div:first-child
{
color: black;
}

/* Hide saving-indication then move enable-sync then show saving-indicator */
@keyframes blink {
0% { opacity: 1; }
Expand Down Expand Up @@ -425,7 +427,3 @@ CKEditor overrides
padding: 0.1em;
box-shadow: none;
}

.actionable {
color: black;
}