mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-02-22 12:40:11 +00:00
Pulled in remote assets locally such that Sunshine can be used fully offline
This commit is contained in:
parent
7a920da06d
commit
b458118e34
@ -5,18 +5,9 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Sunshine</title>
|
<title>Sunshine</title>
|
||||||
<link
|
<link href="/third_party/bootstrap.min.css" rel="stylesheet" />
|
||||||
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/css/bootstrap.min.css"
|
<script src="/third_party/bootstrap.bundle.min.js"></script>
|
||||||
rel="stylesheet"
|
<script src="/third_party/vue.js"></script>
|
||||||
integrity="sha384-wEmeIV1mKuiNpC+IOBjI7aAzPcEZeedi5yW5f2yOq55WWLwNGmvvx4Um1vskeMj0"
|
|
||||||
crossorigin="anonymous"
|
|
||||||
/>
|
|
||||||
<script
|
|
||||||
src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.bundle.min.js"
|
|
||||||
integrity="sha384-p34f1UUtsS3wqzfto5wAAmdvj+osOnFyQFpp4Ua3gs/ZVWx6oOypYoCJhGGScy+8"
|
|
||||||
crossorigin="anonymous"
|
|
||||||
></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body></body>
|
<body></body>
|
||||||
|
@ -5,18 +5,9 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Sunshine</title>
|
<title>Sunshine</title>
|
||||||
<link
|
<link href="/third_party/bootstrap.min.css" rel="stylesheet" />
|
||||||
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/css/bootstrap.min.css"
|
<script src="/third_party/bootstrap.bundle.min.js"></script>
|
||||||
rel="stylesheet"
|
<script src="/third_party/vue.js"></script>
|
||||||
integrity="sha384-wEmeIV1mKuiNpC+IOBjI7aAzPcEZeedi5yW5f2yOq55WWLwNGmvvx4Um1vskeMj0"
|
|
||||||
crossorigin="anonymous"
|
|
||||||
/>
|
|
||||||
<script
|
|
||||||
src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0/dist/js/bootstrap.bundle.min.js"
|
|
||||||
integrity="sha384-p34f1UUtsS3wqzfto5wAAmdvj+osOnFyQFpp4Ua3gs/ZVWx6oOypYoCJhGGScy+8"
|
|
||||||
crossorigin="anonymous"
|
|
||||||
></script>
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
7
assets/web/third_party/bootstrap.bundle.min.js
vendored
Normal file
7
assets/web/third_party/bootstrap.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
assets/web/third_party/bootstrap.min.css
vendored
Normal file
7
assets/web/third_party/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
11965
assets/web/third_party/vue.js
vendored
Normal file
11965
assets/web/third_party/vue.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -211,6 +211,27 @@ void getWelcomePage(resp_https_t response, req_https_t request) {
|
|||||||
response->write(header + content);
|
response->write(header + content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void getBootstrapCss(resp_https_t response, req_https_t request) {
|
||||||
|
print_req(request);
|
||||||
|
|
||||||
|
std::string content = read_file(WEB_DIR "third_party/bootstrap.min.css");
|
||||||
|
response->write(content);
|
||||||
|
}
|
||||||
|
|
||||||
|
void getBootstrapJs(resp_https_t response, req_https_t request) {
|
||||||
|
print_req(request);
|
||||||
|
|
||||||
|
std::string content = read_file(WEB_DIR "third_party/bootstrap.bundle.min.js");
|
||||||
|
response->write(content);
|
||||||
|
}
|
||||||
|
|
||||||
|
void getVueJs(resp_https_t response, req_https_t request) {
|
||||||
|
print_req(request);
|
||||||
|
|
||||||
|
std::string content = read_file(WEB_DIR "third_party/vue.js");
|
||||||
|
response->write(content);
|
||||||
|
}
|
||||||
|
|
||||||
void getApps(resp_https_t response, req_https_t request) {
|
void getApps(resp_https_t response, req_https_t request) {
|
||||||
if(!authenticate(response, request)) return;
|
if(!authenticate(response, request)) return;
|
||||||
|
|
||||||
@ -505,6 +526,9 @@ void start() {
|
|||||||
server.resource["^/api/config$"]["POST"] = saveConfig;
|
server.resource["^/api/config$"]["POST"] = saveConfig;
|
||||||
server.resource["^/api/password$"]["POST"] = savePassword;
|
server.resource["^/api/password$"]["POST"] = savePassword;
|
||||||
server.resource["^/api/apps/([0-9]+)$"]["DELETE"] = deleteApp;
|
server.resource["^/api/apps/([0-9]+)$"]["DELETE"] = deleteApp;
|
||||||
|
server.resource["^/third_party/bootstrap.min.css$"]["GET"] = getBootstrapCss;
|
||||||
|
server.resource["^/third_party/bootstrap.bundle.min.js$"]["GET"] = getBootstrapJs;
|
||||||
|
server.resource["^/third_party/vue.js$"]["GET"] = getVueJs;
|
||||||
server.config.reuse_address = true;
|
server.config.reuse_address = true;
|
||||||
server.config.address = "0.0.0.0"s;
|
server.config.address = "0.0.0.0"s;
|
||||||
server.config.port = port_https;
|
server.config.port = port_https;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user