Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nuxtjs/color-mode

Package Overview
Dependencies
Maintainers
4
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuxtjs/color-mode - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

7

CHANGELOG.md

@@ -5,2 +5,9 @@ # Changelog

### [1.0.3](https://github.com/nuxt-community/color-mode-module/compare/v1.0.2...v1.0.3) (2020-08-04)
### Bug Fixes
* handle spa fallback (regression) ([b92d64b](https://github.com/nuxt-community/color-mode-module/commit/b92d64b29a15bb901abe406aa8dda5709b5caacc)), closes [#21](https://github.com/nuxt-community/color-mode-module/issues/21)
### [1.0.2](https://github.com/nuxt-community/color-mode-module/compare/v1.0.1...v1.0.2) (2020-07-28)

@@ -7,0 +14,0 @@

11

lib/templates/plugin.client.js

@@ -12,4 +12,13 @@ import Vue from 'vue'

export default function (ctx, inject) {
let data = ctx.nuxtState.colorMode
// For SPA mode or fallback
if (!data) {
data = {
preference: colorMode.preference,
value: colorMode.value,
unknown: colorMode.preference === 'system'
}
}
const $colorMode = new Vue({
data: ctx.nuxtState.colorMode,
data,
watch: {

@@ -16,0 +25,0 @@ preference (preference) {

2

package.json
{
"name": "@nuxtjs/color-mode",
"version": "1.0.2",
"version": "1.0.3",
"description": "Dark and Light mode for NuxtJS with auto detection",

@@ -5,0 +5,0 @@ "repository": "nuxt-community/color-mode-module",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc