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

 

HawkXP71
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

Hi, no there isn't.

HawkXP71
Posted

Other questions

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

 

HawkXP71
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.

HawkXP71
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?

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...