Interactive menu
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Paper\InteractiveMenu;
|
||||
use App\Paper\Paper;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@@ -18,6 +19,14 @@ class Keyboard extends Controller
|
||||
|
||||
$keyboardAction = explode('_', $keyboardData->action);
|
||||
|
||||
$redis = new \Redis();
|
||||
$redis->connect('127.0.0.1', 6379);
|
||||
if($keyboardAction[0] == 'interactivemenu' || $redis->get('interactivemenu')){
|
||||
$interactiveMenu = new InteractiveMenu();
|
||||
$interactiveMenu->pressed($key);
|
||||
return;
|
||||
}
|
||||
|
||||
switch ($keyboardAction[0]) {
|
||||
case 'settings':
|
||||
$settings = new Settings();
|
||||
|
||||
@@ -76,6 +76,9 @@ class Settings extends Controller
|
||||
$actions['settings_list'] = 'Lista zmapowanych klawiszy';
|
||||
|
||||
$actions['separator1'] = 'separator';
|
||||
$actions['interactivemenu'] = 'Interaktywne menu';
|
||||
|
||||
$actions['separator2'] = 'separator';
|
||||
|
||||
$actions['repertoire_all_today'] = 'Repertuar wszystkie kina dzisiaj';
|
||||
$actions['repertoire_all_tomorrow'] = 'Repertuar wszystkie kina jutro';
|
||||
@@ -92,7 +95,7 @@ class Settings extends Controller
|
||||
$actions['repertoire_gdynskiecentrumfilmowe_today'] = 'Repertuar Gdyńskie Centrum filmowe dzisiaj';
|
||||
$actions['repertoire_gdynskiecentrumfilmowe_tomorrow'] = 'Repertuar Gdyńskie Centrum filmowe jutro';
|
||||
|
||||
$actions['separator2'] = 'separator';
|
||||
$actions['separator3'] = 'separator';
|
||||
$actions['airly_all'] = 'Airly wszystkie stacje';
|
||||
$actions['airly_rzeczypospolitej'] = 'Airly (Rzeczypospolitej)';
|
||||
$actions['airly_grunwaldzka'] = 'Airly (Grunwaldzka)';
|
||||
@@ -103,11 +106,11 @@ class Settings extends Controller
|
||||
// $actions['spacex_prev_flight'] = 'Poprzedni lot SpaceX';
|
||||
// $actions['spacex_all_next_summary'] = 'Wszystkie zaplanowane loty SpaceX (skrót)';
|
||||
|
||||
$actions['separator4'] = 'separator';
|
||||
$actions['separator5'] = 'separator';
|
||||
$actions['note_last'] = 'Ostatnia zapisana notatka';
|
||||
|
||||
|
||||
$actions['separator5'] = 'separator';
|
||||
$actions['separator6'] = 'separator';
|
||||
|
||||
$notes = DB::select('SELECT * FROM note WHERE type = "note" ORDER BY updated_at DESC');
|
||||
foreach ($notes as $note) {
|
||||
|
||||
Reference in New Issue
Block a user