Skip to content

Commit

Permalink
Merge branch 'main' into ghcr-clean
Browse files Browse the repository at this point in the history
  • Loading branch information
esune authored Nov 29, 2023
2 parents 561ece5 + 2752480 commit 9724a48
Show file tree
Hide file tree
Showing 32 changed files with 1,243 additions and 714 deletions.
20 changes: 18 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
# Basic Architecture Overview
# Traction Documentation and Resources

## A Traction Sandbox Hyperledger Aries/AnonCreds Workshop

This workshop contains a sequence of labs demonstrating issuing, receiving,
holding, requesting, presenting, and verifying AnonCreds Verifiable
Credentials--no technical experience required! The labs take about 20 minutes
for complete. New developers expecting to build an Issuer or Verifier with
[Traction] or [Aries Cloud Agent Python] will find this a great place to
start--with developer-oriented "Next Steps" suggested at the end of the
Workshop.

[Traction]: https://digital.gov.bc.ca/digital-trust/technical-resources/traction/
[Aries Cloud Agent Python]: https://aca-py.org

## Basic Architecture Overview
See [traction flow chart](assets/traction-flow-chart-1600x900-12162022.pdf)

# Use Cases
## Use Cases

* [Tenant Onboarding](USE-CASE-ONBOARD.md)
* [API Keys](USE-CASE-API-KEY.md)

Expand Down
269 changes: 269 additions & 0 deletions docs/traction-anoncreds-workshop.md

Large diffs are not rendered by default.

846 changes: 494 additions & 352 deletions services/tenant-ui/frontend/package-lock.json

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions services/tenant-ui/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,52 +16,52 @@
"coverage": "vitest run --coverage"
},
"dependencies": {
"@intlify/unplugin-vue-i18n": "^1.4.0",
"@intlify/unplugin-vue-i18n": "^1.5.0",
"@jsonforms/vue": "^3.1.0",
"@jsonforms/vue-vanilla": "^3.1.0",
"@vuelidate/core": "^2.0.3",
"@vuelidate/validators": "^2.0.4",
"axios": "^1.5.1",
"axios": "^1.6.2",
"date-fns": "^2.29.3",
"dompurify": "^3.0.6",
"json-editor-vue": "^0.11.0",
"marked": "^9.1.2",
"oidc-client-ts": "^2.3.0",
"marked": "^10.0.0",
"oidc-client-ts": "^2.4.0",
"pinia": "^2.1.7",
"primeflex": "^3.3.1",
"primeicons": "^6.0.1",
"primevue": "^3.37.0",
"primevue": "^3.41.1",
"qrcode.vue": "^3.4.1",
"vue": "^3.3.7",
"vue-i18n": "^9.5.0",
"vue": "^3.3.8",
"vue-i18n": "^9.7.1",
"vue-json-pretty": "^2.2.4",
"vue-router": "^4.2.5",
"vue-toastification": "^2.0.0-rc.5"
},
"devDependencies": {
"@intlify/eslint-plugin-vue-i18n": "^2.0.0",
"@pinia/testing": "^0.1.3",
"@types/dompurify": "^3.0.4",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"@vitejs/plugin-vue": "^4.4.0",
"@types/dompurify": "^3.0.5",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"@vitejs/plugin-vue": "^4.5.0",
"@vitest/coverage-v8": "^0.34.6",
"@vue/eslint-config-prettier": "^8.0.0",
"@vue/eslint-config-typescript": "^12.0.0",
"@vue/test-utils": "^2.4.1",
"eslint": "^8.52.0",
"@vue/test-utils": "^2.4.2",
"eslint": "^8.54.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-vue": "^9.18.0",
"eslint-plugin-vue": "^9.18.1",
"flat": "^6.0.1",
"glob": "^10.3.10",
"jsdom": "^22.1.0",
"msw": "^2.0.4",
"prettier": "^3.0.3",
"sass": "^1.69.4",
"msw": "^2.0.8",
"prettier": "^3.1.0",
"sass": "^1.69.5",
"typescript": "^5.2.2",
"vite": "^4.5.0",
"vite": "^5.0.2",
"vitest": "^0.34.6",
"vue-tsc": "^1.8.21",
"vue-tsc": "^1.8.22",
"whatwg-fetch": "^3.6.19"
}
}
4 changes: 4 additions & 0 deletions services/tenant-ui/frontend/src/assets/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ body {
font-size: 1.3em;
}
}
.p-menuitem-content {
padding-top: 0.75em;
padding-bottom: 0.75em;
}
}
}
// Innkeeper specifics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@
}

