Jump to content

Non-Admin Page


Recommended Posts

Posted

The plugin I am working on, initially was pure for admins to look at.
However, at least 1 possible 2 pages, have value to the user itself.

Is there a JS/Html methodology for adding a non admin "advanced" (or somewhere) page?

TIA

 

Posted
44 minutes ago, Luke said:

Hi, listenbnrainz is a good example to look at: https://github.com/MediaBrowser/ListenBrainz

Having never used this plugin before, what am I looking for? I dont see any changes.  I do see it on the plugins page, but thats it.

Posted

Other questions

Since there is no Dashboard, what is the equivalent call for Dashboard.getConfigurationResourceUrl?

 

Posted

Any ideas?
"viewmanager.js?v=4.9.5.0:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'prototype')
    at addMethodsToPluginControllerFactory (viewmanager.js?v=4.9.5.0:1:986)
    at viewmanager.js?v=4.9.5.0:1:10942"
 

Posted
Just now, HawkXP71 said:

Any ideas?
"viewmanager.js?v=4.9.5.0:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'prototype')
    at addMethodsToPluginControllerFactory (viewmanager.js?v=4.9.5.0:1:986)
    at viewmanager.js?v=4.9.5.0:1:10942"
 

I’m not sure.  Start with something identical to the example and then go from there.

Posted
4 minutes ago, HawkXP71 said:

Other questions

Since there is no Dashboard, what is the equivalent call for Dashboard.getConfigurationResourceUrl?

 

What makes you think there’s no Dashboard?

 There’s no equivalent on the server if that’s what you’re asking.

Posted
10 minutes ago, Luke said:

What makes you think there’s no Dashboard?

 There’s no equivalent on the server if that’s what you’re asking.

Because in my js for the page, I have it load a helpers file, in the defines section, and the js engine is saying Dashboard is undefined. 

HawkXP71
Posted

@Luke@softworkzI am playing with the ListenBrainz trying to get a Dashboard object in the JS file configPage.js

Any calls to Dashboard here, fails with Dashboard undefined

Just modifying the onResume function to 
 

View.prototype.onResume = function (options) {

    BaseView.prototype.onResume.apply(this, arguments);

    console.log("onResume", Dashboard);

    if (options.refresh) {
        loading.show();
        var view = this.view;
        var form = view.querySelector("form");
        var instance = this;

        loadConfiguration(instance.params.userId, form);
    }
};

should work, but it says undefined when running

Thoughts?

HawkXP71
Posted

I was able to get it working with the api client. 

 

General question @Lukecan these pages be seen on the TV/android apps? Or only via the web page? 

Posted
Quote

Any calls to Dashboard here, fails with Dashboard undefined

It's probably not getting loaded there. It is a legacy api at this point that is just a wrapper around other functions. what do you need to do with it?

Posted
20 minutes ago, HawkXP71 said:

I was able to get it working with the api client. 

 

General question @Lukecan these pages be seen on the TV/android apps? Or only via the web page? 

Right now only your built-in web app.

HawkXP71
Posted
1 hour ago, Luke said:

It's probably not getting loaded there. It is a legacy api at this point that is just a wrapper around other functions. what do you need to do with it?

I needed a url to a user configuration page 

 

I was able to use apiclient.get url, and then had to remove the /emby and added the user Id

 

I am noticing a bug, which I can write up tomorrow. 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...