Skip to content

Commit

Permalink
eslint formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
TimCsaky committed May 21, 2024
1 parent fb031ad commit abdb21c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion charts/bcbox/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: bcbox
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.0.16
version: 0.0.15
kubeVersion: ">= 1.13.0"
description: A frontend UI for managing access control to S3 Objects
# A chart can be either an 'application' or a 'library' chart.
Expand Down
14 changes: 9 additions & 5 deletions frontend/src/components/common/InviteButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const inviteLoading: Ref<boolean> = ref(false);
const showInviteLink: Ref<boolean> = ref(false);
const hasManagePermission: Ref<boolean> = computed(() => {
return resourceType.value === 'object'
// eslint-disable-next-line max-len
? permissionStore.isObjectActionAllowed(props.objectId, getUserId.value, Permissions.MANAGE, resource.value?.bucketId)
: permissionStore.isBucketActionAllowed(props.bucketId, getUserId.value, Permissions.MANAGE);
});
Expand Down Expand Up @@ -158,7 +159,6 @@ async function invite() {
showInviteLink.value = false;
}
} catch (error: any) {
console.log('d', error.response);
toast.error('Creating Invite', error.response.data.detail, {life: 0});
}
inviteLoading.value = false;
Expand Down Expand Up @@ -219,7 +219,6 @@ async function invite() {
<TabPanel
header="Invite link"
:disabled="!hasManagePermission"

>
<h3 class="mt-1 mb-2">{{ (props.labelText) }} Invite</h3>
<p>Make invite available for</p>
Expand Down Expand Up @@ -280,13 +279,18 @@ async function invite() {
type="email"
class="mt-2 max-w-30rem"
/>
<small v-show="isRestricted" id="inviteEmail-help">The Invite will be emailed to this person</small>
</div>
<small
v-show="isRestricted"
id="inviteEmail-help"
>
The Invite will be emailed to this person
</small>
</div>
<div class="my-4 inline-flex p-0">
<Button
class="p-button p-button-primary mr-3"
@click="invite"
:disabled="inviteLoading"
@click="invite"
>
<font-awesome-icon
icon="fa fa-envelope"
Expand Down
7 changes: 3 additions & 4 deletions frontend/src/services/inviteService.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { appAxios, comsAxios } from './interceptors';

import type { COMSObject, Bucket, User } from '@/types';

const PATH = 'permission/invite';

export default {
Expand Down Expand Up @@ -77,6 +75,7 @@ export default {
try {
// build template
let resourceName, subject, body;
// eslint-disable-next-line max-len
const currentUserEmail = `<a href="mailto:${currentUser.email}" style="color: #1a5a96 !important">${currentUser.email}</a>`;
// alternate templates depending if resource is a file or a folder
if (resourceType === 'object') {
Expand All @@ -93,8 +92,8 @@ export default {
<h2>${currentUserEmail} invited you to access a folder on BCBox</h2>\n
<p>Here's a link to access the folder that ${currentUserEmail} shared with you:</p>`;
}
body = body + `<strong>
<a style="text-align: center; font-size: large; color: #1a5a96" href="${window.location.origin}/invite/{{token}}">
// eslint-disable-next-line max-len
body = body + `<strong><a style="text-align: center; font-size: large; color: #1a5a96" href="${window.location.origin}/invite/{{token}}">
${resourceName }
</a>
</strong><br><br>
Expand Down

0 comments on commit abdb21c

Please sign in to comment.