mirror of
https://github.com/podman-desktop/podman-desktop
synced 2026-04-21 17:47:22 +00:00
* fix: eslint config Signed-off-by: Philippe Martin <phmartin@redhat.com> * fix: components Signed-off-by: Philippe Martin <phmartin@redhat.com> * fix: store Signed-off-by: Philippe Martin <phmartin@redhat.com> * fix: window mocks Signed-off-by: Philippe Martin <phmartin@redhat.com> * fix: components 2/x Signed-off-by: Philippe Martin <phmartin@redhat.com> * fix: components 3/x Signed-off-by: Philippe Martin <phmartin@redhat.com> * fix: rebase Signed-off-by: Philippe Martin <phmartin@redhat.com> * fix: components 5/x Signed-off-by: Philippe Martin <phmartin@redhat.com> * fix: components 6/x Signed-off-by: Philippe Martin <phmartin@redhat.com> * fix: typo Signed-off-by: Philippe Martin <phmartin@redhat.com> * fix: rebase Signed-off-by: Philippe Martin <phmartin@redhat.com>
34 lines
1.1 KiB
Svelte
34 lines
1.1 KiB
Svelte
<script lang="ts">
|
|
import { router } from 'tinro';
|
|
|
|
import { ConfigMapSecretUtils } from './configmap-secret-utils';
|
|
import type { ConfigMapSecretUI } from './ConfigMapSecretUI';
|
|
|
|
export let object: ConfigMapSecretUI;
|
|
|
|
function openDetails(): void {
|
|
const configmapSecretUtils = new ConfigMapSecretUtils();
|
|
if (configmapSecretUtils.isSecret(object)) {
|
|
router.goto(
|
|
`/kubernetes/configmapsSecrets/secret/${encodeURI(object.name)}/${encodeURI(object.namespace)}/summary`,
|
|
);
|
|
}
|
|
|
|
if (configmapSecretUtils.isConfigMap(object)) {
|
|
router.goto(
|
|
`/kubernetes/configmapsSecrets/configmap/${encodeURI(object.name)}/${encodeURI(object.namespace)}/summary`,
|
|
);
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<button class="hover:cursor-pointer flex flex-col max-w-full" on:click={openDetails}>
|
|
<div class="text-sm text-[var(--pd-table-body-text-highlight)] max-w-full overflow-hidden text-ellipsis">
|
|
{object.name}
|
|
</div>
|
|
<div class="flex flex-row text-sm gap-1">
|
|
{#if object.namespace}
|
|
<div class="font-extra-light text-[var(--pd-table-body-text)]">{object.namespace}</div>
|
|
{/if}
|
|
</div>
|
|
</button>
|