nutella_framework 0.6.18 → 0.6.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/framework_components/roomcast-bot/roomcast_bot.rb +34 -23
- data/framework_components/roomcast-bot/startup +3 -2
- data/framework_components/roomcast-main-app/dist/app.js +51 -14
- data/framework_components/roomcast-main-app/src/app/components/NutellaMixin.js +3 -1
- data/framework_components/roomcast-main-app/src/app/components/app/main.js +17 -6
- data/framework_components/roomcast-main-app/src/app/components/identity-selector/IdentitiesGrid.js +5 -1
- data/framework_components/roomcast-main-app/src/app/components/identity-selector/IdentityCard.js +19 -2
- data/framework_components/roomcast-main-app/src/app/components/identity-selector/main.js +5 -1
- data/framework_components/roomcast-main-app/src/app/components/login/main.js +0 -1
- data/framework_components/roomcast-package-creator/dist/app.js +78 -31
- data/framework_components/roomcast-package-creator/dist/main.css +15 -3
- data/framework_components/roomcast-package-creator/src/app/app.js +1 -0
- data/framework_components/roomcast-package-creator/src/app/components/ChannelsCatalogue.js +3 -11
- data/framework_components/roomcast-package-creator/src/app/components/NutellaMixin.js +50 -15
- data/framework_components/roomcast-package-creator/src/app/components/main.js +21 -2
- data/framework_components/roomcast-package-creator/src/less/main.less +9 -2
- data/framework_components/roomcast-teacher-controls/dist/app.js +77 -5
- data/framework_components/roomcast-teacher-controls/index.html +1 -3
- data/framework_components/roomcast-teacher-controls/src/app/components/ActivityCard.js +8 -0
- data/framework_components/roomcast-teacher-controls/src/app/components/Footer.js +5 -1
- data/framework_components/roomcast-teacher-controls/src/app/components/NutellaMixin.js +57 -0
- metadata +3 -3
- data/framework_components/roomcast-teacher-controls/src/app/components/Channel.js +0 -70
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 2a4dfe1aa792f938ac0f26e68019c68ba000bc6b
         | 
| 4 | 
            +
              data.tar.gz: 1acd756f55caf9a2c7b22f8230e40663764469d0
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: cb6bc7927877787672d7803bf6338c81d1050703bc79557e4d321a9291664a9b47ae910e65874dcc79f4f19ab698cb7cbfa400e05a2880cbad417ee757bedb31
         | 
| 7 | 
            +
              data.tar.gz: fb2d8e7c663ff96ad9974a6565e67a9fd0230dedccc8c0924bff49e404fc04503a5e67f70b6dce25e1ebe7df7701ee275a430960d21e53cab24607c7f03c30f1
         | 
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0.6. | 
| 1 | 
            +
            0.6.19
         | 
| @@ -12,6 +12,29 @@ puts 'Initializing RoomCast...' | |
| 12 12 | 
             
            #channels_db = nutella.persist.get_json_object_store('channels')
         | 
| 13 13 | 
             
            #channelsData_db = nutella.persist.get_json_object_store('channels-data')
         | 
| 14 14 |  | 
| 15 | 
            +
            def load_default_configs(app_id, run_id, config_id)
         | 
| 16 | 
            +
              configs_db = nutella.f.persist.get_run_json_object_store(app_id, run_id, 'configs')
         | 
| 17 | 
            +
              reply = {
         | 
| 18 | 
            +
                  "1"=> {
         | 
| 19 | 
            +
                      "name"=> "Default activity",
         | 
| 20 | 
            +
                      "mapping"=> [{
         | 
| 21 | 
            +
                                       "family"=> "Public",
         | 
| 22 | 
            +
                                       "items"=> [{
         | 
| 23 | 
            +
                                                      "name"=> "",
         | 
| 24 | 
            +
                                                      "channels"=> []
         | 
| 25 | 
            +
                                                  }]
         | 
| 26 | 
            +
                                   }, {
         | 
| 27 | 
            +
                                       "family"=> "Personal",
         | 
| 28 | 
            +
                                       "items"=> []
         | 
| 29 | 
            +
                                   }]
         | 
| 30 | 
            +
                  }
         | 
| 31 | 
            +
              }
         | 
| 32 | 
            +
              configs_db['configs'] = reply
         | 
| 33 | 
            +
              configs_db['currentConfig'] = 1
         | 
| 34 | 
            +
              configs_db['launchTime'] = Time.now.to_f * 1000
         | 
| 35 | 
            +
              reply
         | 