// Logout button in the menu
.logout-menu-item .p-menuitem-link {
.logout-menu-item .p-menuitem-content {
&,
&:hover {
.p-menuitem-text {
.p-menuitem-link {
color: $tenant-ui-text-danger !important;
}
}
Expand Down
35 changes: 35 additions & 0 deletions services/tenant-ui/frontend/src/components/common/MenuItemLink.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<template>
<router-link
v-if="item.route"
v-slot="{ href, navigate }"
:to="item.route"
custom
>
<a v-ripple :href="href" v-bind="menuBindProps.action" @click="navigate">
<span :class="item.icon" />
<span class="ml-2">{{ item.label }}</span>
</a>
</router-link>
<a
v-else
v-ripple
:href="item.url"
:target="item.target"
v-bind="menuBindProps.action"
>
<span :class="item.icon" />
<span class="ml-2">{{ item.label }}</span>
</a>
</template>

<script setup lang="ts">
import { MenuItem } from 'primevue/menuitem';
import { MenuRouterBindProps } from 'primevue/menu';
defineProps<{
item: MenuItem;
menuBindProps: MenuRouterBindProps;
}>();
</script>

<style scoped></style>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<template>
<router-link
v-if="props.item.route"
v-slot="{ href, navigate }"
:to="props.item.route"
custom
>
<a :href="href" class="p-panelmenu-header-action" @click="navigate">
<span class="p-menuitem-icon" :class="props.item.icon" />
<span class="p-menuitem-text ml-2 text-color">{{
props.item.label
}}</span>
</a>
</router-link>
<a
v-else
:href="props.item.url"
class="p-panelmenu-header-action"
:target="props.item.target"
>
<span class="p-menuitem-icon" :class="props.item.icon" />
<span class="p-menuitem-text ml-2">{{ props.item.label }}</span>
<span
v-if="props.item.items"
class="pi pi-angle-down text-primary ml-auto"
/>
</a>
</template>

<script setup lang="ts">
// See https://primevue.org/panelmenu/#router
import { MenuItem } from 'primevue/menuitem';
const props = defineProps<{
item: MenuItem;
}>();
</script>

<style scoped></style>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
<div class="badge-img" />
</Button>
</div>
<Menu ref="menu" :model="items" :popup="true" />
<Menu ref="menu" :model="items" :popup="true">
<template #item="{ item, props }">
<MenuItemLink :item="item" :menu-bind-props="props" />
</template>
</Menu>
</template>

<script setup lang="ts">
Expand All @@ -13,7 +17,8 @@ import { ref } from 'vue';
// PrimeVue
import Button from 'primevue/button';
import Menu from 'primevue/menu';
// State
// Components
import MenuItemLink from '@/components/common/MenuItemLink.vue';
const menu = ref();
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
</template>

<script setup lang="ts">
import { ref, computed, defineProps, defineEmits } from 'vue';
import { ref, computed } from 'vue';
import InputText from 'primevue/inputtext';
import Button from 'primevue/button';
import { useInnkeeperTenantsStore, useTenantStore } from '@/store';
import { useInnkeeperTenantsStore } from '@/store';
import { TenantRecord } from '@/types/acapyApi/acapyInterface';
import { useToast } from 'vue-toastification';
Expand All @@ -44,7 +44,6 @@ const emit = defineEmits(['closed', 'success']);
// Using stores
const innkeeperTenantsStore = useInnkeeperTenantsStore();
const tenantStore = useTenantStore();
const confirmationTenantName = ref('');
const isTenantNameCorrect = computed(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ import { useGovernanceStore } from '@/store';
const toast = useToast();
const { t } = useI18n();
const { loading, selectedCredentialDefinition, storedCredDefs } = storeToRefs(
useGovernanceStore()
);
const { loading, selectedCredentialDefinition, storedCredDefs } =
storeToRefs(useGovernanceStore());
const governanceStore = useGovernanceStore();
const emit = defineEmits(['closed', 'success']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ defineEmits(['success']);
const { t } = useI18n();
const { isIssuer } = storeToRefs(useTenantStore());
const { schemaList, selectedCredentialDefinition } = storeToRefs(
useGovernanceStore()
);
const { schemaList, selectedCredentialDefinition } =
storeToRefs(useGovernanceStore());
const governanceStore = useGovernanceStore();
const formattedSchemaList = computed(() => formatSchemaList(schemaList));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,8 @@ const { t } = useI18n();
const { config } = storeToRefs(useConfigStore());
const governanceStore = useGovernanceStore();
const { loading, storedCredDefs, selectedCredentialDefinition } = storeToRefs(
useGovernanceStore()
);
const { loading, storedCredDefs, selectedCredentialDefinition } =
storeToRefs(useGovernanceStore());
const formattedstoredCredDefs = computed(() =>
formatStoredCredDefs(storedCredDefs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ defineEmits(['success']);
const router = useRouter();
const { t } = useI18n();
const { isIssuer } = storeToRefs(useTenantStore());
const { selectedCredentialDefinition, storedSchemas, selectedSchema } =
storeToRefs(useGovernanceStore());
const { selectedCredentialDefinition } = storeToRefs(useGovernanceStore());
const governanceStore = useGovernanceStore();
const navigateToCredDef = (cred: any) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,8 @@ const { listConnections, findConnectionName } = useConnectionStore();
const { connections } = storeToRefs(useConnectionStore());
const issuerStore = useIssuerStore();
// use the loading state from the store to disable the button...
const { loading, credentials, selectedCredential } = storeToRefs(
useIssuerStore()
);
const { loading, credentials, selectedCredential } =
storeToRefs(useIssuerStore());
const formattedCredentials: Ref<any[]> = computed(() =>
credentials.value.map((cred: any) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,8 @@ import EnterCredentialValues from './EnterCredentialValues.vue';
const toast = useToast();
// Store values
const { loading: connectionLoading, connectionsDropdown } = storeToRefs(
useConnectionStore()
);
const { loading: connectionLoading, connectionsDropdown } =
storeToRefs(useConnectionStore());
const {
loading: credsLoading,
credentialDropdown,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,19 @@

<script setup lang="ts">
// Libraries
import { ref, defineExpose } from 'vue';
import { ref } from 'vue';
import InputText from 'primevue/inputtext';
// Source
import { Attribute } from '@/types';
const props = defineProps({
initialAttributes: {
type: Array<Attribute>,
required: false,
default: [],
},
});
const props = withDefaults(
defineProps<{
initialAttributes?: Array<Attribute>;
}>(),
{
initialAttributes: () => [],
}
);
const addAttribute = () => {
attributes.value = [{ name: '' }, ...attributes.value];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,8 @@ const toast = useToast();
const { config } = storeToRefs(useConfigStore());
const governanceStore = useGovernanceStore();
const { loading, schemaList, selectedSchema } = storeToRefs(
useGovernanceStore()
);
const { loading, schemaList, selectedSchema } =
storeToRefs(useGovernanceStore());
const formattedSchemaList = computed(() => formatSchemaList(schemaList));
Expand Down
Loading

0 comments on commit 9724a48

Please sign in to comment.