web: saving cobalt streams via action chooser

This commit is contained in:
wukko 2023-12-02 22:51:08 +06:00
parent afab7f94a7
commit 83d82f5da9
3 changed files with 11 additions and 7 deletions

View file

@ -22,7 +22,7 @@ app.disable('x-powered-by');
await loadLoc();
const apiMode = process.env.apiURL && !process.env.webURL;
const webMode = process.env.webURL && !process.env.apiURL;
const webMode = process.env.webURL && process.env.apiURL;
if (apiMode) {
const { runAPI } = await import('./core/api.js');

View file

@ -423,9 +423,16 @@ async function download(url) {
let jp = await res.json();
if (jp.status === "continue") {
changeDownloadButton(2, '>>>');
if (isMobile || isSafari) {
window.location.href = j.url;
} else window.open(j.url, '_blank');
if (sGet("downloadPopup") === "true") {
popup('download', 1, j.url)
setTimeout(() => {
popup('download', 0);
}, 90000)
} else {
if (isMobile || isSafari) {
window.location.href = j.url;
} else window.open(j.url, '_blank');
}
setTimeout(() => { changeButton(1) }, 2500);
} else {
changeButton(0, jp.text);

View file

@ -29,9 +29,6 @@ console.log(
`${Cyan(`Hey, this is cobalt v.${version}!`)}\n${Bright("Let's start by creating a new ")}${Cyan(".env")}${Bright(" file. You can always change it later.")}`
)
console.log(
`\n${Bright("⚠️ Please notice that since v.6.0 cobalt is hosted in two parts. API and web app are now separate.\nMerged hosting is no longer available.")}`
)
function setup() {
console.log(Bright("\nWhat kind of server will this instance be?\nOptions: api, web."));