Skip to content

Commit

Permalink
fix: removal of html/frame component until PR complete (#4070)
Browse files Browse the repository at this point in the history
until #3884 is completed
  • Loading branch information
1zun4 authored Oct 5, 2024
1 parent a530657 commit 033b907
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 112 deletions.
10 changes: 0 additions & 10 deletions src-theme/src/routes/hud/Hud.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,6 @@
<Keystrokes/>
{:else if c.name === "Effects"}
<Effects />
{:else if c.name === "Frame"}
{#if c.settings.src.startsWith("http")}
<iframe title="" src="{c.settings.src}"
style="width: {c.settings.width}px; height: {c.settings.height}px; border: none;scale: {c.settings.scale};"></iframe>
{:else}
<iframe title="" srcdoc="{c.settings.src}"
style="width: {c.settings.width}px; height: {c.settings.height}px; border: none;scale: {c.settings.scale};"></iframe>
{/if}
{:else if c.name === "Html"}
{@html c.settings.code}
{:else if c.name === "Text"}
<p>{c.settings.text}</p>
{:else if c.name === "Image"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ import net.ccbluex.liquidbounce.web.theme.ThemeManager
import net.ccbluex.liquidbounce.web.theme.component.ComponentOverlay
import net.ccbluex.liquidbounce.web.theme.component.components
import net.ccbluex.liquidbounce.web.theme.component.customComponents
import net.ccbluex.liquidbounce.web.theme.component.types.FrameComponent
import net.ccbluex.liquidbounce.web.theme.component.types.HtmlComponent
import net.ccbluex.liquidbounce.web.theme.component.types.ImageComponent
import net.ccbluex.liquidbounce.web.theme.component.types.TextComponent
import net.minecraft.text.ClickEvent
Expand Down Expand Up @@ -306,20 +304,6 @@ object CommandClient {
chat("Successfully added text component.")
}.build()
)
.subcommand(CommandBuilder.begin("frame")
.parameter(
ParameterBuilder.begin<String>("url")
.vararg()
.verifiedBy(ParameterBuilder.STRING_VALIDATOR).required()
.build()
).handler { command, args ->
val arg = (args[0] as Array<*>).joinToString(" ") { it as String }
customComponents += FrameComponent(arg)
ComponentOverlay.fireComponentsUpdate()

chat("Successfully added frame component.")
}.build()
)
.subcommand(CommandBuilder.begin("image")
.parameter(
ParameterBuilder.begin<String>("url")
Expand All @@ -334,20 +318,7 @@ object CommandClient {
chat("Successfully added image component.")
}.build()
)
.subcommand(CommandBuilder.begin("html")
.parameter(
ParameterBuilder.begin<String>("code")
.vararg()
.verifiedBy(ParameterBuilder.STRING_VALIDATOR).required()
.build()
).handler { command, args ->
val arg = (args[0] as Array<*>).joinToString(" ") { it as String }
customComponents += HtmlComponent(arg)
ComponentOverlay.fireComponentsUpdate()

chat("Successfully added html component.")
}.build()
).build()
.build()
)
.subcommand(CommandBuilder.begin("remove")
.parameter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ import net.ccbluex.liquidbounce.features.misc.HideAppearance
import net.ccbluex.liquidbounce.features.module.modules.render.ModuleHud
import net.ccbluex.liquidbounce.utils.client.logger
import net.ccbluex.liquidbounce.web.theme.ThemeManager
import net.ccbluex.liquidbounce.web.theme.component.types.HtmlComponent
import net.ccbluex.liquidbounce.web.theme.component.types.IntegratedComponent
import net.ccbluex.liquidbounce.web.theme.component.types.TextComponent

var components: MutableList<Component> = mutableListOf()
var customComponents: MutableList<Component> = mutableListOf(
HtmlComponent("<b>This is HTML</b>", enabled = false)
TextComponent("hello! :)", enabled = false)
)

object ComponentOverlay : Listenable {
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit 033b907

Please sign in to comment.