diff --git a/app/SupportedApps/Runeaudio.php b/app/SupportedApps/Runeaudio.php new file mode 100644 index 00000000..9a149b50 --- /dev/null +++ b/app/SupportedApps/Runeaudio.php @@ -0,0 +1,94 @@ +buildRequest('status'); + switch($res->getStatusCode()) { + case 200: + echo 'Successfully connected to the API'; + break; + case 401: + echo 'Failed: Invalid credentials'; + break; + case 404: + echo 'Failed: Please make sure your URL is correct and that there is a trailing slash'; + break; + default: + echo 'Something went wrong... Code: '.$res->getStatusCode(); + break; + } + } + + public function executeConfig() + { + $output = ''; + $artist = ''; + $song_title = ''; + $res = $this->buildRequest('currentsong'); + $array = explode("\n", $res->getBody()); + foreach($array as $item) { + $item_array = explode(": ", $item); + if ($item_array[0] == 'Artist') { + $artist = $item_array[1]; + } elseif ($item_array[0] == 'Title') { + $song_title = $item_array[1]; + } + } + + $output = ''; + + return $output; + } + + public function buildRequest($endpoint) + { + $config = $this->config; + $url = $config->url; + + $url = rtrim($url, '/'); + + $api_url = $url.'/command/?cmd='.$endpoint; + //die( $api_url.' --- '); + + $client = new Client(['http_errors' => false]); + $res = $client->request('GET', $api_url); + return $res; + + } + + +} diff --git a/public/css/app.css b/public/css/app.css index ec4de6a2..02518f0a 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -1169,6 +1169,63 @@ select:-webkit-autofill:focus { color: #2f313a !important; } +.title-marquee { + width: 125px; + overflow: hidden; +} + +.title-marquee span { + white-space: nowrap; + -webkit-transform: translate(0, 0); + transform: translate(0, 0); + -webkit-animation: marquee 8s linear; + animation: marquee 8s linear; +} + +@-webkit-keyframes marquee { + 0% { + -webkit-transform: translate(0, 0); + transform: translate(0, 0); + } + + 20% { + -webkit-transform: translate(0, 0); + transform: translate(0, 0); + } + + 95% { + -webkit-transform: translate(-200%, 0); + transform: translate(-200%, 0); + } + + 100% { + -webkit-transform: translate(-200%, 0); + transform: translate(-200%, 0); + } +} + +@keyframes marquee { + 0% { + -webkit-transform: translate(0, 0); + transform: translate(0, 0); + } + + 20% { + -webkit-transform: translate(0, 0); + transform: translate(0, 0); + } + + 95% { + -webkit-transform: translate(-200%, 0); + transform: translate(-200%, 0); + } + + 100% { + -webkit-transform: translate(-200%, 0); + transform: translate(-200%, 0); + } +} + /*! Huebee v2.0.0 http://huebee.buzz ---------------------------------------------- */ diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 8cecc25b..aa923137 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,4 +1,4 @@ { - "/css/app.css": "/css/app.css?id=353c513dd97a5fa0607d", + "/css/app.css": "/css/app.css?id=7e76b8c135b6dbd38363", "/js/app.js": "/js/app.js?id=24ea5e5c1fbea3461a14" } \ No newline at end of file diff --git a/resources/assets/sass/_rune.scss b/resources/assets/sass/_rune.scss new file mode 100644 index 00000000..81bd93de --- /dev/null +++ b/resources/assets/sass/_rune.scss @@ -0,0 +1,15 @@ +.title-marquee { + width: 125px; + overflow: hidden; + span { + white-space: nowrap; + transform: translate(0, 0); + animation: marquee 8s linear; + } + @keyframes marquee { + 0% { transform: translate(0, 0); } + 20% { transform: translate(0, 0); } + 95% { transform: translate(-200%, 0); } + 100% { transform: translate(-200%, 0); } + } +} \ No newline at end of file diff --git a/resources/assets/sass/app.scss b/resources/assets/sass/app.scss index 8489d570..b3af68e1 100644 --- a/resources/assets/sass/app.scss +++ b/resources/assets/sass/app.scss @@ -10,6 +10,7 @@ // Bootstrap @import "app"; +@import "rune"; // Huebee @import "huebee"; diff --git a/resources/views/supportedapps/runeaudio.blade.php b/resources/views/supportedapps/runeaudio.blade.php new file mode 100644 index 00000000..e0a6b92f --- /dev/null +++ b/resources/views/supportedapps/runeaudio.blade.php @@ -0,0 +1,21 @@ +

{{ __('app.apps.config') }} ({{ __('app.optional') }})

+
+ + +
+ + {!! Form::hidden('config[enabled]', '0') !!} + +
+
+ +
+
diff --git a/storage/app/public/supportedapps/runeaudio.png b/storage/app/public/supportedapps/runeaudio.png new file mode 100644 index 00000000..af58703d Binary files /dev/null and b/storage/app/public/supportedapps/runeaudio.png differ