Remove deprecated dropbox and add sync button
This commit is contained in:
parent
e0aadb752a
commit
544c856c7a
|
@ -1421,6 +1421,10 @@
|
|||
"message": "As a security precaution, the browser prohibits extensions from affecting its built-in pages (like chrome://version, the standard new tab page as of Chrome 61, about:addons, and so on) as well as other extensions' pages. Each browser also restricts access to its own extensions gallery (like Chrome Web Store or AMO).",
|
||||
"description": "Sub-note in the toolbar pop-up when on a URL Stylus can't affect"
|
||||
},
|
||||
"syncLabel": {
|
||||
"message": "Sync to cloud",
|
||||
"description": "Sync button text"
|
||||
},
|
||||
"syncStorageErrorSaving": {
|
||||
"message": "The value cannot be saved. Try reducing the amount of text.",
|
||||
"description": "Displayed when trying to save an excessively big value via storage.sync API"
|
||||
|
|
27
manage.html
27
manage.html
|
@ -368,30 +368,9 @@
|
|||
<summary><h2 id="backup-title" i18n-text="backupButtons"></h2></summary>
|
||||
<span id="backup-message" i18n-text="backupMessage"></span>
|
||||
<div id="backup-buttons">
|
||||
<div class="dropdown">
|
||||
<button class="dropbtn">
|
||||
<span>Export</span>
|
||||
<svg class="svg-icon select-arrow"><use xlink:href="#svg-icon-select-arrow"/></svg>
|
||||
</button>
|
||||
|
||||
<div class="dropdown-content">
|
||||
<a href="#" id="file-all-styles" i18n-text="bckpInstStyles"></a>
|
||||
<a id="sync-dropbox-export" i18n-text="syncDropboxStyles" i18n-title="syncDropboxDeprecated"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="dropdown">
|
||||
<button class="dropbtn">
|
||||
<span>Import</span>
|
||||
<svg class="svg-icon select-arrow"><use xlink:href="#svg-icon-select-arrow"/></svg>
|
||||
</button>
|
||||
|
||||
<div class="dropdown-content">
|
||||
<a href="#" id="unfile-all-styles" i18n-text="retrieveBckp"></a>
|
||||
<a id="sync-dropbox-import" i18n-text="retrieveDropboxSync" i18n-title="syncDropboxDeprecated"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button id="file-all-styles" i18n-text="exportLabel"></button>
|
||||
<button id="unfile-all-styles" i18n-text="importLabel"></button>
|
||||
<button id="sync-styles" i18n-text="syncLabel"></button>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
|
|
|
@ -11,14 +11,8 @@ let bulkChangeQueue = [];
|
|||
let bulkChangeTime = 0;
|
||||
|
||||
onDOMready().then(() => {
|
||||
$('#file-all-styles').onclick = event => {
|
||||
event.preventDefault();
|
||||
exportToFile();
|
||||
};
|
||||
$('#unfile-all-styles').onclick = event => {
|
||||
event.preventDefault();
|
||||
importFromFile({fileTypeFilter: STYLUS_BACKUP_FILE_EXT});
|
||||
};
|
||||
$('#file-all-styles').onclick = () => exportToFile();
|
||||
$('#unfile-all-styles').onclick = () => importFromFile({fileTypeFilter: STYLUS_BACKUP_FILE_EXT});
|
||||
|
||||
Object.assign(document.body, {
|
||||
ondragover(event) {
|
||||
|
|
|
@ -291,7 +291,8 @@ a:hover {
|
|||
padding-top: .1rem;
|
||||
}
|
||||
|
||||
#options-buttons button,
|
||||
#options-buttons > a,
|
||||
#options-buttons > button,
|
||||
#backup-buttons button {
|
||||
margin: 0 .2rem .5rem 0;
|
||||
}
|
||||
|
@ -1046,54 +1047,6 @@ input[id^="manage.newUI"] {
|
|||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* export/import buttons */
|
||||
#backup-buttons .dropbtn {
|
||||
padding: 3px 7px;
|
||||
cursor: pointer;
|
||||
text-overflow: inherit;
|
||||
}
|
||||
|
||||
#backup-buttons .dropbtn span {
|
||||
display: inline-block;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
#backup-buttons .dropdown {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#backup-buttons .dropdown-content {
|
||||
display: none;
|
||||
position: absolute;
|
||||
background-color: #f9f9f9;
|
||||
min-width: 160px;
|
||||
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#backup-buttons .dropdown-content a {
|
||||
color: black;
|
||||
padding: 8px;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#backup-buttons .dropdown-content a:hover {
|
||||
/* background-color: #f2f2f2 */
|
||||
background-color: #e9e9e9
|
||||
}
|
||||
|
||||
#backup-buttons .dropdown:hover .dropdown-content {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#backup-buttons .dropdown:hover .dropbtn {
|
||||
background-color: hsl(0, 0%, 95%);
|
||||
border-color: hsl(0, 0%, 52%);
|
||||
/* background-color: #3e8e41; */
|
||||
}
|
||||
|
||||
/* sort font */
|
||||
@font-face {
|
||||
font-family: 'sorticon';
|
||||
|
@ -1302,14 +1255,3 @@ input[id^="manage.newUI"] {
|
|||
margin-left: -2px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Deprecated dropbox backup (dropbox-sync) */
|
||||
#sync-dropbox-export,
|
||||
#sync-dropbox-import {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
#backup-buttons .dropdown-content #sync-dropbox-export:hover,
|
||||
#backup-buttons .dropdown-content #sync-dropbox-import:hover {
|
||||
background: transparent;
|
||||
}
|
||||
|
|
|
@ -86,9 +86,8 @@ function onRuntimeMessage(msg) {
|
|||
function initGlobalEvents() {
|
||||
installed = $('#installed');
|
||||
installed.onclick = handleEvent.entryClicked;
|
||||
$('#manage-options-button').onclick = () => {
|
||||
router.updateHash('#stylus-options');
|
||||
};
|
||||
$('#manage-options-button').onclick = () => router.updateHash('#stylus-options');
|
||||
$('#sync-styles').onclick = () => router.updateHash('#stylus-options');
|
||||
{
|
||||
const btn = $('#manage-shortcuts-button');
|
||||
btn.onclick = btn.onclick || (() => openURL({url: URLS.configureCommands}));
|
||||
|
|
Loading…
Reference in New Issue
Block a user