Skip to content

Commit d20e61d

Browse files
committed
refactor: cleanup iscriptah styles / window
1 parent bdcfa0d commit d20e61d

23 files changed

+492
-618
lines changed

iscriptah.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<meta charset="utf-8">
6+
</head>
7+
8+
<body>
9+
<div id="app"></div>
10+
<script type="module" src="./src/renderer/scenes/iscriptah/iscriptah.tsx"></script>
11+
</body>
12+
13+
</html>

src/main/create-app-menu.ts

+8-6
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import electronIsDev from "electron-is-dev";
1010
const settingsPath = path.join(getUserDataPath());
1111
export const logFilePath = path.join(getUserDataPath(), "logs");
1212

13-
export default (onOpenPluginManager: () => void, goToStartPage: () => void) => {
13+
export default (onOpenPluginManager: () => void, goToStartPage: () => void, openIscriptah: () => void) => {
1414

1515
const template = [
1616
{
@@ -100,13 +100,15 @@ export default (onOpenPluginManager: () => void, goToStartPage: () => void) => {
100100
...(electronIsDev ? [
101101
{ type: "separator" },
102102
{ role: "toggledevtools" },
103-
// {
104-
// label: "&IScriptah - Animation Viewer",
105-
// click: function () {
106-
// browserWindows.main!.webContents.send(OPEN_ISCRIPTAH);
107-
// },
103+
108104
] : []),
109105
{ type: "separator" },
106+
{
107+
label: "&IScriptah - Animation Viewer",
108+
click: function () {
109+
openIscriptah()
110+
},
111+
},
110112
{
111113
label: "Clear Asset Cache",
112114
click: async () => {

src/main/index.ts

+13
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,19 @@ if (!gotTheLock) {
8989
createConfigurationWindow()
9090
, () => {
9191
windows.main?.webContents.send(GO_TO_START_PAGE);
92+
}, () => {
93+
createWindow({
94+
onClose: () => {
95+
windows.config = null;
96+
},
97+
nodeIntegration: true,
98+
removeMenu: true,
99+
backgroundThrottling: true,
100+
backgroundColor: "#000000",
101+
devTools: true,
102+
filepath: "iscriptah.html",
103+
})
104+
92105
});
93106

94107
if (process.defaultApp) {

src/renderer/scenes/home/home-scene.tsx

+49-52
Original file line numberDiff line numberDiff line change
@@ -41,69 +41,66 @@ export const Home = ({ surface }: { surface: HTMLCanvasElement }) => {
4141
userSelect: "none",
4242
}}
4343
>
44-
{
44+
<div
45+
style={{
46+
display: "flex",
47+
justifyContent: "space-between",
48+
}}
49+
>
4550
<div
4651
style={{
4752
display: "flex",
48-
justifyContent: "space-between",
53+
flexDirection: "column",
54+
justifyContent: "center",
55+
transform: "scale(0.7)",
4956
}}
5057
>
51-
<div
58+
<h1
5259
style={{
53-
display: "flex",
54-
flexDirection: "column",
55-
justifyContent: "center",
56-
transform: "scale(0.7)",
60+
fontFamily: "Conthrax",
61+
color: "rgb(143 201 154)",
62+
textShadow: "1px 2px 10px var(--green-7)",
63+
letterSpacing: "var(--font-letterspacing-6)",
64+
lineHeight: "var(--font-lineheight-6)",
65+
textTransform: "uppercase",
66+
fontSize: "var(--font-size-fluid-2)",
5767
}}
5868
>
59-
<h1
60-
style={{
61-
fontFamily: "Conthrax",
62-
color: "rgb(143 201 154)",
63-
textShadow: "1px 2px 10px var(--green-7)",
64-
letterSpacing: "var(--font-letterspacing-6)",
65-
lineHeight: "var(--font-lineheight-6)",
66-
textTransform: "uppercase",
67-
fontSize: "var(--font-size-fluid-2)",
68-
}}
69-
>
70-
Titan Reactor
71-
</h1>
72-
</div>
73-
<div
69+
Titan Reactor
70+
</h1>
71+
</div>
72+
<div
73+
style={{
74+
display: "flex",
75+
justifyContent: "end",
76+
opacity: "0.2",
77+
}}
78+
>
79+
<img
80+
onClick={() =>
81+
openUrl("https://github.com/imbateam-gg/titan-reactor")
82+
}
83+
src={githubLogo}
84+
style={{ ...iconStyle, filter: "grayscale(1) invert(1)" }}
85+
/>
86+
<img
87+
onClick={() => openUrl("http://youtube.imbateam.gg")}
88+
src={youtubeLogo}
7489
style={{
75-
display: "flex",
76-
justifyContent: "end",
77-
opacity: "0.2",
90+
...iconStyle,
91+
filter: "grayscale(1) invert(1) brightness(1.2)",
7892
}}
79-
>
80-
<img
81-
onClick={() =>
82-
openUrl("https://github.com/imbateam-gg/titan-reactor")
83-
}
84-
src={githubLogo}
85-
style={{ ...iconStyle, filter: "grayscale(1) invert(1)" }}
86-
/>
87-
<img
88-
onClick={() => openUrl("http://youtube.imbateam.gg")}
89-
src={youtubeLogo}
90-
style={{
91-
...iconStyle,
92-
filter: "grayscale(1) invert(1) brightness(1.2)",
93-
}}
94-
/>
95-
<img
96-
style={{
97-
...iconStyle,
98-
filter:
99-
"grayscale(1) contrast(2) invert(1) brightness(1.4)",
100-
}}
101-
onClick={() => openUrl("http://discord.imbateam.gg")}
102-
src={discordLogo}
103-
/>
104-
</div>
93+
/>
94+
<img
95+
style={{
96+
...iconStyle,
97+
filter: "grayscale(1) contrast(2) invert(1) brightness(1.4)",
98+
}}
99+
onClick={() => openUrl("http://discord.imbateam.gg")}
100+
src={discordLogo}
101+
/>
105102
</div>
106-
}
103+
</div>
107104
</div>
108105
)}
109106
</div>

src/renderer/scenes/iscriptah/components/animation-blocks.tsx

+27-4
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,25 @@ export const AnimationBlocks = ({ image }: { image: ImageDAT }) => {
2323
return (
2424
<ul>
2525
<li onClick={() => toggleIscript()}>
26-
<p className="p-2 bg-gray-300 cursor-pointer hover:bg-gray-200 flex items-center justify-between">
26+
<p
27+
style={{
28+
padding: "var(--size-2)",
29+
background: "var(--gray-3)",
30+
cursor: "pointer",
31+
display: "flex",
32+
justifyContent: "space-between",
33+
alignItems: "center",
34+
}}
35+
>
2736
<span
28-
className="rounded-lg px-1 bg-gray-400 ml-2 mr-1 text-sm"
37+
style={{
38+
fontSize: "var(--font-size-1)",
39+
borderRadius: "var(--border-size-3)",
40+
background: "var(--gray-4)",
41+
padding: "var(--size-1)",
42+
marginLeft: "var(--size-2)",
43+
marginRight: "var(--size-1)",
44+
}}
2945
aria-label={`Image #${image.index}`}
3046
data-balloon-pos="down"
3147
>
@@ -41,14 +57,21 @@ export const AnimationBlocks = ({ image }: { image: ImageDAT }) => {
4157
return (
4258
<li
4359
key={i}
44-
className="p-2 cursor-pointer hover:bg-gray-200"
60+
style={{
61+
padding: "var(--size-2)",
62+
cursor: "pointer",
63+
}}
4564
onClick={(e) => {
4665
e.preventDefault();
4766
e.stopPropagation();
4867
setBlock(image, offset, i);
4968
}}
5069
>
51-
<span className={offset ? "font-bold" : ""}>
70+
<span
71+
style={{
72+
fontWeight: offset ? "bold" : "normal",
73+
}}
74+
>
5275
{iscriptHeaders[i]}
5376
</span>
5477
<ul>{}</ul>

0 commit comments

Comments
 (0)