generated from justboil/admin-one-vue-tailwind
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
1,250 additions
and
100 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
declare const GIT_BRANCH: string; | ||
declare const GIT_COMMITHASH: string; | ||
declare const GIT_VERSION: string; | ||
declare const GIT_LASTCOMMITDATETIME: string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
<script setup lang="ts"> | ||
import { RouterView } from 'vue-router'; | ||
import NotificationContainer from './components/NotificationContainer.vue'; | ||
</script> | ||
|
||
<template> | ||
<RouterView /> | ||
<NotificationContainer /> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
<script setup lang="ts"> | ||
defineProps(['message']); | ||
</script> | ||
|
||
<template> | ||
<div class="text-center py-24 text-gray-500 dark:text-slate-400"> | ||
<p>Nothing's here…</p> | ||
<p v-if="message">{{ message }}</p> | ||
<p v-else>Nothing's here…</p> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<script setup lang="ts"> | ||
import { AnsiUp } from 'ansi_up'; | ||
import { computed, nextTick, onMounted, ref, watch } from 'vue'; | ||
const props = defineProps({ | ||
datas: { | ||
type: Array, | ||
require: true, | ||
default: [], | ||
}, | ||
}); | ||
const scrollToBottom = () => | ||
(consoleRef.value.scrollTop = consoleRef.value.scrollHeight ?? 0); | ||
const consoleRef = ref(); | ||
const length = computed(() => props.datas.length); | ||
const ansiUp = new AnsiUp(); | ||
ansiUp.use_classes = true; | ||
watch(length, () => nextTick(scrollToBottom)); | ||
onMounted(scrollToBottom); | ||
</script> | ||
|
||
<template> | ||
<div id="console" ref="consoleRef" class="py-1 overflow-y-scroll"> | ||
<div | ||
class="whitespace-pre-wrap break-all hover:bg-[#8881] px-3 transition-colors" | ||
v-for="line in datas" | ||
> | ||
<span v-html="ansiUp.ansi_to_html(line as string)"></span> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<style> | ||
div#console { | ||
font-family: Consolas, 'Courier New', Courier, '微软雅黑'; | ||
height: 50vh; | ||
min-height: 500px; | ||
scrollbar-width: thin; | ||
scrollbar-color: rgb(156, 163, 175) rgb(249, 250, 251); | ||
} | ||
div#console::-webkit-scrollbar { | ||
width: 8px; | ||
height: 8px; | ||
} | ||
.dark div#console { | ||
color-scheme: dark; | ||
scrollbar-color: rgb(71, 85, 105) rgb(30, 41, 59); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.