| 36 | 
            +
            end
         | 
| 37 | 
            +
             | 
| 15 38 | 
             
            nutella.f.net.subscribe_to_all_runs('configs/update', lambda do |message, app_id, run_id, from|
         | 
| 16 39 | 
             
                                                                  new_configs = message
         | 
| 17 40 |  | 
| @@ -42,36 +65,19 @@ nutella.f.net.handle_requests_on_all_runs('configs/retrieve', lambda do |request | |
| 42 65 | 
             
                                                                            configs_db = nutella.f.persist.get_run_json_object_store(app_id, run_id, 'configs')
         | 
| 43 66 | 
             
                                                                            reply = configs_db['configs']
         | 
| 44 67 | 
             
                                                                            if reply == nil
         | 
| 45 | 
            -
                                                                              reply =  | 
| 46 | 
            -
                                                                                  "1"=> {
         | 
| 47 | 
            -
                                                                                      "name"=> "Default activity",
         | 
| 48 | 
            -
                                                                                      "mapping"=> [{
         | 
| 49 | 
            -
                                                                                                       "family"=> "Public",
         | 
| 50 | 
            -
                                                                                                       "items"=> [{
         | 
| 51 | 
            -
                                                                                                                      "name"=> "",
         | 
| 52 | 
            -
                                                                                                                      "channels"=> []
         | 
| 53 | 
            -
                                                                                                                  }]
         | 
| 54 | 
            -
                                                                                                   }, {
         | 
| 55 | 
            -
                                                                                                       "family"=> "Personal",
         | 
| 56 | 
            -
                                                                                                       "items"=> []
         | 
| 57 | 
            -
                                                                                                   }]
         | 
| 58 | 
            -
                                                                                  }
         | 
| 59 | 
            -
                                                                              }
         | 
| 68 | 
            +
                                                                              reply = load_default_configs(app_id, run_id, 'configs')
         | 
| 60 69 | 
             
                                                                            end
         | 
| 61 | 
            -
             | 
| 62 70 | 
             
                                                                            if configs_db['currentConfig'] == nil
         | 
| 63 71 | 
             
                                                                              configs_db['currentConfig'] = 1
         | 
| 64 72 | 
             
                                                                            end
         | 
| 65 | 
            -
             | 
| 66 73 | 
             
                                                                            if configs_db['launchTime'] == nil
         | 
| 67 74 | 
             
                                                                              configs_db['launchTime'] = Time.now.to_f * 1000
         | 
| 68 75 | 
             
                                                                            end
         | 
| 69 | 
            -
             | 
| 70 76 | 
             
                                                                            reply
         | 
| 71 77 | 
             
                                                                          end
         | 
| 72 78 | 
             
                                                                        end)
         | 
| 73 79 |  | 
| 74 | 
            -
            # 'mapping' is the current running configuration
         | 
| 80 | 
            +
            # 'mapping' is the current running configuration (used from main app)
         | 
| 75 81 | 
             
            nutella.f.net.handle_requests_on_all_runs('mapping/retrieve', lambda do |request, app_id, run_id, from|
         | 
| 76 82 | 
             
                                                                          reply = {}
         | 
| 77 83 | 
             
                                                                          if request == {}
         | 
| @@ -81,10 +87,15 @@ nutella.f.net.handle_requests_on_all_runs('mapping/retrieve', lambda do |request | |
| 81 87 | 
             
                                                                            if configs_db == nil
         | 
| 82 88 | 
             
                                                                              reply = []
         | 
| 83 89 | 
             
                                                                            else
         | 
| 84 | 
            -
                                                                               | 
| 85 | 
            -
             | 
| 86 | 
            -
             | 
| 87 | 
            -
                                                                               | 
| 90 | 
            +
                                                                              if configs_db['configs'] == nil
         | 
| 91 | 
            +
                                                                                load_default_configs(app_id, run_id, 'configs')
         | 
| 92 | 
            +
                                                                                reply = []
         | 
| 93 | 
            +
                                                                              else
         | 
| 94 | 
            +
                                                                                configs = configs_db['configs']
         | 
| 95 | 
            +
                                                                                id = '%d' % configs_db['currentConfig']
         | 
| 96 | 
            +
                                                                                config = configs[id]
         | 
| 97 | 
            +
                                                                                reply = config['mapping']
         | 
| 98 | 
            +
                                                                              end
         | 
| 88 99 | 
             
                                                                            end
         | 
| 89 100 | 
             
                                                                            reply
         | 
| 90 101 | 
             
                                                                          end
         |