aboutsummaryrefslogtreecommitdiff
path: root/main/data
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2026-03-14 13:42:58 +0800
committerMarvin W <git@larma.de>2026-04-08 19:02:44 +0200
commit64757cbe2572259ad201f4c691aeb545088ae42a (patch)
tree6c3de38252417500ab1234687bd413e29dcc4d1b /main/data
parent82da21c1a67d5a50d0a4940b5e3c687929b041c2 (diff)
Add implementation for XEP-0202 Entity Time
Diffstat (limited to 'main/data')
-rw-r--r--main/data/chat_input.ui21
-rw-r--r--main/data/gresource.xml1
-rw-r--r--main/data/icons/scalable/status/dino-clock-alt-symbolic.svg2
-rw-r--r--main/data/preferences_window/general_preferences_page.ui7
-rw-r--r--main/data/style.css9
5 files changed, 40 insertions, 0 deletions
diff --git a/main/data/chat_input.ui b/main/data/chat_input.ui
index 87b18946..d0d99729 100644
--- a/main/data/chat_input.ui
+++ b/main/data/chat_input.ui
@@ -6,6 +6,27 @@
<property name="orientation">vertical</property>
<property name="margin-top">4</property>
<child>
+ <object class="GtkBox" id="unavailable_box">
+ <property name="margin_start">14</property>
+ <property name="margin_end">14</property>
+ <property name="visible">False</property>
+ <style>
+ <class name="time-offset" />
+ </style>
+ <child>
+ <object class="GtkImage" id="unavailable_icon">
+ <property name="icon-name">dino-clock-alt-symbolic</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="unavailable_label">
+ <property name="margin_start">8</property>
+ <property name="ellipsize">end</property>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child>
<object class="GtkBox" id="outer_box">
<property name="margin_start">14</property>
<property name="margin_end">14</property>
diff --git a/main/data/gresource.xml b/main/data/gresource.xml
index 85449045..db9e5caf 100644
--- a/main/data/gresource.xml
+++ b/main/data/gresource.xml
@@ -67,6 +67,7 @@
<file>icons/scalable/status/dino-changes-allow-symbolic.svg</file>
<file>icons/scalable/status/dino-changes-prevent-symbolic.svg</file>
<file>icons/scalable/status/dino-channel-insecure-symbolic.svg</file>
+ <file>icons/scalable/status/dino-clock-alt-symbolic.svg</file>
<file>icons/scalable/status/dino-dialog-warning-symbolic.svg</file>
<file>icons/scalable/status/dino-double-tick-symbolic.svg</file>
<file>icons/scalable/status/dino-face-uncertain-symbolic.svg</file>
diff --git a/main/data/icons/scalable/status/dino-clock-alt-symbolic.svg b/main/data/icons/scalable/status/dino-clock-alt-symbolic.svg
new file mode 100644
index 00000000..1fdd96ce
--- /dev/null
+++ b/main/data/icons/scalable/status/dino-clock-alt-symbolic.svg
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><g fill="#222222"><path d="m 8 0 c -4.40625 0 -8 3.59375 -8 8 s 3.59375 8 8 8 s 8 -3.59375 8 -8 s -3.59375 -8 -8 -8 z m 0 2 c 3.324219 0 6 2.675781 6 6 s -2.675781 6 -6 6 s -6 -2.675781 -6 -6 s 2.675781 -6 6 -6 z m 0 0"/><path d="m 4.929688 4.953125 c -0.132813 0.003906 -0.257813 0.058594 -0.351563 0.152344 c -0.191406 0.195312 -0.1875 0.511719 0.007813 0.707031 l 3.113281 3.042969 c 0.105469 0.097656 0.246093 0.144531 0.386719 0.128906 h 2.914062 c 0.277344 0 0.5 -0.222656 0.5 -0.5 c 0 -0.273437 -0.222656 -0.5 -0.5 -0.5 h -2.761719 l -2.953125 -2.886719 c -0.09375 -0.09375 -0.222656 -0.144531 -0.355468 -0.144531 z m 0 0"/></g></svg>
diff --git a/main/data/preferences_window/general_preferences_page.ui b/main/data/preferences_window/general_preferences_page.ui
index 9e76e17a..ca240511 100644
--- a/main/data/preferences_window/general_preferences_page.ui
+++ b/main/data/preferences_window/general_preferences_page.ui
@@ -16,6 +16,13 @@
<property name="use-underline">True</property>
</object>
</child>
+ <child>
+ <object class="AdwSwitchRow" id="time_row">
+ <property name="title" translatable="yes">Share Local T_ime</property>
+ <property name="subtitle" translatable="yes">Share your current time with contacts to see their local time in return</property>
+ <property name="use-underline">True</property>
+ </object>
+ </child>
</object>
</child>
<child>
diff --git a/main/data/style.css b/main/data/style.css
index 625534f2..29665ba7 100644
--- a/main/data/style.css
+++ b/main/data/style.css
@@ -233,6 +233,15 @@ window.dino-main .dino-sidebar frame.auto-complete list > row {
transition: none;
}
+/* Time offset warning */
+
+.dino-main .dino-conversation .time-offset {
+ background-color: var(--shade-color);
+ opacity: 80%;
+ padding: 12px;
+ border-radius: 6px 6px 0 0;
+}
+
/* Chat Input*/
/* These rules are direved from the libadwaita style for activateable entry rows */