~snappy-dev/snappy-hub/webdm

« back to all changes in this revision

Viewing changes to www/src/js/main/views/home.js

  • Committer: Sergio Schvezov
  • Date: 2015-01-19 21:07:06 UTC
  • mfrom: (70.2.8 use-pkg-icons)
  • Revision ID: sergio.schvezov@canonical.com-20150119210706-3vxkgkcqi9oatxsl
Fixing app opening

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
        }
18
18
 
19
19
        snap.launchable = false;
20
 
        if (snap.ports.required !== undefined) {
 
20
        if (snap.ports.required) {
21
21
          snap.launchable = true;
22
22
          snap.url = location.protocol + '//' +
23
23
                     location.hostname + ':' +
24
24
                     snap.ports.required;
 
25
        } else {
 
26
          snap.url = '/apps/' + snap.name;
25
27
        }
26
28
 
27
29
        snap.imgSrc = '/icons/';
30
32
        }
31
33
        snap.imgSrc += snap.name + '.png';
32
34
 
33
 
        snap.url = '/apps/' + snap.name;
34
 
 
35
35
        return snap;
36
36
      });
37
37