Merge pull request 'fix(views): wrap My Files table for mobile horizontal scroll' (#3) from chore/mobile-files-table-overflow into main
All checks were successful
Deploy to Homelab / deploy (push) Successful in 18s

This commit was merged in pull request #3.
This commit is contained in:
2026-05-04 00:15:22 +00:00
3 changed files with 18 additions and 9 deletions

View File

@@ -310,10 +310,16 @@ h1 + p {
font-size: 12px; font-size: 12px;
} }
.table-wrap {
overflow-x: auto;
-webkit-overflow-scrolling: touch;
border: var(--border);
}
table { table {
width: 100%; width: 100%;
min-width: 100%;
border-collapse: collapse; border-collapse: collapse;
border: var(--border);
} }
th { th {

View File

@@ -24,14 +24,16 @@ export function fileListPage(files: FileRow[], baseUrl: string): string {
return layout('My files', ` return layout('My files', `
<h1>My files</h1> <h1>My files</h1>
<p><a href="/upload">Upload new file</a></p> <p><a href="/upload">Upload new file</a></p>
<table> <div class="table-wrap">
<thead> <table>
<tr> <thead>
<th>Name</th><th>Type</th><th>Size</th><th>Uploaded</th><th></th> <tr>
</tr> <th>Name</th><th>Type</th><th>Size</th><th>Uploaded</th><th></th>
</thead> </tr>
<tbody>${rows}</tbody> </thead>
</table> <tbody>${rows}</tbody>
</table>
</div>
`, { authed: true }); `, { authed: true });
} }

View File

@@ -223,6 +223,7 @@ describe('GET /files — copy link', () => {
const res = await ctx.app.inject({ method: 'GET', url: '/files', cookies: { token } }); const res = await ctx.app.inject({ method: 'GET', url: '/files', cookies: { token } });
expect(res.statusCode).toBe(200); expect(res.statusCode).toBe(200);
expect(res.body).toContain('Copy link'); expect(res.body).toContain('Copy link');
expect(res.body).toContain('class="table-wrap"');
}); });
}); });