Skip to content

Commit

Permalink
fix: remove unnecessary panel disabling via querySelector at vfolder …
Browse files Browse the repository at this point in the history
…invitation panel in summary view page
  • Loading branch information
lizable committed Jan 14, 2025
1 parent 38b29bd commit a1fcfda
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/components/backend-ai-summary-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ export default class BackendAISummary extends BackendAIPage {
}

/**
* Accept invitation and make you can access vfloder.
* Accept invitation and make you can access vfolder.
*
* @param {Event} e - Click the accept button
* @param {any} invitation
Expand All @@ -398,12 +398,7 @@ export default class BackendAISummary extends BackendAIPage {
if (!this.activeConnected) {
return;
}
const panel = e.target.closest('lablup-activity-panel');
try {
panel.setAttribute('disabled', 'true');
panel.querySelectorAll('mwc-button').forEach((btn) => {
btn.setAttribute('disabled', 'true');
});
await globalThis.backendaiclient.vfolder.accept_invitation(invitation.id);
this.notification.text =
_text('summary.AcceptSharedVFolder') + `${invitation.vfolder_name}`;
Expand All @@ -426,13 +421,8 @@ export default class BackendAISummary extends BackendAIPage {
if (!this.activeConnected) {
return;
}
const panel = e.target.closest('lablup-activity-panel');

try {
panel.setAttribute('disabled', 'true');
panel.querySelectorAll('mwc-button').forEach((btn) => {
btn.setAttribute('disabled', 'true');
});
await globalThis.backendaiclient.vfolder.delete_invitation(invitation.id);
this.notification.text =
_text('summary.DeclineSharedVFolder') + `${invitation.vfolder_name}`;
Expand Down

0 comments on commit a1fcfda

Please sign in to comment.