From c0803c57089da5fea820831325252e08d850fca8 Mon Sep 17 00:00:00 2001
From: 简律纯 <i@jyunko.cn>
Date: Sat, 4 Nov 2023 13:48:59 +0800
Subject: refactor: rebuild with `vuetify`

---
 logUploader.vue | 65 ---------------------------------------------------------
 1 file changed, 65 deletions(-)
 delete mode 100644 logUploader.vue

(limited to 'logUploader.vue')

diff --git a/logUploader.vue b/logUploader.vue
deleted file mode 100644
index 4856bce..0000000
--- a/logUploader.vue
+++ /dev/null
@@ -1,65 +0,0 @@
-<template>
-    <v-app>
-      <v-container>
-        <v-file-input label="选择日志文件" v-model="selectedFile"></v-file-input>
-  
-        <v-btn color="primary" @click="uploadFile">上传</v-btn>
-  
-        <v-card>
-          <v-card-text>
-            <pre v-html="formattedLog"></pre>
-          </v-card-text>
-        </v-card>
-      </v-container>
-    </v-app>
-  </template>
-  
-  <script>
-  export default {
-    data() {
-      return {
-        selectedFile: null,
-        logContent: '',
-      }
-    },
-  
-    computed: {
-      formattedLog() {
-        return this.logContent.replace(/\[(.*?)\]/g, '<span class="log-tag">$1</span>');
-      },
-    },
-  
-    methods: {
-      async uploadFile() {
-        if (!this.selectedFile) {
-          alert('请先选择日志文件！');
-          return;
-        }
-  
-        const formData = new FormData();
-        formData.append('file', this.selectedFile);
-  
-        try {
-          const response = await fetch('/api/upload', { method: 'POST', body: formData });
-          const data = await response.json();
-  
-          if (data.success) {
-            this.logContent = data.logContent;
-          } else {
-            alert('上传出错！');
-          }
-        } catch (error) {
-          console.error(error);
-          alert('发生错误，请稍后重试！');
-        }
-      },
-    },
-  }
-  </script>
-  
-  <style>
-  .log-tag {
-    color: green;
-  }
-  </style>
-  
\ No newline at end of file
-- 
cgit v1.2.3-70-g09d2

