mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-23 17:17:31 -04:00
no results note
This commit is contained in:
parent
0bbc60dd9c
commit
c868162ed8
4 changed files with 70 additions and 4 deletions
51
app/scenes/components/search/no_results_note.tscn
Normal file
51
app/scenes/components/search/no_results_note.tscn
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
[gd_scene load_steps=8 format=3 uid="uid://bj6j3nyldlqjm"]
|
||||||
|
|
||||||
|
[ext_resource type="StyleBox" uid="uid://bllkg32sc4iam" path="res://assets/styles/panel.stylebox" id="2_cxiqp"]
|
||||||
|
[ext_resource type="FontFile" uid="uid://do40418waa8w3" path="res://assets/fonts/Inter-Regular.otf" id="6_drapp"]
|
||||||
|
[ext_resource type="FontFile" uid="uid://bjeupg0ikc2kv" path="res://assets/fonts/Monospace.ttf" id="7_1pjua"]
|
||||||
|
[ext_resource type="Script" path="res://scripts/ui/search/open_meta_link.gd" id="7_evwvd"]
|
||||||
|
[ext_resource type="FontFile" uid="uid://b3xb1fpllhnf4" path="res://assets/fonts/Inter-Italic.otf" id="8_nluj5"]
|
||||||
|
[ext_resource type="FontFile" uid="uid://tfj3o1e1wytn" path="res://assets/fonts/Inter-BoldItalic.otf" id="9_r0w13"]
|
||||||
|
[ext_resource type="FontFile" uid="uid://c14w1y1r54wgi" path="res://assets/fonts/Inter-Bold.otf" id="10_fe01c"]
|
||||||
|
|
||||||
|
[node name="NoResultsNote" type="Control"]
|
||||||
|
custom_minimum_size = Vector2(850, 100)
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 0
|
||||||
|
offset_right = 850.0
|
||||||
|
offset_bottom = 100.0
|
||||||
|
|
||||||
|
[node name="Panel" type="Panel" parent="."]
|
||||||
|
self_modulate = Color(1, 1, 1, 0)
|
||||||
|
custom_minimum_size = Vector2(850, 100)
|
||||||
|
layout_mode = 1
|
||||||
|
offset_top = 25.0
|
||||||
|
offset_right = 850.0
|
||||||
|
offset_bottom = 125.0
|
||||||
|
theme_override_styles/panel = ExtResource("2_cxiqp")
|
||||||
|
|
||||||
|
[node name="RichTextLabel" type="RichTextLabel" parent="Panel"]
|
||||||
|
clip_contents = false
|
||||||
|
layout_mode = 1
|
||||||
|
offset_right = 774.0
|
||||||
|
offset_bottom = 368.0
|
||||||
|
size_flags_vertical = 3
|
||||||
|
theme_override_colors/default_color = Color(0.490196, 0.384314, 0.172549, 1)
|
||||||
|
theme_override_fonts/normal_font = ExtResource("6_drapp")
|
||||||
|
theme_override_fonts/mono_font = ExtResource("7_1pjua")
|
||||||
|
theme_override_fonts/italics_font = ExtResource("8_nluj5")
|
||||||
|
theme_override_fonts/bold_italics_font = ExtResource("9_r0w13")
|
||||||
|
theme_override_fonts/bold_font = ExtResource("10_fe01c")
|
||||||
|
theme_override_font_sizes/bold_italics_font_size = 17
|
||||||
|
theme_override_font_sizes/italics_font_size = 17
|
||||||
|
theme_override_font_sizes/mono_font_size = 17
|
||||||
|
theme_override_font_sizes/normal_font_size = 17
|
||||||
|
theme_override_font_sizes/bold_font_size = 17
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "Right now, things feel a little quiet here. There aren’t many worlds to explore yet — and you won’t find Google, YouTube, or your favorite sites in 3D form. That’s because this is still the early stage of building something completely new.
|
||||||
|
But remember: the internet itself started small too. What you’re seeing now is the seed of what will grow into an entire universe of interconnected worlds — as big and vibrant as today’s internet.
|
||||||
|
|
||||||
|
The best part? You don’t just have to wait for it to grow. You can build your own worlds and be part of creating it.
|
||||||
|
🤍 Start creating here: [url=https://thegates-docs.super.site]thegates-docs[/url]"
|
||||||
|
scroll_active = false
|
||||||
|
script = ExtResource("7_evwvd")
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=15 format=3 uid="uid://dh3owgirapji5"]
|
[gd_scene load_steps=16 format=3 uid="uid://dh3owgirapji5"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://scripts/ui/search/search_results.gd" id="1_bycb5"]
|
[ext_resource type="Script" path="res://scripts/ui/search/search_results.gd" id="1_bycb5"]
|
||||||
[ext_resource type="FontFile" uid="uid://do40418waa8w3" path="res://assets/fonts/Inter-Regular.otf" id="1_mgpxk"]
|
[ext_resource type="FontFile" uid="uid://do40418waa8w3" path="res://assets/fonts/Inter-Regular.otf" id="1_mgpxk"]
|
||||||
|
@ -8,6 +8,7 @@
|
||||||
[ext_resource type="Script" path="res://scripts/ui/search/search_results_header.gd" id="3_cuw8t"]
|
[ext_resource type="Script" path="res://scripts/ui/search/search_results_header.gd" id="3_cuw8t"]
|
||||||
[ext_resource type="PackedScene" uid="uid://i3lgu2dyypcq" path="res://scenes/components/search/result.tscn" id="4_yxn4t"]
|
[ext_resource type="PackedScene" uid="uid://i3lgu2dyypcq" path="res://scenes/components/search/result.tscn" id="4_yxn4t"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dntnp0igpccdt" path="res://scenes/components/search/suggestion.tscn" id="8_1alsm"]
|
[ext_resource type="PackedScene" uid="uid://dntnp0igpccdt" path="res://scenes/components/search/suggestion.tscn" id="8_1alsm"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bj6j3nyldlqjm" path="res://scenes/components/search/no_results_note.tscn" id="8_kxod6"]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_u8k0c"]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_u8k0c"]
|
||||||
bg_color = Color(0.113725, 0.117647, 0.14902, 1)
|
bg_color = Color(0.113725, 0.117647, 0.14902, 1)
|
||||||
|
@ -77,7 +78,7 @@ size_flags_horizontal = 3
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
theme_override_constants/margin_left = 0
|
theme_override_constants/margin_left = 0
|
||||||
theme_override_constants/margin_top = 0
|
theme_override_constants/margin_top = 0
|
||||||
theme_override_constants/margin_right = 0
|
theme_override_constants/margin_right = 899
|
||||||
theme_override_constants/margin_bottom = 0
|
theme_override_constants/margin_bottom = 0
|
||||||
script = ExtResource("1_scp2i")
|
script = ExtResource("1_scp2i")
|
||||||
limit = Vector2(1015, -1)
|
limit = Vector2(1015, -1)
|
||||||
|
@ -126,6 +127,7 @@ result_scene = ExtResource("4_yxn4t")
|
||||||
header = NodePath("../Header")
|
header = NodePath("../Header")
|
||||||
suggestions_root = NodePath("SearchSuggestions")
|
suggestions_root = NodePath("SearchSuggestions")
|
||||||
suggestion_scene = ExtResource("8_1alsm")
|
suggestion_scene = ExtResource("8_1alsm")
|
||||||
|
no_results_note = ExtResource("8_kxod6")
|
||||||
|
|
||||||
[node name="SearchSuggestions" type="HFlowContainer" parent="MarginContainer/ScrollContainer/MaxSizeContainer/HBoxContainer/VBoxContainer/SearchResults"]
|
[node name="SearchSuggestions" type="HFlowContainer" parent="MarginContainer/ScrollContainer/MaxSizeContainer/HBoxContainer/VBoxContainer/SearchResults"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
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 header: SearchResultsHeader
|
||||||
@export var suggestions_root: Control
|
@export var suggestions_root: Control
|
||||||
@export var suggestion_scene: PackedScene
|
@export var suggestion_scene: PackedScene
|
||||||
|
@export var no_results_note: PackedScene
|
||||||
|
|
||||||
var result_str: String = "{}"
|
var result_str: String = "{}"
|
||||||
var suggestions_str: String = "{}"
|
var suggestions_str: String = "{}"
|
||||||
|
@ -55,14 +56,17 @@ func suggestions() -> void:
|
||||||
if suggs == null or suggs.is_empty():
|
if suggs == null or suggs.is_empty():
|
||||||
Debug.logclr("No suggestions found", Color.YELLOW)
|
Debug.logclr("No suggestions found", Color.YELLOW)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
header.set_suggestion_header()
|
||||||
|
|
||||||
for sugg in suggs:
|
for sugg in suggs:
|
||||||
Debug.logr(sugg)
|
Debug.logr(sugg)
|
||||||
var suggestion: Suggestion = suggestion_scene.instantiate()
|
var suggestion: Suggestion = suggestion_scene.instantiate()
|
||||||
suggestion.fill(sugg)
|
suggestion.fill(sugg)
|
||||||
suggestions_root.add_child(suggestion)
|
suggestions_root.add_child(suggestion)
|
||||||
|
|
||||||
header.set_suggestion_header()
|
var note = no_results_note.instantiate()
|
||||||
|
add_child(note)
|
||||||
|
|
||||||
|
|
||||||
func suggestions_request() -> void:
|
func suggestions_request() -> void:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue