merge: upstream

This commit is contained in:
Marie 2023-12-23 02:09:23 +01:00
commit 5db583a3eb
701 changed files with 50809 additions and 13660 deletions

View file

@ -33,7 +33,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script lang="ts" setup>
import { watch } from 'vue';
import { watch, computed, ref } from 'vue';
import JSON5 from 'json5';
import * as os from '@/os.js';
import { i18n } from '@/i18n.js';
@ -49,16 +49,16 @@ const props = defineProps<{
domain: string;
}>();
const scope = $computed(() => props.path ? props.path.split('/') : []);
const scope = computed(() => props.path ? props.path.split('/') : []);
let keys = $ref(null);
const keys = ref(null);
function fetchKeys() {
os.api('i/registry/keys-with-type', {
scope: scope,
scope: scope.value,
domain: props.domain === '@' ? null : props.domain,
}).then(res => {
keys = Object.entries(res).sort((a, b) => a[0].localeCompare(b[0]));
keys.value = Object.entries(res).sort((a, b) => a[0].localeCompare(b[0]));
});
}
@ -76,7 +76,7 @@ async function createKey() {
scope: {
type: 'string',
label: i18n.ts._registry.scope,
default: scope.join('/'),
default: scope.value.join('/'),
},
});
if (canceled) return;
@ -91,9 +91,9 @@ async function createKey() {
watch(() => props.path, fetchKeys, { immediate: true });
const headerActions = $computed(() => []);
const headerActions = computed(() => []);
const headerTabs = $computed(() => []);
const headerTabs = computed(() => []);
definePageMetadata({
title: i18n.ts.registry,