Add MSC4522 username colors, release notes dialog, and profile layout fixes.
All checks were successful
Trigger cinny-mobile / dispatch (push) Successful in 1s
All checks were successful
Trigger cinny-mobile / dispatch (push) Successful in 1s
Replace legacy profile style metadata with MSC4133 profile fields, add in-app update notes, tighten account profile name spacing, and wire desktop media save helpers through the client.
This commit is contained in:
@@ -53,6 +53,11 @@ const copyFiles = {
|
||||
src: 'public/font',
|
||||
dest: 'public/',
|
||||
},
|
||||
{
|
||||
src: 'public/update/**/*',
|
||||
dest: 'update',
|
||||
rename: (_name, _ext, fullPath) => fullPath.replace(/^public[/\\]update[/\\]/, ''),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
@@ -124,6 +129,37 @@ function servePublicAssets() {
|
||||
res.setHeader('Content-Type', contentType);
|
||||
res.setHeader('Cache-Control', 'no-cache');
|
||||
|
||||
const fileStream = fs.createReadStream(resolvedPath);
|
||||
fileStream.pipe(res);
|
||||
} else {
|
||||
res.writeHead(404);
|
||||
res.end('File not found');
|
||||
}
|
||||
} else if (req.url?.startsWith('/update/')) {
|
||||
const fileName = req.url.replace('/update/', '');
|
||||
const resolvedPath = path.join(path.resolve(), 'public', 'update', fileName);
|
||||
|
||||
if (fs.existsSync(resolvedPath) && !resolvedPath.includes('..')) {
|
||||
const ext = path.extname(fileName).toLowerCase();
|
||||
const contentType =
|
||||
ext === '.md'
|
||||
? 'text/markdown; charset=utf-8'
|
||||
: ext === '.json'
|
||||
? 'application/json'
|
||||
: ext === '.svg'
|
||||
? 'image/svg+xml'
|
||||
: ext === '.png'
|
||||
? 'image/png'
|
||||
: ext === '.jpg' || ext === '.jpeg'
|
||||
? 'image/jpeg'
|
||||
: ext === '.webp'
|
||||
? 'image/webp'
|
||||
: ext === '.gif'
|
||||
? 'image/gif'
|
||||
: 'application/octet-stream';
|
||||
res.setHeader('Content-Type', contentType);
|
||||
res.setHeader('Cache-Control', 'no-cache');
|
||||
|
||||
const fileStream = fs.createReadStream(resolvedPath);
|
||||
fileStream.pipe(res);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user