Skip to content

Commit

Permalink
ui: add initial share popover
Browse files Browse the repository at this point in the history
  • Loading branch information
bertob committed Dec 7, 2024
1 parent 793abaa commit 7de167f
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/aardvark.gresource.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
<gresource prefix="/org/p2panda/aardvark">
<file preprocess="xml-stripblanks">window.ui</file>
<file preprocess="xml-stripblanks">gtk/help-overlay.ui</file>
<file compressed="true" alias="style.css">style.css</file>
</gresource>
</gresources>
4 changes: 4 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.invite-code {
font-size: 20px;
font-style: bold;
}
60 changes: 60 additions & 0 deletions src/window.ui
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
<property name="menu-model">primary_menu</property>
</object>
</child>
<child type="end">
<object class="GtkMenuButton" id="ShareButton">
<property name="icon-name">folder-publicshare-symbolic</property>
<property name="tooltip-text" translatable="yes">Share Document</property>
<property name="popover">share_popover</property>
</object>
</child>
</object>
</child>
<property name="content">
Expand All @@ -39,6 +46,59 @@
</object>
</property>
</template>
<object class="GtkPopover" id="share_popover">
<property name="has-arrow">true</property>
<property name="name">share_popover</property>
<property name="child">
<object class="GtkBox" id="plain-popover-box">
<property name="margin-top">18</property>
<property name="margin-bottom">18</property>
<property name="margin-start">18</property>
<property name="margin-end">18</property>
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<property name="width-request">100</property>
<property name="name">share-popover-box</property>
<child>
<object class="GtkLabel">
<property name="label" translatable="true">Share Document</property>
<style>
<class name="title-2" />
</style>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="true">Give others access to this document by sharing this invite code with them:</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="label" translatable="true">sdf032jbn39aw0y23l0nd9dkeb200b21m289he </property>
<style>
<class name="invite-code" />
<class name="monospace" />
</style>
</object>
</child>
<child>
<object class="GtkBox">
<property name="halign">center</property>
<property name="margin-top">12</property>

<child>
<object class="GtkButton">
<property name="label" translatable="true">Copy to Clipboard</property>
<style>
<class name="pill" />
</style>
</object>
</child>
</object>
</child>
</object>
</property>
</object>
<menu id="primary_menu">
<section>
<item>
Expand Down

0 comments on commit 7de167f

Please sign in to comment.