From dc8a5fb5587bc539c930d07a93771d6980438321 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 24 Apr 2022 21:47:08 -0500 Subject: [PATCH 01/38] Fix layer.minWidth being ignored --- src/components/Layer.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Layer.vue b/src/components/Layer.vue index 30be10d..b051687 100644 --- a/src/components/Layer.vue +++ b/src/components/Layer.vue @@ -110,7 +110,7 @@ export default defineComponent({ tabValue.style.flexGrow = ""; tabValue.style.flexShrink = ""; tabValue.style.width = ""; - tabValue.style.minWidth = tabValue.style.flexBasis = `${width}px`; + tabValue.style.minWidth = tabValue.style.flexBasis = width; tabValue.style.margin = ""; } } From eb81fdfb2c95eb6ec74c4d3ec699a3c2b5f5f885 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 24 Apr 2022 21:48:27 -0500 Subject: [PATCH 02/38] Fixed separators getting cut off if the tab on the left can be scrolled This also required some cleanup around the stick CSS --- src/components/Game.vue | 13 +++---------- src/components/layout/Sticky.vue | 13 +------------ src/features/tabs/TabFamily.vue | 23 ++++++----------------- 3 files changed, 10 insertions(+), 39 deletions(-) diff --git a/src/components/Game.vue b/src/components/Game.vue index ca992ad..570706f 100644 --- a/src/components/Game.vue +++ b/src/components/Game.vue @@ -11,7 +11,6 @@ /> -
@@ -66,14 +65,8 @@ function gatherLayerProps(layer: GenericLayer) { flex-grow: 1; } -.separator { - position: absolute; - right: -4px; - top: 0; - bottom: 0; - width: 8px; - background: var(--outline); - z-index: 1; +.tab + .tab > .inner-tab { + border-left: solid 4px var(--outline); } @@ -82,7 +75,7 @@ function gatherLayerProps(layer: GenericLayer) { height: 4px; border: none; background: var(--outline); - margin: var(--feature-margin) -10px; + margin: var(--feature-margin) 0; } .tab .modal-body hr { diff --git a/src/components/layout/Sticky.vue b/src/components/layout/Sticky.vue index 5413d36..4a598d4 100644 --- a/src/components/layout/Sticky.vue +++ b/src/components/layout/Sticky.vue @@ -43,18 +43,7 @@ onMounted(() => { .sticky { position: sticky; background: var(--background); - margin-left: -10px; - margin-right: -10px; - padding-left: 10px; - padding-right: 10px; - width: 100%; + width: calc(100% - 2px); z-index: 3; } - -.modal-body .sticky { - margin-left: 0; - margin-right: 0; - padding-left: 0; - padding-right: 0; -} diff --git a/src/features/tabs/TabFamily.vue b/src/features/tabs/TabFamily.vue index 72ccd8b..4d52ab8 100644 --- a/src/features/tabs/TabFamily.vue +++ b/src/features/tabs/TabFamily.vue @@ -168,29 +168,22 @@ export default defineComponent({ margin-bottom: 20px; } -.tab-family-container .sticky { - margin-left: -3px !important; - margin-right: -3px !important; -} - .tab-buttons-container { - width: calc(100% - 14px); z-index: 4; } .tab-buttons-container:not(.floating) { - border-top: solid 4px; border-bottom: solid 4px; border-color: inherit; } +:not(.layer-tab):not(.modal-body) > .tab-family-container > .tab-buttons-container:not(.floating) { + width: calc(100% + 6px); + margin-left: -3px; +} + .tab-buttons-container:not(.floating) .tab-buttons { - width: calc(100% + 14px); - margin-left: -7px; - margin-right: -7px; - box-sizing: border-box; text-align: left; - padding-left: 14px; margin-bottom: -4px; } @@ -239,11 +232,7 @@ export default defineComponent({ > .tab-family-container > .tab-buttons-container:not(.floating):first-child .tab-buttons { - padding-left: 2px; -} - -.tab-buttons-container:not(.floating):first-child { - border-top: 0; + padding-left: 0; } .minimizable > .tab-buttons-container:not(.floating):first-child { From f49edc3de223df858942cb20fd38303678a116f5 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 24 Apr 2022 22:04:33 -0500 Subject: [PATCH 03/38] Made goBack and minimize buttons look more consistent --- src/components/Layer.vue | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/Layer.vue b/src/components/Layer.vue index b051687..311b4c4 100644 --- a/src/components/Layer.vue +++ b/src/components/Layer.vue @@ -193,7 +193,6 @@ export default defineComponent({ right: 9px; z-index: 7; line-height: 30px; - width: 30px; border: none; background: var(--background); box-shadow: var(--background) 0 2px 3px 5px; @@ -201,7 +200,6 @@ export default defineComponent({ color: var(--foreground); font-size: 40px; cursor: pointer; - padding: 0; margin-top: -44px; margin-right: -30px; } @@ -214,15 +212,19 @@ export default defineComponent({ } .goBack { - position: absolute; - top: 0; + position: sticky; + top: 6px; left: 20px; - background-color: transparent; - border: 1px solid transparent; + line-height: 30px; + margin-top: -50px; + margin-left: -35px; + border: none; + background: var(--background); + box-shadow: var(--background) 0 2px 3px 5px; + border-radius: 50%; color: var(--foreground); font-size: 40px; cursor: pointer; - line-height: 40px; z-index: 7; } From 64533b55dcdee98945a7aae4451c1633d165127b Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sun, 24 Apr 2022 20:12:30 -0500 Subject: [PATCH 04/38] Fix Particles causing scroll issues --- src/features/links/Links.vue | 8 ++++---- src/features/particles/Particles.vue | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/features/links/Links.vue b/src/features/links/Links.vue index a5877b5..62b774f 100644 --- a/src/features/links/Links.vue +++ b/src/features/links/Links.vue @@ -64,10 +64,10 @@ const validLinks = computed(() => { .resize-listener, svg { position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; + top: 5px; + left: 5px; + right: 5px; + bottom: 5px; z-index: -10; pointer-events: none; } diff --git a/src/features/particles/Particles.vue b/src/features/particles/Particles.vue index 0050545..4b6c41e 100644 --- a/src/features/particles/Particles.vue +++ b/src/features/particles/Particles.vue @@ -102,10 +102,10 @@ export default defineComponent({ .not-fullscreen, .resize-listener { position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; + top: 5px; + left: 5px; + right: 5px; + bottom: 5px; pointer-events: none; } From 8e6fc852d7ec6e8c8b66fb5a510130b94f8db0bb Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Tue, 26 Apr 2022 23:06:19 -0500 Subject: [PATCH 05/38] Made modifier section's base customizable --- src/game/modifiers.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/game/modifiers.tsx b/src/game/modifiers.tsx index ef66911..ffbef3c 100644 --- a/src/game/modifiers.tsx +++ b/src/game/modifiers.tsx @@ -119,7 +119,8 @@ export function createModifierSection( subtitle: string, modifier: Required, base: DecimalSource = 1, - unit = "" + unit = "", + baseText: CoercableComponent = "Base" ) { return (
@@ -133,7 +134,7 @@ export function createModifierSection( {format(base)} {unit} - Base + {renderJSX(baseText)}
{renderJSX(unref(modifier.description))}
From d4c1e16fb484d1cf09df1d9ead03181205183606 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Wed, 27 Apr 2022 08:07:37 -0500 Subject: [PATCH 06/38] Fix tree branches not appearing in the correct positions --- src/features/links/Links.vue | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/features/links/Links.vue b/src/features/links/Links.vue index 62b774f..eccd7be 100644 --- a/src/features/links/Links.vue +++ b/src/features/links/Links.vue @@ -61,8 +61,7 @@ const validLinks = computed(() => { From 1479c1d44d24ff25d445c27f4ce856e62082a073 Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Wed, 27 Apr 2022 08:20:09 -0500 Subject: [PATCH 07/38] Fixed tree nodes not being clickable on the edges --- src/features/trees/TreeNode.vue | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/features/trees/TreeNode.vue b/src/features/trees/TreeNode.vue index b4b7522..a26f5a4 100644 --- a/src/features/trees/TreeNode.vue +++ b/src/features/trees/TreeNode.vue @@ -7,15 +7,15 @@ can: unref(canClick), ...unref(classes) }" + @click="onClick" + @mousedown="start" + @mouseleave="stop" + @mouseup="stop" + @touchstart="start" + @touchend="stop" + @touchcancel="stop" >
( }; }) as unknown as LayerTreeNode; } + +export function createCollapsibleModifierSections( + sections: { + title: string; + subtitle?: string; + modifier: Required; + base?: Computable; + unit?: string; + baseText?: Computable; + visible?: Computable; + }[] +): [JSXFunction, Persistent[]] { + const processedBase = sections.map(s => convertComputable(s.base)); + const processedBaseText = sections.map(s => convertComputable(s.baseText)); + const processedVisible = sections.map(s => convertComputable(s.visible)); + const collapsed = sections.map(() => persistent(false)); + const jsxFunc = jsx(() => { + const sectionJSX = sections.map((s, i) => { + if (unref(processedVisible[i]) === false) return null; + const header = ( +

(collapsed[i].value = !collapsed[i].value)} + style="cursor: pointer" + > + + ▼ + + {s.title} + {s.subtitle ? ({s.subtitle}) : null} +

+ ); + + const modifiers = unref(collapsed[i]) ? null : ( + <> +
+ + {format(unref(processedBase[i]) ?? 1)} + {s.unit} + + + {renderJSX(unref(processedBaseText[i]) ?? "Base")} + +
+ {renderJSX(unref(s.modifier.description))} + + ); + + return ( + <> + {i === 0 ? null :
} +
+ {header} +
+ {modifiers} +
+ Total: {format(s.modifier.apply(unref(processedBase[i]) ?? 1))} + {s.unit} +
+ + ); + }); + return <>{sectionJSX}; + }); + return [jsxFunc, collapsed]; +} From 77bcc10580f9fbea9ff4594c256697e05b5b123c Mon Sep 17 00:00:00 2001 From: thepaperpilot Date: Sat, 30 Apr 2022 18:41:04 -0500 Subject: [PATCH 09/38] Open newly created saves automatically --- src/components/SavesManager.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/SavesManager.vue b/src/components/SavesManager.vue index 7c3eaa8..940bfc2 100644 --- a/src/components/SavesManager.vue +++ b/src/components/SavesManager.vue @@ -33,7 +33,7 @@
Create Save
- +