How to use the buefy.ToastProgrammatic.open function in buefy

To help you get started, we’ve selected a few buefy 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 Flowm / satvis / src / modules / SatelliteProperties.js View on Github external
notifyPasses(aheadMin = 5) {
    if (!this.groundStationAvailable) {
      Toast.open({
        message: "Ground station required to notify for passes",
        type: "is-warning",
        position: "is-bottom",
        duration: 4000,
      });
      return;
    }
    let passes = this.orbit.computePasses(this.groundStationPosition);
    if (!passes) {
      Toast.open({
        message: `No passes for ${this.name}`,
        type: "is-warning",
        position: "is-bottom",
        duration: 4000,
      });
      return;
    }

    passes.forEach((pass) => {
      let start = dayjs(pass.start).startOf("second");
      this.pm.notifyAtDate(start.subtract(aheadMin, "minute"), `${pass.name} pass in ${aheadMin} minutes`);
      this.pm.notifyAtDate(start, `${pass.name} pass starting now`);
      //this.pm.notifyAtDate(dayjs().add(5, "second"), `${pass.name} test pass in ${aheadMin} minutes`);
    });
    Toast.open({
      message: `Notifying for passes of ${this.name}`,
github dxe / adb / frontend / flash_message.ts View on Github external
export function flashMessage(content: string, isError?: boolean) {
  const toastType = isError ? 'is-danger' : 'is-success';
  const duration = 3000;
  const position = 'is-bottom-right';
  Toast.open({ type: toastType, position: position, duration: duration, message: content });
}
github google / timesketch / timesketch / frontend / src / utils / RestApiClient.js View on Github external
}, function (error) {
  if (error.response.data.message === 'The CSRF token has expired') {
    Snackbar.open({
      message: error.response.data.message,
      type: 'is-white',
      position: 'is-top',
      actionText: 'Refresh',
      indefinite: true,
      onAction: () => {
        location.reload()
      }}
    )
  } else {
    Toast.open(error.response.data.message)
  }
  return Promise.reject(error);
});