63 lines
1.8 KiB
HTML
63 lines
1.8 KiB
HTML
<p-confirmDialog></p-confirmDialog>
|
|
|
|
<p class="text-lg flex items-center gap-2 px-4 pt-4 pb-2">
|
|
Kobo Sync Settings:
|
|
<i class="pi pi-info-circle text-sky-600"
|
|
pTooltip="Click to view Kobo setup documentation"
|
|
tooltipPosition="right"
|
|
(click)="openKoboDocumentation()"
|
|
style="cursor: pointer;">
|
|
</i>
|
|
</p>
|
|
|
|
@if (hasPermission) {
|
|
<form #koboForm="ngForm" class="px-4 py-2">
|
|
<div class="flex flex-col px-4 py-4 space-y-4">
|
|
<div class="flex flex-col gap-1 max-w-[33rem]">
|
|
<label for="koboToken">Kobo Sync Token</label>
|
|
<div class="flex items-center gap-2">
|
|
<input
|
|
pInputText
|
|
id="koboToken"
|
|
[(ngModel)]="koboToken"
|
|
[type]="showToken ? 'text' : 'password'"
|
|
readonly
|
|
fluid
|
|
name="koboToken"
|
|
/>
|
|
<p-button
|
|
icon="pi pi-copy"
|
|
outlined="true"
|
|
severity="info"
|
|
(onClick)="copyText(koboToken)">
|
|
</p-button>
|
|
<p-button
|
|
[icon]="showToken ? 'pi pi-eye-slash' : 'pi pi-eye'"
|
|
outlined="true"
|
|
severity="info"
|
|
(onClick)="toggleShowToken()">
|
|
</p-button>
|
|
</div>
|
|
</div>
|
|
|
|
<p-button
|
|
icon="pi pi-refresh"
|
|
outlined="true"
|
|
severity="warn"
|
|
label="Regenerate Token"
|
|
(onClick)="confirmRegenerateToken()"
|
|
[disabled]="!credentialsSaved">
|
|
</p-button>
|
|
</div>
|
|
</form>
|
|
} @else {
|
|
<div class="px-4 py-4 m-4 rounded-lg bg-red-700/30 border border-red-600 text-red-200 flex items-center gap-2 max-w-lg">
|
|
<i class="pi pi-lock text-red-400 text-xl"></i>
|
|
<span>
|
|
Access to Kobo sync is restricted.
|
|
<br>
|
|
Please contact your administrator to request permission.
|
|
</span>
|
|
</div>
|
|
}
|