making deepsource happy

This commit is contained in:
wukko 2023-08-11 22:07:34 +06:00
parent 998ab635d3
commit c5681bba94
3 changed files with 5 additions and 8 deletions

View file

@ -134,7 +134,6 @@ export function runAPI(express, app, gitCommit, gitBranch, __dirname) {
})
return res.status(j.status).json(j.body);
}
break;
case 'serverInfo':
return res.status(200).json({
version: version,
@ -145,13 +144,11 @@ export function runAPI(express, app, gitCommit, gitBranch, __dirname) {
cors: process.env.cors && process.env.cors === "0" ? 0 : 1,
startTime: `${startTimestamp}`
});
break;
default:
let j = apiJSON(0, {
t: "unknown response type"
})
return res.status(j.status).json(j.body);
break;
}
} catch (e) {
return res.status(500).json({

View file

@ -329,11 +329,11 @@ async function pasteClipboard() {
} catch (e) {
let errorMessage = loc.featureErrorGeneric;
let doError = true;
e = String(e).toLowerCase();
let error = String(e).toLowerCase();
if (e.includes("denied")) errorMessage = loc.clipboardErrorNoPermission;
if (e.includes("dismissed") || isIOS) doError = false;
if (e.includes("function") && isFirefox) errorMessage = loc.clipboardErrorFirefox;
if (error.includes("denied")) errorMessage = loc.clipboardErrorNoPermission;
if (error.includes("dismissed") || isIOS) doError = false;
if (error.includes("function") && isFirefox) errorMessage = loc.clipboardErrorFirefox;
if (doError) popup("error", 1, errorMessage);
}

View file

@ -8,7 +8,7 @@
"width": 640,
"height": 286
},
"content": "hey beta testers, this changelog isn't final but i do want to highlight some changes here just to keep track of them. make sure to report all issues in the testing discord channel!\n\n(this changelog is not sorted as it usually is)\n\nnew in 7.0-dev2:\n*; rounded corners everywhere! cobalt is now safe for everyone who can't handle sharp objects. <span class=\"text-backdrop\">i really want your feedback on this</span>.\n*; proper banner loading. no more jumping text!\n*; proper banner error handling. if banner wasn't loaded, it'll simply go grey instead of disappearing.\n*; links are no longer italic and are instead underlined.\n*; collapsible lists now have corresponding emoji.\n*; donate button is now highlighted with magenta instead of white.\n*; added a list of keyboard shortcuts to about tab.\n\nwon't be in final changelog:\n*; popup tabs now get highlighted on hover instead of being hollow.\n*; small popup is now animated on mobile. it slides from bottom to top.\n*; back arrow is now centered.\n\n\n<span class=\"text-backdrop\">everything from previous version of this changelog:</span>\n\nservice improvements:\n*; fixed unexpected stream drop when downloading a silent reddit video with mute mode on.\n*; added support for new reddit audio link type.\n\nweb improvements:\n*; removed 6.0 api fallback.\n*; moved on demand blocks to web server, now changelog can be updated independently from preferred api server.\n*; all-new matte glass aesthetic, applied to revamped popup headers, tab selectors, and also small popups.\n*; optimized installed web app to look and act like a native app, especially on ios. !!!!please try this!!!!\n*; added ability to attach a date to changelog.\n*; refreshed the look of entire changelog tab: separated title and version/commit, made title bigger, evened out all paddings.\n*; popups now work without any weird workarounds, especially on mobile. they're clean and nice.\n*; homescreen now also works without any weird workarounds. it is also clean and nice.\n*; replaced close button with back button, moved it to left. it makes more sense.\n*; (kinda old but not in older changelog) absolutely reimagined error and download popups, consistent with the rest of refreshed design.\n*; reduced spacing, optimized css of almost all ui elements. should be even more consistent across platforms now.\n*; added interaction animations.\n*; added more accessibility options, put them all into one category. you can disable animations and transparency if you want to.\n*; added a link to self-troubleshooting guide to support expand list in about popup.\n*; renamed 2160p and 4320p to 4k and 8k respectfully for better clarity.\n*; cobalt now lets you know if your browser doesn't support clipboard api and helps you fix it.\n*; added ability to translate \"cobalt\" for twitter-like localization. in russian cobalt is now кобальт, that's the style i will be going with from now on.\n*; updated some localization strings.\n*; removed ability to change the app name dynamically in all locations. cobalt is a sustained product name.\n*; added more keyboard shorcuts.\n*; added a list of keyboard shortcuts to about tab.\n\nyour keyboard slightly represents cobalt's ui. let me know if you like these.\n\ninternal web improvements:\n*; cleaned up all related frontend modules, especially page.js. will add more in final changelog, i'm very tired.\n\napi improvements:\n*; now catching all json api related errors.\n*; moved on demand blocks to web server.\n*; now sending standard rate limiting headers.\n*; better readability in source.\n\nother improvements:\n*; renamed docker-compose.yml.example to docker-compose.example.yml for linting in code editors.\n*; added a wiki with wip troubleshooting guide on github.\n\nwhat doesn't work or works poorly:\n*; tiktok/twitter media pickers look like shit, they haven't been worked on yet. they also might not work at all on ios.\n*; unknown if scrolling within popups works properly on ios 16 (when installed as web app).\n*; \"ask how to save\" toggle is pressable on ios devices even though it shouldn't be."
"content": "hey beta testers, this changelog isn't final but i do want to highlight some changes here just to keep track of them. make sure to report all issues in the testing discord channel!\n\n(this changelog is not sorted as it usually is)\n\nnew in 7.0-dev2:\n*; rounded corners everywhere! cobalt is now safe for everyone who can't handle sharp objects. <span class=\"text-backdrop\">i really want your feedback on this</span>.\n*; proper banner loading. no more jumping text!\n*; proper banner error handling. if banner wasn't loaded, it'll simply go grey instead of disappearing.\n*; links are no longer italic and are instead underlined.\n*; collapsible lists now have corresponding emoji.\n*; donate button is now highlighted with magenta instead of white.\n*; added a list of keyboard shortcuts to about tab.\n*; proper dropdown arrow.\n\nwon't be in final changelog:\n*; popup tabs now get highlighted on hover instead of being hollow.\n*; small popup is now animated on mobile. it slides from bottom to top.\n*; back arrow is now centered.\n\n\n<span class=\"text-backdrop\">everything from previous version of this changelog:</span>\n\nservice improvements:\n*; fixed unexpected stream drop when downloading a silent reddit video with mute mode on.\n*; added support for new reddit audio link type.\n\nweb improvements:\n*; removed 6.0 api fallback.\n*; moved on demand blocks to web server, now changelog can be updated independently from preferred api server.\n*; all-new matte glass aesthetic, applied to revamped popup headers, tab selectors, and also small popups.\n*; optimized installed web app to look and act like a native app, especially on ios. !!!!please try this!!!!\n*; added ability to attach a date to changelog.\n*; refreshed the look of entire changelog tab: separated title and version/commit, made title bigger, evened out all paddings.\n*; popups now work without any weird workarounds, especially on mobile. they're clean and nice.\n*; homescreen now also works without any weird workarounds. it is also clean and nice.\n*; replaced close button with back button, moved it to left. it makes more sense.\n*; (kinda old but not in older changelog) absolutely reimagined error and download popups, consistent with the rest of refreshed design.\n*; reduced spacing, optimized css of almost all ui elements. should be even more consistent across platforms now.\n*; added interaction animations.\n*; added more accessibility options, put them all into one category. you can disable animations and transparency if you want to.\n*; added a link to self-troubleshooting guide to support expand list in about popup.\n*; renamed 2160p and 4320p to 4k and 8k respectfully for better clarity.\n*; cobalt now lets you know if your browser doesn't support clipboard api and helps you fix it.\n*; added ability to translate \"cobalt\" for twitter-like localization. in russian cobalt is now кобальт, that's the style i will be going with from now on.\n*; updated some localization strings.\n*; removed ability to change the app name dynamically in all locations. cobalt is a sustained product name.\n*; added more keyboard shorcuts.\n*; added a list of keyboard shortcuts to about tab.\n\nyour keyboard slightly represents cobalt's ui. let me know if you like these.\n\ninternal web improvements:\n*; cleaned up all related frontend modules, especially page.js. will add more in final changelog, i'm very tired.\n\napi improvements:\n*; now catching all json api related errors.\n*; moved on demand blocks to web server.\n*; now sending standard rate limiting headers.\n*; better readability in source.\n\nother improvements:\n*; renamed docker-compose.yml.example to docker-compose.example.yml for linting in code editors.\n*; added a wiki with wip troubleshooting guide on github.\n\nwhat doesn't work or works poorly:\n*; tiktok/twitter media pickers look like shit, they haven't been worked on yet. they also might not work at all on ios.\n*; unknown if scrolling within popups works properly on ios 16 (when installed as web app).\n*; \"ask how to save\" toggle is pressable on ios devices even though it shouldn't be."
},
"history": [{
"version": "6.2",