-
Notifications
You must be signed in to change notification settings - Fork 387
/
CLIAccessCreatedStep.vue
64 lines (53 loc) · 1.97 KB
/
CLIAccessCreatedStep.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Copyright (C) 2023 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<div class="pa-7">
<v-row>
<v-col cols="12">
Copy or save the satellite address and API key as they will only appear once.
</v-col>
<save-buttons :items="saveItems" :name="name" type="CLI-access" />
<v-divider class="my-3" />
<v-col cols="12">
<text-output-area
label="Satellite Address"
:value="satelliteAddress"
:tooltip-disabled="isTooltipDisabled"
show-copy
/>
</v-col>
<v-col cols="12">
<text-output-area
label="API Key"
:value="apiKey"
:tooltip-disabled="isTooltipDisabled"
show-copy
/>
</v-col>
</v-row>
</div>
</template>
<script setup lang="ts">
import { ref, computed } from 'vue';
import { VRow, VCol, VDivider } from 'vuetify/components';
import { useConfigStore } from '@/store/modules/configStore';
import { SaveButtonsItem, DialogStepComponent } from '@/types/common';
import TextOutputArea from '@/components/dialogs/createAccessSteps/TextOutputArea.vue';
import SaveButtons from '@/components/dialogs/commonPassphraseSteps/SaveButtons.vue';
const props = defineProps<{
name: string;
apiKey: string;
}>();
const configStore = useConfigStore();
const isTooltipDisabled = ref<boolean>(false);
const satelliteAddress = computed<string>(() => configStore.state.config.satelliteNodeURL);
const saveItems = computed<SaveButtonsItem[]>(() => [
{ name: 'Satellite Address', value: satelliteAddress.value },
{ name: 'API Key', value: props.apiKey },
]);
defineExpose<DialogStepComponent>({
title: 'API Key Created',
onEnter: () => isTooltipDisabled.value = false,
onExit: () => isTooltipDisabled.value = true,
});
</script>