fractal/src/session/view/content/room_history/mod.ui

184 lines
8.3 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<interface>
<menu id="room-menu-model">
<section>
<item>
<attribute name="label" translatable="yes">Room _Details</attribute>
<attribute name="action">room-history.details</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
<item>
<attribute name="label" translatable="yes">_Invite New Members</attribute>
<attribute name="action">room-history.invite-members</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Room _Permalink</attribute>
<attribute name="action">room-history.permalink</attribute>
</item>
</section>
<section>
<item>
<attribute name="label" translatable="yes">_Leave Room</attribute>
<attribute name="action">room-history.leave</attribute>
<attribute name="hidden-when">action-disabled</attribute>
</item>
</section>
</menu>
<template class="ContentRoomHistory" parent="AdwBin">
<property name="vexpand">True</property>
<property name="hexpand">True</property>
<style>
<class name="view"/>
</style>
<child>
<object class="AdwToolbarView">
<child type="top">
<object class="AdwHeaderBar">
<child type="title">
<object class="RoomTitle" id="room_title">
<binding name="title">
<lookup name="display-name">
<lookup name="room">ContentRoomHistory</lookup>
</lookup>
</binding>
<binding name="subtitle">
<lookup name="topic">
<lookup name="room">ContentRoomHistory</lookup>
</lookup>
</binding>
</object>
</child>
<child type="end">
<object class="GtkMenuButton" id="room_menu">
<property name="icon-name">menu-secondary-symbolic</property>
<property name="menu-model">room-menu-model</property>
<property name="primary" bind-source="ContentRoomHistory" bind-property="only-view" bind-flags="sync-create"/>
<property name="tooltip-text" translatable="yes">Room Menu</property>
<accessibility>
<property name="label" translatable="yes">Room Menu</property>
</accessibility>
</object>
</child>
</object>
</child>
<property name="content">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
<object class="AdwBanner" id="tombstoned_banner">
<signal name="button-clicked" handler="join_or_view_successor" swapped="yes"/>
</object>
</child>
<child>
<object class="ContentVerificationInfoBar" id="verification_info_bar">
<binding name="verification">
<lookup name="verification">
<lookup name="room">ContentRoomHistory</lookup>
</lookup>
</binding>
</object>
</child>
<child>
<object class="GtkStack" id="stack">
<property name="transition-type">crossfade</property>
<child>
<object class="Spinner" id="loading">
<property name="valign">center</property>
<property name="halign">center</property>
<property name="vexpand">True</property>
<style>
<class name="session-loading-spinner"/>
</style>
</object>
</child>
<child>
<object class="AdwStatusPage" id="error">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="icon-name">error-symbolic</property>
<property name="title" translatable="yes">Unable to load room</property>
<property name="description" translatable="yes">Check your network connection.</property>
<property name="child">
<object class="GtkButton">
<property name="can-shrink">true</property>
<property name="label" translatable="yes">Try Again</property>
<property name="action-name">room-history.try-again</property>
<property name="halign">center</property>
<style>
<class name="pill"/>
</style>
</object>
</property>
</object>
</child>
<child>
<object class="GtkOverlay" id="content">
<child type="overlay">
<object class="GtkRevealer" id="scroll_btn_revealer">
<property name="visible">False</property>
<property name="transition_type">crossfade</property>
<property name="valign">end</property>
<property name="halign">end</property>
<property name="margin-end">24</property>
<property name="margin-bottom">24</property>
<child>
<object class="GtkButton" id="scroll_btn">
<property name="icon-name">go-bottom-symbolic</property>
<property name="action-name">room-history.scroll-down</property>
<property name="tooltip-text" translatable="yes">Scroll to Bottom</property>
<accessibility>
<property name="label" translatable="yes">Scroll to bottom</property>
</accessibility>
<style>
<class name="osd"/>
<class name="circular"/>
</style>
</object>
</child>
</object>
</child>
<child>
<object class="DragOverlay" id="drag_overlay">
<property name="title" translatable="yes">Drop Here to Send</property>
<property name="child">
<object class="GtkScrolledWindow" id="scrolled_window">
<property name="vexpand">True</property>
<property name="hscrollbar-policy">never</property>
<style>
<class name="room-history"/>
<class name="undershoot-bottom"/>
</style>
<property name="child">
<object class="GtkListView" id="listview">
<style>
<class name="navigation-sidebar"/>
</style>
<property name="tab-behavior">item</property>
<accessibility>
<property name="label" translatable="yes">Room History</property>
</accessibility>
</object>
</property>
</object>
</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="MessageToolbar" id="message_toolbar">
<property name="vexpand">False</property>
<property name="room" bind-source="ContentRoomHistory" bind-property="room" bind-flags="sync-create" />
</object>
</child>
</object>
</property>
</object>
</child>
</template>
</interface>