mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Added toasts for feedback, removed dead function.
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
"marked": "chjj/marked#~0.3.2",
|
||||
"requirejs": "jrburke/requirejs-bower#~2.1.15",
|
||||
"paper-progress": "Polymer/paper-progress#~0.5.0",
|
||||
"core-animated-pages": "Polymer/core-animated-pages#~0.5.1"
|
||||
"core-animated-pages": "Polymer/core-animated-pages#~0.5.1",
|
||||
"paper-toast": "Polymer/paper-toast#~0.5.1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -808,7 +808,9 @@ function redatePlugins(evt) {
|
||||
showMessageDialog('Redate Plugins', 'This feature is provided so that modders using the Creation Kit may set the load order it uses. A side-effect is that any subscribed Steam Workshop mods will be re-downloaded by Steam. Do you wish to continue?', false, function(result){
|
||||
if (result) {
|
||||
loot.query('redatePlugins').then(function(response){
|
||||
showMessageBox('Redate Plugins', 'Plugins were successfully redated.');
|
||||
var toast = document.getElementById('toast');
|
||||
toast.text = 'Plugins were successfully redated.';
|
||||
toast.show();
|
||||
}).catch(processCefError);
|
||||
}
|
||||
});
|
||||
@@ -834,6 +836,10 @@ function clearAllMetadata(evt) {
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var toast = document.getElementById('toast');
|
||||
toast.text = 'All user-added metadata has been cleared.';
|
||||
toast.show();
|
||||
}
|
||||
}).catch(processCefError);
|
||||
}
|
||||
@@ -889,7 +895,11 @@ function copyContent(evt) {
|
||||
}]
|
||||
});
|
||||
|
||||
loot.query(request).catch(processCefError);
|
||||
loot.query(request).then(function(){
|
||||
var toast = document.getElementById('toast');
|
||||
toast.text = "LOOT's content has been copied to the clipboard.";
|
||||
toast.show();
|
||||
}).catch(processCefError);
|
||||
}
|
||||
function areSettingsValid() {
|
||||
/* Validate inputs individually. */
|
||||
@@ -902,22 +912,6 @@ function areSettingsValid() {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
function openMenu(evt) {
|
||||
if (!isVisible(evt.currentTarget.firstElementChild)) {
|
||||
showElement(evt.currentTarget.firstElementChild)
|
||||
|
||||
/* To prevent the click event closing this menu just after it was
|
||||
opened, stop the current event and send off a new one. */
|
||||
evt.stopPropagation();
|
||||
|
||||
document.body.dispatchEvent(new CustomEvent('click', {
|
||||
bubbles: true,
|
||||
detail: {
|
||||
newMenu: evt.currentTarget.firstElementChild
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
function switchSidebarTab(evt) {
|
||||
evt.target.nextElementSibling.selected = evt.target.selected;
|
||||
}
|
||||
@@ -1124,7 +1118,11 @@ function handleCopyMetadata(evt) {
|
||||
]
|
||||
});
|
||||
|
||||
loot.query(request).catch(processCefError);
|
||||
loot.query(request).then(function(){
|
||||
var toast = document.getElementById('toast');
|
||||
toast.text = 'The metadata for ' + evt.target.getName() + ' has been copied to the clipboard.';
|
||||
toast.show();
|
||||
}).catch(processCefError);
|
||||
}
|
||||
function handleClearMetadata(evt) {
|
||||
showMessageDialog('Clear Plugin Metadata', 'Are you sure you want to clear all existing user-added metadata from "' + evt.target.getName() + '"?', false, function(result){
|
||||
@@ -1155,6 +1153,9 @@ function handleClearMetadata(evt) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
var toast = document.getElementById('toast');
|
||||
toast.text = 'The user-added metadata for ' + evt.target.getName() + ' has been cleared.';
|
||||
toast.show();
|
||||
}
|
||||
}).catch(processCefError);
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
<link rel="import" href="bower_components/paper-dialog/paper-dialog-transition.html">
|
||||
<link rel="import" href="bower_components/paper-dropdown/paper-dropdown.html">
|
||||
<link rel="import" href="bower_components/paper-progress/paper-progress.html">
|
||||
<link rel="import" href="bower_components/paper-toast/paper-toast.html">
|
||||
|
||||
<script src="bower_components/requirejs/require.js"></script>
|
||||
</head>
|
||||
@@ -193,6 +194,11 @@
|
||||
<!-- Generated plugin <loot-plugin-card> elements go here. -->
|
||||
</div>
|
||||
</core-drawer-panel>
|
||||
<paper-toast id="toast"></paper-toast>
|
||||
<loot-dialog id="progressDialog">
|
||||
<paper-progress indeterminate></paper-progress>
|
||||
<p>Calculating the last digit of π...</p>
|
||||
</loot-dialog>
|
||||
|
||||
<loot-dialog id="about" heading="About LOOT">
|
||||
<p>Version <span id="LOOTVersion"></span> (build <span id="LOOTBuild"></span>)</p>
|
||||
@@ -262,12 +268,6 @@ along with LOOT. If not, see <http://www.gnu.org/licenses/>.
|
||||
<paper-button class="cancel" affirmative>Cancel</paper-button>
|
||||
</loot-dialog>
|
||||
|
||||
<div id="hoverText" class="hidden"></div>
|
||||
<loot-dialog id="progressDialog">
|
||||
<paper-progress indeterminate></paper-progress>
|
||||
<p>Calculating the last digit of π...</p>
|
||||
</loot-dialog>
|
||||
|
||||
<loot-dialog id="firstRun" heading="First-Time Tips">
|
||||
<p>This appears to be the first time you have run LOOT v<span id="firstTimeLootVersion"></span>. Here are some tips to help you get started with the interface.</p>
|
||||
<ul>
|
||||
|
||||
Reference in New Issue
Block a user