Remove deprecated dropbox and add sync button (#1025)
* Remove deprecated dropbox and add sync button * re-use existing message
This commit is contained in:
parent
5109f9abb3
commit
01cfb435f6
27
manage.html
27
manage.html
|
@ -368,30 +368,9 @@
|
||||||
<summary><h2 id="backup-title" i18n-text="backupButtons"></h2></summary>
|
<summary><h2 id="backup-title" i18n-text="backupButtons"></h2></summary>
|
||||||
<span id="backup-message" i18n-text="backupMessage"></span>
|
<span id="backup-message" i18n-text="backupMessage"></span>
|
||||||
<div id="backup-buttons">
|
<div id="backup-buttons">
|
||||||
<div class="dropdown">
|
<button id="file-all-styles" i18n-text="exportLabel"></button>
|
||||||
<button class="dropbtn">
|
<button id="unfile-all-styles" i18n-text="importLabel"></button>
|
||||||
<span>Export</span>
|
<button id="sync-styles" i18n-text="optionsCustomizeSync"></button>
|
||||||
<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>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|
|
@ -11,14 +11,8 @@ let bulkChangeQueue = [];
|
||||||
let bulkChangeTime = 0;
|
let bulkChangeTime = 0;
|
||||||
|
|
||||||
onDOMready().then(() => {
|
onDOMready().then(() => {
|
||||||
$('#file-all-styles').onclick = event => {
|
$('#file-all-styles').onclick = () => exportToFile();
|
||||||
event.preventDefault();
|
$('#unfile-all-styles').onclick = () => importFromFile({fileTypeFilter: STYLUS_BACKUP_FILE_EXT});
|
||||||
exportToFile();
|
|
||||||
};
|
|
||||||
$('#unfile-all-styles').onclick = event => {
|
|
||||||
event.preventDefault();
|
|
||||||
importFromFile({fileTypeFilter: STYLUS_BACKUP_FILE_EXT});
|
|
||||||
};
|
|
||||||
|
|
||||||
Object.assign(document.body, {
|
Object.assign(document.body, {
|
||||||
ondragover(event) {
|
ondragover(event) {
|
||||||
|
|
|
@ -291,7 +291,8 @@ a:hover {
|
||||||
padding-top: .1rem;
|
padding-top: .1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
#options-buttons button,
|
#options-buttons > a,
|
||||||
|
#options-buttons > button,
|
||||||
#backup-buttons button {
|
#backup-buttons button {
|
||||||
margin: 0 .2rem .5rem 0;
|
margin: 0 .2rem .5rem 0;
|
||||||
}
|
}
|
||||||
|
@ -1046,54 +1047,6 @@ input[id^="manage.newUI"] {
|
||||||
text-overflow: ellipsis;
|
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 */
|
/* sort font */
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'sorticon';
|
font-family: 'sorticon';
|
||||||
|
@ -1302,14 +1255,3 @@ input[id^="manage.newUI"] {
|
||||||
margin-left: -2px;
|
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() {
|
function initGlobalEvents() {
|
||||||
installed = $('#installed');
|
installed = $('#installed');
|
||||||
installed.onclick = handleEvent.entryClicked;
|
installed.onclick = handleEvent.entryClicked;
|
||||||
$('#manage-options-button').onclick = () => {
|
$('#manage-options-button').onclick = () => router.updateHash('#stylus-options');
|
||||||
router.updateHash('#stylus-options');
|
$('#sync-styles').onclick = () => router.updateHash('#stylus-options');
|
||||||
};
|
|
||||||
{
|
{
|
||||||
const btn = $('#manage-shortcuts-button');
|
const btn = $('#manage-shortcuts-button');
|
||||||
btn.onclick = btn.onclick || (() => openURL({url: URLS.configureCommands}));
|
btn.onclick = btn.onclick || (() => openURL({url: URLS.configureCommands}));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user