How to use the @capacitor/core.StatusBarStyle.Light function in @capacitor/core

To help you get started, we’ve selected a few @capacitor/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ModusCreateOrg / beep / src / main.js View on Github external
async function initCapacitor() {
  // Platform checks
  Vue.prototype.$isWeb = helpers.isWeb()
  Vue.prototype.$isIOS = helpers.isIOS()

  // Set status-bar background and style
  StatusBar.setBackgroundColor({ color: helpers.env('INITIAL_STATUSBAR_COLOR') }).catch(helpers.err)
  StatusBar.setStyle({ style: StatusBarStyle.Light }).catch(helpers.err)

  // Set network checks
  Network.getStatus()
    .then(s => (Vue.prototype.$networkStatus = s))
    .catch(helpers.err)

  // Listen to network changes
  Network.addListener('networkStatusChange', s => (Vue.prototype.$networkStatus = s)).catch(
    helpers.err
  )
}
github nerdic-coder / block-photos / src / index.js View on Github external
async function initCapacitor() {
  const info = await Device.getInfo();
  if (info.platform !== 'web') {
    const { App, StatusBar } = Plugins;
    StatusBar.setStyle(StatusBarStyle.Light);
    StatusBar.setBackgroundColor({ color: '#220631'});

    App.addListener('appUrlOpen', (data) => {
      if (data.url) {
        let authResponse = data.url.split(":")[1];
        if (authResponse) {
          window.location = window.location + '?authResponse=' + authResponse;
        }
      }
    });
  }
}
github ModusCreateOrg / beep / src / mixins / toggleStatusbarColor.js View on Github external
beforeRouteLeave(to, from, next) {
    for (const selector of metaSelectors) {
      document.querySelector(selector).content = this.initialStatusbarColor
    }
    StatusBar.setBackgroundColor({ color: this.initialStatusbarColor }).catch(this.$helpers.err)
    StatusBar.setStyle({ style: StatusBarStyle.Light }).catch(this.$helpers.err)
    next()
  },
}