|
|
|
@ -24,6 +24,7 @@ struct Log {
|
|
|
|
|
description: String,
|
|
|
|
|
message: String,
|
|
|
|
|
channel: String,
|
|
|
|
|
is_interaction: bool
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl App {
|
|
|
|
@ -98,15 +99,23 @@ impl eframe::App for App {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if msg.channel == self.selected_channel {
|
|
|
|
|
ui.horizontal(|ui| {
|
|
|
|
|
ui.label(RichText::new(&msg.name).color(Color32::LIGHT_GRAY));
|
|
|
|
|
if !&msg.description.is_empty() {
|
|
|
|
|
self.description = (&msg.description).to_owned();
|
|
|
|
|
ui.label(RichText::new("[AI]").color(Color32::DARK_GRAY));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
ui.label(&msg.message);
|
|
|
|
|
ui.separator();
|
|
|
|
|
if msg.is_interaction {
|
|
|
|
|
ui.horizontal(|ui| {
|
|
|
|
|
ui.label(RichText::new(&msg.name).color(Color32::LIGHT_GRAY));
|
|
|
|
|
ui.label(&msg.message);
|
|
|
|
|
});
|
|
|
|
|
ui.separator();
|
|
|
|
|
} else {
|
|
|
|
|
ui.horizontal(|ui| {
|
|
|
|
|
ui.label(RichText::new(&msg.name).color(Color32::LIGHT_GRAY));
|
|
|
|
|
if !&msg.description.is_empty() {
|
|
|
|
|
self.description = (&msg.description).to_owned();
|
|
|
|
|
ui.label(RichText::new("[AI]").color(Color32::DARK_GRAY));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
ui.label(&msg.message);
|
|
|
|
|
ui.separator();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if self.autoscroll {
|
|
|
|
|