How to use the quasar.SessionStorage.set function in quasar

To help you get started, we’ve selected a few quasar 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 zuck / alighieri / src / components / Writer.vue View on Github external
require('fs').writeFile(filename, fileContent, (err) => {
            if (err) throw err
          })
        }
        else {
          FileSaver.saveAs(
            new Blob(
              [fileContent],
              { type: 'text/html;charset=utf-8' }
            ),
            filename
          )
        }

        this.filename = filename
        SessionStorage.set(CONTENT_LAST_SAVED_KEY, this.contentHTML)
        /* Hack to recompute 'isCHanged' property */
        this.contentHTML = ' ' + this.contentHTML
        this.contentHTML = this.contentHTML.substr(1)
        /* */
      }
      else {
        this.saveFileAs()
      }
    },
    saveFileAs () {
github zuck / alighieri / src / components / Writer.vue View on Github external
reader.onload = (evt) => {
          try {
            var data = evt.target.result
            this.filename = f.name.split('.')[0]
            this.contentHTML = data
              .split('')[1]
              .replace('', '')
              .replace('', '')

            SessionStorage.set(CONTENT_LAST_SAVED_KEY, this.contentHTML)
          }
          catch (err) {
            reader.onerror(err)
          }
        }
        reader.onerror = (err) => {
github zuck / alighieri / src / components / Writer.vue View on Github external
mounted () {
    window.onbeforeunload = this.exit
    document.onkeyup = this.onKeyPress
    document.title = this.windowTitle

    this.$refs.layout.hideLeft()

    this.contentHTML = LocalStorage.get.item(CONTENT_BACKUP_KEY) || DEFAULT_CONTENT_HTML
    SessionStorage.set(CONTENT_LAST_SAVED_KEY, this.contentHTML)

    document.querySelector('#editor').focus()
  },
  methods: {
github zuck / alighieri / src / store / index.js View on Github external
registerLastSave (state, on) {
      state.lastSaved = on || new Date()
      SessionStorage.set(CONTENT_LAST_SAVED_KEY, state.contentHTML)
    },
github zuck / alighieri / src / components / Writer.vue View on Github external
resetFile () {
      SessionStorage.set(CONTENT_LAST_SAVED_KEY, DEFAULT_CONTENT_HTML)
      this.contentHTML = DEFAULT_CONTENT_HTML
      this.filename = null
    },
    newFile () {