<commit_before><template>
  <!-- 提交按钮 -->
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-4">
      <ui-button type="button" class="btn btn-primary" @click="handleSubmit"></ui-button>
    </div>
    <span class="col-sm-6 help-block">
      设置公开磁盘，储存目录为 storage/app/public 如果你切换了磁盘，请手动迁移文件。
    </span>
  </div>
</template>

<script>
import request, { createRequestURI } from '../../../../util/request';
export default {
  name: 'module-cdn-filesystem-public',
  methods: {
    handleSubmit ({ stopProcessing }) {
      request.post(createRequestURI('cdn/filesystems/public'), {}, {
        validateStatus: status => status === 201,
      }).then(({ data }) => {
        stopProcessing();
        this.$store.dispatch('alert-open', { type: 'success', message: data });
      }).catch(({ response: { data = { message: '提交失败' } } = {} }) => {
        stopProcessing();
        this.$store.dispatch('alert-open', { type: 'danger', message: data });
      });
    },
  },
};
</script>
<commit_msg>更新公开磁盘描述，增加更准确的提示。<commit_after><template>
  <!-- 提交按钮 -->
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <ui-button type="button" class="btn btn-primary" @click="handleSubmit"></ui-button>
    </div>
    <div class="col-sm-12 help-block">
      设置公开磁盘，储存目录为 storage/app/public 如果你切换了磁盘，请手动迁移文件。<br />
      公开磁盘为了能在 public 下访问，你需要在运行：<code>php artisan storage:link</code>
    </div>
  </div>

</template>

<script>
import request, { createRequestURI } from '../../../../util/request';
export default {
  name: 'module-cdn-filesystem-public',
  methods: {
    handleSubmit ({ stopProcessing }) {
      request.post(createRequestURI('cdn/filesystems/public'), {}, {
        validateStatus: status => status === 201,
      }).then(({ data }) => {
        stopProcessing();
        this.$store.dispatch('alert-open', { type: 'success', message: data });
      }).catch(({ response: { data = { message: '提交失败' } } = {} }) => {
        stopProcessing();
        this.$store.dispatch('alert-open', { type: 'danger', message: data });
      });
    },
  },
};
</script>

{'fraction_non_alphanumeric': 0.20874940561103186, 'fraction_numerical': 0.006657156443176415, 'mean_word_length': 2.954887218045113, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 38, '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': '7060203', 'n_tokens_mistral': 749, 'n_tokens_neox': 772, 'n_words': 125}