Git Product home page Git Product logo

mozaik-ext-time's Introduction

Mozaïk time widgets

License Travis CI NPM version Dependencies Coverage Status widget count

⚠️ This branch holds the code for Mozaïk v2, if you're looking for v1, please have a look at the dedicated branch.

Time — Clock

Show analog clock from local or another timezone.

clock

parameters

key required description
title no Title of the widget. Prefix it with :: to format with Moment.
timezone no  Name of the timezone, like America/Los_Angeles. See http://momentjs.com/timezone/ for possible values. Defaults to local time.
info no Free textual value to show within clock. Special values are: timezone, date, time.
sunRise no Local time when sun rises (used for day/night indicator). Defaults to 6:00.
sunSet no Local time when sun sets (used for day/night indicator). Defaults to 18:00.

usage

#
# Displaying date info
#
- extension:  time
  widget:     Clock
  info:       date
  columns:    1
  rows:       1
  x:          0
  y:          0

#
# Displaying timezone info
#  
- extension:  time
  widget:     Clock
  info:       timezone
  timezone:   America/Los_Angeles
  columns:    1
  rows:       1
  x:          1
  y:          0

#
# Displaying custom info
#  
- extension:  time
  widget:     Clock
  info:       Time is money!
  columns:    1
  rows:       1
  x:          2
  y:          0

Time — DigitalClock

Show digital clock from local or another timezone.

clock

parameters

key required default description
displayDate no true Enable/disable date display.
displaySeconds no true Enable/disable seconds display.
timezone no   Name of the timezone, like America/Los_Angeles. See http://momentjs.com/timezone/ for possible values. Defaults to local time.

usage

- extension:      time
  widget:         DigitalClock
  columns:        1
  rows:           1
  x:              0
  y:              0

#
# Disabling time seconds
#  
- extension:      time
  widget:         DigitalClock
  displaySeconds: false
  columns:        1
  rows:           1
  x:              1
  y:              0

#
# Disabling date
#
- extension:      time
  widget:         DigitalClock
  displayDate:    false
  columns:        1
  rows:           1
  x:              2
  y:              0

mozaik-ext-time's People

Contributors

juhamust avatar kurtextrem avatar plouc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mozaik-ext-time's Issues

TypeError: Cannot read property 'names' of undefined

item info notes
node version v8.11.3
npm version 6.2.0
yarn version 1.9.4
mozaik-ext-time version ^2.0.0-alpha.11
mozaik version ^2.0.0-alpha.4
mozaik-demo version 2.0.0
component DigitalClock
browser Chrome 72.0.3626.109

Expected behavior

Digital Clock displays what shows in the demo.

Actual behavior

App fails with error

TypeError: Cannot read property 'names' of undefined

screen shot 2019-02-24 at 9 14 35 pm

Steps to reproduce

Add the extension and run yarn install
then yarn start

import time from "@mozaik/ext-time";

Registry.addExtensions({
  time
});

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.