497 lines
23 KiB
XML
497 lines
23 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<interface>
|
|
<requires lib="gtk" version="4.0"/>
|
|
<requires lib="Adw" version="1.0"/>
|
|
<template class="AlpacaWindow" parent="AdwApplicationWindow">
|
|
<property name="resizable">True</property>
|
|
<property name="width-request">350</property>
|
|
<property name="height-request">500</property>
|
|
<property name="default-width">1300</property>
|
|
<property name="default-height">800</property>
|
|
<child>
|
|
<object class="AdwBreakpoint">
|
|
<condition>max-width: 800sp</condition>
|
|
<setter object="split_view_overlay" property="collapsed">true</setter>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
</child>
|
|
<child>
|
|
<object class="AdwBreakpoint">
|
|
<condition>max-width: 500sp</condition>
|
|
<setter object="split_view_overlay" property="collapsed">true</setter>
|
|
<setter object="welcome_dialog" property="width-request">400</setter>
|
|
<setter object="welcome_dialog" property="height-request">400</setter>
|
|
<setter object="manage_models_dialog" property="width-request">400</setter>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="AdwBreakpoint">
|
|
<condition>max-width: 400sp</condition>
|
|
<setter object="split_view_overlay" property="collapsed">true</setter>
|
|
<setter object="welcome_dialog" property="width-request">300</setter>
|
|
<setter object="welcome_dialog" property="height-request">300</setter>
|
|
<setter object="manage_models_dialog" property="width-request">300</setter>
|
|
</object>
|
|
</child>
|
|
<property name="content">
|
|
<object class="AdwToastOverlay" id="main_overlay">
|
|
<child>
|
|
<object class="AdwOverlaySplitView" id="split_view_overlay">
|
|
<property name="show-sidebar" bind-source="show_sidebar_button" bind-property="active" bind-flags="sync-create"/>
|
|
<property name="sidebar">
|
|
<object class="GtkBox">
|
|
<property name="spacing">12</property>
|
|
<property name="orientation">1</property>
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="margin-top">12</property>
|
|
<property name="margin-start">12</property>
|
|
<property name="margin-end">12</property>
|
|
<property name="spacing">12</property>
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="label" translatable="yes">Chats</property>
|
|
<property name="hexpand">true</property>
|
|
<property name="halign">1</property>
|
|
<style>
|
|
<class name="title-1"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkButton" id="add_chat_button">
|
|
<property name="tooltip-text" translatable="yes">New chat</property>
|
|
<style>
|
|
<class name="flat"/>
|
|
</style>
|
|
<child>
|
|
<object class="AdwButtonContent">
|
|
<property name="icon-name">tab-new-symbolic</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkScrolledWindow">
|
|
<property name="vexpand">true</property>
|
|
<property name="hexpand">true</property>
|
|
<child>
|
|
<object class="GtkListBox" id="chat_list_box">
|
|
<property name="selection-mode">single</property>
|
|
<style>
|
|
<class name="navigation-sidebar"></class>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</property>
|
|
<child>
|
|
<object class="AdwToolbarView">
|
|
<child type="top">
|
|
<object class="AdwHeaderBar" id="header_bar">
|
|
<child type="start">
|
|
<object class="GtkToggleButton" id="show_sidebar_button">
|
|
<property name="icon-name">sidebar-show-symbolic</property>
|
|
<property name="tooltip-text" translatable="yes">Toggle Sidebar</property>
|
|
<property name="active" bind-source="split_view_overlay" bind-property="show-sidebar" bind-flags="sync-create"/>
|
|
</object>
|
|
</child>
|
|
<property name="title-widget">
|
|
<object class="GtkBox">
|
|
<property name="orientation">0</property>
|
|
<property name="spacing">12</property>
|
|
<child>
|
|
<object class="GtkDropDown" id="model_drop_down">
|
|
<property name="enable-search">true</property>
|
|
<property name="model">
|
|
<object class="GtkStringList" id="model_string_list">
|
|
<items>
|
|
</items>
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkButton" id="manage_models_button">
|
|
<property name="tooltip-text" translatable="yes">Manage models</property>
|
|
<child>
|
|
<object class="AdwButtonContent">
|
|
<property name="icon-name">package-x-generic-symbolic</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</property>
|
|
<child type="end">
|
|
<object class="GtkMenuButton">
|
|
<property name="primary">True</property>
|
|
<property name="icon-name">open-menu-symbolic</property>
|
|
<property name="tooltip-text" translatable="yes">Menu</property>
|
|
<property name="menu-model">primary_menu</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
<property name="content">
|
|
<object class="GtkBox"><!--ACTUAL CONTENT-->
|
|
<property name="orientation">1</property>
|
|
<property name="margin-start">24</property>
|
|
<property name="margin-end">24</property>
|
|
<property name="margin-bottom">24</property>
|
|
<property name="vexpand">true</property>
|
|
<property name="hexpand">true</property>
|
|
|
|
<child>
|
|
<object class="GtkScrolledWindow" id="chat_window">
|
|
<property name="margin-bottom">12</property>
|
|
<property name="propagate-natural-height">true</property>
|
|
<property name="kinetic-scrolling">1</property>
|
|
<property name="vexpand">true</property>
|
|
<style>
|
|
<class name="card"/>
|
|
</style>
|
|
<child>
|
|
<object class="GtkBox" id="chat_container">
|
|
<property name="orientation">1</property>
|
|
<property name="homogeneous">false</property>
|
|
<property name="hexpand">false</property>
|
|
<property name="vexpand">true</property>
|
|
<property name="spacing">12</property>
|
|
<property name="margin-top">12</property>
|
|
<property name="margin-bottom">12</property>
|
|
<property name="margin-start">12</property>
|
|
<property name="margin-end">12</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="orientation">0</property>
|
|
<property name="spacing">12</property>
|
|
<child>
|
|
<object class="GtkScrolledWindow">
|
|
<property name="has-frame">true</property>
|
|
<style>
|
|
<class name="card"/>
|
|
<class name="view"/>
|
|
</style>
|
|
<child>
|
|
<object class="GtkTextView" id="message_text_view">
|
|
<property name="wrap-mode">word</property>
|
|
<property name="margin-top">6</property>
|
|
<property name="margin-bottom">6</property>
|
|
<property name="margin-start">6</property>
|
|
<property name="margin-end">6</property>
|
|
<property name="hexpand">true</property>
|
|
<style>
|
|
<class name="view"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
|
|
</child>
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="orientation">1</property>
|
|
<property name="spacing">12</property>
|
|
<child>
|
|
<object class="GtkButton" id="send_button">
|
|
<style>
|
|
<class name="suggested-action"/>
|
|
</style>
|
|
<child>
|
|
<object class="AdwButtonContent">
|
|
<property name="label" translatable="yes">Send</property>
|
|
<property name="icon-name">send-to-symbolic</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkButton" id="image_button">
|
|
<property name="sensitive">false</property>
|
|
<property name="tooltip-text" translatable="yes">Requires model 'llava' to be selected</property>
|
|
<child>
|
|
<object class="AdwButtonContent">
|
|
<property name="label" translatable="yes">Image</property>
|
|
<property name="icon-name">image-x-generic-symbolic</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
</object><!--END OF CONTENT-->
|
|
</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</property>
|
|
|
|
<object class="AdwDialog" id="manage_models_dialog">
|
|
<property name="can-close">true</property>
|
|
<property name="width-request">400</property>
|
|
<property name="height-request">600</property>
|
|
<child>
|
|
<object class="AdwToastOverlay" id="manage_models_overlay">
|
|
<child>
|
|
<object class="AdwToolbarView">
|
|
<child type="top">
|
|
<object class="AdwHeaderBar">
|
|
<property name="title-widget">
|
|
<object class="AdwWindowTitle">
|
|
<property name="title" translatable="yes">Manage models</property>
|
|
</object>
|
|
</property>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkScrolledWindow">
|
|
<property name="hexpand">true</property>
|
|
<property name="vexpand">true</property>
|
|
<child>
|
|
<object class="GtkBox">
|
|
<property name="margin-start">12</property>
|
|
<property name="margin-end">12</property>
|
|
<property name="margin-top">12</property>
|
|
<property name="margin-bottom">12</property>
|
|
<property name="orientation">1</property>
|
|
<property name="spacing">12</property>
|
|
<child>
|
|
<object class="GtkListBox" id="pulling_model_list_box">
|
|
<property name="visible">false</property>
|
|
<property name="selection-mode">none</property>
|
|
<style>
|
|
<class name="boxed-list"/>
|
|
<class name="card"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkListBox" id="local_model_list_box">
|
|
<property name="selection-mode">none</property>
|
|
<style>
|
|
<class name="boxed-list"/>
|
|
<class name="card"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkListBox" id="available_model_list_box">
|
|
<property name="selection-mode">none</property>
|
|
<style>
|
|
<class name="boxed-list"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
|
|
<object class="AdwDialog" id="welcome_dialog">
|
|
<property name="can-close">false</property>
|
|
<property name="width-request">450</property>
|
|
<property name="height-request">450</property>
|
|
<child>
|
|
<object class="AdwToastOverlay" id="connection_overlay">
|
|
<child>
|
|
<object class="AdwToolbarView">
|
|
<child type="top">
|
|
<object class="AdwHeaderBar">
|
|
</object>
|
|
</child>
|
|
<child type="bottom">
|
|
<object class="GtkActionBar">
|
|
<property name="hexpand">true</property>
|
|
<property name="margin-start">5</property>
|
|
<property name="margin-end">5</property>
|
|
<property name="margin-bottom">5</property>
|
|
<child type="start">
|
|
<object class="GtkButton" id="connection_previous_button">
|
|
<property name="tooltip-text" translatable="yes">Previous</property>
|
|
<property name="label">Previous</property>
|
|
<property name="sensitive">false</property>
|
|
<style>
|
|
<class name="raised"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
<child type="center">
|
|
<object class="AdwCarouselIndicatorDots">
|
|
<property name="carousel">connection_carousel</property>
|
|
</object>
|
|
</child>
|
|
<child type="end">
|
|
<object class="GtkButton" id="connection_next_button">
|
|
<property name="tooltip-text" translatable="yes">Next</property>
|
|
<property name="label">Next</property>
|
|
<style>
|
|
<class name="suggested-action"/>
|
|
</style>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
|
|
<child>
|
|
<object class="AdwCarousel" id="connection_carousel">
|
|
<property name="hexpand">true</property>
|
|
<property name="vexpand">true</property>
|
|
<property name="allow-long-swipes">true</property>
|
|
<property name="allow-scroll-wheel">true</property>
|
|
<property name="spacing">12</property>
|
|
<child>
|
|
<object class="AdwStatusPage">
|
|
<property name="hexpand">true</property>
|
|
<property name="vexpand">true</property>
|
|
<property name="margin-top">12</property>
|
|
<property name="margin-bottom">12</property>
|
|
<property name="margin-start">12</property>
|
|
<property name="margin-end">12</property>
|
|
<property name="icon-name">com.jeffser.Alpaca</property>
|
|
<property name="title" translatable="yes">Welcome to Alpaca</property>
|
|
<property name="description" translatable="yes">Powered by Ollama</property>
|
|
<child>
|
|
<object class="GtkLinkButton">
|
|
<property name="label" translatable="yes">Ollama Website</property>
|
|
<property name="uri">https://ollama.com/</property>
|
|
<property name="margin-top">12</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="AdwStatusPage">
|
|
<property name="hexpand">true</property>
|
|
<property name="vexpand">true</property>
|
|
<property name="margin-top">12</property>
|
|
<property name="margin-bottom">12</property>
|
|
<property name="margin-start">12</property>
|
|
<property name="margin-end">12</property>
|
|
<property name="icon-name">dialog-warning-symbolic</property>
|
|
<property name="title" translatable="yes">Disclaimer</property>
|
|
<property name="description" translatable="yes">Alpaca and its developers are not liable for any damages to devices or software resulting from the execution of code generated by an AI model. Please exercise caution and review the code carefully before running it.</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
|
|
</template>
|
|
<menu id="primary_menu">
|
|
<section>
|
|
<item>
|
|
<attribute name="label" translatable="yes">Clear Chat</attribute>
|
|
<attribute name="action">app.clear</attribute>
|
|
</item>
|
|
<item>
|
|
<attribute name="label" translatable="yes">Change Server</attribute>
|
|
<attribute name="action">app.reconnect</attribute>
|
|
</item>
|
|
<item>
|
|
<attribute name="label" translatable="yes">Keyboard Shortcuts</attribute>
|
|
<attribute name="action">win.show-help-overlay</attribute>
|
|
</item>
|
|
<item>
|
|
<attribute name="label" translatable="yes">About Alpaca</attribute>
|
|
<attribute name="action">app.about</attribute>
|
|
</item>
|
|
</section>
|
|
</menu>
|
|
<object class="GtkFileFilter" id="file_filter_image">
|
|
<mime-types>
|
|
<mime-type>image/svg+xml</mime-type>
|
|
<mime-type>image/png</mime-type>
|
|
<mime-type>image/jpeg</mime-type>
|
|
<mime-type>image/webp</mime-type>
|
|
<mime-type>image/gif</mime-type>
|
|
</mime-types>
|
|
</object>
|
|
<object class="GtkShortcutsWindow" id="shortcut_window">
|
|
<property name="modal">1</property>
|
|
<child>
|
|
<object class="GtkShortcutsSection">
|
|
<property name="section-name">shortcuts</property>
|
|
<property name="max-height">10</property>
|
|
<child>
|
|
<object class="GtkShortcutsGroup">
|
|
<property name="title" translatable="yes">General</property>
|
|
<child>
|
|
<object class="GtkShortcutsShortcut">
|
|
<property name="accelerator"><ctrl>Q</property>
|
|
<property name="title" translatable="yes">Close application</property>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkShortcutsShortcut">
|
|
<property name="accelerator"><ctrl>E</property>
|
|
<property name="title" translatable="yes">Clear chat</property>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkShortcutsShortcut">
|
|
<property name="accelerator"><ctrl>R</property>
|
|
<property name="title" translatable="yes">Change server</property>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkShortcutsShortcut">
|
|
<property name="accelerator"><ctrl>slash</property>
|
|
<property name="title" translatable="yes">Show shortcuts window</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkShortcutsGroup">
|
|
<property name="title" translatable="yes">Editor</property>
|
|
<child>
|
|
<object class="GtkShortcutsShortcut">
|
|
<property name="accelerator"><ctrl>C</property>
|
|
<property name="title" translatable="yes">Copy</property>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkShortcutsShortcut">
|
|
<property name="accelerator"><ctrl>V</property>
|
|
<property name="title" translatable="yes">Paste</property>
|
|
</object>
|
|
</child>
|
|
<child>
|
|
<object class="GtkShortcutsShortcut">
|
|
<property name="accelerator"><ctrl>Return</property>
|
|
<property name="title" translatable="yes">Send Message</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
</interface>
|
|
|