• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-RouteInfo

Scheduled Pinned Locked Moved Requests
8 Posts 4 Posters 2.3k Views 4 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    QNimbus
    last edited by QNimbus May 17, 2017, 9:47 AM May 17, 2017, 9:10 AM

    Hello all,

    I’m currently building my first MagicMirror and I wanted to make a module that I found usefull along with it. The module I’m currently making takes 2 addresses and uses a public API to calculate the route and the current delay to be expected along said route (given current traffic situation).

    Currently the module only works for addresses in the Netherlands. Also since it’s my first module I could really use some feedback with regard to the way it is implemented.

    Together with the module I also wanted to make a TypeScript Definition file for the MagicMirror libraries so people can use Typescript instead of plain JavaScript. At the moment I just have a few placeholders in the TypeScript definition file to get everything working.

    The module works right now, but I really want to improve the display of the module. At the moment it just displays 3 lines of text. One of the things I would like to implement is a nice/larger (graphical?) representation with 3 slides that change every so many seconds. That way the information is presented in a nicer fashion and also more readable on a MagicMirror.

    [card:QNimbus/MMM-RouteInfo]

    The GitHub repo is at QNimbus/MMM-RouteInfo.

    Again, I would really appreciate feedback or if you think you can contribute in any way and help me along.

    1 Reply Last reply Reply Quote 1
    • Q Offline
      QNimbus
      last edited by May 19, 2017, 9:35 AM

      Also, just to clarify - I’ve made an attempt to create a TypeScript definitions file for MagicMirror. It’s by no means complete, but I would really appreciate it if anyone would like to help/collaborate on this specific topic.

      The definition files are in my GitHub repo in the ‘src’ folder.

      Being able to use TypeScript to develop for MagicMirror would be a great improvement if you ask me ;-)

      1 Reply Last reply Reply Quote 0
      • H Offline
        henrikra
        last edited by Jan 6, 2018, 1:34 PM

        Just wanted to let you know that I made initial TS pr for MagicMirror to add simple types. They aren’t complete but you gotta start somewhere :) https://github.com/MichMich/MagicMirror/pull/1121

        1 Reply Last reply Reply Quote 0
        • W Offline
          winstonma
          last edited by Sep 3, 2020, 12:10 PM

          @henrikra I am not sure if it is appropriate but I would like to use Nullish coalescing operator.

          Is it supported in native MagicMirror? Thanks

          S 1 Reply Last reply Sep 3, 2020, 12:38 PM Reply Quote 0
          • S Offline
            sdetweil @winstonma
            last edited by sdetweil Sep 3, 2020, 12:43 PM Sep 3, 2020, 12:38 PM

            @winstonma as I replied in your other topic it needs node version 14 or higher and maybe a browser mod

            u can you chromium over the mm server to test, if u have node 14

            note it also depends where the operator is used

            if in node_helper, then u need node 14 on the server. if I the modulename.js then wherever the browser runs

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • W Offline
              winstonma
              last edited by Sep 3, 2020, 7:17 PM

              Thanks @sdetweil

              As there are some TS support added 2 years ago (and I am not sure how much TS support is added), therefore I have this question.

              Yes the browser support on Nullish coalescing operator started half year back but I need the operator on the backend code (which is the node part). I wonder if I could add some npm modules to make it happen.

              S 1 Reply Last reply Sep 3, 2020, 7:23 PM Reply Quote 0
              • S Offline
                sdetweil @winstonma
                last edited by Sep 3, 2020, 7:23 PM

                @winstonma no idea. looks like a language thing

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • W Offline
                  winstonma
                  last edited by Sep 3, 2020, 7:28 PM

                  @sdetweil I read this article it gives me some hope that I could add some TS support in the existing module.

                  Thanks

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  Enjoying MagicMirror? Please consider a donation!
                  MagicMirror created by Michael Teeuw.
                  Forum managed by Sam, technical setup by Karsten.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy