No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. jrhopkins83
    J
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 15
    • Best 2
    • Groups 0

    jrhopkins83

    @jrhopkins83

    2
    Reputation
    4
    Profile views
    15
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    jrhopkins83 Follow

    Best posts made by jrhopkins83

    • RE: Keep q-chat scrolled down as new message appears.

      I tried this approach but it kept scrolling down when I tried to manually scroll up (with mouse or keyboard)… The scroll area appears to jump up and down.

      I figured out that manually scrolling in the scroll area triggered the scroll event (I’m a little slow) which triggered the onScrollFirst method.

      So my approach is only to scroll to the bottom when first entering the chat screen using the mounted hook and when the user enters a new message. Obviously it won’t scroll to the bottom if someone else enters a chat after the user scrolls up. But the trade off is that the user’s chat window won’t keep jumping to the bottom every time someone enters a message.

      I used the function I found in this git issue: https://github.com/quasarframework/quasar/issues/6167.

      Here’s my code:

      html snippet:
      <q-card class=“chat-list-card” flat bordered>
      <q-scroll-area
      ref=“chatScroll”
      >

      methods and mounted hook:
      methods: {
      …mapActions(‘messages’, [‘addMessage’]),
      scroll () {
      const scrollArea = this.$refs.chatScroll
      const scrollTarget = scrollArea.getScrollTarget()
      const duration = 350
      scrollArea.setScrollPosition(scrollTarget.scrollHeight, duration)
      },
      async sendMessage () { // executed when user clicks ‘send’ button
      try {
      const messagesRef = firebaseStore.collection(‘messages’)
      const newMessage = {
      uid: this.message.uid,
      playerName: this.message.playerName,
      text: this.message.text,
      avatarUrl: this.message.avatarUrl,
      timestamp: Timestamp.fromDate(new Date())
      }
      await messagesRef.add(newMessage)
      this.message.text = ‘’
      this.scroll()
      } catch (error) {
      showMessage(‘Error’, Error saving new message to Firebase Database: ${error.message})
      }
      }
      },
      mounted () {
      this.scroll()
      }

      posted in Help
      J
      jrhopkins83
    • Unable to find node_modules/@capacitor/android/capacitor

      I’m trying to build a capacitor app for Android and get the following error when running quasar dev -m capacitor -T android:
      “Unable to find node_modules/@capacitor/android/capacitor. Are you sure @capacitor/android is installed? This file is currently required for Capacitor to function.”

      I was able to successfully develop an iOS app with capacitor. When I look in the src-capicitor/node_modules/@capacitor folder, I see a subfolder for ios but not android.

      I’ve googled solutions but can’t find any reports of the same problem.
      Steps:
      Created a new Quasar vue project
      ran quasar mode add capacitor
      ran quasar dev -m capacitor -T android

      I decided to try capacitor b/c I can’t get cordova to build with Android either after spending 2 days trying to resolve one problem after another.

      Really need to get this working so any help would be greatly appreciated.

      posted in CLI
      J
      jrhopkins83

    Latest posts made by jrhopkins83

    • RE: Trying to install Google Analytics. Very confused!

      @gvorster & @dikutandi I’ve followed the steps above and Firebase or Google Analytics are showing nothing .

      Where is firebase.analytics invoked? I tried adding firebase.analytics() to my firebase.js boot file but get the error:
      firebase.js?fc1b:29 Uncaught TypeError: firebase_app__WEBPACK_IMPORTED_MODULE_0___default.a.analytics is not a function

      I’m just trying to get basic app usage information like users by date. Then I can drill into specific application usage but right now I don’t even have the basics working.

      Any suggestions?

      posted in Help
      J
      jrhopkins83
    • RE: Firebase Dynamic Links with Capacitor

      I was able to get cordova-plugin-firebase-dynamiclinks working on Android but on iOS getting the error message:
      [Firebase/Analytics][I-ACS023000] Deep Link Web URL query is empty.

      I’ve found multiple stack overflow and GitHub issues with the same error but no-one seems to have solved it with this plugin.

      posted in Help
      J
      jrhopkins83
    • Firebase Dynamic Links with Capacitor

      Has anyone gotten Firebase Dynamic Links to work with a Capacitor mobile app on iOS or Android?

      I’ve tried both the @turnoutt/capacitor-firebase-dynamic-links and cordova-plugin-firebase-dynamiclinks plugins.

      On iOS with my phone attached to my Mac and running quasar dev -m capacitor -T iOS, I’m able to launch the app by clicking on a dynamic link I created in the Firebase console but it doesn’t trigger the onDynamiclink event for me to capture the url.

      I also used the firebase.auth.sendSignInLinkToEmail method which generates a dynamic link and sends via email. I get the same result when I click the link. The app opens but the onDynamiclink event isn’t fired.

      I’ve read numerous posts and articles found examples with React and Angular but none using Vuejs or Quasar.

      I’d really appreciate anyone sharing their process and code that works.

      Thanks

      posted in Help
      J
      jrhopkins83
    • RE: How to use Firebase Messaging, Dynamic Links and Analytics with Quasar and Android 9

      Can you share a code snippet where you used the Firebase Dynamic Links?

      Also, has anyone tried using these in a capacitor app? I can’t get it to work.

      posted in Useful Tips (NEW)
      J
      jrhopkins83
    • RE: How to tell Quasar to use Firebase emulator in dev mode

      I haven’t tried tedchwang’s approach but I did finally get it to work. Here’s the code from boot/firebase.js:
      // Use emulators
      if (window.location.hostname === ‘localhost’) {
      firebaseStore.settings({
      host: ‘localhost:8080’,
      ssl: false,
      ignoreUndefinedProperties: true
      })
      firebaseFunctions.useFunctionsEmulator(‘http://localhost:5001’)
      firebaseAuth.useEmulator(‘http://localhost:9099’)
      }

      In Quasar.config.js I set the dev server port to 8000 so it doesn’t conflict with the firebase emulators.

      posted in Help
      J
      jrhopkins83
    • RE: Use firebase-messaging-sw.js file in quasar 1.5.8

      Has anyone been able to get FCM working with a background message notification that will navigate the user to a specified url when the message is clicked?

      I’ve tried different approaches from the answers above as well as other approaches and none of them seem to work.

      I can display the notification but cannot get it to navigate to the app url if it’s already opened or open a new tab/window with the url.

      If anyone has solved this problem can you share your solution?

      Thanks

      posted in Help
      J
      jrhopkins83
    • RE: Keep q-chat scrolled down as new message appears.

      I tried this approach but it kept scrolling down when I tried to manually scroll up (with mouse or keyboard)… The scroll area appears to jump up and down.

      I figured out that manually scrolling in the scroll area triggered the scroll event (I’m a little slow) which triggered the onScrollFirst method.

      So my approach is only to scroll to the bottom when first entering the chat screen using the mounted hook and when the user enters a new message. Obviously it won’t scroll to the bottom if someone else enters a chat after the user scrolls up. But the trade off is that the user’s chat window won’t keep jumping to the bottom every time someone enters a message.

      I used the function I found in this git issue: https://github.com/quasarframework/quasar/issues/6167.

      Here’s my code:

      html snippet:
      <q-card class=“chat-list-card” flat bordered>
      <q-scroll-area
      ref=“chatScroll”
      >

      methods and mounted hook:
      methods: {
      …mapActions(‘messages’, [‘addMessage’]),
      scroll () {
      const scrollArea = this.$refs.chatScroll
      const scrollTarget = scrollArea.getScrollTarget()
      const duration = 350
      scrollArea.setScrollPosition(scrollTarget.scrollHeight, duration)
      },
      async sendMessage () { // executed when user clicks ‘send’ button
      try {
      const messagesRef = firebaseStore.collection(‘messages’)
      const newMessage = {
      uid: this.message.uid,
      playerName: this.message.playerName,
      text: this.message.text,
      avatarUrl: this.message.avatarUrl,
      timestamp: Timestamp.fromDate(new Date())
      }
      await messagesRef.add(newMessage)
      this.message.text = ‘’
      this.scroll()
      } catch (error) {
      showMessage(‘Error’, Error saving new message to Firebase Database: ${error.message})
      }
      }
      },
      mounted () {
      this.scroll()
      }

      posted in Help
      J
      jrhopkins83
    • RE: Method's first letter gets dropped, produces "Property _________ does not exist on type 'CombinedVueInstance'"

      Where did you find your resolution? For me it’s only happening in one component vue file.

      I tried changing to LF as you suggested but I’m still seeing the Vetur errors.

      posted in Framework
      J
      jrhopkins83
    • How to tell Quasar to use Firebase emulator in dev mode

      I’m looking for help with testing my Quasar project that uses Firebase locally before deploying using the new Firebase Emulators.

      I followed along with a recent Firebase semi-live episode where he was using the emulators to test his cloud functions locally. He added the following to his main js file:
      if (window.location.hostname === ‘localhost’) {
      firebase.firestore().settings({
      host: ‘localhost:8080’,
      ssl: false
      })
      firebase.functions.useFunctionsEmulator(‘http://localhost:5001’)
      }
      Where 8080 is the port the Firestore emulator is served locally.

      I added the same to my boot/firebase.js file after importing firebase. I modified the port to 8081 since my default for the Quasar dev server is also 8080.

      Unfortunately I get a network error when trying to read from Firestore.

      Also, I have a cloud function that’s triggered when a new document is created in a collection. When I comment out the firebase.firestore.settings but leave firebase.functions.useFunctionsEmulator(‘http://localhost:5001’ I would expect that when I create a document on the google server it would trigger the function using the emulator. However it triggers the function on the firebase server as indicated in the logs and doesn’t trigger the function locally as nothing shows in the emulator log.

      So I haven’t been able to test firestore or cloud functions locally with my Quasar project running in dev mode.

      I found this posting on stackoverflow for pointing a Vue app to the emulators but since it relies on the vue-cli-service in the package.json file, I’m not sure how to apply it to Quasar.
      https://stackoverflow.com/questions/60536897/how-to-tell-a-vue-app-to-use-firebase-emulator

      posted in Help
      J
      jrhopkins83
    • RE: Quasar and vuefire

      Hi, I’m using Vuexfire successfully in my project as I’m using it to maintain a Vuex state rather than on an individual component.

      Let me know if you’d like to see that set up.

      posted in Framework
      J
      jrhopkins83