修复内容: 1. 文件列表 - 列表视图文件名溢出控制 2. 用户列表 - 用户名和邮箱溢出控制 3. 分享列表 - 文件路径和分享链接溢出控制 所有长文本现在都会正确显示省略号,不会导致UI布局异常 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
28 lines
960 B
JavaScript
28 lines
960 B
JavaScript
const { ShareDB } = require('./database');
|
|
|
|
// 测试过期验证
|
|
console.log('=== 测试分享过期验证 ===\n');
|
|
|
|
// 获取所有分享
|
|
const { db } = require('./database');
|
|
const allShares = db.prepare('SELECT share_code, created_at, expires_at, datetime("now") as current_time FROM shares LIMIT 5').all();
|
|
|
|
console.log('数据库中的分享:');
|
|
allShares.forEach(share => {
|
|
console.log(`\n分享码: ${share.share_code}`);
|
|
console.log(`创建时间: ${share.created_at}`);
|
|
console.log(`到期时间: ${share.expires_at || '永久'}`);
|
|
console.log(`当前时间: ${share.current_time}`);
|
|
|
|
if (share.expires_at) {
|
|
const isExpired = share.expires_at <= share.current_time;
|
|
console.log(`是否过期: ${isExpired ? '是' : '否'}`);
|
|
}
|
|
|
|
// 测试findByCode
|
|
const found = ShareDB.findByCode(share.share_code);
|
|
console.log(`findByCode结果: ${found ? '找到' : '未找到(已过滤)'}`);
|
|
});
|
|
|
|
console.log('\n=== 测试完成 ===');
|