Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,5 +151,6 @@
"type": "git",
"url": "https://github.com/Haleclipse/Claudix"
},
"license": "AGPL-3.0"
"license": "AGPL-3.0",
"packageManager": "pnpm@9.12.1+sha1.7084e7df42ee1d221994c2c2599277a2a937f050"
}
25 changes: 5 additions & 20 deletions src/webview/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,10 @@
<div class="app-wrapper">
<main class="app-main">
<div class="page-container">
<Motion
:animate="pageAnimation"
:transition="{ duration: 0.3, ease: 'easeOut' }"
class="motion-wrapper"
>
<SessionsPage
v-if="currentPage === 'sessions'"
key="sessions"
@switch-to-chat="handleSwitchToChat"
/>
<ChatPage
v-else-if="currentPage === 'chat'"
key="chat"
@switch-to-sessions="switchToPage('sessions')"
/>
<SettingsPage
v-else-if="currentPage === 'settings'"
key="settings"
/>
<Motion :animate="pageAnimation" :transition="{ duration: 0.3, ease: 'easeOut' }" class="motion-wrapper">
<SessionsPage v-if="currentPage === 'sessions'" key="sessions" @switch-to-chat="handleSwitchToChat" />
<ChatPage v-else-if="currentPage === 'chat'" key="chat" @switch-to-sessions="switchToPage('sessions')" />
<SettingsPage v-else-if="currentPage === 'settings'" key="settings" />
<!-- IconTestPage -->
<!-- <IconTestPage
v-else-if="currentPage === 'icontest'"
Expand All @@ -36,7 +21,7 @@
import { ref, onMounted, provide } from 'vue';
import { Motion } from 'motion-v';
import SessionsPage from './pages/SessionsPage.vue';
import ChatPage from './pages/ChatPage.vue';
import ChatPage from './pages/ChatPage/index.vue';
import SettingsPage from './pages/SettingsPage.vue';
import './styles/claude-theme.css';
import { useRuntime } from './composables/useRuntime';
Expand Down
41 changes: 41 additions & 0 deletions src/webview/src/components/IconButton.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<script setup lang="ts">
const props = defineProps<{
icon: string;
title?: string;
size?: number;
}>();

defineEmits<{
(e: 'click'): void;
}>();

const buttonSize = props.size || 24;
const iconSize = Math.floor(buttonSize * 0.5);
</script>

<template>
<button class="icon-btn" :title="title" :style="{ width: `${buttonSize}px`, height: `${buttonSize}px` }"
@click="$emit('click')">
<span :class="['codicon', `codicon-${icon}`]" :style="{ fontSize: `${iconSize}px` }"></span>
</button>
</template>

<style scoped>
.icon-btn {
display: flex;
align-items: center;
justify-content: center;
border: none;
background: transparent;
color: var(--vscode-titleBar-activeForeground);
border-radius: 3px;
cursor: pointer;
transition: background-color 0.2s;
opacity: 0.7;
}

.icon-btn:hover {
background: var(--vscode-toolbar-hoverBackground);
opacity: 1;
}
</style>
Loading