Compare commits

..
3 Commits
Author SHA1 Message Date
C da300da460 fix changes 2026-01-03 14:29:05 -08:00
C 227952a7a3 allow domain lole 2026-01-03 14:28:53 -08:00
C b34d3a5854 add cool git commit thing 2025-10-26 14:59:40 -07:00
3 changed files with 37 additions and 7 deletions

No files matched your search

+3 -1
View File
@@ -4,7 +4,7 @@
height="40" height="40"
> >
<div class="text-caption"> <div class="text-caption">
StudSpider 0.2 (<small>5288d</small>) StudSpider 0.2 <small>(<a href="http://git.traps.moe/ph0sgene/studspider-status/commits/branch/master">{{ gitHash }}</a>)</small>
</div> </div>
<a <a
v-for="item in items" v-for="item in items"
@@ -43,6 +43,8 @@
<script setup> <script setup>
import { computed } from 'vue' import { computed } from 'vue'
const gitHash = __GIT_COMMIT_HASH__
const copyrightYear = computed(() => { const copyrightYear = computed(() => {
const currentYear = new Date().getFullYear() const currentYear = new Date().getFullYear()
const startYear = 2025 const startYear = 2025
+15 -5
View File
@@ -65,10 +65,12 @@
</v-card> </v-card>
</v-col> </v-col>
<v-col cols="12" md="4"> <v-col cols="12" md="4">
<v-card variant="outlined"> <v-card variant="outlined" @click="toggleChangesView" style="cursor: pointer;">
<v-card-text class="text-center"> <v-card-text class="text-center">
<div class="text-h3">{{ changesThisWeek }}</div> <div class="text-h3">{{ changesCount }}</div>
<div class="text-subtitle-1">Changes This Week</div> <div class="text-subtitle-1">
{{ changesLabel }}
</div>
</v-card-text> </v-card-text>
</v-card> </v-card>
</v-col> </v-col>
@@ -113,8 +115,14 @@
// Statistics // Statistics
const totalSets = computed(() => items.reduce((acc, item) => acc + item.value, 0)) const totalSets = computed(() => items.reduce((acc, item) => acc + item.value, 0))
const totalThemes = computed(() => items.length) const totalThemes = computed(() => items.length)
const changesThisWeek = ref(12) // This could be computed from recentChanges if needed
const itemsWaitingForReview = ref(7) // Number of items waiting for review // Dynamic changes metric
const changesThisWeek = ref(0) // Set to 0 to test auto-switching, or get from your API
const changesThisMonth = ref(45)
// Automatically show monthly if no weekly activity
const changesLabel = computed(() => changesThisWeek.value > 0 ? 'Changes This Week' : 'Changes This Month')
const changesCount = computed(() => changesThisWeek.value > 0 ? changesThisWeek.value : changesThisMonth.value)
// Sample recent changes data // Sample recent changes data
const recentChanges = [ const recentChanges = [
@@ -177,4 +185,6 @@
{ key: 29, title: "Art", value: 1 }, { key: 29, title: "Art", value: 1 },
{ key: 30, title: "Botanicals", value: 1 } { key: 30, title: "Botanicals", value: 1 }
] ]
const itemsWaitingForReview = ref(7)
</script> </script>
+19 -1
View File
@@ -11,9 +11,23 @@ import Vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
// Utilities // Utilities
import { defineConfig } from 'vite' import { defineConfig } from 'vite'
import { fileURLToPath, URL } from 'node:url' import { fileURLToPath, URL } from 'node:url'
import { execSync } from 'child_process'
// Get git commit hash
const getGitHash = () => {
try {
return execSync('git rev-parse --short HEAD').toString().trim()
} catch (e) {
return 'unknown'
}
}
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
define: {
'__GIT_COMMIT_HASH__': JSON.stringify(getGitHash()),
'process.env': {}
},
plugins: [ plugins: [
VueRouter(), VueRouter(),
Layouts(), Layouts(),
@@ -59,7 +73,6 @@ export default defineConfig({
'unplugin-vue-router/data-loaders/basic', 'unplugin-vue-router/data-loaders/basic',
], ],
}, },
define: { 'process.env': {} },
resolve: { resolve: {
alias: { alias: {
'@': fileURLToPath(new URL('src', import.meta.url)), '@': fileURLToPath(new URL('src', import.meta.url)),
@@ -76,5 +89,10 @@ export default defineConfig({
}, },
server: { server: {
port: 3000, port: 3000,
host: true,
allowedHosts: [
'studspider.sh',
'.studspider.sh',
],
}, },
}) })