<commit_before>'use strict';

require('./index.less');

var api = require('api');

module.exports = {
  className: 'pv-bookmark',
  template: require('./template.html'),
  directives: {
    include: require('./directives/include')
  },
  data: {
    loading: false
  },
  methods: {
    update: function update(evt) {
      evt.preventDefault();
      evt.stopPropagation();

      var vm = this;

      this.loading = true;
      api.invoke('bookmark', this.pix, evt.target).then(function() {
        vm.loading = false;
      });
    }
  }
};<commit_msg>fix(bookmark): 投稿後パネルを閉じる<commit_after>'use strict';

require('./index.less');

var api = require('api');

module.exports = {
  className: 'pv-bookmark',
  template: require('./template.html'),
  directives: {
    include: require('./directives/include')
  },
  data: {
    loading: false
  },
  methods: {
    update: function update(evt) {
      evt.preventDefault();
      evt.stopPropagation();

      var vm = this;

      this.loading = true;
      api.invoke('bookmark', this.pix, evt.target).then(function() {
        vm.loading = false;
        vm.$root.$broadcast('panel:change', 'bookmark');
      });
    }
  }
};
{'fraction_non_alphanumeric': 0.17781541066892464, 'fraction_numerical': 0.0, 'mean_word_length': 2.7884615384615383, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4887900', 'n_tokens_mistral': 383, 'n_tokens_neox': 394, 'n_words': 69}