BlueGit

ict rusty-teams

feat(app): English UI and demo data

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

metis Daniel Däschle · pushed by metis

Authored 2026-10-07 · 7 weeks ago

Hash
98b2ddeefbe1a89654ce8b4c952bd38834443f36
Parent
b2f76237
16 files changed +159 −169
crates/app/src/data.rs +4 −4
@@ -49,10 +49,10 @@ pub enum PresenceKind {
49 49 impl PresenceKind {
50 50 pub fn label(self) -> &'static str {
51 51 match self {
52 PresenceKind::Available => "Verfügbar",
53 PresenceKind::Busy => "Beschäftigt",
54 PresenceKind::DoNotDisturb => "Nicht stören",
55 PresenceKind::Away => "Abwesend",
52 PresenceKind::Available => "Available",
53 PresenceKind::Busy => "Busy",
54 PresenceKind::DoNotDisturb => "Do not disturb",
55 PresenceKind::Away => "Away",
56 56 PresenceKind::Offline => "Offline",
57 57 PresenceKind::Unknown => "",
58 58 }
@@ -49,10 +49,10 @@ pub enum PresenceKind {
49impl PresenceKind {
49impl PresenceKind {
50 pub fn label(self) -> &'static str {
50 pub fn label(self) -> &'static str {
51 match self {
51 match self {
52 PresenceKind::Available => "Verfügbar",
52 PresenceKind::Available => "Available",
53 PresenceKind::Busy => "Beschäftigt",
53 PresenceKind::Busy => "Busy",
54 PresenceKind::DoNotDisturb => "Nicht stören",
54 PresenceKind::DoNotDisturb => "Do not disturb",
55 PresenceKind::Away => "Abwesend",
55 PresenceKind::Away => "Away",
56 PresenceKind::Offline => "Offline",
56 PresenceKind::Offline => "Offline",
57 PresenceKind::Unknown => "",
57 PresenceKind::Unknown => "",
58 }
58 }
crates/app/src/demo.rs +37 −43
@@ -96,7 +96,11 @@ const DEMO_TEAMS: [(&str, &str, [&str; 3]); 4] = [
96 96 "Operations",
97 97 ["General", "On call", "Runbooks"],
98 98 ),
99 ("demo-team-4", "Archiv 2025", ["General", "Messe", "Umzug"]),
99 (
100 "demo-team-4",
101 "Archive 2025",
102 ["General", "Trade fair", "Office move"],
103 ),
100 104 ];
101 105 const DEMO_TEAM_ORDER: [&str; 4] = ["demo-team-2", "demo-team-1", "demo-team-3", "demo-team-4"];
102 106 const DEMO_HIDDEN_TEAM: &str = "demo-team-4";
@@ -152,7 +156,7 @@ fn demo_chats() -> Vec<DemoChat> {
152 156 members: people(&[(MARA_ID, "Mara Lindqvist")]),
153 157 time: at(0, 13, 40),
154 158 unread: false,
155 preview: Some((MARA_ID, "Mara Lindqvist", "Klar, 14 Uhr passt")),
159 preview: Some((MARA_ID, "Mara Lindqvist", "Sure, 2 pm works")),
156 160 deleted: false,
157 161 },
158 162 DemoChat {
@@ -170,48 +174,48 @@ fn demo_chats() -> Vec<DemoChat> {
170 174 preview: Some((
171 175 DEMO_USER_ID,
172 176 DEMO_USER_NAME,
173 "Build 42 ist grün, siehe Pipeline",
177 "Build 42 is green, see pipeline",
174 178 )),
175 179 deleted: false,
176 180 },
177 181 DemoChat {
178 182 id: "demo-chat-customer-1",
179 183 kind: "group",
180 title: "Kunde Nord - Betrieb",
184 title: "Customer North - Operations",
181 185 members: group(&[(LEA_ID, "Lea Schneider"), (TOBIAS_ID, "Tobias Klein")]),
182 186 time: at(0, 12, 50),
183 187 unread: true,
184 preview: Some((LEA_ID, "Lea Schneider", "Der Zugang ist freigeschaltet")),
188 preview: Some((LEA_ID, "Lea Schneider", "Access is enabled now")),
185 189 deleted: false,
186 190 },
187 191 DemoChat {
188 192 id: "demo-chat-customer-2",
189 193 kind: "group",
190 title: "Kunde Süd - Rollout",
194 title: "Customer South - Rollout",
191 195 members: group(&[(JONAS_ID, "Jonas Ortega"), (PRIYA_ID, "Priya Nair")]),
192 196 time: at(0, 9, 5),
193 197 unread: true,
194 preview: Some((JONAS_ID, "Jonas Ortega", "Termin steht für Freitag")),
198 preview: Some((JONAS_ID, "Jonas Ortega", "Meeting is set for Friday")),
195 199 deleted: false,
196 200 },
197 201 DemoChat {
198 202 id: "demo-chat-customer-3",
199 203 kind: "group",
200 title: "Kunde West - Support",
204 title: "Customer West - Support",
201 205 members: group(&[(TOBIAS_ID, "Tobias Klein"), (LEA_ID, "Lea Schneider")]),
202 206 time: at(1, 16, 0),
203 207 unread: false,
204 preview: Some((TOBIAS_ID, "Tobias Klein", "Ticket ist geschlossen")),
208 preview: Some((TOBIAS_ID, "Tobias Klein", "Ticket is closed")),
205 209 deleted: false,
206 210 },
207 211 DemoChat {
208 212 id: "demo-chat-customer-4",
209 213 kind: "group",
210 title: "Kunde Ost - Pilot",
214 title: "Customer East - Pilot",
211 215 members: group(&[(MARA_ID, "Mara Lindqvist"), (PRIYA_ID, "Priya Nair")]),
212 216 time: at(3, 10, 0),
213 217 unread: false,
214 preview: Some((DEMO_USER_ID, DEMO_USER_NAME, "Ich schicke die Unterlagen")),
218 preview: Some((DEMO_USER_ID, DEMO_USER_NAME, "I'll send the documents")),
215 219 deleted: false,
216 220 },
217 221 DemoChat {
@@ -225,7 +229,7 @@ fn demo_chats() -> Vec<DemoChat> {
225 229 ]),
226 230 time: at(0, 13, 12),
227 231 unread: true,
228 preview: Some((PRIYA_ID, "Priya Nair", "Wer übernimmt das Review?")),
232 preview: Some((PRIYA_ID, "Priya Nair", "Who is taking the review?")),
229 233 deleted: false,
230 234 },
231 235 DemoChat {
@@ -235,7 +239,7 @@ fn demo_chats() -> Vec<DemoChat> {
235 239 members: people(&[(JONAS_ID, "Jonas Ortega")]),
236 240 time: at(0, 11, 2),
237 241 unread: false,
238 preview: Some((DEMO_USER_ID, DEMO_USER_NAME, "Danke, ist gemergt")),
242 preview: Some((DEMO_USER_ID, DEMO_USER_NAME, "Thanks, it's merged")),
239 243 deleted: false,
240 244 },
241 245 DemoChat {
@@ -245,7 +249,7 @@ fn demo_chats() -> Vec<DemoChat> {
245 249 members: people(&[(PRIYA_ID, "Priya Nair")]),
246 250 time: at(0, 10, 47),
247 251 unread: false,
248 preview: Some((PRIYA_ID, "Priya Nair", "Bild")),
252 preview: Some((PRIYA_ID, "Priya Nair", "Image")),
249 253 deleted: false,
250 254 },
251 255 DemoChat {
@@ -261,11 +265,11 @@ fn demo_chats() -> Vec<DemoChat> {
261 265 DemoChat {
262 266 id: "demo-chat-allhands",
263 267 kind: "group",
264 title: "All-hands Ankündigungen",
268 title: "All-hands announcements",
265 269 members: group(&[(LEA_ID, "Lea Schneider"), (MARA_ID, "Mara Lindqvist")]),
266 270 time: at(0, 9, 0),
267 271 unread: true,
268 preview: Some((LEA_ID, "Lea Schneider", "Neue Urlaubsregel ab November")),
272 preview: Some((LEA_ID, "Lea Schneider", "New vacation policy from November")),
269 273 deleted: false,
270 274 },
271 275 DemoChat {
@@ -285,7 +289,7 @@ fn demo_chats() -> Vec<DemoChat> {
285 289 members: group(&[(LEA_ID, "Lea Schneider"), (JONAS_ID, "Jonas Ortega")]),
286 290 time: at(4, 11, 0),
287 291 unread: false,
288 preview: Some((LEA_ID, "Lea Schneider", "Entwurf hängt an")),
292 preview: Some((LEA_ID, "Lea Schneider", "Draft attached")),
289 293 deleted: false,
290 294 },
291 295 ]
@@ -422,7 +426,7 @@ pub fn seed_directory(state: &mut AppState) {
422 426 },
423 427 FolderInfo {
424 428 id: CUSTOMERS_FOLDER.to_owned(),
425 name: "Kunden".to_owned(),
429 name: "Customers".to_owned(),
426 430 kind: FolderKind::UserCreated,
427 431 conversation_ids: ids(&[
428 432 "demo-chat-customer-1",
@@ -433,13 +437,13 @@ pub fn seed_directory(state: &mut AppState) {
433 437 },
434 438 FolderInfo {
435 439 id: ATLAS_FOLDER.to_owned(),
436 name: "Projekt Atlas".to_owned(),
440 name: "Project Atlas".to_owned(),
437 441 kind: FolderKind::UserCreated,
438 442 conversation_ids: ids(&["demo-chat-atlas", "demo-chat-jonas"]),
439 443 },
440 444 FolderInfo {
441 445 id: TODO_FOLDER.to_owned(),
442 name: "Todo".to_owned(),
446 name: "To do".to_owned(),
443 447 kind: FolderKind::UserCreated,
444 448 conversation_ids: Vec::new(),
445 449 },
@@ -524,7 +528,7 @@ fn priority_messages() -> Vec<MessageRecord> {
524 528 None,
525 529 me,
526 530 at(0, 10, 40),
527 "<p>Hast du den Fehler auf Staging schon gesehen?</p>",
531 "<p>Have you seen the error on staging yet?</p>",
528 532 "[]",
529 533 false,
530 534 ),
@@ -535,7 +539,7 @@ fn priority_messages() -> Vec<MessageRecord> {
535 539 priya,
536 540 at(0, 10, 47),
537 541 &format!(
538 "<p>Ja, hier der Screenshot:</p><img src=\"{PENDING_IMAGE_KEY}\" width=\"1280\" height=\"720\">"
542 "<p>Yes, here is the screenshot:</p><img src=\"{PENDING_IMAGE_KEY}\" width=\"1280\" height=\"720\">"
539 543 ),
540 544 "[]",
541 545 false,
@@ -599,7 +603,7 @@ fn release_messages() -> Vec<MessageRecord> {
599 603 None,
600 604 mara,
601 605 at(1, 16, 41),
602 "<p>Checklist und Rollout-Plan hängen an.</p>",
606 "<p>Checklist and rollout plan attached.</p>",
603 607 "[]",
604 608 false,
605 609 ),
@@ -611,7 +615,7 @@ fn release_messages() -> Vec<MessageRecord> {
611 615 None,
612 616 me,
613 617 at(0, 9, 2),
614 "<p>Ich nehme das Changelog.</p>",
618 "<p>I'll take the changelog.</p>",
615 619 "[]",
616 620 false,
617 621 ),
@@ -621,7 +625,7 @@ fn release_messages() -> Vec<MessageRecord> {
621 625 None,
622 626 jonas,
623 627 at(0, 10, 14),
624 "<p><at id=\"0\">Mara Lindqvist</at> kannst du dir das kurz ansehen?</p><pre><code>fn freeze(branch: &amp;str) -&gt; bool {\n branch.starts_with(\"release/\")\n}</code></pre>",
628 "<p><at id=\"0\">Mara Lindqvist</at> can you take a quick look at this?</p><pre><code>fn freeze(branch: &amp;str) -&gt; bool {\n branch.starts_with(\"release/\")\n}</code></pre>",
625 629 "[]",
626 630 false,
627 631 ),
@@ -631,7 +635,7 @@ fn release_messages() -> Vec<MessageRecord> {
631 635 None,
632 636 mara,
633 637 at(0, 10, 31),
634 "<blockquote><b>Jonas Ortega</b><br>kannst du dir das kurz ansehen?</blockquote><p>Passt. Kleiner Punkt: der Name könnte sagen, was er prüft.</p>",
638 "<blockquote><b>Jonas Ortega</b><br>can you take a quick look at this?</blockquote><p>Looks good. Small thing: the name could say what it checks.</p>",
635 639 &hearts,
636 640 true,
637 641 ),
@@ -641,7 +645,7 @@ fn release_messages() -> Vec<MessageRecord> {
641 645 None,
642 646 me,
643 647 at(0, 13, 35),
644 "<p>Danke, umbenannt. Tagge jetzt.</p>",
648 "<p>Thanks, renamed. Tagging now.</p>",
645 649 "[]",
646 650 false,
647 651 ),
@@ -651,7 +655,7 @@ fn release_messages() -> Vec<MessageRecord> {
651 655 None,
652 656 me,
653 657 at(0, 13, 36),
654 "<p>Build 42 ist grün, siehe <a href=\"https://example.com/build/42\">Pipeline</a>.</p>",
658 "<p>Build 42 is green, see <a href=\"https://example.com/build/42\">pipeline</a>.</p>",
655 659 "[]",
656 660 false,
657 661 ),
@@ -667,32 +671,22 @@ fn unread_messages() -> Vec<MessageRecord> {
667 671 "u1",
668 672 me,
669 673 at(1, 17, 5),
670 "<p>Kannst du den Zugang für Nord freischalten?</p>",
671 ),
672 (
673 "u2",
674 tobias,
675 at(1, 17, 20),
676 "<p>Ich frage bei der IT nach.</p>",
674 "<p>Can you enable access for North?</p>",
677 675 ),
676 ("u2", tobias, at(1, 17, 20), "<p>I'll check with IT.</p>"),
678 677 (
679 678 "u3",
680 679 lea,
681 680 at(0, 12, 40),
682 "<p>Guten Morgen, der Zugang ist da.</p>",
681 "<p>Good morning, access is ready.</p>",
683 682 ),
684 683 (
685 684 "u4",
686 685 lea,
687 686 at(0, 12, 41),
688 "<p>Login mit der Firmen-ID, kein Passwort nötig.</p>",
689 ),
690 (
691 "u5",
692 lea,
693 at(0, 12, 50),
694 "<p>Der Zugang ist freigeschaltet</p>",
687 "<p>Sign in with your company ID, no password needed.</p>",
695 688 ),
689 ("u5", lea, at(0, 12, 50), "<p>Access is enabled now</p>"),
696 690 ];
697 691 rows.into_iter()
698 692 .map(|(id, sender, time, html)| {
@@ -96,7 +96,11 @@ const DEMO_TEAMS: [(&str, &str, [&str; 3]); 4] = [
96 "Operations",
96 "Operations",
97 ["General", "On call", "Runbooks"],
97 ["General", "On call", "Runbooks"],
98 ),
98 ),
99 ("demo-team-4", "Archiv 2025", ["General", "Messe", "Umzug"]),
99 (
100 "demo-team-4",
101 "Archive 2025",
102 ["General", "Trade fair", "Office move"],
103 ),
100];
104];
101const DEMO_TEAM_ORDER: [&str; 4] = ["demo-team-2", "demo-team-1", "demo-team-3", "demo-team-4"];
105const DEMO_TEAM_ORDER: [&str; 4] = ["demo-team-2", "demo-team-1", "demo-team-3", "demo-team-4"];
102const DEMO_HIDDEN_TEAM: &str = "demo-team-4";
106const DEMO_HIDDEN_TEAM: &str = "demo-team-4";
@@ -152,7 +156,7 @@ fn demo_chats() -> Vec<DemoChat> {
152 members: people(&[(MARA_ID, "Mara Lindqvist")]),
156 members: people(&[(MARA_ID, "Mara Lindqvist")]),
153 time: at(0, 13, 40),
157 time: at(0, 13, 40),
154 unread: false,
158 unread: false,
155 preview: Some((MARA_ID, "Mara Lindqvist", "Klar, 14 Uhr passt")),
159 preview: Some((MARA_ID, "Mara Lindqvist", "Sure, 2 pm works")),
156 deleted: false,
160 deleted: false,
157 },
161 },
158 DemoChat {
162 DemoChat {
@@ -170,48 +174,48 @@ fn demo_chats() -> Vec<DemoChat> {
170 preview: Some((
174 preview: Some((
171 DEMO_USER_ID,
175 DEMO_USER_ID,
172 DEMO_USER_NAME,
176 DEMO_USER_NAME,
173 "Build 42 ist grün, siehe Pipeline",
177 "Build 42 is green, see pipeline",
174 )),
178 )),
175 deleted: false,
179 deleted: false,
176 },
180 },
177 DemoChat {
181 DemoChat {
178 id: "demo-chat-customer-1",
182 id: "demo-chat-customer-1",
179 kind: "group",
183 kind: "group",
180 title: "Kunde Nord - Betrieb",
184 title: "Customer North - Operations",
181 members: group(&[(LEA_ID, "Lea Schneider"), (TOBIAS_ID, "Tobias Klein")]),
185 members: group(&[(LEA_ID, "Lea Schneider"), (TOBIAS_ID, "Tobias Klein")]),
182 time: at(0, 12, 50),
186 time: at(0, 12, 50),
183 unread: true,
187 unread: true,
184 preview: Some((LEA_ID, "Lea Schneider", "Der Zugang ist freigeschaltet")),
188 preview: Some((LEA_ID, "Lea Schneider", "Access is enabled now")),
185 deleted: false,
189 deleted: false,
186 },
190 },
187 DemoChat {
191 DemoChat {
188 id: "demo-chat-customer-2",
192 id: "demo-chat-customer-2",
189 kind: "group",
193 kind: "group",
190 title: "Kunde Süd - Rollout",
194 title: "Customer South - Rollout",
191 members: group(&[(JONAS_ID, "Jonas Ortega"), (PRIYA_ID, "Priya Nair")]),
195 members: group(&[(JONAS_ID, "Jonas Ortega"), (PRIYA_ID, "Priya Nair")]),
192 time: at(0, 9, 5),
196 time: at(0, 9, 5),
193 unread: true,
197 unread: true,
194 preview: Some((JONAS_ID, "Jonas Ortega", "Termin steht für Freitag")),
198 preview: Some((JONAS_ID, "Jonas Ortega", "Meeting is set for Friday")),
195 deleted: false,
199 deleted: false,
196 },
200 },
197 DemoChat {
201 DemoChat {
198 id: "demo-chat-customer-3",
202 id: "demo-chat-customer-3",
199 kind: "group",
203 kind: "group",
200 title: "Kunde West - Support",
204 title: "Customer West - Support",
201 members: group(&[(TOBIAS_ID, "Tobias Klein"), (LEA_ID, "Lea Schneider")]),
205 members: group(&[(TOBIAS_ID, "Tobias Klein"), (LEA_ID, "Lea Schneider")]),
202 time: at(1, 16, 0),
206 time: at(1, 16, 0),
203 unread: false,
207 unread: false,
204 preview: Some((TOBIAS_ID, "Tobias Klein", "Ticket ist geschlossen")),
208 preview: Some((TOBIAS_ID, "Tobias Klein", "Ticket is closed")),
205 deleted: false,
209 deleted: false,
206 },
210 },
207 DemoChat {
211 DemoChat {
208 id: "demo-chat-customer-4",
212 id: "demo-chat-customer-4",
209 kind: "group",
213 kind: "group",
210 title: "Kunde Ost - Pilot",
214 title: "Customer East - Pilot",
211 members: group(&[(MARA_ID, "Mara Lindqvist"), (PRIYA_ID, "Priya Nair")]),
215 members: group(&[(MARA_ID, "Mara Lindqvist"), (PRIYA_ID, "Priya Nair")]),
212 time: at(3, 10, 0),
216 time: at(3, 10, 0),
213 unread: false,
217 unread: false,
214 preview: Some((DEMO_USER_ID, DEMO_USER_NAME, "Ich schicke die Unterlagen")),
218 preview: Some((DEMO_USER_ID, DEMO_USER_NAME, "I'll send the documents")),
215 deleted: false,
219 deleted: false,
216 },
220 },
217 DemoChat {
221 DemoChat {
@@ -225,7 +229,7 @@ fn demo_chats() -> Vec<DemoChat> {
225 ]),
229 ]),
226 time: at(0, 13, 12),
230 time: at(0, 13, 12),
227 unread: true,
231 unread: true,
228 preview: Some((PRIYA_ID, "Priya Nair", "Wer übernimmt das Review?")),
232 preview: Some((PRIYA_ID, "Priya Nair", "Who is taking the review?")),
229 deleted: false,
233 deleted: false,
230 },
234 },
231 DemoChat {
235 DemoChat {
@@ -235,7 +239,7 @@ fn demo_chats() -> Vec<DemoChat> {
235 members: people(&[(JONAS_ID, "Jonas Ortega")]),
239 members: people(&[(JONAS_ID, "Jonas Ortega")]),
236 time: at(0, 11, 2),
240 time: at(0, 11, 2),
237 unread: false,
241 unread: false,
238 preview: Some((DEMO_USER_ID, DEMO_USER_NAME, "Danke, ist gemergt")),
242 preview: Some((DEMO_USER_ID, DEMO_USER_NAME, "Thanks, it's merged")),
239 deleted: false,
243 deleted: false,
240 },
244 },
241 DemoChat {
245 DemoChat {
@@ -245,7 +249,7 @@ fn demo_chats() -> Vec<DemoChat> {
245 members: people(&[(PRIYA_ID, "Priya Nair")]),
249 members: people(&[(PRIYA_ID, "Priya Nair")]),
246 time: at(0, 10, 47),
250 time: at(0, 10, 47),
247 unread: false,
251 unread: false,
248 preview: Some((PRIYA_ID, "Priya Nair", "Bild")),
252 preview: Some((PRIYA_ID, "Priya Nair", "Image")),
249 deleted: false,
253 deleted: false,
250 },
254 },
251 DemoChat {
255 DemoChat {
@@ -261,11 +265,11 @@ fn demo_chats() -> Vec<DemoChat> {
261 DemoChat {
265 DemoChat {
262 id: "demo-chat-allhands",
266 id: "demo-chat-allhands",
263 kind: "group",
267 kind: "group",
264 title: "All-hands Ankündigungen",
268 title: "All-hands announcements",
265 members: group(&[(LEA_ID, "Lea Schneider"), (MARA_ID, "Mara Lindqvist")]),
269 members: group(&[(LEA_ID, "Lea Schneider"), (MARA_ID, "Mara Lindqvist")]),
266 time: at(0, 9, 0),
270 time: at(0, 9, 0),
267 unread: true,
271 unread: true,
268 preview: Some((LEA_ID, "Lea Schneider", "Neue Urlaubsregel ab November")),
272 preview: Some((LEA_ID, "Lea Schneider", "New vacation policy from November")),
269 deleted: false,
273 deleted: false,
270 },
274 },
271 DemoChat {
275 DemoChat {
@@ -285,7 +289,7 @@ fn demo_chats() -> Vec<DemoChat> {
285 members: group(&[(LEA_ID, "Lea Schneider"), (JONAS_ID, "Jonas Ortega")]),
289 members: group(&[(LEA_ID, "Lea Schneider"), (JONAS_ID, "Jonas Ortega")]),
286 time: at(4, 11, 0),
290 time: at(4, 11, 0),
287 unread: false,
291 unread: false,
288 preview: Some((LEA_ID, "Lea Schneider", "Entwurf hängt an")),
292 preview: Some((LEA_ID, "Lea Schneider", "Draft attached")),
289 deleted: false,
293 deleted: false,
290 },
294 },
291 ]
295 ]
@@ -422,7 +426,7 @@ pub fn seed_directory(state: &mut AppState) {
422 },
426 },
423 FolderInfo {
427 FolderInfo {
424 id: CUSTOMERS_FOLDER.to_owned(),
428 id: CUSTOMERS_FOLDER.to_owned(),
425 name: "Kunden".to_owned(),
429 name: "Customers".to_owned(),
426 kind: FolderKind::UserCreated,
430 kind: FolderKind::UserCreated,
427 conversation_ids: ids(&[
431 conversation_ids: ids(&[
428 "demo-chat-customer-1",
432 "demo-chat-customer-1",
@@ -433,13 +437,13 @@ pub fn seed_directory(state: &mut AppState) {
433 },
437 },
434 FolderInfo {
438 FolderInfo {
435 id: ATLAS_FOLDER.to_owned(),
439 id: ATLAS_FOLDER.to_owned(),
436 name: "Projekt Atlas".to_owned(),
440 name: "Project Atlas".to_owned(),
437 kind: FolderKind::UserCreated,
441 kind: FolderKind::UserCreated,
438 conversation_ids: ids(&["demo-chat-atlas", "demo-chat-jonas"]),
442 conversation_ids: ids(&["demo-chat-atlas", "demo-chat-jonas"]),
439 },
443 },
440 FolderInfo {
444 FolderInfo {
441 id: TODO_FOLDER.to_owned(),
445 id: TODO_FOLDER.to_owned(),
442 name: "Todo".to_owned(),
446 name: "To do".to_owned(),
443 kind: FolderKind::UserCreated,
447 kind: FolderKind::UserCreated,
444 conversation_ids: Vec::new(),
448 conversation_ids: Vec::new(),
445 },
449 },
@@ -524,7 +528,7 @@ fn priority_messages() -> Vec<MessageRecord> {
524 None,
528 None,
525 me,
529 me,
526 at(0, 10, 40),
530 at(0, 10, 40),
527 "<p>Hast du den Fehler auf Staging schon gesehen?</p>",
531 "<p>Have you seen the error on staging yet?</p>",
528 "[]",
532 "[]",
529 false,
533 false,
530 ),
534 ),
@@ -535,7 +539,7 @@ fn priority_messages() -> Vec<MessageRecord> {
535 priya,
539 priya,
536 at(0, 10, 47),
540 at(0, 10, 47),
537 &format!(
541 &format!(
538 "<p>Ja, hier der Screenshot:</p><img src=\"{PENDING_IMAGE_KEY}\" width=\"1280\" height=\"720\">"
542 "<p>Yes, here is the screenshot:</p><img src=\"{PENDING_IMAGE_KEY}\" width=\"1280\" height=\"720\">"
539 ),
543 ),
540 "[]",
544 "[]",
541 false,
545 false,
@@ -599,7 +603,7 @@ fn release_messages() -> Vec<MessageRecord> {
599 None,
603 None,
600 mara,
604 mara,
601 at(1, 16, 41),
605 at(1, 16, 41),
602 "<p>Checklist und Rollout-Plan hängen an.</p>",
606 "<p>Checklist and rollout plan attached.</p>",
603 "[]",
607 "[]",
604 false,
608 false,
605 ),
609 ),
@@ -611,7 +615,7 @@ fn release_messages() -> Vec<MessageRecord> {
611 None,
615 None,
612 me,
616 me,
613 at(0, 9, 2),
617 at(0, 9, 2),
614 "<p>Ich nehme das Changelog.</p>",
618 "<p>I'll take the changelog.</p>",
615 "[]",
619 "[]",
616 false,
620 false,
617 ),
621 ),
@@ -621,7 +625,7 @@ fn release_messages() -> Vec<MessageRecord> {
621 None,
625 None,
622 jonas,
626 jonas,
623 at(0, 10, 14),
627 at(0, 10, 14),
624 "<p><at id=\"0\">Mara Lindqvist</at> kannst du dir das kurz ansehen?</p><pre><code>fn freeze(branch: &amp;str) -&gt; bool {\n branch.starts_with(\"release/\")\n}</code></pre>",
628 "<p><at id=\"0\">Mara Lindqvist</at> can you take a quick look at this?</p><pre><code>fn freeze(branch: &amp;str) -&gt; bool {\n branch.starts_with(\"release/\")\n}</code></pre>",
625 "[]",
629 "[]",
626 false,
630 false,
627 ),
631 ),
@@ -631,7 +635,7 @@ fn release_messages() -> Vec<MessageRecord> {
631 None,
635 None,
632 mara,
636 mara,
633 at(0, 10, 31),
637 at(0, 10, 31),
634 "<blockquote><b>Jonas Ortega</b><br>kannst du dir das kurz ansehen?</blockquote><p>Passt. Kleiner Punkt: der Name könnte sagen, was er prüft.</p>",
638 "<blockquote><b>Jonas Ortega</b><br>can you take a quick look at this?</blockquote><p>Looks good. Small thing: the name could say what it checks.</p>",
635 &hearts,
639 &hearts,
636 true,
640 true,
637 ),
641 ),
@@ -641,7 +645,7 @@ fn release_messages() -> Vec<MessageRecord> {
641 None,
645 None,
642 me,
646 me,
643 at(0, 13, 35),
647 at(0, 13, 35),
644 "<p>Danke, umbenannt. Tagge jetzt.</p>",
648 "<p>Thanks, renamed. Tagging now.</p>",
645 "[]",
649 "[]",
646 false,
650 false,
647 ),
651 ),
@@ -651,7 +655,7 @@ fn release_messages() -> Vec<MessageRecord> {
651 None,
655 None,
652 me,
656 me,
653 at(0, 13, 36),
657 at(0, 13, 36),
654 "<p>Build 42 ist grün, siehe <a href=\"https://example.com/build/42\">Pipeline</a>.</p>",
658 "<p>Build 42 is green, see <a href=\"https://example.com/build/42\">pipeline</a>.</p>",
655 "[]",
659 "[]",
656 false,
660 false,
657 ),
661 ),
@@ -667,32 +671,22 @@ fn unread_messages() -> Vec<MessageRecord> {
667 "u1",
671 "u1",
668 me,
672 me,
669 at(1, 17, 5),
673 at(1, 17, 5),
670 "<p>Kannst du den Zugang für Nord freischalten?</p>",
674 "<p>Can you enable access for North?</p>",
671 ),
672 (
673 "u2",
674 tobias,
675 at(1, 17, 20),
676 "<p>Ich frage bei der IT nach.</p>",
677 ),
675 ),
676 ("u2", tobias, at(1, 17, 20), "<p>I'll check with IT.</p>"),
678 (
677 (
679 "u3",
678 "u3",
680 lea,
679 lea,
681 at(0, 12, 40),
680 at(0, 12, 40),
682 "<p>Guten Morgen, der Zugang ist da.</p>",
681 "<p>Good morning, access is ready.</p>",
683 ),
682 ),
684 (
683 (
685 "u4",
684 "u4",
686 lea,
685 lea,
687 at(0, 12, 41),
686 at(0, 12, 41),
688 "<p>Login mit der Firmen-ID, kein Passwort nötig.</p>",
687 "<p>Sign in with your company ID, no password needed.</p>",
689 ),
690 (
691 "u5",
692 lea,
693 at(0, 12, 50),
694 "<p>Der Zugang ist freigeschaltet</p>",
695 ),
688 ),
689 ("u5", lea, at(0, 12, 50), "<p>Access is enabled now</p>"),
696 ];
690 ];
697 rows.into_iter()
691 rows.into_iter()
698 .map(|(id, sender, time, html)| {
692 .map(|(id, sender, time, html)| {
crates/app/src/format.rs +19 −19
@@ -41,13 +41,13 @@ pub fn badge_text(count: u32) -> String {
41 41
42 42 fn weekday_label(weekday: Weekday) -> &'static str {
43 43 match weekday {
44 Weekday::Mon => "Mo",
45 Weekday::Tue => "Di",
46 Weekday::Wed => "Mi",
47 Weekday::Thu => "Do",
48 Weekday::Fri => "Fr",
49 Weekday::Sat => "Sa",
50 Weekday::Sun => "So",
44 Weekday::Mon => "Mon",
45 Weekday::Tue => "Tue",
46 Weekday::Wed => "Wed",
47 Weekday::Thu => "Thu",
48 Weekday::Fri => "Fri",
49 Weekday::Sat => "Sat",
50 Weekday::Sun => "Sun",
51 51 }
52 52 }
53 53
@@ -77,20 +77,20 @@ pub fn list_time_label(time: DateTime<Utc>, today: NaiveDate, offset: FixedOffse
77 77 } else if days_ago <= WEEKDAY_WINDOW_DAYS {
78 78 weekday_label(local.weekday()).to_owned()
79 79 } else {
80 local.format("%d.%m.").to_string()
80 local.format("%b %-d").to_string()
81 81 }
82 82 }
83 83
84 84 pub fn day_label(day: NaiveDate, today: NaiveDate) -> String {
85 85 if day == today {
86 "Heute".to_owned()
86 "Today".to_owned()
87 87 } else if today.pred_opt() == Some(day) {
88 "Gestern".to_owned()
88 "Yesterday".to_owned()
89 89 } else {
90 90 format!(
91 "{} {}",
91 "{}, {}",
92 92 weekday_label(day.weekday()),
93 day.format("%d.%m.%Y")
93 day.format("%b %-d, %Y")
94 94 )
95 95 }
96 96 }
@@ -168,11 +168,11 @@ mod tests {
168 168 #[test]
169 169 fn list_time_is_clock_today_weekday_this_week_date_before() {
170 170 assert_eq!(list_time_label(utc(7, 13), today(), zero()), "13:05");
171 assert_eq!(list_time_label(utc(5, 13), today(), zero()), "Mo");
172 assert_eq!(list_time_label(utc(6, 9), today(), zero()), "Di");
173 assert_eq!(list_time_label(utc(1, 13), today(), zero()), "Do");
171 assert_eq!(list_time_label(utc(5, 13), today(), zero()), "Mon");
172 assert_eq!(list_time_label(utc(6, 9), today(), zero()), "Tue");
173 assert_eq!(list_time_label(utc(1, 13), today(), zero()), "Thu");
174 174 let september = Utc.with_ymd_and_hms(2026, 9, 30, 13, 0, 0).unwrap();
175 assert_eq!(list_time_label(september, today(), zero()), "30.09.");
175 assert_eq!(list_time_label(september, today(), zero()), "Sep 30");
176 176 }
177 177
178 178 #[test]
@@ -192,11 +192,11 @@ mod tests {
192 192
193 193 #[test]
194 194 fn day_labels() {
195 assert_eq!(day_label(today(), today()), "Heute");
196 assert_eq!(day_label(today().pred_opt().unwrap(), today()), "Gestern");
195 assert_eq!(day_label(today(), today()), "Today");
196 assert_eq!(day_label(today().pred_opt().unwrap(), today()), "Yesterday");
197 197 assert_eq!(
198 198 day_label(NaiveDate::from_ymd_opt(2026, 10, 1).unwrap(), today()),
199 "Do 01.10.2026"
199 "Thu, Oct 1, 2026"
200 200 );
201 201 }
202 202 }
@@ -41,13 +41,13 @@ pub fn badge_text(count: u32) -> String {
41
41
42fn weekday_label(weekday: Weekday) -> &'static str {
42fn weekday_label(weekday: Weekday) -> &'static str {
43 match weekday {
43 match weekday {
44 Weekday::Mon => "Mo",
44 Weekday::Mon => "Mon",
45 Weekday::Tue => "Di",
45 Weekday::Tue => "Tue",
46 Weekday::Wed => "Mi",
46 Weekday::Wed => "Wed",
47 Weekday::Thu => "Do",
47 Weekday::Thu => "Thu",
48 Weekday::Fri => "Fr",
48 Weekday::Fri => "Fri",
49 Weekday::Sat => "Sa",
49 Weekday::Sat => "Sat",
50 Weekday::Sun => "So",
50 Weekday::Sun => "Sun",
51 }
51 }
52}
52}
53
53
@@ -77,20 +77,20 @@ pub fn list_time_label(time: DateTime<Utc>, today: NaiveDate, offset: FixedOffse
77 } else if days_ago <= WEEKDAY_WINDOW_DAYS {
77 } else if days_ago <= WEEKDAY_WINDOW_DAYS {
78 weekday_label(local.weekday()).to_owned()
78 weekday_label(local.weekday()).to_owned()
79 } else {
79 } else {
80 local.format("%d.%m.").to_string()
80 local.format("%b %-d").to_string()
81 }
81 }
82}
82}
83
83
84pub fn day_label(day: NaiveDate, today: NaiveDate) -> String {
84pub fn day_label(day: NaiveDate, today: NaiveDate) -> String {
85 if day == today {
85 if day == today {
86 "Heute".to_owned()
86 "Today".to_owned()
87 } else if today.pred_opt() == Some(day) {
87 } else if today.pred_opt() == Some(day) {
88 "Gestern".to_owned()
88 "Yesterday".to_owned()
89 } else {
89 } else {
90 format!(
90 format!(
91 "{} {}",
91 "{}, {}",
92 weekday_label(day.weekday()),
92 weekday_label(day.weekday()),
93 day.format("%d.%m.%Y")
93 day.format("%b %-d, %Y")
94 )
94 )
95 }
95 }
96}
96}
@@ -168,11 +168,11 @@ mod tests {
168 #[test]
168 #[test]
169 fn list_time_is_clock_today_weekday_this_week_date_before() {
169 fn list_time_is_clock_today_weekday_this_week_date_before() {
170 assert_eq!(list_time_label(utc(7, 13), today(), zero()), "13:05");
170 assert_eq!(list_time_label(utc(7, 13), today(), zero()), "13:05");
171 assert_eq!(list_time_label(utc(5, 13), today(), zero()), "Mo");
171 assert_eq!(list_time_label(utc(5, 13), today(), zero()), "Mon");
172 assert_eq!(list_time_label(utc(6, 9), today(), zero()), "Di");
172 assert_eq!(list_time_label(utc(6, 9), today(), zero()), "Tue");
173 assert_eq!(list_time_label(utc(1, 13), today(), zero()), "Do");
173 assert_eq!(list_time_label(utc(1, 13), today(), zero()), "Thu");
174 let september = Utc.with_ymd_and_hms(2026, 9, 30, 13, 0, 0).unwrap();
174 let september = Utc.with_ymd_and_hms(2026, 9, 30, 13, 0, 0).unwrap();
175 assert_eq!(list_time_label(september, today(), zero()), "30.09.");
175 assert_eq!(list_time_label(september, today(), zero()), "Sep 30");
176 }
176 }
177
177
178 #[test]
178 #[test]
@@ -192,11 +192,11 @@ mod tests {
192
192
193 #[test]
193 #[test]
194 fn day_labels() {
194 fn day_labels() {
195 assert_eq!(day_label(today(), today()), "Heute");
195 assert_eq!(day_label(today(), today()), "Today");
196 assert_eq!(day_label(today().pred_opt().unwrap(), today()), "Gestern");
196 assert_eq!(day_label(today().pred_opt().unwrap(), today()), "Yesterday");
197 assert_eq!(
197 assert_eq!(
198 day_label(NaiveDate::from_ymd_opt(2026, 10, 1).unwrap(), today()),
198 day_label(NaiveDate::from_ymd_opt(2026, 10, 1).unwrap(), today()),
199 "Do 01.10.2026"
199 "Thu, Oct 1, 2026"
200 );
200 );
201 }
201 }
202}
202}
crates/app/src/main.rs +1 −1
@@ -99,7 +99,7 @@ fn transport(endpoint: Option<&str>) -> Arc<dyn session::Transport> {
99 99 if endpoint.is_none() {
100 100 return webview::start(webview::HostConfig {
101 101 user_data_folder: data_path(WEBVIEW_FOLDER),
102 window_title: format!("{APP_NAME} - Anmeldung"),
102 window_title: format!("{APP_NAME} - Sign in"),
103 103 });
104 104 }
105 105 Arc::new(session::CdpTransport::new(endpoint.unwrap_or(session::DEFAULT_ENDPOINT)))
@@ -99,7 +99,7 @@ fn transport(endpoint: Option<&str>) -> Arc<dyn session::Transport> {
99 if endpoint.is_none() {
99 if endpoint.is_none() {
100 return webview::start(webview::HostConfig {
100 return webview::start(webview::HostConfig {
101 user_data_folder: data_path(WEBVIEW_FOLDER),
101 user_data_folder: data_path(WEBVIEW_FOLDER),
102 window_title: format!("{APP_NAME} - Anmeldung"),
102 window_title: format!("{APP_NAME} - Sign in"),
103 });
103 });
104 }
104 }
105 Arc::new(session::CdpTransport::new(endpoint.unwrap_or(session::DEFAULT_ENDPOINT)))
105 Arc::new(session::CdpTransport::new(endpoint.unwrap_or(session::DEFAULT_ENDPOINT)))
crates/app/src/rows.rs +5 −5
@@ -14,7 +14,7 @@ const REPLY_FACE_LIMIT: usize = 3;
14 14
15 15 pub const LOAD_OLDER_KEY: &str = "load-older";
16 16 const UNKNOWN_AUTHOR: &str = "Unknown";
17 const DELETED_TEXT: &str = "Nachricht gelöscht";
17 const DELETED_TEXT: &str = "Message deleted";
18 18 const SERIES_GAP_MINUTES: i64 = 5;
19 19 const CORNER_RADIUS: f32 = 14.;
20 20 const CORNER_SERIES: f32 = 4.;
@@ -235,11 +235,11 @@ pub fn reply_excerpt(record: &MessageRecord) -> String {
235 235 let first_line = text.lines().map(str::trim).find(|line| !line.is_empty());
236 236 let excerpt = match first_line {
237 237 Some(line) => line.to_owned(),
238 None if !images(record).is_empty() => "Bild".to_owned(),
238 None if !images(record).is_empty() => "Image".to_owned(),
239 239 None => files(record)
240 240 .into_iter()
241 241 .next()
242 .map_or_else(|| "Nachricht".to_owned(), |card| card.name),
242 .map_or_else(|| "Message".to_owned(), |card| card.name),
243 243 };
244 244 if excerpt.chars().count() > REPLY_EXCERPT_CHARS {
245 245 let cut: String = excerpt.chars().take(REPLY_EXCERPT_CHARS).collect();
@@ -509,7 +509,7 @@ mod tests {
509 509 assert_eq!(reply_excerpt(&quoted), "my answer");
510 510 let mut image = record("b", None, 8, 6);
511 511 image.body_html = "<img src=\"u\">".into();
512 assert_eq!(reply_excerpt(&image), "Bild");
512 assert_eq!(reply_excerpt(&image), "Image");
513 513 let mut long = record("c", None, 8, 6);
514 514 long.body_html = format!("<p>{}</p>", "x".repeat(200));
515 515 assert!(reply_excerpt(&long).ends_with("..."));
@@ -548,7 +548,7 @@ mod tests {
548 548 .collect();
549 549 assert_eq!(
550 550 headers,
551 vec![Some("Gestern".into()), None, Some("Heute".into())]
551 vec![Some("Yesterday".into()), None, Some("Today".into())]
552 552 );
553 553 }
554 554
@@ -14,7 +14,7 @@ const REPLY_FACE_LIMIT: usize = 3;
14
14
15pub const LOAD_OLDER_KEY: &str = "load-older";
15pub const LOAD_OLDER_KEY: &str = "load-older";
16const UNKNOWN_AUTHOR: &str = "Unknown";
16const UNKNOWN_AUTHOR: &str = "Unknown";
17const DELETED_TEXT: &str = "Nachricht gelöscht";
17const DELETED_TEXT: &str = "Message deleted";
18const SERIES_GAP_MINUTES: i64 = 5;
18const SERIES_GAP_MINUTES: i64 = 5;
19const CORNER_RADIUS: f32 = 14.;
19const CORNER_RADIUS: f32 = 14.;
20const CORNER_SERIES: f32 = 4.;
20const CORNER_SERIES: f32 = 4.;
@@ -235,11 +235,11 @@ pub fn reply_excerpt(record: &MessageRecord) -> String {
235 let first_line = text.lines().map(str::trim).find(|line| !line.is_empty());
235 let first_line = text.lines().map(str::trim).find(|line| !line.is_empty());
236 let excerpt = match first_line {
236 let excerpt = match first_line {
237 Some(line) => line.to_owned(),
237 Some(line) => line.to_owned(),
238 None if !images(record).is_empty() => "Bild".to_owned(),
238 None if !images(record).is_empty() => "Image".to_owned(),
239 None => files(record)
239 None => files(record)
240 .into_iter()
240 .into_iter()
241 .next()
241 .next()
242 .map_or_else(|| "Nachricht".to_owned(), |card| card.name),
242 .map_or_else(|| "Message".to_owned(), |card| card.name),
243 };
243 };
244 if excerpt.chars().count() > REPLY_EXCERPT_CHARS {
244 if excerpt.chars().count() > REPLY_EXCERPT_CHARS {
245 let cut: String = excerpt.chars().take(REPLY_EXCERPT_CHARS).collect();
245 let cut: String = excerpt.chars().take(REPLY_EXCERPT_CHARS).collect();
@@ -509,7 +509,7 @@ mod tests {
509 assert_eq!(reply_excerpt(&quoted), "my answer");
509 assert_eq!(reply_excerpt(&quoted), "my answer");
510 let mut image = record("b", None, 8, 6);
510 let mut image = record("b", None, 8, 6);
511 image.body_html = "<img src=\"u\">".into();
511 image.body_html = "<img src=\"u\">".into();
512 assert_eq!(reply_excerpt(&image), "Bild");
512 assert_eq!(reply_excerpt(&image), "Image");
513 let mut long = record("c", None, 8, 6);
513 let mut long = record("c", None, 8, 6);
514 long.body_html = format!("<p>{}</p>", "x".repeat(200));
514 long.body_html = format!("<p>{}</p>", "x".repeat(200));
515 assert!(reply_excerpt(&long).ends_with("..."));
515 assert!(reply_excerpt(&long).ends_with("..."));
@@ -548,7 +548,7 @@ mod tests {
548 .collect();
548 .collect();
549 assert_eq!(
549 assert_eq!(
550 headers,
550 headers,
551 vec![Some("Gestern".into()), None, Some("Heute".into())]
551 vec![Some("Yesterday".into()), None, Some("Today".into())]
552 );
552 );
553 }
553 }
554
554
crates/app/src/sidebar_model.rs +10 −10
@@ -9,12 +9,12 @@ use crate::data::{
9 9 };
10 10 use crate::format;
11 11
12 pub const FAVORITES_FALLBACK_NAME: &str = "Angeheftet";
13 pub const OTHERS_NAME: &str = "Weitere Chats";
12 pub const FAVORITES_FALLBACK_NAME: &str = "Pinned";
13 pub const OTHERS_NAME: &str = "Other chats";
14 14 pub const OTHERS_ID: &str = "others";
15 pub const EMPTY_FOLDER_HINT: &str = "Leer. Chats hierher ziehen.";
16 pub const DELETED_PREVIEW: &str = "Nachricht gelöscht";
17 const OWN_PREFIX: &str = "Du";
15 pub const EMPTY_FOLDER_HINT: &str = "Empty. Drag chats here.";
16 pub const DELETED_PREVIEW: &str = "Message deleted";
17 const OWN_PREFIX: &str = "You";
18 18
19 19 #[derive(Debug, Clone, PartialEq, Eq)]
20 20 pub enum Preview {
@@ -323,24 +323,24 @@ mod tests {
323 323 }
324 324
325 325 #[test]
326 fn preview_prefix_is_du_for_own_and_first_name_for_groups() {
326 fn preview_prefix_is_you_for_own_and_first_name_for_groups() {
327 327 let mut group = chat("g", "group", false);
328 group.last_message_preview = Some("Hallo".into());
328 group.last_message_preview = Some("Hello".into());
329 329 group.last_message_sender_id = Some("ada".into());
330 330 group.last_message_sender_name = Some("Ada Example".into());
331 331 assert_eq!(
332 332 preview_for(&group, Some(&me())),
333 333 Preview::Text {
334 334 prefix: Some("Ada".into()),
335 text: "Hallo".into()
335 text: "Hello".into()
336 336 }
337 337 );
338 338 group.last_message_sender_id = Some("me".into());
339 339 assert_eq!(
340 340 preview_for(&group, Some(&me())),
341 341 Preview::Text {
342 prefix: Some("Du".into()),
343 text: "Hallo".into()
342 prefix: Some("You".into()),
343 text: "Hello".into()
344 344 }
345 345 );
346 346 let mut direct = chat("d", "oneOnOne", false);
@@ -9,12 +9,12 @@ use crate::data::{
9};
9};
10use crate::format;
10use crate::format;
11
11
12pub const FAVORITES_FALLBACK_NAME: &str = "Angeheftet";
12pub const FAVORITES_FALLBACK_NAME: &str = "Pinned";
13pub const OTHERS_NAME: &str = "Weitere Chats";
13pub const OTHERS_NAME: &str = "Other chats";
14pub const OTHERS_ID: &str = "others";
14pub const OTHERS_ID: &str = "others";
15pub const EMPTY_FOLDER_HINT: &str = "Leer. Chats hierher ziehen.";
15pub const EMPTY_FOLDER_HINT: &str = "Empty. Drag chats here.";
16pub const DELETED_PREVIEW: &str = "Nachricht gelöscht";
16pub const DELETED_PREVIEW: &str = "Message deleted";
17const OWN_PREFIX: &str = "Du";
17const OWN_PREFIX: &str = "You";
18
18
19#[derive(Debug, Clone, PartialEq, Eq)]
19#[derive(Debug, Clone, PartialEq, Eq)]
20pub enum Preview {
20pub enum Preview {
@@ -323,24 +323,24 @@ mod tests {
323 }
323 }
324
324
325 #[test]
325 #[test]
326 fn preview_prefix_is_du_for_own_and_first_name_for_groups() {
326 fn preview_prefix_is_you_for_own_and_first_name_for_groups() {
327 let mut group = chat("g", "group", false);
327 let mut group = chat("g", "group", false);
328 group.last_message_preview = Some("Hallo".into());
328 group.last_message_preview = Some("Hello".into());
329 group.last_message_sender_id = Some("ada".into());
329 group.last_message_sender_id = Some("ada".into());
330 group.last_message_sender_name = Some("Ada Example".into());
330 group.last_message_sender_name = Some("Ada Example".into());
331 assert_eq!(
331 assert_eq!(
332 preview_for(&group, Some(&me())),
332 preview_for(&group, Some(&me())),
333 Preview::Text {
333 Preview::Text {
334 prefix: Some("Ada".into()),
334 prefix: Some("Ada".into()),
335 text: "Hallo".into()
335 text: "Hello".into()
336 }
336 }
337 );
337 );
338 group.last_message_sender_id = Some("me".into());
338 group.last_message_sender_id = Some("me".into());
339 assert_eq!(
339 assert_eq!(
340 preview_for(&group, Some(&me())),
340 preview_for(&group, Some(&me())),
341 Preview::Text {
341 Preview::Text {
342 prefix: Some("Du".into()),
342 prefix: Some("You".into()),
343 text: "Hallo".into()
343 text: "Hello".into()
344 }
344 }
345 );
345 );
346 let mut direct = chat("d", "oneOnOne", false);
346 let mut direct = chat("d", "oneOnOne", false);
crates/app/src/views/attachments.rs +9 −9
@@ -66,7 +66,7 @@ fn image_view(image: &ImageRef, id: String, directory: &Directory) -> AnyElement
66 66 div()
67 67 .text_size(px(11.))
68 68 .text_color(theme::text_muted())
69 .child("Bild wird geladen"),
69 .child("Loading image"),
70 70 )
71 71 .into_any_element();
72 72 };
@@ -94,13 +94,13 @@ struct KindStyle {
94 94
95 95 fn kind_style(kind: FileKind) -> KindStyle {
96 96 let (label, description, color) = match kind {
97 FileKind::Word => ("DOC", "Word-Dokument", 0x2563EB),
98 FileKind::Excel => ("XLS", "Excel-Tabelle", 0x15803D),
97 FileKind::Word => ("DOC", "Word document", 0x2563EB),
98 FileKind::Excel => ("XLS", "Excel spreadsheet", 0x15803D),
99 99 FileKind::PowerPoint => ("PPT", "PowerPoint", 0xC2410C),
100 FileKind::Pdf => ("PDF", "PDF-Dokument", 0xB91C1C),
101 FileKind::Image => ("IMG", "Bild", 0x7C3AED),
102 FileKind::Archive => ("ZIP", "Archiv", 0xB45309),
103 FileKind::Other => ("", "Datei", 0x525252),
100 FileKind::Pdf => ("PDF", "PDF document", 0xB91C1C),
101 FileKind::Image => ("IMG", "Image", 0x7C3AED),
102 FileKind::Archive => ("ZIP", "Archive", 0xB45309),
103 FileKind::Other => ("", "File", 0x525252),
104 104 };
105 105 KindStyle {
106 106 label,
@@ -241,8 +241,8 @@ mod tests {
241 241 size: Some(2048),
242 242 open_url: String::new(),
243 243 };
244 assert_eq!(file_subtitle(&card), "PDF-Dokument \u{b7} 2 KB");
244 assert_eq!(file_subtitle(&card), "PDF document \u{b7} 2 KB");
245 245 let unknown = FileCard { size: None, ..card };
246 assert_eq!(file_subtitle(&unknown), "PDF-Dokument");
246 assert_eq!(file_subtitle(&unknown), "PDF document");
247 247 }
248 248 }
@@ -66,7 +66,7 @@ fn image_view(image: &ImageRef, id: String, directory: &Directory) -> AnyElement
66 div()
66 div()
67 .text_size(px(11.))
67 .text_size(px(11.))
68 .text_color(theme::text_muted())
68 .text_color(theme::text_muted())
69 .child("Bild wird geladen"),
69 .child("Loading image"),
70 )
70 )
71 .into_any_element();
71 .into_any_element();
72 };
72 };
@@ -94,13 +94,13 @@ struct KindStyle {
94
94
95fn kind_style(kind: FileKind) -> KindStyle {
95fn kind_style(kind: FileKind) -> KindStyle {
96 let (label, description, color) = match kind {
96 let (label, description, color) = match kind {
97 FileKind::Word => ("DOC", "Word-Dokument", 0x2563EB),
97 FileKind::Word => ("DOC", "Word document", 0x2563EB),
98 FileKind::Excel => ("XLS", "Excel-Tabelle", 0x15803D),
98 FileKind::Excel => ("XLS", "Excel spreadsheet", 0x15803D),
99 FileKind::PowerPoint => ("PPT", "PowerPoint", 0xC2410C),
99 FileKind::PowerPoint => ("PPT", "PowerPoint", 0xC2410C),
100 FileKind::Pdf => ("PDF", "PDF-Dokument", 0xB91C1C),
100 FileKind::Pdf => ("PDF", "PDF document", 0xB91C1C),
101 FileKind::Image => ("IMG", "Bild", 0x7C3AED),
101 FileKind::Image => ("IMG", "Image", 0x7C3AED),
102 FileKind::Archive => ("ZIP", "Archiv", 0xB45309),
102 FileKind::Archive => ("ZIP", "Archive", 0xB45309),
103 FileKind::Other => ("", "Datei", 0x525252),
103 FileKind::Other => ("", "File", 0x525252),
104 };
104 };
105 KindStyle {
105 KindStyle {
106 label,
106 label,
@@ -241,8 +241,8 @@ mod tests {
241 size: Some(2048),
241 size: Some(2048),
242 open_url: String::new(),
242 open_url: String::new(),
243 };
243 };
244 assert_eq!(file_subtitle(&card), "PDF-Dokument \u{b7} 2 KB");
244 assert_eq!(file_subtitle(&card), "PDF document \u{b7} 2 KB");
245 let unknown = FileCard { size: None, ..card };
245 let unknown = FileCard { size: None, ..card };
246 assert_eq!(file_subtitle(&unknown), "PDF-Dokument");
246 assert_eq!(file_subtitle(&unknown), "PDF document");
247 }
247 }
248}
248}
crates/app/src/views/composer.rs +3 −3
@@ -151,7 +151,7 @@ impl Composer {
151 151 TextareaState::new(window, cx)
152 152 .auto_grow(MIN_ROWS, MAX_ROWS)
153 153 .submit_on_enter(true)
154 .placeholder("Nachricht")
154 .placeholder("Type a message")
155 155 });
156 156 let subscription = cx.subscribe_in(&input, window, Self::on_input_event);
157 157 let recent_emoji = emoji::Recent::load(&app.read(cx).store);
@@ -440,7 +440,7 @@ impl Composer {
440 440 window: &mut Window,
441 441 cx: &mut Context<Self>,
442 442 ) {
443 let placeholder = format!("Nachricht an {name}");
443 let placeholder = format!("Message {name}");
444 444 self.input.update(cx, |state, cx| {
445 445 state.set_placeholder(placeholder, window, cx)
446 446 });
@@ -684,7 +684,7 @@ impl Composer {
684 684 .text_size(px(12.))
685 685 .font_weight(FontWeight::SEMIBOLD)
686 686 .text_color(theme::accent_text())
687 .child(format!("Antwort an {}", reply.author)),
687 .child(format!("Replying to {}", reply.author)),
688 688 )
689 689 .child(
690 690 div()
@@ -151,7 +151,7 @@ impl Composer {
151 TextareaState::new(window, cx)
151 TextareaState::new(window, cx)
152 .auto_grow(MIN_ROWS, MAX_ROWS)
152 .auto_grow(MIN_ROWS, MAX_ROWS)
153 .submit_on_enter(true)
153 .submit_on_enter(true)
154 .placeholder("Nachricht")
154 .placeholder("Type a message")
155 });
155 });
156 let subscription = cx.subscribe_in(&input, window, Self::on_input_event);
156 let subscription = cx.subscribe_in(&input, window, Self::on_input_event);
157 let recent_emoji = emoji::Recent::load(&app.read(cx).store);
157 let recent_emoji = emoji::Recent::load(&app.read(cx).store);
@@ -440,7 +440,7 @@ impl Composer {
440 window: &mut Window,
440 window: &mut Window,
441 cx: &mut Context<Self>,
441 cx: &mut Context<Self>,
442 ) {
442 ) {
443 let placeholder = format!("Nachricht an {name}");
443 let placeholder = format!("Message {name}");
444 self.input.update(cx, |state, cx| {
444 self.input.update(cx, |state, cx| {
445 state.set_placeholder(placeholder, window, cx)
445 state.set_placeholder(placeholder, window, cx)
446 });
446 });
@@ -684,7 +684,7 @@ impl Composer {
684 .text_size(px(12.))
684 .text_size(px(12.))
685 .font_weight(FontWeight::SEMIBOLD)
685 .font_weight(FontWeight::SEMIBOLD)
686 .text_color(theme::accent_text())
686 .text_color(theme::accent_text())
687 .child(format!("Antwort an {}", reply.author)),
687 .child(format!("Replying to {}", reply.author)),
688 )
688 )
689 .child(
689 .child(
690 div()
690 div()
crates/app/src/views/conversation.rs +7 −7
@@ -386,7 +386,7 @@ impl ConversationView {
386 386 author: record
387 387 .sender_name
388 388 .clone()
389 .unwrap_or_else(|| "Unbekannt".to_owned()),
389 .unwrap_or_else(|| "Unknown".to_owned()),
390 390 excerpt: reply_excerpt(&record),
391 391 };
392 392 self.composer.update(cx, |composer, cx| {
@@ -742,7 +742,7 @@ impl ConversationView {
742 742 self.pending_outgoing.insert(key.clone(), outgoing.clone());
743 743 self.pending.push(MessageRow {
744 744 key: key.clone(),
745 author: "Du".to_owned(),
745 author: "You".to_owned(),
746 746 sender_id: my_user_id,
747 747 created_at: Utc::now(),
748 748 series: Series::default(),
@@ -883,7 +883,7 @@ impl ConversationView {
883 883 } else {
884 884 let pair = AvatarSpec::Pair(face(faces[0].clone()), face(faces[1].clone()));
885 885 lead = Some(spec_avatar(directory, &pair, 36., theme::background()));
886 subline = format!("{} Teilnehmer", chat.members.len());
886 subline = format!("{} participants", chat.members.len());
887 887 let shown: Vec<Face> = faces.iter().cloned().map(face).collect();
888 888 stack = Some(member_stack(directory, &shown, shown.len()));
889 889 }
@@ -967,7 +967,7 @@ impl Render for ConversationView {
967 967 .items_center()
968 968 .justify_center()
969 969 .text_color(theme::text_muted())
970 .child("Chat oder Channel auswählen")
970 .child("Select a chat or channel")
971 971 .into_any_element();
972 972 };
973 973 let rows = self.rows.clone();
@@ -1079,7 +1079,7 @@ impl Render for ConversationView {
1079 1079 .text_size(px(12.))
1080 1080 .text_color(theme::text_muted())
1081 1081 .child(icon(IconName::Loader, 12., theme::text_muted()))
1082 .child("Ältere Nachrichten werden geladen")
1082 .child("Loading older messages")
1083 1083 .into_any_element()
1084 1084 }
1085 1085 Some(Row::Start(start)) => {
@@ -1107,7 +1107,7 @@ impl Render for ConversationView {
1107 1107 div()
1108 1108 .text_size(px(12.))
1109 1109 .text_color(theme::text_muted())
1110 .child("Das ist der Anfang der Unterhaltung"),
1110 .child("This is the beginning of the conversation"),
1111 1111 )
1112 1112 .into_any_element()
1113 1113 }
@@ -1139,7 +1139,7 @@ impl Render for ConversationView {
1139 1139 .justify_center()
1140 1140 .text_size(px(13.))
1141 1141 .text_color(theme::text_muted())
1142 .child("Noch keine Beiträge in diesem Channel")
1142 .child("No posts in this channel yet")
1143 1143 .into_any_element()
1144 1144 } else {
1145 1145 scroller.into_any_element()
@@ -386,7 +386,7 @@ impl ConversationView {
386 author: record
386 author: record
387 .sender_name
387 .sender_name
388 .clone()
388 .clone()
389 .unwrap_or_else(|| "Unbekannt".to_owned()),
389 .unwrap_or_else(|| "Unknown".to_owned()),
390 excerpt: reply_excerpt(&record),
390 excerpt: reply_excerpt(&record),
391 };
391 };
392 self.composer.update(cx, |composer, cx| {
392 self.composer.update(cx, |composer, cx| {
@@ -742,7 +742,7 @@ impl ConversationView {
742 self.pending_outgoing.insert(key.clone(), outgoing.clone());
742 self.pending_outgoing.insert(key.clone(), outgoing.clone());
743 self.pending.push(MessageRow {
743 self.pending.push(MessageRow {
744 key: key.clone(),
744 key: key.clone(),
745 author: "Du".to_owned(),
745 author: "You".to_owned(),
746 sender_id: my_user_id,
746 sender_id: my_user_id,
747 created_at: Utc::now(),
747 created_at: Utc::now(),
748 series: Series::default(),
748 series: Series::default(),
@@ -883,7 +883,7 @@ impl ConversationView {
883 } else {
883 } else {
884 let pair = AvatarSpec::Pair(face(faces[0].clone()), face(faces[1].clone()));
884 let pair = AvatarSpec::Pair(face(faces[0].clone()), face(faces[1].clone()));
885 lead = Some(spec_avatar(directory, &pair, 36., theme::background()));
885 lead = Some(spec_avatar(directory, &pair, 36., theme::background()));
886 subline = format!("{} Teilnehmer", chat.members.len());
886 subline = format!("{} participants", chat.members.len());
887 let shown: Vec<Face> = faces.iter().cloned().map(face).collect();
887 let shown: Vec<Face> = faces.iter().cloned().map(face).collect();
888 stack = Some(member_stack(directory, &shown, shown.len()));
888 stack = Some(member_stack(directory, &shown, shown.len()));
889 }
889 }
@@ -967,7 +967,7 @@ impl Render for ConversationView {
967 .items_center()
967 .items_center()
968 .justify_center()
968 .justify_center()
969 .text_color(theme::text_muted())
969 .text_color(theme::text_muted())
970 .child("Chat oder Channel auswählen")
970 .child("Select a chat or channel")
971 .into_any_element();
971 .into_any_element();
972 };
972 };
973 let rows = self.rows.clone();
973 let rows = self.rows.clone();
@@ -1079,7 +1079,7 @@ impl Render for ConversationView {
1079 .text_size(px(12.))
1079 .text_size(px(12.))
1080 .text_color(theme::text_muted())
1080 .text_color(theme::text_muted())
1081 .child(icon(IconName::Loader, 12., theme::text_muted()))
1081 .child(icon(IconName::Loader, 12., theme::text_muted()))
1082 .child("Ältere Nachrichten werden geladen")
1082 .child("Loading older messages")
1083 .into_any_element()
1083 .into_any_element()
1084 }
1084 }
1085 Some(Row::Start(start)) => {
1085 Some(Row::Start(start)) => {
@@ -1107,7 +1107,7 @@ impl Render for ConversationView {
1107 div()
1107 div()
1108 .text_size(px(12.))
1108 .text_size(px(12.))
1109 .text_color(theme::text_muted())
1109 .text_color(theme::text_muted())
1110 .child("Das ist der Anfang der Unterhaltung"),
1110 .child("This is the beginning of the conversation"),
1111 )
1111 )
1112 .into_any_element()
1112 .into_any_element()
1113 }
1113 }
@@ -1139,7 +1139,7 @@ impl Render for ConversationView {
1139 .justify_center()
1139 .justify_center()
1140 .text_size(px(13.))
1140 .text_size(px(13.))
1141 .text_color(theme::text_muted())
1141 .text_color(theme::text_muted())
1142 .child("Noch keine Beiträge in diesem Channel")
1142 .child("No posts in this channel yet")
1143 .into_any_element()
1143 .into_any_element()
1144 } else {
1144 } else {
1145 scroller.into_any_element()
1145 scroller.into_any_element()
crates/app/src/views/emoji_popup.rs +3 −3
@@ -153,12 +153,12 @@ fn hint() -> Div {
153 153 .text_size(px(11.))
154 154 .text_color(theme::text_muted())
155 155 .child(key("↑↓"))
156 .child("wählen")
156 .child("select")
157 157 .child(key("Tab"))
158 158 .child(key("Enter"))
159 .child("einfügen")
159 .child("insert")
160 160 .child(key("Esc"))
161 .child("zu")
161 .child("close")
162 162 }
163 163
164 164 /// Bottom-left corner sits above `anchor`, the colon's top-left in window coordinates.
@@ -153,12 +153,12 @@ fn hint() -> Div {
153 .text_size(px(11.))
153 .text_size(px(11.))
154 .text_color(theme::text_muted())
154 .text_color(theme::text_muted())
155 .child(key("↑↓"))
155 .child(key("↑↓"))
156 .child("wählen")
156 .child("select")
157 .child(key("Tab"))
157 .child(key("Tab"))
158 .child(key("Enter"))
158 .child(key("Enter"))
159 .child("einfügen")
159 .child("insert")
160 .child(key("Esc"))
160 .child(key("Esc"))
161 .child("zu")
161 .child("close")
162}
162}
163
163
164/// Bottom-left corner sits above `anchor`, the colon's top-left in window coordinates.
164/// Bottom-left corner sits above `anchor`, the colon's top-left in window coordinates.
crates/app/src/views/message_row.rs +11 −11
@@ -86,7 +86,7 @@ fn new_marker() -> Div {
86 86 .text_size(px(11.))
87 87 .font_weight(FontWeight::SEMIBOLD)
88 88 .text_color(theme::accent_text())
89 .child("Neu"),
89 .child("New"),
90 90 )
91 91 }
92 92
@@ -186,7 +186,7 @@ fn bubble_meta(row: &MessageRow, own: bool) -> Div {
186 186 .line_height(px(14.))
187 187 .italic()
188 188 .text_color(tint)
189 .when(row.edited, |meta| meta.child("bearbeitet"))
189 .when(row.edited, |meta| meta.child("Edited"))
190 190 .child(row.time.clone())
191 191 .when(own && row.delivery == Delivery::Delivered, |meta| {
192 192 if row.read {
@@ -233,7 +233,7 @@ fn delivery_note(row: &MessageRow, retry: RowAction, index: usize) -> Option<Any
233 233 .text_size(px(11.))
234 234 .text_color(theme::text_muted())
235 235 .child(icon(IconName::Loader, 12., theme::text_muted()))
236 .child("Wird gesendet")
236 .child("Sending")
237 237 .into_any_element(),
238 238 ),
239 239 Delivery::Failed(_) => Some(
@@ -241,14 +241,14 @@ fn delivery_note(row: &MessageRow, retry: RowAction, index: usize) -> Option<Any
241 241 .gap(px(4.))
242 242 .text_size(px(11.))
243 243 .text_color(theme::red_soft())
244 .child("Nicht gesendet.")
244 .child("Failed to send.")
245 245 .child(
246 246 div()
247 247 .id(ElementId::Name(format!("retry-{index}").into()))
248 248 .cursor_pointer()
249 249 .text_color(theme::red_tint())
250 250 .underline()
251 .child("Erneut senden")
251 .child("Retry")
252 252 .when_some(retry, |link, retry| {
253 253 link.on_click(move |_, _, cx| retry(cx))
254 254 }),
@@ -263,7 +263,7 @@ fn edited_marker() -> Div {
263 263 .text_size(px(11.))
264 264 .italic()
265 265 .text_color(theme::text_muted())
266 .child("bearbeitet")
266 .child("Edited")
267 267 }
268 268
269 269 fn post_card(row: &MessageRow, index: usize, directory: &Directory, cx: &App) -> Div {
@@ -322,23 +322,23 @@ fn post_card(row: &MessageRow, index: usize, directory: &Directory, cx: &App) ->
322 322 theme::text_muted()
323 323 })
324 324 .child(match count {
325 0 => "Keine Antworten".to_owned(),
326 1 => "1 Antwort".to_owned(),
327 count => format!("{count} Antworten"),
325 0 => "No replies".to_owned(),
326 1 => "1 reply".to_owned(),
327 count => format!("{count} replies"),
328 328 }),
329 329 )
330 330 .children(row.last_reply_time.as_ref().map(|time| {
331 331 div()
332 332 .text_size(px(11.5))
333 333 .text_color(theme::text_muted())
334 .child(format!("zuletzt {time}"))
334 .child(format!("Last reply {time}"))
335 335 }))
336 336 .child(div().flex_1())
337 337 .child(
338 338 div()
339 339 .text_size(px(12.5))
340 340 .text_color(theme::text_soft())
341 .child("Antworten"),
341 .child("Reply"),
342 342 );
343 343 let mut body = v_flex().gap(px(8.)).child(header);
344 344 if row.deleted {
@@ -86,7 +86,7 @@ fn new_marker() -> Div {
86 .text_size(px(11.))
86 .text_size(px(11.))
87 .font_weight(FontWeight::SEMIBOLD)
87 .font_weight(FontWeight::SEMIBOLD)
88 .text_color(theme::accent_text())
88 .text_color(theme::accent_text())
89 .child("Neu"),
89 .child("New"),
90 )
90 )
91}
91}
92
92
@@ -186,7 +186,7 @@ fn bubble_meta(row: &MessageRow, own: bool) -> Div {
186 .line_height(px(14.))
186 .line_height(px(14.))
187 .italic()
187 .italic()
188 .text_color(tint)
188 .text_color(tint)
189 .when(row.edited, |meta| meta.child("bearbeitet"))
189 .when(row.edited, |meta| meta.child("Edited"))
190 .child(row.time.clone())
190 .child(row.time.clone())
191 .when(own && row.delivery == Delivery::Delivered, |meta| {
191 .when(own && row.delivery == Delivery::Delivered, |meta| {
192 if row.read {
192 if row.read {
@@ -233,7 +233,7 @@ fn delivery_note(row: &MessageRow, retry: RowAction, index: usize) -> Option<Any
233 .text_size(px(11.))
233 .text_size(px(11.))
234 .text_color(theme::text_muted())
234 .text_color(theme::text_muted())
235 .child(icon(IconName::Loader, 12., theme::text_muted()))
235 .child(icon(IconName::Loader, 12., theme::text_muted()))
236 .child("Wird gesendet")
236 .child("Sending")
237 .into_any_element(),
237 .into_any_element(),
238 ),
238 ),
239 Delivery::Failed(_) => Some(
239 Delivery::Failed(_) => Some(
@@ -241,14 +241,14 @@ fn delivery_note(row: &MessageRow, retry: RowAction, index: usize) -> Option<Any
241 .gap(px(4.))
241 .gap(px(4.))
242 .text_size(px(11.))
242 .text_size(px(11.))
243 .text_color(theme::red_soft())
243 .text_color(theme::red_soft())
244 .child("Nicht gesendet.")
244 .child("Failed to send.")
245 .child(
245 .child(
246 div()
246 div()
247 .id(ElementId::Name(format!("retry-{index}").into()))
247 .id(ElementId::Name(format!("retry-{index}").into()))
248 .cursor_pointer()
248 .cursor_pointer()
249 .text_color(theme::red_tint())
249 .text_color(theme::red_tint())
250 .underline()
250 .underline()
251 .child("Erneut senden")
251 .child("Retry")
252 .when_some(retry, |link, retry| {
252 .when_some(retry, |link, retry| {
253 link.on_click(move |_, _, cx| retry(cx))
253 link.on_click(move |_, _, cx| retry(cx))
254 }),
254 }),
@@ -263,7 +263,7 @@ fn edited_marker() -> Div {
263 .text_size(px(11.))
263 .text_size(px(11.))
264 .italic()
264 .italic()
265 .text_color(theme::text_muted())
265 .text_color(theme::text_muted())
266 .child("bearbeitet")
266 .child("Edited")
267}
267}
268
268
269fn post_card(row: &MessageRow, index: usize, directory: &Directory, cx: &App) -> Div {
269fn post_card(row: &MessageRow, index: usize, directory: &Directory, cx: &App) -> Div {
@@ -322,23 +322,23 @@ fn post_card(row: &MessageRow, index: usize, directory: &Directory, cx: &App) ->
322 theme::text_muted()
322 theme::text_muted()
323 })
323 })
324 .child(match count {
324 .child(match count {
325 0 => "Keine Antworten".to_owned(),
325 0 => "No replies".to_owned(),
326 1 => "1 Antwort".to_owned(),
326 1 => "1 reply".to_owned(),
327 count => format!("{count} Antworten"),
327 count => format!("{count} replies"),
328 }),
328 }),
329 )
329 )
330 .children(row.last_reply_time.as_ref().map(|time| {
330 .children(row.last_reply_time.as_ref().map(|time| {
331 div()
331 div()
332 .text_size(px(11.5))
332 .text_size(px(11.5))
333 .text_color(theme::text_muted())
333 .text_color(theme::text_muted())
334 .child(format!("zuletzt {time}"))
334 .child(format!("Last reply {time}"))
335 }))
335 }))
336 .child(div().flex_1())
336 .child(div().flex_1())
337 .child(
337 .child(
338 div()
338 div()
339 .text_size(px(12.5))
339 .text_size(px(12.5))
340 .text_color(theme::text_soft())
340 .text_color(theme::text_soft())
341 .child("Antworten"),
341 .child("Reply"),
342 );
342 );
343 let mut body = v_flex().gap(px(8.)).child(header);
343 let mut body = v_flex().gap(px(8.)).child(header);
344 if row.deleted {
344 if row.deleted {
crates/app/src/views/sidebar.rs +21 −22
@@ -28,9 +28,9 @@ const HINT_HEIGHT: f32 = 26.;
28 28 const FALLBACK_VIEWPORT: f32 = 900.;
29 29 const VIEWPORT_MARGIN: f32 = 300.;
30 30 const AVATAR_SIZE: f32 = 36.;
31 const PINNED_LABEL: &str = "Angeheftet";
31 const PINNED_LABEL: &str = "Pinned";
32 32 const TEAMS_LABEL: &str = "Teams";
33 const HIDDEN_TEAMS_LABEL: &str = "Ausgeblendete Teams";
33 const HIDDEN_TEAMS_LABEL: &str = "Hidden teams";
34 34 const TEAM_ROW_HEIGHT: f32 = 40.;
35 35 const REVEAL_ROW_HEIGHT: f32 = 32.;
36 36
@@ -97,8 +97,8 @@ fn preview_text(preview: &Preview) -> Option<(String, bool)> {
97 97
98 98 fn preview_icon(text: &str) -> Option<IconName> {
99 99 match text.rsplit(": ").next()? {
100 "Bild" => Some(IconName::Image),
101 "Datei" => Some(IconName::File),
100 "Image" => Some(IconName::Image),
101 "File" => Some(IconName::File),
102 102 _ => None,
103 103 }
104 104 }
@@ -377,7 +377,7 @@ impl SidebarView {
377 377 let pin_state = context.state.clone();
378 378 let pin_id = chat_id.clone();
379 379 let mut popup = popup.item(
380 PopupMenuItem::new(if pinned { "Lösen" } else { "Anheften" }).on_click(
380 PopupMenuItem::new(if pinned { "Unpin" } else { "Pin" }).on_click(
381 381 move |_, _, cx| {
382 382 pin_state.update(cx, |state, cx| {
383 383 if pinned {
@@ -393,24 +393,23 @@ impl SidebarView {
393 393 let folders = context.folders.clone();
394 394 let move_state = context.state.clone();
395 395 let move_id = chat_id.clone();
396 popup =
397 popup.submenu("In Ordner verschieben", window, cx, move |submenu, _, _| {
398 folders.iter().fold(submenu, |submenu, (folder_id, name)| {
399 let (state, chat_id, folder_id) =
400 (move_state.clone(), move_id.clone(), folder_id.clone());
401 submenu.item(PopupMenuItem::new(name.clone()).on_click(
402 move |_, _, cx| {
403 state.update(cx, |state, cx| {
404 state.move_chat(&chat_id, Some(&folder_id), cx)
405 });
406 },
407 ))
408 })
409 });
396 popup = popup.submenu("Move to folder", window, cx, move |submenu, _, _| {
397 folders.iter().fold(submenu, |submenu, (folder_id, name)| {
398 let (state, chat_id, folder_id) =
399 (move_state.clone(), move_id.clone(), folder_id.clone());
400 submenu.item(PopupMenuItem::new(name.clone()).on_click(
401 move |_, _, cx| {
402 state.update(cx, |state, cx| {
403 state.move_chat(&chat_id, Some(&folder_id), cx)
404 });
405 },
406 ))
407 })
408 });
410 409 }
411 410 let read_state = context.state.clone();
412 411 popup.item(
413 PopupMenuItem::new("Als gelesen markieren")
412 PopupMenuItem::new("Mark as read")
414 413 .disabled(!unread)
415 414 .on_click(move |_, _, cx| {
416 415 read_state.update(cx, |state, cx| state.mark_chat_read(&chat_id, cx));
@@ -891,9 +890,9 @@ fn team_holds(entry: &SidebarTeam, selected: Option<&Selection>) -> bool {
891 890
892 891 fn hidden_channels_label(count: usize) -> String {
893 892 if count == 1 {
894 "1 ausgeblendeter Channel".to_owned()
893 "1 hidden channel".to_owned()
895 894 } else {
896 format!("{count} ausgeblendete Channels")
895 format!("{count} hidden channels")
897 896 }
898 897 }
899 898
@@ -28,9 +28,9 @@ const HINT_HEIGHT: f32 = 26.;
28const FALLBACK_VIEWPORT: f32 = 900.;
28const FALLBACK_VIEWPORT: f32 = 900.;
29const VIEWPORT_MARGIN: f32 = 300.;
29const VIEWPORT_MARGIN: f32 = 300.;
30const AVATAR_SIZE: f32 = 36.;
30const AVATAR_SIZE: f32 = 36.;
31const PINNED_LABEL: &str = "Angeheftet";
31const PINNED_LABEL: &str = "Pinned";
32const TEAMS_LABEL: &str = "Teams";
32const TEAMS_LABEL: &str = "Teams";
33const HIDDEN_TEAMS_LABEL: &str = "Ausgeblendete Teams";
33const HIDDEN_TEAMS_LABEL: &str = "Hidden teams";
34const TEAM_ROW_HEIGHT: f32 = 40.;
34const TEAM_ROW_HEIGHT: f32 = 40.;
35const REVEAL_ROW_HEIGHT: f32 = 32.;
35const REVEAL_ROW_HEIGHT: f32 = 32.;
36
36
@@ -97,8 +97,8 @@ fn preview_text(preview: &Preview) -> Option<(String, bool)> {
97
97
98fn preview_icon(text: &str) -> Option<IconName> {
98fn preview_icon(text: &str) -> Option<IconName> {
99 match text.rsplit(": ").next()? {
99 match text.rsplit(": ").next()? {
100 "Bild" => Some(IconName::Image),
100 "Image" => Some(IconName::Image),
101 "Datei" => Some(IconName::File),
101 "File" => Some(IconName::File),
102 _ => None,
102 _ => None,
103 }
103 }
104}
104}
@@ -377,7 +377,7 @@ impl SidebarView {
377 let pin_state = context.state.clone();
377 let pin_state = context.state.clone();
378 let pin_id = chat_id.clone();
378 let pin_id = chat_id.clone();
379 let mut popup = popup.item(
379 let mut popup = popup.item(
380 PopupMenuItem::new(if pinned { "Lösen" } else { "Anheften" }).on_click(
380 PopupMenuItem::new(if pinned { "Unpin" } else { "Pin" }).on_click(
381 move |_, _, cx| {
381 move |_, _, cx| {
382 pin_state.update(cx, |state, cx| {
382 pin_state.update(cx, |state, cx| {
383 if pinned {
383 if pinned {
@@ -393,24 +393,23 @@ impl SidebarView {
393 let folders = context.folders.clone();
393 let folders = context.folders.clone();
394 let move_state = context.state.clone();
394 let move_state = context.state.clone();
395 let move_id = chat_id.clone();
395 let move_id = chat_id.clone();
396 popup =
396 popup = popup.submenu("Move to folder", window, cx, move |submenu, _, _| {
397 popup.submenu("In Ordner verschieben", window, cx, move |submenu, _, _| {
397 folders.iter().fold(submenu, |submenu, (folder_id, name)| {
398 folders.iter().fold(submenu, |submenu, (folder_id, name)| {
398 let (state, chat_id, folder_id) =
399 let (state, chat_id, folder_id) =
399 (move_state.clone(), move_id.clone(), folder_id.clone());
400 (move_state.clone(), move_id.clone(), folder_id.clone());
400 submenu.item(PopupMenuItem::new(name.clone()).on_click(
401 submenu.item(PopupMenuItem::new(name.clone()).on_click(
401 move |_, _, cx| {
402 move |_, _, cx| {
402 state.update(cx, |state, cx| {
403 state.update(cx, |state, cx| {
403 state.move_chat(&chat_id, Some(&folder_id), cx)
404 state.move_chat(&chat_id, Some(&folder_id), cx)
404 });
405 });
405 },
406 },
406 ))
407 ))
407 })
408 })
408 });
409 });
410 }
409 }
411 let read_state = context.state.clone();
410 let read_state = context.state.clone();
412 popup.item(
411 popup.item(
413 PopupMenuItem::new("Als gelesen markieren")
412 PopupMenuItem::new("Mark as read")
414 .disabled(!unread)
413 .disabled(!unread)
415 .on_click(move |_, _, cx| {
414 .on_click(move |_, _, cx| {
416 read_state.update(cx, |state, cx| state.mark_chat_read(&chat_id, cx));
415 read_state.update(cx, |state, cx| state.mark_chat_read(&chat_id, cx));
@@ -891,9 +890,9 @@ fn team_holds(entry: &SidebarTeam, selected: Option<&Selection>) -> bool {
891
890
892fn hidden_channels_label(count: usize) -> String {
891fn hidden_channels_label(count: usize) -> String {
893 if count == 1 {
892 if count == 1 {
894 "1 ausgeblendeter Channel".to_owned()
893 "1 hidden channel".to_owned()
895 } else {
894 } else {
896 format!("{count} ausgeblendete Channels")
895 format!("{count} hidden channels")
897 }
896 }
898}
897}
899
898
crates/app/src/views/status_bar.rs +20 −23
@@ -17,36 +17,33 @@ pub enum Tone {
17 17
18 18 pub fn connection_text(connection: &ConnectionState, mode: Mode) -> (String, Tone) {
19 19 if mode.demo {
20 return ("Demodaten".to_owned(), Tone::Warn);
20 return ("Demo data".to_owned(), Tone::Warn);
21 21 }
22 22 match connection {
23 ConnectionState::Connecting => ("Verbinde".to_owned(), Tone::Warn),
24 ConnectionState::Online => ("Verbunden".to_owned(), Tone::Good),
25 ConnectionState::NoBrowser => ("Browser nicht gestartet".to_owned(), Tone::Bad),
26 ConnectionState::NoAppTab => ("Teams nicht geladen".to_owned(), Tone::Bad),
27 ConnectionState::LoginRequired => ("Anmeldung nötig".to_owned(), Tone::Bad),
28 ConnectionState::Failed(message) => (format!("Fehler: {message}"), Tone::Bad),
23 ConnectionState::Connecting => ("Connecting".to_owned(), Tone::Warn),
24 ConnectionState::Online => ("Connected".to_owned(), Tone::Good),
25 ConnectionState::NoBrowser => ("Browser not running".to_owned(), Tone::Bad),
26 ConnectionState::NoAppTab => ("Teams not loaded".to_owned(), Tone::Bad),
27 ConnectionState::LoginRequired => ("Sign-in required".to_owned(), Tone::Bad),
28 ConnectionState::Failed(message) => (format!("Error: {message}"), Tone::Bad),
29 29 }
30 30 }
31 31
32 32 pub fn live_text(live: LiveState) -> Option<(&'static str, Tone)> {
33 33 match live {
34 34 LiveState::Off => None,
35 LiveState::Connecting => Some(("Live: verbinde", Tone::Warn)),
35 LiveState::Connecting => Some(("Live: connecting", Tone::Warn)),
36 36 LiveState::Live => Some(("Live", Tone::Good)),
37 LiveState::Reconnecting => Some(("Live: verbinde neu", Tone::Warn)),
38 LiveState::MessageLoss => Some(("Live: Nachrichten verpasst, synchronisiere", Tone::Warn)),
39 LiveState::Failed => Some(("Live: nicht verfügbar", Tone::Bad)),
37 LiveState::Reconnecting => Some(("Live: reconnecting", Tone::Warn)),
38 LiveState::MessageLoss => Some(("Live: missed messages, syncing", Tone::Warn)),
39 LiveState::Failed => Some(("Live: unavailable", Tone::Bad)),
40 40 }
41 41 }
42 42
43 43 pub fn sync_text(last_sync: Option<DateTime<Utc>>) -> String {
44 44 match last_sync {
45 Some(time) => format!(
46 "Synchronisiert {}",
47 time.with_timezone(&Local).format("%H:%M")
48 ),
49 None => "Noch nicht synchronisiert".to_owned(),
45 Some(time) => format!("Synced {}", time.with_timezone(&Local).format("%H:%M")),
46 None => "Not synced yet".to_owned(),
50 47 }
51 48 }
52 49
@@ -92,7 +89,7 @@ pub fn render_status_bar(
92 89 }
93 90 bar = bar.child(div().child(sync_text(state.last_sync)));
94 91 if state.mode.read_only {
95 bar = bar.child(div().text_color(theme::amber()).child("Nur lesen"));
92 bar = bar.child(div().text_color(theme::amber()).child("Read-only"));
96 93 }
97 94 match update {
98 95 UpdateStatus::UpToDate => {}
@@ -106,7 +103,7 @@ pub fn render_status_bar(
106 103 .text_color(theme::on_accent())
107 104 .cursor_pointer()
108 105 .hover(|button| button.bg(theme::accent_text()))
109 .child("Update bereit - Neu starten")
106 .child("Update ready - Restart")
110 107 .on_click(on_restart),
111 108 )
112 109 }
@@ -114,7 +111,7 @@ pub fn render_status_bar(
114 111 bar = bar.child(
115 112 div()
116 113 .text_color(theme::red())
117 .child(format!("Update fehlgeschlagen: {message}")),
114 .child(format!("Update failed: {message}")),
118 115 )
119 116 }
120 117 }
@@ -147,7 +144,7 @@ mod tests {
147 144 );
148 145 assert_eq!(
149 146 connection_text(&ConnectionState::LoginRequired, mode).0,
150 "Anmeldung nötig"
147 "Sign-in required"
151 148 );
152 149 assert_eq!(
153 150 connection_text(&ConnectionState::Connecting, mode).1,
@@ -168,7 +165,7 @@ mod tests {
168 165 };
169 166 assert_eq!(
170 167 connection_text(&ConnectionState::NoBrowser, mode).0,
171 "Demodaten"
168 "Demo data"
172 169 );
173 170 }
174 171
@@ -180,7 +177,7 @@ mod tests {
180 177
181 178 #[test]
182 179 fn sync_text_without_sync() {
183 assert_eq!(sync_text(None), "Noch nicht synchronisiert");
184 assert!(sync_text(Some(Utc::now())).starts_with("Synchronisiert "));
180 assert_eq!(sync_text(None), "Not synced yet");
181 assert!(sync_text(Some(Utc::now())).starts_with("Synced "));
185 182 }
186 183 }
@@ -17,36 +17,33 @@ pub enum Tone {
17
17
18pub fn connection_text(connection: &ConnectionState, mode: Mode) -> (String, Tone) {
18pub fn connection_text(connection: &ConnectionState, mode: Mode) -> (String, Tone) {
19 if mode.demo {
19 if mode.demo {
20 return ("Demodaten".to_owned(), Tone::Warn);
20 return ("Demo data".to_owned(), Tone::Warn);
21 }
21 }
22 match connection {
22 match connection {
23 ConnectionState::Connecting => ("Verbinde".to_owned(), Tone::Warn),
23 ConnectionState::Connecting => ("Connecting".to_owned(), Tone::Warn),
24 ConnectionState::Online => ("Verbunden".to_owned(), Tone::Good),
24 ConnectionState::Online => ("Connected".to_owned(), Tone::Good),
25 ConnectionState::NoBrowser => ("Browser nicht gestartet".to_owned(), Tone::Bad),
25 ConnectionState::NoBrowser => ("Browser not running".to_owned(), Tone::Bad),
26 ConnectionState::NoAppTab => ("Teams nicht geladen".to_owned(), Tone::Bad),
26 ConnectionState::NoAppTab => ("Teams not loaded".to_owned(), Tone::Bad),
27 ConnectionState::LoginRequired => ("Anmeldung nötig".to_owned(), Tone::Bad),
27 ConnectionState::LoginRequired => ("Sign-in required".to_owned(), Tone::Bad),
28 ConnectionState::Failed(message) => (format!("Fehler: {message}"), Tone::Bad),
28 ConnectionState::Failed(message) => (format!("Error: {message}"), Tone::Bad),
29 }
29 }
30}
30}
31
31
32pub fn live_text(live: LiveState) -> Option<(&'static str, Tone)> {
32pub fn live_text(live: LiveState) -> Option<(&'static str, Tone)> {
33 match live {
33 match live {
34 LiveState::Off => None,
34 LiveState::Off => None,
35 LiveState::Connecting => Some(("Live: verbinde", Tone::Warn)),
35 LiveState::Connecting => Some(("Live: connecting", Tone::Warn)),
36 LiveState::Live => Some(("Live", Tone::Good)),
36 LiveState::Live => Some(("Live", Tone::Good)),
37 LiveState::Reconnecting => Some(("Live: verbinde neu", Tone::Warn)),
37 LiveState::Reconnecting => Some(("Live: reconnecting", Tone::Warn)),
38 LiveState::MessageLoss => Some(("Live: Nachrichten verpasst, synchronisiere", Tone::Warn)),
38 LiveState::MessageLoss => Some(("Live: missed messages, syncing", Tone::Warn)),
39 LiveState::Failed => Some(("Live: nicht verfügbar", Tone::Bad)),
39 LiveState::Failed => Some(("Live: unavailable", Tone::Bad)),
40 }
40 }
41}
41}
42
42
43pub fn sync_text(last_sync: Option<DateTime<Utc>>) -> String {
43pub fn sync_text(last_sync: Option<DateTime<Utc>>) -> String {
44 match last_sync {
44 match last_sync {
45 Some(time) => format!(
45 Some(time) => format!("Synced {}", time.with_timezone(&Local).format("%H:%M")),
46 "Synchronisiert {}",
46 None => "Not synced yet".to_owned(),
47 time.with_timezone(&Local).format("%H:%M")
48 ),
49 None => "Noch nicht synchronisiert".to_owned(),
50 }
47 }
51}
48}
52
49
@@ -92,7 +89,7 @@ pub fn render_status_bar(
92 }
89 }
93 bar = bar.child(div().child(sync_text(state.last_sync)));
90 bar = bar.child(div().child(sync_text(state.last_sync)));
94 if state.mode.read_only {
91 if state.mode.read_only {
95 bar = bar.child(div().text_color(theme::amber()).child("Nur lesen"));
92 bar = bar.child(div().text_color(theme::amber()).child("Read-only"));
96 }
93 }
97 match update {
94 match update {
98 UpdateStatus::UpToDate => {}
95 UpdateStatus::UpToDate => {}
@@ -106,7 +103,7 @@ pub fn render_status_bar(
106 .text_color(theme::on_accent())
103 .text_color(theme::on_accent())
107 .cursor_pointer()
104 .cursor_pointer()
108 .hover(|button| button.bg(theme::accent_text()))
105 .hover(|button| button.bg(theme::accent_text()))
109 .child("Update bereit - Neu starten")
106 .child("Update ready - Restart")
110 .on_click(on_restart),
107 .on_click(on_restart),
111 )
108 )
112 }
109 }
@@ -114,7 +111,7 @@ pub fn render_status_bar(
114 bar = bar.child(
111 bar = bar.child(
115 div()
112 div()
116 .text_color(theme::red())
113 .text_color(theme::red())
117 .child(format!("Update fehlgeschlagen: {message}")),
114 .child(format!("Update failed: {message}")),
118 )
115 )
119 }
116 }
120 }
117 }
@@ -147,7 +144,7 @@ mod tests {
147 );
144 );
148 assert_eq!(
145 assert_eq!(
149 connection_text(&ConnectionState::LoginRequired, mode).0,
146 connection_text(&ConnectionState::LoginRequired, mode).0,
150 "Anmeldung nötig"
147 "Sign-in required"
151 );
148 );
152 assert_eq!(
149 assert_eq!(
153 connection_text(&ConnectionState::Connecting, mode).1,
150 connection_text(&ConnectionState::Connecting, mode).1,
@@ -168,7 +165,7 @@ mod tests {
168 };
165 };
169 assert_eq!(
166 assert_eq!(
170 connection_text(&ConnectionState::NoBrowser, mode).0,
167 connection_text(&ConnectionState::NoBrowser, mode).0,
171 "Demodaten"
168 "Demo data"
172 );
169 );
173 }
170 }
174
171
@@ -180,7 +177,7 @@ mod tests {
180
177
181 #[test]
178 #[test]
182 fn sync_text_without_sync() {
179 fn sync_text_without_sync() {
183 assert_eq!(sync_text(None), "Noch nicht synchronisiert");
180 assert_eq!(sync_text(None), "Not synced yet");
184 assert!(sync_text(Some(Utc::now())).starts_with("Synchronisiert "));
181 assert!(sync_text(Some(Utc::now())).starts_with("Synced "));
185 }
182 }
186}
183}
crates/app/src/views/switcher.rs +7 −7
@@ -26,7 +26,7 @@ const MAX_RESULTS: usize = 9;
26 26 const MAX_RESULTS_WITH_MESSAGES: usize = 5;
27 27 const MAX_MESSAGE_RESULTS: usize = 5;
28 28 const MIN_MESSAGE_QUERY_CHARS: usize = 2;
29 const MESSAGE_GROUP: &str = "Nachrichten";
29 const MESSAGE_GROUP: &str = "Messages";
30 30 const CARD_WIDTH: f32 = 520.;
31 31
32 32 pub enum SwitcherEvent {
@@ -81,7 +81,7 @@ pub fn message_results(
81 81 Some(MessageResult {
82 82 selection,
83 83 message_id: hit.message_id,
84 author: hit.sender_name.unwrap_or_else(|| "Unbekannt".to_owned()),
84 author: hit.sender_name.unwrap_or_else(|| "Unknown".to_owned()),
85 85 conversation,
86 86 date: format::list_time_label(hit.created_at, today, offset),
87 87 snippet,
@@ -138,7 +138,7 @@ pub fn candidates_from(state: &AppState) -> Vec<(String, Candidate)> {
138 138 subtitle: if is_one_on_one(chat) {
139 139 "Chat".to_owned()
140 140 } else {
141 format!("Gruppenchat, {} Teilnehmer", chat.members.len())
141 format!("Group chat, {} participants", chat.members.len())
142 142 },
143 143 avatar: CandidateAvatar::Chat(avatar_for(chat, me)),
144 144 selection: Selection::Chat(chat.id.clone()),
@@ -180,7 +180,7 @@ impl Switcher {
180 180 cx: &mut Context<Self>,
181 181 ) -> Self {
182 182 let input = cx.new(|cx| {
183 InputState::new(window, cx).placeholder("Zu Chat, Channel oder Nachricht springen")
183 InputState::new(window, cx).placeholder("Jump to a chat, channel or message")
184 184 });
185 185 if !initial_query.is_empty() {
186 186 let query = initial_query.to_owned();
@@ -460,9 +460,9 @@ impl Render for Switcher {
460 460 .border_color(theme::border())
461 461 .text_size(px(11.))
462 462 .text_color(theme::text_muted())
463 .child("Enter öffnen")
464 .child("Pfeile wählen")
465 .child("Esc schließen");
463 .child("Enter to open")
464 .child("Arrows to select")
465 .child("Esc to close");
466 466 div()
467 467 .id("switcher-backdrop")
468 468 .absolute()
@@ -26,7 +26,7 @@ const MAX_RESULTS: usize = 9;
26const MAX_RESULTS_WITH_MESSAGES: usize = 5;
26const MAX_RESULTS_WITH_MESSAGES: usize = 5;
27const MAX_MESSAGE_RESULTS: usize = 5;
27const MAX_MESSAGE_RESULTS: usize = 5;
28const MIN_MESSAGE_QUERY_CHARS: usize = 2;
28const MIN_MESSAGE_QUERY_CHARS: usize = 2;
29const MESSAGE_GROUP: &str = "Nachrichten";
29const MESSAGE_GROUP: &str = "Messages";
30const CARD_WIDTH: f32 = 520.;
30const CARD_WIDTH: f32 = 520.;
31
31
32pub enum SwitcherEvent {
32pub enum SwitcherEvent {
@@ -81,7 +81,7 @@ pub fn message_results(
81 Some(MessageResult {
81 Some(MessageResult {
82 selection,
82 selection,
83 message_id: hit.message_id,
83 message_id: hit.message_id,
84 author: hit.sender_name.unwrap_or_else(|| "Unbekannt".to_owned()),
84 author: hit.sender_name.unwrap_or_else(|| "Unknown".to_owned()),
85 conversation,
85 conversation,
86 date: format::list_time_label(hit.created_at, today, offset),
86 date: format::list_time_label(hit.created_at, today, offset),
87 snippet,
87 snippet,
@@ -138,7 +138,7 @@ pub fn candidates_from(state: &AppState) -> Vec<(String, Candidate)> {
138 subtitle: if is_one_on_one(chat) {
138 subtitle: if is_one_on_one(chat) {
139 "Chat".to_owned()
139 "Chat".to_owned()
140 } else {
140 } else {
141 format!("Gruppenchat, {} Teilnehmer", chat.members.len())
141 format!("Group chat, {} participants", chat.members.len())
142 },
142 },
143 avatar: CandidateAvatar::Chat(avatar_for(chat, me)),
143 avatar: CandidateAvatar::Chat(avatar_for(chat, me)),
144 selection: Selection::Chat(chat.id.clone()),
144 selection: Selection::Chat(chat.id.clone()),
@@ -180,7 +180,7 @@ impl Switcher {
180 cx: &mut Context<Self>,
180 cx: &mut Context<Self>,
181 ) -> Self {
181 ) -> Self {
182 let input = cx.new(|cx| {
182 let input = cx.new(|cx| {
183 InputState::new(window, cx).placeholder("Zu Chat, Channel oder Nachricht springen")
183 InputState::new(window, cx).placeholder("Jump to a chat, channel or message")
184 });
184 });
185 if !initial_query.is_empty() {
185 if !initial_query.is_empty() {
186 let query = initial_query.to_owned();
186 let query = initial_query.to_owned();
@@ -460,9 +460,9 @@ impl Render for Switcher {
460 .border_color(theme::border())
460 .border_color(theme::border())
461 .text_size(px(11.))
461 .text_size(px(11.))
462 .text_color(theme::text_muted())
462 .text_color(theme::text_muted())
463 .child("Enter öffnen")
463 .child("Enter to open")
464 .child("Pfeile wählen")
464 .child("Arrows to select")
465 .child("Esc schließen");
465 .child("Esc to close");
466 div()
466 div()
467 .id("switcher-backdrop")
467 .id("switcher-backdrop")
468 .absolute()
468 .absolute()
crates/app/src/views/title_bar.rs +1 −1
@@ -11,7 +11,7 @@ use crate::theme;
11 11
12 12 pub const TITLE_BAR_HEIGHT: f32 = 40.;
13 13 const SEARCH_WIDTH: f32 = 380.;
14 const SEARCH_HINT: &str = "Chats, Personen, Channels suchen";
14 const SEARCH_HINT: &str = "Search chats, people and channels";
15 15 const SHORTCUT_HINT: &str = "Ctrl K";
16 16 const OWN_AVATAR_SIZE: f32 = 26.;
17 17 const APP_ICON_SIZE: f32 = 18.;
@@ -11,7 +11,7 @@ use crate::theme;
11
11
12pub const TITLE_BAR_HEIGHT: f32 = 40.;
12pub const TITLE_BAR_HEIGHT: f32 = 40.;
13const SEARCH_WIDTH: f32 = 380.;
13const SEARCH_WIDTH: f32 = 380.;
14const SEARCH_HINT: &str = "Chats, Personen, Channels suchen";
14const SEARCH_HINT: &str = "Search chats, people and channels";
15const SHORTCUT_HINT: &str = "Ctrl K";
15const SHORTCUT_HINT: &str = "Ctrl K";
16const OWN_AVATAR_SIZE: f32 = 26.;
16const OWN_AVATAR_SIZE: f32 = 26.;
17const APP_ICON_SIZE: f32 = 18.;
17const APP_ICON_SIZE: f32 = 18.;
crates/webview/examples/probe.rs +1 −1
@@ -10,7 +10,7 @@ async fn main() {
10 10 let started = Instant::now();
11 11 let transport = webview::start(webview::HostConfig {
12 12 user_data_folder: folder,
13 window_title: "Rusty Teams probe - Anmeldung".into(),
13 window_title: "Rusty Teams probe - Sign in".into(),
14 14 });
15 15 let session = match Session::with_transport(transport, SessionConfig::default()).await {
16 16 Ok(session) => session,
@@ -10,7 +10,7 @@ async fn main() {
10 let started = Instant::now();
10 let started = Instant::now();
11 let transport = webview::start(webview::HostConfig {
11 let transport = webview::start(webview::HostConfig {
12 user_data_folder: folder,
12 user_data_folder: folder,
13 window_title: "Rusty Teams probe - Anmeldung".into(),
13 window_title: "Rusty Teams probe - Sign in".into(),
14 });
14 });
15 let session = match Session::with_transport(transport, SessionConfig::default()).await {
15 let session = match Session::with_transport(transport, SessionConfig::default()).await {
16 Ok(session) => session,
16 Ok(session) => session,