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-pages & MMM-pages-indicator - Lightweight module pages on your mirror!

    Scheduled Pinned Locked Moved System
    19 Posts 9 Posters 14.1k Views 9 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.
    • S Offline
      shbatm Module Developer
      last edited by

      Very nice module!

      I actually worked on something similar with a fork of MMM-Carousel with clickable indicators and arrow buttons here: https://github.com/shbatm/MMM-Carousel

      After working on a few modules for navigation I can totally understand walking the fine line between features and bloat. Feel free to take a look and borrow anything you want… I’m also open to any suggestions for improvement.

      1 Reply Last reply Reply Quote 0
      • E Offline
        edward-shen Module Developer
        last edited by

        Hey! that looks pretty slick! I especially like your indicator design. I actually considered forking MMM-carousel too, but after taking a look at the code, it seemed like it would be easier to just make my own. Yours definitely seems more fleshed out, especially with the advanced module slides settings.

        I think our projects have different audiences: mine lets people quickly get going, while yours definitely provides more features for those who really want to customize their mirror. If I had known about yours, I definitely would have just used yours instead! :D

        AgilesChromsA 1 Reply Last reply Reply Quote 0
        • AgilesChromsA Offline
          AgilesChroms
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • AgilesChromsA Offline
            AgilesChroms @edward-shen
            last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • J Offline
              jchenaud
              last edited by

              @edward-shen said in MMM-pages & MMM-pages-indicator - Lightweight module pages on your mirror!:

              mande d’extraction pour ajouter des fonctionnalités?

              hey sorry for this wake up :)
              i need to acces for id to curent page. i think its possible but i dont find :(.
              because i need change page if one action have been made juste if im not already on this page

              i am realy beginner whith js.

              sorry for this bad English

              E 1 Reply Last reply Reply Quote 0
              • E Offline
                edward-shen Module Developer @jchenaud
                last edited by

                @jchenaud

                Bonjour, je parle un peu français, mais on peut voir que ce n’est pas bon.

                Le code suivant réagit à une demande de modification du numéro de page.

                notificationReceived: function(notification, payload) {
                  if (notification === 'PAGE_CHANGED') {
                      if (typeof payload === 'number') {
                        // le payload est le numéro de page.
                      }
                  }
                }
                

                Je recommande de stocker ce nombre et de le comparer lorsque vous avez besoin de faire votre action.

                S’il vous plaît laissez-moi savoir si c’est suffisant. La base de code est actuellement gelée parse que je n’ai pas de miroir pour la tester.

                J 1 Reply Last reply Reply Quote 1
                • J Offline
                  jchenaud @edward-shen
                  last edited by jchenaud

                  @edward-shen
                  merci !! je n’est pas utilisée votre code car je ne vois pas trop comment il diffère de :

                  	 if (this.curPage != payload )
                    	 {
                       
                      switch (notification) {
                  

                  avec ce if sa semble éviter les rechargement de la page. mais cette solution me conviens pas vraiment en effet : elle ne permet pas de stopper les notification. il faudrait que je puise accéder a curPage depuis un autre module pour éviter d’émettre d’est notification inutile.

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    jchenaud
                    last edited by

                    up please

                    E 1 Reply Last reply Reply Quote 0
                    • E Offline
                      edward-shen Module Developer @jchenaud
                      last edited by

                      @jchenaud
                      Je suis désolé pour le délai, mais j’ai ajouté une nouvelle réponse de notification pour vous. Envoyez simplement un QUERY_PAGE_NUMBER et MMM-pages va envoyer un PAGE_NUMBER_IS notification. Ajoutez cela à switch cas dans la notificationRecieved fonction, et vous devriez être tous ensemble!

                      J 1 Reply Last reply Reply Quote 0
                      • J Offline
                        jchenaud @edward-shen
                        last edited by

                        @edward-shen thk :) i will try on the next week .

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 1 / 2
                        • 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