Dashboard-Plugin
Docs HomeDashboard plugins and appsInfomakerNaviga global
  • About
  • Intro
  • Getting started
  • The anatomy of a plugin
  • Manifest structure
  • Getting started
    • Get Dashboard-Plugin
    • Build
  • What's new
  • Components
    • Agent
      • Actions
    • Application
    • Widget
    • Health
    • Modal
    • Settings
  • API and GUI
    • API
      • Overview
      • register
        • Reducers
        • Portals
        • Requirements
        • Permissions
        • Default config
        • Config Modifiers
      • cache
      • store
      • encrypt
      • decrypt
      • createUUID
      • getLanguage
      • getTextDirection
      • getTimeFormat
      • getKeyCharFromCode
      • getKeyCodeFromChar
      • event
      • Logger
      • buildRouteUrlWithDispatchableEvent
      • getUser
      • getAction
      • getPortal
      • getConfig
      • getLocalize
      • getAvailableActions
      • getAvailablePortals
      • request
      • setHealth
      • openModal
      • closeModal
      • confirm
      • notifications
      • hasPermission
      • standalone
      • withUser
      • useModal
      • useSheet
      • useUser
      • useConfig
      • useLocalize
      • useApplication
      • useMappings
      • useStandalone
    • GUI
      • Core GUI
      • Style-Guide
    • Modules
      • GUI
      • Utility
      • NavigaID
        • getUserToken
        • getApplicationToken
        • getGroupsFromToken
  • Mappings
  • Plugins deployments
  • S3 upload
  • Deprecations
    • 4.1.0
    • 4.0.0
    • 2.1.0
Powered by GitBook
On this page
  • Plugin config
  • Application config

Was this helpful?

  1. Components

Settings

Settings component used for your plugin settings config

Plugin config

import { Plugin } from '@root'

const {
    GUI
} = Plugin

class Settings extends Plugin.Settings {
    plugin() {
        return(
            <>
                <GUI.ConfigInput    
                    name={'username'}
                    ref={refs => this.handleRefs(refs, 'username')}
                />
                
                <GUI.ConfigPassword
                    name={'password'}
                    ref={refs => this.handleRefs(refs, 'password')}
                />
            </>
        )
    }
}

export {
    Settings
}

You can access your plugin config from Dashboard main components withprops.config.username && props.config.password

Or with Plugin.useConfig() hook

Application config

import { Plugin } from '@root'

const {
    GUI
} = Plugin


class Settings extends Plugin.Settings {
    application() {
        return(
            <GUI.ConfigInput    
                name={'title'}
                ref={refs => this.handleRefs(refs, 'applicationTitle')}
            />
        )
    }
}

export {
    Settings
}

You can access your plugin config from Dashboard main components withprops.config.applicationTitle

Or with Plugin.useApplicationConfig() hook

And of course you can use plugin() and application() together, but make sure you don't use the same ref name in plugin() and application(), because one of em will override the other.

PreviousModalNextAPI

Last updated 4 years ago

Was this helpful?

useConfig