Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into sagerb-account-selection
Browse files Browse the repository at this point in the history
  • Loading branch information
sagerb committed Oct 16, 2023
2 parents b9af559 + 56e4355 commit 7f5c4ff
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web/src/api/types/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ export type ConnectEnvironmentVariable = {
}

export type ConnectDeployment = {
connect: ConnectContent;
content: ConnectContent;
environment: ConnectEnvironmentVariable[];
}
24 changes: 22 additions & 2 deletions web/src/components/configurePublish/PublishingHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,36 @@

<script setup lang="ts">

import { ref } from 'vue';
import { useApi } from 'src/api';
import { useDeploymentStore } from 'src/stores/deployment';
import { computed } from 'vue';
import { useColorStore } from 'src/stores/color';

const colorStore = useColorStore();

const emit = defineEmits(['publish']);

const api = useApi();
const title = ref('');
const deploymentStore = useDeploymentStore();

// Unable to use storeToRefs from pinia because deployment is not
// always defined. We might want to revisit this and instead define it
// initially with an empty definition.
const title = computed({
get() {
if (deploymentStore.deployment) {
return deploymentStore.deployment.connect.content.title;
}
return '';
},
set(val) {
if (deploymentStore.deployment) {
deploymentStore.deployment.connect.content.title = val;
} else {
console.log('Error setting title into empty deployment object!');
}
}
});

const onPublish = async() => {
emit('publish');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ describe('description', () => {
}
},
connect: {
connect: {
content: {
name: '',
},
environment: [
Expand Down

0 comments on commit 7f5c4ff

Please sign in to comment.