2025-09-24 01:23:09 +08:00
|
|
|
|
<Window xmlns="https://github.com/avaloniaui"
|
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
2025-09-24 03:14:25 +08:00
|
|
|
|
mc:Ignorable="d" d:DesignWidth="1200" d:DesignHeight="800"
|
2025-09-24 01:23:09 +08:00
|
|
|
|
x:Class="LubanHub.App.MainWindow"
|
2025-09-24 03:14:25 +08:00
|
|
|
|
Title="LubanHub"
|
|
|
|
|
|
MinWidth="1000" MinHeight="600">
|
|
|
|
|
|
|
|
|
|
|
|
<Grid>
|
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
|
<ColumnDefinition Width="200"/>
|
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 左侧导航栏 -->
|
|
|
|
|
|
<Border Grid.Column="0" Background="{DynamicResource SidebarBackgroundBrush}"
|
|
|
|
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,1,0">
|
|
|
|
|
|
<Grid>
|
|
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 应用标题 -->
|
|
|
|
|
|
<TextBlock Grid.Row="0" Text="LubanHub"
|
|
|
|
|
|
Classes="subheader"
|
|
|
|
|
|
Margin="{DynamicResource LargeMargin}"
|
|
|
|
|
|
HorizontalAlignment="Center"/>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 导航按钮区域 -->
|
|
|
|
|
|
<StackPanel Grid.Row="1" Orientation="Vertical">
|
|
|
|
|
|
<Button Name="KnowledgeButton"
|
|
|
|
|
|
Content="📚 知识库"
|
|
|
|
|
|
Classes="navigation-button"
|
|
|
|
|
|
Click="OnKnowledgeButtonClick"/>
|
|
|
|
|
|
<Button Name="ProjectButton"
|
|
|
|
|
|
Content="📁 项目"
|
|
|
|
|
|
Classes="navigation-button"
|
|
|
|
|
|
Click="OnProjectButtonClick"/>
|
|
|
|
|
|
<Button Name="InstallButton"
|
|
|
|
|
|
Content="📦 安装"
|
|
|
|
|
|
Classes="navigation-button"
|
|
|
|
|
|
Click="OnInstallButtonClick"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 底部按钮区域 -->
|
|
|
|
|
|
<StackPanel Grid.Row="2" Orientation="Vertical">
|
|
|
|
|
|
<!-- 设置按钮 -->
|
|
|
|
|
|
<Button Name="SettingsButton"
|
|
|
|
|
|
Content="⚙️ 设置"
|
|
|
|
|
|
Classes="navigation-button"
|
|
|
|
|
|
Margin="{DynamicResource StandardMargin}"
|
|
|
|
|
|
Click="OnSettingsButtonClick"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 右侧内容区域 -->
|
|
|
|
|
|
<Border Grid.Column="1" Background="{DynamicResource AppBackgroundBrush}">
|
|
|
|
|
|
<Grid>
|
|
|
|
|
|
<!-- 内容区域 -->
|
|
|
|
|
|
<Panel Name="ContentPanel">
|
|
|
|
|
|
<!-- 默认欢迎页面 -->
|
|
|
|
|
|
<StackPanel Name="WelcomePanel"
|
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
|
VerticalAlignment="Center">
|
|
|
|
|
|
<TextBlock Text="欢迎使用 LubanHub"
|
|
|
|
|
|
Classes="header"
|
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
|
Margin="{DynamicResource LargeMargin}"/>
|
|
|
|
|
|
<TextBlock Text="请选择左侧菜单开始使用"
|
|
|
|
|
|
Classes="body"
|
|
|
|
|
|
Foreground="{DynamicResource SecondaryTextBrush}"
|
|
|
|
|
|
HorizontalAlignment="Center"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 知识库页面 -->
|
|
|
|
|
|
<Grid Name="KnowledgePanel" IsVisible="False">
|
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
|
<ColumnDefinition Width="300"/>
|
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 左侧会话列表 -->
|
|
|
|
|
|
<Border Grid.Column="0" Background="{DynamicResource PanelBackgroundBrush}"
|
|
|
|
|
|
BorderBrush="{DynamicResource BorderBrush}" BorderThickness="0,0,1,0">
|
|
|
|
|
|
<StackPanel Margin="{DynamicResource StandardMargin}">
|
|
|
|
|
|
<Button Content="+ 新建会话"
|
|
|
|
|
|
Classes="primary"
|
|
|
|
|
|
Margin="{DynamicResource StandardMargin}"/>
|
|
|
|
|
|
<TextBlock Text="历史会话"
|
|
|
|
|
|
Classes="caption"
|
|
|
|
|
|
Margin="{DynamicResource StandardMargin}"/>
|
|
|
|
|
|
<ListBox Background="Transparent"
|
|
|
|
|
|
BorderThickness="0">
|
|
|
|
|
|
<ListBoxItem Content="会话 1"/>
|
|
|
|
|
|
<ListBoxItem Content="会话 2"/>
|
|
|
|
|
|
<ListBoxItem Content="会话 3"/>
|
|
|
|
|
|
</ListBox>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 右侧聊天区域 -->
|
|
|
|
|
|
<Grid Grid.Column="1">
|
|
|
|
|
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
|
|
|
|
<TextBlock Text="🤖 AI助手"
|
|
|
|
|
|
Classes="subheader"
|
|
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
|
|
Margin="{DynamicResource StandardMargin}"/>
|
|
|
|
|
|
<ComboBox SelectedIndex="0" Width="150" Margin="{DynamicResource LargeMargin}">
|
|
|
|
|
|
<ComboBoxItem Content="GPT-4"/>
|
|
|
|
|
|
<ComboBoxItem Content="Claude"/>
|
|
|
|
|
|
<ComboBoxItem Content="文心一言"/>
|
|
|
|
|
|
</ComboBox>
|
|
|
|
|
|
<TextBox Watermark="请输入您的问题..."
|
|
|
|
|
|
Width="400"
|
|
|
|
|
|
Height="100"
|
|
|
|
|
|
TextWrapping="Wrap"
|
|
|
|
|
|
AcceptsReturn="True"/>
|
|
|
|
|
|
<Button Content="发送"
|
|
|
|
|
|
Classes="primary"
|
|
|
|
|
|
Margin="{DynamicResource StandardMargin}"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 项目页面 -->
|
|
|
|
|
|
<Grid Name="ProjectPanel" IsVisible="False">
|
|
|
|
|
|
<StackPanel Margin="20">
|
|
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,20">
|
|
|
|
|
|
<Button Content="📂 导入项目"
|
|
|
|
|
|
Background="#007ACC"
|
|
|
|
|
|
Foreground="White"
|
|
|
|
|
|
Margin="0,0,10,0"
|
|
|
|
|
|
Padding="10,5"/>
|
|
|
|
|
|
<Button Content="➕ 新建项目"
|
|
|
|
|
|
Background="#28A745"
|
|
|
|
|
|
Foreground="White"
|
|
|
|
|
|
Padding="10,5"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
|
|
<TextBlock Text="项目列表"
|
|
|
|
|
|
Foreground="White"
|
|
|
|
|
|
FontSize="16"
|
|
|
|
|
|
Margin="0,0,0,10"/>
|
|
|
|
|
|
|
|
|
|
|
|
<ListBox Background="#252526"
|
|
|
|
|
|
BorderThickness="1"
|
|
|
|
|
|
BorderBrush="#3F3F46">
|
|
|
|
|
|
<ListBoxItem>
|
|
|
|
|
|
<StackPanel>
|
|
|
|
|
|
<TextBlock Text="示例项目 1" Foreground="White" FontWeight="Bold"/>
|
|
|
|
|
|
<TextBlock Text="项目描述..." Foreground="#CCCCCC" FontSize="12"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</ListBoxItem>
|
|
|
|
|
|
<ListBoxItem>
|
|
|
|
|
|
<StackPanel>
|
|
|
|
|
|
<TextBlock Text="示例项目 2" Foreground="White" FontWeight="Bold"/>
|
|
|
|
|
|
<TextBlock Text="项目描述..." Foreground="#CCCCCC" FontSize="12"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</ListBoxItem>
|
|
|
|
|
|
</ListBox>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 安装页面 -->
|
|
|
|
|
|
<Grid Name="InstallPanel" IsVisible="False">
|
|
|
|
|
|
<StackPanel Margin="20">
|
|
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,20">
|
|
|
|
|
|
<Button Content="📁 添加本地版本"
|
|
|
|
|
|
Background="#007ACC"
|
|
|
|
|
|
Foreground="White"
|
|
|
|
|
|
Margin="0,0,10,0"
|
|
|
|
|
|
Padding="10,5"/>
|
|
|
|
|
|
<Button Content="🌐 在线安装"
|
|
|
|
|
|
Background="#28A745"
|
|
|
|
|
|
Foreground="White"
|
|
|
|
|
|
Padding="10,5"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
|
|
<TextBlock Text="鲁班版本列表"
|
|
|
|
|
|
Foreground="White"
|
|
|
|
|
|
FontSize="16"
|
|
|
|
|
|
Margin="0,0,0,10"/>
|
|
|
|
|
|
|
|
|
|
|
|
<ListBox Background="#252526"
|
|
|
|
|
|
BorderThickness="1"
|
|
|
|
|
|
BorderBrush="#3F3F46">
|
|
|
|
|
|
<ListBoxItem>
|
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
|
<TextBlock Text="Luban v2.1.0" Foreground="White" FontWeight="Bold" Width="150"/>
|
|
|
|
|
|
<TextBlock Text="已安装" Foreground="#28A745" Margin="10,0"/>
|
|
|
|
|
|
<Button Content="启动" Background="#007ACC" Foreground="White" Padding="5,2"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</ListBoxItem>
|
|
|
|
|
|
<ListBoxItem>
|
|
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
|
|
<TextBlock Text="Luban v2.0.5" Foreground="White" FontWeight="Bold" Width="150"/>
|
|
|
|
|
|
<TextBlock Text="未安装" Foreground="#DC3545" Margin="10,0"/>
|
|
|
|
|
|
<Button Content="安装" Background="#28A745" Foreground="White" Padding="5,2"/>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</ListBoxItem>
|
|
|
|
|
|
</ListBox>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 设置页面 -->
|
|
|
|
|
|
<Grid Name="SettingsPanel" IsVisible="False">
|
|
|
|
|
|
<StackPanel Margin="{DynamicResource LargeMargin}">
|
|
|
|
|
|
<TextBlock Text="⚙️ 设置"
|
|
|
|
|
|
Classes="subheader"
|
|
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}"
|
|
|
|
|
|
FontSize="20"
|
|
|
|
|
|
Margin="0,0,0,20"/>
|
|
|
|
|
|
|
|
|
|
|
|
<StackPanel Margin="0,0,0,20">
|
|
|
|
|
|
<TextBlock Text="下载目录"
|
|
|
|
|
|
Classes="title"
|
|
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}"
|
|
|
|
|
|
FontSize="14"
|
|
|
|
|
|
Margin="0,0,0,5"/>
|
|
|
|
|
|
<Grid>
|
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
<TextBox Grid.Column="0"
|
|
|
|
|
|
Text="C:\Users\Downloads\LubanHub"
|
|
|
|
|
|
Background="{DynamicResource InputBackgroundBrush}"
|
|
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}"
|
|
|
|
|
|
BorderBrush="{DynamicResource BorderBrush}"
|
|
|
|
|
|
Margin="0,0,10,0"/>
|
|
|
|
|
|
<Button Grid.Column="1"
|
|
|
|
|
|
Content="浏览..."
|
|
|
|
|
|
Classes="primary"
|
|
|
|
|
|
Padding="{DynamicResource ButtonPadding}"/>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
|
|
<StackPanel>
|
|
|
|
|
|
<TextBlock Text="主题设置"
|
|
|
|
|
|
Classes="title"
|
|
|
|
|
|
Foreground="{DynamicResource PrimaryTextBrush}"
|
|
|
|
|
|
FontSize="14"
|
|
|
|
|
|
Margin="0,0,0,5"/>
|
|
|
|
|
|
<ComboBox Name="ThemeComboBox"
|
|
|
|
|
|
SelectedIndex="0"
|
|
|
|
|
|
Width="200"
|
|
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
|
|
SelectionChanged="OnThemeComboBoxSelectionChanged">
|
|
|
|
|
|
<ComboBoxItem Content="深色主题"/>
|
|
|
|
|
|
<ComboBoxItem Content="浅色主题"/>
|
|
|
|
|
|
</ComboBox>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Panel>
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
</Border>
|
|
|
|
|
|
</Grid>
|
2025-09-24 01:23:09 +08:00
|
|
|
|
</Window>
|