mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-23 08:17:34 -04:00
no results note
This commit is contained in:
parent
0bbc60dd9c
commit
c868162ed8
4 changed files with 70 additions and 4 deletions
9
app/scripts/ui/search/open_meta_link.gd
Normal file
9
app/scripts/ui/search/open_meta_link.gd
Normal file
|
@ -0,0 +1,9 @@
|
|||
extends RichTextLabel
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
meta_clicked.connect(on_meta_clicked)
|
||||
|
||||
|
||||
func on_meta_clicked(meta) -> void:
|
||||
OS.shell_open(str(meta))
|
|
@ -7,6 +7,7 @@ extends VBoxContainer
|
|||
@export var header: SearchResultsHeader
|
||||
@export var suggestions_root: Control
|
||||
@export var suggestion_scene: PackedScene
|
||||
@export var no_results_note: PackedScene
|
||||
|
||||
var result_str: String = "{}"
|
||||
var suggestions_str: String = "{}"
|
||||
|
@ -55,14 +56,17 @@ func suggestions() -> void:
|
|||
if suggs == null or suggs.is_empty():
|
||||
Debug.logclr("No suggestions found", Color.YELLOW)
|
||||
return
|
||||
|
||||
|
||||
header.set_suggestion_header()
|
||||
|
||||
for sugg in suggs:
|
||||
Debug.logr(sugg)
|
||||
var suggestion: Suggestion = suggestion_scene.instantiate()
|
||||
suggestion.fill(sugg)
|
||||
suggestions_root.add_child(suggestion)
|
||||
|
||||
header.set_suggestion_header()
|
||||
var note = no_results_note.instantiate()
|
||||
add_child(note)
|
||||
|
||||
|
||||
func suggestions_request() -> void:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue