Integrate new Hasheous client (#354)
The new Hasheous client has been integrated into Gaseous to take advantage of the new updates to Hasheous that bring improved matching and community contributions.
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
},
|
||||
processResults: function (data) {
|
||||
var arr = [];
|
||||
|
||||
|
||||
arr.push({
|
||||
id: 0,
|
||||
text: 'Any'
|
||||
@@ -74,11 +74,11 @@
|
||||
ajaxCall(
|
||||
'/api/v1.1/Library?Name=' + encodeURIComponent(libName) + '&DefaultPlatformId=' + libPlatform[0].id + '&Path=' + encodeURIComponent(libPath),
|
||||
'POST',
|
||||
function(result) {
|
||||
function (result) {
|
||||
drawLibrary();
|
||||
closeSubDialog();
|
||||
closeDialog();
|
||||
},
|
||||
function(error) {
|
||||
function (error) {
|
||||
alert('An error occurred while creating the library:\n\n' + JSON.stringify(error.responseText));
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<div id="properties_toc">
|
||||
<div id="properties_toc_general" name="properties_toc_item" onclick="SelectTab('general');">General</div>
|
||||
<div id="properties_toc_archive" name="properties_toc_item" onclick="SelectTab('archive');" style="display: none;">Archive Contents</div>
|
||||
<div id="properties_toc_attributes" name="properties_toc_item" onclick="SelectTab('attributes');" style="display: none;">Attributes</div>
|
||||
<div id="properties_toc_archive" name="properties_toc_item" onclick="SelectTab('archive');" style="display: none;">
|
||||
Archive Contents</div>
|
||||
<div id="properties_toc_attributes" name="properties_toc_item" onclick="SelectTab('attributes');"
|
||||
style="display: none;">Attributes</div>
|
||||
<div id="properties_toc_match" name="properties_toc_item" onclick="SelectTab('match');">Title Match</div>
|
||||
<!--<div id="properties_toc_manage" name="properties_toc_item" onclick="SelectTab('manage');">Manage</div>-->
|
||||
</div>
|
||||
@@ -59,7 +61,7 @@
|
||||
</div>
|
||||
|
||||
<div id="properties_bodypanel_attributes" name="properties_tab" style="display: none;">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="properties_bodypanel_match" name="properties_tab" style="display: none;">
|
||||
@@ -78,7 +80,9 @@
|
||||
<td style="width: 75%;"><select id="properties_fixgame" style="width: 100%;"></select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: right;"><button id="properties_fixclear" value="Clear Match" onclick="ClearFixedGame();">Clear Match</button><button id="properties_fixsave" value="Save Match" onclick="SaveFixedGame();">Save Match</button></td>
|
||||
<td colspan="2" style="text-align: right;"><button id="properties_fixclear" value="Clear Match"
|
||||
onclick="ClearFixedGame();">Clear Match</button><button id="properties_fixsave"
|
||||
value="Save Match" onclick="SaveFixedGame();">Save Match</button></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
@@ -144,7 +148,7 @@
|
||||
document.getElementById('romDelete').style.display = 'none';
|
||||
}
|
||||
|
||||
if (result.attributes.length > 0) {
|
||||
if (result.attributes) {
|
||||
document.getElementById('properties_bodypanel_attributes').appendChild(BuildAttributesTable(result.attributes, result.source));
|
||||
document.getElementById('properties_bodypanel_archive_content').appendChild(BuildArchiveTable(result.attributes, result.source));
|
||||
}
|
||||
@@ -276,8 +280,8 @@
|
||||
var aTable = document.createElement('table');
|
||||
aTable.style.width = '100%';
|
||||
|
||||
for (var i = 0; i < attributes.length; i++) {
|
||||
if (attributes[i].key != "ZipContents") {
|
||||
for (const [key, value] of Object.entries(attributes)) {
|
||||
if (key != "ZipContents") {
|
||||
// show attributes button
|
||||
document.getElementById('properties_toc_attributes').style.display = '';
|
||||
var aRow = document.createElement('tr');
|
||||
@@ -285,15 +289,15 @@
|
||||
var aTitleCell = document.createElement('th');
|
||||
aTitleCell.width = "25%";
|
||||
if (sourceName == "TOSEC") {
|
||||
aTitleCell.innerHTML = ConvertTOSECAttributeName(attributes[i].key);
|
||||
aTitleCell.innerHTML = ConvertTOSECAttributeName(key);
|
||||
} else {
|
||||
aTitleCell.innerHTML = attributes[i].key;
|
||||
aTitleCell.innerHTML = key;
|
||||
}
|
||||
aRow.appendChild(aTitleCell);
|
||||
|
||||
var aValueCell = document.createElement('td');
|
||||
aValueCell.width = "75%";
|
||||
aValueCell.innerHTML = attributes[i].value;
|
||||
aValueCell.innerHTML = value;
|
||||
aRow.appendChild(aValueCell);
|
||||
|
||||
aTable.appendChild(aRow);
|
||||
@@ -304,13 +308,13 @@
|
||||
}
|
||||
|
||||
function BuildArchiveTable(attributes, sourceName) {
|
||||
for (var i = 0; i < attributes.length; i++) {
|
||||
if (attributes[i].key == "ZipContents") {
|
||||
var archiveContent = JSON.parse(attributes[i].value);
|
||||
|
||||
for (const [key, value] of Object.entries(attributes)) {
|
||||
if (key == "ZipContents") {
|
||||
var archiveContent = JSON.parse(value);
|
||||
|
||||
// show archive button
|
||||
document.getElementById('properties_toc_archive').style.display = '';
|
||||
|
||||
|
||||
var aTable = document.createElement('table');
|
||||
aTable.className = 'romtable';
|
||||
aTable.setAttribute('cellspacing', 0);
|
||||
@@ -343,6 +347,17 @@
|
||||
hRow.appendChild(aHashCell);
|
||||
aBody.appendChild(hRow);
|
||||
|
||||
if (archiveContent[r].isSignatureSelector == true) {
|
||||
var sigRow = document.createElement('tr');
|
||||
|
||||
var sigCell = document.createElement('td');
|
||||
sigCell.setAttribute('colspan', 2);
|
||||
sigCell.style.paddingLeft = '20px';
|
||||
sigCell.innerHTML = "Hash used to identify this archive";
|
||||
sigRow.appendChild(sigCell);
|
||||
aBody.appendChild(sigRow);
|
||||
}
|
||||
|
||||
aTable.appendChild(aBody);
|
||||
}
|
||||
}
|
||||
@@ -354,18 +369,18 @@
|
||||
function ConvertTOSECAttributeName(attributeName) {
|
||||
var tosecAttributeNames = {
|
||||
"cr": "Cracked",
|
||||
"f" : "Fixed",
|
||||
"h" : "Hacked",
|
||||
"m" : "Modified",
|
||||
"p" : "Pirated",
|
||||
"t" : "Trained",
|
||||
"f": "Fixed",
|
||||
"h": "Hacked",
|
||||
"m": "Modified",
|
||||
"p": "Pirated",
|
||||
"t": "Trained",
|
||||
"tr": "Translated",
|
||||
"o" : "Over Dump",
|
||||
"u" : "Under Dump",
|
||||
"v" : "Virus",
|
||||
"b" : "Bad Dump",
|
||||
"a" : "Alternate",
|
||||
"!" : "Known Verified Dump"
|
||||
"o": "Over Dump",
|
||||
"u": "Under Dump",
|
||||
"v": "Virus",
|
||||
"b": "Bad Dump",
|
||||
"a": "Alternate",
|
||||
"!": "Known Verified Dump"
|
||||
};
|
||||
|
||||
if (attributeName in tosecAttributeNames) {
|
||||
@@ -378,4 +393,4 @@
|
||||
SelectTab('general');
|
||||
|
||||
document.getElementById('romDelete').setAttribute("onclick", "showSubDialog('romdelete', " + modalVariables + ");");
|
||||
</script>
|
||||
</script>
|
||||
Reference in New Issue
Block a user