Skip to content

Commit

Permalink
Fix PR
Browse files Browse the repository at this point in the history
  • Loading branch information
mrruby committed Feb 1, 2024
1 parent 4f5a56a commit 15ce77e
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 31 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"dev": "concurrently -p \"[{time}] [{name}]\" -n=sveltekit,electron -c=red,blue \"electron-vite dev --watch\" \"yarn run dev:sveltekit\"",
"build": "yarn build:sveltekit && yarn typecheck && electron-vite build",
"setup": "cd rust-utils && yarn && yarn build && cd ..",
"fetch:default-apps": "curl -L --output resources/default-apps/kando.webhapp https://drive.switch.ch/index.php/s/nSXZlwCYFAl9aRD/download",
"fetch:default-apps": "curl -L --output resources/default-apps/kando.webhapp https://github.com/holochain-apps/kando/releases/download/v0.8.18/kando.webhapp",
"postinstall": "electron-builder install-app-deps",
"build:win": "yarn build && electron-builder --win --config",
"build:mac": "yarn build && electron-builder --mac --config",
Expand Down
4 changes: 2 additions & 2 deletions src/main/binaries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import * as path from 'path';

import { HolochainLairVersionSchema } from '../types';

const getFilePath = (relativePath) => path.join(app.getAppPath(), relativePath);
const getFilePath = (relativePath: string) => path.join(app.getAppPath(), relativePath);

const getPackageJSONPath = () =>
getFilePath(app.isPackaged ? '../app.asar.unpacked/package.json' : './package.json');

const readJSONFile = (filePath) => JSON.parse(readFileSync(filePath, 'utf8'));
const readJSONFile = (filePath: string) => JSON.parse(readFileSync(filePath, 'utf8'));

const packageJSON = readJSONFile(getPackageJSONPath());

Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/lib/locale/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@
"setupProgress": "Setup Progress",
"startingHolochain": "Starting Holochain...",
"startingLairKeystore": "Starting Lair Keystore...",
"whatDoYouWantToLaunch": "What do you want to launch?"
"whatDoYouWantToInstall": "What do you want to install?"
}
2 changes: 1 addition & 1 deletion src/renderer/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
return showModalError({
modalStore,
errorTitle: $i18n.t('appError'),
errorMessage: setupData.error.message
errorMessage: $i18n.t(setupData.error.message)
});
}
Expand Down
32 changes: 18 additions & 14 deletions src/renderer/src/routes/main/app-store/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
let searchInput = '';
$: isKandoInSearch = 'kando'.includes(searchInput.toLowerCase());
function handlePress(event: CustomEvent) {
if (!(event.detail instanceof KeyboardEvent)) return;
Expand All @@ -41,20 +43,22 @@

<div class="grow bg-apps-list-dark-gradient">
<div class=" text-token grid w-full gap-4 md:grid-cols-2">
<div class="card variant-soft-warning m-4 flex items-center p-4">
<Avatar initials={'kn'} rounded="rounded-2xl" background="bg-app-gradient" />
<div class="ml-4 mr-2 flex-1">
<h3 class="h3">{$i18n.t('kando')}</h3>
<p class="line-clamp-2 text-xs leading-[0.8rem] opacity-60">
Holochain hApp for collaborative KanBan boards. Real-time collaboration delivered by syn
</p>
{#if isKandoInSearch}
<div class="card variant-soft-warning m-4 flex items-center p-4">
<Avatar initials={'kn'} rounded="rounded-2xl" background="bg-app-gradient" />
<div class="ml-4 mr-2 flex-1">
<h3 class="h3">{$i18n.t('kando')}</h3>
<p class="line-clamp-2 text-xs leading-[0.8rem] opacity-60">
Holochain hApp for collaborative KanBan boards. Real-time collaboration delivered by syn
</p>
</div>
<Button
props={{
onClick: () => modalStore.trigger(modal),
class: 'btn-app-store variant-filled'
}}>{$i18n.t('install')}</Button
>
</div>
<Button
props={{
onClick: () => modalStore.trigger(modal),
class: 'btn-app-store variant-filled'
}}>{$i18n.t('install')}</Button
>
</div>
{/if}
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
export let label = '';
export let id: string;
export let pl = 'pl-16';
export let value: string;
</script>

Expand All @@ -12,7 +11,7 @@
<Input
bind:value
props={{
class: `${pl} input-modal pt-6`,
class: `pl-20 input-modal pt-6`,
id,
type: 'text'
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,7 @@
class="modal-form flex flex-col space-y-4 p-4"
>
<InputModal bind:value={formData.appId} id="appName" label={$i18n.t('name')} />
<InputModal
bind:value={formData.networkSeed}
id="networkSeed"
label={$i18n.t('network')}
pl="pl-20"
/>
<InputModal bind:value={formData.networkSeed} id="networkSeed" label={$i18n.t('network')} />
<footer class="modal-footer flex justify-between gap-2">
{#if !$installKandoMutation.isPending}
<Button
Expand All @@ -66,7 +61,7 @@
{/if}
<Button
props={{
disabled: formData.appId.length === 0,
disabled: formData.appId.length === 0 || $installKandoMutation.isPending,
type: 'submit',
class: 'btn-app-store-modal flex-1'
}}
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/src/routes/main/components/MainHeader.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
class: 'pl-10 input rounded text-base font-medium',
type: 'text',
placeholder:
type === AppStore ? $i18n.t('whatDoYouWantToLaunch') : $i18n.t('searchForApps'),
type === AppStore ? $i18n.t('whatDoYouWantToInstall') : $i18n.t('searchForApps'),
autofocus: true
}}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
const installedApps = client.getInstalledApps.createQuery();
const installHappMutation = client.installHapp.createMutation();
$: isButtonDisabled = appId.length === 0 || files.length === 0 || $installHappMutation.isPending;
</script>

<form
Expand Down Expand Up @@ -59,7 +61,7 @@
/>
<Button
props={{
disabled: appId.length === 0 || files.length > 0,
disabled: isButtonDisabled,
type: 'submit'
}}
>
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"files": [],
"references": [{ "path": "./tsconfig.node.json" }],
"references": [{ "path": "./tsconfig.node.json" }]
}

0 comments on commit 15ce77e

Please sign in to comment.