refactor(frontend): 删除无用的文件
This commit is contained in:
1 parent
dc141d19a2
commit
ced7fbe085
11 files changed
-162
No files matched your search
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* @deprecated 请使用 `@/features/kb/api/kb.api`。本文件仅为兼容旧 import 保留转发。
|
||||
*/
|
||||
export * from '@/features/kb/api/kb.api';
|
||||
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
|
||||
|
Before Width: | Height: | Size: 496 B |
@@ -1,23 +0,0 @@
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useAuthStore } from '../stores/auth.store';
|
||||
|
||||
/**
|
||||
* 认证 composable:新代码的统一入口。
|
||||
*/
|
||||
export function useAuth() {
|
||||
const store = useAuthStore();
|
||||
const { user, isLoggedIn, isAdmin, isGuest, token } = storeToRefs(store);
|
||||
|
||||
return {
|
||||
user,
|
||||
isLoggedIn,
|
||||
isAdmin,
|
||||
isGuest,
|
||||
token,
|
||||
login: store.login,
|
||||
logout: store.logout,
|
||||
refreshAccessToken: store.refreshAccessToken,
|
||||
getHeaders: store.getHeaders,
|
||||
syncFromStorage: store.syncFromStorage,
|
||||
};
|
||||
}
|
||||
@@ -3,7 +3,6 @@
|
||||
* 认证 feature 对外导出:store、登录 composable、用户 API。
|
||||
*/
|
||||
export { useAuthStore, bindAuthStoreSync } from './stores/auth.store';
|
||||
export { useAuth } from './composables/useAuth';
|
||||
export { useLogin } from './composables/useLogin';
|
||||
export {
|
||||
getUserProfile,
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* @deprecated 请使用 @/features/chat/composables/useChatHistory
|
||||
*/
|
||||
export { useChatHistory as useWorkspaceHistory } from '@/features/chat/composables/useChatHistory';
|
||||
@@ -1,10 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
/**
|
||||
* @deprecated 请使用 @/features/chat/history/HistoryPage.vue
|
||||
*/
|
||||
import HistoryPage from '@/features/chat/history/HistoryPage.vue';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<HistoryPage />
|
||||
</template>
|
||||
@@ -1,41 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
|
||||
defineProps<{ msg: string }>()
|
||||
|
||||
const count = ref(0)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h1>{{ msg }}</h1>
|
||||
|
||||
<div class="card">
|
||||
<button type="button" @click="count++">count is {{ count }}</button>
|
||||
<p>
|
||||
Edit
|
||||
<code>components/HelloWorld.vue</code> to test HMR
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Check out
|
||||
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
|
||||
>create-vue</a
|
||||
>, the official Vue + Vite starter
|
||||
</p>
|
||||
<p>
|
||||
Learn more about IDE Support for Vue in the
|
||||
<a
|
||||
href="https://vuejs.org/guide/scaling-up/tooling.html#ide-support"
|
||||
target="_blank"
|
||||
>Vue Docs Scaling up Guide</a
|
||||
>.
|
||||
</p>
|
||||
<p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.read-the-docs {
|
||||
color: #888;
|
||||
}
|
||||
</style>
|
||||
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* shared/composables/useChat.ts
|
||||
* 兼容转发至 chat feature 的 useChat。
|
||||
*/
|
||||
/**
|
||||
* @deprecated 请使用 @/features/chat/composables/useChat
|
||||
*/
|
||||
export { useChat } from '@/features/chat/composables/useChat';
|
||||
@@ -10,5 +10,4 @@ export * from './composables/useReportLayoutStorage';
|
||||
export * from './composables/useAudioTranscription';
|
||||
export * from './api/client';
|
||||
export * from './constants/routes';
|
||||
export type * from './types/auth.types';
|
||||
export type * from './types/schedule.types';
|
||||
@@ -1,68 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
/**
|
||||
* shared/layouts/AppShell.vue
|
||||
* 通用应用壳层布局。
|
||||
*/
|
||||
|
||||
import { ref } from 'vue';
|
||||
import { PanelLeftClose, PanelLeftOpen } from 'lucide-vue-next';
|
||||
import AppHeaderTools from './AppHeaderTools.vue';
|
||||
|
||||
withDefaults(
|
||||
defineProps<{
|
||||
title?: string;
|
||||
subtitle?: string;
|
||||
collapsibleSidebar?: boolean;
|
||||
}>(),
|
||||
{
|
||||
title: '',
|
||||
subtitle: '',
|
||||
collapsibleSidebar: true,
|
||||
}
|
||||
);
|
||||
|
||||
const sidebarCollapsed = ref(false);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="page-shell flex min-h-screen flex-col">
|
||||
<header class="app-header">
|
||||
<div class="flex min-w-0 items-center gap-3">
|
||||
<button
|
||||
v-if="collapsibleSidebar"
|
||||
type="button"
|
||||
class="btn-icon-ds hidden md:inline-flex"
|
||||
:aria-label="sidebarCollapsed ? 'Expand sidebar' : 'Collapse sidebar'"
|
||||
@click="sidebarCollapsed = !sidebarCollapsed"
|
||||
>
|
||||
<PanelLeftOpen v-if="sidebarCollapsed" class="h-5 w-5" />
|
||||
<PanelLeftClose v-else class="h-5 w-5" />
|
||||
</button>
|
||||
<div class="min-w-0">
|
||||
<slot name="header-brand">
|
||||
<div v-if="title" class="truncate text-sm font-bold text-primary">{{ title }}</div>
|
||||
<div v-if="subtitle" class="truncate text-xs text-muted">{{ subtitle }}</div>
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center gap-3">
|
||||
<slot name="header-actions" />
|
||||
<AppHeaderTools />
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="flex min-h-0 flex-1">
|
||||
<aside
|
||||
v-if="$slots.sidebar"
|
||||
class="app-sidebar hidden md:block transition-[width] duration-200"
|
||||
:class="sidebarCollapsed ? 'app-sidebar--collapsed' : ''"
|
||||
>
|
||||
<slot name="sidebar" :collapsed="sidebarCollapsed" />
|
||||
</aside>
|
||||
|
||||
<main class="min-w-0 flex-1 overflow-y-auto page-shell-mobile py-6">
|
||||
<slot />
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1 +0,0 @@
|
||||
export type { AuthUser } from '@/shared/utils/auth';
|
||||
Reference in new issue
Block a user