forked from CenterForOpenScience/angular-osf
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigure-addon.component.html
More file actions
79 lines (75 loc) · 2.95 KB
/
configure-addon.component.html
File metadata and controls
79 lines (75 loc) · 2.95 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<osf-sub-header [title]="'settings.addons.configureAddon.title' | translate" />
<section class="flex flex-column flex-1 bg-white h-full gap-4 p-3 md:p-5">
@if (!isEditMode()) {
<div class="flex flex-column gap-4">
<div class="flex justify-content-between">
<h2 class="align-self-center inline-block">
{{ 'settings.addons.connectAddon.configure' | translate }} {{ addon()?.externalServiceName }}
</h2>
<p-button
[label]="'settings.addons.form.buttons.back' | translate"
severity="info"
[routerLink]="[baseUrl() + '/addons']"
></p-button>
</div>
@if (selectedFolder()) {
<div class="flex flex-column flex-1">
<p-card>
<div class="flex justify-content-between">
<p class="text-lg align-self-center">
{{ 'settings.addons.configureAddon.connectedAccount' | translate }}
<span class="font-bold">{{ addon()?.displayName }}</span>
</p>
<div class="flex gap-2">
<p-button
icon="fas fa-pencil"
text
(click)="toggleEditMode()"
(keydown.enter)="toggleEditMode()"
></p-button>
<p-button
icon="fas fa-trash"
severity="danger"
text
(click)="handleDisconnectAccount()"
(keydown.enter)="handleDisconnectAccount()"
></p-button>
</div>
</div>
<p class="font-normal mt-2">
{{ 'settings.addons.configureAddon.selectedFolder' | translate }}
<span class="font-bold">{{ selectedFolder()?.itemName }}</span>
</p>
</p-card>
</div>
} @else {
<p-skeleton width="100%" height="7.5rem" borderRadius="16" />
}
</div>
} @else {
<section class="flex flex-column gap-5">
<div class="flex justify-content-between">
<h2 class="align-self-center">
{{ 'settings.addons.connectAddon.configure' | translate }} {{ addon()?.externalServiceName }}
</h2>
<p-button
[label]="'settings.addons.form.buttons.back' | translate"
severity="info"
(click)="toggleEditMode()"
(keydown.enter)="toggleEditMode()"
></p-button>
</div>
<osf-folder-selector
[isGoogleFilePicker]="isGoogleDrive()"
[accountId]="addon()?.baseAccountId || ''"
[accountName]="addon()?.displayName || ''"
[operationInvocationResult]="operationInvocation()?.operationResult || []"
[accountNameControl]="accountNameControl"
(operationInvoke)="handleCreateOperationInvocation($event.operationName, $event.itemId)"
[(selectedRootFolderId)]="selectedRootFolderId"
(save)="handleUpdateAddonConfiguration()"
(cancelSelection)="toggleEditMode()"
/>
</section>
}
</section>