Fileview: list view display modified date instead of mime

This commit is contained in:
DanyLE 2022-07-17 22:21:10 +02:00
parent f7081ae48a
commit 6cbb463f6f
3 changed files with 24 additions and 5 deletions

Binary file not shown.

View File

@ -980,7 +980,7 @@ namespace OS {
<afx-vbox>
<div style="text-align:center; margin-top:10px;" data-height="50">
<h3 style = "margin:0;padding:0;">
<afx-label data-id = 'mylabel'></afx-label>
<afx-label data-id = 'mylabel' style="display: inline-block;"></afx-label>
</h3>
<i><p style = "margin:0; padding:0" data-id = 'mydesc'></p></i>
</div>

View File

@ -97,8 +97,24 @@ namespace OS {
let t1 = r1[i].text;
let t2 = r2[i].text;
if(!t1 || !t2) return 0;
t1 = t1.toString().toLowerCase();
t2 = t2.toString().toLowerCase();
if(i == 1)
{
// sort by date
t1 = new Date(t1);
t2 = new Date(t2);
}
else if(i==2)
{
// sort by size
t1 = parseInt(t1);
t2 = parseInt(t2);
}
else
{
// sort by name
t1 = t1.toString().toLowerCase();
t2 = t2.toString().toLowerCase();
}
if(this.__f)
{
this.desc = ! this.desc;
@ -118,7 +134,10 @@ namespace OS {
text: "__(File name)",
sort: fn
},
{ text: "__(Type)" },
{
text: "__(Modified)",
sort: fn
},
{
text: "__(Size)",
sort: fn
@ -497,7 +516,7 @@ namespace OS {
const row = [
v,
{
text: v.mime,
text: v.mtime,
data: v,
},
{