.
This commit is contained in:
+10
-14
@@ -8,10 +8,7 @@ use iced::widget::button::Style;
|
||||
use iced::widget::grid::Sizing;
|
||||
use iced::widget::{button, center, column, combo_box, container, grid, mouse_area, opaque, pick_list, row, scrollable, space, stack, table, text, text_input, toggler};
|
||||
use iced::window::Settings;
|
||||
use iced::{Background, Color, Element, Length, Subscription, Task, color, window, keyboard};
|
||||
//use iced::advanced::Widget;
|
||||
use iced::keyboard::{Event, Key};
|
||||
use iced::keyboard::key::Named::Control;
|
||||
use iced::{Background, Color, Element, Length, Subscription, Task, color, window};
|
||||
use iced::widget::text::Wrapping;
|
||||
use ldp::middleware::BasicAuthMiddleware;
|
||||
use ldp::model::{KeyedDataset, QuadKey};
|
||||
@@ -28,7 +25,6 @@ use crate::widget::iri_input::iri_input;
|
||||
#[derive(Debug, Clone)]
|
||||
pub(crate) enum Message {
|
||||
None,
|
||||
Foo(QuadKey),
|
||||
Traverse,
|
||||
IndexRdfSource(RdfSource<Dataset>),
|
||||
CommitIndex,
|
||||
@@ -554,7 +550,8 @@ impl Publisher {
|
||||
|
||||
let value = term
|
||||
.value_as_named_node()
|
||||
.map(|node| self.ontology.abbreviate(node))
|
||||
//.map(|node| self.ontology.abbreviate(node))
|
||||
.map(|node| node.as_str().to_string())
|
||||
.unwrap_or(term.value().to_string());
|
||||
|
||||
let value_alignment = term
|
||||
@@ -565,10 +562,10 @@ impl Publisher {
|
||||
})
|
||||
.unwrap_or(Horizontal::Left);
|
||||
|
||||
let value_input_base = text_input("Value", value.as_str())
|
||||
.align_x(value_alignment);
|
||||
/*let value_input_base = text_input("Value", value.as_str())
|
||||
.align_x(value_alignment);*/
|
||||
|
||||
let value_input = if !state.read_only {
|
||||
/*let value_input = if !state.read_only {
|
||||
let is_named_node = term.is_named_node();
|
||||
value_input_base.on_input(move |input| {
|
||||
let expanded_input = if is_named_node {
|
||||
@@ -584,12 +581,11 @@ impl Publisher {
|
||||
})
|
||||
} else {
|
||||
value_input_base
|
||||
};
|
||||
};*/
|
||||
|
||||
let foo = iri_input(value_input)
|
||||
.on_control_click(Message::OpenQueryWindow(SearchResultClickAction::Object(
|
||||
key,
|
||||
)));
|
||||
let foo = iri_input(self.ontology.prefixes(), "Object", value.as_str())
|
||||
.on_input(move |value| Message::ValueUpdated(key, value))
|
||||
.on_control_click(Message::OpenQueryWindow(SearchResultClickAction::Object(key)));
|
||||
|
||||
/*let search_launcher = if term.is_named_node() && !state.read_only {
|
||||
Some(container(
|
||||
|
||||
Reference in New Issue
Block a user