1

I'm using Appgyver & Supersonic. This app is Login Only, no content before login

My initial view is a login page. Once authorized I replace view stack with the Dashboard.

var view = new supersonic.ui.View('dashboard#index');
        view.start("dashboard").then(function (startedView) {
            supersonic.ui.layers.replace(startedView);
        });

Now the dashboard will pop up. But dealing with the Tabs and Drawers API results in errors because those webviews are no longer there.

My ideal set up is this:

  1. A login page and nothing more
  2. Once logged in, Tabs and Drawers are enabled

I cannot figure this set up out, I can't find documentation on these subjects. How can I init Drawers and Tabs after replacing the Initial View.

structure.coffee as requested:

  tabs: [
    {
      title: "Login"
      id: "login"
      location: "default#login" 
    }
    {
      title: "Profile"
      id: "settings"
      location: "dashboard#profile"
    }
    {
      title: "Settings"
      id: "internet"
      location: "http://google.com" # URLs are supported!
    }
  ]

  drawers:
     left:
       id: "leftDrawer"
       location: "dashboard#drawer"
       showOnAppLoad: false
     options:
       animation: "swingingDoor"

  initialView:
    id: "initialView"
    location: "default#login"
Theodore Enderby
  • 622
  • 1
  • 6
  • 19
  • Can you post your `structure.coffee` file? It sounds like the tabs aren't loaded. Same goes for the drawer. – area28 Sep 22 '15 at 01:18
  • They are absolutely loaded. If I don't run an initialView and just let tabs be the main webview everything works just fine. It's when I run an initialView they will never be init. API calls all fail and claim they are not there – Theodore Enderby Sep 22 '15 at 03:25

1 Answers1

1

Eureka!

What you want to do for this setup is have initialView be the login page and instead of replacing the layer stack, just dismiss the initialView. This is clearly in the documentation I was just doing something wrong.

Doing it this way does create the tabs and the drawers

Theodore Enderby
  • 622
  • 1
  • 6
  • 19