mirror of
https://github.com/LizardByte/Sunshine.git
synced 2024-11-18 11:10:04 +00:00
Fix favicon and logo
This commit is contained in:
parent
89f05711e0
commit
a577f76d71
@ -224,22 +224,19 @@ void getTroubleshootingPage(resp_https_t response, req_https_t request) {
|
|||||||
void getFaviconImage(resp_https_t response, req_https_t request) {
|
void getFaviconImage(resp_https_t response, req_https_t request) {
|
||||||
print_req(request);
|
print_req(request);
|
||||||
|
|
||||||
std::string content = read_file(WEB_DIR "images/favicon.ico");
|
std::ifstream in(WEB_DIR "images/favicon.ico", std::ios::binary);
|
||||||
response->write(content);
|
SimpleWeb::CaseInsensitiveMultimap headers;
|
||||||
|
headers.emplace("Content-Type", "image/x-icon");
|
||||||
|
response->write(SimpleWeb::StatusCode::success_ok, in, headers);
|
||||||
}
|
}
|
||||||
|
|
||||||
void getSunshineLogoImage(resp_https_t response, req_https_t request) {
|
void getSunshineLogoImage(resp_https_t response, req_https_t request) {
|
||||||
print_req(request);
|
print_req(request);
|
||||||
|
|
||||||
std::string content = read_file(WEB_DIR "images/logo-sunshine-45.png");
|
std::ifstream in(WEB_DIR "images/logo-sunshine-45.png", std::ios::binary);
|
||||||
response->write(content);
|
SimpleWeb::CaseInsensitiveMultimap headers;
|
||||||
}
|
headers.emplace("Content-Type", "image/png");
|
||||||
|
response->write(SimpleWeb::StatusCode::success_ok, in, headers);
|
||||||
void getFontAwesomeCss(resp_https_t response, req_https_t request) {
|
|
||||||
print_req(request);
|
|
||||||
|
|
||||||
std::string content = read_file(WEB_DIR "third_party/font-awesome.5.15.4.all.min.css");
|
|
||||||
response->write(content);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void getBootstrapCss(resp_https_t response, req_https_t request) {
|
void getBootstrapCss(resp_https_t response, req_https_t request) {
|
||||||
@ -595,7 +592,6 @@ void start() {
|
|||||||
server.resource["^/api/apps/close"]["POST"] = closeApp;
|
server.resource["^/api/apps/close"]["POST"] = closeApp;
|
||||||
server.resource["^/images/favicon.ico$"]["GET"] = getFaviconImage;
|
server.resource["^/images/favicon.ico$"]["GET"] = getFaviconImage;
|
||||||
server.resource["^/images/logo-sunshine-45.png$"]["GET"] = getSunshineLogoImage;
|
server.resource["^/images/logo-sunshine-45.png$"]["GET"] = getSunshineLogoImage;
|
||||||
server.resource["^/third_party/font-awesome.5.15.4.all.min.css$"]["GET"] = getFontAwesomeCss;
|
|
||||||
server.resource["^/third_party/bootstrap.min.css$"]["GET"] = getBootstrapCss;
|
server.resource["^/third_party/bootstrap.min.css$"]["GET"] = getBootstrapCss;
|
||||||
server.resource["^/third_party/bootstrap.bundle.min.js$"]["GET"] = getBootstrapJs;
|
server.resource["^/third_party/bootstrap.bundle.min.js$"]["GET"] = getBootstrapJs;
|
||||||
server.resource["^/third_party/vue.js$"]["GET"] = getVueJs;
|
server.resource["^/third_party/vue.js$"]["GET"] = getVueJs;
|
||||||
|
Loading…
Reference in New Issue
Block a user