webspresso 0.0.70 → 0.0.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1484,14 +1484,15 @@ function formatCellValue(value, col) {
|
|
|
1484
1484
|
}
|
|
1485
1485
|
return String(value);
|
|
1486
1486
|
|
|
1487
|
-
case 'text':
|
|
1487
|
+
case 'text': {
|
|
1488
1488
|
const textStr = String(value);
|
|
1489
1489
|
return textStr.length > 50 ? textStr.substring(0, 50) + '...' : textStr;
|
|
1490
|
+
}
|
|
1490
1491
|
|
|
1491
1492
|
case 'file': {
|
|
1492
1493
|
const s = String(value);
|
|
1493
1494
|
const short = s.length > 72 ? s.substring(0, 72) + '…' : s;
|
|
1494
|
-
if (/^https
|
|
1495
|
+
if (/^https?:\\/\\//.test(s) || s.startsWith('/')) {
|
|
1495
1496
|
return m('a.text-indigo-600.dark:text-indigo-400.hover:underline.break-all', {
|
|
1496
1497
|
href: s,
|
|
1497
1498
|
target: '_blank',
|
|
@@ -1501,9 +1502,10 @@ function formatCellValue(value, col) {
|
|
|
1501
1502
|
return short || m('span.text-gray-400', '—');
|
|
1502
1503
|
}
|
|
1503
1504
|
|
|
1504
|
-
default:
|
|
1505
|
+
default: {
|
|
1505
1506
|
const str = String(value);
|
|
1506
1507
|
return str.length > 100 ? str.substring(0, 100) + '...' : str;
|
|
1508
|
+
}
|
|
1507
1509
|
}
|
|
1508
1510
|
}
|
|
1509
1511
|
|