52 changed files with 2283 additions and 2680 deletions
@ -0,0 +1,28 @@
|
||||
using Gtk 4.0; |
||||
|
||||
template $RoomDetailsAddressesSubpageCompletionPopover: Gtk.Popover { |
||||
autohide: false; |
||||
has-arrow: false; |
||||
position: bottom; |
||||
halign: start; |
||||
valign: center; |
||||
width-request: 260; |
||||
|
||||
styles [ |
||||
"string-row-list", |
||||
] |
||||
|
||||
accessibility { |
||||
label: _("Address auto-completion"); |
||||
} |
||||
|
||||
child: Gtk.ScrolledWindow scrolled_window { |
||||
propagate-natural-height: true; |
||||
hscrollbar-policy: never; |
||||
max-content-height: 280; |
||||
|
||||
child: Gtk.ListBox list { |
||||
row-activated => $row_activated() swapped; |
||||
}; |
||||
}; |
||||
} |
||||
@ -1,29 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="RoomDetailsAddressesSubpageCompletionPopover" parent="GtkPopover"> |
||||
<accessibility> |
||||
<property name="label" translatable="yes">Address auto-completion</property> |
||||
</accessibility> |
||||
<style> |
||||
<class name="string-row-list"/> |
||||
</style> |
||||
<property name="autohide">false</property> |
||||
<property name="has-arrow">false</property> |
||||
<property name="position">bottom</property> |
||||
<property name="halign">start</property> |
||||
<property name="valign">center</property> |
||||
<property name="width-request">260</property> |
||||
<property name="child"> |
||||
<object class="GtkScrolledWindow" id="scrolled_window"> |
||||
<property name="propagate-natural-height">true</property> |
||||
<property name="hscrollbar-policy">never</property> |
||||
<property name="max-content-height">280</property> |
||||
<property name="child"> |
||||
<object class="GtkListBox" id="list"> |
||||
<signal name="row-activated" handler="row_activated" swapped="yes"/> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,88 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $RoomDetailsAddressesSubpage: Adw.NavigationPage { |
||||
title: _("Edit Room Addresses"); |
||||
|
||||
child: Adw.ToolbarView { |
||||
[top] |
||||
Adw.HeaderBar {} |
||||
|
||||
content: Adw.PreferencesPage { |
||||
Adw.PreferencesGroup public_addresses_group { |
||||
title: _("Public Addresses"); |
||||
description: _("Public addresses are advertised for all users in the room and the main address is used to identify a room publicly. Before adding an address to this list, it must be registered as a local address."); |
||||
|
||||
Gtk.ListBox public_addresses_list { |
||||
styles [ |
||||
"boxed-list", |
||||
] |
||||
} |
||||
|
||||
Gtk.Revealer public_addresses_error_revealer { |
||||
styles [ |
||||
"entry-row-error-revealer", |
||||
] |
||||
|
||||
child: Gtk.Label public_addresses_error { |
||||
accessible-role: status; |
||||
wrap: true; |
||||
wrap-mode: word_char; |
||||
xalign: 0.0; |
||||
|
||||
styles [ |
||||
"caption", |
||||
"error", |
||||
] |
||||
}; |
||||
} |
||||
} |
||||
|
||||
Adw.PreferencesGroup local_addresses_group { |
||||
description: _("Local addresses can only be registered with your own homeserver. If they are not made public, only people on your homeserver can discover them."); |
||||
|
||||
Gtk.ListBox local_addresses_list { |
||||
styles [ |
||||
"boxed-list", |
||||
] |
||||
} |
||||
|
||||
Gtk.Revealer local_addresses_error_revealer { |
||||
styles [ |
||||
"entry-row-error-revealer", |
||||
] |
||||
|
||||
child: Gtk.Label local_addresses_error { |
||||
accessible-role: status; |
||||
wrap: true; |
||||
wrap-mode: word_char; |
||||
xalign: 0.0; |
||||
|
||||
styles [ |
||||
"caption", |
||||
"error", |
||||
] |
||||
}; |
||||
} |
||||
} |
||||
}; |
||||
}; |
||||
} |
||||
|
||||
$EntryAddRow public_addresses_add_row { |
||||
title: _("Add Public Address"); |
||||
add-button-tooltip-text: _("Add Public Address"); |
||||
add => $add_public_address() swapped; |
||||
entry-activated => $handle_public_addresses_add_row_activated() swapped; |
||||
} |
||||
|
||||
$SubstringEntryRow local_addresses_add_row { |
||||
title: _("Register Local Address"); |
||||
// Translators: This is the placeholder for the first part of a room address, |
||||
// as in '@my-room:example.org'. |
||||
placeholder-text: _("my-room"); |
||||
accessible-description: _("First part of the address, for example “my-room”"); |
||||
prefix-text: "#"; |
||||
add-button-tooltip-text: _("Register Local Address"); |
||||
add => $register_local_address() swapped; |
||||
} |
||||
@ -1,95 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="RoomDetailsAddressesSubpage" parent="AdwNavigationPage"> |
||||
<property name="title" translatable="yes">Edit Room Addresses</property> |
||||
<property name="child"> |
||||
<object class="AdwToolbarView"> |
||||
<child type="top"> |
||||
<object class="AdwHeaderBar"/> |
||||
</child> |
||||
<property name="content"> |
||||
<object class="AdwPreferencesPage"> |
||||
<child> |
||||
<object class="AdwPreferencesGroup" id="public_addresses_group"> |
||||
<property name="title" translatable="yes">Public Addresses</property> |
||||
<property name="description" translatable="yes">Public addresses are advertised for all users in the room and the main address is used to identify a room publicly. Before adding an address to this list, it must be registered as a local address.</property> |
||||
<child> |
||||
<object class="GtkListBox" id="public_addresses_list"> |
||||
<style> |
||||
<class name="boxed-list"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkRevealer" id="public_addresses_error_revealer"> |
||||
<style> |
||||
<class name="entry-row-error-revealer"/> |
||||
</style> |
||||
<property name="child"> |
||||
<object class="GtkLabel" id="public_addresses_error"> |
||||
<property name="accessible-role">status</property> |
||||
<style> |
||||
<class name="caption"/> |
||||
<class name="error"/> |
||||
</style> |
||||
<property name="wrap">True</property> |
||||
<property name="wrap-mode">word-char</property> |
||||
<property name="xalign">0.0</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="AdwPreferencesGroup" id="local_addresses_group"> |
||||
<property name="description" translatable="yes">Local addresses can only be registered with your own homeserver. If they are not made public, only people on your homeserver can discover them.</property> |
||||
<child> |
||||
<object class="GtkListBox" id="local_addresses_list"> |
||||
<style> |
||||
<class name="boxed-list"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkRevealer" id="local_addresses_error_revealer"> |
||||
<style> |
||||
<class name="entry-row-error-revealer"/> |
||||
</style> |
||||
<property name="child"> |
||||
<object class="GtkLabel" id="local_addresses_error"> |
||||
<property name="accessible-role">status</property> |
||||
<style> |
||||
<class name="caption"/> |
||||
<class name="error"/> |
||||
</style> |
||||
<property name="wrap">True</property> |
||||
<property name="wrap-mode">word-char</property> |
||||
<property name="xalign">0.0</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</template> |
||||
<object class="EntryAddRow" id="public_addresses_add_row"> |
||||
<property name="title" translatable="yes">Add Public Address</property> |
||||
<property name="add-button-tooltip-text" translatable="yes">Add Public Address</property> |
||||
<signal name="add" handler="add_public_address" swapped="yes"/> |
||||
<signal name="entry-activated" handler="handle_public_addresses_add_row_activated" swapped="yes"/> |
||||
</object> |
||||
<object class="SubstringEntryRow" id="local_addresses_add_row"> |
||||
<property name="title" translatable="yes">Register Local Address</property> |
||||
<!-- Translators: This is the placeholder for the first part of a room address, as in '@my-room:example.org'. --> |
||||
<property name="placeholder-text" translatable="yes">my-room</property> |
||||
<property name="accessible-description" translatable="yes">First part of the address, for example “my-room”</property> |
||||
<property name="prefix-text">#</property> |
||||
<property name="add-button-tooltip-text" translatable="yes">Register Local Address</property> |
||||
<signal name="add" handler="register_local_address" swapped="yes"/> |
||||
</object> |
||||
</interface> |
||||
@ -0,0 +1,114 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $RoomDetailsEditDetailsSubpage: Adw.NavigationPage { |
||||
title: _("Edit Room Details"); |
||||
|
||||
child: Adw.ToolbarView { |
||||
[top] |
||||
Adw.HeaderBar { |
||||
show-back-button: false; |
||||
|
||||
[start] |
||||
Gtk.Button back_button { |
||||
icon-name: "go-previous-symbolic"; |
||||
tooltip-text: _("Back"); |
||||
clicked => $go_back() swapped; |
||||
|
||||
styles [ |
||||
"back", |
||||
] |
||||
} |
||||
} |
||||
|
||||
content: Adw.PreferencesPage { |
||||
Adw.PreferencesGroup { |
||||
$EditableAvatar avatar { |
||||
editable: bind template.room as <$Room>.permissions as <$RoomPermissions>.can-change-avatar; |
||||
data: bind template.room as <$Room>.avatar-data; |
||||
inhibit-remove: bind $invert_boolean(template.room as <$Room>.has-avatar) as <bool>; |
||||
edit-avatar => $change_avatar() swapped; |
||||
remove-avatar => $remove_avatar() swapped; |
||||
|
||||
accessibility { |
||||
label: _("Room Avatar"); |
||||
} |
||||
} |
||||
} |
||||
|
||||
Adw.PreferencesGroup { |
||||
title: _("Name"); |
||||
|
||||
Adw.EntryRow name_entry_row { |
||||
sensitive: bind template.room as <$Room>.permissions as <$RoomPermissions>.can-change-name; |
||||
title: _("Name"); |
||||
selectable: false; |
||||
text: bind $unwrap_string_or_empty(template.room as <$Room>.name) as <string>; |
||||
changed => $name_edited() swapped; |
||||
entry-activated => $change_name() swapped; |
||||
|
||||
[suffix] |
||||
$ActionButton name_button { |
||||
visible: false; |
||||
state: confirm; |
||||
clicked => $change_name() swapped; |
||||
} |
||||
} |
||||
} |
||||
|
||||
Adw.PreferencesGroup topic_group { |
||||
title: _("Description"); |
||||
|
||||
Gtk.Box { |
||||
orientation: vertical; |
||||
spacing: 6; |
||||
|
||||
Gtk.ScrolledWindow { |
||||
height-request: 180; |
||||
|
||||
styles [ |
||||
"card", |
||||
] |
||||
|
||||
Gtk.TextView topic_text_view { |
||||
sensitive: bind template.room as <$Room>.permissions as <$RoomPermissions>.can-change-topic; |
||||
hexpand: true; |
||||
wrap-mode: word_char; |
||||
|
||||
styles [ |
||||
"inline", |
||||
] |
||||
|
||||
accessibility { |
||||
labelled-by: [ |
||||
topic_group, |
||||
]; |
||||
} |
||||
|
||||
buffer: Gtk.TextBuffer topic_buffer { |
||||
text: bind $unwrap_string_or_empty(template.room as <$Room>.topic) as <string>; |
||||
changed => $topic_edited() swapped; |
||||
}; |
||||
} |
||||
} |
||||
|
||||
$LoadingButton save_topic_button { |
||||
sensitive: false; |
||||
halign: end; |
||||
content-label: _("Save"); |
||||
clicked => $change_topic() swapped; |
||||
|
||||
styles [ |
||||
"pill", |
||||
"suggested-action", |
||||
] |
||||
|
||||
accessibility { |
||||
label: _("Save Description"); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
}; |
||||
}; |
||||
} |
||||
@ -1,160 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="RoomDetailsEditDetailsSubpage" parent="AdwNavigationPage"> |
||||
<property name="title" translatable="yes">Edit Room Details</property> |
||||
<property name="child"> |
||||
<object class="AdwToolbarView"> |
||||
<child type="top"> |
||||
<object class="AdwHeaderBar"> |
||||
<property name="show-back-button">False</property> |
||||
<child type="start"> |
||||
<object class="GtkButton" id="back_button"> |
||||
<property name="icon-name">go-previous-symbolic</property> |
||||
<property name="tooltip-text" translatable="yes">Back</property> |
||||
<signal name="clicked" handler="go_back" swapped="yes"/> |
||||
<style> |
||||
<class name="back"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<property name="content"> |
||||
<object class="AdwPreferencesPage"> |
||||
<child> |
||||
<object class="AdwPreferencesGroup"> |
||||
<child> |
||||
<object class="EditableAvatar" id="avatar"> |
||||
<accessibility> |
||||
<property name="label" translatable="yes">Room Avatar</property> |
||||
</accessibility> |
||||
<binding name="editable"> |
||||
<lookup name="can-change-avatar"> |
||||
<lookup name="permissions"> |
||||
<lookup name="room">RoomDetailsEditDetailsSubpage</lookup> |
||||
</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<binding name="data"> |
||||
<lookup name="avatar-data"> |
||||
<lookup name="room">RoomDetailsEditDetailsSubpage</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<binding name="inhibit-remove"> |
||||
<closure type="gboolean" function="invert_boolean"> |
||||
<lookup name="has-avatar"> |
||||
<lookup name="room">RoomDetailsEditDetailsSubpage</lookup> |
||||
</lookup> |
||||
</closure> |
||||
</binding> |
||||
<signal name="edit-avatar" handler="change_avatar" swapped="yes" /> |
||||
<signal name="remove-avatar" handler="remove_avatar" swapped="yes" /> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="AdwPreferencesGroup"> |
||||
<property name="title" translatable="yes">Name</property> |
||||
<child> |
||||
<object class="AdwEntryRow" id="name_entry_row"> |
||||
<binding name="sensitive"> |
||||
<lookup name="can-change-name"> |
||||
<lookup name="permissions"> |
||||
<lookup name="room">RoomDetailsEditDetailsSubpage</lookup> |
||||
</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<property name="title" translatable="yes">Name</property> |
||||
<property name="selectable">False</property> |
||||
<binding name="text"> |
||||
<closure type="gchararray" function="unwrap_string_or_empty"> |
||||
<lookup name="name"> |
||||
<lookup name="room">RoomDetailsEditDetailsSubpage</lookup> |
||||
</lookup> |
||||
</closure> |
||||
</binding> |
||||
<signal name="changed" handler="name_edited" swapped="yes" /> |
||||
<signal name="entry-activated" handler="change_name" swapped="yes"/> |
||||
<child type="suffix"> |
||||
<object class="ActionButton" id="name_button"> |
||||
<property name="visible">False</property> |
||||
<property name="state">confirm</property> |
||||
<signal name="clicked" handler="change_name" swapped="yes"/> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="AdwPreferencesGroup" id="topic_group"> |
||||
<property name="title" translatable="yes">Description</property> |
||||
<child> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<property name="spacing">6</property> |
||||
<child> |
||||
<object class="GtkScrolledWindow"> |
||||
<property name="height-request">180</property> |
||||
<child> |
||||
<object class="GtkTextView" id="topic_text_view"> |
||||
<binding name="sensitive"> |
||||
<lookup name="can-change-topic"> |
||||
<lookup name="permissions"> |
||||
<lookup name="room">RoomDetailsEditDetailsSubpage</lookup> |
||||
</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<property name="hexpand">True</property> |
||||
<property name="wrap-mode">word-char</property> |
||||
<property name="buffer"> |
||||
<object class="GtkTextBuffer" id="topic_buffer"> |
||||
<binding name="text"> |
||||
<closure type="gchararray" function="unwrap_string_or_empty"> |
||||
<lookup name="topic"> |
||||
<lookup name="room">RoomDetailsEditDetailsSubpage</lookup> |
||||
</lookup> |
||||
</closure> |
||||
</binding> |
||||
<signal name="changed" handler="topic_edited" swapped="yes" /> |
||||
</object> |
||||
</property> |
||||
<style> |
||||
<class name="inline"/> |
||||
</style> |
||||
<accessibility> |
||||
<relation name="labelled-by">topic_group</relation> |
||||
</accessibility> |
||||
</object> |
||||
</child> |
||||
<style> |
||||
<class name="card"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="LoadingButton" id="save_topic_button"> |
||||
<property name="sensitive">False</property> |
||||
<property name="halign">end</property> |
||||
<property name="content-label" translatable="yes">Save</property> |
||||
<signal name="clicked" handler="change_topic" swapped="yes"/> |
||||
<accessibility> |
||||
<property name="label" translatable="yes">Save Description</property> |
||||
</accessibility> |
||||
<style> |
||||
<class name="pill"/> |
||||
<class name="suggested-action"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,282 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $RoomDetailsGeneralPage: Adw.PreferencesPage { |
||||
title: _("Room Details"); |
||||
|
||||
Adw.PreferencesGroup { |
||||
Gtk.Box { |
||||
spacing: 12; |
||||
orientation: vertical; |
||||
|
||||
$Avatar avatar { |
||||
size: 128; |
||||
accessible-role: presentation; |
||||
data: bind template.room as <$Room>.avatar-data; |
||||
watched-room: bind template.room; |
||||
watched-safety-setting: "invite-avatars"; |
||||
} |
||||
|
||||
Gtk.Label { |
||||
wrap: true; |
||||
wrap-mode: word_char; |
||||
justify: center; |
||||
label: bind template.room as <$Room>.display-name; |
||||
|
||||
styles [ |
||||
"title-1", |
||||
] |
||||
} |
||||
|
||||
Gtk.Label room_topic { |
||||
wrap: true; |
||||
wrap-mode: word_char; |
||||
justify: center; |
||||
use-markup: true; |
||||
selectable: true; |
||||
label: bind template.room as <$Room>.topic-linkified; |
||||
visible: bind $string_not_empty(template.room as <$Room>.topic-linkified) as <bool>; |
||||
|
||||
styles [ |
||||
"body", |
||||
] |
||||
} |
||||
|
||||
Gtk.Button edit_details_btn { |
||||
can-shrink: true; |
||||
halign: center; |
||||
label: _("Edit Details"); |
||||
action-name: "details.show-subpage"; |
||||
action-target: "'edit-details'"; |
||||
|
||||
styles [ |
||||
"pill", |
||||
] |
||||
} |
||||
} |
||||
} |
||||
|
||||
Adw.PreferencesGroup direct_members_group { |
||||
Gtk.ListBox direct_members_list { |
||||
selection-mode: none; |
||||
|
||||
styles [ |
||||
"boxed-list", |
||||
] |
||||
} |
||||
|
||||
Gtk.Label no_direct_members_label { |
||||
wrap: true; |
||||
wrap-mode: word_char; |
||||
xalign: 0.0; |
||||
label: _("There are no members in this room"); |
||||
|
||||
styles [ |
||||
"dimmed", |
||||
"body", |
||||
] |
||||
} |
||||
} |
||||
|
||||
Adw.PreferencesGroup members_row_group { |
||||
$ButtonCountRow members_row { |
||||
icon-name: "users-symbolic"; |
||||
action-name: "details.show-subpage"; |
||||
action-target: "'members'"; |
||||
} |
||||
} |
||||
|
||||
Adw.PreferencesGroup { |
||||
$ButtonCountRow { |
||||
title: _("Media"); |
||||
action-name: "details.show-subpage"; |
||||
action-target: "'visual-media-history'"; |
||||
} |
||||
|
||||
$ButtonCountRow { |
||||
title: _("Files"); |
||||
action-name: "details.show-subpage"; |
||||
action-target: "'file-history'"; |
||||
} |
||||
|
||||
$ButtonCountRow { |
||||
// Translators: As in 'Audio file'. |
||||
title: _("Audio"); |
||||
action-name: "details.show-subpage"; |
||||
action-target: "'audio-history'"; |
||||
} |
||||
} |
||||
|
||||
Adw.PreferencesGroup notifications { |
||||
title: _("Notifications"); |
||||
description: _("Which messages trigger notifications in this room"); |
||||
|
||||
$CheckLoadingRow notifications_global_row { |
||||
title: _("Use Global Setting"); |
||||
action-name: "room.set-notifications-setting"; |
||||
action-target: "'global'"; |
||||
} |
||||
|
||||
$CheckLoadingRow notifications_all_row { |
||||
title: _("All Messages"); |
||||
action-name: "room.set-notifications-setting"; |
||||
action-target: "'all'"; |
||||
} |
||||
|
||||
$CheckLoadingRow notifications_mentions_row { |
||||
title: _("Only Mentions and Keywords"); |
||||
action-name: "room.set-notifications-setting"; |
||||
action-target: "'mentions-only'"; |
||||
} |
||||
|
||||
$CheckLoadingRow notifications_mute_row { |
||||
title: _("Disable Notifications"); |
||||
action-name: "room.set-notifications-setting"; |
||||
action-target: "'mute'"; |
||||
} |
||||
} |
||||
|
||||
Adw.PreferencesGroup addresses_group { |
||||
title: _("Public Addresses"); |
||||
visible: bind $invert_boolean(template.room as <$Room>.is-direct) as <bool>; |
||||
|
||||
[header-suffix] |
||||
Gtk.Button edit_addresses_button { |
||||
action-name: "details.show-subpage"; |
||||
action-target: "'addresses'"; |
||||
|
||||
styles [ |
||||
"flat", |
||||
] |
||||
|
||||
accessibility { |
||||
description: _("Edit Public Addresses"); |
||||
} |
||||
|
||||
Adw.ButtonContent { |
||||
icon-name: "edit-symbolic"; |
||||
use-underline: true; |
||||
// Translators: In this string, 'Edit' is a verb. |
||||
label: _("_Edit"); |
||||
} |
||||
} |
||||
|
||||
Gtk.Label no_addresses_label { |
||||
wrap: true; |
||||
wrap-mode: word_char; |
||||
xalign: 0.0; |
||||
label: _("This room has no public addresses"); |
||||
|
||||
styles [ |
||||
"dimmed", |
||||
] |
||||
} |
||||
|
||||
Gtk.ListBox { |
||||
selection-mode: none; |
||||
margin-top: 12; |
||||
accessible-role: group; |
||||
|
||||
styles [ |
||||
"boxed-list", |
||||
] |
||||
|
||||
Adw.ButtonRow { |
||||
selectable: false; |
||||
title: _("Copy Room Link"); |
||||
activated => $copy_permalink() swapped; |
||||
} |
||||
} |
||||
} |
||||
|
||||
Adw.PreferencesGroup visibility_group { |
||||
title: _("Access and Visibility"); |
||||
visible: bind $invert_boolean(template.room as <$Room>.is-direct) as <bool>; |
||||
|
||||
$ButtonCountRow join_rule { |
||||
title: _("Who Can Join"); |
||||
subtitle: bind template.room as <$Room>.join-rule as <$RoomJoinRule>.display-name; |
||||
action-name: "details.show-subpage"; |
||||
action-target: "'join-rule'"; |
||||
} |
||||
|
||||
$SwitchLoadingRow guest_access { |
||||
title: _("Allow Guests"); |
||||
subtitle: _("Guests are Matrix users without a registered account"); |
||||
notify::is-active => $toggle_guest_access() swapped; |
||||
} |
||||
|
||||
$SwitchLoadingRow publish { |
||||
notify::is-active => $toggle_publish() swapped; |
||||
} |
||||
|
||||
$ComboLoadingRow history_visibility { |
||||
title: _("Who Can Read History"); |
||||
notify::selected-string => $set_history_visibility() swapped; |
||||
|
||||
string-model: Gtk.StringList { |
||||
strings [ |
||||
_("Anyone, even if they are not in the room"), |
||||
_("Members only, since this option was selected"), |
||||
_("Members only, since they joined the room"), |
||||
_("Members only, since they were invited"), |
||||
] |
||||
}; |
||||
} |
||||
} |
||||
|
||||
Adw.PreferencesGroup { |
||||
title: _("Advanced Information"); |
||||
|
||||
$CopyableRow room_id { |
||||
title: _("Matrix Room ID"); |
||||
subtitle: bind template.room as <$Room>.room-id-string; |
||||
main-title: subtitle; |
||||
copy-button-tooltip-text: _("Copy Matrix Room ID"); |
||||
toast-text: _("Matrix room ID copied to clipboard"); |
||||
} |
||||
|
||||
$SwitchLoadingRow encryption { |
||||
title: _("Enable Encryption"); |
||||
is-active: bind template.room as <$Room>.is-encrypted; |
||||
notify::is-active => $enable_encryption() swapped; |
||||
} |
||||
|
||||
$ButtonCountRow { |
||||
title: _("Permissions"); |
||||
visible: bind $invert_boolean(template.room as <$Room>.is-direct) as <bool>; |
||||
action-name: "details.show-subpage"; |
||||
action-target: "'permissions'"; |
||||
} |
||||
|
||||
Adw.ActionRow room_version { |
||||
selectable: false; |
||||
title: _("Room Version"); |
||||
subtitle: bind template.room as <$Room>.version; |
||||
|
||||
styles [ |
||||
"property", |
||||
] |
||||
|
||||
$LoadingButton upgrade_button { |
||||
// Translators: In this string, 'Upgrade' is a verb, as in 'Upgrade Room'. |
||||
content-label: _("Upgrade…"); |
||||
valign: center; |
||||
clicked => $upgrade() swapped; |
||||
|
||||
styles [ |
||||
"destructive-action", |
||||
] |
||||
} |
||||
} |
||||
|
||||
Adw.ActionRow room_federated { |
||||
selectable: false; |
||||
title: _("Federation"); |
||||
|
||||
styles [ |
||||
"property", |
||||
] |
||||
} |
||||
} |
||||
} |
||||
@ -1,368 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="RoomDetailsGeneralPage" parent="AdwPreferencesPage"> |
||||
<property name="title" translatable="yes">Room Details</property> |
||||
<child> |
||||
<object class="AdwPreferencesGroup"> |
||||
<child> |
||||
<object class="GtkBox"> |
||||
<property name="spacing">12</property> |
||||
<property name="orientation">vertical</property> |
||||
<child> |
||||
<object class="Avatar" id="avatar"> |
||||
<property name="size">128</property> |
||||
<property name="accessible-role">presentation</property> |
||||
<binding name="data"> |
||||
<lookup name="avatar-data"> |
||||
<lookup name="room">RoomDetailsGeneralPage</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<binding name="watched-room"> |
||||
<lookup name="room">RoomDetailsGeneralPage</lookup> |
||||
</binding> |
||||
<property name="watched-safety-setting">invite-avatars</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel"> |
||||
<property name="wrap">true</property> |
||||
<property name="wrap-mode">word-char</property> |
||||
<property name="justify">center</property> |
||||
<binding name="label"> |
||||
<lookup name="display-name"> |
||||
<lookup name="room">RoomDetailsGeneralPage</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<style> |
||||
<class name="title-1"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel" id="room_topic"> |
||||
<property name="wrap">true</property> |
||||
<property name="wrap-mode">word-char</property> |
||||
<property name="justify">center</property> |
||||
<property name="use-markup">True</property> |
||||
<property name="selectable">True</property> |
||||
<binding name="label"> |
||||
<lookup name="topic-linkified"> |
||||
<lookup name="room">RoomDetailsGeneralPage</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<binding name="visible"> |
||||
<closure type="gboolean" function="string_not_empty"> |
||||
<lookup name="topic-linkified"> |
||||
<lookup name="room">RoomDetailsGeneralPage</lookup> |
||||
</lookup> |
||||
</closure> |
||||
</binding> |
||||
<style> |
||||
<class name="body"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkButton" id="edit_details_btn"> |
||||
<property name="can-shrink">true</property> |
||||
<property name="halign">center</property> |
||||
<property name="label" translatable="yes">Edit Details</property> |
||||
<property name="action-name">details.show-subpage</property> |
||||
<property name="action-target">'edit-details'</property> |
||||
<style> |
||||
<class name="pill" /> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="AdwPreferencesGroup" id="direct_members_group"> |
||||
<child> |
||||
<object class="GtkListBox" id="direct_members_list"> |
||||
<property name="selection-mode">none</property> |
||||
<style> |
||||
<class name="boxed-list" /> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel" id="no_direct_members_label"> |
||||
<property name="wrap">true</property> |
||||
<property name="wrap-mode">word-char</property> |
||||
<property name="xalign">0.0</property> |
||||
<property name="label" translatable="yes">There are no members in this room</property> |
||||
<style> |
||||
<class name="dimmed"/> |
||||
<class name="body"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="AdwPreferencesGroup" id="members_row_group"> |
||||
<child> |
||||
<object class="ButtonCountRow" id="members_row"> |
||||
<property name="icon-name">users-symbolic</property> |
||||
<property name="action-name">details.show-subpage</property> |
||||
<property name="action-target">'members'</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="AdwPreferencesGroup"> |
||||
<child> |
||||
<object class="ButtonCountRow"> |
||||
<property name="title" translatable="yes">Media</property> |
||||
<property name="action-name">details.show-subpage</property> |
||||
<property name="action-target">'visual-media-history'</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="ButtonCountRow"> |
||||
<property name="title" translatable="yes">Files</property> |
||||
<property name="action-name">details.show-subpage</property> |
||||
<property name="action-target">'file-history'</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="ButtonCountRow"> |
||||
<!-- Translators: As in 'Audio file'. --> |
||||
<property name="title" translatable="yes">Audio</property> |
||||
<property name="action-name">details.show-subpage</property> |
||||
<property name="action-target">'audio-history'</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="AdwPreferencesGroup" id="notifications"> |
||||
<property name="title" translatable="yes">Notifications</property> |
||||
<property name="description" translatable="yes">Which messages trigger notifications in this room</property> |
||||
<child> |
||||
<object class="CheckLoadingRow" id="notifications_global_row"> |
||||
<property name="title" translatable="yes">Use Global Setting</property> |
||||
<property name="action-name">room.set-notifications-setting</property> |
||||
<property name="action-target">'global'</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="CheckLoadingRow" id="notifications_all_row"> |
||||
<property name="title" translatable="yes">All Messages</property> |
||||
<property name="action-name">room.set-notifications-setting</property> |
||||
<property name="action-target">'all'</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="CheckLoadingRow" id="notifications_mentions_row"> |
||||
<property name="title" translatable="yes">Only Mentions and Keywords</property> |
||||
<property name="action-name">room.set-notifications-setting</property> |
||||
<property name="action-target">'mentions-only'</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="CheckLoadingRow" id="notifications_mute_row"> |
||||
<property name="title" translatable="yes">Disable Notifications</property> |
||||
<property name="action-name">room.set-notifications-setting</property> |
||||
<property name="action-target">'mute'</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="AdwPreferencesGroup" id="addresses_group"> |
||||
<property name="title" translatable="yes">Public Addresses</property> |
||||
<binding name="visible"> |
||||
<closure type="gboolean" function="invert_boolean"> |
||||
<lookup name="is-direct"> |
||||
<lookup name="room">RoomDetailsGeneralPage</lookup> |
||||
</lookup> |
||||
</closure> |
||||
</binding> |
||||
<child type="header-suffix"> |
||||
<object class="GtkButton" id="edit_addresses_button"> |
||||
<property name="action-name">details.show-subpage</property> |
||||
<property name="action-target">'addresses'</property> |
||||
<accessibility> |
||||
<property name="description" translatable="yes">Edit Public Addresses</property> |
||||
</accessibility> |
||||
<style> |
||||
<class name="flat"/> |
||||
</style> |
||||
<child> |
||||
<object class="AdwButtonContent"> |
||||
<property name="icon-name">edit-symbolic</property> |
||||
<property name="use-underline">True</property> |
||||
<!-- Translators: In this string, 'Edit' is a verb. --> |
||||
<property name="label" translatable="yes">_Edit</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel" id="no_addresses_label"> |
||||
<property name="wrap">true</property> |
||||
<property name="wrap-mode">word-char</property> |
||||
<property name="xalign">0.0</property> |
||||
<property name="label" translatable="yes">This room has no public addresses</property> |
||||
<style> |
||||
<class name="dimmed"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkListBox"> |
||||
<style> |
||||
<class name="boxed-list" /> |
||||
</style> |
||||
<property name="selection-mode">none</property> |
||||
<property name="margin-top">12</property> |
||||
<property name="accessible-role">group</property> |
||||
<child> |
||||
<object class="AdwButtonRow"> |
||||
<property name="selectable">False</property> |
||||
<property name="title" translatable="yes">Copy Room Link</property> |
||||
<signal name="activated" handler="copy_permalink" swapped="yes" /> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="AdwPreferencesGroup" id="visibility_group"> |
||||
<property name="title" translatable="yes">Access and Visibility</property> |
||||
<binding name="visible"> |
||||
<closure type="gboolean" function="invert_boolean"> |
||||
<lookup name="is-direct"> |
||||
<lookup name="room">RoomDetailsGeneralPage</lookup> |
||||
</lookup> |
||||
</closure> |
||||
</binding> |
||||
<child> |
||||
<object class="ButtonCountRow" id="join_rule"> |
||||
<property name="title" translatable="yes">Who Can Join</property> |
||||
<binding name="subtitle"> |
||||
<lookup name="display-name"> |
||||
<lookup name="join-rule"> |
||||
<lookup name="room">RoomDetailsGeneralPage</lookup> |
||||
</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<property name="action-name">details.show-subpage</property> |
||||
<property name="action-target">'join-rule'</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="SwitchLoadingRow" id="guest_access"> |
||||
<property name="title" translatable="yes">Allow Guests</property> |
||||
<property name="subtitle" translatable="yes">Guests are Matrix users without a registered account</property> |
||||
<signal name="notify::is-active" handler="toggle_guest_access" swapped="true"/> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="SwitchLoadingRow" id="publish"> |
||||
<signal name="notify::is-active" handler="toggle_publish" swapped="true"/> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="ComboLoadingRow" id="history_visibility"> |
||||
<property name="title" translatable="yes">Who Can Read History</property> |
||||
<property name="string-model"> |
||||
<object class="GtkStringList"> |
||||
<items> |
||||
<item translatable="yes">Anyone, even if they are not in the room</item> |
||||
<item translatable="yes">Members only, since this option was selected</item> |
||||
<item translatable="yes">Members only, since they joined the room</item> |
||||
<item translatable="yes">Members only, since they were invited</item> |
||||
</items> |
||||
</object> |
||||
</property> |
||||
<signal name="notify::selected-string" handler="set_history_visibility" swapped="yes"/> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="AdwPreferencesGroup"> |
||||
<property name="title" translatable="yes">Advanced Information</property> |
||||
<child> |
||||
<object class="CopyableRow" id="room_id"> |
||||
<property name="title" translatable="yes">Matrix Room ID</property> |
||||
<binding name="subtitle"> |
||||
<lookup name="room-id-string"> |
||||
<lookup name="room">RoomDetailsGeneralPage</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<property name="main-title">subtitle</property> |
||||
<property name="copy-button-tooltip-text" translatable="yes">Copy Matrix Room ID</property> |
||||
<property name="toast-text" translatable="yes">Matrix room ID copied to clipboard</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="SwitchLoadingRow" id="encryption"> |
||||
<property name="title" translatable="yes">Enable Encryption</property> |
||||
<binding name="is-active"> |
||||
<lookup name="is-encrypted"> |
||||
<lookup name="room">RoomDetailsGeneralPage</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<signal name="notify::is-active" handler="enable_encryption" swapped="true"/> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="ButtonCountRow"> |
||||
<property name="title" translatable="yes">Permissions</property> |
||||
<binding name="visible"> |
||||
<closure type="gboolean" function="invert_boolean"> |
||||
<lookup name="is-direct"> |
||||
<lookup name="room">RoomDetailsGeneralPage</lookup> |
||||
</lookup> |
||||
</closure> |
||||
</binding> |
||||
<property name="action-name">details.show-subpage</property> |
||||
<property name="action-target">'permissions'</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="AdwActionRow" id="room_version"> |
||||
<property name="selectable">False</property> |
||||
<property name="title" translatable="yes">Room Version</property> |
||||
<binding name="subtitle"> |
||||
<lookup name="version"> |
||||
<lookup name="room">RoomDetailsGeneralPage</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<style> |
||||
<class name="property"/> |
||||
</style> |
||||
<child> |
||||
<object class="LoadingButton" id="upgrade_button"> |
||||
<!-- Translators: In this string, 'Upgrade' is a verb, as in 'Upgrade Room'. --> |
||||
<property name="content-label" translatable="yes">Upgrade…</property> |
||||
<property name="valign">center</property> |
||||
<signal name="clicked" handler="upgrade" swapped="yes"/> |
||||
<style> |
||||
<class name="destructive-action"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="AdwActionRow" id="room_federated"> |
||||
<property name="selectable">False</property> |
||||
<property name="title" translatable="yes">Federation</property> |
||||
<style> |
||||
<class name="property"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,85 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $ContentAudioHistoryViewer: Adw.NavigationPage { |
||||
// Translators: As in 'Audio file'. |
||||
title: _("Audio"); |
||||
|
||||
Adw.ToolbarView { |
||||
[top] |
||||
Adw.HeaderBar {} |
||||
|
||||
content: Gtk.Stack stack { |
||||
transition-type: crossfade; |
||||
|
||||
Gtk.StackPage { |
||||
name: "loading"; |
||||
title: _("Loading"); |
||||
|
||||
child: Adw.Spinner {}; |
||||
} |
||||
|
||||
Gtk.StackPage { |
||||
name: "empty"; |
||||
title: _("No Audio"); |
||||
|
||||
child: Adw.StatusPage { |
||||
visible: true; |
||||
hexpand: true; |
||||
vexpand: true; |
||||
icon-name: "audio-symbolic"; |
||||
title: _("No Audio"); |
||||
description: _("This room does not contain any audio"); |
||||
}; |
||||
} |
||||
|
||||
Gtk.StackPage { |
||||
name: "error"; |
||||
title: _("Could Not Load Audio"); |
||||
|
||||
child: Adw.StatusPage { |
||||
visible: true; |
||||
hexpand: true; |
||||
vexpand: true; |
||||
icon-name: "error-symbolic"; |
||||
title: _("Could Not Load Audio"); |
||||
description: _("Check your network connection"); |
||||
|
||||
child: Gtk.Button { |
||||
can-shrink: true; |
||||
label: _("Try Again"); |
||||
halign: center; |
||||
clicked => $load_more_items() swapped; |
||||
|
||||
styles [ |
||||
"pill", |
||||
] |
||||
}; |
||||
}; |
||||
} |
||||
|
||||
Gtk.StackPage { |
||||
name: "content"; |
||||
title: _("Audio History"); |
||||
|
||||
child: Gtk.ScrolledWindow { |
||||
hscrollbar-policy: never; |
||||
vexpand: true; |
||||
|
||||
Adw.ClampScrollable { |
||||
maximum-size: 400; |
||||
tightening-threshold: 400; |
||||
|
||||
Gtk.ListView list_view { |
||||
show-separators: true; |
||||
|
||||
styles [ |
||||
"navigation-sidebar", |
||||
] |
||||
} |
||||
} |
||||
}; |
||||
} |
||||
}; |
||||
} |
||||
} |
||||
@ -1,97 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="ContentAudioHistoryViewer" parent="AdwNavigationPage"> |
||||
<!-- Translators: As in 'Audio file'. --> |
||||
<property name="title" translatable="yes">Audio</property> |
||||
<child> |
||||
<object class="AdwToolbarView"> |
||||
<child type="top"> |
||||
<object class="AdwHeaderBar"/> |
||||
</child> |
||||
<property name="content"> |
||||
<object class="GtkStack" id="stack"> |
||||
<property name="transition-type">crossfade</property> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">loading</property> |
||||
<property name="title" translatable="yes">Loading</property> |
||||
<property name="child"> |
||||
<object class="AdwSpinner" /> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">empty</property> |
||||
<property name="title" translatable="yes">No Audio</property> |
||||
<property name="child"> |
||||
<object class="AdwStatusPage"> |
||||
<property name="visible">True</property> |
||||
<property name="hexpand">True</property> |
||||
<property name="vexpand">True</property> |
||||
<property name="icon-name">audio-symbolic</property> |
||||
<property name="title" translatable="yes">No Audio</property> |
||||
<property name="description" translatable="yes">This room does not contain any audio</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">error</property> |
||||
<property name="title" translatable="yes">Could Not Load Audio</property> |
||||
<property name="child"> |
||||
<object class="AdwStatusPage"> |
||||
<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">Could Not Load Audio</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="halign">center</property> |
||||
<signal name="clicked" handler="load_more_items" swapped="true"/> |
||||
<style> |
||||
<class name="pill"/> |
||||
</style> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">content</property> |
||||
<property name="title" translatable="yes">Audio History</property> |
||||
<property name="child"> |
||||
<object class="GtkScrolledWindow"> |
||||
<property name="hscrollbar-policy">never</property> |
||||
<property name="vexpand">True</property> |
||||
<child> |
||||
<object class="AdwClampScrollable"> |
||||
<property name="maximum-size">400</property> |
||||
<property name="tightening-threshold">400</property> |
||||
<child> |
||||
<object class="GtkListView" id="list_view"> |
||||
<property name="show-separators">True</property> |
||||
<style> |
||||
<class name="navigation-sidebar"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,45 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $ContentAudioHistoryViewerRow: Adw.Bin { |
||||
Gtk.Box { |
||||
spacing: 12; |
||||
|
||||
Gtk.Button play_button { |
||||
clicked => $toggle_play() swapped; |
||||
icon-name: "media-playback-start-symbolic"; |
||||
valign: center; |
||||
// Translators: As in "Play audio file". |
||||
tooltip-text: _("Play"); |
||||
|
||||
styles [ |
||||
"circular", |
||||
"suggested-action", |
||||
] |
||||
} |
||||
|
||||
Gtk.Box { |
||||
orientation: vertical; |
||||
homogeneous: true; |
||||
|
||||
Gtk.Label title_label { |
||||
ellipsize: end; |
||||
xalign: 0; |
||||
|
||||
styles [ |
||||
"heading", |
||||
] |
||||
} |
||||
|
||||
Gtk.Label duration_label { |
||||
ellipsize: end; |
||||
xalign: 0; |
||||
|
||||
styles [ |
||||
"dimmed", |
||||
"numeric", |
||||
] |
||||
} |
||||
} |
||||
} |
||||
} |
||||
@ -1,48 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="ContentAudioHistoryViewerRow" parent="AdwBin"> |
||||
<child> |
||||
<object class="GtkBox"> |
||||
<property name="spacing">12</property> |
||||
<child> |
||||
<object class="GtkButton" id="play_button"> |
||||
<signal name="clicked" handler="toggle_play" swapped="true"/> |
||||
<property name="icon-name">media-playback-start-symbolic</property> |
||||
<property name="valign">center</property> |
||||
<!-- Translators: As in "Play audio file". --> |
||||
<property name="tooltip-text" translatable="yes">Play</property> |
||||
<style> |
||||
<class name="circular"/> |
||||
<class name="suggested-action"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<property name="homogeneous">True</property> |
||||
<child> |
||||
<object class="GtkLabel" id="title_label"> |
||||
<property name="ellipsize">end</property> |
||||
<property name="xalign">0</property> |
||||
<style> |
||||
<class name="heading"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel" id="duration_label"> |
||||
<property name="ellipsize">end</property> |
||||
<property name="xalign">0</property> |
||||
<style> |
||||
<class name="dimmed"/> |
||||
<class name="numeric"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,84 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $ContentFileHistoryViewer: Adw.NavigationPage { |
||||
title: _("File"); |
||||
|
||||
Adw.ToolbarView { |
||||
[top] |
||||
Adw.HeaderBar {} |
||||
|
||||
content: Gtk.Stack stack { |
||||
transition-type: crossfade; |
||||
|
||||
Gtk.StackPage { |
||||
name: "loading"; |
||||
title: _("Loading"); |
||||
|
||||
child: Adw.Spinner {}; |
||||
} |
||||
|
||||
Gtk.StackPage { |
||||
name: "empty"; |
||||
title: _("No Files"); |
||||
|
||||
child: Adw.StatusPage { |
||||
visible: true; |
||||
hexpand: true; |
||||
vexpand: true; |
||||
icon-name: "document-symbolic"; |
||||
title: _("No Files"); |
||||
description: _("This room does not contain any files"); |
||||
}; |
||||
} |
||||
|
||||
Gtk.StackPage { |
||||
name: "error"; |
||||
title: _("Could Not Load Files"); |
||||
|
||||
child: Adw.StatusPage { |
||||
visible: true; |
||||
hexpand: true; |
||||
vexpand: true; |
||||
icon-name: "error-symbolic"; |
||||
title: _("Could Not Load Files"); |
||||
description: _("Check your network connection"); |
||||
|
||||
child: Gtk.Button { |
||||
can-shrink: true; |
||||
label: _("Try Again"); |
||||
halign: center; |
||||
clicked => $load_more_items() swapped; |
||||
|
||||
styles [ |
||||
"pill", |
||||
] |
||||
}; |
||||
}; |
||||
} |
||||
|
||||
Gtk.StackPage { |
||||
name: "content"; |
||||
title: _("File History"); |
||||
|
||||
child: Gtk.ScrolledWindow { |
||||
hscrollbar-policy: never; |
||||
vexpand: true; |
||||
|
||||
Adw.ClampScrollable { |
||||
maximum-size: 400; |
||||
tightening-threshold: 400; |
||||
|
||||
Gtk.ListView list_view { |
||||
show-separators: true; |
||||
|
||||
styles [ |
||||
"navigation-sidebar", |
||||
] |
||||
} |
||||
} |
||||
}; |
||||
} |
||||
}; |
||||
} |
||||
} |
||||
@ -1,96 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="ContentFileHistoryViewer" parent="AdwNavigationPage"> |
||||
<property name="title" translatable="yes">File</property> |
||||
<child> |
||||
<object class="AdwToolbarView"> |
||||
<child type="top"> |
||||
<object class="AdwHeaderBar"/> |
||||
</child> |
||||
<property name="content"> |
||||
<object class="GtkStack" id="stack"> |
||||
<property name="transition-type">crossfade</property> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">loading</property> |
||||
<property name="title" translatable="yes">Loading</property> |
||||
<property name="child"> |
||||
<object class="AdwSpinner" /> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">empty</property> |
||||
<property name="title" translatable="yes">No Files</property> |
||||
<property name="child"> |
||||
<object class="AdwStatusPage"> |
||||
<property name="visible">True</property> |
||||
<property name="hexpand">True</property> |
||||
<property name="vexpand">True</property> |
||||
<property name="icon-name">document-symbolic</property> |
||||
<property name="title" translatable="yes">No Files</property> |
||||
<property name="description" translatable="yes">This room does not contain any files</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">error</property> |
||||
<property name="title" translatable="yes">Could Not Load Files</property> |
||||
<property name="child"> |
||||
<object class="AdwStatusPage"> |
||||
<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">Could Not Load Files</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="halign">center</property> |
||||
<signal name="clicked" handler="load_more_items" swapped="true"/> |
||||
<style> |
||||
<class name="pill"/> |
||||
</style> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">content</property> |
||||
<property name="title" translatable="yes">File History</property> |
||||
<property name="child"> |
||||
<object class="GtkScrolledWindow"> |
||||
<property name="hscrollbar-policy">never</property> |
||||
<property name="vexpand">True</property> |
||||
<child> |
||||
<object class="AdwClampScrollable"> |
||||
<property name="maximum-size">400</property> |
||||
<property name="tightening-threshold">400</property> |
||||
<child> |
||||
<object class="GtkListView" id="list_view"> |
||||
<property name="show-separators">True</property> |
||||
<style> |
||||
<class name="navigation-sidebar"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,44 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $ContentFileHistoryViewerRow: Adw.Bin { |
||||
Gtk.Box { |
||||
spacing: 12; |
||||
|
||||
Gtk.Button button { |
||||
clicked => $button_clicked() swapped; |
||||
icon-name: "save-symbolic"; |
||||
valign: center; |
||||
tooltip-text: _("Save File"); |
||||
|
||||
styles [ |
||||
"circular", |
||||
"suggested-action", |
||||
] |
||||
} |
||||
|
||||
Gtk.Box { |
||||
orientation: vertical; |
||||
homogeneous: true; |
||||
|
||||
Gtk.Label title_label { |
||||
ellipsize: end; |
||||
xalign: 0; |
||||
|
||||
styles [ |
||||
"heading", |
||||
] |
||||
} |
||||
|
||||
Gtk.Label size_label { |
||||
ellipsize: end; |
||||
xalign: 0; |
||||
|
||||
styles [ |
||||
"dimmed", |
||||
"numeric", |
||||
] |
||||
} |
||||
} |
||||
} |
||||
} |
||||
@ -1,47 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="ContentFileHistoryViewerRow" parent="AdwBin"> |
||||
<child> |
||||
<object class="GtkBox"> |
||||
<property name="spacing">12</property> |
||||
<child> |
||||
<object class="GtkButton" id="button"> |
||||
<signal name="clicked" handler="button_clicked" swapped="true"/> |
||||
<property name="icon-name">save-symbolic</property> |
||||
<property name="valign">center</property> |
||||
<property name="tooltip-text" translatable="yes">Save File</property> |
||||
<style> |
||||
<class name="circular"/> |
||||
<class name="suggested-action"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<property name="homogeneous">True</property> |
||||
<child> |
||||
<object class="GtkLabel" id="title_label"> |
||||
<property name="ellipsize">end</property> |
||||
<property name="xalign">0</property> |
||||
<style> |
||||
<class name="heading"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel" id="size_label"> |
||||
<property name="ellipsize">end</property> |
||||
<property name="xalign">0</property> |
||||
<style> |
||||
<class name="dimmed"/> |
||||
<class name="numeric"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,89 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $ContentVisualMediaHistoryViewer: Adw.NavigationPage { |
||||
title: _("Media"); |
||||
|
||||
Gtk.Overlay { |
||||
[overlay] |
||||
$MediaViewer media_viewer { |
||||
visible: false; |
||||
} |
||||
|
||||
Adw.ToolbarView { |
||||
[top] |
||||
Adw.HeaderBar {} |
||||
|
||||
content: Gtk.Stack stack { |
||||
transition-type: crossfade; |
||||
|
||||
Gtk.StackPage { |
||||
name: "loading"; |
||||
title: _("Loading"); |
||||
|
||||
child: Adw.Spinner {}; |
||||
} |
||||
|
||||
Gtk.StackPage { |
||||
name: "empty"; |
||||
title: _("No Media"); |
||||
|
||||
child: Adw.StatusPage { |
||||
visible: true; |
||||
hexpand: true; |
||||
vexpand: true; |
||||
icon-name: "image-symbolic"; |
||||
title: _("No Media"); |
||||
description: _("This room does not contain any media"); |
||||
}; |
||||
} |
||||
|
||||
Gtk.StackPage { |
||||
name: "error"; |
||||
title: _("Could Not Load Media"); |
||||
|
||||
child: Adw.StatusPage { |
||||
visible: true; |
||||
hexpand: true; |
||||
vexpand: true; |
||||
icon-name: "error-symbolic"; |
||||
title: _("Could Not Load Media"); |
||||
description: _("Check your network connection"); |
||||
|
||||
child: Gtk.Button { |
||||
can-shrink: true; |
||||
label: _("Try Again"); |
||||
halign: center; |
||||
clicked => $load_more_items() swapped; |
||||
|
||||
styles [ |
||||
"pill", |
||||
] |
||||
}; |
||||
}; |
||||
} |
||||
|
||||
Gtk.StackPage { |
||||
name: "content"; |
||||
title: _("Media History"); |
||||
|
||||
child: Gtk.ScrolledWindow { |
||||
hscrollbar-policy: never; |
||||
vexpand: true; |
||||
|
||||
Adw.ClampScrollable { |
||||
maximum-size: 1000; |
||||
tightening-threshold: 800; |
||||
vscroll-policy: natural; |
||||
|
||||
Gtk.GridView grid_view { |
||||
min-columns: 2; |
||||
max-columns: 5; |
||||
} |
||||
} |
||||
}; |
||||
} |
||||
}; |
||||
} |
||||
} |
||||
} |
||||
@ -1,104 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="ContentVisualMediaHistoryViewer" parent="AdwNavigationPage"> |
||||
<property name="title" translatable="yes">Media</property> |
||||
<child> |
||||
<object class="GtkOverlay"> |
||||
<child type="overlay"> |
||||
<object class="MediaViewer" id="media_viewer"> |
||||
<property name="visible">False</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="AdwToolbarView"> |
||||
<child type="top"> |
||||
<object class="AdwHeaderBar"/> |
||||
</child> |
||||
<property name="content"> |
||||
<object class="GtkStack" id="stack"> |
||||
<property name="transition-type">crossfade</property> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">loading</property> |
||||
<property name="title" translatable="yes">Loading</property> |
||||
<property name="child"> |
||||
<object class="AdwSpinner" /> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">empty</property> |
||||
<property name="title" translatable="yes">No Media</property> |
||||
<property name="child"> |
||||
<object class="AdwStatusPage"> |
||||
<property name="visible">True</property> |
||||
<property name="hexpand">True</property> |
||||
<property name="vexpand">True</property> |
||||
<property name="icon-name">image-symbolic</property> |
||||
<property name="title" translatable="yes">No Media</property> |
||||
<property name="description" translatable="yes">This room does not contain any media</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">error</property> |
||||
<property name="title" translatable="yes">Could Not Load Media</property> |
||||
<property name="child"> |
||||
<object class="AdwStatusPage"> |
||||
<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">Could Not Load Media</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="halign">center</property> |
||||
<signal name="clicked" handler="load_more_items" swapped="true"/> |
||||
<style> |
||||
<class name="pill"/> |
||||
</style> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">content</property> |
||||
<property name="title" translatable="yes">Media History</property> |
||||
<property name="child"> |
||||
<object class="GtkScrolledWindow"> |
||||
<property name="hscrollbar-policy">never</property> |
||||
<property name="vexpand">True</property> |
||||
<child> |
||||
<object class="AdwClampScrollable"> |
||||
<property name="maximum-size">1000</property> |
||||
<property name="tightening-threshold">800</property> |
||||
<property name="vscroll-policy">natural</property> |
||||
<child> |
||||
<object class="GtkGridView" id="grid_view"> |
||||
<property name="min-columns">2</property> |
||||
<property name="max-columns">5</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,36 @@
|
||||
using Gtk 4.0; |
||||
|
||||
template $ContentVisualMediaHistoryViewerItem: Gtk.Widget { |
||||
focusable: true; |
||||
accessible-role: button; |
||||
height-request: 150; |
||||
width-request: 150; |
||||
|
||||
Gtk.GestureClick { |
||||
released => $activate() swapped; |
||||
} |
||||
|
||||
Gtk.Overlay overlay { |
||||
Gtk.Picture picture { |
||||
content-fit: cover; |
||||
} |
||||
|
||||
[overlay] |
||||
Gtk.Image play_icon { |
||||
visible: false; |
||||
halign: center; |
||||
valign: center; |
||||
icon-name: "media-playback-start-symbolic"; |
||||
accessible-role: presentation; |
||||
|
||||
styles [ |
||||
"osd", |
||||
"circular", |
||||
] |
||||
|
||||
layout { |
||||
measure: true; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="ContentVisualMediaHistoryViewerItem" parent="GtkWidget"> |
||||
<property name="focusable">True</property> |
||||
<property name="accessible-role">button</property> |
||||
<property name="height-request">150</property> |
||||
<property name="width-request">150</property> |
||||
<child> |
||||
<object class="GtkGestureClick"> |
||||
<signal name="released" handler="activate" swapped="true"/> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkOverlay" id="overlay"> |
||||
<child> |
||||
<object class="GtkPicture" id="picture"> |
||||
<property name="content-fit">cover</property> |
||||
</object> |
||||
</child> |
||||
<child type="overlay"> |
||||
<object class="GtkImage" id="play_icon"> |
||||
<style> |
||||
<class name="osd"/> |
||||
<class name="circular"/> |
||||
</style> |
||||
<property name="visible">False</property> |
||||
<property name="halign">center</property> |
||||
<property name="valign">center</property> |
||||
<property name="icon-name">media-playback-start-symbolic</property> |
||||
<property name="accessible-role">presentation</property> |
||||
<layout> |
||||
<property name="measure">true</property> |
||||
</layout> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,126 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $RoomDetailsInviteSubpage: Adw.NavigationPage { |
||||
title: _("Invite New Members"); |
||||
|
||||
child: Adw.ToolbarView { |
||||
[top] |
||||
Adw.HeaderBar { |
||||
show-back-button: false; |
||||
show-end-title-buttons: false; |
||||
|
||||
[start] |
||||
Gtk.Button cancel_button { |
||||
label: _("_Cancel"); |
||||
use-underline: true; |
||||
clicked => $close() swapped; |
||||
} |
||||
|
||||
[end] |
||||
$LoadingButton invite_button { |
||||
content-label: _("I_nvite"); |
||||
use-underline: true; |
||||
sensitive: false; |
||||
clicked => $invite() swapped; |
||||
|
||||
styles [ |
||||
"suggested-action", |
||||
] |
||||
} |
||||
} |
||||
|
||||
[top] |
||||
Adw.Clamp { |
||||
margin-bottom: 6; |
||||
margin-end: 30; |
||||
margin-start: 30; |
||||
margin-top: 6; |
||||
hexpand: true; |
||||
|
||||
$PillSearchEntry search_entry { |
||||
editable: bind invite_button.is-loading inverted; |
||||
pill-removed => $remove_pill_invitee() swapped; |
||||
} |
||||
} |
||||
|
||||
content: Gtk.Stack stack { |
||||
transition-type: crossfade; |
||||
|
||||
Gtk.StackPage { |
||||
name: "no-search"; |
||||
// Translators: In this string, this is a verb. |
||||
title: _("Search"); |
||||
|
||||
child: Adw.StatusPage no_search_page { |
||||
vexpand: true; |
||||
icon-name: "system-search-symbolic"; |
||||
// Translators: In this string, this is a verb. |
||||
title: _("Search"); |
||||
description: _("Search for users to invite them to this room"); |
||||
}; |
||||
} |
||||
|
||||
Gtk.StackPage { |
||||
name: "results"; |
||||
title: _("Matching Users"); |
||||
|
||||
child: Gtk.ScrolledWindow matching_page { |
||||
child: Adw.ClampScrollable { |
||||
child: Gtk.ListView list_view { |
||||
margin-end: 12; |
||||
margin-start: 12; |
||||
single-click-activate: true; |
||||
tab-behavior: item; |
||||
activate => $toggle_item_is_invitee() swapped; |
||||
|
||||
factory: Gtk.BuilderListItemFactory { |
||||
template Gtk.ListItem { |
||||
activatable: bind template.item as <$RoomDetailsInviteItem>.can-invite; |
||||
selectable: false; |
||||
|
||||
child: $RoomDetailsInviteRow row { |
||||
item: bind template.item; |
||||
}; |
||||
} |
||||
}; |
||||
|
||||
styles [ |
||||
"user-search-results", |
||||
] |
||||
}; |
||||
}; |
||||
}; |
||||
} |
||||
|
||||
Gtk.StackPage { |
||||
name: "no-results"; |
||||
title: _("No Users Found"); |
||||
|
||||
child: Adw.StatusPage no_matching_page { |
||||
icon-name: "system-search-symbolic"; |
||||
title: _("No Users Found"); |
||||
description: _("No users matching the search were found"); |
||||
}; |
||||
} |
||||
|
||||
Gtk.StackPage { |
||||
name: "error"; |
||||
title: _("Error"); |
||||
|
||||
child: Adw.StatusPage error_page { |
||||
icon-name: "error-symbolic"; |
||||
title: _("Error"); |
||||
description: _("An error occurred while searching for matches"); |
||||
}; |
||||
} |
||||
|
||||
Gtk.StackPage { |
||||
name: "loading"; |
||||
title: _("Searching for Users"); |
||||
|
||||
child: Adw.Spinner {}; |
||||
} |
||||
}; |
||||
}; |
||||
} |
||||
@ -1,155 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="RoomDetailsInviteSubpage" parent="AdwNavigationPage"> |
||||
<property name="title" translatable="yes">Invite New Members</property> |
||||
<property name="child"> |
||||
<object class="AdwToolbarView"> |
||||
<child type="top"> |
||||
<object class="AdwHeaderBar"> |
||||
<property name="show-back-button">false</property> |
||||
<property name="show-end-title-buttons">false</property> |
||||
<child type="start"> |
||||
<object class="GtkButton" id="cancel_button"> |
||||
<property name="label" translatable="yes">_Cancel</property> |
||||
<property name="use_underline">True</property> |
||||
<signal name="clicked" handler="close" swapped="yes" /> |
||||
</object> |
||||
</child> |
||||
<child type="end"> |
||||
<object class="LoadingButton" id="invite_button"> |
||||
<property name="content-label" translatable="yes">I_nvite</property> |
||||
<property name="use_underline">True</property> |
||||
<property name="sensitive">False</property> |
||||
<signal name="clicked" handler="invite" swapped="yes" /> |
||||
<style> |
||||
<class name="suggested-action"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child type="top"> |
||||
<object class="AdwClamp"> |
||||
<property name="margin-bottom">6</property> |
||||
<property name="margin-end">30</property> |
||||
<property name="margin-start">30</property> |
||||
<property name="margin-top">6</property> |
||||
<property name="hexpand">True</property> |
||||
<child> |
||||
<object class="PillSearchEntry" id="search_entry"> |
||||
<property name="editable" bind-source="invite_button" bind-property="is-loading" bind-flags="sync-create | invert-boolean"/> |
||||
<signal name="pill-removed" handler="remove_pill_invitee" swapped="yes" /> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<property name="content"> |
||||
<object class="GtkStack" id="stack"> |
||||
<property name="transition-type">crossfade</property> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">no-search</property> |
||||
<!-- Translators: In this string, this is a verb. --> |
||||
<property name="title" translatable="yes">Search</property> |
||||
<property name="child"> |
||||
<object class="AdwStatusPage" id="no_search_page"> |
||||
<property name="vexpand">True</property> |
||||
<property name="icon-name">system-search-symbolic</property> |
||||
<!-- Translators: In this string, this is a verb. --> |
||||
<property name="title" translatable="yes">Search</property> |
||||
<property name="description" translatable="yes">Search for users to invite them to this room</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">results</property> |
||||
<property name="title" translatable="yes">Matching Users</property> |
||||
<property name="child"> |
||||
<object class="GtkScrolledWindow" id="matching_page"> |
||||
<property name="child"> |
||||
<object class="AdwClampScrollable"> |
||||
<property name="child"> |
||||
<object class="GtkListView" id="list_view"> |
||||
<property name="margin-end">12</property> |
||||
<property name="margin-start">12</property> |
||||
<property name="single-click-activate">True</property> |
||||
<property name="tab-behavior">item</property> |
||||
<signal name="activate" handler="toggle_item_is_invitee" swapped="yes" /> |
||||
<property name="factory"> |
||||
<object class="GtkBuilderListItemFactory"> |
||||
<property name="bytes"><![CDATA[ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="GtkListItem"> |
||||
<binding name="activatable"> |
||||
<lookup name="can-invite" type="RoomDetailsInviteItem"> |
||||
<lookup name="item">GtkListItem</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<property name="selectable">False</property> |
||||
<property name="child"> |
||||
<object class="RoomDetailsInviteRow" id="row"> |
||||
<binding name="item"> |
||||
<lookup name="item">GtkListItem</lookup> |
||||
</binding> |
||||
</object> |
||||
</property> |
||||
</template> |
||||
</interface> |
||||
]]></property> |
||||
</object> |
||||
</property> |
||||
<style> |
||||
<class name="user-search-results"/> |
||||
</style> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">no-results</property> |
||||
<property name="title" translatable="yes">No Users Found</property> |
||||
<property name="child"> |
||||
<object class="AdwStatusPage" id="no_matching_page"> |
||||
<property name="icon-name">system-search-symbolic</property> |
||||
<property name="title" translatable="yes">No Users Found</property> |
||||
<property name="description" translatable="yes">No users matching the search were found</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">error</property> |
||||
<property name="title" translatable="yes">Error</property> |
||||
<property name="child"> |
||||
<object class="AdwStatusPage" id="error_page"> |
||||
<property name="icon-name">error-symbolic</property> |
||||
<property name="title" translatable="yes">Error</property> |
||||
<property name="description" translatable="yes">An error occurred while searching for matches</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">loading</property> |
||||
<property name="title" translatable="yes">Searching for Users</property> |
||||
<property name="child"> |
||||
<object class="AdwSpinner" /> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,68 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $RoomDetailsInviteRow: Adw.Bin { |
||||
margin-top: 12; |
||||
margin-bottom: 12; |
||||
margin-start: 12; |
||||
margin-end: 12; |
||||
|
||||
child: Gtk.Box header { |
||||
spacing: 12; |
||||
|
||||
styles [ |
||||
"header", |
||||
] |
||||
|
||||
$Avatar { |
||||
size: 32; |
||||
data: bind template.item as <$RoomDetailsInviteItem>.user as <$User>.avatar-data; |
||||
accessible-role: "presentation"; |
||||
} |
||||
|
||||
Gtk.Box { |
||||
orientation: vertical; |
||||
|
||||
styles [ |
||||
"title", |
||||
] |
||||
|
||||
Gtk.Label display-name { |
||||
halign: start; |
||||
ellipsize: end; |
||||
label: bind template.item as <$RoomDetailsInviteItem>.user as <$User>.display-name; |
||||
|
||||
styles [ |
||||
"title", |
||||
] |
||||
} |
||||
|
||||
Gtk.Label subtitle { |
||||
hexpand: true; |
||||
halign: start; |
||||
ellipsize: end; |
||||
label: bind template.item as <$RoomDetailsInviteItem>.user as <$User>.user-id-string; |
||||
|
||||
styles [ |
||||
"subtitle", |
||||
] |
||||
} |
||||
} |
||||
|
||||
Gtk.CheckButton check_button { |
||||
visible: bind template.item as <$RoomDetailsInviteItem>.can-invite; |
||||
} |
||||
|
||||
Gtk.Label { |
||||
visible: bind $invert_boolean(template.item as <$RoomDetailsInviteItem>.can-invite) as <bool>; |
||||
hexpand: true; |
||||
halign: end; |
||||
ellipsize: end; |
||||
label: bind template.item as <$RoomDetailsInviteItem>.invite-exception; |
||||
|
||||
styles [ |
||||
"subtitle", |
||||
] |
||||
} |
||||
}; |
||||
} |
||||
@ -1,102 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="RoomDetailsInviteRow" parent="AdwBin"> |
||||
<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="child"> |
||||
<object class="GtkBox" id="header"> |
||||
<property name="spacing">12</property> |
||||
<style> |
||||
<class name="header"/> |
||||
</style> |
||||
<child> |
||||
<object class="Avatar"> |
||||
<property name="size">32</property> |
||||
<binding name="data"> |
||||
<lookup name="avatar-data"> |
||||
<lookup name="user"> |
||||
<lookup name="item">RoomDetailsInviteRow</lookup> |
||||
</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<property name="accessible-role">presentation</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<style> |
||||
<class name="title"/> |
||||
</style> |
||||
<child> |
||||
<object class="GtkLabel" id="display-name"> |
||||
<property name="halign">start</property> |
||||
<property name="ellipsize">end</property> |
||||
<binding name="label"> |
||||
<lookup name="display-name"> |
||||
<lookup name="user"> |
||||
<lookup name="item">RoomDetailsInviteRow</lookup> |
||||
</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<style> |
||||
<class name="title"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel" id="subtitle"> |
||||
<property name="hexpand">True</property> |
||||
<property name="halign">start</property> |
||||
<property name="ellipsize">end</property> |
||||
<binding name="label"> |
||||
<lookup name="user-id-string"> |
||||
<lookup name="user"> |
||||
<lookup name="item">RoomDetailsInviteRow</lookup> |
||||
</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<style> |
||||
<class name="subtitle"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkCheckButton" id="check_button"> |
||||
<binding name="visible"> |
||||
<lookup name="can-invite"> |
||||
<lookup name="item">RoomDetailsInviteRow</lookup> |
||||
</lookup> |
||||
</binding> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel"> |
||||
<binding name="visible"> |
||||
<closure type="gboolean" function="invert_boolean"> |
||||
<lookup name="can-invite"> |
||||
<lookup name="item">RoomDetailsInviteRow</lookup> |
||||
</lookup> |
||||
</closure> |
||||
</binding> |
||||
<property name="hexpand">True</property> |
||||
<property name="halign">end</property> |
||||
<property name="ellipsize">end</property> |
||||
<binding name="label"> |
||||
<lookup name="invite-exception"> |
||||
<lookup name="item">RoomDetailsInviteRow</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<style> |
||||
<class name="subtitle"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,107 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $RoomDetailsJoinRuleSubpage: Adw.NavigationPage { |
||||
title: _("Who Can Join"); |
||||
|
||||
styles [ |
||||
"form-page", |
||||
] |
||||
|
||||
child: Adw.ToolbarView { |
||||
[top] |
||||
Adw.HeaderBar { |
||||
show-back-button: false; |
||||
|
||||
[start] |
||||
Gtk.Button { |
||||
icon-name: "go-previous-symbolic"; |
||||
tooltip-text: _("Back"); |
||||
clicked => $go_back() swapped; |
||||
|
||||
styles [ |
||||
"back", |
||||
] |
||||
} |
||||
|
||||
[end] |
||||
$LoadingButton save_button { |
||||
sensitive: bind template.changed; |
||||
content-label: _("_Save"); |
||||
use-underline: true; |
||||
clicked => $save() swapped; |
||||
|
||||
styles [ |
||||
"suggested-action", |
||||
] |
||||
} |
||||
} |
||||
|
||||
content: Gtk.ScrolledWindow scrolled_window { |
||||
hscrollbar-policy: never; |
||||
propagate-natural-height: true; |
||||
|
||||
child: Adw.Clamp { |
||||
child: Gtk.Box { |
||||
orientation: vertical; |
||||
|
||||
Gtk.Box info_box { |
||||
visible: false; |
||||
margin-start: 12; |
||||
margin-end: 12; |
||||
spacing: 12; |
||||
|
||||
styles [ |
||||
"dimmed", |
||||
] |
||||
|
||||
Gtk.Image info_image { |
||||
pixel-size: 24; |
||||
accessible-role: presentation; |
||||
} |
||||
|
||||
Gtk.Label info_description { |
||||
wrap: true; |
||||
wrap-mode: word_char; |
||||
xalign: 0.0; |
||||
|
||||
styles [ |
||||
"body", |
||||
] |
||||
} |
||||
} |
||||
|
||||
Gtk.ListBox { |
||||
styles [ |
||||
"boxed-list", |
||||
] |
||||
|
||||
$CheckLoadingRow { |
||||
title: _("Only Invited Users"); |
||||
action-name: "join-rule.set-value"; |
||||
action-target: "'invite'"; |
||||
} |
||||
|
||||
$CheckLoadingRow { |
||||
title: _("Any Registered User"); |
||||
action-name: "join-rule.set-value"; |
||||
action-target: "'public'"; |
||||
} |
||||
} |
||||
|
||||
Gtk.ListBox knock_box { |
||||
styles [ |
||||
"boxed-list", |
||||
] |
||||
|
||||
Adw.SwitchRow knock_row { |
||||
selectable: false; |
||||
title: _("Allow Invite Requests"); |
||||
notify::active => $update_changed() swapped; |
||||
} |
||||
} |
||||
}; |
||||
}; |
||||
}; |
||||
}; |
||||
} |
||||
@ -1,116 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="RoomDetailsJoinRuleSubpage" parent="AdwNavigationPage"> |
||||
<property name="title" translatable="yes">Who Can Join</property> |
||||
<style> |
||||
<class name="form-page"/> |
||||
</style> |
||||
<property name="child"> |
||||
<object class="AdwToolbarView"> |
||||
<child type="top"> |
||||
<object class="AdwHeaderBar"> |
||||
<property name="show-back-button">False</property> |
||||
<child type="start"> |
||||
<object class="GtkButton"> |
||||
<property name="icon-name">go-previous-symbolic</property> |
||||
<property name="tooltip-text" translatable="yes">Back</property> |
||||
<signal name="clicked" handler="go_back" swapped="yes"/> |
||||
<style> |
||||
<class name="back"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child type="end"> |
||||
<object class="LoadingButton" id="save_button"> |
||||
<property name="sensitive" bind-source="RoomDetailsJoinRuleSubpage" bind-property="changed" bind-flags="sync-create" /> |
||||
<property name="content-label" translatable="yes">_Save</property> |
||||
<property name="use-underline">True</property> |
||||
<signal name="clicked" handler="save" swapped="yes"/> |
||||
<style> |
||||
<class name="suggested-action"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<property name="content"> |
||||
<object class="GtkScrolledWindow" id="scrolled_window"> |
||||
<property name="hscrollbar-policy">never</property> |
||||
<property name="propagate-natural-height">True</property> |
||||
<property name="child"> |
||||
<object class="AdwClamp"> |
||||
<property name="child"> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<child> |
||||
<object class="GtkBox" id="info_box"> |
||||
<property name="visible">False</property> |
||||
<property name="margin-start">12</property> |
||||
<property name="margin-end">12</property> |
||||
<property name="spacing">12</property> |
||||
<style> |
||||
<class name="dimmed"/> |
||||
</style> |
||||
<child> |
||||
<object class="GtkImage" id="info_image"> |
||||
<property name="pixel-size">24</property> |
||||
<property name="accessible-role">presentation</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel" id="info_description"> |
||||
<property name="wrap">True</property> |
||||
<property name="wrap-mode">word-char</property> |
||||
<property name="xalign">0.0</property> |
||||
<style> |
||||
<class name="body"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkListBox"> |
||||
<child> |
||||
<object class="CheckLoadingRow"> |
||||
<property name="title" translatable="yes">Only Invited Users</property> |
||||
<property name="action-name">join-rule.set-value</property> |
||||
<property name="action-target">'invite'</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="CheckLoadingRow"> |
||||
<property name="title" translatable="yes">Any Registered User</property> |
||||
<property name="action-name">join-rule.set-value</property> |
||||
<property name="action-target">'public'</property> |
||||
</object> |
||||
</child> |
||||
<style> |
||||
<class name="boxed-list"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkListBox" id="knock_box"> |
||||
<child> |
||||
<object class="AdwSwitchRow" id="knock_row"> |
||||
<property name="selectable">False</property> |
||||
<property name="title" translatable="yes">Allow Invite Requests</property> |
||||
<signal name="notify::active" handler="update_changed" swapped="true"/> |
||||
</object> |
||||
</child> |
||||
<style> |
||||
<class name="boxed-list"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,62 @@
|
||||
using Gtk 4.0; |
||||
|
||||
template $ContentMemberRow: Box { |
||||
spacing: 12; |
||||
|
||||
styles [ |
||||
"header", |
||||
] |
||||
|
||||
$Avatar { |
||||
size: 32; |
||||
data: bind template.member as <$Member>.avatar-data; |
||||
accessible-role: "presentation"; |
||||
} |
||||
|
||||
Gtk.Box { |
||||
orientation: vertical; |
||||
|
||||
styles [ |
||||
"title", |
||||
] |
||||
|
||||
Gtk.Box { |
||||
spacing: 6; |
||||
|
||||
Gtk.Label { |
||||
halign: start; |
||||
ellipsize: end; |
||||
label: bind template.member as <$Member>.display-name; |
||||
|
||||
styles [ |
||||
"title", |
||||
] |
||||
} |
||||
|
||||
Gtk.Image { |
||||
icon-name: "verified-symbolic"; |
||||
tooltip-text: _("Identity Verified"); |
||||
visible: bind template.member as <$User>.is-verified; |
||||
|
||||
styles [ |
||||
"success", |
||||
] |
||||
} |
||||
|
||||
$RoleBadge role_badge { |
||||
role: bind template.member as <$Member>.role; |
||||
} |
||||
} |
||||
|
||||
Gtk.Label { |
||||
hexpand: true; |
||||
halign: start; |
||||
ellipsize: end; |
||||
label: bind template.member as <$Member>.user-id-string; |
||||
|
||||
styles [ |
||||
"subtitle", |
||||
] |
||||
} |
||||
} |
||||
} |
||||
@ -1,85 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="ContentMemberRow" parent="GtkBox"> |
||||
<property name="spacing">12</property> |
||||
<style> |
||||
<class name="header"/> |
||||
</style> |
||||
<child> |
||||
<object class="Avatar"> |
||||
<property name="size">32</property> |
||||
<binding name="data"> |
||||
<lookup name="avatar-data" type="Member"> |
||||
<lookup name="member">ContentMemberRow</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<property name="accessible-role">presentation</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<style> |
||||
<class name="title"/> |
||||
</style> |
||||
<child> |
||||
<object class="GtkBox"> |
||||
<property name="spacing">6</property> |
||||
<child> |
||||
<object class="GtkLabel"> |
||||
<property name="halign">start</property> |
||||
<property name="ellipsize">end</property> |
||||
<binding name="label"> |
||||
<lookup name="display-name" type="Member"> |
||||
<lookup name="member">ContentMemberRow</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<style> |
||||
<class name="title"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkImage"> |
||||
<property name="icon-name">verified-symbolic</property> |
||||
<property name="tooltip-text" translatable="yes">Identity Verified</property> |
||||
<binding name="visible"> |
||||
<lookup name="is-verified" type="User"> |
||||
<lookup name="member">ContentMemberRow</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<style> |
||||
<class name="success"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="RoleBadge" id="role_badge"> |
||||
<binding name="role"> |
||||
<lookup name="role" type="Member"> |
||||
<lookup name="member">ContentMemberRow</lookup> |
||||
</lookup> |
||||
</binding> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel"> |
||||
<property name="hexpand">True</property> |
||||
<property name="halign">start</property> |
||||
<property name="ellipsize">end</property> |
||||
<binding name="label"> |
||||
<lookup name="user-id-string" type="Member"> |
||||
<lookup name="member">ContentMemberRow</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<style> |
||||
<class name="subtitle"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,43 @@
|
||||
using Gtk 4.0; |
||||
|
||||
template $MembersPageMembershipSubpageRow: Gtk.ListBoxRow { |
||||
selectable: false; |
||||
|
||||
accessibility { |
||||
labelled-by: [ |
||||
title, |
||||
]; |
||||
} |
||||
|
||||
child: Gtk.Box { |
||||
spacing: 6; |
||||
|
||||
Gtk.Image { |
||||
valign: center; |
||||
accessible-role: presentation; |
||||
icon-name: bind template.icon-name; |
||||
|
||||
styles [ |
||||
"icon", |
||||
] |
||||
} |
||||
|
||||
Gtk.Label title { |
||||
valign: center; |
||||
hexpand: true; |
||||
xalign: 0.0; |
||||
ellipsize: end; |
||||
label: bind template.label; |
||||
} |
||||
|
||||
Gtk.Label members_count { |
||||
valign: center; |
||||
} |
||||
|
||||
Gtk.Image { |
||||
valign: center; |
||||
icon-name: "go-next-symbolic"; |
||||
accessible-role: presentation; |
||||
} |
||||
}; |
||||
} |
||||
@ -1,45 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="MembersPageMembershipSubpageRow" parent="GtkListBoxRow"> |
||||
<property name="selectable">False</property> |
||||
<accessibility> |
||||
<relation name="labelled-by">title</relation> |
||||
</accessibility> |
||||
<property name="child"> |
||||
<object class="GtkBox"> |
||||
<property name="spacing">6</property> |
||||
<child> |
||||
<object class="GtkImage"> |
||||
<property name="valign">center</property> |
||||
<property name="accessible-role">presentation</property> |
||||
<property name="icon-name" bind-source="MembersPageMembershipSubpageRow" bind-property="icon-name" bind-flags="sync-create"/> |
||||
<style> |
||||
<class name="icon"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel" id="title"> |
||||
<property name="valign">center</property> |
||||
<property name="hexpand">True</property> |
||||
<property name="xalign">0.0</property> |
||||
<property name="ellipsize">end</property> |
||||
<property name="label" bind-source="MembersPageMembershipSubpageRow" bind-property="label" bind-flags="sync-create"/> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel" id="members_count"> |
||||
<property name="valign">center</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkImage"> |
||||
<property name="valign">center</property> |
||||
<property name="icon-name">go-next-symbolic</property> |
||||
<property name="accessible-role">presentation</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,151 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $ContentMembersListView: Adw.NavigationPage { |
||||
Adw.ToolbarView { |
||||
[top] |
||||
Adw.HeaderBar { |
||||
[end] |
||||
Gtk.ToggleButton search_button { |
||||
icon-name: "system-search-symbolic"; |
||||
tooltip-text: _("Toggle Room Members Search"); |
||||
|
||||
accessibility { |
||||
label: _("Toggle Room Members Search"); |
||||
} |
||||
} |
||||
} |
||||
|
||||
[top] |
||||
Gtk.SearchBar search_bar { |
||||
search-mode-enabled: bind search_button.active no-sync-create; |
||||
|
||||
child: Adw.Clamp { |
||||
hexpand: true; |
||||
maximum-size: 750; |
||||
tightening-threshold: 550; |
||||
|
||||
accessibility { |
||||
label: _("Search for room members"); |
||||
} |
||||
|
||||
Gtk.SearchEntry search_entry { |
||||
placeholder-text: _("Search for room members"); |
||||
} |
||||
}; |
||||
} |
||||
|
||||
content: Gtk.Overlay { |
||||
Gtk.Stack stack { |
||||
transition-type: crossfade; |
||||
|
||||
Gtk.StackPage { |
||||
name: "loading"; |
||||
|
||||
child: Adw.Spinner {}; |
||||
} |
||||
|
||||
Gtk.StackPage empty_stack_page { |
||||
name: "empty"; |
||||
|
||||
child: Adw.StatusPage empty_page { |
||||
vexpand: true; |
||||
|
||||
child: Adw.Clamp { |
||||
child: Gtk.ListBox empty_listbox { |
||||
row-activated => $activate_listbox_row() swapped; |
||||
|
||||
styles [ |
||||
"boxed-list", |
||||
] |
||||
}; |
||||
}; |
||||
}; |
||||
} |
||||
|
||||
Gtk.StackPage { |
||||
name: "error"; |
||||
title: _("Error"); |
||||
|
||||
child: Adw.StatusPage error_page { |
||||
icon-name: "error-symbolic"; |
||||
title: _("Error"); |
||||
description: _("Could not load the full list of room members"); |
||||
|
||||
child: Gtk.Button { |
||||
can-shrink: true; |
||||
label: _("Try Again"); |
||||
halign: center; |
||||
clicked => $reload_members() swapped; |
||||
|
||||
styles [ |
||||
"pill", |
||||
] |
||||
}; |
||||
}; |
||||
} |
||||
|
||||
Gtk.StackPage members_stack_page { |
||||
name: "members"; |
||||
|
||||
child: Gtk.ScrolledWindow { |
||||
hexpand: true; |
||||
vexpand: true; |
||||
hscrollbar-policy: never; |
||||
propagate-natural-height: true; |
||||
|
||||
child: Adw.ClampScrollable { |
||||
margin-start: 12; |
||||
margin-end: 12; |
||||
|
||||
child: Gtk.ListView list_view { |
||||
single-click-activate: true; |
||||
tab-behavior: item; |
||||
activate => $activate_listview_row() swapped; |
||||
|
||||
factory: Gtk.BuilderListItemFactory { |
||||
template Gtk.ListItem { |
||||
selectable: false; |
||||
activatable: bind row.activatable; |
||||
|
||||
child: $ContentMemberItemRow row { |
||||
item: bind template.item; |
||||
}; |
||||
} |
||||
}; |
||||
}; |
||||
}; |
||||
}; |
||||
} |
||||
} |
||||
|
||||
[overlay] |
||||
Gtk.Button invite_button { |
||||
visible: bind template.can-invite; |
||||
valign: end; |
||||
halign: center; |
||||
margin-bottom: 24; |
||||
action-name: "details.show-subpage"; |
||||
action-target: "'invite'"; |
||||
|
||||
styles [ |
||||
"pill", |
||||
"suggested-action", |
||||
] |
||||
|
||||
child: Gtk.Box { |
||||
spacing: 6; |
||||
|
||||
Gtk.Image { |
||||
icon-name: "user-add-symbolic"; |
||||
} |
||||
|
||||
Gtk.Label { |
||||
// Translators: This is a verb. |
||||
label: _("Invite"); |
||||
} |
||||
}; |
||||
} |
||||
}; |
||||
} |
||||
} |
||||
@ -1,183 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="ContentMembersListView" parent="AdwNavigationPage"> |
||||
<child> |
||||
<object class="AdwToolbarView"> |
||||
<child type="top"> |
||||
<object class="AdwHeaderBar"> |
||||
<child type="end"> |
||||
<object class="GtkToggleButton" id="search_button"> |
||||
<property name="icon-name">system-search-symbolic</property> |
||||
<property name="tooltip-text" translatable="yes">Toggle Room Members Search</property> |
||||
<accessibility> |
||||
<property name="label" translatable="yes">Toggle Room Members Search</property> |
||||
</accessibility> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child type="top"> |
||||
<object class="GtkSearchBar" id="search_bar"> |
||||
<property name="search-mode-enabled" bind-source="search_button" bind-property="active"/> |
||||
<property name="child"> |
||||
<object class="AdwClamp"> |
||||
<property name="hexpand">True</property> |
||||
<property name="maximum-size">750</property> |
||||
<property name="tightening-threshold">550</property> |
||||
<child> |
||||
<object class="GtkSearchEntry" id="search_entry"> |
||||
<property name="placeholder-text" translatable="yes">Search for room members</property> |
||||
</object> |
||||
</child> |
||||
<accessibility> |
||||
<property name="label" translatable="yes">Search for room members</property> |
||||
</accessibility> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<property name="content"> |
||||
<object class="GtkOverlay"> |
||||
<child> |
||||
<object class="GtkStack" id="stack"> |
||||
<property name="transition-type">crossfade</property> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">loading</property> |
||||
<property name="child"> |
||||
<object class="AdwSpinner" /> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkStackPage" id="empty_stack_page"> |
||||
<property name="name">empty</property> |
||||
<property name="child"> |
||||
<object class="AdwStatusPage" id="empty_page"> |
||||
<property name="vexpand">true</property> |
||||
<property name="child"> |
||||
<object class="AdwClamp"> |
||||
<property name="child"> |
||||
<object class="GtkListBox" id="empty_listbox"> |
||||
<style> |
||||
<class name="boxed-list" /> |
||||
</style> |
||||
<signal name="row-activated" handler="activate_listbox_row" swapped="true"/> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">error</property> |
||||
<property name="title" translatable="yes">Error</property> |
||||
<property name="child"> |
||||
<object class="AdwStatusPage" id="error_page"> |
||||
<property name="icon-name">error-symbolic</property> |
||||
<property name="title" translatable="yes">Error</property> |
||||
<property name="description" translatable="yes">Could not load the full list of room members</property> |
||||
<property name="child"> |
||||
<object class="GtkButton"> |
||||
<property name="can-shrink">true</property> |
||||
<property name="label" translatable="yes">Try Again</property> |
||||
<property name="halign">center</property> |
||||
<signal name="clicked" handler="reload_members" swapped="true"/> |
||||
<style> |
||||
<class name="pill"/> |
||||
</style> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkStackPage" id="members_stack_page"> |
||||
<property name="name">members</property> |
||||
<property name="child"> |
||||
<object class="GtkScrolledWindow"> |
||||
<property name="hexpand">True</property> |
||||
<property name="vexpand">True</property> |
||||
<property name="hscrollbar-policy">never</property> |
||||
<property name="propagate-natural-height">True</property> |
||||
<property name="child"> |
||||
<object class="AdwClampScrollable"> |
||||
<property name="margin-start">12</property> |
||||
<property name="margin-end">12</property> |
||||
<property name="child"> |
||||
<object class="GtkListView" id="list_view"> |
||||
<property name="single-click-activate">True</property> |
||||
<property name="tab-behavior">item</property> |
||||
<signal name="activate" handler="activate_listview_row" swapped="true"/> |
||||
<property name="factory"> |
||||
<object class="GtkBuilderListItemFactory"> |
||||
<property name="bytes"><![CDATA[ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="GtkListItem"> |
||||
<property name="selectable">False</property> |
||||
<binding name="activatable"> |
||||
<lookup name="activatable">row</lookup> |
||||
</binding> |
||||
<property name="child"> |
||||
<object class="ContentMemberItemRow" id="row"> |
||||
<binding name="item"> |
||||
<lookup name="item">GtkListItem</lookup> |
||||
</binding> |
||||
</object> |
||||
</property> |
||||
</template> |
||||
</interface> |
||||
]]></property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child type="overlay"> |
||||
<object class="GtkButton" id="invite_button"> |
||||
<property name="visible" bind-source="ContentMembersListView" bind-property="can-invite" bind-flags="sync-create"/> |
||||
<property name="valign">end</property> |
||||
<property name="halign">center</property> |
||||
<property name="margin-bottom">24</property> |
||||
<property name="action-name">details.show-subpage</property> |
||||
<property name="action-target">'invite'</property> |
||||
<property name="child"> |
||||
<object class="GtkBox"> |
||||
<property name="spacing">6</property> |
||||
<child> |
||||
<object class="GtkImage"> |
||||
<property name="icon-name">user-add-symbolic</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel"> |
||||
<!-- Translators: This is a verb. --> |
||||
<property name="label" translatable="yes">Invite</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
<style> |
||||
<class name="pill"/> |
||||
<class name="suggested-action"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,6 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $MembersPage: Adw.NavigationPage { |
||||
Adw.NavigationView navigation_view {} |
||||
} |
||||
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="MembersPage" parent="AdwNavigationPage"> |
||||
<child> |
||||
<object class="AdwNavigationView" id="navigation_view"/> |
||||
</child> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,14 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $RoomDetails: Adw.PreferencesWindow { |
||||
title: _("Room Details"); |
||||
modal: true; |
||||
destroy-with-parent: true; |
||||
default-height: 780; |
||||
search-enabled: false; |
||||
|
||||
styles [ |
||||
"room-details", |
||||
] |
||||
} |
||||
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="RoomDetails" parent="AdwPreferencesWindow"> |
||||
<property name="title" translatable="yes">Room Details</property> |
||||
<property name="modal">True</property> |
||||
<property name="destroy_with_parent">True</property> |
||||
<property name="default-height">780</property> |
||||
<property name="search-enabled">false</property> |
||||
<style> |
||||
<class name="room-details"/> |
||||
</style> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,94 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $RoomDetailsPermissionsAddMembersSubpage: Adw.NavigationPage { |
||||
title: _("Add Custom Permissions"); |
||||
|
||||
child: Adw.ToolbarView { |
||||
[top] |
||||
Adw.HeaderBar { |
||||
[end] |
||||
Gtk.Button add_button { |
||||
label: _("_Add"); |
||||
use-underline: true; |
||||
sensitive: false; |
||||
clicked => $add_members() swapped; |
||||
|
||||
styles [ |
||||
"suggested-action", |
||||
] |
||||
} |
||||
} |
||||
|
||||
[top] |
||||
Adw.Clamp { |
||||
margin-bottom: 6; |
||||
margin-end: 30; |
||||
margin-start: 30; |
||||
margin-top: 6; |
||||
|
||||
$PillSearchEntry search_entry {} |
||||
} |
||||
|
||||
[top] |
||||
Adw.Clamp { |
||||
margin-bottom: 6; |
||||
margin-end: 30; |
||||
margin-start: 30; |
||||
margin-top: 6; |
||||
|
||||
Gtk.Box { |
||||
spacing: 12; |
||||
halign: center; |
||||
|
||||
Gtk.Label power_level_combo_label { |
||||
// Translators: value used to assign room member roles. |
||||
label: _("Assign Power Level"); |
||||
xalign: 0; |
||||
ellipsize: end; |
||||
} |
||||
|
||||
$PowerLevelSelectionComboBox power_level_combo { |
||||
accessibility { |
||||
labelled-by: [ |
||||
power_level_combo_label, |
||||
]; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
content: Gtk.Stack stack { |
||||
Gtk.StackPage { |
||||
name: "list"; |
||||
title: _("Search Results"); |
||||
|
||||
child: Gtk.ScrolledWindow { |
||||
child: Adw.ClampScrollable { |
||||
child: Gtk.ListView list_view { |
||||
margin-end: 12; |
||||
margin-start: 12; |
||||
single-click-activate: true; |
||||
tab-behavior: item; |
||||
|
||||
styles [ |
||||
"user-search-results", |
||||
] |
||||
}; |
||||
}; |
||||
}; |
||||
} |
||||
|
||||
Gtk.StackPage { |
||||
name: "no-match"; |
||||
title: _("No Matching Members Found"); |
||||
|
||||
child: Adw.StatusPage no_matching_page { |
||||
icon-name: "system-search-symbolic"; |
||||
title: _("No Matching Members Found"); |
||||
description: _("No room members matching the search were found"); |
||||
}; |
||||
} |
||||
}; |
||||
}; |
||||
} |
||||
@ -1,106 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="RoomDetailsPermissionsAddMembersSubpage" parent="AdwNavigationPage"> |
||||
<property name="title" translatable="yes">Add Custom Permissions</property> |
||||
<property name="child"> |
||||
<object class="AdwToolbarView"> |
||||
<child type="top"> |
||||
<object class="AdwHeaderBar"> |
||||
<child type="end"> |
||||
<object class="GtkButton" id="add_button"> |
||||
<property name="label" translatable="yes">_Add</property> |
||||
<property name="use-underline">True</property> |
||||
<property name="sensitive">False</property> |
||||
<signal name="clicked" handler="add_members" swapped="yes" /> |
||||
<style> |
||||
<class name="suggested-action"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child type="top"> |
||||
<object class="AdwClamp"> |
||||
<property name="margin-bottom">6</property> |
||||
<property name="margin-end">30</property> |
||||
<property name="margin-start">30</property> |
||||
<property name="margin-top">6</property> |
||||
<child> |
||||
<object class="PillSearchEntry" id="search_entry" /> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child type="top"> |
||||
<object class="AdwClamp"> |
||||
<property name="margin-bottom">6</property> |
||||
<property name="margin-end">30</property> |
||||
<property name="margin-start">30</property> |
||||
<property name="margin-top">6</property> |
||||
<child> |
||||
<object class="GtkBox"> |
||||
<property name="spacing">12</property> |
||||
<property name="halign">center</property> |
||||
<child> |
||||
<object class="GtkLabel" id="power_level_combo_label"> |
||||
<property name="label" translatable="yes" comments="Translators: value used to assign room member roles">Assign Power Level</property> |
||||
<property name="xalign">0</property> |
||||
<property name="ellipsize">end</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="PowerLevelSelectionComboBox" id="power_level_combo"> |
||||
<accessibility> |
||||
<relation name="labelled-by">power_level_combo_label</relation> |
||||
</accessibility> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<property name="content"> |
||||
<object class="GtkStack" id="stack"> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">list</property> |
||||
<property name="title" translatable="yes">Search Results</property> |
||||
<property name="child"> |
||||
<object class="GtkScrolledWindow"> |
||||
<property name="child"> |
||||
<object class="AdwClampScrollable"> |
||||
<property name="child"> |
||||
<object class="GtkListView" id="list_view"> |
||||
<property name="margin-end">12</property> |
||||
<property name="margin-start">12</property> |
||||
<property name="single-click-activate">True</property> |
||||
<property name="tab-behavior">item</property> |
||||
<style> |
||||
<class name="user-search-results"/> |
||||
</style> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">no-match</property> |
||||
<property name="title" translatable="yes">No Matching Members Found</property> |
||||
<property name="child"> |
||||
<object class="AdwStatusPage" id="no_matching_page"> |
||||
<property name="icon-name">system-search-symbolic</property> |
||||
<property name="title" translatable="yes">No Matching Members Found</property> |
||||
<property name="description" translatable="yes">No room members matching the search were found</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,74 @@
|
||||
using Gtk 4.0; |
||||
|
||||
template $RoomDetailsPermissionsMemberRow: Box { |
||||
focusable: true; |
||||
spacing: 12; |
||||
|
||||
$Avatar { |
||||
size: 32; |
||||
data: bind template.member as <$RoomDetailsPermissionsMemberPowerLevel>.user as <$User>.avatar-data; |
||||
accessible-role: "presentation"; |
||||
} |
||||
|
||||
Gtk.Box { |
||||
orientation: vertical; |
||||
|
||||
Gtk.Label title { |
||||
halign: start; |
||||
ellipsize: end; |
||||
label: bind template.member as <$RoomDetailsPermissionsMemberPowerLevel>.user as <$User>.display-name; |
||||
|
||||
styles [ |
||||
"title", |
||||
] |
||||
} |
||||
|
||||
Gtk.Label subtitle { |
||||
hexpand: true; |
||||
halign: start; |
||||
ellipsize: end; |
||||
label: bind template.member as <$RoomDetailsPermissionsMemberPowerLevel>.user as <$User>.user-id-string; |
||||
|
||||
styles [ |
||||
"subtitle", |
||||
] |
||||
} |
||||
} |
||||
|
||||
Gtk.Box suffixes { |
||||
Gtk.Box selected_box { |
||||
accessible-role: group; |
||||
spacing: 12; |
||||
margin-end: 6; |
||||
|
||||
Gtk.Label selected_level_label {} |
||||
|
||||
$RoleBadge selected_role_badge { |
||||
valign: center; |
||||
role: bind template.member as <$RoomDetailsPermissionsMemberPowerLevel>.role; |
||||
} |
||||
} |
||||
|
||||
Gtk.Box arrow_box { |
||||
valign: center; |
||||
|
||||
Gtk.Image { |
||||
icon-name: "pan-down-symbolic"; |
||||
accessible-role: presentation; |
||||
|
||||
styles [ |
||||
"dropdown-arrow", |
||||
] |
||||
} |
||||
|
||||
$PowerLevelSelectionPopover popover { |
||||
notify::visible => $popover_visible() swapped; |
||||
notify::selected-power-level => $power_level_changed() swapped; |
||||
} |
||||
} |
||||
} |
||||
|
||||
Gtk.GestureClick { |
||||
released => $activate_row() swapped; |
||||
} |
||||
} |
||||
@ -1,107 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="RoomDetailsPermissionsMemberRow" parent="GtkBox"> |
||||
<property name="focusable">True</property> |
||||
<property name="spacing">12</property> |
||||
<child> |
||||
<object class="Avatar"> |
||||
<property name="size">32</property> |
||||
<binding name="data"> |
||||
<lookup name="avatar-data"> |
||||
<lookup name="user"> |
||||
<lookup name="member">RoomDetailsPermissionsMemberRow</lookup> |
||||
</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<property name="accessible-role">presentation</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<child> |
||||
<object class="GtkLabel" id="title"> |
||||
<property name="halign">start</property> |
||||
<property name="ellipsize">end</property> |
||||
<binding name="label"> |
||||
<lookup name="display-name"> |
||||
<lookup name="user"> |
||||
<lookup name="member">RoomDetailsPermissionsMemberRow</lookup> |
||||
</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<style> |
||||
<class name="title"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel" id="subtitle"> |
||||
<property name="hexpand">True</property> |
||||
<property name="halign">start</property> |
||||
<property name="ellipsize">end</property> |
||||
<binding name="label"> |
||||
<lookup name="user-id-string"> |
||||
<lookup name="user"> |
||||
<lookup name="member">RoomDetailsPermissionsMemberRow</lookup> |
||||
</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<style> |
||||
<class name="subtitle"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkBox" id="suffixes"> |
||||
<child> |
||||
<object class="GtkBox" id="selected_box"> |
||||
<property name="accessible-role">group</property> |
||||
<property name="spacing">12</property> |
||||
<property name="margin-end">6</property> |
||||
<child> |
||||
<object class="GtkLabel" id="selected_level_label" /> |
||||
</child> |
||||
<child> |
||||
<object class="RoleBadge" id="selected_role_badge"> |
||||
<property name="valign">center</property> |
||||
<binding name="role"> |
||||
<lookup name="role" type="RoomDetailsPermissionsMemberPowerLevel"> |
||||
<lookup name="member">RoomDetailsPermissionsMemberRow</lookup> |
||||
</lookup> |
||||
</binding> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkBox" id="arrow_box"> |
||||
<property name="valign">center</property> |
||||
<child> |
||||
<object class="GtkImage"> |
||||
<property name="icon_name">pan-down-symbolic</property> |
||||
<property name="accessible-role">presentation</property> |
||||
<style> |
||||
<class name="dropdown-arrow" /> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="PowerLevelSelectionPopover" id="popover"> |
||||
<signal name="notify::visible" handler="popover_visible" swapped="true" /> |
||||
<signal name="notify::selected-power-level" handler="power_level_changed" swapped="true" /> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkGestureClick"> |
||||
<signal name="released" handler="activate_row" swapped="yes"/> |
||||
</object> |
||||
</child> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,109 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $RoomDetailsPermissionsMembersSubpage: Adw.NavigationPage { |
||||
// Translators: value used to assign room member roles. |
||||
title: _("Members With Assigned Power Levels"); |
||||
|
||||
Adw.ToolbarView { |
||||
[top] |
||||
Adw.HeaderBar { |
||||
[end] |
||||
Gtk.ToggleButton search_button { |
||||
icon-name: "system-search-symbolic"; |
||||
tooltip-text: _("Toggle Room Members Search"); |
||||
|
||||
accessibility { |
||||
label: _("Toggle Room Members Search"); |
||||
} |
||||
} |
||||
} |
||||
|
||||
[top] |
||||
Gtk.SearchBar search_bar { |
||||
search-mode-enabled: bind search_button.active no-sync-create; |
||||
|
||||
child: Adw.Clamp { |
||||
hexpand: true; |
||||
maximum-size: 750; |
||||
tightening-threshold: 550; |
||||
|
||||
accessibility { |
||||
label: _("Search for room members"); |
||||
} |
||||
|
||||
Gtk.SearchEntry search_entry { |
||||
placeholder-text: _("Search for room members"); |
||||
} |
||||
}; |
||||
} |
||||
|
||||
content: Gtk.Overlay { |
||||
Gtk.Stack stack { |
||||
transition-type: crossfade; |
||||
|
||||
Gtk.StackPage { |
||||
name: "empty"; |
||||
|
||||
child: Adw.StatusPage empty_page { |
||||
vexpand: true; |
||||
icon-name: "users-symbolic"; |
||||
title: _("No Room Members"); |
||||
}; |
||||
} |
||||
|
||||
Gtk.StackPage { |
||||
name: "members"; |
||||
|
||||
child: ScrolledWindow { |
||||
hexpand: true; |
||||
vexpand: true; |
||||
hscrollbar-policy: never; |
||||
propagate-natural-height: true; |
||||
|
||||
child: Adw.ClampScrollable { |
||||
margin-start: 12; |
||||
margin-end: 12; |
||||
|
||||
child: Gtk.ListView list_view { |
||||
single-click-activate: true; |
||||
tab-behavior: item; |
||||
|
||||
styles [ |
||||
"permissions-member-list", |
||||
] |
||||
}; |
||||
}; |
||||
}; |
||||
} |
||||
} |
||||
|
||||
[overlay] |
||||
Gtk.Button add_button { |
||||
visible: bind template.editable; |
||||
valign: end; |
||||
halign: center; |
||||
margin-bottom: 24; |
||||
action-name: "navigation.push"; |
||||
action-target: "'add-members'"; |
||||
|
||||
styles [ |
||||
"pill", |
||||
"suggested-action", |
||||
] |
||||
|
||||
child: Gtk.Box { |
||||
spacing: 6; |
||||
|
||||
Gtk.Image { |
||||
icon-name: "user-add-symbolic"; |
||||
} |
||||
|
||||
Gtk.Label { |
||||
label: _("Add"); |
||||
} |
||||
}; |
||||
} |
||||
}; |
||||
} |
||||
} |
||||
@ -1,121 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="RoomDetailsPermissionsMembersSubpage" parent="AdwNavigationPage"> |
||||
<property name="title" translatable="yes" comments="Translators: value used to assign room member roles">Members With Assigned Power Levels</property> |
||||
<child> |
||||
<object class="AdwToolbarView"> |
||||
<child type="top"> |
||||
<object class="AdwHeaderBar"> |
||||
<child type="end"> |
||||
<object class="GtkToggleButton" id="search_button"> |
||||
<property name="icon-name">system-search-symbolic</property> |
||||
<property name="tooltip-text" translatable="yes">Toggle Room Members Search</property> |
||||
<accessibility> |
||||
<property name="label" translatable="yes">Toggle Room Members Search</property> |
||||
</accessibility> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child type="top"> |
||||
<object class="GtkSearchBar" id="search_bar"> |
||||
<property name="search-mode-enabled" bind-source="search_button" bind-property="active"/> |
||||
<property name="child"> |
||||
<object class="AdwClamp"> |
||||
<property name="hexpand">True</property> |
||||
<property name="maximum-size">750</property> |
||||
<property name="tightening-threshold">550</property> |
||||
<child> |
||||
<object class="GtkSearchEntry" id="search_entry"> |
||||
<property name="placeholder-text" translatable="yes">Search for room members</property> |
||||
</object> |
||||
</child> |
||||
<accessibility> |
||||
<property name="label" translatable="yes">Search for room members</property> |
||||
</accessibility> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<property name="content"> |
||||
<object class="GtkOverlay"> |
||||
<child> |
||||
<object class="GtkStack" id="stack"> |
||||
<property name="transition-type">crossfade</property> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">empty</property> |
||||
<property name="child"> |
||||
<object class="AdwStatusPage" id="empty_page"> |
||||
<property name="vexpand">true</property> |
||||
<property name="icon-name">users-symbolic</property> |
||||
<property name="title" translatable="yes">No Room Members</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkStackPage"> |
||||
<property name="name">members</property> |
||||
<property name="child"> |
||||
<object class="GtkScrolledWindow"> |
||||
<property name="hexpand">True</property> |
||||
<property name="vexpand">True</property> |
||||
<property name="hscrollbar-policy">never</property> |
||||
<property name="propagate-natural-height">True</property> |
||||
<property name="child"> |
||||
<object class="AdwClampScrollable"> |
||||
<property name="margin-start">12</property> |
||||
<property name="margin-end">12</property> |
||||
<property name="child"> |
||||
<object class="GtkListView" id="list_view"> |
||||
<property name="single-click-activate">True</property> |
||||
<property name="tab-behavior">item</property> |
||||
<style> |
||||
<class name="permissions-member-list" /> |
||||
</style> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child type="overlay"> |
||||
<object class="GtkButton" id="add_button"> |
||||
<property name="visible" bind-source="RoomDetailsPermissionsMembersSubpage" bind-property="editable" bind-flags="sync-create"/> |
||||
<property name="valign">end</property> |
||||
<property name="halign">center</property> |
||||
<property name="margin-bottom">24</property> |
||||
<property name="action-name">navigation.push</property> |
||||
<property name="action-target">'add-members'</property> |
||||
<property name="child"> |
||||
<object class="GtkBox"> |
||||
<property name="spacing">6</property> |
||||
<child> |
||||
<object class="GtkImage"> |
||||
<property name="icon-name">user-add-symbolic</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel"> |
||||
<property name="label" translatable="yes">Add</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
<style> |
||||
<class name="pill"/> |
||||
<class name="suggested-action"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,300 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $RoomDetailsPermissionsSubpage: Adw.NavigationPage { |
||||
title: _("Permissions"); |
||||
|
||||
child: Adw.NavigationView navigation { |
||||
Adw.NavigationPage { |
||||
title: _("Permissions"); |
||||
tag: "permissions"; |
||||
|
||||
child: Adw.ToolbarView { |
||||
[top] |
||||
Adw.HeaderBar { |
||||
show-back-button: false; |
||||
|
||||
[start] |
||||
Gtk.Button back_button { |
||||
icon-name: "go-previous-symbolic"; |
||||
tooltip-text: _("Back"); |
||||
clicked => $go_back() swapped; |
||||
|
||||
styles [ |
||||
"back", |
||||
] |
||||
} |
||||
|
||||
[end] |
||||
$LoadingButton save_button { |
||||
visible: bind template.editable; |
||||
sensitive: bind template.changed; |
||||
label: _("_Save"); |
||||
use-underline: true; |
||||
clicked => $save() swapped; |
||||
|
||||
styles [ |
||||
"suggested-action", |
||||
] |
||||
} |
||||
} |
||||
|
||||
content: Adw.PreferencesPage { |
||||
Adw.PreferencesGroup room_actions_group { |
||||
title: _("Room Actions"); |
||||
// Translators: value used to assign room member roles. |
||||
description: _("Power level required to perform different actions in the room"); |
||||
|
||||
$PowerLevelSelectionRow messages_row { |
||||
title: _("Send Messages"); |
||||
use-subtitle: true; |
||||
permissions: bind template.permissions; |
||||
selected-power-level-changed => $value_changed() swapped; |
||||
|
||||
styles [ |
||||
"property", |
||||
] |
||||
} |
||||
|
||||
$PowerLevelSelectionRow redact_own_row { |
||||
title: _("Remove Own Messages"); |
||||
use-subtitle: true; |
||||
permissions: bind template.permissions; |
||||
selected-power-level-changed => $redact_own_changed() swapped; |
||||
|
||||
styles [ |
||||
"property", |
||||
] |
||||
} |
||||
|
||||
$PowerLevelSelectionRow redact_others_row { |
||||
title: _("Remove Messages of Other Members"); |
||||
use-subtitle: true; |
||||
permissions: bind template.permissions; |
||||
selected-power-level-changed => $redact_others_changed() swapped; |
||||
|
||||
styles [ |
||||
"property", |
||||
] |
||||
} |
||||
|
||||
$PowerLevelSelectionRow notify_room_row { |
||||
title: _("Notify Entire Room"); |
||||
use-subtitle: true; |
||||
permissions: bind template.permissions; |
||||
selected-power-level-changed => $value_changed() swapped; |
||||
|
||||
styles [ |
||||
"property", |
||||
] |
||||
} |
||||
|
||||
$PowerLevelSelectionRow state_row { |
||||
title: _("Change Room Settings"); |
||||
use-subtitle: true; |
||||
permissions: bind template.permissions; |
||||
selected-power-level-changed => $state_default_changed() swapped; |
||||
|
||||
styles [ |
||||
"property", |
||||
] |
||||
} |
||||
|
||||
$PowerLevelSelectionRow name_row { |
||||
title: _("Change Room Name"); |
||||
use-subtitle: true; |
||||
permissions: bind template.permissions; |
||||
selected-power-level-changed => $value_changed() swapped; |
||||
|
||||
styles [ |
||||
"property", |
||||
] |
||||
} |
||||
|
||||
$PowerLevelSelectionRow topic_row { |
||||
title: _("Change Room Description"); |
||||
use-subtitle: true; |
||||
permissions: bind template.permissions; |
||||
selected-power-level-changed => $value_changed() swapped; |
||||
|
||||
styles [ |
||||
"property", |
||||
] |
||||
} |
||||
|
||||
$PowerLevelSelectionRow avatar_row { |
||||
title: _("Change Room Avatar"); |
||||
use-subtitle: true; |
||||
permissions: bind template.permissions; |
||||
selected-power-level-changed => $value_changed() swapped; |
||||
|
||||
styles [ |
||||
"property", |
||||
] |
||||
} |
||||
|
||||
$PowerLevelSelectionRow aliases_row { |
||||
title: _("Change Addresses"); |
||||
use-subtitle: true; |
||||
permissions: bind template.permissions; |
||||
selected-power-level-changed => $value_changed() swapped; |
||||
|
||||
styles [ |
||||
"property", |
||||
] |
||||
} |
||||
|
||||
$PowerLevelSelectionRow history_visibility_row { |
||||
title: _("Change Who Can Read History"); |
||||
use-subtitle: true; |
||||
permissions: bind template.permissions; |
||||
selected-power-level-changed => $value_changed() swapped; |
||||
|
||||
styles [ |
||||
"property", |
||||
] |
||||
} |
||||
|
||||
$PowerLevelSelectionRow encryption_row { |
||||
title: _("Enable Encryption"); |
||||
use-subtitle: true; |
||||
permissions: bind template.permissions; |
||||
selected-power-level-changed => $value_changed() swapped; |
||||
|
||||
styles [ |
||||
"property", |
||||
] |
||||
} |
||||
|
||||
$PowerLevelSelectionRow power_levels_row { |
||||
title: _("Change Permissions"); |
||||
use-subtitle: true; |
||||
permissions: bind template.permissions; |
||||
selected-power-level-changed => $value_changed() swapped; |
||||
|
||||
styles [ |
||||
"property", |
||||
] |
||||
} |
||||
|
||||
$PowerLevelSelectionRow server_acl_row { |
||||
title: _("Change Server Access Control List"); |
||||
use-subtitle: true; |
||||
permissions: bind template.permissions; |
||||
selected-power-level-changed => $value_changed() swapped; |
||||
|
||||
styles [ |
||||
"property", |
||||
] |
||||
} |
||||
|
||||
$PowerLevelSelectionRow upgrade_row { |
||||
title: _("Upgrade Room"); |
||||
use-subtitle: true; |
||||
permissions: bind template.permissions; |
||||
selected-power-level-changed => $value_changed() swapped; |
||||
|
||||
styles [ |
||||
"property", |
||||
] |
||||
} |
||||
} |
||||
|
||||
Adw.PreferencesGroup member_actions_group { |
||||
title: _("Member Actions"); |
||||
// Translators: value used to assign room member roles. |
||||
description: _("Power level required to perform different actions on room members"); |
||||
|
||||
$PowerLevelSelectionRow invite_row { |
||||
// Translators: This is a verb. |
||||
title: _("Invite"); |
||||
use-subtitle: true; |
||||
permissions: bind template.permissions; |
||||
selected-power-level-changed => $value_changed() swapped; |
||||
|
||||
styles [ |
||||
"property", |
||||
] |
||||
} |
||||
|
||||
$PowerLevelSelectionRow kick_row { |
||||
// Translators: As in, 'Kick room member'. |
||||
title: _("Kick"); |
||||
use-subtitle: true; |
||||
permissions: bind template.permissions; |
||||
selected-power-level-changed => $value_changed() swapped; |
||||
|
||||
styles [ |
||||
"property", |
||||
] |
||||
} |
||||
|
||||
$PowerLevelSelectionRow ban_row { |
||||
// Translators: As in, 'Ban room member'. |
||||
title: _("Ban"); |
||||
use-subtitle: true; |
||||
permissions: bind template.permissions; |
||||
selected-power-level-changed => $value_changed() swapped; |
||||
|
||||
styles [ |
||||
"property", |
||||
] |
||||
} |
||||
} |
||||
|
||||
Adw.PreferencesGroup members_group { |
||||
// Translators: value used to assign room member roles. |
||||
title: _("Members Power Levels"); |
||||
// Translators: value used to assign room member roles. |
||||
description: _("Power levels defined for all members of the room"); |
||||
|
||||
Adw.SpinRow members_default_spin_row { |
||||
// Translators: value used to assign room member roles. |
||||
title: _("Default Power Level"); |
||||
numeric: true; |
||||
|
||||
adjustment: Gtk.Adjustment members_default_adjustment { |
||||
lower: -9007199254740991; |
||||
page-increment: 10; |
||||
step-increment: 1; |
||||
notify::value => $value_changed() swapped; |
||||
}; |
||||
} |
||||
|
||||
Adw.ActionRow members_default_text_row { |
||||
selectable: false; |
||||
// Translators: value used to assign room member roles. |
||||
title: _("Default Power Level"); |
||||
|
||||
accessibility { |
||||
described-by: [ |
||||
members_default_label, |
||||
]; |
||||
} |
||||
|
||||
Gtk.Label members_default_label { |
||||
valign: center; |
||||
} |
||||
} |
||||
|
||||
$ButtonCountRow members_privileged_button { |
||||
// Translators: value used to assign room member roles. |
||||
title: _("Members With Assigned Power Levels"); |
||||
action-name: "navigation.push"; |
||||
action-target: "'members'"; |
||||
} |
||||
} |
||||
}; |
||||
}; |
||||
} |
||||
|
||||
$RoomDetailsPermissionsMembersSubpage members_subpage { |
||||
tag: "members"; |
||||
editable: bind template.editable; |
||||
} |
||||
|
||||
$RoomDetailsPermissionsAddMembersSubpage add_members_subpage { |
||||
tag: "add-members"; |
||||
} |
||||
}; |
||||
} |
||||
@ -1,306 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="RoomDetailsPermissionsSubpage" parent="AdwNavigationPage"> |
||||
<property name="title" translatable="yes">Permissions</property> |
||||
<property name="child"> |
||||
<object class="AdwNavigationView" id="navigation"> |
||||
<child> |
||||
<object class="AdwNavigationPage"> |
||||
<property name="title" translatable="yes">Permissions</property> |
||||
<property name="tag">permissions</property> |
||||
<property name="child"> |
||||
<object class="AdwToolbarView"> |
||||
<child type="top"> |
||||
<object class="AdwHeaderBar"> |
||||
<property name="show-back-button">False</property> |
||||
<child type="start"> |
||||
<object class="GtkButton" id="back_button"> |
||||
<property name="icon-name">go-previous-symbolic</property> |
||||
<property name="tooltip-text" translatable="yes">Back</property> |
||||
<signal name="clicked" handler="go_back" swapped="yes"/> |
||||
<style> |
||||
<class name="back"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child type="end"> |
||||
<object class="LoadingButton" id="save_button"> |
||||
<property name="visible" bind-source="RoomDetailsPermissionsSubpage" bind-property="editable" bind-flags="sync-create" /> |
||||
<property name="sensitive" bind-source="RoomDetailsPermissionsSubpage" bind-property="changed" bind-flags="sync-create" /> |
||||
<property name="label" translatable="yes">_Save</property> |
||||
<property name="use-underline">True</property> |
||||
<signal name="clicked" handler="save" swapped="yes"/> |
||||
<style> |
||||
<class name="suggested-action"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<property name="content"> |
||||
<object class="AdwPreferencesPage"> |
||||
<child> |
||||
<object class="AdwPreferencesGroup" id="room_actions_group"> |
||||
<property name="title" translatable="yes">Room Actions</property> |
||||
<property name="description" translatable="yes" comments="Translators: value used to assign room member roles">Power level required to perform different actions in the room</property> |
||||
<child> |
||||
<object class="PowerLevelSelectionRow" id="messages_row"> |
||||
<property name="title" translatable="yes">Send Messages</property> |
||||
<property name="use-subtitle">True</property> |
||||
<property name="permissions" bind-source="RoomDetailsPermissionsSubpage" bind-property="permissions" bind-flags="sync-create"/> |
||||
<signal name="selected-power-level-changed" handler="value_changed" swapped="yes"/> |
||||
<style> |
||||
<class name="property"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="PowerLevelSelectionRow" id="redact_own_row"> |
||||
<property name="title" translatable="yes">Remove Own Messages</property> |
||||
<property name="use-subtitle">True</property> |
||||
<property name="permissions" bind-source="RoomDetailsPermissionsSubpage" bind-property="permissions" bind-flags="sync-create"/> |
||||
<signal name="selected-power-level-changed" handler="redact_own_changed" swapped="yes"/> |
||||
<style> |
||||
<class name="property"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="PowerLevelSelectionRow" id="redact_others_row"> |
||||
<property name="title" translatable="yes">Remove Messages of Other Members</property> |
||||
<property name="use-subtitle">True</property> |
||||
<property name="permissions" bind-source="RoomDetailsPermissionsSubpage" bind-property="permissions" bind-flags="sync-create"/> |
||||
<signal name="selected-power-level-changed" handler="redact_others_changed" swapped="yes"/> |
||||
<style> |
||||
<class name="property"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="PowerLevelSelectionRow" id="notify_room_row"> |
||||
<property name="title" translatable="yes">Notify Entire Room</property> |
||||
<property name="use-subtitle">True</property> |
||||
<property name="permissions" bind-source="RoomDetailsPermissionsSubpage" bind-property="permissions" bind-flags="sync-create"/> |
||||
<signal name="selected-power-level-changed" handler="value_changed" swapped="yes"/> |
||||
<style> |
||||
<class name="property"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="PowerLevelSelectionRow" id="state_row"> |
||||
<property name="title" translatable="yes">Change Room Settings</property> |
||||
<property name="use-subtitle">True</property> |
||||
<property name="permissions" bind-source="RoomDetailsPermissionsSubpage" bind-property="permissions" bind-flags="sync-create"/> |
||||
<signal name="selected-power-level-changed" handler="state_default_changed" swapped="yes"/> |
||||
<style> |
||||
<class name="property"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="PowerLevelSelectionRow" id="name_row"> |
||||
<property name="title" translatable="yes">Change Room Name</property> |
||||
<property name="use-subtitle">True</property> |
||||
<property name="permissions" bind-source="RoomDetailsPermissionsSubpage" bind-property="permissions" bind-flags="sync-create"/> |
||||
<signal name="selected-power-level-changed" handler="value_changed" swapped="yes"/> |
||||
<style> |
||||
<class name="property"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="PowerLevelSelectionRow" id="topic_row"> |
||||
<property name="title" translatable="yes">Change Room Description</property> |
||||
<property name="use-subtitle">True</property> |
||||
<property name="permissions" bind-source="RoomDetailsPermissionsSubpage" bind-property="permissions" bind-flags="sync-create"/> |
||||
<signal name="selected-power-level-changed" handler="value_changed" swapped="yes"/> |
||||
<style> |
||||
<class name="property"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="PowerLevelSelectionRow" id="avatar_row"> |
||||
<property name="title" translatable="yes">Change Room Avatar</property> |
||||
<property name="use-subtitle">True</property> |
||||
<property name="permissions" bind-source="RoomDetailsPermissionsSubpage" bind-property="permissions" bind-flags="sync-create"/> |
||||
<signal name="selected-power-level-changed" handler="value_changed" swapped="yes"/> |
||||
<style> |
||||
<class name="property"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="PowerLevelSelectionRow" id="aliases_row"> |
||||
<property name="title" translatable="yes">Change Addresses</property> |
||||
<property name="use-subtitle">True</property> |
||||
<property name="permissions" bind-source="RoomDetailsPermissionsSubpage" bind-property="permissions" bind-flags="sync-create"/> |
||||
<signal name="selected-power-level-changed" handler="value_changed" swapped="yes"/> |
||||
<style> |
||||
<class name="property"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="PowerLevelSelectionRow" id="history_visibility_row"> |
||||
<property name="title" translatable="yes">Change Who Can Read History</property> |
||||
<property name="use-subtitle">True</property> |
||||
<property name="permissions" bind-source="RoomDetailsPermissionsSubpage" bind-property="permissions" bind-flags="sync-create"/> |
||||
<signal name="selected-power-level-changed" handler="value_changed" swapped="yes"/> |
||||
<style> |
||||
<class name="property"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="PowerLevelSelectionRow" id="encryption_row"> |
||||
<property name="title" translatable="yes">Enable Encryption</property> |
||||
<property name="use-subtitle">True</property> |
||||
<property name="permissions" bind-source="RoomDetailsPermissionsSubpage" bind-property="permissions" bind-flags="sync-create"/> |
||||
<signal name="selected-power-level-changed" handler="value_changed" swapped="yes"/> |
||||
<style> |
||||
<class name="property"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="PowerLevelSelectionRow" id="power_levels_row"> |
||||
<property name="title" translatable="yes">Change Permissions</property> |
||||
<property name="use-subtitle">True</property> |
||||
<property name="permissions" bind-source="RoomDetailsPermissionsSubpage" bind-property="permissions" bind-flags="sync-create"/> |
||||
<signal name="selected-power-level-changed" handler="value_changed" swapped="yes"/> |
||||
<style> |
||||
<class name="property"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="PowerLevelSelectionRow" id="server_acl_row"> |
||||
<property name="title" translatable="yes">Change Server Access Control List</property> |
||||
<property name="use-subtitle">True</property> |
||||
<property name="permissions" bind-source="RoomDetailsPermissionsSubpage" bind-property="permissions" bind-flags="sync-create"/> |
||||
<signal name="selected-power-level-changed" handler="value_changed" swapped="yes"/> |
||||
<style> |
||||
<class name="property"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="PowerLevelSelectionRow" id="upgrade_row"> |
||||
<property name="title" translatable="yes">Upgrade Room</property> |
||||
<property name="use-subtitle">True</property> |
||||
<property name="permissions" bind-source="RoomDetailsPermissionsSubpage" bind-property="permissions" bind-flags="sync-create"/> |
||||
<signal name="selected-power-level-changed" handler="value_changed" swapped="yes"/> |
||||
<style> |
||||
<class name="property"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="AdwPreferencesGroup" id="member_actions_group"> |
||||
<property name="title" translatable="yes">Member Actions</property> |
||||
<property name="description" translatable="yes" comments="Translators: value used to assign room member roles">Power level required to perform different actions on room members</property> |
||||
<child> |
||||
<object class="PowerLevelSelectionRow" id="invite_row"> |
||||
<!-- Translators: This is a verb. --> |
||||
<property name="title" translatable="yes">Invite</property> |
||||
<property name="use-subtitle">True</property> |
||||
<property name="permissions" bind-source="RoomDetailsPermissionsSubpage" bind-property="permissions" bind-flags="sync-create"/> |
||||
<signal name="selected-power-level-changed" handler="value_changed" swapped="yes"/> |
||||
<style> |
||||
<class name="property"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="PowerLevelSelectionRow" id="kick_row"> |
||||
<!-- // Translators: As in, 'Kick room member'. --> |
||||
<property name="title" translatable="yes">Kick</property> |
||||
<property name="use-subtitle">True</property> |
||||
<property name="permissions" bind-source="RoomDetailsPermissionsSubpage" bind-property="permissions" bind-flags="sync-create"/> |
||||
<signal name="selected-power-level-changed" handler="value_changed" swapped="yes"/> |
||||
<style> |
||||
<class name="property"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="PowerLevelSelectionRow" id="ban_row"> |
||||
<!-- Translators: As in, 'Ban room member'. --> |
||||
<property name="title" translatable="yes">Ban</property> |
||||
<property name="use-subtitle">True</property> |
||||
<property name="permissions" bind-source="RoomDetailsPermissionsSubpage" bind-property="permissions" bind-flags="sync-create"/> |
||||
<signal name="selected-power-level-changed" handler="value_changed" swapped="yes"/> |
||||
<style> |
||||
<class name="property"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="AdwPreferencesGroup" id="members_group"> |
||||
<property name="title" translatable="yes" comments="Translators: value used to assign room member roles">Members Power Levels</property> |
||||
<property name="description" translatable="yes" comments="Translators: value used to assign room member roles">Power levels defined for all members of the room</property> |
||||
<child> |
||||
<object class="AdwSpinRow" id="members_default_spin_row"> |
||||
<property name="title" translatable="yes" comments="Translators: value used to assign room member roles">Default Power Level</property> |
||||
<property name="numeric">True</property> |
||||
<property name="adjustment"> |
||||
<object class="GtkAdjustment" id="members_default_adjustment"> |
||||
<!-- js_int::MIN_SAFE_INT --> |
||||
<property name="lower">-9007199254740991</property> |
||||
<property name="page-increment">10</property> |
||||
<property name="step-increment">1</property> |
||||
<signal name="notify::value" handler="value_changed" swapped="yes"/> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="AdwActionRow" id="members_default_text_row"> |
||||
<property name="selectable">False</property> |
||||
<property name="title" translatable="yes" comments="Translators: value used to assign room member roles">Default Power Level</property> |
||||
<accessibility> |
||||
<relation name="described-by">members_default_label</relation> |
||||
</accessibility> |
||||
<child> |
||||
<object class="GtkLabel" id="members_default_label"> |
||||
<property name="valign">center</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="ButtonCountRow" id="members_privileged_button"> |
||||
<property name="title" translatable="yes" comments="Translators: value used to assign room member roles">Members With Assigned Power Levels</property> |
||||
<property name="action-name">navigation.push</property> |
||||
<property name="action-target">'members'</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="RoomDetailsPermissionsMembersSubpage" id="members_subpage"> |
||||
<property name="tag">members</property> |
||||
<property name="editable" bind-source="RoomDetailsPermissionsSubpage" bind-property="editable" bind-flags="sync-create" /> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="RoomDetailsPermissionsAddMembersSubpage" id="add_members_subpage"> |
||||
<property name="tag">add-members</property> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,59 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $RoomDetailsPermissionsSelectMemberRow: Adw.Bin { |
||||
margin-top: 12; |
||||
margin-bottom: 12; |
||||
margin-start: 12; |
||||
margin-end: 12; |
||||
accessible-role: checkbox; |
||||
focusable: true; |
||||
|
||||
child: Gtk.Box header { |
||||
spacing: 12; |
||||
|
||||
styles [ |
||||
"header", |
||||
] |
||||
|
||||
$Avatar { |
||||
size: 32; |
||||
data: bind template.member as <$Member>.avatar-data; |
||||
accessible-role: presentation; |
||||
} |
||||
|
||||
Gtk.Box { |
||||
orientation: vertical; |
||||
|
||||
styles [ |
||||
"title", |
||||
] |
||||
|
||||
Gtk.Label { |
||||
halign: start; |
||||
ellipsize: end; |
||||
label: bind template.member as <$Member>.display-name; |
||||
|
||||
styles [ |
||||
"title", |
||||
] |
||||
} |
||||
|
||||
Gtk.Label { |
||||
hexpand: true; |
||||
halign: start; |
||||
ellipsize: end; |
||||
label: bind template.member as <$Member>.user-id-string; |
||||
|
||||
styles [ |
||||
"subtitle", |
||||
] |
||||
} |
||||
} |
||||
|
||||
Gtk.CheckButton { |
||||
focusable: false; |
||||
active: bind template.selected bidirectional; |
||||
} |
||||
}; |
||||
} |
||||
@ -1,73 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="RoomDetailsPermissionsSelectMemberRow" parent="AdwBin"> |
||||
<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="accessible-role">checkbox</property> |
||||
<property name="focusable">True</property> |
||||
<property name="child"> |
||||
<object class="GtkBox" id="header"> |
||||
<property name="spacing">12</property> |
||||
<style> |
||||
<class name="header"/> |
||||
</style> |
||||
<child> |
||||
<object class="Avatar"> |
||||
<property name="size">32</property> |
||||
<binding name="data"> |
||||
<lookup name="avatar-data"> |
||||
<lookup name="member">RoomDetailsPermissionsSelectMemberRow</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<property name="accessible-role">presentation</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<style> |
||||
<class name="title"/> |
||||
</style> |
||||
<child> |
||||
<object class="GtkLabel"> |
||||
<property name="halign">start</property> |
||||
<property name="ellipsize">end</property> |
||||
<binding name="label"> |
||||
<lookup name="display-name"> |
||||
<lookup name="member">RoomDetailsPermissionsSelectMemberRow</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<style> |
||||
<class name="title"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel"> |
||||
<property name="hexpand">True</property> |
||||
<property name="halign">start</property> |
||||
<property name="ellipsize">end</property> |
||||
<binding name="label"> |
||||
<lookup name="user-id-string"> |
||||
<lookup name="member">RoomDetailsPermissionsSelectMemberRow</lookup> |
||||
</lookup> |
||||
</binding> |
||||
<style> |
||||
<class name="subtitle"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkCheckButton"> |
||||
<property name="focusable">False</property> |
||||
<property name="active" bind-source="RoomDetailsPermissionsSelectMemberRow" bind-property="selected" bind-flags="sync-create | bidirectional" /> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</template> |
||||
</interface> |
||||
@ -0,0 +1,132 @@
|
||||
using Gtk 4.0; |
||||
using Adw 1; |
||||
|
||||
template $RoomDetailsUpgradeDialog: Adw.Dialog { |
||||
title: _("Upgrade Room"); |
||||
follows-content-size: true; |
||||
|
||||
styles [ |
||||
"alert", |
||||
] |
||||
|
||||
accessibility { |
||||
described-by: [ |
||||
description, |
||||
]; |
||||
} |
||||
|
||||
child: Gtk.WindowHandle { |
||||
child: Gtk.Box { |
||||
orientation: vertical; |
||||
|
||||
Gtk.ScrolledWindow { |
||||
propagate-natural-width: true; |
||||
propagate-natural-height: true; |
||||
hscrollbar-policy: never; |
||||
|
||||
styles [ |
||||
"body-scrolled-window", |
||||
"undershoot-bottom", |
||||
] |
||||
|
||||
child: Gtk.Box { |
||||
orientation: vertical; |
||||
|
||||
styles [ |
||||
"message-area", |
||||
"has-heading", |
||||
"has-body", |
||||
] |
||||
|
||||
Adw.Bin { |
||||
styles [ |
||||
"heading-bin", |
||||
] |
||||
|
||||
Gtk.Label { |
||||
justify: center; |
||||
xalign: 0.5; |
||||
label: _("Upgrade Room"); |
||||
|
||||
styles [ |
||||
"title-2", |
||||
] |
||||
} |
||||
} |
||||
|
||||
Gtk.Label description { |
||||
vexpand: true; |
||||
wrap: true; |
||||
wrap-mode: word_char; |
||||
justify: center; |
||||
xalign: 0.5; |
||||
max-width-chars: 60; |
||||
label: _("Upgrading a room to a more recent version allows to benefit from new features from the Matrix specification. It can also be used to reset the room state, which should make the room faster to join. However it should be used sparingly because it can be disruptive, as room members need to join the new room manually."); |
||||
|
||||
styles [ |
||||
"body", |
||||
] |
||||
} |
||||
|
||||
Gtk.ListBox { |
||||
margin-top: 6; |
||||
margin-start: 24; |
||||
margin-end: 24; |
||||
accessible-role: group; |
||||
|
||||
styles [ |
||||
"boxed-list", |
||||
] |
||||
|
||||
Adw.ComboRow version_combo { |
||||
selectable: false; |
||||
title: _("Version"); |
||||
} |
||||
} |
||||
|
||||
Gtk.Label warning_label { |
||||
vexpand: true; |
||||
wrap: true; |
||||
wrap-mode: word_char; |
||||
justify: center; |
||||
xalign: 0.5; |
||||
max-width-chars: 60; |
||||
|
||||
styles [ |
||||
"warning", |
||||
"body", |
||||
] |
||||
} |
||||
}; |
||||
} |
||||
|
||||
Adw.WrapBox { |
||||
child-spacing: 12; |
||||
line-spacing: 12; |
||||
justify: fill; |
||||
justify-last-line: true; |
||||
|
||||
styles [ |
||||
"response-area", |
||||
] |
||||
|
||||
Gtk.Button { |
||||
can-shrink: true; |
||||
label: _("Cancel"); |
||||
clicked => $cancel() swapped; |
||||
} |
||||
|
||||
Gtk.Button { |
||||
can-shrink: true; |
||||
// Translators: In this string, 'Upgrade' is a verb, as in 'Upgrade Room'. |
||||
label: _("Upgrade"); |
||||
clicked => $upgrade() swapped; |
||||
|
||||
styles [ |
||||
"destructive-action", |
||||
] |
||||
} |
||||
} |
||||
}; |
||||
}; |
||||
} |
||||
@ -1,134 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<interface> |
||||
<template class="RoomDetailsUpgradeDialog" parent="AdwDialog"> |
||||
<property name="title" translatable="yes">Upgrade Room</property> |
||||
<property name="follows-content-size">True</property> |
||||
<accessibility> |
||||
<relation name="described-by">description</relation> |
||||
</accessibility> |
||||
<style> |
||||
<class name="alert"/> |
||||
</style> |
||||
<property name="child"> |
||||
<object class="GtkWindowHandle"> |
||||
<property name="child"> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<child> |
||||
<object class="GtkScrolledWindow"> |
||||
<property name="propagate-natural-width">True</property> |
||||
<property name="propagate-natural-height">True</property> |
||||
<property name="hscrollbar-policy">never</property> |
||||
<style> |
||||
<class name="body-scrolled-window"/> |
||||
<class name="undershoot-bottom"/> |
||||
</style> |
||||
<property name="child"> |
||||
<object class="GtkBox"> |
||||
<property name="orientation">vertical</property> |
||||
<style> |
||||
<class name="message-area"/> |
||||
<class name="has-heading"/> |
||||
<class name="has-body"/> |
||||
</style> |
||||
<child> |
||||
<object class="AdwBin"> |
||||
<style> |
||||
<class name="heading-bin"/> |
||||
</style> |
||||
<child> |
||||
<object class="GtkLabel"> |
||||
<property name="justify">center</property> |
||||
<property name="xalign">0.5</property> |
||||
<property name="label" translatable="yes">Upgrade Room</property> |
||||
<style> |
||||
<class name="title-2"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel" id="description"> |
||||
<property name="vexpand">True</property> |
||||
<property name="wrap">True</property> |
||||
<property name="wrap-mode">word-char</property> |
||||
<property name="justify">center</property> |
||||
<property name="xalign">0.5</property> |
||||
<property name="max-width-chars">60</property> |
||||
<property name="label" translatable="yes">Upgrading a room to a more recent version allows to benefit from new features from the Matrix specification. It can also be used to reset the room state, which should make the room faster to join. However it should be used sparingly because it can be disruptive, as room members need to join the new room manually.</property> |
||||
<style> |
||||
<class name="body"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkListBox"> |
||||
<property name="margin-top">6</property> |
||||
<property name="margin-start">24</property> |
||||
<property name="margin-end">24</property> |
||||
<property name="accessible-role">group</property> |
||||
<child> |
||||
<object class="AdwComboRow" id="version_combo"> |
||||
<property name="selectable">False</property> |
||||
<property name="title" translatable="yes">Version</property> |
||||
</object> |
||||
</child> |
||||
<style> |
||||
<class name="boxed-list"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkLabel" id="warning_label"> |
||||
<property name="vexpand">True</property> |
||||
<property name="wrap">True</property> |
||||
<property name="wrap-mode">word-char</property> |
||||
<property name="justify">center</property> |
||||
<property name="xalign">0.5</property> |
||||
<property name="max-width-chars">60</property> |
||||
<style> |
||||
<class name="warning"/> |
||||
<class name="body"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="AdwWrapBox"> |
||||
<property name="child-spacing">12</property> |
||||
<property name="line-spacing">12</property> |
||||
<property name="justify">fill</property> |
||||
<property name="justify-last-line">True</property> |
||||
<style> |
||||
<class name="response-area"/> |
||||
</style> |
||||
<child> |
||||
<object class="GtkButton"> |
||||
<property name="can-shrink">True</property> |
||||
<property name="label" translatable="yes">Cancel</property> |
||||
<signal name="clicked" handler="cancel" swapped="true"/> |
||||
</object> |
||||
</child> |
||||
<child> |
||||
<object class="GtkButton"> |
||||
<property name="can-shrink">True</property> |
||||
<!-- Translators: In this string, 'Upgrade' is a verb, as in 'Upgrade Room'. --> |
||||
<property name="label" translatable="yes">Upgrade</property> |
||||
<signal name="clicked" handler="upgrade" swapped="true"/> |
||||
<style> |
||||
<class name="destructive-action"/> |
||||
</style> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</child> |
||||
</object> |
||||
</property> |
||||
</object> |
||||
</property> |
||||
</template> |
||||
</interface> |
||||
Loading…
Reference in new issue