diff --git a/web/src/main/kotlin/world/phantasmal/web/application/Application.kt b/web/src/main/kotlin/world/phantasmal/web/application/Application.kt index 2c37734f..6cfc6d7e 100644 --- a/web/src/main/kotlin/world/phantasmal/web/application/Application.kt +++ b/web/src/main/kotlin/world/phantasmal/web/application/Application.kt @@ -16,7 +16,7 @@ import world.phantasmal.web.core.AssetLoader import world.phantasmal.web.core.stores.ApplicationUrl import world.phantasmal.web.core.stores.PwTool import world.phantasmal.web.core.stores.UiStore -import world.phantasmal.web.huntoptimizer.HuntOptimizer +import world.phantasmal.web.huntOptimizer.HuntOptimizer import world.phantasmal.webui.dom.disposableListener class Application( diff --git a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/HuntOptimizer.kt b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/HuntOptimizer.kt similarity index 60% rename from web/src/main/kotlin/world/phantasmal/web/huntoptimizer/HuntOptimizer.kt rename to web/src/main/kotlin/world/phantasmal/web/huntOptimizer/HuntOptimizer.kt index cf2e9ab5..2d5c6fe6 100644 --- a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/HuntOptimizer.kt +++ b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/HuntOptimizer.kt @@ -1,14 +1,14 @@ -package world.phantasmal.web.huntoptimizer +package world.phantasmal.web.huntOptimizer import kotlinx.coroutines.CoroutineScope import world.phantasmal.core.disposable.DisposableContainer import world.phantasmal.web.core.AssetLoader import world.phantasmal.web.core.stores.UiStore -import world.phantasmal.web.huntoptimizer.controllers.HuntOptimizerController -import world.phantasmal.web.huntoptimizer.controllers.MethodsController -import world.phantasmal.web.huntoptimizer.stores.HuntMethodStore -import world.phantasmal.web.huntoptimizer.widgets.HuntOptimizerWidget -import world.phantasmal.web.huntoptimizer.widgets.MethodsWidget +import world.phantasmal.web.huntOptimizer.controllers.HuntOptimizerController +import world.phantasmal.web.huntOptimizer.controllers.MethodsController +import world.phantasmal.web.huntOptimizer.stores.HuntMethodStore +import world.phantasmal.web.huntOptimizer.widgets.HuntOptimizerWidget +import world.phantasmal.web.huntOptimizer.widgets.MethodsWidget class HuntOptimizer( scope: CoroutineScope, diff --git a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/HuntOptimizerUrls.kt b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/HuntOptimizerUrls.kt similarity index 87% rename from web/src/main/kotlin/world/phantasmal/web/huntoptimizer/HuntOptimizerUrls.kt rename to web/src/main/kotlin/world/phantasmal/web/huntOptimizer/HuntOptimizerUrls.kt index 96a2682d..2fceb913 100644 --- a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/HuntOptimizerUrls.kt +++ b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/HuntOptimizerUrls.kt @@ -1,4 +1,4 @@ -package world.phantasmal.web.huntoptimizer +package world.phantasmal.web.huntOptimizer object HuntOptimizerUrls { const val optimize = "/optimize" diff --git a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/controllers/HuntOptimizerController.kt b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/controllers/HuntOptimizerController.kt similarity index 82% rename from web/src/main/kotlin/world/phantasmal/web/huntoptimizer/controllers/HuntOptimizerController.kt rename to web/src/main/kotlin/world/phantasmal/web/huntOptimizer/controllers/HuntOptimizerController.kt index a6dfba35..d5a44526 100644 --- a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/controllers/HuntOptimizerController.kt +++ b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/controllers/HuntOptimizerController.kt @@ -1,10 +1,10 @@ -package world.phantasmal.web.huntoptimizer.controllers +package world.phantasmal.web.huntOptimizer.controllers import world.phantasmal.web.core.controllers.PathAwareTab import world.phantasmal.web.core.controllers.PathAwareTabController import world.phantasmal.web.core.stores.PwTool import world.phantasmal.web.core.stores.UiStore -import world.phantasmal.web.huntoptimizer.HuntOptimizerUrls +import world.phantasmal.web.huntOptimizer.HuntOptimizerUrls class HuntOptimizerController(uiStore: UiStore) : PathAwareTabController( uiStore, diff --git a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/controllers/MethodsController.kt b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/controllers/MethodsController.kt similarity index 88% rename from web/src/main/kotlin/world/phantasmal/web/huntoptimizer/controllers/MethodsController.kt rename to web/src/main/kotlin/world/phantasmal/web/huntOptimizer/controllers/MethodsController.kt index 2c939267..4cfd1703 100644 --- a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/controllers/MethodsController.kt +++ b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/controllers/MethodsController.kt @@ -1,4 +1,4 @@ -package world.phantasmal.web.huntoptimizer.controllers +package world.phantasmal.web.huntOptimizer.controllers import world.phantasmal.lib.fileformats.quest.Episode import world.phantasmal.observable.value.list.ListVal @@ -8,9 +8,9 @@ import world.phantasmal.web.core.controllers.PathAwareTab import world.phantasmal.web.core.controllers.PathAwareTabController import world.phantasmal.web.core.stores.PwTool import world.phantasmal.web.core.stores.UiStore -import world.phantasmal.web.huntoptimizer.HuntOptimizerUrls -import world.phantasmal.web.huntoptimizer.models.HuntMethodModel -import world.phantasmal.web.huntoptimizer.stores.HuntMethodStore +import world.phantasmal.web.huntOptimizer.HuntOptimizerUrls +import world.phantasmal.web.huntOptimizer.models.HuntMethodModel +import world.phantasmal.web.huntOptimizer.stores.HuntMethodStore class MethodsTab(title: String, path: String, val episode: Episode) : PathAwareTab(title, path) diff --git a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/models/HuntMethodModel.kt b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/models/HuntMethodModel.kt similarity index 94% rename from web/src/main/kotlin/world/phantasmal/web/huntoptimizer/models/HuntMethodModel.kt rename to web/src/main/kotlin/world/phantasmal/web/huntOptimizer/models/HuntMethodModel.kt index a4310496..5aa8f789 100644 --- a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/models/HuntMethodModel.kt +++ b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/models/HuntMethodModel.kt @@ -1,4 +1,4 @@ -package world.phantasmal.web.huntoptimizer.models +package world.phantasmal.web.huntOptimizer.models import world.phantasmal.lib.fileformats.quest.Episode import world.phantasmal.lib.fileformats.quest.NpcType diff --git a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/models/SimpleQuestModel.kt b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/models/SimpleQuestModel.kt similarity index 82% rename from web/src/main/kotlin/world/phantasmal/web/huntoptimizer/models/SimpleQuestModel.kt rename to web/src/main/kotlin/world/phantasmal/web/huntOptimizer/models/SimpleQuestModel.kt index e63fa23a..1318eec8 100644 --- a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/models/SimpleQuestModel.kt +++ b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/models/SimpleQuestModel.kt @@ -1,4 +1,4 @@ -package world.phantasmal.web.huntoptimizer.models +package world.phantasmal.web.huntOptimizer.models import world.phantasmal.lib.fileformats.quest.Episode import world.phantasmal.lib.fileformats.quest.NpcType diff --git a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/stores/HuntMethodStore.kt b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/stores/HuntMethodStore.kt similarity index 95% rename from web/src/main/kotlin/world/phantasmal/web/huntoptimizer/stores/HuntMethodStore.kt rename to web/src/main/kotlin/world/phantasmal/web/huntOptimizer/stores/HuntMethodStore.kt index f7c93b4f..d8b6493d 100644 --- a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/stores/HuntMethodStore.kt +++ b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/stores/HuntMethodStore.kt @@ -1,4 +1,4 @@ -package world.phantasmal.web.huntoptimizer.stores +package world.phantasmal.web.huntOptimizer.stores import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.launch @@ -12,8 +12,8 @@ import world.phantasmal.web.core.IoDispatcher import world.phantasmal.web.core.UiDispatcher import world.phantasmal.web.core.models.Server import world.phantasmal.web.core.stores.UiStore -import world.phantasmal.web.huntoptimizer.models.HuntMethodModel -import world.phantasmal.web.huntoptimizer.models.SimpleQuestModel +import world.phantasmal.web.huntOptimizer.models.HuntMethodModel +import world.phantasmal.web.huntOptimizer.models.SimpleQuestModel import world.phantasmal.webui.stores.Store import kotlin.collections.component1 import kotlin.collections.component2 diff --git a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/widgets/HelpWidget.kt b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/widgets/HelpWidget.kt similarity index 90% rename from web/src/main/kotlin/world/phantasmal/web/huntoptimizer/widgets/HelpWidget.kt rename to web/src/main/kotlin/world/phantasmal/web/huntOptimizer/widgets/HelpWidget.kt index 54e01f67..811a7671 100644 --- a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/widgets/HelpWidget.kt +++ b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/widgets/HelpWidget.kt @@ -1,4 +1,4 @@ -package world.phantasmal.web.huntoptimizer.widgets +package world.phantasmal.web.huntOptimizer.widgets import org.w3c.dom.Node import world.phantasmal.webui.dom.div @@ -6,7 +6,7 @@ import world.phantasmal.webui.dom.p import world.phantasmal.webui.widgets.Widget class HelpWidget : Widget(::style) { - override fun Node.createElement() = div(className = "pw-huntoptimizer-help") { + override fun Node.createElement() = div(className = "pw-hunt-optimizer-help") { p { textContent = "Add some items with the combo box on the left to see the optimal combination of hunt methods on the right." @@ -28,12 +28,12 @@ class HelpWidget : Widget(::style) { @Suppress("CssUnusedSymbol") // language=css private fun style() = """ -.pw-huntoptimizer-help { +.pw-hunt-optimizer-help { cursor: initial; user-select: text; } -.pw-huntoptimizer-help p { +.pw-hunt-optimizer-help p { margin: 1em; max-width: 600px; } diff --git a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/widgets/HuntOptimizerWidget.kt b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/widgets/HuntOptimizerWidget.kt similarity index 80% rename from web/src/main/kotlin/world/phantasmal/web/huntoptimizer/widgets/HuntOptimizerWidget.kt rename to web/src/main/kotlin/world/phantasmal/web/huntOptimizer/widgets/HuntOptimizerWidget.kt index d55f74dc..75647780 100644 --- a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/widgets/HuntOptimizerWidget.kt +++ b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/widgets/HuntOptimizerWidget.kt @@ -1,9 +1,9 @@ -package world.phantasmal.web.huntoptimizer.widgets +package world.phantasmal.web.huntOptimizer.widgets import org.w3c.dom.Node import world.phantasmal.webui.widgets.TabContainer -import world.phantasmal.web.huntoptimizer.HuntOptimizerUrls -import world.phantasmal.web.huntoptimizer.controllers.HuntOptimizerController +import world.phantasmal.web.huntOptimizer.HuntOptimizerUrls +import world.phantasmal.web.huntOptimizer.controllers.HuntOptimizerController import world.phantasmal.webui.dom.div import world.phantasmal.webui.widgets.Widget @@ -11,7 +11,7 @@ class HuntOptimizerWidget( private val ctrl: HuntOptimizerController, private val createMethodsWidget: () -> MethodsWidget, ) : Widget(::style) { - override fun Node.createElement() = div(className = "pw-huntoptimizer-hunt-optimizer") { + override fun Node.createElement() = div(className = "pw-hunt-optimizer-hunt-optimizer") { addChild(TabContainer( ctrl = ctrl, createWidget = { tab -> @@ -33,12 +33,12 @@ class HuntOptimizerWidget( @Suppress("CssUnusedSymbol") // language=css private fun style() = """ -.pw-huntoptimizer-hunt-optimizer { +.pw-hunt-optimizer-hunt-optimizer { display: flex; flex-direction: column; } -.pw-huntoptimizer-hunt-optimizer > * { +.pw-hunt-optimizer-hunt-optimizer > * { flex-grow: 1; overflow: hidden; } diff --git a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/widgets/MethodsForEpisodeWidget.kt b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/widgets/MethodsForEpisodeWidget.kt similarity index 77% rename from web/src/main/kotlin/world/phantasmal/web/huntoptimizer/widgets/MethodsForEpisodeWidget.kt rename to web/src/main/kotlin/world/phantasmal/web/huntOptimizer/widgets/MethodsForEpisodeWidget.kt index a9b8f250..612e81e6 100644 --- a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/widgets/MethodsForEpisodeWidget.kt +++ b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/widgets/MethodsForEpisodeWidget.kt @@ -1,8 +1,8 @@ -package world.phantasmal.web.huntoptimizer.widgets +package world.phantasmal.web.huntOptimizer.widgets import org.w3c.dom.Node import world.phantasmal.lib.fileformats.quest.Episode -import world.phantasmal.web.huntoptimizer.controllers.MethodsController +import world.phantasmal.web.huntOptimizer.controllers.MethodsController import world.phantasmal.webui.dom.bindChildrenTo import world.phantasmal.webui.dom.div import world.phantasmal.webui.widgets.Widget @@ -11,7 +11,7 @@ class MethodsForEpisodeWidget( private val ctrl: MethodsController, private val episode: Episode, ) : Widget(::style) { - override fun Node.createElement() = div(className = "pw-huntoptimizer-methods-for-episode") { + override fun Node.createElement() = div(className = "pw-hunt-optimizer-methods-for-episode") { bindChildrenTo(ctrl.episodeToMethods.getValue(episode)) { method, _ -> div { textContent = method.name } } @@ -21,7 +21,7 @@ class MethodsForEpisodeWidget( @Suppress("CssUnusedSymbol") // language=css private fun style() = """ -.pw-huntoptimizer-methods-for-episode { +.pw-hunt-optimizer-methods-for-episode { overflow: auto; } """ diff --git a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/widgets/MethodsWidget.kt b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/widgets/MethodsWidget.kt similarity index 75% rename from web/src/main/kotlin/world/phantasmal/web/huntoptimizer/widgets/MethodsWidget.kt rename to web/src/main/kotlin/world/phantasmal/web/huntOptimizer/widgets/MethodsWidget.kt index 16a8af1b..9aee2fb8 100644 --- a/web/src/main/kotlin/world/phantasmal/web/huntoptimizer/widgets/MethodsWidget.kt +++ b/web/src/main/kotlin/world/phantasmal/web/huntOptimizer/widgets/MethodsWidget.kt @@ -1,13 +1,13 @@ -package world.phantasmal.web.huntoptimizer.widgets +package world.phantasmal.web.huntOptimizer.widgets import org.w3c.dom.Node import world.phantasmal.webui.widgets.TabContainer -import world.phantasmal.web.huntoptimizer.controllers.MethodsController +import world.phantasmal.web.huntOptimizer.controllers.MethodsController import world.phantasmal.webui.dom.div import world.phantasmal.webui.widgets.Widget class MethodsWidget(private val ctrl: MethodsController) : Widget(::style) { - override fun Node.createElement() = div(className = "pw-huntoptimizer-methods") { + override fun Node.createElement() = div(className = "pw-hunt-optimizer-methods") { addChild(TabContainer(ctrl = ctrl, createWidget = { tab -> MethodsForEpisodeWidget(ctrl, tab.episode) })) @@ -17,12 +17,12 @@ class MethodsWidget(private val ctrl: MethodsController) : Widget(::style) { @Suppress("CssUnusedSymbol") // language=css private fun style() = """ -.pw-huntoptimizer-methods { +.pw-hunt-optimizer-methods { display: flex; flex-direction: column; } -.pw-huntoptimizer-methods > * { +.pw-hunt-optimizer-methods > * { flex-grow: 1; overflow: hidden; }