chore, wip: rename attributes to properties

feat/axum
Tomáš Mládek 2023-09-03 11:08:24 +02:00
parent 686da82bb6
commit a5e33a5061
2 changed files with 13 additions and 13 deletions

View File

@ -126,11 +126,11 @@
return result;
}
let untypedAttributes = [] as UpEntry[];
let untypedProperties = [] as UpEntry[];
let untypedLinks = [] as UpEntry[];
$: {
untypedAttributes = [];
untypedProperties = [];
untypedLinks = [];
($entity?.attributes || []).forEach((entry) => {
@ -141,16 +141,16 @@
if (entry.value.t === "Address") {
untypedLinks.push(entry);
} else {
untypedAttributes.push(entry);
untypedProperties.push(entry);
}
}
});
untypedAttributes = untypedAttributes;
untypedProperties = untypedProperties;
untypedLinks = untypedLinks;
}
$: filteredUntypedAttributes = untypedAttributes.filter(
$: filteredUntypedProperties = untypedProperties.filter(
(entry) =>
![
ATTR_LABEL,
@ -163,7 +163,7 @@
].includes(entry.attribute),
);
$: currentUntypedAttributes = filteredUntypedAttributes;
$: currentUntypedProperties = filteredUntypedProperties;
$: filteredUntypedLinks = untypedLinks.filter(
(entry) => ![ATTR_IN, ATTR_OF].includes(entry.attribute),
@ -353,7 +353,7 @@
on:highlighted={(ev) => (highlightedType = ev.detail)}
on:change={() => revalidate()}
/>
<div class="attributes">
<div class="properties">
<InspectTypeEditor {entity} on:change={() => revalidate()} />
{#each Object.entries($allTypes) as [typeAddr, { labels, attributes }]}
<EntryView
@ -368,11 +368,11 @@
/>
{/each}
{#if currentUntypedAttributes.length > 0}
{#if currentUntypedProperties.length > 0}
<EntryView
title={$i18n.t("Other Attributes")}
title={$i18n.t("Other Properties")}
widgets={attributeWidgets}
entries={currentUntypedAttributes}
entries={currentUntypedProperties}
on:change={onChange}
/>
{/if}
@ -487,7 +487,7 @@
min-height: 0;
}
.attributes {
.properties {
flex: auto;
height: 0; // https://stackoverflow.com/a/14964944
min-height: 12em;
@ -500,7 +500,7 @@
// min-height: 0;
}
.attributes {
.properties {
height: unset;
min-height: unset;
overflow-y: unset;

View File

@ -62,7 +62,7 @@
newEntryValue = undefined;
}
async function removeEntry(address: string) {
if (confirm($i18n.t("Are you sure you want to remove the attribute?"))) {
if (confirm($i18n.t("Are you sure you want to remove the property?"))) {
dispatch("change", { type: "delete", address } as AttributeChange);
}
}