Added versions and minor cleanup
This commit is contained in:
parent
1dc32e3483
commit
080ff2ceb1
@ -6,16 +6,14 @@
|
|||||||
void Idler::Update()
|
void Idler::Update()
|
||||||
{
|
{
|
||||||
// Has no request been made within 3 minutes?
|
// Has no request been made within 3 minutes?
|
||||||
if (time(0) - XGControl::last_query_time > TIME_TO_FALL_ASLEEP)
|
if (time(0) - XGControl::last_query_time > 10)
|
||||||
{
|
{
|
||||||
// Let the processor chill for a second.
|
// Let the processor chill for a second.
|
||||||
// This should reduce the idling-cpu load to near 0%
|
// This should reduce the idling-cpu load to near 0%
|
||||||
#ifdef _WIN
|
#ifdef _WIN
|
||||||
std::cout << "Sleeping..." << std::endl;
|
Sleep(SLEEP_TIME * 1e3); // Uses milliseconds
|
||||||
Sleep(SLEEP_TIME * 1000); // Uses milliseconds
|
|
||||||
std::cout << "Waking..." << std::endl;
|
|
||||||
#else
|
#else
|
||||||
usleep(SLEEP_TIME * 10000000); // Uses microseconds
|
usleep(SLEEP_TIME * 1e6); // Uses microseconds
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "RestQueryHandler.h"
|
#include "RestQueryHandler.h"
|
||||||
|
#include "Version.h"
|
||||||
|
|
||||||
using namespace Rest;
|
using namespace Rest;
|
||||||
using namespace Logging;
|
using namespace Logging;
|
||||||
@ -44,6 +45,7 @@ bool RestQueryHandler::ProcessQuery(const std::string clientAdress, const Json&
|
|||||||
else if (requestName == "remove_download_entry") return RemoveDownloadEntry(requestBody, responseBody, responseCode);
|
else if (requestName == "remove_download_entry") return RemoveDownloadEntry(requestBody, responseBody, responseCode);
|
||||||
else if (requestName == "update_config") return UpdateConfig(requestBody, responseBody, responseCode);
|
else if (requestName == "update_config") return UpdateConfig(requestBody, responseBody, responseCode);
|
||||||
else if (requestName == "reset_config_to_default_values") return ResetConfigDefaults(requestBody, responseBody, responseCode);
|
else if (requestName == "reset_config_to_default_values") return ResetConfigDefaults(requestBody, responseBody, responseCode);
|
||||||
|
else if (requestName == "get_server_version") return GetServerVersion(requestBody, responseBody, responseCode);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -494,6 +496,14 @@ bool RestQueryHandler::ResetConfigDefaults(const JsonBlock& request, JsonBlock&
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Rest::RestQueryHandler::GetServerVersion(const JasonPP::JsonBlock& request, JasonPP::JsonBlock& responseBody, HTTP_STATUS_CODE& responseCode)
|
||||||
|
{
|
||||||
|
responseCode = OK;
|
||||||
|
responseBody.CloneFrom(RestResponseTemplates::GetByCode(OK));
|
||||||
|
responseBody.Set("server_version").SetFloatData(TUBIO_SERVER_VERSION);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@ namespace Rest
|
|||||||
static bool RemoveDownloadEntry(const JasonPP::JsonBlock& request, JasonPP::JsonBlock& responseBody, HTTP_STATUS_CODE& responseCode);
|
static bool RemoveDownloadEntry(const JasonPP::JsonBlock& request, JasonPP::JsonBlock& responseBody, HTTP_STATUS_CODE& responseCode);
|
||||||
static bool UpdateConfig(const JasonPP::JsonBlock& request, JasonPP::JsonBlock& responseBody, HTTP_STATUS_CODE& responseCode);
|
static bool UpdateConfig(const JasonPP::JsonBlock& request, JasonPP::JsonBlock& responseBody, HTTP_STATUS_CODE& responseCode);
|
||||||
static bool ResetConfigDefaults(const JasonPP::JsonBlock& request, JasonPP::JsonBlock& responseBody, HTTP_STATUS_CODE& responseCode);
|
static bool ResetConfigDefaults(const JasonPP::JsonBlock& request, JasonPP::JsonBlock& responseBody, HTTP_STATUS_CODE& responseCode);
|
||||||
|
static bool GetServerVersion(const JasonPP::JsonBlock& request, JasonPP::JsonBlock& responseBody, HTTP_STATUS_CODE& responseCode);
|
||||||
|
|
||||||
static bool ValidateField(const std::string name, const JasonPP::JDType type, const JasonPP::Json& checkThat, JasonPP::JsonBlock& putErrorResponseHere);
|
static bool ValidateField(const std::string name, const JasonPP::JDType type, const JasonPP::Json& checkThat, JasonPP::JsonBlock& putErrorResponseHere);
|
||||||
|
|
||||||
|
@ -180,6 +180,7 @@
|
|||||||
<ClInclude Include="HttpServer.h" />
|
<ClInclude Include="HttpServer.h" />
|
||||||
<ClInclude Include="TimeUnits.h" />
|
<ClInclude Include="TimeUnits.h" />
|
||||||
<ClInclude Include="Updater.h" />
|
<ClInclude Include="Updater.h" />
|
||||||
|
<ClInclude Include="Version.h" />
|
||||||
<ClInclude Include="XGConfig.h" />
|
<ClInclude Include="XGConfig.h" />
|
||||||
<ClInclude Include="XGControl.h" />
|
<ClInclude Include="XGControl.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -119,5 +119,8 @@
|
|||||||
<ClInclude Include="TimeUnits.h">
|
<ClInclude Include="TimeUnits.h">
|
||||||
<Filter>Headerdateien</Filter>
|
<Filter>Headerdateien</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="Version.h">
|
||||||
|
<Filter>Headerdateien</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
2
Tubio/Version.h
Normal file
2
Tubio/Version.h
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#pragma once
|
||||||
|
#define TUBIO_SERVER_VERSION (0.5)
|
@ -1,9 +1,9 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Tubio - Video downloader</title><meta data-n-head="1" charset="utf-8"><meta data-n-head="1" name="viewport" content="width=device-width,initial-scale=1"><meta data-n-head="1" data-hid="description" name="description" content=""><meta data-n-head="1" name="msapplication-TileColor" content="#031934"><meta data-n-head="1" name="theme-color" content="#031934"><link data-n-head="1" rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link data-n-head="1" rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"><link data-n-head="1" rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"><link data-n-head="1" rel="manifest" href="/site.webmanifest"><link data-n-head="1" rel="mask-icon" href="/safari-pinned-tab.svg" color="#031934"><link rel="preload" href="/_nuxt/4821292.js" as="script"><link rel="preload" href="/_nuxt/ab3b97e.js" as="script"><link rel="preload" href="/_nuxt/56e63c5.js" as="script"><link rel="preload" href="/_nuxt/4f5ff73.js" as="script">
|
<title>Tubio - Video downloader</title><meta data-n-head="1" charset="utf-8"><meta data-n-head="1" name="viewport" content="width=device-width,initial-scale=1"><meta data-n-head="1" data-hid="description" name="description" content=""><meta data-n-head="1" name="msapplication-TileColor" content="#031934"><meta data-n-head="1" name="theme-color" content="#031934"><link data-n-head="1" rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link data-n-head="1" rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"><link data-n-head="1" rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"><link data-n-head="1" rel="manifest" href="/site.webmanifest"><link data-n-head="1" rel="mask-icon" href="/safari-pinned-tab.svg" color="#031934"><link rel="preload" href="/_nuxt/4e850c3.js" as="script"><link rel="preload" href="/_nuxt/9fbb618.js" as="script"><link rel="preload" href="/_nuxt/ff32aa7.js" as="script"><link rel="preload" href="/_nuxt/579018b.js" as="script">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="__nuxt"><style>#nuxt-loading{background:#fff;visibility:hidden;opacity:0;position:absolute;left:0;right:0;top:0;bottom:0;display:flex;justify-content:center;align-items:center;flex-direction:column;animation:nuxtLoadingIn 10s ease;-webkit-animation:nuxtLoadingIn 10s ease;animation-fill-mode:forwards;overflow:hidden}@keyframes nuxtLoadingIn{0%{visibility:hidden;opacity:0}20%{visibility:visible;opacity:0}100%{visibility:visible;opacity:1}}@-webkit-keyframes nuxtLoadingIn{0%{visibility:hidden;opacity:0}20%{visibility:visible;opacity:0}100%{visibility:visible;opacity:1}}#nuxt-loading>div,#nuxt-loading>div:after{border-radius:50%;width:5rem;height:5rem}#nuxt-loading>div{font-size:10px;position:relative;text-indent:-9999em;border:.5rem solid #f5f5f5;border-left:.5rem solid #000;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:nuxtLoading 1.1s infinite linear;animation:nuxtLoading 1.1s infinite linear}#nuxt-loading.error>div{border-left:.5rem solid #ff4500;animation-duration:5s}@-webkit-keyframes nuxtLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes nuxtLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}</style><script>window.addEventListener("error",function(){var e=document.getElementById("nuxt-loading");e&&(e.className+=" error")})</script><div id="nuxt-loading" aria-live="polite" role="status"><div>Loading...</div></div></div><script>window.__NUXT__={config:{},staticAssetsBase:"/_nuxt/static/1611434588"}</script>
|
<div id="__nuxt"><style>#nuxt-loading{background:#fff;visibility:hidden;opacity:0;position:absolute;left:0;right:0;top:0;bottom:0;display:flex;justify-content:center;align-items:center;flex-direction:column;animation:nuxtLoadingIn 10s ease;-webkit-animation:nuxtLoadingIn 10s ease;animation-fill-mode:forwards;overflow:hidden}@keyframes nuxtLoadingIn{0%{visibility:hidden;opacity:0}20%{visibility:visible;opacity:0}100%{visibility:visible;opacity:1}}@-webkit-keyframes nuxtLoadingIn{0%{visibility:hidden;opacity:0}20%{visibility:visible;opacity:0}100%{visibility:visible;opacity:1}}#nuxt-loading>div,#nuxt-loading>div:after{border-radius:50%;width:5rem;height:5rem}#nuxt-loading>div{font-size:10px;position:relative;text-indent:-9999em;border:.5rem solid #f5f5f5;border-left:.5rem solid #000;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:nuxtLoading 1.1s infinite linear;animation:nuxtLoading 1.1s infinite linear}#nuxt-loading.error>div{border-left:.5rem solid #ff4500;animation-duration:5s}@-webkit-keyframes nuxtLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes nuxtLoading{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}</style><script>window.addEventListener("error",function(){var e=document.getElementById("nuxt-loading");e&&(e.className+=" error")})</script><div id="nuxt-loading" aria-live="polite" role="status"><div>Loading...</div></div></div><script>window.__NUXT__={config:{},staticAssetsBase:"/_nuxt/static/1611501555"}</script>
|
||||||
<script src="/_nuxt/4821292.js"></script><script src="/_nuxt/ab3b97e.js"></script><script src="/_nuxt/56e63c5.js"></script><script src="/_nuxt/4f5ff73.js"></script></body>
|
<script src="/_nuxt/4e850c3.js"></script><script src="/_nuxt/9fbb618.js"></script><script src="/_nuxt/ff32aa7.js"></script><script src="/_nuxt/579018b.js"></script></body>
|
||||||
</html>
|
</html>
|
||||||
|
1
Tubio/frontend/_nuxt/08bb332.js
Normal file
1
Tubio/frontend/_nuxt/08bb332.js
Normal file
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
|||||||
!function(e){function r(data){for(var r,n,l=data[0],f=data[1],d=data[2],i=0,h=[];i<l.length;i++)n=l[i],Object.prototype.hasOwnProperty.call(o,n)&&o[n]&&h.push(o[n][0]),o[n]=0;for(r in f)Object.prototype.hasOwnProperty.call(f,r)&&(e[r]=f[r]);for(v&&v(data);h.length;)h.shift()();return c.push.apply(c,d||[]),t()}function t(){for(var e,i=0;i<c.length;i++){for(var r=c[i],t=!0,n=1;n<r.length;n++){var f=r[n];0!==o[f]&&(t=!1)}t&&(c.splice(i--,1),e=l(l.s=r[0]))}return e}var n={},o={4:0},c=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var c,script=document.createElement("script");script.charset="utf-8",script.timeout=120,l.nc&&script.setAttribute("nonce",l.nc),script.src=function(e){return l.p+""+{2:"f294b6c",3:"b9c72a2"}[e]+".js"}(e);var f=new Error;c=function(r){script.onerror=script.onload=null,clearTimeout(d);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),c=r&&r.target&&r.target.src;f.message="Loading chunk "+e+" failed.\n("+n+": "+c+")",f.name="ChunkLoadError",f.type=n,f.request=c,t[1](f)}o[e]=void 0}};var d=setTimeout((function(){c({type:"timeout",target:script})}),12e4);script.onerror=script.onload=c,document.head.appendChild(script)}return Promise.all(r)},l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(object,e){return Object.prototype.hasOwnProperty.call(object,e)},l.p="/_nuxt/",l.oe=function(e){throw console.error(e),e};var f=window.webpackJsonp=window.webpackJsonp||[],d=f.push.bind(f);f.push=r,f=f.slice();for(var i=0;i<f.length;i++)r(f[i]);var v=d;t()}([]);
|
!function(e){function r(data){for(var r,n,l=data[0],f=data[1],d=data[2],i=0,h=[];i<l.length;i++)n=l[i],Object.prototype.hasOwnProperty.call(o,n)&&o[n]&&h.push(o[n][0]),o[n]=0;for(r in f)Object.prototype.hasOwnProperty.call(f,r)&&(e[r]=f[r]);for(v&&v(data);h.length;)h.shift()();return c.push.apply(c,d||[]),t()}function t(){for(var e,i=0;i<c.length;i++){for(var r=c[i],t=!0,n=1;n<r.length;n++){var f=r[n];0!==o[f]&&(t=!1)}t&&(c.splice(i--,1),e=l(l.s=r[0]))}return e}var n={},o={4:0},c=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var c,script=document.createElement("script");script.charset="utf-8",script.timeout=120,l.nc&&script.setAttribute("nonce",l.nc),script.src=function(e){return l.p+""+{2:"540a8c6",3:"08bb332"}[e]+".js"}(e);var f=new Error;c=function(r){script.onerror=script.onload=null,clearTimeout(d);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),c=r&&r.target&&r.target.src;f.message="Loading chunk "+e+" failed.\n("+n+": "+c+")",f.name="ChunkLoadError",f.type=n,f.request=c,t[1](f)}o[e]=void 0}};var d=setTimeout((function(){c({type:"timeout",target:script})}),12e4);script.onerror=script.onload=c,document.head.appendChild(script)}return Promise.all(r)},l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(object,e){return Object.prototype.hasOwnProperty.call(object,e)},l.p="/_nuxt/",l.oe=function(e){throw console.error(e),e};var f=window.webpackJsonp=window.webpackJsonp||[],d=f.push.bind(f);f.push=r,f=f.slice();for(var i=0;i<f.length;i++)r(f[i]);var v=d;t()}([]);
|
File diff suppressed because one or more lines are too long
1
Tubio/frontend/_nuxt/540a8c6.js
Normal file
1
Tubio/frontend/_nuxt/540a8c6.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
Tubio/frontend/_nuxt/579018b.js
Normal file
1
Tubio/frontend/_nuxt/579018b.js
Normal file
File diff suppressed because one or more lines are too long
2
Tubio/frontend/_nuxt/9fbb618.js
Normal file
2
Tubio/frontend/_nuxt/9fbb618.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
Tubio/frontend/_nuxt/ff32aa7.js
Normal file
2
Tubio/frontend/_nuxt/ff32aa7.js
Normal file
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
|||||||
window.__NUXT__={staticAssetsBase:"\u002F_nuxt\u002Fstatic\u002F1611434588",layout:"default",error:null,state:{diskUsage:{usage:{}},dlcache:{cache:[]},logs:{logs:[]},serverOs:{os_name:""},settings:{config:{}}},serverRendered:true,routePath:"\u002Fsettings",config:{}};
|
|
@ -1 +0,0 @@
|
|||||||
window.__NUXT__={staticAssetsBase:"\u002F_nuxt\u002Fstatic\u002F1611434588",layout:"default",error:null,state:{diskUsage:{usage:{}},dlcache:{cache:[]},logs:{logs:[]},serverOs:{os_name:""},settings:{config:{}}},serverRendered:true,routePath:"\u002F",config:{}};
|
|
1
Tubio/frontend/_nuxt/static/1611501555/settings/state.js
Normal file
1
Tubio/frontend/_nuxt/static/1611501555/settings/state.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
window.__NUXT__={staticAssetsBase:"\u002F_nuxt\u002Fstatic\u002F1611501555",layout:"default",error:null,state:{diskUsage:{usage:{}},dlcache:{cache:[]},logs:{logs:[]},serverOs:{os_name:""},serverVersion:{serverVersion:-1},settings:{config:{}}},serverRendered:true,routePath:"\u002Fsettings",config:{}};
|
1
Tubio/frontend/_nuxt/static/1611501555/state.js
Normal file
1
Tubio/frontend/_nuxt/static/1611501555/state.js
Normal file
@ -0,0 +1 @@
|
|||||||
|
window.__NUXT__={staticAssetsBase:"\u002F_nuxt\u002Fstatic\u002F1611501555",layout:"default",error:null,state:{diskUsage:{usage:{}},dlcache:{cache:[]},logs:{logs:[]},serverOs:{os_name:""},serverVersion:{serverVersion:-1},settings:{config:{}}},serverRendered:true,routePath:"\u002F",config:{}};
|
BIN
Tubio/frontend/assets/brand/github/github-mark-light-120px.png
Normal file
BIN
Tubio/frontend/assets/brand/github/github-mark-light-120px.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
12
tubio-frontend-nuxt-app/components/Icons/github.vue
Normal file
12
tubio-frontend-nuxt-app/components/Icons/github.vue
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<template>
|
||||||
|
<div class="github-logo">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.github-logo {
|
||||||
|
background-image: url("/assets/brand/github/github-mark-light-120px.png");
|
||||||
|
background-size: contain;
|
||||||
|
}
|
||||||
|
</style>
|
@ -10,11 +10,19 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="right-icons flex flex-row justify-end flex-grow">
|
<div class="right-icons flex flex-row justify-end flex-grow">
|
||||||
<nuxt-link exact to="/settings">
|
|
||||||
|
<a href="https://github.com/Leonetienne/Tubio" target="_blank" title="GitHub repository" class="mr-4">
|
||||||
|
<div class="headerbutton flex justify-center items-center">
|
||||||
|
<IconGithub class="headericon icon-github" />
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<nuxt-link exact to="/settings" title="Settings">
|
||||||
<div class="headerbutton button-settings">
|
<div class="headerbutton button-settings">
|
||||||
<IconGear class="headericon icon-gear" />
|
<IconGear class="headericon icon-gear" />
|
||||||
</div>
|
</div>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -22,21 +30,26 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import IconGear from "~/components/Icons/gear";
|
import IconGear from "~/components/Icons/gear";
|
||||||
|
import IconGithub from "~/components/Icons/github";
|
||||||
import Logo from "~/components/Logo";
|
import Logo from "~/components/Logo";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
IconGear,
|
IconGear,
|
||||||
|
IconGithub,
|
||||||
Logo,
|
Logo,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.headericon {
|
.headerbutton {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
width: 50px;
|
width: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.headericon {
|
||||||
stroke: theme("colors.purple-3");
|
stroke: theme("colors.purple-3");
|
||||||
fill: theme("colors.purple-3");
|
fill: theme("colors.purple-3");
|
||||||
transition:
|
transition:
|
||||||
@ -44,12 +57,6 @@ export default {
|
|||||||
fill 0.2s,
|
fill 0.2s,
|
||||||
color 0.2s,
|
color 0.2s,
|
||||||
transform 0.2s ease-in-out;
|
transform 0.2s ease-in-out;
|
||||||
|
|
||||||
&:hover {
|
|
||||||
transform: rotate(90deg);
|
|
||||||
stroke: theme("colors.purple-3-1");
|
|
||||||
fill: theme("colors.purple-3-1");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.headerlogo {
|
.headerlogo {
|
||||||
@ -79,6 +86,21 @@ export default {
|
|||||||
& svg {
|
& svg {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: rotate(90deg);
|
||||||
|
stroke: theme("colors.purple-3-1");
|
||||||
|
fill: theme("colors.purple-3-1");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&-github {
|
||||||
|
height: 40px;
|
||||||
|
width: 40px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: scale(1.075);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -79,7 +79,16 @@
|
|||||||
|
|
||||||
<div class="w-full lg:w-1/2 border-left lg:pl-3 mt-6 lg:mt-0">
|
<div class="w-full lg:w-1/2 border-left lg:pl-3 mt-6 lg:mt-0">
|
||||||
|
|
||||||
<div class="disk-usage">
|
<div class="versions">
|
||||||
|
<div class="versions__entry">
|
||||||
|
<p>Web-UI version: {{version__webUI}}</p>
|
||||||
|
</div>
|
||||||
|
<div class="versions__entry">
|
||||||
|
<p>Server version: {{serverVersion}}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="disk-usage mt-3">
|
||||||
<h2>Disk usage</h2>
|
<h2>Disk usage</h2>
|
||||||
|
|
||||||
<div class="disk-usage__entry flex">
|
<div class="disk-usage__entry flex">
|
||||||
@ -155,7 +164,8 @@ export default {
|
|||||||
|
|
||||||
data: function() {
|
data: function() {
|
||||||
return {
|
return {
|
||||||
canUpdate: {type: Boolean, default: true}
|
canUpdate: {type: Boolean, default: true},
|
||||||
|
version__webUI: 0.75
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -166,6 +176,9 @@ export default {
|
|||||||
serverOs: function() {
|
serverOs: function() {
|
||||||
return this.$store.state.serverOs.os_name;
|
return this.$store.state.serverOs.os_name;
|
||||||
},
|
},
|
||||||
|
serverVersion: function() {
|
||||||
|
return this.$store.state.serverVersion.serverVersion;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@ -316,6 +329,7 @@ export default {
|
|||||||
|
|
||||||
this.$store.dispatch("diskUsage/update");
|
this.$store.dispatch("diskUsage/update");
|
||||||
this.$store.dispatch("serverOs/update");
|
this.$store.dispatch("serverOs/update");
|
||||||
|
this.$store.dispatch("serverVersion/update");
|
||||||
this.$store.dispatch("settings/updateGet", function() {
|
this.$store.dispatch("settings/updateGet", function() {
|
||||||
that.whitelistToInputfield();
|
that.whitelistToInputfield();
|
||||||
});
|
});
|
||||||
@ -341,19 +355,20 @@ h2 {
|
|||||||
font-size: 24pt;
|
font-size: 24pt;
|
||||||
}
|
}
|
||||||
|
|
||||||
.disk-usage {
|
.disk-usage,
|
||||||
|
.versions {
|
||||||
&__entry {
|
&__entry {
|
||||||
& p {
|
& p {
|
||||||
color: theme("colors.text-gray-1");
|
color: theme("colors.text-gray-1");
|
||||||
font-size: 16pt;
|
font-size: 16pt;
|
||||||
|
|
||||||
&:first-child {
|
|
||||||
width: 150px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.disk-usage__entry p {
|
||||||
|
width: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
color: theme("colors.purple-0");
|
color: theme("colors.purple-0");
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
24
tubio-frontend-nuxt-app/store/serverVersion.js
Normal file
24
tubio-frontend-nuxt-app/store/serverVersion.js
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
|
export const state = () => ({
|
||||||
|
serverVersion: -1
|
||||||
|
});
|
||||||
|
|
||||||
|
export const mutations = {
|
||||||
|
update(state, data) {
|
||||||
|
state.serverVersion = data;
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export const actions = {
|
||||||
|
update(context) {
|
||||||
|
axios.post("/api", {
|
||||||
|
request: "get_server_version"
|
||||||
|
})
|
||||||
|
.then(function(response) {
|
||||||
|
if (response.data.status === "OK") {
|
||||||
|
context.commit("update", response.data.server_version);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user