Skip to content

Commit

Permalink
feat: add admin portal
Browse files Browse the repository at this point in the history
Signed-off-by: ZTL-UwU <zhangtianli2006@163.com>
  • Loading branch information
ZTL-UwU committed Jun 11, 2024
1 parent 1e04c1f commit 9c9147f
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 8 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ jobs:
working-directory: .
run: pnpm i

- name: Install docs deps
working-directory: ./docs
run: pnpm i

- name: Run typecheck
working-directory: .
run: pnpm nuxt typecheck
17 changes: 17 additions & 0 deletions layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
</NuxtLink>
<div class="flex justify-end gap-2">
<DarkModeToggle />
<NuxtLink to="https://github.com/SMS-COSMO/the1068guide" target="_blank">
<Button variant="ghost" size="icon">
<Icon name="lucide:github" size="18" />
</Button>
</NuxtLink>
</div>
</div>
</header>
Expand All @@ -24,6 +29,18 @@
<span class="text-sm">
Designed by COSMO in 2024.
</span>
<div class="flex gap-2">
<NuxtLink to="/admin">
<Button variant="ghost" size="icon">
<Icon name="lucide:circle-user" size="18" />
</Button>
</NuxtLink>
<NuxtLink to="https://github.com/SMS-COSMO/the1068guide" target="_blank">
<Button variant="ghost" size="icon">
<Icon name="lucide:github" size="18" />
</Button>
</NuxtLink>
</div>
</div>
</footer>
</template>
2 changes: 1 addition & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
devtools: { enabled: false },
modules: [
'@nuxtjs/tailwindcss',
'shadcn-nuxt',
Expand Down
2 changes: 1 addition & 1 deletion pages/admin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</CardDescription>
</CardHeader>
<CardContent>
<Input v-model="inputPassword" />
<Input v-model="inputPassword" type="password" />
<Button class="w-full mt-4" @click="checkPassword">
登陆
</Button>
Expand Down
2 changes: 1 addition & 1 deletion pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<section class="flex w-full items-center justify-center space-x-4 py-4 md:pb-10">
<NuxtLink to="/new">
<Button size="lg">
<Button size="lg" class="text-md">
<Icon name="lucide:plus" class="mr-1" />
我要添加内容
</Button>
Expand Down
2 changes: 1 addition & 1 deletion store/admin.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineStore } from 'pinia';

export const useAdminStore = defineStore('user', () => {
export const useAdminStore = defineStore('admin', () => {
const password = ref('');
return {
password,
Expand Down

0 comments on commit 9c9147f

Please sign in to comment.