├── LICENSE
├── slack-clone
├── .gitattributes
├── imgs
│ ├── .gdignore
│ ├── snapshot.png
│ ├── code_snapshot.gif
│ └── supabase_slack_clone_demo.gif
├── supabase-ui
│ ├── basic
│ │ ├── containers
│ │ │ ├── popup
│ │ │ │ ├── popup.gd
│ │ │ │ ├── _popup.gd
│ │ │ │ └── Popup.tscn
│ │ │ └── panel
│ │ │ │ ├── panel.gd
│ │ │ │ ├── _panel.gd
│ │ │ │ └── Panel.tscn
│ │ ├── button
│ │ │ ├── text
│ │ │ │ ├── text_button.gd
│ │ │ │ ├── TextButton.tres
│ │ │ │ └── TextButton.tscn
│ │ │ ├── outline
│ │ │ │ ├── outline_button.gd
│ │ │ │ ├── OutlineButton.tres
│ │ │ │ └── OutlineButton.tscn
│ │ │ ├── link
│ │ │ │ ├── link_button.gd
│ │ │ │ ├── LinkButton.tres
│ │ │ │ ├── Link.tscn
│ │ │ │ └── LinkButton.tscn
│ │ │ ├── primary
│ │ │ │ ├── PrimaryButton.tres
│ │ │ │ ├── primary_button.gd
│ │ │ │ └── PrimaryButton.tscn
│ │ │ └── default
│ │ │ │ ├── DefaultButton.tres
│ │ │ │ └── DefaultButton.tscn
│ │ └── typography
│ │ │ ├── error_label
│ │ │ ├── ErrorLabel.tscn
│ │ │ └── err_label.gd
│ │ │ └── base_label
│ │ │ ├── BaseLabel.tscn
│ │ │ └── label.gd
│ ├── res
│ │ ├── icons
│ │ │ ├── checkbox.png
│ │ │ ├── un_checkbox.png
│ │ │ ├── dark_mode_white_24dp.svg
│ │ │ ├── question_mark.svg
│ │ │ ├── key.svg.import
│ │ │ ├── lock.svg.import
│ │ │ ├── email.svg.import
│ │ │ ├── inbox.svg.import
│ │ │ ├── loader.svg.import
│ │ │ ├── loading.svg.import
│ │ │ ├── checkbox.png.import
│ │ │ ├── loader-line.svg.import
│ │ │ ├── un_checkbox.png.import
│ │ │ ├── question_mark.svg.import
│ │ │ ├── dark_mode_white_24dp.svg.import
│ │ │ ├── light_mode_white_36dp.svg.import
│ │ │ ├── light_mode_white_36dp.svg
│ │ │ ├── email.svg
│ │ │ ├── key.svg
│ │ │ ├── lock.svg
│ │ │ ├── loader-line.svg
│ │ │ ├── inbox.svg
│ │ │ ├── loader.svg
│ │ │ └── loading.svg
│ │ └── fonts
│ │ │ └── roboto
│ │ │ ├── Roboto-Bold.ttf
│ │ │ ├── Roboto-Thin.ttf
│ │ │ ├── Roboto-Black.ttf
│ │ │ ├── Roboto-Italic.ttf
│ │ │ ├── Roboto-Light.ttf
│ │ │ ├── Roboto-Medium.ttf
│ │ │ └── Roboto-Regular.ttf
│ └── components
│ │ └── mode_btn
│ │ ├── mode_btn.gd
│ │ └── ModeBtn.tscn
├── res
│ ├── imgs
│ │ ├── bg.png
│ │ ├── shine.png
│ │ ├── 7us9h6379ra71.jpg
│ │ ├── default-user-avatar.png
│ │ ├── icons
│ │ │ ├── arrow_drop_down_white_24dp.svg
│ │ │ ├── arrow_right_white_24dp.svg
│ │ │ ├── add_white_24dp.svg
│ │ │ ├── send_white_36dp.svg
│ │ │ ├── list_white_36dp.svg
│ │ │ ├── upgrade_white_36dp.svg
│ │ │ ├── chat_bubble_outline_white_36dp.svg
│ │ │ ├── close_white_36dp.svg
│ │ │ ├── logout_white_36dp.svg
│ │ │ ├── more_vert_white_36dp.svg
│ │ │ ├── delete_forever_white_36dp.svg
│ │ │ ├── add_white_24dp.svg.import
│ │ │ ├── list_white_36dp.svg.import
│ │ │ ├── send_white_36dp.svg.import
│ │ │ ├── close_white_36dp.svg.import
│ │ │ ├── logout_white_36dp.svg.import
│ │ │ ├── upgrade_white_36dp.svg.import
│ │ │ ├── manage_accounts_white_36dp.svg
│ │ │ ├── more_vert_white_36dp.svg.import
│ │ │ ├── arrow_right_white_24dp.svg.import
│ │ │ ├── delete_forever_white_36dp.svg.import
│ │ │ ├── arrow_drop_down_white_24dp.svg.import
│ │ │ ├── manage_accounts_white_36dp.svg.import
│ │ │ └── chat_bubble_outline_white_36dp.svg.import
│ │ ├── bg.png.import
│ │ ├── shine.png.import
│ │ ├── avatar.svg.import
│ │ ├── rounded.svg.import
│ │ ├── square.svg.import
│ │ ├── 7us9h6379ra71.jpg.import
│ │ ├── default-user-avatar.png.import
│ │ ├── avatar.svg
│ │ ├── square.svg
│ │ └── rounded.svg
│ └── shaders
│ │ ├── rounded.tres
│ │ ├── round_avatar.tres
│ │ └── lerp_shader.tres
├── README.md
├── scn
│ ├── scenes
│ │ ├── slack
│ │ │ └── MobileMenu.gd
│ │ ├── input_container
│ │ │ ├── InputContainer.tres
│ │ │ └── InputContainer.gd
│ │ ├── input_container2
│ │ │ ├── InputContainer.tres
│ │ │ └── InputContainer2.gd
│ │ ├── popup_user
│ │ │ ├── userpanel.gd
│ │ │ ├── PopupUser.gd
│ │ │ └── PopupUser.tscn
│ │ ├── thumbnail_image_holder
│ │ │ ├── TImageHOlder.gd
│ │ │ └── T_ImageHolder.tscn
│ │ ├── add_chanel_panel
│ │ │ └── AddChanelPanel.gd
│ │ ├── add_dm_panel
│ │ │ ├── AddDMPanel.gd
│ │ │ └── AddDMPanel.tscn
│ │ ├── popup_message_menu
│ │ │ ├── PopupMessageMenu.gd
│ │ │ └── PopupMessageMenu.tscn
│ │ ├── chat_container
│ │ │ ├── SlackChat.gd
│ │ │ └── SlackChat.tscn
│ │ ├── channels_menu_container
│ │ │ ├── ChannelsMenuContainer.gd
│ │ │ └── ChannelsMenuContainer.tscn
│ │ ├── update_user_panel
│ │ │ └── UpdateUserPanel.gd
│ │ ├── dm_menu_container
│ │ │ ├── DMMenuContainer.gd
│ │ │ └── DMMenuContainer.tscn
│ │ └── slack_menu
│ │ │ └── SlackMenu.gd
│ ├── classes
│ │ ├── dm
│ │ │ ├── dm.tscn
│ │ │ └── dm.gd
│ │ ├── media_holder
│ │ │ ├── MediaHolder.gd
│ │ │ └── MediaHolder.tscn
│ │ ├── avatar
│ │ │ ├── Avatar.gd
│ │ │ └── Avatar.tscn
│ │ ├── channel
│ │ │ ├── channel.tscn
│ │ │ └── channel.gd
│ │ ├── user_button
│ │ │ └── UserButton.gd
│ │ ├── media_preview
│ │ │ ├── MediaPreview.gd
│ │ │ └── MediaPreview.tscn
│ │ ├── user
│ │ │ └── User.gd
│ │ └── message
│ │ │ └── message.gd
│ ├── scripts
│ │ ├── globals.gd
│ │ ├── filedrop_handler.gd
│ │ ├── utilities.gd
│ │ └── users_manager.gd
│ └── main
│ │ └── Control.tscn
├── .gitignore
├── icon.svg.import
├── LICENSE
└── icon.svg
├── todo-list
├── icon.png
├── fonts
│ ├── SEGOEUI.TTF
│ ├── SEGOEUIB.TTF
│ ├── SEGUIBL.TTF
│ └── SEGUIBLI.TTF
├── imgs
│ ├── icons
│ │ ├── key.png
│ │ ├── Remove.png
│ │ ├── user.png
│ │ ├── key.png.import
│ │ ├── user.png.import
│ │ └── Remove.png.import
│ ├── supabase_todo_list_demo.gif
│ ├── throbber.svg.import
│ └── throbber.svg
├── default_env.tres
├── README.md
├── scn
│ ├── Loading
│ │ ├── loading.gd
│ │ └── loading.tscn
│ ├── Task
│ │ ├── task.gd
│ │ └── task.tscn
│ ├── Buttons
│ │ └── Btn.tscn
│ ├── LogScreen
│ │ └── log_screen.gd
│ └── Main
│ │ └── main.gd
├── icon.png.import
└── project.godot
├── .gitignore
├── icon.svg
└── README.md
/LICENSE:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/slack-clone/.gitattributes:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/slack-clone/imgs/.gdignore:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/containers/popup/popup.gd:
--------------------------------------------------------------------------------
1 | extends SPopup
2 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/containers/panel/panel.gd:
--------------------------------------------------------------------------------
1 | extends SPanel
2 |
3 |
4 |
--------------------------------------------------------------------------------
/todo-list/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/todo-list/icon.png
--------------------------------------------------------------------------------
/slack-clone/res/imgs/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/slack-clone/res/imgs/bg.png
--------------------------------------------------------------------------------
/todo-list/fonts/SEGOEUI.TTF:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/todo-list/fonts/SEGOEUI.TTF
--------------------------------------------------------------------------------
/todo-list/fonts/SEGOEUIB.TTF:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/todo-list/fonts/SEGOEUIB.TTF
--------------------------------------------------------------------------------
/todo-list/fonts/SEGUIBL.TTF:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/todo-list/fonts/SEGUIBL.TTF
--------------------------------------------------------------------------------
/todo-list/fonts/SEGUIBLI.TTF:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/todo-list/fonts/SEGUIBLI.TTF
--------------------------------------------------------------------------------
/todo-list/imgs/icons/key.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/todo-list/imgs/icons/key.png
--------------------------------------------------------------------------------
/slack-clone/imgs/snapshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/slack-clone/imgs/snapshot.png
--------------------------------------------------------------------------------
/slack-clone/res/imgs/shine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/slack-clone/res/imgs/shine.png
--------------------------------------------------------------------------------
/todo-list/imgs/icons/Remove.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/todo-list/imgs/icons/Remove.png
--------------------------------------------------------------------------------
/todo-list/imgs/icons/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/todo-list/imgs/icons/user.png
--------------------------------------------------------------------------------
/slack-clone/imgs/code_snapshot.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/slack-clone/imgs/code_snapshot.gif
--------------------------------------------------------------------------------
/slack-clone/res/imgs/7us9h6379ra71.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/slack-clone/res/imgs/7us9h6379ra71.jpg
--------------------------------------------------------------------------------
/todo-list/imgs/supabase_todo_list_demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/todo-list/imgs/supabase_todo_list_demo.gif
--------------------------------------------------------------------------------
/slack-clone/imgs/supabase_slack_clone_demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/slack-clone/imgs/supabase_slack_clone_demo.gif
--------------------------------------------------------------------------------
/slack-clone/res/imgs/default-user-avatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/slack-clone/res/imgs/default-user-avatar.png
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/checkbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/slack-clone/supabase-ui/res/icons/checkbox.png
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/un_checkbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/slack-clone/supabase-ui/res/icons/un_checkbox.png
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/fonts/roboto/Roboto-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/slack-clone/supabase-ui/res/fonts/roboto/Roboto-Bold.ttf
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/fonts/roboto/Roboto-Thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/slack-clone/supabase-ui/res/fonts/roboto/Roboto-Thin.ttf
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/fonts/roboto/Roboto-Black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/slack-clone/supabase-ui/res/fonts/roboto/Roboto-Black.ttf
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/fonts/roboto/Roboto-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/slack-clone/supabase-ui/res/fonts/roboto/Roboto-Italic.ttf
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/fonts/roboto/Roboto-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/slack-clone/supabase-ui/res/fonts/roboto/Roboto-Light.ttf
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/fonts/roboto/Roboto-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/slack-clone/supabase-ui/res/fonts/roboto/Roboto-Medium.ttf
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/fonts/roboto/Roboto-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fenix-hub/godot-engine.supabase-examples/HEAD/slack-clone/supabase-ui/res/fonts/roboto/Roboto-Regular.ttf
--------------------------------------------------------------------------------
/todo-list/default_env.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="Environment" load_steps=2 format=2]
2 |
3 | [sub_resource type="ProceduralSky" id=1]
4 |
5 | [resource]
6 | background_mode = 2
7 | background_sky = SubResource( 1 )
8 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/arrow_drop_down_white_24dp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/arrow_right_white_24dp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/add_white_24dp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/send_white_36dp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/todo-list/README.md:
--------------------------------------------------------------------------------
1 | # ToDot List - Demo
2 |
3 | A Todo List created with Supabase as backend, and Godot as multiplatform frontend.
4 |
5 | **Test live demo [here](https://fenix-hub.github.io/supabase/todo-list/demo)**
6 |
7 | 
--------------------------------------------------------------------------------
/slack-clone/README.md:
--------------------------------------------------------------------------------
1 | # Slack Clone - Demo
2 |
3 | A Slack clone created with Supabase as backend, and Godot as multiplatform frontend.
4 |
5 | **Test live demo [here](https://www.nicolosantilio.com/apps/slack-clone/)**
6 |
7 | 
8 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/list_white_36dp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/upgrade_white_36dp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/slack/MobileMenu.gd:
--------------------------------------------------------------------------------
1 | extends SPanel
2 |
3 | signal menu_visibility()
4 |
5 |
6 | func _ready():
7 | if OS.get_name() != "Android": hide()
8 | add_to_group("slack_components")
9 |
10 | func _on_MenuBtn_pressed():
11 | emit_signal("menu_visibility")
12 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/chat_bubble_outline_white_36dp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/close_white_36dp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/logout_white_36dp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/slack-clone/.gitignore:
--------------------------------------------------------------------------------
1 | # Plugin Specific ignores
2 | default_env.tres
3 | /icon.png
4 | /icon.png.import
5 | project.godot
6 | scn/
7 | /screenshot.png
8 | /snapshot.png
9 | *.tpm
10 |
11 | # Godot-specific ignores
12 | .import/
13 | export.cfg
14 | export_presets.cfg
15 |
16 | # Mono-specific ignores
17 | .mono/
18 | data_*/
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Project specific files
2 | override.cfg
3 | export/
4 | addons/
5 |
6 | # Godot-specific ignores
7 | .import/
8 | export.cfg
9 | export_presets.cfg
10 | default_env.tres
11 |
12 | # Imported translations (automatically generated from CSV files)
13 | *.translation
14 |
15 | # Mono-specific ignores
16 | .mono/
17 | data_*/
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/more_vert_white_36dp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/input_container/InputContainer.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="StyleBoxFlat" format=2]
2 |
3 | [resource]
4 | bg_color = Color( 0.972549, 0.972549, 0.980392, 1 )
5 | border_width_top = 1
6 | border_color = Color( 0.713726, 0.713726, 0.713726, 1 )
7 | corner_radius_bottom_right = 8
8 | corner_radius_bottom_left = 8
9 | corner_detail = 20
10 | anti_aliasing = false
11 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/input_container2/InputContainer.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="StyleBoxFlat" format=2]
2 |
3 | [resource]
4 | bg_color = Color( 0.972549, 0.972549, 0.980392, 1 )
5 | border_width_top = 1
6 | border_color = Color( 0.713726, 0.713726, 0.713726, 1 )
7 | corner_radius_bottom_right = 8
8 | corner_radius_bottom_left = 8
9 | corner_detail = 20
10 | anti_aliasing = false
11 |
--------------------------------------------------------------------------------
/slack-clone/scn/classes/dm/dm.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=2 format=2]
2 |
3 | [ext_resource path="res://scn/classes/dm/dm.gd" type="Script" id=1]
4 |
5 | [node name="DM" type="VBoxContainer"]
6 | anchor_right = 1.0
7 | anchor_bottom = 1.0
8 | size_flags_horizontal = 3
9 | size_flags_vertical = 3
10 | custom_constants/separation = 10
11 | script = ExtResource( 1 )
12 | __meta__ = {
13 | "_edit_use_anchors_": false
14 | }
15 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/dark_mode_white_24dp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/popup_user/userpanel.gd:
--------------------------------------------------------------------------------
1 | extends SPanel
2 |
3 | # Declare member variables here. Examples:
4 | # var a = 2
5 | # var b = "text"
6 |
7 |
8 | # Called when the node enters the scene tree for the first time.
9 | func _ready():
10 | pass # Replace with function body.
11 |
12 |
13 | # Called every frame. 'delta' is the elapsed time since the previous frame.
14 | #func _process(delta):
15 | # pass
16 |
--------------------------------------------------------------------------------
/slack-clone/scn/classes/media_holder/MediaHolder.gd:
--------------------------------------------------------------------------------
1 | extends ColorRect
2 |
3 | func _ready():
4 | hide()
5 |
6 | func show_media(media_preview : MediaPreview) -> void:
7 | $Media.set_texture(media_preview.texture)
8 | show()
9 |
10 |
11 | func _on_MediaHolder_gui_input(event):
12 | if event is InputEventMouseButton:
13 | if event.get_button_index() == 1 and event.is_pressed():
14 | hide()
15 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/question_mark.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/delete_forever_white_36dp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/slack-clone/scn/scripts/globals.gd:
--------------------------------------------------------------------------------
1 | extends Node
2 |
3 | var main : Control
4 |
5 | var user : UsersManager.User
6 | var s_user : SupabaseUser
7 | var sending_message : bool = false
8 | var current_channel : Channel = null
9 | var popup_message_menu : Popup
10 | var mode : int
11 | var filedrop_handler : Control
12 |
13 | func set_mode(i : int) -> void:
14 | mode = i
15 | get_tree().call_group("slack_components", "set_mode", mode)
16 |
--------------------------------------------------------------------------------
/slack-clone/scn/scripts/filedrop_handler.gd:
--------------------------------------------------------------------------------
1 | extends Node
2 |
3 | signal files_dropped(files)
4 |
5 | func _ready():
6 | get_tree().connect("files_dropped", self, "_on_files_dropped")
7 |
8 |
9 | func _on_files_dropped(files : PoolStringArray, screen : int):
10 | if Globals.filedrop_handler != self:
11 | return
12 | for file_dropped in files:
13 | if not file_dropped.get_extension() in ["png","jpg"]:
14 | return
15 | emit_signal("files_dropped", files)
16 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/components/mode_btn/mode_btn.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends TextButton
3 | class_name ModeButton
4 |
5 | export (Array, Texture) var textures : Array
6 |
7 | func _pressed() -> void:
8 | $Tween.stop_all()
9 |
10 | func set_mode(_mode : int) -> void:
11 | .set_mode(_mode)
12 | set_texture(textures[_mode])
13 | set_text(("Dark" if _mode == 0 else "Light") + " Mode")
14 |
15 | func _released() -> void:
16 | get_tree().call_group("supabase_components", "set_mode", !mode)
17 |
--------------------------------------------------------------------------------
/slack-clone/scn/classes/avatar/Avatar.gd:
--------------------------------------------------------------------------------
1 | class_name Avatar
2 | extends TextureRect
3 |
4 | func _ready():
5 | pass # Replace with function body.
6 |
7 | func set_status(status : String) -> void:
8 | match status:
9 | "OFFLINE": $Status.hide()
10 | "ONLINE": $Status.show()
11 |
12 | func free_loader() -> void:
13 | if has_node("Loader"):
14 | $Loader.queue_free()
15 |
16 | func set_avatar(texture : Texture) -> void:
17 | if texture:
18 | set_texture(texture)
19 | free_loader()
20 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/button/text/text_button.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends DefaultButton
3 | class_name TextButton
4 |
5 | func _load_defaults():
6 | property_list[0]["class_name"] = "TextButton"
7 | property_list[0]["name"] = "TextButton"
8 |
9 | colors.text = [Color("#666666"), Color.white]
10 | colors.button = [Color.transparent, Color.transparent]
11 | colors.button_hover = [Color("#1cb1b1b1"), Color("#1cb1b1b1")]
12 | colors.border = [Color.transparent, Color.transparent]
13 | colors.shadow_size = [0,0]
14 |
15 | text = "Text Button"
16 |
--------------------------------------------------------------------------------
/slack-clone/scn/classes/channel/channel.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=3 format=2]
2 |
3 | [ext_resource path="res://scn/classes/channel/channel.gd" type="Script" id=1]
4 | [ext_resource path="res://scn/classes/message/message.tscn" type="PackedScene" id=2]
5 |
6 | [node name="Channel" type="VBoxContainer"]
7 | anchor_right = 1.0
8 | anchor_bottom = 1.0
9 | margin_right = 2.0
10 | size_flags_horizontal = 3
11 | size_flags_vertical = 3
12 | custom_constants/separation = 10
13 | script = ExtResource( 1 )
14 | __meta__ = {
15 | "_edit_use_anchors_": false
16 | }
17 | message_instance = ExtResource( 2 )
18 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/popup_user/PopupUser.gd:
--------------------------------------------------------------------------------
1 | extends SPopup
2 | class_name PopupUser
3 |
4 | signal update_user()
5 | signal logout()
6 |
7 | func _set_mode(_mode : int) -> void:
8 | for child in $Buttons.get_children():
9 | child.set_mode(_mode)
10 |
11 | func set_permissions(role : String) -> void:
12 | pass
13 |
14 | func popup_on_pos(pos : Vector2 = Vector2.ZERO) -> void:
15 | popup()
16 | rect_position = pos
17 |
18 |
19 | func _on_UpdateBtn_pressed():
20 | hide()
21 | emit_signal("update_user")
22 |
23 |
24 | func _on_LogoutBtn_pressed():
25 | hide()
26 | emit_signal("logout")
27 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/button/outline/outline_button.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends DefaultButton
3 | class_name OutlineButton
4 |
5 | func _load_defaults():
6 | property_list[0]["class_name"] = "OutlineButton"
7 | property_list[0]["name"] = "OutlineButton"
8 |
9 | colors.button = [Color.transparent, Color.transparent]
10 | colors.button_hover[1] = Color.white
11 | colors.text_hover = [Color("#414141"), colors.text[0]]
12 | colors.border = [Color("#a5a5a5"), Color("#cccccc")]
13 | colors.border_hover = [Color.black, colors.border[0]]
14 | colors.shadow_size = [0,0]
15 |
16 | text = "Outline Button"
17 |
--------------------------------------------------------------------------------
/todo-list/scn/Loading/loading.gd:
--------------------------------------------------------------------------------
1 | extends Control
2 | class_name LoadingScene
3 |
4 | onready var throbber : TextureRect = $Throbber
5 |
6 | var i : float = 0
7 | var value : float = 0
8 | var speed : float = 3.2
9 |
10 | func _ready():
11 | add_to_group("loading_scene", true)
12 | set_loading()
13 |
14 | func set_loading(is_loading : bool = false):
15 | set_process(is_loading)
16 | if is_loading: show()
17 | else : hide()
18 |
19 | func _process(delta):
20 | i+=delta*speed
21 | if i > 100 : i = 1
22 | value = sin(i)
23 | throbber.modulate.a = max(0.2, value)
24 | throbber.set_rotation(PI*value)
25 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/button/link/link_button.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends DefaultButton
3 | class_name SLinkButton
4 |
5 | func _load_defaults():
6 | property_list[0]["class_name"] = "LinkButton"
7 | property_list[0]["name"] = "LinkButton"
8 |
9 | colors.text = [Color("#24b47e"), Color("#24b47e")]
10 | colors.text_hover = [Color("#24b47e"), Color("#24b47e")]
11 | colors.button = [Color.transparent, Color.transparent]
12 | colors.button_hover = [Color("#2824b47e"), Color("#2824b47e")]
13 | colors.border = [Color.transparent, Color.transparent]
14 | colors.shadow_size = [0,0]
15 |
16 | text = "Link Button"
17 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/button/link/LinkButton.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="StyleBoxFlat" format=2]
2 |
3 | [resource]
4 | resource_local_to_scene = true
5 | resource_name = "LinkButton"
6 | content_margin_left = 13.0
7 | content_margin_right = 13.0
8 | content_margin_top = 9.0
9 | content_margin_bottom = 9.0
10 | bg_color = Color( 1, 1, 1, 0 )
11 | border_color = Color( 1, 1, 1, 0 )
12 | corner_radius_top_left = 5
13 | corner_radius_top_right = 5
14 | corner_radius_bottom_right = 5
15 | corner_radius_bottom_left = 5
16 | corner_detail = 20
17 | shadow_color = Color( 0, 0, 0, 0.0392157 )
18 | shadow_offset = Vector2( 0, 1.5 )
19 | anti_aliasing = false
20 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/button/text/TextButton.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="StyleBoxFlat" format=2]
2 |
3 | [resource]
4 | resource_local_to_scene = true
5 | resource_name = "TextButton"
6 | content_margin_left = 5.0
7 | content_margin_right = 5.0
8 | content_margin_top = 5.0
9 | content_margin_bottom = 5.0
10 | bg_color = Color( 1, 1, 1, 0 )
11 | border_color = Color( 1, 1, 1, 0 )
12 | corner_radius_top_left = 5
13 | corner_radius_top_right = 5
14 | corner_radius_bottom_right = 5
15 | corner_radius_bottom_left = 5
16 | corner_detail = 20
17 | shadow_color = Color( 0, 0, 0, 0.0392157 )
18 | shadow_offset = Vector2( 0, 1.5 )
19 | anti_aliasing = false
20 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/button/primary/PrimaryButton.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="StyleBoxFlat" format=2]
2 |
3 | [resource]
4 | resource_local_to_scene = true
5 | resource_name = "PrimaryButton"
6 | content_margin_left = 13.0
7 | content_margin_right = 13.0
8 | content_margin_top = 9.0
9 | content_margin_bottom = 9.0
10 | bg_color = Color( 0.141176, 0.705882, 0.494118, 1 )
11 | corner_radius_top_left = 5
12 | corner_radius_top_right = 5
13 | corner_radius_bottom_right = 5
14 | corner_radius_bottom_left = 5
15 | corner_detail = 20
16 | shadow_color = Color( 0, 0, 0, 0.0392157 )
17 | shadow_size = 1
18 | shadow_offset = Vector2( 0, 1.5 )
19 | anti_aliasing = false
20 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/button/link/Link.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=3 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Medium.ttf" type="DynamicFontData" id=1]
4 |
5 | [sub_resource type="DynamicFont" id=1]
6 | size = 15
7 | font_data = ExtResource( 1 )
8 |
9 | [node name="Link" type="LinkButton"]
10 | margin_right = 40.0
11 | margin_bottom = 14.0
12 | size_flags_vertical = 4
13 | custom_fonts/font = SubResource( 1 )
14 | custom_colors/font_color = Color( 0.243137, 0.811765, 0.556863, 1 )
15 | custom_colors/font_color_hover = Color( 0.243137, 0.811765, 0.556863, 1 )
16 | custom_colors/font_color_pressed = Color( 0.243137, 0.811765, 0.556863, 1 )
17 | __meta__ = {
18 | "_edit_use_anchors_": false
19 | }
20 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/typography/error_label/ErrorLabel.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=4 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/basic/typography/error_label/err_label.gd" type="Script" id=1]
4 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Regular.ttf" type="DynamicFontData" id=2]
5 |
6 | [sub_resource type="DynamicFont" id=1]
7 | size = 15
8 | font_data = ExtResource( 2 )
9 |
10 | [node name="Label" type="Label"]
11 | margin_right = 40.0
12 | margin_bottom = 14.0
13 | custom_fonts/font = SubResource( 1 )
14 | custom_colors/font_color = Color( 1, 0.2, 0.2, 1 )
15 | autowrap = true
16 | script = ExtResource( 1 )
17 | __meta__ = {
18 | "_edit_use_anchors_": false
19 | }
20 | level = 5
21 | font_size = 15
22 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/button/default/DefaultButton.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="StyleBoxFlat" format=2]
2 |
3 | [resource]
4 | resource_local_to_scene = true
5 | resource_name = "DefaultButton"
6 | content_margin_left = 13.0
7 | content_margin_right = 13.0
8 | content_margin_top = 9.0
9 | content_margin_bottom = 9.0
10 | bg_color = Color( 1, 1, 1, 1 )
11 | border_width_left = 1
12 | border_width_top = 1
13 | border_width_right = 1
14 | border_width_bottom = 1
15 | corner_radius_top_left = 5
16 | corner_radius_top_right = 5
17 | corner_radius_bottom_right = 5
18 | corner_radius_bottom_left = 5
19 | corner_detail = 20
20 | shadow_color = Color( 0, 0, 0, 0.0392157 )
21 | shadow_size = 1
22 | shadow_offset = Vector2( 0, 1.5 )
23 | anti_aliasing = false
24 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/typography/base_label/BaseLabel.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=4 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/basic/typography/base_label/label.gd" type="Script" id=1]
4 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Regular.ttf" type="DynamicFontData" id=2]
5 |
6 | [sub_resource type="DynamicFont" id=1]
7 | resource_local_to_scene = true
8 | size = 15
9 | font_data = ExtResource( 2 )
10 |
11 | [node name="Label" type="Label"]
12 | margin_right = 40.0
13 | margin_bottom = 14.0
14 | custom_fonts/font = SubResource( 1 )
15 | custom_colors/font_color = Color( 0.121569, 0.121569, 0.121569, 1 )
16 | script = ExtResource( 1 )
17 | __meta__ = {
18 | "_edit_use_anchors_": false
19 | }
20 | level = 5
21 | font_size = 15
22 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/containers/popup/_popup.gd:
--------------------------------------------------------------------------------
1 | tool
2 | class_name SPopup
3 | extends PopupPanel
4 |
5 | signal pressed()
6 |
7 | const colors : Dictionary = {
8 | "panel" : [Color.white, Color("#2a2a2a")]
9 | }
10 |
11 | export (int, "Light Mode", "Dark Mode") var mode : int = 0 setget set_mode
12 |
13 | func _ready():
14 | add_to_group("supabase_components")
15 |
16 | func set_mode(_mode : int) :
17 | mode = _mode
18 | get("custom_styles/panel").set("bg_color", colors.panel[mode])
19 |
20 | func _force_resize() :
21 | hide()
22 | show()
23 |
24 |
25 | func _on_Panel_gui_input(event):
26 | if event is InputEventMouseButton:
27 | if event.get_button_index() == 1 and event.is_pressed():
28 | emit_signal("pressed")
29 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/containers/panel/_panel.gd:
--------------------------------------------------------------------------------
1 | tool
2 | class_name SPanel
3 | extends PanelContainer
4 |
5 | signal pressed()
6 |
7 | const colors : Dictionary = {
8 | "panel" : [Color.white, Color("#2a2a2a")]
9 | }
10 |
11 | export (int, "Light Mode", "Dark Mode") var mode : int = 0 setget set_mode
12 |
13 | func _ready():
14 | add_to_group("supabase_components")
15 |
16 | func set_mode(_mode : int) :
17 | mode = _mode
18 | get("custom_styles/panel").set("bg_color", colors.panel[mode])
19 |
20 | func _force_resize() :
21 | hide()
22 | show()
23 |
24 |
25 | func _on_Panel_gui_input(event):
26 | if event is InputEventMouseButton:
27 | if event.get_button_index() == 1 and event.is_pressed():
28 | emit_signal("pressed")
29 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/button/outline/OutlineButton.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="StyleBoxFlat" format=2]
2 |
3 | [resource]
4 | resource_local_to_scene = true
5 | resource_name = "OutlineButton"
6 | content_margin_left = 13.0
7 | content_margin_right = 13.0
8 | content_margin_top = 9.0
9 | content_margin_bottom = 9.0
10 | bg_color = Color( 1, 1, 1, 0 )
11 | border_width_left = 1
12 | border_width_top = 1
13 | border_width_right = 1
14 | border_width_bottom = 1
15 | border_color = Color( 0.647059, 0.647059, 0.647059, 1 )
16 | corner_radius_top_left = 5
17 | corner_radius_top_right = 5
18 | corner_radius_bottom_right = 5
19 | corner_radius_bottom_left = 5
20 | corner_detail = 20
21 | shadow_color = Color( 0, 0, 0, 0.0392157 )
22 | shadow_offset = Vector2( 0, 1.5 )
23 | anti_aliasing = false
24 |
--------------------------------------------------------------------------------
/slack-clone/icon.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/icon.svg-218a8f2b3041327d8a5756f3a245f83b.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://icon.svg"
13 | dest_files=[ "res://.import/icon.svg-218a8f2b3041327d8a5756f3a245f83b.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/scn/classes/user_button/UserButton.gd:
--------------------------------------------------------------------------------
1 | extends PanelContainer
2 | class_name UserButton
3 |
4 | signal send_dm_to(user)
5 |
6 | var user : UsersManager.User
7 |
8 | func _ready():
9 | pass
10 |
11 | func set_user(user : UsersManager.User) -> void:
12 | self.user = user
13 | user.connect("update_picture", $User/Avatar, "set_avatar")
14 | user.connect("update_user", self, "update_user")
15 |
16 | $User/Avatar.set_avatar(user.avatar)
17 | $User/Label.set_text(user.username)
18 | $User/Avatar.set_status(user.status)
19 |
20 | func update_user(data : UsersManager.User) -> void:
21 | $User/Label.set_text(data.username)
22 | $User/Avatar.set_status(data.status)
23 |
24 |
25 |
26 | func _on_OutlineButton_pressed():
27 | emit_signal("send_dm_to", user)
28 |
--------------------------------------------------------------------------------
/todo-list/icon.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://icon.png"
13 | dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/bg.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/bg.png-1979e6cfd3549b19b29ef6f72fc2ca88.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://res/imgs/bg.png"
13 | dest_files=[ "res://.import/bg.png-1979e6cfd3549b19b29ef6f72fc2ca88.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/todo-list/imgs/icons/key.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/key.png-5c571be3617b7565635f7994171316b5.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://imgs/icons/key.png"
13 | dest_files=[ "res://.import/key.png-5c571be3617b7565635f7994171316b5.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=true
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/todo-list/imgs/icons/user.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/user.png-10dc1e4c964681df16035a2c04821d65.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://imgs/icons/user.png"
13 | dest_files=[ "res://.import/user.png-10dc1e4c964681df16035a2c04821d65.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=true
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/shine.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/shine.png-a280e9920edc83516d5345bdfede29cd.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://res/imgs/shine.png"
13 | dest_files=[ "res://.import/shine.png-a280e9920edc83516d5345bdfede29cd.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=1
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/todo-list/imgs/throbber.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/throbber.svg-e8a6d1b717a0b5bdb1f1eff5ecc61538.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://imgs/throbber.svg"
13 | dest_files=[ "res://.import/throbber.svg-e8a6d1b717a0b5bdb1f1eff5ecc61538.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/avatar.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/avatar.svg-99787f9f7f2c95eb83b6c9ccdb3b4cf6.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://res/imgs/avatar.svg"
13 | dest_files=[ "res://.import/avatar.svg-99787f9f7f2c95eb83b6c9ccdb3b4cf6.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=true
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=false
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=false
34 | svg/scale=2.0
35 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/rounded.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/rounded.svg-f178164fd7263357c64a31b6a9fe1371.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://res/imgs/rounded.svg"
13 | dest_files=[ "res://.import/rounded.svg-f178164fd7263357c64a31b6a9fe1371.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=true
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/square.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/square.svg-30c0ea6e8ad9d606159cc12850a0e375.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://res/imgs/square.svg"
13 | dest_files=[ "res://.import/square.svg-30c0ea6e8ad9d606159cc12850a0e375.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/todo-list/imgs/icons/Remove.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/Remove.png-04421fbff8ef187c5930654097bd3a8e.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://imgs/icons/Remove.png"
13 | dest_files=[ "res://.import/Remove.png-04421fbff8ef187c5930654097bd3a8e.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/key.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/key.svg-5b511d666948fd52633cf357c10cfabb.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/key.svg"
13 | dest_files=[ "res://.import/key.svg-5b511d666948fd52633cf357c10cfabb.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=false
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=false
34 | svg/scale=2.0
35 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/lock.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/lock.svg-a75fe7efdfa0b4250cb6fa7ee9a744d7.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/lock.svg"
13 | dest_files=[ "res://.import/lock.svg-a75fe7efdfa0b4250cb6fa7ee9a744d7.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=false
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/email.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/email.svg-4dd7a292a21cd4cf5a8f2b3570382498.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/email.svg"
13 | dest_files=[ "res://.import/email.svg-4dd7a292a21cd4cf5a8f2b3570382498.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=false
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=false
34 | svg/scale=2.0
35 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/inbox.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/inbox.svg-a5fdd6eefdb2b45b30ee091cfbb0f43c.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/inbox.svg"
13 | dest_files=[ "res://.import/inbox.svg-a5fdd6eefdb2b45b30ee091cfbb0f43c.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=false
34 | svg/scale=2.0
35 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/7us9h6379ra71.jpg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/7us9h6379ra71.jpg-0a5d2eb0fc53b68d7d4abb3f5082cb3d.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://res/imgs/7us9h6379ra71.jpg"
13 | dest_files=[ "res://.import/7us9h6379ra71.jpg-0a5d2eb0fc53b68d7d4abb3f5082cb3d.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/loader.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/loader.svg-3b79e8949384811bdea2360ee9ca87ef.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/loader.svg"
13 | dest_files=[ "res://.import/loader.svg-3b79e8949384811bdea2360ee9ca87ef.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/loading.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/loading.svg-a39d2199c750ca4c99b566d05ffb9bdc.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/loading.svg"
13 | dest_files=[ "res://.import/loading.svg-a39d2199c750ca4c99b566d05ffb9bdc.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/checkbox.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/checkbox.png-d865151ccdeeab621b0d43d9d57570f7.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/checkbox.png"
13 | dest_files=[ "res://.import/checkbox.png-d865151ccdeeab621b0d43d9d57570f7.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=false
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=false
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=false
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/add_white_24dp.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/add_white_24dp.svg-a145bfc89445dd5be89e5a86e875150d.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://res/imgs/icons/add_white_24dp.svg"
13 | dest_files=[ "res://.import/add_white_24dp.svg-a145bfc89445dd5be89e5a86e875150d.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/scn/classes/media_preview/MediaPreview.gd:
--------------------------------------------------------------------------------
1 | extends PanelContainer
2 | class_name MediaPreview
3 |
4 | signal show_media(media)
5 |
6 | var texture : ImageTexture setget set_texture
7 | var id : String setget set_id
8 |
9 | # Called when the node enters the scene tree for the first time.
10 | func _ready():
11 | pass # Replace with function body.
12 |
13 | func set_texture(_texture: ImageTexture) -> void:
14 | texture = _texture
15 | $Image.texture = texture
16 | if texture != null:
17 | $Loader.queue_free()
18 |
19 | func set_id(_id : String) -> void:
20 | id = _id
21 | texture.set_meta("id", id)
22 |
23 |
24 |
25 | func _on_MediaPreview_gui_input(event):
26 | if event is InputEventMouseButton:
27 | if event.get_button_index() == 1 and event.is_pressed():
28 | emit_signal("show_media", self)
29 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/list_white_36dp.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/list_white_36dp.svg-a85238bbee378b3d89767aac5925a15a.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://res/imgs/icons/list_white_36dp.svg"
13 | dest_files=[ "res://.import/list_white_36dp.svg-a85238bbee378b3d89767aac5925a15a.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/send_white_36dp.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/send_white_36dp.svg-81e5c3a8c8fb3cc3fd443eed7c266db2.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://res/imgs/icons/send_white_36dp.svg"
13 | dest_files=[ "res://.import/send_white_36dp.svg-81e5c3a8c8fb3cc3fd443eed7c266db2.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=2.0
35 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/loader-line.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/loader-line.svg-3b1a682e266fa48ab4012752d200d177.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/loader-line.svg"
13 | dest_files=[ "res://.import/loader-line.svg-3b1a682e266fa48ab4012752d200d177.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/un_checkbox.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/un_checkbox.png-cb731145aa8c97538c5719d98d91f2fd.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/un_checkbox.png"
13 | dest_files=[ "res://.import/un_checkbox.png-cb731145aa8c97538c5719d98d91f2fd.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=false
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=false
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=false
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/default-user-avatar.png.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/default-user-avatar.png-1a556b179e2732c82087c26b70febeb1.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://res/imgs/default-user-avatar.png"
13 | dest_files=[ "res://.import/default-user-avatar.png-1a556b179e2732c82087c26b70febeb1.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/close_white_36dp.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/close_white_36dp.svg-ba3d347250a12798c91b5a6c41b4faa1.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://res/imgs/icons/close_white_36dp.svg"
13 | dest_files=[ "res://.import/close_white_36dp.svg-ba3d347250a12798c91b5a6c41b4faa1.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/question_mark.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/question_mark.svg-603b3ce2f18ea51d7a2aac8b2f5962bd.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/question_mark.svg"
13 | dest_files=[ "res://.import/question_mark.svg-603b3ce2f18ea51d7a2aac8b2f5962bd.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/logout_white_36dp.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/logout_white_36dp.svg-186fb56b2d8869f3f3ec1d519cc477bc.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://res/imgs/icons/logout_white_36dp.svg"
13 | dest_files=[ "res://.import/logout_white_36dp.svg-186fb56b2d8869f3f3ec1d519cc477bc.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/upgrade_white_36dp.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/upgrade_white_36dp.svg-d5958049cfd85f514bc3747e6e481739.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://res/imgs/icons/upgrade_white_36dp.svg"
13 | dest_files=[ "res://.import/upgrade_white_36dp.svg-d5958049cfd85f514bc3747e6e481739.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/manage_accounts_white_36dp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/more_vert_white_36dp.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/more_vert_white_36dp.svg-bf8bbc44a946caf36deeb075ae602255.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://res/imgs/icons/more_vert_white_36dp.svg"
13 | dest_files=[ "res://.import/more_vert_white_36dp.svg-bf8bbc44a946caf36deeb075ae602255.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/arrow_right_white_24dp.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/arrow_right_white_24dp.svg-4afc7b1c62c2983538684bfa052634dc.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://res/imgs/icons/arrow_right_white_24dp.svg"
13 | dest_files=[ "res://.import/arrow_right_white_24dp.svg-4afc7b1c62c2983538684bfa052634dc.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/dark_mode_white_24dp.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/dark_mode_white_24dp.svg-92446bf9c425dbe2d33dc0a4827f56ae.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/dark_mode_white_24dp.svg"
13 | dest_files=[ "res://.import/dark_mode_white_24dp.svg-92446bf9c425dbe2d33dc0a4827f56ae.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=2.0
35 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/delete_forever_white_36dp.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/delete_forever_white_36dp.svg-bbbdd8f9f6a3ba4b1be4199826bbbdb9.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://res/imgs/icons/delete_forever_white_36dp.svg"
13 | dest_files=[ "res://.import/delete_forever_white_36dp.svg-bbbdd8f9f6a3ba4b1be4199826bbbdb9.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/light_mode_white_36dp.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/light_mode_white_36dp.svg-7879572e513ebb87063bccadf34dedbe.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://supabase-ui/res/icons/light_mode_white_36dp.svg"
13 | dest_files=[ "res://.import/light_mode_white_36dp.svg-7879572e513ebb87063bccadf34dedbe.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=2.0
35 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/arrow_drop_down_white_24dp.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/arrow_drop_down_white_24dp.svg-55d9d8158ac900c35ed77961a7830b48.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://res/imgs/icons/arrow_drop_down_white_24dp.svg"
13 | dest_files=[ "res://.import/arrow_drop_down_white_24dp.svg-55d9d8158ac900c35ed77961a7830b48.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/manage_accounts_white_36dp.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/manage_accounts_white_36dp.svg-ff16720a4046be19f0ebad40f75f7a8f.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://res/imgs/icons/manage_accounts_white_36dp.svg"
13 | dest_files=[ "res://.import/manage_accounts_white_36dp.svg-ff16720a4046be19f0ebad40f75f7a8f.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/scn/classes/media_holder/MediaHolder.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=2 format=2]
2 |
3 | [ext_resource path="res://scn/classes/media_holder/MediaHolder.gd" type="Script" id=1]
4 |
5 | [node name="MediaHolder" type="ColorRect"]
6 | anchor_right = 1.0
7 | anchor_bottom = 1.0
8 | color = Color( 0, 0, 0, 0.858824 )
9 | script = ExtResource( 1 )
10 | __meta__ = {
11 | "_edit_use_anchors_": false
12 | }
13 |
14 | [node name="Media" type="TextureRect" parent="."]
15 | anchor_left = 0.016
16 | anchor_right = 0.984
17 | anchor_bottom = 1.0
18 | margin_left = 47.616
19 | margin_top = 48.0
20 | margin_right = -47.616
21 | margin_bottom = -48.0
22 | grow_horizontal = 2
23 | grow_vertical = 2
24 | size_flags_horizontal = 7
25 | size_flags_vertical = 7
26 | expand = true
27 | stretch_mode = 6
28 | __meta__ = {
29 | "_edit_use_anchors_": false
30 | }
31 |
32 | [connection signal="gui_input" from="." to="." method="_on_MediaHolder_gui_input"]
33 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/icons/chat_bubble_outline_white_36dp.svg.import:
--------------------------------------------------------------------------------
1 | [remap]
2 |
3 | importer="texture"
4 | type="StreamTexture"
5 | path="res://.import/chat_bubble_outline_white_36dp.svg-a73967c4c1d287614e668d408bd2d388.stex"
6 | metadata={
7 | "vram_texture": false
8 | }
9 |
10 | [deps]
11 |
12 | source_file="res://res/imgs/icons/chat_bubble_outline_white_36dp.svg"
13 | dest_files=[ "res://.import/chat_bubble_outline_white_36dp.svg-a73967c4c1d287614e668d408bd2d388.stex" ]
14 |
15 | [params]
16 |
17 | compress/mode=0
18 | compress/lossy_quality=0.7
19 | compress/hdr_mode=0
20 | compress/bptc_ldr=0
21 | compress/normal_map=0
22 | flags/repeat=0
23 | flags/filter=true
24 | flags/mipmaps=false
25 | flags/anisotropic=false
26 | flags/srgb=2
27 | process/fix_alpha_border=true
28 | process/premult_alpha=false
29 | process/HDR_as_SRGB=false
30 | process/invert_color=false
31 | stream=false
32 | size_limit=0
33 | detect_3d=true
34 | svg/scale=1.0
35 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/thumbnail_image_holder/TImageHOlder.gd:
--------------------------------------------------------------------------------
1 | extends Control
2 | class_name TImageHolder
3 |
4 | signal image_removed(img)
5 |
6 | var path : String
7 | var id : String setget set_id
8 | var texture : ImageTexture setget set_texture
9 |
10 |
11 | # Called when the node enters the scene tree for the first time.
12 | func _ready():
13 | hide()
14 | $Button.hide()
15 |
16 | func set_id(_id : String) -> void:
17 | id = _id
18 | texture.set_meta("id", id)
19 |
20 | func set_texture(_texture : ImageTexture) -> void:
21 | texture = _texture
22 | $TextureRect.set_texture(texture)
23 |
24 | func get_texture() -> ImageTexture:
25 | return $TextreRect.get_texture()
26 |
27 | func _on_PanelContainer_mouse_entered():
28 | $Button.show()
29 |
30 |
31 | func _on_PanelContainer_mouse_exited():
32 | $Button.hide()
33 |
34 |
35 | func _on_Button_pressed():
36 | emit_signal("image_removed", self)
37 |
--------------------------------------------------------------------------------
/todo-list/scn/Loading/loading.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=3 format=2]
2 |
3 | [ext_resource path="res://scn/Loading/loading.gd" type="Script" id=1]
4 | [ext_resource path="res://imgs/throbber.svg" type="Texture" id=2]
5 |
6 | [node name="Loading" type="Control"]
7 | anchor_right = 1.0
8 | anchor_bottom = 1.0
9 | script = ExtResource( 1 )
10 | __meta__ = {
11 | "_edit_use_anchors_": false
12 | }
13 |
14 | [node name="ColorRect" type="ColorRect" parent="."]
15 | anchor_right = 1.0
16 | anchor_bottom = 1.0
17 | color = Color( 0, 0, 0, 0.588235 )
18 |
19 | [node name="Throbber" type="TextureRect" parent="."]
20 | anchor_left = 0.5
21 | anchor_top = 0.5
22 | anchor_right = 0.5
23 | anchor_bottom = 0.5
24 | margin_left = -106.0
25 | margin_top = -106.0
26 | margin_right = 106.0
27 | margin_bottom = 106.0
28 | grow_horizontal = 2
29 | grow_vertical = 2
30 | rect_pivot_offset = Vector2( 106, 106 )
31 | texture = ExtResource( 2 )
32 | expand = true
33 | stretch_mode = 6
34 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/containers/popup/Popup.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=3 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/basic/containers/popup/popup.gd" type="Script" id=1]
4 |
5 | [sub_resource type="StyleBoxFlat" id=1]
6 | resource_local_to_scene = true
7 | content_margin_left = 20.0
8 | content_margin_right = 20.0
9 | content_margin_top = 20.0
10 | content_margin_bottom = 20.0
11 | bg_color = Color( 0.164706, 0.164706, 0.164706, 1 )
12 | border_width_left = 1
13 | border_width_top = 1
14 | border_width_right = 1
15 | border_width_bottom = 1
16 | corner_radius_top_left = 5
17 | corner_radius_top_right = 5
18 | corner_radius_bottom_right = 5
19 | corner_radius_bottom_left = 5
20 | corner_detail = 20
21 |
22 | [node name="Popup" type="PopupPanel"]
23 | margin_right = 40.0
24 | margin_bottom = 40.0
25 | mouse_filter = 2
26 | size_flags_horizontal = 0
27 | size_flags_vertical = 0
28 | custom_styles/panel = SubResource( 1 )
29 | script = ExtResource( 1 )
30 |
--------------------------------------------------------------------------------
/todo-list/scn/Task/task.gd:
--------------------------------------------------------------------------------
1 | extends HBoxContainer
2 | class_name Task
3 |
4 | onready var content : Label = $Content
5 | onready var check : CheckBox = $Check
6 |
7 | var id : int
8 | var is_complete : bool setget set_is_complete
9 |
10 | func _ready():
11 | Supabase.database.connect("deleted", self, "_on_deleted")
12 |
13 |
14 | func _on_Check_toggled(button_pressed : bool):
15 | if button_pressed :
16 | content.set("custom_colors/font_color", Color("#787878"))
17 | else :
18 | content.set("custom_colors/font_color", Color.white)
19 | Supabase.database.query(SupabaseQuery.new().from("todos").update({"is_complete":button_pressed}).eq("id",str(id)))
20 |
21 | func set_is_complete(complete : bool):
22 | is_complete = complete
23 | check.pressed = (is_complete)
24 |
25 | func _on_RemoveBtn_pressed():
26 | Supabase.database.query(SupabaseQuery.new().from("todos").delete().eq("id",str(id)))
27 |
28 | func _on_deleted(delete_result : Array):
29 | if delete_result[0].id == id : queue_free()
30 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/containers/panel/Panel.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=3 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/basic/containers/panel/panel.gd" type="Script" id=1]
4 |
5 | [sub_resource type="StyleBoxFlat" id=1]
6 | resource_local_to_scene = true
7 | content_margin_left = 20.0
8 | content_margin_right = 20.0
9 | content_margin_top = 20.0
10 | content_margin_bottom = 20.0
11 | bg_color = Color( 1, 1, 1, 1 )
12 | border_width_left = 1
13 | border_width_top = 1
14 | border_width_right = 1
15 | border_width_bottom = 1
16 | corner_radius_top_left = 5
17 | corner_radius_top_right = 5
18 | corner_radius_bottom_right = 5
19 | corner_radius_bottom_left = 5
20 | corner_detail = 20
21 |
22 | [node name="Panel" type="PanelContainer"]
23 | anchor_right = 1.0
24 | anchor_bottom = 1.0
25 | mouse_filter = 2
26 | size_flags_horizontal = 0
27 | size_flags_vertical = 0
28 | custom_styles/panel = SubResource( 1 )
29 | script = ExtResource( 1 )
30 | __meta__ = {
31 | "_edit_use_anchors_": false
32 | }
33 |
--------------------------------------------------------------------------------
/slack-clone/res/shaders/rounded.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="ShaderMaterial" load_steps=4 format=2]
2 |
3 | [ext_resource path="res://res/imgs/rounded.svg" type="Texture" id=1]
4 |
5 | [sub_resource type="VisualShaderNodeTexture" id=1]
6 | texture = ExtResource( 1 )
7 |
8 | [sub_resource type="VisualShader" id=2]
9 | code = "shader_type canvas_item;
10 | uniform sampler2D tex_frg_2;
11 |
12 |
13 |
14 | void vertex() {
15 | // Output:0
16 |
17 | }
18 |
19 | void fragment() {
20 | // Texture:2
21 | vec4 tex_frg_2_read = texture(tex_frg_2, UV.xy);
22 | vec3 n_out2p0 = tex_frg_2_read.rgb;
23 | float n_out2p1 = tex_frg_2_read.a;
24 |
25 | // Output:0
26 | COLOR.a = n_out2p1;
27 |
28 | }
29 |
30 | void light() {
31 | // Output:0
32 |
33 | }
34 | "
35 | mode = 1
36 | flags/light_only = false
37 | nodes/fragment/2/node = SubResource( 1 )
38 | nodes/fragment/2/position = Vector2( -80, 300 )
39 | nodes/fragment/connections = PoolIntArray( 2, 1, 0, 1 )
40 |
41 | [resource]
42 | resource_local_to_scene = true
43 | shader = SubResource( 2 )
44 |
--------------------------------------------------------------------------------
/todo-list/scn/Buttons/Btn.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=4 format=2]
2 |
3 | [ext_resource path="res://fonts/SEGOEUIB.TTF" type="DynamicFontData" id=1]
4 |
5 | [sub_resource type="StyleBoxFlat" id=1]
6 | content_margin_left = 20.0
7 | content_margin_right = 20.0
8 | content_margin_top = 5.0
9 | content_margin_bottom = 5.0
10 | bg_color = Color( 0.141176, 0.705882, 0.494118, 1 )
11 | corner_radius_top_left = 5
12 | corner_radius_top_right = 5
13 | corner_radius_bottom_right = 5
14 | corner_radius_bottom_left = 5
15 |
16 | [sub_resource type="DynamicFont" id=2]
17 | size = 14
18 | font_data = ExtResource( 1 )
19 |
20 | [node name="Btn" type="Button"]
21 | margin_left = 438.0
22 | margin_top = 60.0
23 | margin_right = 554.0
24 | margin_bottom = 90.0
25 | size_flags_horizontal = 4
26 | custom_styles/hover = SubResource( 1 )
27 | custom_styles/pressed = SubResource( 1 )
28 | custom_styles/focus = SubResource( 1 )
29 | custom_styles/disabled = SubResource( 1 )
30 | custom_styles/normal = SubResource( 1 )
31 | custom_fonts/font = SubResource( 2 )
32 | text = "Button"
33 | __meta__ = {
34 | "_edit_use_anchors_": false
35 | }
36 |
--------------------------------------------------------------------------------
/icon.svg:
--------------------------------------------------------------------------------
1 |
16 |
--------------------------------------------------------------------------------
/slack-clone/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Nicolò Santilio
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/slack-clone/scn/classes/user/User.gd:
--------------------------------------------------------------------------------
1 | extends PanelContainer
2 |
3 | signal update_user()
4 | signal logout()
5 |
6 | onready var popup_menu : SPopup = $PopupUser
7 |
8 |
9 | func _ready():
10 | popup_menu._set_mode(Globals.mode)
11 |
12 | func set_user(user : UsersManager.User) -> void:
13 | user.connect("update_picture", $User/Avatar, "set_avatar")
14 | user.connect("update_user", self, "update_user")
15 |
16 | $User/Avatar.set_avatar(user.avatar)
17 | set_user_name(user)
18 | $User/Avatar.set_status(user.status)
19 | popup_menu.set_permissions(user.role)
20 |
21 | func update_user(data : UsersManager.User) -> void:
22 | set_user_name(data)
23 | $User/Avatar.set_status(data.status)
24 | popup_menu.set_permissions(data.role)
25 |
26 | func set_user_name(user : UsersManager.User) -> void:
27 | $User/Label.set_text("%s (%s)"%[user.username, user.role])
28 |
29 |
30 | func _on_Options_pressed():
31 | popup_menu.popup_on_pos(Vector2($User/Options.get_global_rect().size.x,0) + $User/Options.get_global_rect().position)
32 |
33 |
34 | func _on_PopupUser_logout():
35 | emit_signal("logout")
36 |
37 |
38 | func _on_PopupUser_update_user():
39 | emit_signal("update_user")
40 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/add_chanel_panel/AddChanelPanel.gd:
--------------------------------------------------------------------------------
1 | extends SPanel
2 |
3 | signal hide_add_channel()
4 |
5 | onready var slug : SInput = $VBoxContainer/Name
6 | onready var description : SInput = $VBoxContainer/Description
7 |
8 |
9 |
10 | # Called when the node enters the scene tree for the first time.
11 | func _ready():
12 | $VBoxContainer/HBoxContainer/Confirm.disabled = true
13 |
14 | func clear():
15 | slug.set_text("")
16 | description.set_text("")
17 |
18 |
19 | func _on_Cancel_pressed():
20 | hide()
21 | emit_signal("hide_add_channel")
22 | clear()
23 |
24 |
25 | func _on_Confirm_pressed():
26 | yield(RequestsManager.add_new_channel(slug.get_text(), description.get_text()), "completed")
27 | $VBoxContainer/HBoxContainer/Confirm.stop_loading()
28 | $VBoxContainer/HBoxContainer/Confirm.disabled = true
29 | _on_Cancel_pressed()
30 |
31 | func _on_Name_text_changed(text):
32 | $VBoxContainer/HBoxContainer/Confirm.disabled = not (slug.get_text() != "" and description.get_text() != "")
33 |
34 |
35 | func _on_Description_text_changed(text):
36 | $VBoxContainer/HBoxContainer/Confirm.disabled = not (slug.get_text() != "" and description.get_text() != "")
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/add_dm_panel/AddDMPanel.gd:
--------------------------------------------------------------------------------
1 | extends SPanel
2 |
3 | signal hide_add_dm_panel()
4 | signal send_dm_to_user(user)
5 |
6 | export (PackedScene) var user_button_scn : PackedScene
7 |
8 | onready var user_list : VBoxContainer = $VBoxContainer/UserListContainer/UserList
9 |
10 | func _ready():
11 | pass # Replace with function body.
12 |
13 | func load_users() -> void:
14 | var task : DatabaseTask = yield(RequestsManager.get_all_users(), "completed")
15 | for user_data in task.data:
16 | var user_button : UserButton = user_button_scn.instance()
17 | var user : UsersManager.User = UsersManager.get_user_by_id(user_data.id)
18 | user_list.add_child(user_button)
19 | user_button.set_user(user)
20 | user_button.connect("send_dm_to", self, "_on_send_dm_to")
21 |
22 | func _on_Panel_visibility_changed():
23 | if visible:
24 | load_users()
25 |
26 | func _on_send_dm_to(user : UsersManager.User) -> void:
27 | emit_signal("send_dm_to_user", user)
28 |
29 | func _on_OutlineButton_pressed():
30 | hide()
31 | emit_signal("hide_add_dm_panel")
32 | clear()
33 |
34 | func clear():
35 | for btn in user_list.get_children():
36 | btn.queue_free()
37 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/light_mode_white_36dp.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/popup_message_menu/PopupMessageMenu.gd:
--------------------------------------------------------------------------------
1 | extends SPopup
2 | class_name PopupMessageMenu
3 |
4 | signal delete_message(message)
5 |
6 | var message
7 |
8 | func _ready():
9 | pass
10 |
11 | func set_permissions(role : String) -> void:
12 | match role:
13 | "admin":
14 | $Buttons/Delete.show()
15 | "moderator":
16 | $Buttons/Delete.show()
17 | _:
18 | $Buttons/Delete.hide()
19 | $Buttons/Delete.disabled = true
20 |
21 | func _set_mode(_mode : int) -> void:
22 | for child in $Buttons.get_children():
23 | child.set_mode(_mode)
24 |
25 | func set_message(message) -> void:
26 | self.message = message
27 |
28 | func popup_on_pos(pos : Vector2) -> void:
29 | if not are_button_visible(): return
30 | popup(Rect2(pos - Vector2(162, 0), Vector2(20,20)))
31 |
32 | func _on_Delete_pressed():
33 | message.hide()
34 | RequestsManager.delete_message(message.id)
35 | if not message.media.empty():
36 | RequestsManager.delete_message_media(message.media)
37 | emit_signal("delete_message", message)
38 | hide()
39 |
40 | func are_button_visible() -> bool:
41 | for button in $Buttons.get_children():
42 | if button.visible:
43 | return true
44 | return false
45 |
46 | func _on_PopupMessageMenu_focus_exited():
47 | hide()
48 |
--------------------------------------------------------------------------------
/slack-clone/res/shaders/round_avatar.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="ShaderMaterial" load_steps=5 format=2]
2 |
3 | [ext_resource path="res://res/imgs/rounded.svg" type="Texture" id=1]
4 |
5 | [sub_resource type="VisualShaderNodeTexture" id=1]
6 | texture = ExtResource( 1 )
7 |
8 | [sub_resource type="VisualShaderNodeTexture" id=2]
9 | source = 2
10 |
11 | [sub_resource type="VisualShader" id=3]
12 | code = "shader_type canvas_item;
13 | uniform sampler2D tex_frg_2;
14 |
15 |
16 |
17 | void vertex() {
18 | // Output:0
19 |
20 | }
21 |
22 | void fragment() {
23 | // Texture:3
24 | vec3 n_out3p0;
25 | float n_out3p1;
26 | {
27 | vec4 _tex_read = texture(TEXTURE , UV.xy);
28 | n_out3p0 = _tex_read.rgb;
29 | n_out3p1 = _tex_read.a;
30 | }
31 |
32 | // Texture:2
33 | vec4 tex_frg_2_read = texture(tex_frg_2, UV.xy);
34 | vec3 n_out2p0 = tex_frg_2_read.rgb;
35 | float n_out2p1 = tex_frg_2_read.a;
36 |
37 | // Output:0
38 | COLOR.rgb = n_out3p0;
39 | COLOR.a = n_out2p1;
40 |
41 | }
42 |
43 | void light() {
44 | // Output:0
45 |
46 | }
47 | "
48 | graph_offset = Vector2( -321, 55 )
49 | mode = 1
50 | flags/light_only = false
51 | nodes/fragment/2/node = SubResource( 1 )
52 | nodes/fragment/2/position = Vector2( -80, 300 )
53 | nodes/fragment/3/node = SubResource( 2 )
54 | nodes/fragment/3/position = Vector2( 20, 120 )
55 | nodes/fragment/connections = PoolIntArray( 2, 1, 0, 1, 3, 0, 0, 0 )
56 |
57 | [resource]
58 | resource_local_to_scene = true
59 | render_priority = 1
60 | shader = SubResource( 3 )
61 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |

2 |
3 | # Godot Engine - Supabase Examples
4 |
5 | A library containing some examples made with Godot Engine as a client for Supabase backend.
6 | Examples are developed using [fenix-hub/godot-engine.supabase](https://github.com/fenix-hub/godot-engine.supabase) plugin for Godot Engine.
7 |
8 | ### List of examples
9 | - [**ToDot List**](/todo-list) (Multiplatform Todo list - following [Todo list demo](https://github.com/supabase/supabase/tree/master/examples/nextjs-todo-list) by [supabase](https://supabase.io/))
10 | - [**SlackGD**](/slack-clone) (Multiplatform Realtime chat - following [Slack clone demo](https://github.com/supabase/supabase/tree/master/examples/nextjs-slack-clone) by [supabase](https://supabase.io/))
11 | - [**TicTacDot**](/tictactoe) (Multiplatform Realtime TicTacToe)
12 | - [**Godotgram**](/instagram-clone) (Multiplatform Instagram Clone)
13 |
14 | ### List of web demo
15 | - [**web ToDot List**](https://demo.nicolosantilio.com/todo-list/app)
16 | - [**web SlackGD**](https://demo.nicolosantilio.com/slack-gd/app)
17 | - [todo] [**web TicTacDot**](#)
18 | - [todo] [**web Godotgram**](#)
19 |
20 | ### Folder structure
21 | Each example consists of its *source code* (in `/source`) written in gdscript plus some *exported binaries* (in `/export`) for different platforms (ex. Windows, Android, Linux, HTML).
22 | Also, each example has a self hosted HTML demo available to test it from mobile and desktop platforms.
23 |
--------------------------------------------------------------------------------
/todo-list/scn/LogScreen/log_screen.gd:
--------------------------------------------------------------------------------
1 | extends Control
2 |
3 | onready var user_email : LineEdit = $LogPanel/LogContainer/UserData/Email
4 | onready var user_passwrd : LineEdit = $LogPanel/LogContainer/UserData/Password
5 | onready var error_lbl : Label = $LogPanel/LogContainer/Error
6 |
7 | var mail : String
8 | var pwd : String
9 |
10 | # Called when the node enters the scene tree for the first time.
11 | func _ready():
12 | Supabase.auth.connect("error", self, "_on_auth_error")
13 | error_lbl.hide()
14 |
15 | func _on_auth_error(error : SupabaseAuthError):
16 | get_tree().call_group("loading_scene", "set_loading")
17 | print(error)
18 | print_error(str(error))
19 | match error.type :
20 | "invalid_grant":
21 | sign_up(mail ,pwd)
22 |
23 | func sign_in(email : String, password : String):
24 | Supabase.auth.sign_in(email, password)
25 | error_lbl.hide()
26 |
27 | func sign_up(email : String, password : String):
28 | Supabase.auth.sign_up(email, password)
29 | error_lbl.hide()
30 | get_tree().call_group("loading_scene", "set_loading", true)
31 |
32 | func _on_SignInBtn_pressed():
33 | mail = user_email.get_text()
34 | pwd = user_passwrd.get_text()
35 | if mail.length() > 1 and pwd.length() > 1:
36 | sign_in(mail, pwd)
37 | get_tree().call_group("loading_scene", "set_loading", true)
38 | else:
39 | print_error("'mail' and 'password' fields must be filled.")
40 |
41 | func print_error(text : String):
42 | error_lbl.show()
43 | error_lbl.set_text(text)
44 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/chat_container/SlackChat.gd:
--------------------------------------------------------------------------------
1 | extends PanelContainer
2 |
3 | var colors : Dictionary = {
4 | bg = [Color("ffffff"), Color("333333")]
5 | }
6 |
7 | onready var channel_container : ScrollContainer = $Container/ChannelContainer
8 |
9 | func set_channel(channel : Channel) -> void:
10 | var ch_name : String = ("# %s" % channel.slug) if not channel.is_dm else channel.slug
11 | $Container/Panel/HBoxContainer/Name.set_text(ch_name)
12 | $Container/Panel/HBoxContainer/Description.set_text(channel.description)
13 |
14 | func _connect_signals():
15 | get_parent().get_node("SlackMenu").connect("add_channel", self, "_on_add_channel")
16 |
17 | func _ready():
18 | $Container/Panel/HBoxContainer/Name.set_text("")
19 | $Container/Panel/HBoxContainer/Description.set_text("")
20 | _connect_signals()
21 |
22 | add_to_group("slack_components")
23 |
24 | func _on_add_channel(channel : Channel) -> void:
25 | channel.connect("new_message", self, "_on_new_message")
26 | channel_container.add_child(channel)
27 |
28 | func _on_new_message(message : Message) -> void:
29 | scroll()
30 |
31 | func scroll() -> void:
32 | yield(get_tree(), "idle_frame")
33 | channel_container.scroll_vertical = Globals.current_channel.rect_size.y
34 |
35 | func set_mode(mode : int) -> void:
36 | get("custom_styles/panel").set("bg_color", colors.bg[mode])
37 | $Container/Panel.get("custom_styles/panel").set("bg_color", colors.bg[mode])
38 |
39 |
40 | func _on_InputContainer_pressed():
41 | Globals.filedrop_handler = $FileDropHandler
42 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/channels_menu_container/ChannelsMenuContainer.gd:
--------------------------------------------------------------------------------
1 | extends VBoxContainer
2 |
3 | signal selected(channel)
4 | signal add_new_channel()
5 |
6 | export (PackedScene) var channel_btn_scn : PackedScene
7 | export (Texture) var collapsed_texture : Texture
8 | export (Texture) var uncollapsed_texture : Texture
9 |
10 | var collapsed : bool = true
11 |
12 | func set_mode(_mode : int) -> void:
13 | $Container/TextButton.set_mode(_mode)
14 | $Container/AddChannel.set_mode(_mode)
15 |
16 | func _ready():
17 | add_to_group("slack_components")
18 |
19 | Supabase.realtime.client()
20 |
21 | func add_channel(channel : Channel) -> void:
22 | var channel_btn : TextButton = channel_btn_scn.instance()
23 | $ChannelButtons.add_child(channel_btn)
24 | channel_btn.set_text("# "+channel.slug)
25 | channel_btn.set_meta("channel", channel)
26 | channel_btn.set_mode(Globals.mode)
27 | channel_btn.modulate.a = 0.4
28 | channel_btn.connect("pressed", self, "_on_pressed", [channel_btn])
29 |
30 | func _on_TextButton_pressed():
31 | collapsed = not collapsed
32 | $ChannelButtons.visible = collapsed
33 | if collapsed : $Container/TextButton.set_texture(collapsed_texture)
34 | else : $Container/TextButton.set_texture(uncollapsed_texture)
35 |
36 | func _on_pressed(channel_btn : TextButton) -> void:
37 | select_channel(channel_btn.get_meta("channel"))
38 |
39 | func select_channel(channel : Channel) -> void:
40 | emit_signal("selected", channel)
41 |
42 |
43 | func _on_AddChannel_pressed():
44 | emit_signal("add_new_channel")
45 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/update_user_panel/UpdateUserPanel.gd:
--------------------------------------------------------------------------------
1 | extends SPanel
2 |
3 | signal hide_update_user()
4 |
5 | onready var username : SInput = $VBoxContainer/Name
6 | onready var avatar : TextureRect = $VBoxContainer/Avatar
7 |
8 | func _ready():
9 | pass
10 |
11 |
12 | func set_user(user : UsersManager.User) -> void:
13 | user.connect("update_user", self, "_on_update_document")
14 | user.connect("update_picture", self, "set_avatar")
15 | username.set_text(user.username)
16 | if user.avatar:
17 | avatar.set_texture(user.avatar)
18 |
19 | func _on_update_document(data : UsersManager.User):
20 | username.set_text(data.username)
21 |
22 | func set_avatar(texture : Texture) -> void:
23 | avatar.set_texture(texture)
24 |
25 | func set_avatar_path(path : String) -> void:
26 | avatar.set_meta("path", path)
27 |
28 | func clear():
29 | pass
30 |
31 |
32 | func _on_Cancel_pressed():
33 | hide()
34 | emit_signal("hide_update_user")
35 | clear()
36 |
37 |
38 | func _on_Confirm_pressed():
39 | if Globals.user.avatar != avatar.get_texture():
40 | yield(RequestsManager.update_user_avatar(avatar.get_meta("path"), Globals.user.avatar == null), "completed")
41 | RequestsManager.update_username(username.get_text())
42 | $VBoxContainer/HBoxContainer/Confirm.stop_loading()
43 | _on_Cancel_pressed()
44 |
45 | func _on_FileDropHandler_files_dropped(files):
46 | set_avatar(Utilities.get_texture(files[0]))
47 | set_avatar_path(files[0])
48 |
49 |
50 | func _on_UpdateUserPanel_visibility_changed():
51 | if visible: Globals.filedrop_handler = $VBoxContainer/Avatar/FileDropHandler
52 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/dm_menu_container/DMMenuContainer.gd:
--------------------------------------------------------------------------------
1 | extends VBoxContainer
2 |
3 | signal selected(dm)
4 | signal add_new_dm()
5 |
6 | export (PackedScene) var channel_btn_scn : PackedScene
7 | export (Texture) var collapsed_texture : Texture
8 | export (Texture) var uncollapsed_texture : Texture
9 |
10 | var collapsed : bool = true
11 |
12 | func set_mode(_mode : int) -> void:
13 | $Container/TextButton.set_mode(_mode)
14 | $Container/AddDM.set_mode(_mode)
15 |
16 | func _ready():
17 | add_to_group("slack_components")
18 |
19 | Supabase.realtime.client()
20 |
21 | func add_channel(channel : Channel) -> void:
22 | var channel_btn : TextButton = channel_btn_scn.instance()
23 | $ChannelButtons.add_child(channel_btn)
24 | channel.connect("update_channel", self, "_on_update_channel", [channel_btn])
25 | channel_btn.connect("pressed", self, "_on_pressed", [channel_btn])
26 | channel_btn.set_text(channel.slug)
27 | channel_btn.set_meta("channel", channel)
28 | channel_btn.set_mode(Globals.mode)
29 | channel_btn.modulate.a = 0.4
30 |
31 |
32 | func _on_update_channel(channel : Channel, channel_btn : TextButton) -> void:
33 | channel_btn.set_text(channel.slug)
34 |
35 | func _on_TextButton_pressed():
36 | collapsed = not collapsed
37 | $ChannelButtons.visible = collapsed
38 | if collapsed : $Container/TextButton.set_texture(collapsed_texture)
39 | else : $Container/TextButton.set_texture(uncollapsed_texture)
40 |
41 | func _on_pressed(channel_btn : TextButton) -> void:
42 | emit_signal("selected", channel_btn.get_meta("channel"))
43 |
44 |
45 | func _on_AddDM_pressed():
46 | emit_signal("add_new_dm")
47 |
--------------------------------------------------------------------------------
/slack-clone/scn/classes/media_preview/MediaPreview.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=5 format=2]
2 |
3 | [ext_resource path="res://res/shaders/lerp_shader.tres" type="Material" id=1]
4 | [ext_resource path="res://scn/classes/media_preview/MediaPreview.gd" type="Script" id=2]
5 | [ext_resource path="res://res/imgs/bg.png" type="Texture" id=3]
6 |
7 | [sub_resource type="StyleBoxFlat" id=1]
8 | bg_color = Color( 0.352941, 0.352941, 0.352941, 1 )
9 | corner_detail = 20
10 |
11 | [node name="MediaPreview" type="PanelContainer"]
12 | margin_right = 200.0
13 | margin_bottom = 200.0
14 | rect_min_size = Vector2( 202, 202 )
15 | rect_clip_content = true
16 | mouse_default_cursor_shape = 2
17 | custom_styles/panel = SubResource( 1 )
18 | script = ExtResource( 2 )
19 | __meta__ = {
20 | "_edit_use_anchors_": false
21 | }
22 |
23 | [node name="Image" type="TextureRect" parent="."]
24 | margin_left = 1.0
25 | margin_top = 1.0
26 | margin_right = 201.0
27 | margin_bottom = 201.0
28 | rect_min_size = Vector2( 200, 200 )
29 | size_flags_horizontal = 4
30 | size_flags_vertical = 4
31 | expand = true
32 | stretch_mode = 7
33 | __meta__ = {
34 | "_edit_use_anchors_": false
35 | }
36 |
37 | [node name="Loader" type="TextureRect" parent="."]
38 | self_modulate = Color( 1, 1, 1, 0.529412 )
39 | material = ExtResource( 1 )
40 | margin_left = 1.0
41 | margin_top = 1.0
42 | margin_right = 201.0
43 | margin_bottom = 201.0
44 | rect_min_size = Vector2( 200, 200 )
45 | rect_pivot_offset = Vector2( 100, 100 )
46 | mouse_filter = 0
47 | size_flags_horizontal = 4
48 | size_flags_vertical = 4
49 | texture = ExtResource( 3 )
50 | expand = true
51 | stretch_mode = 7
52 |
53 | [connection signal="gui_input" from="." to="." method="_on_MediaPreview_gui_input"]
54 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/button/primary/primary_button.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends DefaultButton
3 | class_name PrimaryButton
4 |
5 | export var enable_loading : bool = false
6 |
7 | onready var loading_texture := load("res://supabase-ui/res/icons/loader.svg")
8 | var current_texture : Texture = null
9 | var loading : bool = false
10 |
11 |
12 | func start_loading():
13 | loading = true
14 | current_texture = texture
15 | set_expand(true)
16 | enable_icon(true)
17 | set_texture(loading_texture)
18 | $ButtonContainer/Icon.rect_pivot_offset = $ButtonContainer/Icon.rect_size/2
19 | set_process_internal(true)
20 |
21 | func stop_loading() -> void:
22 | loading = false
23 | if not current_texture:
24 | enable_icon(false)
25 | set_texture(current_texture)
26 | set_process_internal(false)
27 | $ButtonContainer/Icon.rect_rotation = 0
28 |
29 | func _notification(what : int) -> void:
30 | if what == NOTIFICATION_INTERNAL_PROCESS:
31 | _internal_process(get_process_delta_time())
32 |
33 | func _internal_process(_delta : float) -> void:
34 | $ButtonContainer/Icon.rect_rotation += _delta*240
35 |
36 | func _pressed():
37 | ._pressed()
38 | if enable_loading:
39 | if loading:
40 | stop_loading()
41 | else:
42 | start_loading()
43 |
44 | func _load_defaults():
45 | property_list[0]["class_name"] = "PrimaryButton"
46 | property_list[0]["name"] = "PrimaryButton"
47 |
48 | colors.text = [Color.white, Color.white]
49 | colors.text_hover = [Color.white, Color.white]
50 | colors.icon = [Color.white, Color.white]
51 | colors.button = [Color("#24b47e"), Color("#24b47e")]
52 | colors.button_hover = [Color("#4bd2a0"), Color("#198c61")]
53 |
54 | text = "Primary Button"
55 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/button/outline/OutlineButton.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=5 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/basic/button/outline/outline_button.gd" type="Script" id=1]
4 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Medium.ttf" type="DynamicFontData" id=2]
5 | [ext_resource path="res://supabase-ui/basic/button/outline/OutlineButton.tres" type="StyleBox" id=3]
6 |
7 | [sub_resource type="DynamicFont" id=1]
8 | size = 15
9 | font_data = ExtResource( 2 )
10 |
11 | [node name="OutlineButton" type="PanelContainer"]
12 | margin_right = 126.0
13 | margin_bottom = 36.0
14 | mouse_default_cursor_shape = 2
15 | custom_styles/panel = ExtResource( 3 )
16 | script = ExtResource( 1 )
17 | __meta__ = {
18 | "_edit_use_anchors_": true
19 | }
20 | icon_enabled = false
21 | texture = null
22 | expand = false
23 | size = Vector2( 24, 24 )
24 | text = "Outline Button"
25 | font_size = 15
26 |
27 | [node name="ButtonContainer" type="HBoxContainer" parent="."]
28 | modulate = Color( 0.254902, 0.254902, 0.254902, 1 )
29 | margin_left = 13.0
30 | margin_top = 9.0
31 | margin_right = 113.0
32 | margin_bottom = 27.0
33 | mouse_filter = 2
34 |
35 | [node name="Icon" type="TextureRect" parent="ButtonContainer"]
36 | visible = false
37 | margin_right = 32.0
38 | margin_bottom = 32.0
39 | rect_min_size = Vector2( 24, 24 )
40 | mouse_filter = 2
41 | size_flags_vertical = 4
42 |
43 | [node name="Text" type="Label" parent="ButtonContainer"]
44 | margin_right = 100.0
45 | margin_bottom = 18.0
46 | size_flags_horizontal = 7
47 | custom_fonts/font = SubResource( 1 )
48 | custom_colors/font_color = Color( 1, 1, 1, 1 )
49 | custom_constants/shadow_offset_x = 0
50 | custom_constants/shadow_offset_y = 0
51 | text = "Outline Button"
52 | align = 1
53 | valign = 1
54 |
55 | [node name="Tween" type="Tween" parent="."]
56 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/button/text/TextButton.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=5 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/basic/button/text/text_button.gd" type="Script" id=1]
4 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Medium.ttf" type="DynamicFontData" id=2]
5 | [ext_resource path="res://supabase-ui/basic/button/text/TextButton.tres" type="StyleBox" id=3]
6 |
7 | [sub_resource type="DynamicFont" id=1]
8 | size = 17
9 | font_data = ExtResource( 2 )
10 |
11 | [node name="TextButton" type="PanelContainer"]
12 | margin_right = 101.0
13 | margin_bottom = 31.0
14 | mouse_default_cursor_shape = 2
15 | custom_styles/panel = ExtResource( 3 )
16 | script = ExtResource( 1 )
17 | __meta__ = {
18 | "_edit_use_anchors_": true
19 | }
20 | disabled = false
21 | icon_enabled = false
22 | texture = null
23 | expand = false
24 | size = Vector2( 24, 24 )
25 | text_enabled = true
26 | text = "Text Button"
27 | font_size = 15
28 |
29 | [node name="ButtonContainer" type="HBoxContainer" parent="."]
30 | modulate = Color( 0.4, 0.4, 0.4, 1 )
31 | margin_left = 5.0
32 | margin_top = 5.0
33 | margin_right = 96.0
34 | margin_bottom = 26.0
35 | mouse_filter = 2
36 |
37 | [node name="Icon" type="TextureRect" parent="ButtonContainer"]
38 | visible = false
39 | margin_right = 32.0
40 | margin_bottom = 32.0
41 | rect_min_size = Vector2( 24, 24 )
42 | mouse_filter = 2
43 | size_flags_vertical = 4
44 |
45 | [node name="Text" type="Label" parent="ButtonContainer"]
46 | margin_right = 91.0
47 | margin_bottom = 21.0
48 | size_flags_horizontal = 7
49 | custom_fonts/font = SubResource( 1 )
50 | custom_colors/font_color = Color( 1, 1, 1, 1 )
51 | custom_constants/shadow_offset_x = 0
52 | custom_constants/shadow_offset_y = 0
53 | text = "Text Button"
54 | align = 1
55 | valign = 1
56 |
57 | [node name="Tween" type="Tween" parent="."]
58 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/button/link/LinkButton.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=5 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/basic/button/link/link_button.gd" type="Script" id=1]
4 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Medium.ttf" type="DynamicFontData" id=2]
5 | [ext_resource path="res://supabase-ui/basic/button/link/LinkButton.tres" type="StyleBox" id=3]
6 |
7 | [sub_resource type="DynamicFont" id=1]
8 | size = 15
9 | font_data = ExtResource( 2 )
10 |
11 | [node name="LinkButton" type="PanelContainer"]
12 | margin_right = 106.0
13 | margin_bottom = 36.0
14 | mouse_default_cursor_shape = 2
15 | custom_styles/panel = ExtResource( 3 )
16 | script = ExtResource( 1 )
17 | __meta__ = {
18 | "_edit_use_anchors_": true
19 | }
20 | icon_enabled = false
21 | texture = null
22 | expand = false
23 | size = Vector2( 32, 32 )
24 | text = "Link Button"
25 | font_size = 15
26 |
27 | [node name="ButtonContainer" type="HBoxContainer" parent="."]
28 | modulate = Color( 0.141176, 0.705882, 0.494118, 1 )
29 | margin_left = 13.0
30 | margin_top = 9.0
31 | margin_right = 93.0
32 | margin_bottom = 27.0
33 | mouse_filter = 2
34 |
35 | [node name="Icon" type="TextureRect" parent="ButtonContainer"]
36 | visible = false
37 | modulate = Color( 0.254902, 0.254902, 0.254902, 1 )
38 | margin_right = 32.0
39 | margin_bottom = 32.0
40 | rect_min_size = Vector2( 32, 32 )
41 | mouse_filter = 2
42 | size_flags_vertical = 4
43 |
44 | [node name="Text" type="Label" parent="ButtonContainer"]
45 | margin_right = 80.0
46 | margin_bottom = 18.0
47 | size_flags_horizontal = 7
48 | custom_fonts/font = SubResource( 1 )
49 | custom_colors/font_color = Color( 1, 1, 1, 1 )
50 | custom_constants/shadow_offset_x = 0
51 | custom_constants/shadow_offset_y = 0
52 | text = "Link Button"
53 | align = 1
54 | valign = 1
55 |
56 | [node name="Tween" type="Tween" parent="."]
57 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/button/default/DefaultButton.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=5 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/basic/button/default/default_button.gd" type="Script" id=1]
4 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Medium.ttf" type="DynamicFontData" id=2]
5 | [ext_resource path="res://supabase-ui/basic/button/default/DefaultButton.tres" type="StyleBox" id=3]
6 |
7 | [sub_resource type="DynamicFont" id=1]
8 | size = 15
9 | font_data = ExtResource( 2 )
10 |
11 | [node name="DefaultButton" type="PanelContainer"]
12 | margin_right = 126.0
13 | margin_bottom = 36.0
14 | mouse_default_cursor_shape = 2
15 | custom_styles/panel = ExtResource( 3 )
16 | script = ExtResource( 1 )
17 | __meta__ = {
18 | "_edit_use_anchors_": true
19 | }
20 | disabled = false
21 | icon_enabled = false
22 | texture = null
23 | expand = false
24 | size = Vector2( 24, 24 )
25 | text_enabled = true
26 | text = "Default Button"
27 | font_size = 15
28 |
29 | [node name="ButtonContainer" type="HBoxContainer" parent="."]
30 | modulate = Color( 0.254902, 0.254902, 0.254902, 1 )
31 | margin_left = 13.0
32 | margin_top = 9.0
33 | margin_right = 113.0
34 | margin_bottom = 27.0
35 | mouse_filter = 2
36 |
37 | [node name="Icon" type="TextureRect" parent="ButtonContainer"]
38 | visible = false
39 | margin_right = 24.0
40 | margin_bottom = 24.0
41 | rect_min_size = Vector2( 24, 24 )
42 | mouse_filter = 2
43 | size_flags_vertical = 4
44 |
45 | [node name="Text" type="Label" parent="ButtonContainer"]
46 | margin_right = 100.0
47 | margin_bottom = 18.0
48 | size_flags_horizontal = 7
49 | custom_fonts/font = SubResource( 1 )
50 | custom_colors/font_color = Color( 1, 1, 1, 1 )
51 | custom_constants/shadow_offset_x = 0
52 | custom_constants/shadow_offset_y = 0
53 | text = "Default Button"
54 | align = 1
55 | valign = 1
56 |
57 | [node name="Tween" type="Tween" parent="."]
58 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/popup_message_menu/PopupMessageMenu.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=6 format=2]
2 |
3 | [ext_resource path="res://scn/scenes/popup_message_menu/PopupMessageMenu.gd" type="Script" id=1]
4 | [ext_resource path="res://res/imgs/icons/delete_forever_white_36dp.svg" type="Texture" id=2]
5 | [ext_resource path="res://supabase-ui/basic/button/default/DefaultButton.tscn" type="PackedScene" id=3]
6 |
7 | [sub_resource type="StyleBoxEmpty" id=1]
8 |
9 | [sub_resource type="StyleBoxFlat" id=2]
10 | resource_local_to_scene = true
11 | content_margin_left = 13.0
12 | content_margin_right = 13.0
13 | content_margin_top = 9.0
14 | content_margin_bottom = 9.0
15 | bg_color = Color( 1, 1, 1, 1 )
16 | border_width_left = 1
17 | border_width_top = 1
18 | border_width_right = 1
19 | border_width_bottom = 1
20 | corner_radius_top_left = 5
21 | corner_radius_top_right = 5
22 | corner_radius_bottom_right = 5
23 | corner_radius_bottom_left = 5
24 | corner_detail = 20
25 | shadow_color = Color( 0, 0, 0, 0.0392157 )
26 | shadow_size = 1
27 | shadow_offset = Vector2( 0, 1.5 )
28 | anti_aliasing = false
29 |
30 | [node name="PopupMessageMenu" type="PopupPanel"]
31 | margin_right = 163.0
32 | margin_bottom = 42.0
33 | size_flags_horizontal = 0
34 | size_flags_vertical = 0
35 | custom_styles/panel = SubResource( 1 )
36 | script = ExtResource( 1 )
37 | __meta__ = {
38 | "_edit_use_anchors_": false
39 | }
40 |
41 | [node name="Buttons" type="VBoxContainer" parent="."]
42 | margin_right = 163.0
43 | margin_bottom = 42.0
44 | __meta__ = {
45 | "_edit_use_anchors_": false
46 | }
47 |
48 | [node name="Delete" parent="Buttons" instance=ExtResource( 3 )]
49 | margin_right = 163.0
50 | margin_bottom = 42.0
51 | custom_styles/panel = SubResource( 2 )
52 | icon_enabled = true
53 | texture = ExtResource( 2 )
54 | expand = true
55 | text = "Delete Message"
56 |
57 | [connection signal="pressed" from="Buttons/Delete" to="." method="_on_Delete_pressed"]
58 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/avatar.svg:
--------------------------------------------------------------------------------
1 |
2 |
61 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/typography/base_label/label.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends Label
3 | class_name SLabel
4 |
5 | export (int, "Light Mode", "Dark Mode") var mode : int = 0 setget set_mode
6 |
7 | var colors : Dictionary = {
8 | "text" : [Color("#1F1F1F"), Color.white],
9 | }
10 |
11 | var level : int = 5 setget set_level
12 | var font_size : int = 15 setget set_font_size
13 |
14 | var property_list : Array = [
15 | {
16 | "class_name": "SLabel",
17 | "hint": PROPERTY_HINT_NONE,
18 | "usage": PROPERTY_USAGE_CATEGORY,
19 | "name": "SLabel",
20 | "type": TYPE_STRING
21 | },
22 | {
23 | "usage": PROPERTY_USAGE_GROUP,
24 | "name": "Contents",
25 | "type": TYPE_STRING
26 | },
27 | {
28 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
29 | "name": "level",
30 | "hint": PROPERTY_HINT_ENUM,
31 | "hint_string" : "1,2,3,4,5",
32 | "type": TYPE_INT
33 | },
34 | {
35 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
36 | "name": "font_size",
37 | "type": TYPE_INT
38 | }
39 | ]
40 |
41 |
42 | func _get_property_list():
43 | return property_list
44 |
45 | func _init():
46 | set_level(4)
47 | set_text("")
48 |
49 | func _load_defaults():
50 | pass
51 |
52 | func _ready():
53 | _load_defaults()
54 | set_mode(mode)
55 | add_to_group("supabase_components")
56 |
57 | func set_text_color(_color : Color) -> void:
58 | set("custom_colors/font_color", _color)
59 |
60 |
61 | func set_mode(_mode : int) -> void:
62 | mode = _mode
63 | set_text_color(colors.text[mode])
64 |
65 | func set_font_size(_size : int) -> void:
66 | font_size = _size
67 | get("custom_fonts/font").set("size", _size)
68 |
69 | func set_level(_level : int) -> void:
70 | level = _level
71 | match level:
72 | 0: set_font_size(40)
73 | 1: set_font_size(35)
74 | 2: set_font_size(25)
75 | 3: set_font_size(19)
76 | 4: set_font_size(16)
77 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/typography/error_label/err_label.gd:
--------------------------------------------------------------------------------
1 | tool
2 | extends Label
3 | class_name SErrorLabel
4 |
5 | export (int, "Light Mode", "Dark Mode") var mode : int = 0 setget set_mode
6 |
7 | var colors : Dictionary = {
8 | "text" : [Color("#ff3333"), Color("#ff3333")],
9 | }
10 |
11 | var level : int = 5 setget set_level
12 | var font_size : int = 15 setget set_font_size
13 |
14 | var property_list : Array = [
15 | {
16 | "class_name": "SLabel",
17 | "hint": PROPERTY_HINT_NONE,
18 | "usage": PROPERTY_USAGE_CATEGORY,
19 | "name": "SLabel",
20 | "type": TYPE_STRING
21 | },
22 | {
23 | "usage": PROPERTY_USAGE_GROUP,
24 | "name": "Contents",
25 | "type": TYPE_STRING
26 | },
27 | {
28 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
29 | "name": "level",
30 | "hint": PROPERTY_HINT_ENUM,
31 | "hint_string" : "1,2,3,4,5",
32 | "type": TYPE_INT
33 | },
34 | {
35 | "usage": PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_SCRIPT_VARIABLE,
36 | "name": "font_size",
37 | "type": TYPE_INT
38 | }
39 | ]
40 |
41 |
42 | func _get_property_list():
43 | return property_list
44 |
45 |
46 |
47 | func _load_defaults():
48 | pass
49 |
50 | func _ready():
51 | _load_defaults()
52 | set_mode(mode)
53 | set_text("")
54 | set_level(4)
55 |
56 | add_to_group("supabase_components")
57 |
58 | func set_text_color(_color : Color) -> void:
59 | set("custom_colors/font_color", _color)
60 |
61 |
62 | func set_mode(_mode : int) -> void:
63 | mode = _mode
64 | set_text_color(colors.text[mode])
65 |
66 | func set_font_size(_size : int) -> void:
67 | font_size = _size
68 | get("custom_fonts/font").set("size", _size)
69 |
70 | func set_level(_level : int) -> void:
71 | level = _level
72 | match level:
73 | 0: set_font_size(40)
74 | 1: set_font_size(35)
75 | 2: set_font_size(25)
76 | 3: set_font_size(19)
77 | 4: set_font_size(16)
78 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/square.svg:
--------------------------------------------------------------------------------
1 |
2 |
64 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/email.svg:
--------------------------------------------------------------------------------
1 |
2 |
62 |
--------------------------------------------------------------------------------
/slack-clone/res/imgs/rounded.svg:
--------------------------------------------------------------------------------
1 |
2 |
64 |
--------------------------------------------------------------------------------
/slack-clone/scn/classes/avatar/Avatar.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=8 format=2]
2 |
3 | [ext_resource path="res://res/imgs/default-user-avatar.png" type="Texture" id=1]
4 | [ext_resource path="res://res/shaders/round_avatar.tres" type="Material" id=2]
5 | [ext_resource path="res://res/imgs/bg.png" type="Texture" id=3]
6 | [ext_resource path="res://res/shaders/lerp_shader.tres" type="Material" id=4]
7 | [ext_resource path="res://scn/classes/avatar/Avatar.gd" type="Script" id=5]
8 |
9 | [sub_resource type="StyleBoxFlat" id=1]
10 | bg_color = Color( 0.333333, 0.976471, 0.368627, 1 )
11 | corner_radius_top_left = 20
12 | corner_radius_top_right = 20
13 | corner_radius_bottom_right = 20
14 | corner_radius_bottom_left = 20
15 | corner_detail = 20
16 |
17 | [sub_resource type="DynamicFont" id=2]
18 |
19 | [node name="Avatar" type="TextureRect"]
20 | material = ExtResource( 2 )
21 | margin_right = 42.0
22 | margin_bottom = 42.0
23 | rect_min_size = Vector2( 42, 42 )
24 | rect_clip_content = true
25 | size_flags_horizontal = 0
26 | size_flags_vertical = 0
27 | texture = ExtResource( 1 )
28 | expand = true
29 | script = ExtResource( 5 )
30 | __meta__ = {
31 | "_edit_use_anchors_": false
32 | }
33 |
34 | [node name="Loader" type="TextureRect" parent="."]
35 | material = ExtResource( 4 )
36 | anchor_left = 0.5
37 | anchor_top = 0.5
38 | anchor_right = 0.5
39 | anchor_bottom = 0.5
40 | margin_left = -40.0
41 | margin_top = -40.0
42 | margin_right = 40.0
43 | margin_bottom = 40.0
44 | rect_min_size = Vector2( 80, 80 )
45 | rect_rotation = -15.0
46 | rect_pivot_offset = Vector2( 40, 40 )
47 | size_flags_horizontal = 3
48 | size_flags_vertical = 3
49 | texture = ExtResource( 3 )
50 | expand = true
51 | stretch_mode = 7
52 | __meta__ = {
53 | "_edit_use_anchors_": false
54 | }
55 |
56 | [node name="Status" type="Label" parent="."]
57 | visible = false
58 | anchor_left = 1.0
59 | anchor_top = 1.0
60 | anchor_right = 1.0
61 | anchor_bottom = 1.0
62 | margin_left = -12.0
63 | margin_top = -12.0
64 | rect_min_size = Vector2( 12, 12 )
65 | custom_styles/normal = SubResource( 1 )
66 | custom_fonts/font = SubResource( 2 )
67 | __meta__ = {
68 | "_edit_use_anchors_": false
69 | }
70 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/components/mode_btn/ModeBtn.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=7 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/components/mode_btn/mode_btn.gd" type="Script" id=1]
4 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Medium.ttf" type="DynamicFontData" id=2]
5 | [ext_resource path="res://supabase-ui/basic/button/default/DefaultButton.tres" type="StyleBox" id=3]
6 | [ext_resource path="res://supabase-ui/res/icons/dark_mode_white_24dp.svg" type="Texture" id=4]
7 | [ext_resource path="res://supabase-ui/res/icons/light_mode_white_36dp.svg" type="Texture" id=5]
8 |
9 | [sub_resource type="DynamicFont" id=1]
10 | size = 15
11 | font_data = ExtResource( 2 )
12 |
13 | [node name="ModeButton" type="PanelContainer"]
14 | margin_right = 162.0
15 | margin_bottom = 42.0
16 | mouse_default_cursor_shape = 2
17 | custom_styles/panel = ExtResource( 3 )
18 | script = ExtResource( 1 )
19 | __meta__ = {
20 | "_edit_use_anchors_": false
21 | }
22 | textures = [ ExtResource( 4 ), ExtResource( 5 ) ]
23 | disabled = false
24 | icon_enabled = true
25 | texture = ExtResource( 4 )
26 | expand = true
27 | size = Vector2( 24, 24 )
28 | text_enabled = true
29 | text = "Dark Mode"
30 | font_size = 15
31 |
32 | [node name="ButtonContainer" type="HBoxContainer" parent="."]
33 | modulate = Color( 0.4, 0.4, 0.4, 1 )
34 | margin_left = 13.0
35 | margin_top = 9.0
36 | margin_right = 149.0
37 | margin_bottom = 33.0
38 | mouse_filter = 2
39 |
40 | [node name="Icon" type="TextureRect" parent="ButtonContainer"]
41 | margin_right = 24.0
42 | margin_bottom = 24.0
43 | rect_min_size = Vector2( 24, 24 )
44 | mouse_filter = 2
45 | size_flags_vertical = 4
46 | texture = ExtResource( 4 )
47 | expand = true
48 |
49 | [node name="Text" type="Label" parent="ButtonContainer"]
50 | margin_left = 28.0
51 | margin_top = 3.0
52 | margin_right = 136.0
53 | margin_bottom = 21.0
54 | size_flags_horizontal = 7
55 | custom_fonts/font = SubResource( 1 )
56 | custom_colors/font_color = Color( 1, 1, 1, 1 )
57 | custom_constants/shadow_offset_x = 0
58 | custom_constants/shadow_offset_y = 0
59 | text = "Dark Mode"
60 | align = 1
61 | valign = 1
62 |
63 | [node name="Tween" type="Tween" parent="."]
64 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/key.svg:
--------------------------------------------------------------------------------
1 |
2 |
65 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/lock.svg:
--------------------------------------------------------------------------------
1 |
2 |
72 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/loader-line.svg:
--------------------------------------------------------------------------------
1 |
2 |
57 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/inbox.svg:
--------------------------------------------------------------------------------
1 |
2 |
60 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/input_container2/InputContainer2.gd:
--------------------------------------------------------------------------------
1 | extends MarginContainer
2 |
3 | signal pressed()
4 | signal send_message(text, images)
5 |
6 | export (PackedScene) var image_holder_scene : PackedScene
7 |
8 | onready var input : SInput = $PanelContainer/VBoxContainer/HBoxContainer/LineEdit
9 | onready var imgs_container : HBoxContainer = $PanelContainer/VBoxContainer/Imgs
10 |
11 | onready var send_btn : PrimaryButton = $PanelContainer/VBoxContainer/HBoxContainer/SendBtn
12 |
13 | func _ready():
14 | send_btn.disabled = true
15 |
16 | func load_images(images : PoolStringArray) -> void:
17 | if not imgs_container.visible: imgs_container.show()
18 | for image in images:
19 | var texture : ImageTexture = Utilities.get_texture(image)
20 | var img_rect : TImageHolder = image_holder_scene.instance()
21 | imgs_container.add_child(img_rect)
22 | img_rect.set_texture(texture)
23 | img_rect.show()
24 | img_rect.connect("image_removed", self, "_on_remove_image")
25 | img_rect.path = image
26 | img_rect.set_id("%s.%s" % [OS.get_unix_time(), image.get_extension()])
27 |
28 |
29 | func set_placeholder_text(text : String) -> void:
30 | input.set_placeholder(text)
31 |
32 |
33 | func _on_remove_image(img : TImageHolder):
34 | img.queue_free()
35 | if imgs_container.get_child_count() < 1 : imgs_container.hide()
36 |
37 | func stop_loading():
38 | send_btn.stop_loading()
39 |
40 | func send_message(text : String) -> void:
41 | emit_signal("send_message", text, imgs_container.get_children())
42 |
43 | func _on_SendBtn_pressed():
44 | send_message(input.get_text())
45 |
46 |
47 | func _on_LineEdit_text_entered(text):
48 | if text!="" and not send_btn.loading:
49 | send_btn.start_loading()
50 | send_message(text)
51 |
52 | func _on_LineEdit_text_changed(new_text : String):
53 | send_btn.disabled = (new_text == "")
54 |
55 | # ---------------------------------------------------------
56 |
57 | func clear():
58 | _clear_imgs()
59 | _clear_input()
60 | stop_loading()
61 |
62 | func _clear_input():
63 | input.clear()
64 |
65 | func _clear_imgs():
66 | for image in imgs_container.get_children():
67 | image.queue_free()
68 | imgs_container.hide()
69 |
70 |
71 |
72 | func _on_LineEdit_pressed():
73 | emit_signal("pressed")
74 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/basic/button/primary/PrimaryButton.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=5 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/basic/button/primary/primary_button.gd" type="Script" id=1]
4 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Medium.ttf" type="DynamicFontData" id=2]
5 |
6 | [sub_resource type="StyleBoxFlat" id=1]
7 | resource_local_to_scene = true
8 | resource_name = "PrimaryButton"
9 | content_margin_left = 13.0
10 | content_margin_right = 13.0
11 | content_margin_top = 9.0
12 | content_margin_bottom = 9.0
13 | bg_color = Color( 0.141176, 0.705882, 0.494118, 1 )
14 | corner_radius_top_left = 5
15 | corner_radius_top_right = 5
16 | corner_radius_bottom_right = 5
17 | corner_radius_bottom_left = 5
18 | corner_detail = 20
19 | shadow_color = Color( 0, 0, 0, 0.0392157 )
20 | shadow_size = 1
21 | shadow_offset = Vector2( 0, 1.5 )
22 | anti_aliasing = false
23 |
24 | [sub_resource type="DynamicFont" id=2]
25 | size = 15
26 | font_data = ExtResource( 2 )
27 |
28 | [node name="PrimaryButton" type="PanelContainer"]
29 | margin_right = 130.0
30 | margin_bottom = 36.0
31 | mouse_default_cursor_shape = 2
32 | size_flags_horizontal = 0
33 | size_flags_vertical = 0
34 | custom_styles/panel = SubResource( 1 )
35 | script = ExtResource( 1 )
36 | __meta__ = {
37 | "_edit_use_anchors_": true
38 | }
39 | disabled = false
40 | icon_enabled = false
41 | texture = null
42 | expand = false
43 | size = Vector2( 24, 24 )
44 | text_enabled = true
45 | text = "Primary Button"
46 | font_size = 15
47 |
48 | [node name="ButtonContainer" type="HBoxContainer" parent="."]
49 | margin_left = 13.0
50 | margin_top = 9.0
51 | margin_right = 117.0
52 | margin_bottom = 27.0
53 | mouse_filter = 2
54 | custom_constants/separation = 10
55 | alignment = 1
56 |
57 | [node name="Icon" type="TextureRect" parent="ButtonContainer"]
58 | visible = false
59 | margin_right = 24.0
60 | margin_bottom = 24.0
61 | rect_min_size = Vector2( 24, 24 )
62 | rect_pivot_offset = Vector2( 12, 12 )
63 | mouse_filter = 2
64 | size_flags_vertical = 4
65 |
66 | [node name="Text" type="Label" parent="ButtonContainer"]
67 | margin_right = 104.0
68 | margin_bottom = 18.0
69 | size_flags_horizontal = 0
70 | custom_fonts/font = SubResource( 2 )
71 | custom_colors/font_color = Color( 1, 1, 1, 1 )
72 | text = "Primary Button"
73 | align = 1
74 | valign = 1
75 |
76 | [node name="Tween" type="Tween" parent="."]
77 |
--------------------------------------------------------------------------------
/slack-clone/scn/scripts/utilities.gd:
--------------------------------------------------------------------------------
1 | extends Node
2 |
3 | func get_image_name(image_path : String) -> String:
4 | return (image_path.split("/") as Array).back() if image_path != "" else image_path
5 |
6 | func get_texture(file_path : String) -> ImageTexture:
7 | var img : Image = Image.new()
8 | img.load(file_path)
9 | var texture : ImageTexture = ImageTexture.new()
10 | texture.create_from_image(img, 4)
11 | return texture
12 |
13 | func task2image(task : StorageTask) -> ImageTexture:
14 | var new_image := Image.new()
15 | match typeof(task.data):
16 | TYPE_RAW_ARRAY:
17 | var data : PoolByteArray = task.data
18 | if data.size()>1:
19 | match data.subarray(0,1).hex_encode():
20 | "ffd8":
21 | new_image.load_jpg_from_buffer(data)
22 | "8950":
23 | new_image.load_png_from_buffer(data)
24 | else:
25 | return null
26 | TYPE_DICTIONARY:
27 | printerr("ERROR %s: could not find image requested" % task.data.error.code)
28 | return null
29 | var new_texture := ImageTexture.new()
30 | new_texture.create_from_image(new_image, 4)
31 | return new_texture
32 |
33 | func get_time() -> int:
34 | return OS.get_unix_time()
35 |
36 | func parse_timestamp(ts : String) -> Dictionary:
37 | var datetime_dict : Dictionary = {}
38 | var datetime_array : PoolStringArray = ts.split("T")
39 | var date : PoolStringArray = datetime_array[0].split("-")
40 | var time : PoolStringArray = datetime_array[1].split(".")[0].split(":")
41 | datetime_dict = {
42 | day = date[2], month = date[1], year = date[0],
43 | hour = time[0], minute = time[1], second = time[2]
44 | }
45 | return datetime_dict
46 |
47 | func get_human_time(t : int) -> String:
48 | var date : Dictionary = OS.get_datetime_from_unix_time(t)
49 | return ("{day}/{month}/{year}\n{hour}:{minute}").format({
50 | hour = date.hour,
51 | minute = ("0%s"%[date.minute] if str(date.minute).length() < 2 else (date.minute)),
52 | day = date.day,
53 | month = date.month,
54 | year = date.year
55 | })
56 |
57 | func parse_content(_content : String):
58 | var parsed_content : String = _content
59 | var regex : RegEx = RegEx.new()
60 | var result : Array
61 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/input_container/InputContainer.gd:
--------------------------------------------------------------------------------
1 | extends MarginContainer
2 |
3 | signal send_message(text, images)
4 |
5 | export (PackedScene) var image_holder_scene : PackedScene
6 |
7 | onready var input : LineEdit = $PanelContainer/VBoxContainer/LineEdit
8 | onready var imgs_container : HBoxContainer = $PanelContainer/VBoxContainer/Imgs
9 |
10 | onready var send_btn : PrimaryButton = $PanelContainer/VBoxContainer/PanelContainer/HBoxContainer/SendBtn
11 |
12 | func _ready():
13 | send_btn.disabled = true
14 |
15 | func load_images(images : PoolStringArray) -> void:
16 | if not imgs_container.visible: imgs_container.show()
17 | for image in images:
18 | var texture : ImageTexture = get_texture(image)
19 | var img_rect : TImageHolder = image_holder_scene.instance()
20 | imgs_container.add_child(img_rect)
21 | img_rect.set_texture(texture)
22 | img_rect.show()
23 | img_rect.connect("image_removed", self, "_on_remove_image")
24 | img_rect.path = image
25 | img_rect.id = "%s.%s" % [OS.get_unix_time(), image.get_extension()]
26 |
27 | func get_texture(file_path : String) -> ImageTexture:
28 | var img : Image = Image.new()
29 | img.load(file_path)
30 | var texture : ImageTexture = ImageTexture.new()
31 | texture.create_from_image(img, 4)
32 | return texture
33 |
34 | func set_placeholder_text(text : String) -> void:
35 | input.placeholder_text = text
36 |
37 |
38 | func _on_remove_image(img : TImageHolder):
39 | img.queue_free()
40 | if imgs_container.get_child_count() < 1 : imgs_container.hide()
41 |
42 | func stop_loading():
43 | send_btn.stop_loading()
44 |
45 | func send_message(text : String) -> void:
46 | emit_signal("send_message", text, imgs_container.get_children())
47 |
48 | func _on_SendBtn_pressed():
49 | send_message(input.get_text())
50 |
51 | func _on_text_entered(text : String) -> void:
52 | if text!="":
53 | send_btn.start_loading()
54 | send_message(text)
55 |
56 | func _on_LineEdit_text_changed(new_text : String):
57 | send_btn.disabled = (new_text == "")
58 |
59 | # ---------------------------------------------------------
60 |
61 | func clear():
62 | _clear_imgs()
63 | _clear_input()
64 | stop_loading()
65 |
66 | func _clear_input():
67 | input.clear()
68 |
69 | func _clear_imgs():
70 | for image in imgs_container.get_children():
71 | image.queue_free()
72 | imgs_container.hide()
73 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/loader.svg:
--------------------------------------------------------------------------------
1 |
2 |
86 |
--------------------------------------------------------------------------------
/todo-list/scn/Task/task.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=6 format=2]
2 |
3 | [ext_resource path="res://imgs/icons/Remove.png" type="Texture" id=1]
4 | [ext_resource path="res://scn/Task/task.gd" type="Script" id=2]
5 |
6 | [sub_resource type="StyleBoxFlat" id=1]
7 | content_margin_left = 10.0
8 | content_margin_right = 10.0
9 | bg_color = Color( 0.266667, 0.266667, 0.266667, 1 )
10 | corner_radius_top_left = 5
11 | corner_radius_bottom_left = 5
12 |
13 | [sub_resource type="StyleBoxFlat" id=2]
14 | content_margin_left = 0.0
15 | content_margin_right = 0.0
16 | content_margin_top = 0.0
17 | content_margin_bottom = 10.0
18 | bg_color = Color( 0.266667, 0.266667, 0.266667, 1 )
19 | anti_aliasing_size = 2
20 |
21 | [sub_resource type="StyleBoxFlat" id=3]
22 | content_margin_left = 15.0
23 | content_margin_right = 15.0
24 | content_margin_top = 0.0
25 | content_margin_bottom = 0.0
26 | bg_color = Color( 0.266667, 0.266667, 0.266667, 1 )
27 | corner_radius_top_right = 5
28 | corner_radius_bottom_right = 5
29 | anti_aliasing = false
30 |
31 | [node name="Task" type="HBoxContainer"]
32 | anchor_right = 1.0
33 | anchor_bottom = 1.0
34 | rect_min_size = Vector2( 0, 40 )
35 | custom_constants/separation = 0
36 | script = ExtResource( 2 )
37 | __meta__ = {
38 | "_edit_use_anchors_": false
39 | }
40 |
41 | [node name="Check" type="CheckBox" parent="."]
42 | margin_right = 36.0
43 | margin_bottom = 600.0
44 | size_flags_horizontal = 5
45 | size_flags_vertical = 5
46 | custom_styles/hover = SubResource( 1 )
47 | custom_styles/pressed = SubResource( 1 )
48 | custom_styles/focus = SubResource( 1 )
49 | custom_styles/normal = SubResource( 1 )
50 | custom_colors/font_color = Color( 1, 1, 1, 1 )
51 | custom_colors/font_color_pressed = Color( 0.454902, 0.454902, 0.454902, 1 )
52 | __meta__ = {
53 | "_edit_use_anchors_": false
54 | }
55 |
56 | [node name="Content" type="Label" parent="."]
57 | margin_left = 36.0
58 | margin_right = 980.0
59 | margin_bottom = 600.0
60 | size_flags_horizontal = 3
61 | size_flags_vertical = 7
62 | custom_styles/normal = SubResource( 2 )
63 | custom_colors/font_color = Color( 1, 1, 1, 1 )
64 | text = "task"
65 | valign = 1
66 | autowrap = true
67 | __meta__ = {
68 | "_edit_use_anchors_": false
69 | }
70 |
71 | [node name="RemoveBtn" type="Button" parent="."]
72 | margin_left = 980.0
73 | margin_right = 1024.0
74 | margin_bottom = 600.0
75 | rect_min_size = Vector2( 40, 0 )
76 | size_flags_horizontal = 5
77 | custom_styles/hover = SubResource( 3 )
78 | custom_styles/pressed = SubResource( 3 )
79 | custom_styles/focus = SubResource( 3 )
80 | custom_styles/disabled = SubResource( 3 )
81 | custom_styles/normal = SubResource( 3 )
82 | icon = ExtResource( 1 )
83 | align = 2
84 | [connection signal="toggled" from="Check" to="." method="_on_Check_toggled"]
85 | [connection signal="pressed" from="RemoveBtn" to="." method="_on_RemoveBtn_pressed"]
86 |
--------------------------------------------------------------------------------
/slack-clone/supabase-ui/res/icons/loading.svg:
--------------------------------------------------------------------------------
1 |
2 |
97 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/thumbnail_image_holder/T_ImageHolder.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=7 format=2]
2 |
3 | [ext_resource path="res://scn/scenes/thumbnail_image_holder/TImageHOlder.gd" type="Script" id=3]
4 | [ext_resource path="res://res/shaders/round_avatar.tres" type="Material" id=4]
5 |
6 | [sub_resource type="StyleBoxFlat" id=1]
7 | bg_color = Color( 0.329412, 0.329412, 0.329412, 1 )
8 | corner_radius_top_left = 10
9 | corner_radius_top_right = 10
10 | corner_radius_bottom_right = 10
11 | corner_radius_bottom_left = 10
12 | corner_detail = 20
13 |
14 | [sub_resource type="StyleBoxFlat" id=2]
15 | bg_color = Color( 0.219608, 0.219608, 0.219608, 1 )
16 | corner_radius_top_left = 10
17 | corner_radius_top_right = 10
18 | corner_radius_bottom_right = 10
19 | corner_radius_bottom_left = 10
20 | corner_detail = 20
21 |
22 | [sub_resource type="StyleBoxEmpty" id=3]
23 |
24 | [sub_resource type="StyleBoxFlat" id=4]
25 | bg_color = Color( 0.231373, 0.231373, 0.231373, 1 )
26 | corner_radius_top_left = 10
27 | corner_radius_top_right = 10
28 | corner_radius_bottom_right = 10
29 | corner_radius_bottom_left = 10
30 | corner_detail = 20
31 |
32 | [node name="PanelContainer" type="Control"]
33 | margin_right = 83.0
34 | margin_bottom = 84.0
35 | rect_min_size = Vector2( 100, 100 )
36 | script = ExtResource( 3 )
37 | __meta__ = {
38 | "_edit_use_anchors_": false
39 | }
40 |
41 | [node name="ColorRect" type="ColorRect" parent="."]
42 | anchor_left = 0.5
43 | anchor_top = 0.5
44 | anchor_right = 0.5
45 | anchor_bottom = 0.5
46 | margin_left = -42.0
47 | margin_top = -42.0
48 | margin_right = 42.0
49 | margin_bottom = 42.0
50 | rect_min_size = Vector2( 82, 82 )
51 | mouse_filter = 1
52 | color = Color( 0.635294, 0.635294, 0.635294, 1 )
53 | __meta__ = {
54 | "_edit_use_anchors_": false
55 | }
56 |
57 | [node name="TextureRect" type="TextureRect" parent="."]
58 | material = ExtResource( 4 )
59 | anchor_left = 0.5
60 | anchor_top = 0.5
61 | anchor_right = 0.5
62 | anchor_bottom = 0.5
63 | margin_left = -40.0
64 | margin_top = -40.0
65 | margin_right = 40.0
66 | margin_bottom = 40.0
67 | rect_min_size = Vector2( 80, 80 )
68 | expand = true
69 | stretch_mode = 7
70 | __meta__ = {
71 | "_edit_use_anchors_": false
72 | }
73 |
74 | [node name="Button" type="Button" parent="."]
75 | anchor_left = 1.0
76 | anchor_right = 1.0
77 | margin_left = -24.0
78 | margin_top = 3.0
79 | margin_right = -4.0
80 | margin_bottom = 23.0
81 | rect_min_size = Vector2( 20, 20 )
82 | mouse_filter = 1
83 | custom_styles/hover = SubResource( 1 )
84 | custom_styles/pressed = SubResource( 2 )
85 | custom_styles/focus = SubResource( 3 )
86 | custom_styles/normal = SubResource( 4 )
87 | text = "x"
88 | __meta__ = {
89 | "_edit_use_anchors_": false
90 | }
91 |
92 | [connection signal="mouse_entered" from="." to="." method="_on_PanelContainer_mouse_entered"]
93 | [connection signal="mouse_exited" from="." to="." method="_on_PanelContainer_mouse_exited"]
94 | [connection signal="pressed" from="Button" to="." method="_on_Button_pressed"]
95 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/dm_menu_container/DMMenuContainer.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=8 format=2]
2 |
3 | [ext_resource path="res://res/imgs/icons/arrow_drop_down_white_24dp.svg" type="Texture" id=1]
4 | [ext_resource path="res://supabase-ui/basic/button/text/TextButton.tscn" type="PackedScene" id=2]
5 | [ext_resource path="res://scn/scenes/dm_menu_container/DMMenuContainer.gd" type="Script" id=3]
6 | [ext_resource path="res://res/imgs/icons/arrow_right_white_24dp.svg" type="Texture" id=4]
7 | [ext_resource path="res://res/imgs/icons/add_white_24dp.svg" type="Texture" id=5]
8 |
9 | [sub_resource type="StyleBoxFlat" id=1]
10 | resource_local_to_scene = true
11 | resource_name = "TextButton"
12 | content_margin_left = 5.0
13 | content_margin_right = 5.0
14 | content_margin_top = 5.0
15 | content_margin_bottom = 5.0
16 | bg_color = Color( 1, 1, 1, 0 )
17 | border_color = Color( 1, 1, 1, 0 )
18 | corner_radius_top_left = 5
19 | corner_radius_top_right = 5
20 | corner_radius_bottom_right = 5
21 | corner_radius_bottom_left = 5
22 | corner_detail = 20
23 | shadow_color = Color( 0, 0, 0, 0.0392157 )
24 | shadow_offset = Vector2( 0, 1.5 )
25 | anti_aliasing = false
26 |
27 | [sub_resource type="StyleBoxFlat" id=2]
28 | resource_local_to_scene = true
29 | resource_name = "TextButton"
30 | content_margin_left = 5.0
31 | content_margin_right = 5.0
32 | content_margin_top = 5.0
33 | content_margin_bottom = 5.0
34 | bg_color = Color( 1, 1, 1, 0 )
35 | border_color = Color( 1, 1, 1, 0 )
36 | corner_radius_top_left = 5
37 | corner_radius_top_right = 5
38 | corner_radius_bottom_right = 5
39 | corner_radius_bottom_left = 5
40 | corner_detail = 20
41 | shadow_color = Color( 0, 0, 0, 0.0392157 )
42 | shadow_offset = Vector2( 0, 1.5 )
43 | anti_aliasing = false
44 |
45 | [node name="DMs" type="VBoxContainer"]
46 | anchor_right = 1.0
47 | anchor_bottom = 1.0
48 | script = ExtResource( 3 )
49 | __meta__ = {
50 | "_edit_use_anchors_": false
51 | }
52 | channel_btn_scn = ExtResource( 2 )
53 | collapsed_texture = ExtResource( 1 )
54 | uncollapsed_texture = ExtResource( 4 )
55 |
56 | [node name="Container" type="HBoxContainer" parent="."]
57 | margin_right = 1024.0
58 | margin_bottom = 34.0
59 | custom_constants/separation = 3
60 |
61 | [node name="TextButton" parent="Container" instance=ExtResource( 2 )]
62 | margin_right = 993.0
63 | margin_bottom = 34.0
64 | size_flags_horizontal = 3
65 | custom_styles/panel = SubResource( 1 )
66 | icon_enabled = true
67 | texture = ExtResource( 1 )
68 | expand = true
69 | text = "Direct Messages"
70 | font_size = 17
71 |
72 | [node name="AddDM" parent="Container" instance=ExtResource( 2 )]
73 | margin_left = 996.0
74 | margin_top = 3.0
75 | margin_right = 1024.0
76 | size_flags_horizontal = 0
77 | size_flags_vertical = 4
78 | custom_styles/panel = SubResource( 2 )
79 | icon_enabled = true
80 | texture = ExtResource( 5 )
81 | expand = true
82 | size = Vector2( 18, 18 )
83 | text_enabled = false
84 |
85 | [node name="ChannelButtons" type="VBoxContainer" parent="."]
86 | margin_top = 38.0
87 | margin_right = 1024.0
88 | margin_bottom = 38.0
89 | custom_constants/separation = 0
90 |
91 | [connection signal="pressed" from="Container/TextButton" to="." method="_on_TextButton_pressed"]
92 | [connection signal="pressed" from="Container/AddDM" to="." method="_on_AddDM_pressed"]
93 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/channels_menu_container/ChannelsMenuContainer.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=8 format=2]
2 |
3 | [ext_resource path="res://res/imgs/icons/arrow_drop_down_white_24dp.svg" type="Texture" id=1]
4 | [ext_resource path="res://supabase-ui/basic/button/text/TextButton.tscn" type="PackedScene" id=2]
5 | [ext_resource path="res://scn/scenes/channels_menu_container/ChannelsMenuContainer.gd" type="Script" id=3]
6 | [ext_resource path="res://res/imgs/icons/arrow_right_white_24dp.svg" type="Texture" id=4]
7 | [ext_resource path="res://res/imgs/icons/add_white_24dp.svg" type="Texture" id=5]
8 |
9 | [sub_resource type="StyleBoxFlat" id=1]
10 | resource_local_to_scene = true
11 | resource_name = "TextButton"
12 | content_margin_left = 5.0
13 | content_margin_right = 5.0
14 | content_margin_top = 5.0
15 | content_margin_bottom = 5.0
16 | bg_color = Color( 1, 1, 1, 0 )
17 | border_color = Color( 1, 1, 1, 0 )
18 | corner_radius_top_left = 5
19 | corner_radius_top_right = 5
20 | corner_radius_bottom_right = 5
21 | corner_radius_bottom_left = 5
22 | corner_detail = 20
23 | shadow_color = Color( 0, 0, 0, 0.0392157 )
24 | shadow_offset = Vector2( 0, 1.5 )
25 | anti_aliasing = false
26 |
27 | [sub_resource type="StyleBoxFlat" id=2]
28 | resource_local_to_scene = true
29 | resource_name = "TextButton"
30 | content_margin_left = 5.0
31 | content_margin_right = 5.0
32 | content_margin_top = 5.0
33 | content_margin_bottom = 5.0
34 | bg_color = Color( 1, 1, 1, 0 )
35 | border_color = Color( 1, 1, 1, 0 )
36 | corner_radius_top_left = 5
37 | corner_radius_top_right = 5
38 | corner_radius_bottom_right = 5
39 | corner_radius_bottom_left = 5
40 | corner_detail = 20
41 | shadow_color = Color( 0, 0, 0, 0.0392157 )
42 | shadow_offset = Vector2( 0, 1.5 )
43 | anti_aliasing = false
44 |
45 | [node name="Channels" type="VBoxContainer"]
46 | anchor_right = 1.0
47 | anchor_bottom = 1.0
48 | script = ExtResource( 3 )
49 | __meta__ = {
50 | "_edit_use_anchors_": false
51 | }
52 | channel_btn_scn = ExtResource( 2 )
53 | collapsed_texture = ExtResource( 1 )
54 | uncollapsed_texture = ExtResource( 4 )
55 |
56 | [node name="Container" type="HBoxContainer" parent="."]
57 | margin_right = 1024.0
58 | margin_bottom = 34.0
59 | custom_constants/separation = 3
60 |
61 | [node name="TextButton" parent="Container" instance=ExtResource( 2 )]
62 | margin_right = 993.0
63 | margin_bottom = 34.0
64 | size_flags_horizontal = 3
65 | custom_styles/panel = SubResource( 1 )
66 | icon_enabled = true
67 | texture = ExtResource( 1 )
68 | expand = true
69 | text = "Channels"
70 | font_size = 17
71 |
72 | [node name="AddChannel" parent="Container" instance=ExtResource( 2 )]
73 | margin_left = 996.0
74 | margin_top = 3.0
75 | margin_right = 1024.0
76 | margin_bottom = 31.0
77 | size_flags_horizontal = 0
78 | size_flags_vertical = 4
79 | custom_styles/panel = SubResource( 2 )
80 | icon_enabled = true
81 | texture = ExtResource( 5 )
82 | expand = true
83 | size = Vector2( 18, 18 )
84 | text_enabled = false
85 |
86 | [node name="ChannelButtons" type="VBoxContainer" parent="."]
87 | margin_top = 38.0
88 | margin_right = 1024.0
89 | margin_bottom = 38.0
90 | custom_constants/separation = 0
91 |
92 | [connection signal="pressed" from="Container/TextButton" to="." method="_on_TextButton_pressed"]
93 | [connection signal="pressed" from="Container/AddChannel" to="." method="_on_AddChannel_pressed"]
94 |
--------------------------------------------------------------------------------
/todo-list/scn/Main/main.gd:
--------------------------------------------------------------------------------
1 | extends Control
2 |
3 | onready var task_list : VBoxContainer = $MainContainer/TaskContainer/TaskList
4 | onready var task_text : TextEdit = $MainContainer/NewTask/TaskText
5 | onready var add_task_btn : Button = $MainContainer/NewTask/AddTaskBtn
6 | onready var log_screen : Control = $LogScreen
7 | onready var user_id : Label = $MainContainer/UserContainer/UserId
8 | onready var error_lbl : Label = $MainContainer/ErrorLbl
9 | onready var loading : LoadingScene = $Loading
10 |
11 | var task_scene : PackedScene = preload("res://scn/Task/task.tscn")
12 | var user : SupabaseUser
13 |
14 | # Called when the node enters the scene tree for the first time.
15 | func _ready():
16 | Supabase.auth.connect("signed_in", self, "_on_signed")
17 | Supabase.auth.connect("signed_up", self, "_on_signed")
18 | Supabase.database.connect("inserted", self, "_on_inserted")
19 | Supabase.database.connect("selected", self, "_on_selected")
20 | Supabase.database.connect("error", self, "_on_database_error")
21 | Supabase.auth.connect("error", self, "_on_auth_error")
22 | log_screen.show()
23 | error_lbl.hide()
24 |
25 | func clear_tasks():
26 | for task in task_list.get_children() : task.queue_free()
27 | user_id.set_text("user-id")
28 |
29 | func _on_signed(user : SupabaseUser):
30 | self.user = user
31 | user_id.set_text(self.user.id)
32 | var query_task : DatabaseTask = Supabase.database.query(SupabaseQuery.new().from("todos").select(["*"]).eq("user_id",user.id))
33 | yield(query_task, "completed")
34 | var tasks_found : Array = query_task.data
35 | for task_found in tasks_found:
36 | add_task(task_found.task, task_found.is_complete, task_found.id)
37 | log_screen.hide()
38 | get_tree().call_group("loading_scene", "set_loading")
39 |
40 | func add_task(text : String, is_complete : bool = false, id : int = -1):
41 | var new_task : Task = task_scene.instance()
42 | task_list.add_child(new_task)
43 | new_task.content.text = text
44 | new_task.id = id
45 | new_task.set_is_complete(is_complete)
46 | loading.set_loading()
47 |
48 | func _on_add_new_task():
49 | error_lbl.hide()
50 | if task_text.get_text().length() > 1:
51 | loading.set_loading(true)
52 | Supabase.database.query(SupabaseQuery.new().from("todos").insert([{"user_id":user.id, "task":task_text.get_text(), "is_complete":false}]))
53 | task_text.set_text("")
54 | else:
55 | print_error("Cannot create an empty task!")
56 |
57 | func _on_inserted(insert_result : Array):
58 | for task in insert_result:
59 | add_task(task.task, task.is_complete, task.id)
60 |
61 | func _on_selected(result : Array):
62 | pass
63 |
64 | func _on_database_error(database_error : SupabaseDatabaseError):
65 | printerr(database_error)
66 | print_error(str(database_error))
67 |
68 | func _on_auth_error(auth_error : SupabaseAuthError):
69 | print_error(str(auth_error))
70 |
71 | func _on_LogOut_pressed():
72 | Supabase.auth.sign_out()
73 | yield(Supabase.auth, "signed_out")
74 | clear_tasks()
75 | log_screen.show()
76 |
77 | func print_error(error : String):
78 | error_lbl.set_text(error)
79 | error_lbl.show()
80 | $ErrorTimer.start()
81 |
82 |
83 | func _on_ErrorTimer_timeout():
84 | error_lbl.hide()
85 |
--------------------------------------------------------------------------------
/slack-clone/scn/classes/dm/dm.gd:
--------------------------------------------------------------------------------
1 | extends VBoxContainer
2 | class_name DM
3 |
4 | signal new_message(message)
5 |
6 | export (PackedScene) var message_instance : PackedScene
7 |
8 | var _loaded : bool = false
9 | var id : int
10 | var dm_id : String
11 | var user1 : UsersManager.User
12 | var user2 : UsersManager.User
13 |
14 | var realtime_client : RealtimeClient
15 |
16 | var last_message_id : int
17 |
18 | func _ready():
19 | hide()
20 |
21 | func initialize(created_at : String, id : int, inserted_at : String, slug : String, description : String) -> void:
22 | self.created_by = created_at
23 | self.id = id
24 | self.inserted_at = inserted_at
25 | self.slug = slug
26 | self.description = description
27 | connect_client()
28 |
29 | func connect_client():
30 | realtime_client = Supabase.realtime.client()
31 | realtime_client.connect("connected", self, "_on_connected")
32 | realtime_client.connect_client()
33 |
34 | func _on_connected() -> void:
35 | realtime_client.channel("public", "dms", "id=eq.%s"%[dm_id]) \
36 | .on("insert", self, "_on_insert") \
37 | .on("delete", self, "_on_delete") \
38 | .subscribe()
39 |
40 | func load_messages() -> void:
41 | if _loaded: return
42 | _loaded = true
43 | var task : DatabaseTask = yield(RequestsManager.get_dms(id), "completed")
44 | for message in task.data:
45 | _on_insert(message, null)
46 |
47 | func _on_delete(old_record : Dictionary, channel : RealtimeChannel) -> void:
48 | for message in get_children():
49 | if message.id == int(old_record.id):
50 | message.queue_free()
51 | return
52 |
53 |
54 | func _on_insert(new_record : Dictionary, channel : RealtimeChannel) -> void:
55 | if Globals.sending_message:
56 | return
57 | var message : Message = message_instance.instance()
58 | add_child(message)
59 | var media_attached = new_record.media_attached
60 | message.initialize(new_record.message, Utilities.parse_timestamp(new_record.inserted_at))
61 | var user : UsersManager.User
62 | if UsersManager.has_user(new_record.user_id):
63 | user = UsersManager.get_user_by_id(new_record.user_id)
64 | else:
65 | user = UsersManager.add_user(new_record.user_id, RequestsManager.get_user(new_record.user_id), RequestsManager.get_user_avatar(new_record.user_id))
66 | message.set_user(user)
67 | message.set_id(int(new_record.id))
68 | if media_attached is String:
69 | media_attached = media_attached.lstrip("{").rstrip("}")
70 | if media_attached == "" or media_attached == null:
71 | media_attached = []
72 | else:
73 | media_attached = media_attached.split(",")
74 | if media_attached != null and not media_attached.empty():
75 | message.fetch_media(media_attached)
76 | emit_signal("new_message", message)
77 |
78 | func add_user_message(id : int, text : String, images : Array = []) -> void:
79 | var message : Message = message_instance.instance()
80 | add_child(message)
81 | var user : UsersManager.User = UsersManager.get_user_by_id(Supabase.auth.client.id)
82 | var media : Array = []
83 | for m in images:
84 | var imageHolder : TImageHolder = m as TImageHolder
85 | media.append(imageHolder.texture)
86 | message.initialize(text, OS.get_datetime(), media)
87 | message.set_user(Globals.user)
88 | message.set_id(id)
89 | emit_signal("new_message", message)
90 |
--------------------------------------------------------------------------------
/slack-clone/scn/scripts/users_manager.gd:
--------------------------------------------------------------------------------
1 | extends Node
2 |
3 |
4 | class User:
5 | var _default_avatar = preload("res://res/imgs/default-user-avatar.png")
6 |
7 | var id : String
8 | var username : String
9 | var email : String
10 | var status : String
11 | var role : String
12 | var avatar : Texture = null
13 | var document : Dictionary
14 | var picture_task : StorageTask
15 | var document_task : DatabaseTask
16 |
17 | signal update_picture(avatar)
18 | signal update_document(document)
19 | signal update_user(user)
20 |
21 | func _init(id : String, doc_task : DatabaseTask = null, pic_task : StorageTask = null):
22 | self.id = id
23 | if doc_task != null:
24 | document_task = doc_task
25 | document_task.connect("completed", self, "_on_get_document")
26 | if pic_task != null:
27 | picture_task = pic_task
28 | picture_task.connect("completed", self, "_on_picture_received")
29 |
30 | func _on_get_document(doc : DatabaseTask):
31 | if not doc.error:
32 | update_document(doc.data[0])
33 |
34 | func update_document(doc : Dictionary) -> void:
35 | emit_signal("update_document", doc)
36 | document = doc
37 | username = document.username
38 | email = document.username
39 | status = document.status
40 | if document.has("user_roles"):
41 | if not document.user_roles.empty():
42 | role = document.user_roles[0].role
43 | else:
44 | role = "user"
45 | emit_signal("update_user", self)
46 |
47 | func get_avatar(id : String) -> void:
48 | picture_task = RequestsManager.get_user_avatar(id)
49 | picture_task.connect("completed", self, "_on_picture_received")
50 |
51 | func _on_picture_received(task : StorageTask):
52 | if task.data != null:
53 | avatar = Utilities.task2image(task)
54 | else:
55 | avatar = _default_avatar
56 | emit_signal("update_picture", avatar)
57 |
58 |
59 | var users : Array = []
60 | var rt_client : RealtimeClient
61 |
62 | func _ready():
63 | pass
64 |
65 | func connect_rt_users() -> void:
66 | rt_client = Supabase.realtime.client()
67 | rt_client.connect("connected", self, "_on_client_connected")
68 | rt_client.connect_client()
69 |
70 | func _on_client_connected():
71 | rt_client.channel("public","users").on("update", self, "_on_user_updated").subscribe()
72 |
73 | func _on_user_updated(old_record : Dictionary, new_record : Dictionary, channel : RealtimeChannel):
74 | if has_user(new_record.id):
75 | var user : User = get_user_by_id(new_record.id)
76 | user.update_document(new_record)
77 | user.get_avatar(new_record.id)
78 |
79 | func add_user(id : String, database_task : DatabaseTask = null, picture_task : StorageTask = null) -> User:
80 | var user : User = User.new(id, database_task, picture_task)
81 | users.append(user)
82 | return user
83 |
84 | func has_user(id : String) -> bool:
85 | for user in users:
86 | if user.id == id:
87 | return true
88 | return false
89 |
90 | func get_user_by_id(id : String) -> User:
91 | for user in users:
92 | if user.id == id:
93 | return user
94 | return add_user(id, RequestsManager.get_user(id), RequestsManager.get_user_avatar(id))
95 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/popup_user/PopupUser.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=8 format=2]
2 |
3 | [ext_resource path="res://scn/scenes/popup_user/PopupUser.gd" type="Script" id=1]
4 | [ext_resource path="res://supabase-ui/basic/button/text/TextButton.tscn" type="PackedScene" id=2]
5 | [ext_resource path="res://res/imgs/icons/close_white_36dp.svg" type="Texture" id=3]
6 | [ext_resource path="res://res/imgs/icons/manage_accounts_white_36dp.svg" type="Texture" id=4]
7 |
8 | [sub_resource type="StyleBoxFlat" id=1]
9 | resource_local_to_scene = true
10 | content_margin_left = 8.0
11 | content_margin_right = 8.0
12 | content_margin_top = 6.0
13 | content_margin_bottom = 6.0
14 | bg_color = Color( 1, 1, 1, 1 )
15 | border_width_left = 1
16 | border_width_top = 1
17 | border_width_right = 1
18 | border_width_bottom = 1
19 | corner_radius_top_left = 5
20 | corner_radius_top_right = 5
21 | corner_radius_bottom_right = 5
22 | corner_radius_bottom_left = 5
23 | corner_detail = 20
24 |
25 | [sub_resource type="StyleBoxFlat" id=2]
26 | resource_local_to_scene = true
27 | content_margin_left = 5.0
28 | content_margin_right = 5.0
29 | content_margin_top = 5.0
30 | content_margin_bottom = 5.0
31 | bg_color = Color( 1, 1, 1, 0 )
32 | border_color = Color( 1, 1, 1, 0 )
33 | corner_radius_top_left = 5
34 | corner_radius_top_right = 5
35 | corner_radius_bottom_right = 5
36 | corner_radius_bottom_left = 5
37 | corner_detail = 20
38 | shadow_color = Color( 0, 0, 0, 0.0392157 )
39 | shadow_offset = Vector2( 0, 1.5 )
40 | anti_aliasing = false
41 |
42 | [sub_resource type="StyleBoxFlat" id=3]
43 | resource_local_to_scene = true
44 | content_margin_left = 5.0
45 | content_margin_right = 5.0
46 | content_margin_top = 5.0
47 | content_margin_bottom = 5.0
48 | bg_color = Color( 1, 1, 1, 0 )
49 | border_color = Color( 1, 1, 1, 0 )
50 | corner_radius_top_left = 5
51 | corner_radius_top_right = 5
52 | corner_radius_bottom_right = 5
53 | corner_radius_bottom_left = 5
54 | corner_detail = 20
55 | shadow_color = Color( 0, 0, 0, 0.0392157 )
56 | shadow_offset = Vector2( 0, 1.5 )
57 | anti_aliasing = false
58 |
59 | [node name="PopupUser" type="PopupPanel"]
60 | margin_right = 146.0
61 | margin_bottom = 74.0
62 | size_flags_horizontal = 0
63 | size_flags_vertical = 0
64 | custom_styles/panel = SubResource( 1 )
65 | script = ExtResource( 1 )
66 |
67 | [node name="Buttons" type="VBoxContainer" parent="."]
68 | anchor_right = 1.0
69 | anchor_bottom = 1.0
70 | margin_left = 8.0
71 | margin_top = 6.0
72 | margin_right = -8.0
73 | margin_bottom = -6.0
74 | custom_constants/separation = 0
75 | __meta__ = {
76 | "_edit_use_anchors_": false
77 | }
78 |
79 | [node name="UpdateBtn" parent="Buttons" instance=ExtResource( 2 )]
80 | margin_right = 130.0
81 | margin_bottom = 31.0
82 | custom_styles/panel = SubResource( 2 )
83 | icon_enabled = true
84 | texture = ExtResource( 4 )
85 | expand = true
86 | size = Vector2( 20, 20 )
87 | text = "Update User"
88 |
89 | [node name="LogoutBtn" parent="Buttons" instance=ExtResource( 2 )]
90 | margin_top = 31.0
91 | margin_right = 130.0
92 | margin_bottom = 62.0
93 | custom_styles/panel = SubResource( 3 )
94 | icon_enabled = true
95 | texture = ExtResource( 3 )
96 | expand = true
97 | size = Vector2( 16, 16 )
98 | text = "Logout"
99 |
100 | [connection signal="pressed" from="Buttons/UpdateBtn" to="." method="_on_UpdateBtn_pressed"]
101 | [connection signal="pressed" from="Buttons/LogoutBtn" to="." method="_on_LogoutBtn_pressed"]
102 |
--------------------------------------------------------------------------------
/slack-clone/scn/classes/message/message.gd:
--------------------------------------------------------------------------------
1 | extends PanelContainer
2 | class_name Message
3 |
4 | var id : int setget set_id
5 | var user_name : String setget set_user_name
6 | var message : String setget set_message
7 | var avatar : ImageTexture setget set_avatar
8 | var media : Array setget set_media
9 | var timestamp : Dictionary setget set_timestamp
10 |
11 | onready var avatar_container : Avatar = $Box/Avatar
12 | onready var popup_message_menu : PopupMessageMenu = $Box/Options/PopupMessageMenu
13 |
14 |
15 | export (PackedScene) var _media_preview_scn : PackedScene
16 |
17 |
18 | func _ready():
19 | hide()
20 | set_mode(Globals.mode)
21 | popup_message_menu.set_message(self)
22 |
23 | func set_mode(_mode : int) -> void:
24 | $Box/Container/Info/Name.set_mode(_mode)
25 | $Box/Container/Content.set_mode(_mode)
26 | $Box/Options.set_mode(_mode)
27 | popup_message_menu._set_mode(_mode)
28 |
29 | func initialize(message : String, timestamp : Dictionary, media : Array = []) -> void:
30 | set_message(message)
31 | set_timestamp(timestamp)
32 | set_media(media)
33 | show()
34 |
35 | func set_id(_id : int) -> void:
36 | id = _id
37 |
38 |
39 |
40 | func set_user(user : UsersManager.User) -> void:
41 | user.connect("update_picture", self, "set_avatar")
42 | user.connect("update_user", self , "_on_update_user")
43 | set_user_name(user.username)
44 | avatar_container.set_status(user.status)
45 | popup_message_menu.set_permissions(Globals.user.role)
46 | if user.avatar!=null:
47 | set_avatar(user.avatar)
48 |
49 |
50 | func _on_update_user(user) -> void:
51 | popup_message_menu.set_permissions(Globals.user.role)
52 | avatar_container.set_status(user.status)
53 | set_user_name(user.username)
54 |
55 |
56 | func set_user_name(_name : String) -> void:
57 | user_name = _name
58 | $Box/Container/Info/Name.set_text(user_name)
59 |
60 |
61 | func set_message(_message : String) -> void:
62 | message = _message
63 | $Box/Container/Content.set_text(message)
64 |
65 | func set_timestamp(_ts : Dictionary) -> void:
66 | timestamp = _ts
67 | $Box/Container/Info/Timestamp.set_text("{hour}:{minute}".format(timestamp))
68 |
69 | func set_avatar(_avatar : ImageTexture) -> void:
70 | avatar_container.set_avatar(_avatar)
71 |
72 | func set_media(_media : Array) -> void:
73 | if _media.empty(): return
74 | for texture in _media:
75 | add_media(texture, texture.get_meta("id"))
76 |
77 | func add_media(texture : ImageTexture = null, _name : String = "") -> MediaPreview:
78 | var preview : MediaPreview = _media_preview_scn.instance()
79 | preview.connect("show_media", Globals.main, "_on_show_media")
80 | preview.set_texture(texture)
81 | $Box/Container/Media.add_child(preview)
82 | media.append(_name)
83 | return preview
84 |
85 | func fetch_media(_media : Array) -> void:
86 | if _media[0] is Dictionary: pass
87 | for m in _media:
88 | var media_preview : MediaPreview = add_media(null, m)
89 | var media_task : StorageTask = RequestsManager.get_message_media(m)
90 | media_task.connect("completed" , self, "_on_fetchmedia_completed", [media_preview])
91 |
92 | func _on_fetchmedia_completed(task : StorageTask, media_preview : MediaPreview) -> void:
93 | media_preview.texture = (Utilities.task2image(task))
94 |
95 |
96 | func _on_Options_pressed():
97 | popup_message_menu.popup_on_pos($Box/Options.rect_global_position)
98 |
--------------------------------------------------------------------------------
/todo-list/imgs/throbber.svg:
--------------------------------------------------------------------------------
1 |
2 |
83 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/slack_menu/SlackMenu.gd:
--------------------------------------------------------------------------------
1 | extends PanelContainer
2 |
3 | export (PackedScene) var channel_scene : PackedScene
4 |
5 | var colors : Dictionary = {
6 | bg = [Color("f8f8fa"), Color("272727")]
7 | }
8 |
9 | signal channel_selected(channel_meta)
10 | signal dm_channel_selected(channel_meta)
11 |
12 | signal add_channel(channel)
13 |
14 | var realtime_client : RealtimeClient
15 |
16 | var channels : Array = []
17 |
18 |
19 | func _ready():
20 | add_to_group("slack_components")
21 | connect_client()
22 |
23 | func connect_client():
24 | realtime_client = Supabase.realtime.client()
25 | realtime_client.connect("connected", self, "_on_connected")
26 | realtime_client.connect_client()
27 |
28 | func _on_connected() -> void:
29 | realtime_client.channel("public", "channels") \
30 | .on("insert", self, "_on_insert") \
31 | .on("delete", self, "_on_delete") \
32 | .subscribe()
33 |
34 | func _on_delete(old_channel : Dictionary, channel : RealtimeChannel) -> void:
35 | pass
36 |
37 | func _on_insert(new_channel : Dictionary, channel : RealtimeChannel) -> void:
38 | if new_channel.with_user == null : add_channel(new_channel)
39 | else: add_dm_channel(new_channel)
40 |
41 | func load_channels() -> void:
42 | var task : DatabaseTask = yield(RequestsManager.get_channels(), "completed")
43 | if task.error:
44 | printerr(task.error)
45 | return
46 | for channel in task.data:
47 | add_channel(channel)
48 | emit_signal("channel_selected", channels[0])
49 |
50 | func load_dm_channels() -> void:
51 | var task : DatabaseTask = yield(RequestsManager.get_user_dm_channels(), "completed")
52 | if task.error :
53 | printerr(task.error)
54 | return
55 | for channel in task.data:
56 | add_dm_channel(channel)
57 |
58 | func add_channel(channel : Dictionary) -> void:
59 | var channel_scn : Channel = channel_scene.instance()
60 | channel_scn.initialize(channel.created_by, int(channel.id), channel.inserted_at, channel.slug, channel.description)
61 | channels.append(channel_scn)
62 | $VBoxContainer/Channels.add_channel(channel_scn)
63 | emit_signal("add_channel", channel_scn)
64 |
65 |
66 | func add_dm_channel(channel : Dictionary) -> void:
67 | var channel_scn : Channel = channel_scene.instance()
68 | var created_by : String = channel.created_by.id if channel.created_by is Dictionary else channel.created_by
69 | var with_user : UsersManager.User = UsersManager.get_user_by_id(channel.with_user.id if channel.with_user is Dictionary else channel.with_user)
70 | var recipient : String = Globals.user.username if Globals.user.id != created_by else with_user.username
71 | channel_scn.initialize(created_by, int(channel.id), channel.inserted_at, recipient, "", true)
72 | channel_scn.set_with_user(with_user)
73 | channels.append(channel_scn)
74 | $VBoxContainer/DMs.add_channel(channel_scn)
75 | emit_signal("add_channel", channel_scn)
76 |
77 |
78 | func has_dm_channel(with_user_id : String) -> Channel:
79 | for channel in channels:
80 | if channel.with_user != null and channel.with_user.id == with_user_id:
81 | return channel
82 | return null
83 |
84 | # ---------------------------------------
85 | func change_visibility() -> void:
86 | visible = not visible
87 | get_parent().rect_size.x = get_parent().get_parent().rect_size.x
88 |
89 | func _on_channel_selected(channel : Channel):
90 | emit_signal("channel_selected", channel)
91 |
92 |
93 | func set_mode(mode : int) -> void:
94 | get("custom_styles/panel").set("bg_color", colors.bg[mode])
95 |
96 |
97 | func _on_ModeButton_pressed():
98 | Globals.set_mode(!Globals.mode)
99 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/add_dm_panel/AddDMPanel.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=10 format=2]
2 |
3 | [ext_resource path="res://scn/scenes/add_dm_panel/AddDMPanel.gd" type="Script" id=1]
4 | [ext_resource path="res://supabase-ui/basic/containers/panel/Panel.tscn" type="PackedScene" id=2]
5 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Regular.ttf" type="DynamicFontData" id=3]
6 | [ext_resource path="res://supabase-ui/basic/button/outline/OutlineButton.tscn" type="PackedScene" id=4]
7 | [ext_resource path="res://supabase-ui/basic/typography/base_label/BaseLabel.tscn" type="PackedScene" id=5]
8 | [ext_resource path="res://scn/classes/user_button/UserButton.tscn" type="PackedScene" id=6]
9 |
10 | [sub_resource type="StyleBoxFlat" id=1]
11 | resource_local_to_scene = true
12 | content_margin_left = 20.0
13 | content_margin_right = 20.0
14 | content_margin_top = 20.0
15 | content_margin_bottom = 20.0
16 | bg_color = Color( 1, 1, 1, 1 )
17 | border_width_left = 1
18 | border_width_top = 1
19 | border_width_right = 1
20 | border_width_bottom = 1
21 | corner_radius_top_left = 5
22 | corner_radius_top_right = 5
23 | corner_radius_bottom_right = 5
24 | corner_radius_bottom_left = 5
25 | corner_detail = 20
26 |
27 | [sub_resource type="DynamicFont" id=2]
28 | resource_local_to_scene = true
29 | size = 22
30 | font_data = ExtResource( 3 )
31 |
32 | [sub_resource type="StyleBoxFlat" id=3]
33 | resource_local_to_scene = true
34 | resource_name = "OutlineButton"
35 | content_margin_left = 13.0
36 | content_margin_right = 13.0
37 | content_margin_top = 9.0
38 | content_margin_bottom = 9.0
39 | bg_color = Color( 1, 1, 1, 0 )
40 | border_width_left = 1
41 | border_width_top = 1
42 | border_width_right = 1
43 | border_width_bottom = 1
44 | border_color = Color( 0.647059, 0.647059, 0.647059, 1 )
45 | corner_radius_top_left = 5
46 | corner_radius_top_right = 5
47 | corner_radius_bottom_right = 5
48 | corner_radius_bottom_left = 5
49 | corner_detail = 20
50 | shadow_color = Color( 0, 0, 0, 0.0392157 )
51 | shadow_offset = Vector2( 0, 1.5 )
52 | anti_aliasing = false
53 |
54 | [node name="Panel" instance=ExtResource( 2 )]
55 | custom_styles/panel = SubResource( 1 )
56 | script = ExtResource( 1 )
57 | user_button_scn = ExtResource( 6 )
58 |
59 | [node name="VBoxContainer" type="VBoxContainer" parent="." index="0"]
60 | margin_left = 20.0
61 | margin_top = 20.0
62 | margin_right = 1004.0
63 | margin_bottom = 580.0
64 |
65 | [node name="Label" parent="VBoxContainer" index="0" instance=ExtResource( 5 )]
66 | margin_right = 984.0
67 | margin_bottom = 27.0
68 | custom_fonts/font = SubResource( 2 )
69 | custom_colors/font_color = Color( 0.121569, 0.121569, 0.121569, 1 )
70 | text = "Send a Direct Message to..."
71 | align = 1
72 | valign = 1
73 | level = 2
74 | font_size = 22
75 |
76 | [node name="UserListContainer" type="ScrollContainer" parent="VBoxContainer" index="1"]
77 | margin_top = 31.0
78 | margin_right = 984.0
79 | margin_bottom = 520.0
80 | size_flags_horizontal = 3
81 | size_flags_vertical = 3
82 |
83 | [node name="UserList" type="VBoxContainer" parent="VBoxContainer/UserListContainer" index="0"]
84 | margin_right = 984.0
85 | margin_bottom = 489.0
86 | size_flags_horizontal = 3
87 | size_flags_vertical = 3
88 |
89 | [node name="OutlineButton" parent="VBoxContainer" index="2" instance=ExtResource( 4 )]
90 | margin_left = 455.0
91 | margin_top = 524.0
92 | margin_right = 528.0
93 | margin_bottom = 560.0
94 | size_flags_horizontal = 4
95 | custom_styles/panel = SubResource( 3 )
96 | disabled = false
97 | text_enabled = true
98 | text = "Cancel"
99 |
100 | [connection signal="visibility_changed" from="." to="." method="_on_Panel_visibility_changed"]
101 | [connection signal="pressed" from="VBoxContainer/OutlineButton" to="." method="_on_OutlineButton_pressed"]
102 |
--------------------------------------------------------------------------------
/slack-clone/scn/main/Control.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=9 format=2]
2 |
3 | [ext_resource path="res://supabase-ui/components/auth/Auth.tscn" type="PackedScene" id=1]
4 | [ext_resource path="res://scn/scenes/slack/Slack.tscn" type="PackedScene" id=2]
5 | [ext_resource path="res://scn/scenes/add_chanel_panel/AddChanelPanel.tscn" type="PackedScene" id=3]
6 | [ext_resource path="res://scn/main/main.gd" type="Script" id=4]
7 | [ext_resource path="res://scn/scenes/update_user_panel/UpdateUserPanel.tscn" type="PackedScene" id=5]
8 | [ext_resource path="res://scn/classes/media_holder/MediaHolder.tscn" type="PackedScene" id=6]
9 | [ext_resource path="res://scn/scenes/add_dm_panel/AddDMPanel.tscn" type="PackedScene" id=7]
10 |
11 | [sub_resource type="StyleBoxFlat" id=1]
12 | resource_local_to_scene = true
13 | content_margin_left = 20.0
14 | content_margin_right = 20.0
15 | content_margin_top = 20.0
16 | content_margin_bottom = 20.0
17 | bg_color = Color( 1, 1, 1, 1 )
18 | border_width_left = 1
19 | border_width_top = 1
20 | border_width_right = 1
21 | border_width_bottom = 1
22 | corner_radius_top_left = 5
23 | corner_radius_top_right = 5
24 | corner_radius_bottom_right = 5
25 | corner_radius_bottom_left = 5
26 | corner_detail = 20
27 |
28 | [node name="Main" type="Control"]
29 | anchor_right = 1.0
30 | anchor_bottom = 1.0
31 | mouse_filter = 1
32 | script = ExtResource( 4 )
33 | __meta__ = {
34 | "_edit_use_anchors_": false
35 | }
36 |
37 | [node name="Slack" parent="." instance=ExtResource( 2 )]
38 | anchor_right = 1.0
39 | margin_right = 0.0
40 | focus_mode = 1
41 |
42 | [node name="MediaHolder" parent="." instance=ExtResource( 6 )]
43 | visible = false
44 |
45 | [node name="HOVER" type="ColorRect" parent="."]
46 | visible = false
47 | anchor_right = 1.0
48 | anchor_bottom = 1.0
49 | size_flags_horizontal = 3
50 | size_flags_vertical = 3
51 | color = Color( 0, 0, 0, 0.666667 )
52 | __meta__ = {
53 | "_edit_use_anchors_": false
54 | }
55 |
56 | [node name="UpdateUserPanel" parent="." instance=ExtResource( 5 )]
57 | visible = false
58 | anchor_left = 0.0
59 | anchor_right = 1.0
60 | margin_left = 368.0
61 | margin_top = -166.0
62 | margin_right = -368.0
63 | margin_bottom = 167.0
64 | grow_horizontal = 2
65 | grow_vertical = 2
66 |
67 | [node name="AddDMPanel" parent="." instance=ExtResource( 7 )]
68 | visible = false
69 | anchor_top = 0.5
70 | anchor_bottom = 0.5
71 | margin_left = 184.0
72 | margin_top = -151.0
73 | margin_right = -184.0
74 | margin_bottom = 152.0
75 | grow_horizontal = 2
76 | grow_vertical = 2
77 | custom_styles/panel = SubResource( 1 )
78 |
79 | [node name="AddChanelPanel" parent="." instance=ExtResource( 3 )]
80 | visible = false
81 | anchor_left = 0.0
82 | anchor_right = 1.0
83 | margin_left = 250.0
84 | margin_right = -250.0
85 | grow_horizontal = 2
86 | grow_vertical = 2
87 |
88 | [node name="Auth" parent="." instance=ExtResource( 1 )]
89 | visible = false
90 | anchor_top = 0.5
91 | anchor_right = 1.0
92 | anchor_bottom = 0.5
93 | margin_left = 168.0
94 | margin_top = -233.0
95 | margin_right = -168.0
96 | margin_bottom = 233.0
97 | grow_horizontal = 2
98 | grow_vertical = 2
99 | app_name = "Slack Clone"
100 |
101 | [connection signal="hide_update_user" from="UpdateUserPanel" to="." method="_on_UpdateUserPanel_hide_update_user"]
102 | [connection signal="hide_add_dm_panel" from="AddDMPanel" to="." method="_on_AddDMPanel_hide_add_dm_panel"]
103 | [connection signal="send_dm_to_user" from="AddDMPanel" to="." method="_on_AddDMPanel_send_dm_to_user"]
104 | [connection signal="hide_add_channel" from="AddChanelPanel" to="." method="_on_AddChanelPanel_hide_add_channel"]
105 | [connection signal="error" from="Auth" to="." method="_on_Auth_error"]
106 | [connection signal="signed_in" from="Auth" to="." method="_on_Auth_signed_in"]
107 | [connection signal="signed_up" from="Auth" to="." method="_on_Auth_signed_up"]
108 |
--------------------------------------------------------------------------------
/slack-clone/scn/classes/channel/channel.gd:
--------------------------------------------------------------------------------
1 | extends VBoxContainer
2 | class_name Channel
3 |
4 | signal new_message(message)
5 | signal update_channel(channel)
6 |
7 | export (PackedScene) var message_instance : PackedScene
8 |
9 | var _loaded : bool = false
10 | var is_dm : bool = false
11 | var created_by : String
12 | var id : int
13 | var inserted_at : String
14 | var slug : String
15 | var description : String
16 | var with_user : UsersManager.User
17 |
18 | var realtime_client : RealtimeClient
19 |
20 | var last_message_id : int
21 |
22 | func _ready():
23 | hide()
24 |
25 | func initialize(created_by : String, id : int, inserted_at : String, slug : String, description : String, is_dm : bool = false) -> void:
26 | self.is_dm = is_dm
27 | self.created_by = created_by
28 | self.id = id
29 | self.inserted_at = inserted_at
30 | self.slug = slug
31 | self.description = description
32 | connect_client()
33 |
34 | func set_with_user(with_user : UsersManager.User) -> void:
35 | self.with_user = with_user
36 | self.with_user.connect("update_user", self, "_on_update_user")
37 |
38 | func _on_update_user(user : UsersManager.User) -> void:
39 | slug = with_user.username
40 | emit_signal("update_channel", self)
41 |
42 | func connect_client():
43 | realtime_client = Supabase.realtime.client()
44 | realtime_client.connect("connected", self, "_on_connected")
45 | realtime_client.connect_client()
46 |
47 | func _on_connected() -> void:
48 | realtime_client.channel("public", "messages", "channel_id=eq.%s"%[id]) \
49 | .on("insert", self, "_on_insert") \
50 | .on("delete", self, "_on_delete") \
51 | .subscribe()
52 |
53 | func load_messages() -> void:
54 | if _loaded: return
55 | _loaded = true
56 | var task : DatabaseTask = yield(RequestsManager.get_messages(id), "completed")
57 | for message in task.data:
58 | _on_insert(message, null)
59 |
60 | func _on_delete(old_record : Dictionary, channel : RealtimeChannel) -> void:
61 | for message in get_children():
62 | if message.id == int(old_record.id):
63 | message.queue_free()
64 | return
65 |
66 | func get_message(id : int) -> Message:
67 | for message in get_children():
68 | if message.id == id:
69 | return message
70 | return null
71 |
72 | func _on_insert(new_record : Dictionary, channel : RealtimeChannel) -> void:
73 | if Globals.sending_message:
74 | return
75 | if get_message(int(new_record.id)):
76 | return
77 | var message : Message = message_instance.instance()
78 | add_child(message)
79 | var media_attached = new_record.media_attached
80 | message.initialize(new_record.message, Utilities.parse_timestamp(new_record.inserted_at))
81 | var user : UsersManager.User = UsersManager.get_user_by_id(new_record.user_id)
82 | message.set_user(user)
83 | message.set_id(int(new_record.id))
84 | if media_attached is String:
85 | media_attached = media_attached.lstrip("{").rstrip("}")
86 | if media_attached == "" or media_attached == null:
87 | media_attached = []
88 | else:
89 | media_attached = media_attached.split(",")
90 | if media_attached != null and not media_attached.empty():
91 | message.fetch_media(media_attached)
92 | emit_signal("new_message", message)
93 |
94 | func add_user_message(id : int, text : String, images : Array = []) -> void:
95 | var message : Message = message_instance.instance()
96 | add_child(message)
97 | var user : UsersManager.User = UsersManager.get_user_by_id(Supabase.auth.client.id)
98 | var media : Array = []
99 | for m in images:
100 | var imageHolder : TImageHolder = m as TImageHolder
101 | media.append(imageHolder.texture)
102 | message.initialize(text, OS.get_datetime(), media)
103 | message.set_user(Globals.user)
104 | message.set_id(id)
105 | emit_signal("new_message", message)
106 |
--------------------------------------------------------------------------------
/todo-list/project.godot:
--------------------------------------------------------------------------------
1 | ; Engine configuration file.
2 | ; It's best edited using the editor UI and not directly,
3 | ; since the parameters that go here are not all obvious.
4 | ;
5 | ; Format:
6 | ; [section] ; section goes between []
7 | ; param=value ; assign values to parameters
8 |
9 | config_version=4
10 |
11 | _global_script_classes=[ {
12 | "base": "Reference",
13 | "class": "AuthTask",
14 | "language": "GDScript",
15 | "path": "res://addons/supabase/Auth/auth_task.gd"
16 | }, {
17 | "base": "Reference",
18 | "class": "DatabaseTask",
19 | "language": "GDScript",
20 | "path": "res://addons/supabase/Database/database_task.gd"
21 | }, {
22 | "base": "Control",
23 | "class": "LoadingScene",
24 | "language": "GDScript",
25 | "path": "res://scn/Loading/loading.gd"
26 | }, {
27 | "base": "Reference",
28 | "class": "RealtimeChannel",
29 | "language": "GDScript",
30 | "path": "res://addons/supabase/Realtime/realtime_channel.gd"
31 | }, {
32 | "base": "Node",
33 | "class": "RealtimeClient",
34 | "language": "GDScript",
35 | "path": "res://addons/supabase/Realtime/realtime_client.gd"
36 | }, {
37 | "base": "Node",
38 | "class": "StorageBucket",
39 | "language": "GDScript",
40 | "path": "res://addons/supabase/Storage/storage_bucket.gd"
41 | }, {
42 | "base": "Reference",
43 | "class": "StorageTask",
44 | "language": "GDScript",
45 | "path": "res://addons/supabase/Storage/storage_task.gd"
46 | }, {
47 | "base": "Node",
48 | "class": "SupabaseAuth",
49 | "language": "GDScript",
50 | "path": "res://addons/supabase/Auth/auth.gd"
51 | }, {
52 | "base": "Reference",
53 | "class": "SupabaseAuthError",
54 | "language": "GDScript",
55 | "path": "res://addons/supabase/Auth/auth_error.gd"
56 | }, {
57 | "base": "Node",
58 | "class": "SupabaseDatabase",
59 | "language": "GDScript",
60 | "path": "res://addons/supabase/Database/database.gd"
61 | }, {
62 | "base": "Reference",
63 | "class": "SupabaseDatabaseError",
64 | "language": "GDScript",
65 | "path": "res://addons/supabase/Database/database_error.gd"
66 | }, {
67 | "base": "Reference",
68 | "class": "SupabaseQuery",
69 | "language": "GDScript",
70 | "path": "res://addons/supabase/Database/query.gd"
71 | }, {
72 | "base": "Node",
73 | "class": "SupabaseRealtime",
74 | "language": "GDScript",
75 | "path": "res://addons/supabase/Realtime/realtime.gd"
76 | }, {
77 | "base": "Node",
78 | "class": "SupabaseStorage",
79 | "language": "GDScript",
80 | "path": "res://addons/supabase/Storage/storage.gd"
81 | }, {
82 | "base": "Reference",
83 | "class": "SupabaseStorageError",
84 | "language": "GDScript",
85 | "path": "res://addons/supabase/Storage/storage_error.gd"
86 | }, {
87 | "base": "Reference",
88 | "class": "SupabaseUser",
89 | "language": "GDScript",
90 | "path": "res://addons/supabase/User/user.gd"
91 | }, {
92 | "base": "HBoxContainer",
93 | "class": "Task",
94 | "language": "GDScript",
95 | "path": "res://scn/Task/task.gd"
96 | } ]
97 | _global_script_class_icons={
98 | "AuthTask": "",
99 | "DatabaseTask": "",
100 | "LoadingScene": "",
101 | "RealtimeChannel": "",
102 | "RealtimeClient": "",
103 | "StorageBucket": "",
104 | "StorageTask": "",
105 | "SupabaseAuth": "",
106 | "SupabaseAuthError": "",
107 | "SupabaseDatabase": "",
108 | "SupabaseDatabaseError": "",
109 | "SupabaseQuery": "",
110 | "SupabaseRealtime": "",
111 | "SupabaseStorage": "",
112 | "SupabaseStorageError": "",
113 | "SupabaseUser": "",
114 | "Task": ""
115 | }
116 |
117 | [application]
118 |
119 | config/name="supabase-demo.todo-list"
120 | run/main_scene="res://scn/Main/main.tscn"
121 | config/icon="res://addons/supabase/icon.svg"
122 |
123 | [audio]
124 |
125 | default_bus_layout=""
126 |
127 | [autoload]
128 |
129 | Supabase="*res://addons/supabase/Supabase/supabase.gd"
130 |
131 | [display]
132 |
133 | window/dpi/allow_hidpi=true
134 | window/handheld/orientation="portrait"
135 | window/stretch/mode="2d"
136 | window/stretch/aspect="expand"
137 |
138 | [editor_plugins]
139 |
140 | enabled=PoolStringArray( "res://addons/supabase/plugin.cfg" )
141 |
142 | [rendering]
143 |
144 | vram_compression/import_etc=true
145 | environment/default_environment="res://default_env.tres"
146 |
147 | [supabase]
148 |
149 | config/supabaseUrl=""
150 | config/supabaseKey=""
151 |
--------------------------------------------------------------------------------
/slack-clone/icon.svg:
--------------------------------------------------------------------------------
1 |
2 |
103 |
--------------------------------------------------------------------------------
/slack-clone/scn/scenes/chat_container/SlackChat.tscn:
--------------------------------------------------------------------------------
1 | [gd_scene load_steps=13 format=2]
2 |
3 | [ext_resource path="res://scn/scenes/chat_container/SlackChat.gd" type="Script" id=1]
4 | [ext_resource path="res://scn/scenes/input_container2/InputContainer2.tscn" type="PackedScene" id=2]
5 | [ext_resource path="res://supabase-ui/basic/typography/base_label/BaseLabel.tscn" type="PackedScene" id=3]
6 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Regular.ttf" type="DynamicFontData" id=4]
7 | [ext_resource path="res://supabase-ui/res/fonts/roboto/Roboto-Bold.ttf" type="DynamicFontData" id=5]
8 | [ext_resource path="res://scn/scripts/filedrop_handler.gd" type="Script" id=6]
9 |
10 | [sub_resource type="DynamicFont" id=1]
11 | font_data = ExtResource( 4 )
12 |
13 | [sub_resource type="Theme" id=2]
14 | default_font = SubResource( 1 )
15 |
16 | [sub_resource type="StyleBoxFlat" id=3]
17 | bg_color = Color( 1, 1, 1, 1 )
18 |
19 | [sub_resource type="StyleBoxFlat" id=4]
20 | content_margin_left = 8.0
21 | content_margin_right = 8.0
22 | content_margin_top = 8.0
23 | content_margin_bottom = 8.0
24 | bg_color = Color( 1, 1, 1, 1 )
25 | border_width_left = 1
26 | border_width_top = 1
27 | border_width_right = 1
28 | border_width_bottom = 1
29 | shadow_color = Color( 0, 0, 0, 0.0509804 )
30 | shadow_size = 5
31 |
32 | [sub_resource type="DynamicFont" id=5]
33 | resource_local_to_scene = true
34 | font_data = ExtResource( 5 )
35 |
36 | [sub_resource type="DynamicFont" id=6]
37 | size = 17
38 | font_data = ExtResource( 4 )
39 |
40 | [node name="SlackChat" type="PanelContainer"]
41 | anchor_right = 1.0
42 | anchor_bottom = 1.0
43 | rect_min_size = Vector2( 500, 0 )
44 | size_flags_horizontal = 3
45 | theme = SubResource( 2 )
46 | custom_styles/panel = SubResource( 3 )
47 | script = ExtResource( 1 )
48 | __meta__ = {
49 | "_edit_use_anchors_": false
50 | }
51 |
52 | [node name="Container" type="VBoxContainer" parent="."]
53 | margin_right = 1024.0
54 | margin_bottom = 600.0
55 | size_flags_horizontal = 3
56 | size_flags_vertical = 3
57 | custom_constants/separation = 0
58 |
59 | [node name="Panel" type="PanelContainer" parent="Container"]
60 | margin_right = 1024.0
61 | margin_bottom = 52.0
62 | custom_styles/panel = SubResource( 4 )
63 |
64 | [node name="HBoxContainer" type="HBoxContainer" parent="Container/Panel"]
65 | margin_left = 8.0
66 | margin_top = 8.0
67 | margin_right = 1016.0
68 | margin_bottom = 44.0
69 | custom_constants/separation = 10
70 | __meta__ = {
71 | "_edit_use_anchors_": false
72 | }
73 |
74 | [node name="TextureRect" type="TextureRect" parent="Container/Panel/HBoxContainer"]
75 | margin_bottom = 36.0
76 | rect_min_size = Vector2( 0, 36 )
77 | expand = true
78 |
79 | [node name="Name" parent="Container/Panel/HBoxContainer" instance=ExtResource( 3 )]
80 | margin_left = 10.0
81 | margin_right = 10.0
82 | margin_bottom = 36.0
83 | grow_horizontal = 0
84 | size_flags_horizontal = 9
85 | size_flags_vertical = 7
86 | custom_fonts/font = SubResource( 5 )
87 | custom_colors/font_color = Color( 0.121569, 0.121569, 0.121569, 1 )
88 | valign = 1
89 |
90 | [node name="Description" type="Label" parent="Container/Panel/HBoxContainer"]
91 | margin_left = 20.0
92 | margin_right = 1008.0
93 | margin_bottom = 36.0
94 | size_flags_horizontal = 3
95 | size_flags_vertical = 7
96 | custom_fonts/font = SubResource( 6 )
97 | custom_colors/font_color = Color( 0.623529, 0.623529, 0.623529, 1 )
98 | text = "description"
99 | valign = 1
100 | autowrap = true
101 |
102 | [node name="ChannelContainer" type="ScrollContainer" parent="Container"]
103 | margin_top = 52.0
104 | margin_right = 1024.0
105 | margin_bottom = 492.0
106 | size_flags_horizontal = 3
107 | size_flags_vertical = 3
108 | follow_focus = true
109 | scroll_horizontal_enabled = false
110 |
111 | [node name="InputContainer" parent="Container" instance=ExtResource( 2 )]
112 | anchor_right = 0.0
113 | margin_top = 492.0
114 | margin_right = 1024.0
115 | margin_bottom = 600.0
116 |
117 | [node name="FileDropHandler" type="Control" parent="."]
118 | margin_right = 1024.0
119 | margin_bottom = 600.0
120 | mouse_filter = 2
121 | script = ExtResource( 6 )
122 | __meta__ = {
123 | "_edit_use_anchors_": false
124 | }
125 |
126 | [connection signal="pressed" from="Container/InputContainer" to="." method="_on_InputContainer_pressed"]
127 | [connection signal="files_dropped" from="FileDropHandler" to="Container/InputContainer" method="load_images"]
128 |
--------------------------------------------------------------------------------
/slack-clone/res/shaders/lerp_shader.tres:
--------------------------------------------------------------------------------
1 | [gd_resource type="ShaderMaterial" load_steps=15 format=2]
2 |
3 | [ext_resource path="res://res/imgs/shine.png" type="Texture" id=1]
4 |
5 | [sub_resource type="VisualShaderNodeVectorDecompose" id=1]
6 |
7 | [sub_resource type="VisualShaderNodeVectorCompose" id=2]
8 |
9 | [sub_resource type="VisualShaderNodeVectorScalarMix" id=3]
10 | output_port_for_preview = 0
11 |
12 | [sub_resource type="VisualShaderNodeVectorDecompose" id=4]
13 | output_port_for_preview = 0
14 |
15 | [sub_resource type="VisualShaderNodeInput" id=5]
16 | output_port_for_preview = 0
17 | input_name = "time"
18 |
19 | [sub_resource type="VisualShaderNodeScalarUniform" id=6]
20 | uniform_name = "time_multiplier"
21 |
22 | [sub_resource type="StreamTexture" id=7]
23 | flags = 4
24 |
25 | [sub_resource type="VisualShaderNodeTexture" id=8]
26 | source = 2
27 | texture = SubResource( 7 )
28 |
29 | [sub_resource type="VisualShaderNodeTexture" id=9]
30 | texture = ExtResource( 1 )
31 | texture_type = 1
32 |
33 | [sub_resource type="VisualShaderNodeScalarOp" id=10]
34 | output_port_for_preview = 0
35 | operator = 2
36 |
37 | [sub_resource type="VisualShaderNodeScalarOp" id=11]
38 | output_port_for_preview = 0
39 |
40 | [sub_resource type="VisualShaderNodeInput" id=12]
41 | output_port_for_preview = 0
42 | input_name = "uv"
43 |
44 | [sub_resource type="VisualShader" id=13]
45 | code = "shader_type canvas_item;
46 | uniform float time_multiplier;
47 | uniform sampler2D tex_frg_3 : hint_albedo;
48 |
49 |
50 |
51 | void vertex() {
52 | // Output:0
53 |
54 | }
55 |
56 | void fragment() {
57 | // Texture:2
58 | vec3 n_out2p0;
59 | float n_out2p1;
60 | {
61 | vec4 _tex_read = texture(TEXTURE , UV.xy);
62 | n_out2p0 = _tex_read.rgb;
63 | n_out2p1 = _tex_read.a;
64 | }
65 |
66 | // Input:9
67 | vec3 n_out9p0 = vec3(UV, 0.0);
68 |
69 | // VectorDecompose:10
70 | float n_out10p0 = n_out9p0.x;
71 | float n_out10p1 = n_out9p0.y;
72 | float n_out10p2 = n_out9p0.z;
73 |
74 | // Input:15
75 | float n_out15p0 = TIME;
76 |
77 | // ScalarUniform:16
78 | float n_out16p0 = time_multiplier;
79 |
80 | // ScalarOp:5
81 | float n_out5p0 = n_out15p0 * n_out16p0;
82 |
83 | // ScalarOp:8
84 | float n_out8p0 = n_out10p0 + n_out5p0;
85 |
86 | // VectorCompose:11
87 | vec3 n_out11p0 = vec3(n_out8p0, n_out10p1, n_out10p2);
88 |
89 | // Texture:3
90 | vec4 tex_frg_3_read = texture(tex_frg_3, n_out11p0.xy);
91 | vec3 n_out3p0 = tex_frg_3_read.rgb;
92 | float n_out3p1 = tex_frg_3_read.a;
93 |
94 | // VectorDecompose:14
95 | float n_out14p0 = n_out3p0.x;
96 | float n_out14p1 = n_out3p0.y;
97 | float n_out14p2 = n_out3p0.z;
98 |
99 | // VectorScalarMix:12
100 | vec3 n_in12p1 = vec3(1.00000, 1.00000, 1.00000);
101 | vec3 n_out12p0 = mix(n_out2p0, n_in12p1, n_out14p0);
102 |
103 | // Output:0
104 | COLOR.rgb = n_out12p0;
105 |
106 | }
107 |
108 | void light() {
109 | // Output:0
110 |
111 | }
112 | "
113 | graph_offset = Vector2( -1299.07, 14 )
114 | mode = 1
115 | flags/light_only = false
116 | nodes/fragment/0/position = Vector2( 400, 120 )
117 | nodes/fragment/2/node = SubResource( 8 )
118 | nodes/fragment/2/position = Vector2( -480, 100 )
119 | nodes/fragment/3/node = SubResource( 9 )
120 | nodes/fragment/3/position = Vector2( -400, 340 )
121 | nodes/fragment/5/node = SubResource( 10 )
122 | nodes/fragment/5/position = Vector2( -1040, 200 )
123 | nodes/fragment/8/node = SubResource( 11 )
124 | nodes/fragment/8/position = Vector2( -800, 200 )
125 | nodes/fragment/9/node = SubResource( 12 )
126 | nodes/fragment/9/position = Vector2( -1120, 440 )
127 | nodes/fragment/10/node = SubResource( 1 )
128 | nodes/fragment/10/position = Vector2( -920, 480 )
129 | nodes/fragment/11/node = SubResource( 2 )
130 | nodes/fragment/11/position = Vector2( -620, 420 )
131 | nodes/fragment/12/node = SubResource( 3 )
132 | nodes/fragment/12/position = Vector2( 60, 120 )
133 | nodes/fragment/14/node = SubResource( 4 )
134 | nodes/fragment/14/position = Vector2( -200, 340 )
135 | nodes/fragment/15/node = SubResource( 5 )
136 | nodes/fragment/15/position = Vector2( -1360, 200 )
137 | nodes/fragment/16/node = SubResource( 6 )
138 | nodes/fragment/16/position = Vector2( -1360, 400 )
139 | nodes/fragment/connections = PoolIntArray( 5, 0, 8, 1, 9, 0, 10, 0, 10, 0, 8, 0, 8, 0, 11, 0, 10, 1, 11, 1, 10, 2, 11, 2, 3, 0, 14, 0, 15, 0, 5, 0, 16, 0, 5, 1, 12, 0, 0, 0, 2, 0, 12, 0, 11, 0, 3, 0, 14, 0, 12, 2 )
140 |
141 | [resource]
142 | resource_local_to_scene = true
143 | render_priority = 1
144 | shader = SubResource( 13 )
145 | shader_param/time_multiplier = -0.6
146 |
--------------------------------------------------------------------------------