Skip to content

Commit eb59aa3

Browse files
committed
feat: Store is now aware of installed themes
1 parent 6a3f0da commit eb59aa3

File tree

5 files changed

+10
-14
lines changed

5 files changed

+10
-14
lines changed

components/Settings/CreateTemplateTheme.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,9 @@ export function CreateTemplateTheme({ ongoingAction }: { ongoingAction: boolean
4747
description={`This will create a blank theme in your themes folder that you can use as the starting point for your own theme.`}
4848
triggerDisabled={ongoingAction}
4949
Trigger={
50-
<button
51-
disabled={ongoingAction}
52-
className="flex h-12 w-full items-center justify-center whitespace-nowrap rounded-xl bg-base-3-dark px-4"
53-
>
50+
<div className="flex h-12 w-full items-center justify-center whitespace-nowrap rounded-xl bg-base-3-dark px-4">
5451
{ongoingAction ? <ImSpinner5 /> : "Create Template Theme"}
55-
</button>
52+
</div>
5653
}
5754
/>
5855
</>

constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export const apiUrl = "https://api.deckthemes.com";
2-
export const storeUrl = "https://alpha.deckthemes.com/desktop";
3-
// export const storeUrl = "http://localhost:3000/desktop";
2+
// export const storeUrl = "https://alpha.deckthemes.com/desktop";
3+
export const storeUrl = "http://localhost:3000/desktop";
44
export const allowedStoreOrigins = [
55
"https://deckthemes.com",
66
"https://beta.deckthemes.com",

pages/store.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useContext, useEffect, useRef } from "react";
22
import { themeContext } from "@contexts/themeContext";
33
import { allowedStoreOrigins, storeUrl } from "../constants";
4-
import { downloadThemeFromUrl, storeRead, toast } from "../backend";
4+
import { downloadThemeFromUrl, sleep, storeRead, toast } from "../backend";
55
import { useRouter } from "next/router";
66

77
export default function Store() {
@@ -35,7 +35,10 @@ export default function Store() {
3535
// @ts-ignore
3636
ref={storeRef}
3737
src={storeUrl}
38-
onLoad={() => {
38+
onLoad={async () => {
39+
// Not sure if theres a better version of onLoad that waits until the iframe can receive messages
40+
// This works though
41+
await sleep(1000);
3942
storeRef.current?.contentWindow?.postMessage(
4043
{
4144
action: "provideInstallState",

public/vercel.svg

Lines changed: 0 additions & 4 deletions
This file was deleted.

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"build": {
44
"beforeBuildCommand": "npm run build && npm run export",
55
"beforeDevCommand": "npm run dev",
6-
"devPath": "http://localhost:3000",
6+
"devPath": "http://localhost:3001",
77
"distDir": "../out"
88
},
99
"package": {

0 commit comments

Comments
 (0)