mirror of
https://github.com/ivabus/gui
synced 2025-04-23 14:07:14 +03:00
fixing things from the spreadsheet (#498)
* fixing things from the spreadsheet * make sure the login button shows owen's name correctly * make sure the login button shows owen's name correctly
This commit is contained in:
parent
1220682ffc
commit
28c1142872
9 changed files with 36 additions and 43 deletions
|
@ -99,12 +99,7 @@ function createWindow() {
|
|||
contextMenu({
|
||||
showLookUpSelection: false,
|
||||
showSearchWithGoogle: false,
|
||||
showCopyImage: false,
|
||||
prepend: (defaultActions, params, browserWindow) => [
|
||||
{
|
||||
label: "Make App 💻"
|
||||
}
|
||||
]
|
||||
showCopyImage: false
|
||||
});
|
||||
|
||||
function loadVite(port) {
|
||||
|
|
|
@ -10,6 +10,8 @@ type AutoUpdateStatus = {
|
|||
autoUpdater.logger = log;
|
||||
|
||||
let window: BrowserWindow;
|
||||
let initalized = false;
|
||||
|
||||
// keep the last status to resend to the window when it's opened becuase the store is destroyed when the window is closed
|
||||
let lastStatus: AutoUpdateStatus = { status: "up-to-date" };
|
||||
|
||||
|
@ -18,6 +20,15 @@ export const getUpdater = () => autoUpdater;
|
|||
export function checkUpdater(mainWindow: BrowserWindow): AppUpdater {
|
||||
window = mainWindow;
|
||||
autoUpdater.checkForUpdatesAndNotify();
|
||||
|
||||
if (!initalized) {
|
||||
initalized = true;
|
||||
|
||||
setInterval(() => {
|
||||
autoUpdater.checkForUpdatesAndNotify();
|
||||
}, 1000 * 60 * 30); // check for updates every 30 minutes
|
||||
}
|
||||
|
||||
return autoUpdater;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ export default function initialize(mainWindow: BrowserWindow) {
|
|||
if (config.PUSHY_APP_ID) {
|
||||
Pushy.listen();
|
||||
// Register device for push notifications
|
||||
Pushy.register({ appId: process.env.PUSHY_APP_ID })
|
||||
Pushy.register({ appId: config.PUSHY_APP_ID })
|
||||
.then(async (push_token) => {
|
||||
const { device_id } = await readSessionData();
|
||||
log.info(
|
||||
|
|
|
@ -47,13 +47,13 @@
|
|||
const pantryLink = `https://tea.xyz/+${pkg.full_name}`.toLowerCase();
|
||||
await navigator.clipboard.writeText(pantryLink);
|
||||
copied = true;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<section class="mt-4 bg-black">
|
||||
<header class="flex">
|
||||
<figure class="grow-1 relative w-1/3">
|
||||
<PackageImage class="w-full min-h-[300px] overflow-hidden" {pkg} layout="none" />
|
||||
<PackageImage class="min-h-[300px] w-full overflow-hidden" {pkg} layout="none" />
|
||||
{#if pkg.install_progress_percentage && pkg.install_progress_percentage < 100}
|
||||
<div class="absolute left-0 top-0 z-40 h-full w-full bg-black bg-opacity-50">
|
||||
<div class="absolute left-0 right-0 top-1/2 m-auto -mt-12 h-24 w-24">
|
||||
|
@ -63,12 +63,17 @@
|
|||
{/if}
|
||||
</figure>
|
||||
<article class="w-2/3 p-4 pt-8">
|
||||
<div class="flex items-center align-center gap-2">
|
||||
<div class="align-center flex items-center gap-2">
|
||||
<h3 class="text-primary text-3xl">{pkg.full_name}</h3>
|
||||
<ButtonIcon icon="pencil" tooltip="edit package"
|
||||
on:click={() => shellOpenExternal(`https://github.com/teaxyz/pantry/blob/main/projects/${pkg.full_name}/package.yml`) }
|
||||
<ButtonIcon
|
||||
icon="pencil"
|
||||
helpText="edit package"
|
||||
on:click={() =>
|
||||
shellOpenExternal(
|
||||
`https://github.com/teaxyz/pantry/blob/main/projects/${pkg.full_name}/package.yml`
|
||||
)}
|
||||
/>
|
||||
<ButtonIcon icon="link" tooltip="share package" on:click={copyPackagePantryLink}/>
|
||||
<ButtonIcon icon="link" helpText="share package" on:click={copyPackagePantryLink} />
|
||||
{#if copied}
|
||||
<p class="text-green">copied!</p>
|
||||
{/if}
|
||||
|
@ -143,7 +148,7 @@
|
|||
}
|
||||
}}
|
||||
>
|
||||
<div class="icon-github text-xl text-gray flex group-hover:text-black" />
|
||||
<div class="icon-github text-gray flex text-xl group-hover:text-black" />
|
||||
</button>
|
||||
{/if}
|
||||
</menu>
|
||||
|
|
|
@ -27,14 +27,10 @@
|
|||
const deactivate = () => (isActive = false);
|
||||
|
||||
const preventPropagation = (evt: MouseEvent) => evt.stopPropagation();
|
||||
|
||||
</script>
|
||||
|
||||
<section
|
||||
class="package-card border-gray relative h-auto border {layout}"
|
||||
class:active={isActive}
|
||||
>
|
||||
<BgImage class="absolute w-full h-full top-0 left-0" {layout} {pkg}/>
|
||||
<section class="package-card border-gray relative h-auto border {layout}" class:active={isActive}>
|
||||
<BgImage class="absolute top-0 left-0 h-full w-full" {layout} {pkg} />
|
||||
|
||||
<a href={link} on:mousedown={activate} on:mouseup={deactivate} on:mouseleave={deactivate}>
|
||||
<div class="package-card-content absolute h-full w-full flex-col justify-between">
|
||||
|
@ -44,8 +40,7 @@
|
|||
<div class="hint-icon"><i class="icon-upward-arrow" /></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-container absolute bottom-0 w-full {layout}"
|
||||
>
|
||||
<div class="content-container absolute bottom-0 w-full {layout}">
|
||||
<article class="card-thumb-label relative">
|
||||
<h3 class="text-bold font-mona line-clamp-1 text-2xl font-bold text-white">
|
||||
{fixPackageName(pkg.name)}
|
||||
|
@ -151,6 +146,7 @@
|
|||
right: 0px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.hint {
|
||||
|
|
|
@ -40,12 +40,12 @@
|
|||
<div class="relative" use:mouseLeaveDelay={2000} on:leave_delay={() => (isLogoutOpen = false)}>
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<section
|
||||
class="border-gray text-gray group flex h-[28px] w-[120px] items-center justify-between rounded-sm border bg-black pl-2 text-sm transition-all
|
||||
class="border-gray text-gray group flex h-[28px] min-w-[120px] max-w-[160px] items-center justify-between rounded-sm border bg-black pl-2 text-sm transition-all
|
||||
hover:bg-[#e1e1e1] hover:text-black"
|
||||
on:click={() => (isLogoutOpen = !isLogoutOpen)}
|
||||
on:dblclick={preventDoubleClick}
|
||||
>
|
||||
<div class="text-gray line-clamp-1 group-hover:text-black">@{$user?.login}</div>
|
||||
<div class="text-gray line-clamp-1 mr-1 group-hover:text-black">@{$user?.login}</div>
|
||||
<img
|
||||
id="avatar"
|
||||
class="flex rounded-sm"
|
||||
|
|
|
@ -14,11 +14,7 @@
|
|||
</script>
|
||||
|
||||
<div class="mr-1 flex h-full items-center justify-end gap-2 p-2">
|
||||
<ButtonIcon
|
||||
icon="bug"
|
||||
tooltip="report feedback"
|
||||
on:click={() => submitBugReport()}
|
||||
/>
|
||||
<ButtonIcon icon="bug" helpText="report feedback" on:click={() => submitBugReport()} />
|
||||
<SettingsMenu />
|
||||
<LoginButton />
|
||||
</div>
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
<script lang="ts">
|
||||
import ToolTip from "../tool-tip/tool-tip.svelte";
|
||||
|
||||
const preventDoubleClick = (evt: MouseEvent) => evt.stopPropagation();
|
||||
export let tooltip = "";
|
||||
export let helpText = "";
|
||||
export let icon: string;
|
||||
</script>
|
||||
|
||||
|
@ -10,15 +8,7 @@
|
|||
class="group flex h-[28px] w-[28px] items-center justify-center rounded-sm border border-gray hover:bg-[#e1e1e1]"
|
||||
on:dblclick={preventDoubleClick}
|
||||
on:click
|
||||
title={helpText}
|
||||
>
|
||||
{#if tooltip}
|
||||
<ToolTip class="ml-[-80px]">
|
||||
<div class="icon-{icon} text-l flex text-gray group-hover:text-black" slot="target" />
|
||||
<div slot="tooltip-content" class="flex flex-col items-center">
|
||||
<div>{tooltip}</div>
|
||||
</div>
|
||||
</ToolTip>
|
||||
{:else}
|
||||
<div class="icon-{icon} text-l flex text-gray group-hover:text-black" />
|
||||
{/if}
|
||||
<div class="icon-{icon} text-l flex text-gray group-hover:text-black" />
|
||||
</button>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<section class="relative h-auto {clazz}">
|
||||
<menu class="flex gap-1">
|
||||
{#each tabs as tab}
|
||||
<div class="border border-x-0 border-t-0 border-gray text-white">
|
||||
<div class="border-gray text-white" class:border-b={tab.label === active}>
|
||||
<Button
|
||||
onClick={() => {
|
||||
dirty = true;
|
||||
|
|
Loading…
Reference in a new issue