mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-18 22:56:58 +00:00
6f1d17c954
If one mod is not signed or broken in any other way, mod.io downloader fails and does not display any mod. The problem with unsigned mod is that its metadata are empty. That means one cannot break mod io downloader with mods having invalid data. mark mod as invalid and display in list as disabled and display reason instead description to not spam ugly error messages on screen as this is not error by the game but of the moder report failed signatures back to list of mods fail if property is not set using strict mode when getting from js check in js for undefined values Allow to filter only valid mods. Differential Revision: https://code.wildfiregames.com/D2114 Reviewed by: @Itms Fixes: #5459 This was SVN commit r23821.
125 lines
4.8 KiB
XML
125 lines
4.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<objects>
|
|
|
|
<script directory="gui/common/"/>
|
|
<script directory="gui/modio/"/>
|
|
|
|
<object type="image" sprite="ModernFade"/>
|
|
|
|
<object name="modio" type="image" style="ModernDialog" size="10% 10% 90% 90%">
|
|
|
|
<action on="Tick">
|
|
onTick();
|
|
</action>
|
|
|
|
<!-- Page Title -->
|
|
<object style="ModernLabelText" type="text" size="50%-128 -18 50%+128 14">
|
|
<translatableAttribute id="caption">mod.io Mods</translatableAttribute>
|
|
</object>
|
|
|
|
<!-- Available Mods Wrapper -->
|
|
<object name="modsAvailable" size="16 20 100%-16 100%-70">
|
|
|
|
<object style="ModernLabelText" type="text" size="0 5 100% 25">
|
|
<translatableAttribute id="caption">Available Mods</translatableAttribute>
|
|
</object>
|
|
|
|
<object name="modFilter"
|
|
type="input"
|
|
style="ModernInput"
|
|
size="16 0 200 24"
|
|
>
|
|
<action on="Press">displayMods();</action>
|
|
<action on="TextEdit">displayMods();</action>
|
|
</object>
|
|
|
|
<object name="modsAvailableList"
|
|
type="olist"
|
|
style="ModernSortedList"
|
|
size="0 30 100%-2 100%"
|
|
sortable="true"
|
|
selected_column="name"
|
|
selected_column_order="1"
|
|
font="sans-stroke-13"
|
|
>
|
|
<action on="SelectionChange">showModDescription();</action>
|
|
<action on="SelectionColumnChange">displayMods();</action>
|
|
<action on="MouseLeftDoubleClickItem">downloadMod();</action>
|
|
|
|
<!-- List headers -->
|
|
<!-- Keep in sync with mod property names -->
|
|
<column id="name_id" color="255 255 255" width="20%">
|
|
<translatableAttribute id="heading">Name</translatableAttribute>
|
|
</column>
|
|
<column id="version" color="255 255 255" width="15%">
|
|
<translatableAttribute id="heading">Version</translatableAttribute>
|
|
</column>
|
|
<column id="name" color="255 255 255" width="20%">
|
|
<translatableAttribute id="heading">Mod Label</translatableAttribute>
|
|
</column>
|
|
<column id="filesize" color="255 255 255" width="20%">
|
|
<translatableAttribute id="heading">File Size</translatableAttribute>
|
|
</column>
|
|
<column id="dependencies" color="255 255 255" width="25%">
|
|
<translatableAttribute id="heading">Dependencies</translatableAttribute>
|
|
</column>
|
|
</object>
|
|
|
|
<object name="modDescription" type="text" style="ModmodScrollbar" size="0 100% 100%-16 100%+28" />
|
|
<object name="modError" type="text" style="ModmodScrollbar" textcolor="255 0 0" size="0 100% 100%-16 100%+28" />
|
|
</object>
|
|
|
|
<!-- Right Panel: Compatibility Filter-->
|
|
<object name="rightPanel" size="100%-250 20 100%-10 40" >
|
|
<!-- Compatibility Filter Checkbox -->
|
|
<object name="compatibilityFilter" type="checkbox" checked="true" style="ModernTickBox" size="0 4 20 100%">
|
|
<action on="Press">displayMods();</action>
|
|
</object>
|
|
<!-- Compatibility Filter Label -->
|
|
<object type="text" size="20 2 100% 100%" text_align="left" textcolor="white">
|
|
<translatableAttribute id="caption">Filter valid mods</translatableAttribute>
|
|
</object>
|
|
</object>
|
|
|
|
<!-- Buttons -->
|
|
<object type="button" style="ModernButtonRed" size="100%-552 100%-44 100%-372 100%-16">
|
|
<translatableAttribute id="caption">Back</translatableAttribute>
|
|
<action on="Press">closePage();</action>
|
|
</object>
|
|
|
|
<object name="refreshButton" type="button" style="ModernButtonRed" size="100%-368 100%-44 100%-188 100%-16" enabled="false">
|
|
<translatableAttribute id="caption">Refresh List</translatableAttribute>
|
|
<action on="Press">updateModList();</action>
|
|
</object>
|
|
|
|
<object name="downloadButton" type="button" style="ModernButtonRed" size="100%-184 100%-44 100%-16 100%-16" enabled="false">
|
|
<translatableAttribute id="caption">Download</translatableAttribute>
|
|
<action on="Press">downloadMod();</action>
|
|
</object>
|
|
|
|
</object>
|
|
|
|
<!-- Download/Request-in-progress Dialog -->
|
|
<!-- Captions are supplied in modio.js -->
|
|
<!-- This must be after the buttons, and with "z" > 20, else it and/or other objects will not be drawn correctly -->
|
|
<object name="downloadDialog" type="image" sprite="ModernFade" z="30">
|
|
<object type="image" style="ModernDialog" size="50%-210 50%-96 50%+210 50%+96">
|
|
|
|
<object name="downloadDialog_title" type="text" style="ModernLabelText" size="50%-128 0%-16 50%+128 16"/>
|
|
|
|
<object name="downloadDialog_caption" type="text" style="ModernLabelText" size="0 0 100% 40%"/>
|
|
|
|
<object name="downloadDialog_progress" size="50%-160 35%-16 50%+160 35%+16" type="image" style="ModernProgressBarBackground">
|
|
<object name="downloadDialog_progressBar" type="progressbar" style="ModernProgressBar"/>
|
|
<object name="downloadDialog_progressText" type="text" style="ModernProgressBarText"/>
|
|
</object>
|
|
|
|
<object name="downloadDialog_status" type="text" style="ModernLabelText" size="0 35%+16 100% 35%+64"/>
|
|
|
|
<object name="downloadDialog_button" type="button" style="ModernButtonRed" size="50%-120 80%-14 50%+120 80%+14" hotkey="cancel"/>
|
|
|
|
</object>
|
|
</object>
|
|
</objects>
|