Socket
Book a DemoInstallSign in
Socket

@kodadot1/vuex-options

Package Overview
Dependencies
Maintainers
2
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kodadot1/vuex-options

Polkadot Settings for KodaDot

latest
Source
npmnpm
Version
0.1.5
Version published
Maintainers
2
Created
Source

vue-settings

Vuex module for KodaDot app

Installation

yarn add @kodadot1/vue-settings

State Props

NameDescription
apiUrlSelected Url
i18nLangSelected language
lockingSelected Locking
prefixPrefix
uiModeUI Mode
uiThemeUI Theme
avaibleOptionsObject of all avaible options

Mutations

NameDescriptionParamsTypes
setSettingsSet settingssettingsSettingsStruct

Getters

NameDescriptionReturns
availableNodesList of NodesOption[]
availableLanguagesList of LanguagesOption[]
availableCryptosList of Cryptographic modesOption[]
availableLockingList of LockingOption[]
availablePrefixesList of PrefixesOption[]
availableUiModesList of UI ModesOption[]
availableUiThemesList of UI ThemesOption[]
getSettingsObject of all avaible optionsSettingsStruct

Usage Examples

import SettingModule to your store as module

import Vue from 'vue'
import Vuex from 'vuex'
import SettingModule from '@vue-polkadot/vue-settings'

Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    setting: SettingModule,
  },
})

now you can use getters and actions inside your component (Using Vue with typescript)

<template>
  <div>
    <div v-for="option in options">
      <span>{{option.value}}</span>
      <span>{{option.text}}</span>
    </div>
  </div>
</template>

<script lang="ts">
  import { Component, Vue } from 'vue-property-decorator'

  @Component
  export default class App extends Vue {
    // Getter is like computed
    get options(): Option[] {
      return this.$store.getters.availableNodes
    }
  }
</script>

FAQs

Package last updated on 25 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.