mirror of
https://github.com/imputnet/cobalt.git
synced 2025-07-16 18:28:29 +00:00
move servers into config.json for page.js
This commit is contained in:
parent
e39cbf26a4
commit
a1646480fb
@ -69,5 +69,6 @@
|
||||
"copy": ["-c:a", "copy"],
|
||||
"audio": ["-ar", "48000", "-ac", "2", "-b:a", "320k"],
|
||||
"m4a": ["-movflags", "frag_keyframe+empty_moov"]
|
||||
}
|
||||
},
|
||||
"otherServers": ["default", "https://co.wuk.sh", "https://api.c0ba.lt", "https://wukko.wolfdo.gg", "https://api.co.749.city", "https://cobalt-api.fluffy.tools", "https://capi.oak.li"]
|
||||
}
|
||||
|
@ -1213,5 +1213,4 @@ button:active,
|
||||
border-bottom-left-radius: 5px 6px!important;
|
||||
border-bottom-right-radius: 5px 6px!important;
|
||||
border-top-right-radius: 0px;
|
||||
}
|
||||
|
||||
}
|
@ -15,5 +15,6 @@ export const
|
||||
donations = config.donations,
|
||||
ffmpegArgs = config.ffmpegArgs,
|
||||
supportedAudio = config.supportedAudio,
|
||||
otherServers = config.otherServers,
|
||||
celebrations = config.celebrations,
|
||||
links = config.links
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { checkbox, collapsibleList, explanation, footerButtons, multiPagePopup, popup, popupWithBottomButtons, sep, settingsCategory, switcher, socialLink, urgentNotice, keyboardShortcuts } from "./elements.js";
|
||||
import { services as s, authorInfo, version, repo, donations, supportedAudio } from "../config.js";
|
||||
import { services as s, authorInfo, version, repo, donations, supportedAudio, otherServers } from "../config.js";
|
||||
import { getCommitInfo } from "../sub/currentCommit.js";
|
||||
import loc from "../../localization/manager.js";
|
||||
import emoji from "../emoji.js";
|
||||
@ -7,6 +7,8 @@ import changelogManager from "../changelog/changelogManager.js";
|
||||
|
||||
let com = getCommitInfo();
|
||||
|
||||
let defaultApiURL = process.env.apiURL ? process.env.apiURL.slice(0, -1) : '';
|
||||
|
||||
let enabledServices = Object.keys(s).filter((p) => {
|
||||
if (s[p].enabled) return true;
|
||||
}).sort().map((p) => {
|
||||
@ -28,7 +30,13 @@ for (let i in donations["crypto"]) {
|
||||
extr = ' top-margin'
|
||||
}
|
||||
|
||||
let defaultApiURL = process.env.apiURL ? process.env.apiURL.slice(0, -1) : '';
|
||||
let servers = otherServers.map((p) => {
|
||||
if (p === "default") {
|
||||
return { "action": defaultApiURL, "text": defaultApiURL.replace("https://","") }
|
||||
} else {
|
||||
return { "action": p, "text": p.replace("https://","") }
|
||||
}
|
||||
})
|
||||
|
||||
export default function(obj) {
|
||||
const t = (str, replace) => { return loc(obj.lang, str, replace) };
|
||||
@ -461,28 +469,7 @@ export default function(obj) {
|
||||
name: "serverPicker",
|
||||
explanation: t(['SettingsServerPickerDescription'])+defaultApiURL.replace("https://","")+".",
|
||||
vertical: true,
|
||||
items: [{
|
||||
action: defaultApiURL,
|
||||
text: defaultApiURL.replace("https://","")
|
||||
}, {
|
||||
action: "https://co.wuk.sh",
|
||||
text: "co.wuk.sh"
|
||||
}, {
|
||||
action: "https://api.c0ba.lt",
|
||||
text: "api.c0ba.lt"
|
||||
}, {
|
||||
action: "https://wukko.wolfdo.gg",
|
||||
text: "wukko.wolfdo.gg"
|
||||
}, {
|
||||
action: "https://api.co.749.city",
|
||||
text: "api.co.749.city"
|
||||
}, {
|
||||
action: "https://cobalt-api.fluffy.tools",
|
||||
text: "cobalt-api.fluffy.tools"
|
||||
}, {
|
||||
action: "https://capi.oak.li",
|
||||
text: "capi.oak.li"
|
||||
}]
|
||||
items: servers
|
||||
})
|
||||
})
|
||||
}],
|
||||
|
Loading…
Reference in New Issue
Block a user