commit 3e651b08512df5ce778a61aabde78188218488d7
parent 07c3cbdfe5cb46a7eead04e5630818267951681c
Author: Vetle Haflan <vetle@haflan.dev>
Date: Mon, 25 Jan 2021 16:25:26 +0100
Small stuff
Diffstat:
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/ui/index.html b/ui/index.html
@@ -4,9 +4,11 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LiPre</title>
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/default.min.css">
</head>
<body>
<div id="app"></div>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
<script src="lipre.js"></script>
</body>
-</html>-
\ No newline at end of file
+</html>
diff --git a/ui/src/App.vue b/ui/src/App.vue
@@ -8,16 +8,15 @@
{{filename}}
</v-tab>
</v-tabs>
- <v-space/>
<v-badge v-show="status"/>
</v-app-bar>
- <v-content>
+ <v-main>
<v-tabs-items v-model="tab">
<v-tab-item v-for="filename in filenames"
style="font-family: monospace; white-space: pre; font-size:12px; margin: 1em"
- :key="filename">{{files[filename]}}</v-tab-item>
+ :key="filename"><pre><code>{{files[filename]}}</code></pre></v-tab-item>
</v-tabs-items>
- </v-content>
+ </v-main>
</v-app>
</template>
@@ -57,6 +56,7 @@ export default {
this.$set(this.files, fileReceived.name, fileReceived.contents)
if (!this.filenames.includes(fileReceived.name)) {
this.filenames.push(fileReceived.name)
+ hljs.initHighlightingOnLoad()
}
if (this.tab === null || this.follow) {
this.tab = fileReceived.name