RED-5213 rss cleanup
This commit is contained in:
parent
15f4125c57
commit
da3ab8f491
@ -5,7 +5,7 @@ import { RssService } from '@services/files/rss.service';
|
||||
import { IFile, IRssEntry } from '@red/domain';
|
||||
import { BehaviorSubject, Observable } from 'rxjs';
|
||||
import { saveAs } from 'file-saver';
|
||||
import { tap } from 'rxjs/operators';
|
||||
import { map, tap } from 'rxjs/operators';
|
||||
|
||||
interface RssData {
|
||||
file: IFile;
|
||||
@ -25,9 +25,20 @@ export class RssDialogComponent extends BaseDialogComponent {
|
||||
@Inject(MAT_DIALOG_DATA) readonly data: RssData,
|
||||
) {
|
||||
super(_dialogRef);
|
||||
this.rssData$ = this._rssService
|
||||
.getRSSData(this.data.file.dossierId, this.data.file.fileId)
|
||||
.pipe(tap(entry => this.rssDataSubject$.next(entry)));
|
||||
this.rssData$ = this._rssService.getRSSData(this.data.file.dossierId, this.data.file.fileId).pipe(
|
||||
map(entry => {
|
||||
const mapped = {};
|
||||
for (const key of Object.keys(entry.result)) {
|
||||
const newKey = key.replace(new RegExp('_', 'g'), ' ');
|
||||
mapped[newKey] = entry.result[key];
|
||||
}
|
||||
return {
|
||||
filaName: entry.filaName,
|
||||
result: mapped,
|
||||
};
|
||||
}),
|
||||
tap(entry => this.rssDataSubject$.next(entry)),
|
||||
);
|
||||
}
|
||||
|
||||
export() {
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
*ngIf="configService.values.RSS_ENABLED"
|
||||
[tooltip]="'file-preview.open-rss-view' | translate"
|
||||
class="ml-8"
|
||||
icon="red:rss"
|
||||
icon="red:extract"
|
||||
tooltipPosition="below"
|
||||
></iqser-circle-button>
|
||||
|
||||
|
||||
@ -34,6 +34,7 @@ export class IconsModule {
|
||||
'entries',
|
||||
'exclude-pages',
|
||||
'excluded-page',
|
||||
'extract',
|
||||
'exit-fullscreen',
|
||||
'folder',
|
||||
'fullscreen',
|
||||
|
||||
10
apps/red-ui/src/assets/icons/general/extract.svg
Normal file
10
apps/red-ui/src/assets/icons/general/extract.svg
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 25.4.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 100 100" style="enable-background:new 0 0 100 100;" xml:space="preserve">
|
||||
<g fill="currentColor">
|
||||
<polygon class="st0" points="72.8,90 12.8,90 12.8,10 57.8,10 57.8,0 38.2,0 2.8,0 2.8,100 82.8,100 82.8,59.3 72.8,59.3 "/>
|
||||
<polygon class="st0" points="78.9,0 59.5,18 64.6,23.2 74.2,14 74.2,39.6 38.2,39.6 38.2,59 46.6,59 46.8,48 82.5,48 82.5,14
|
||||
92.1,23.2 97.2,18 "/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 652 B |
Loading…
x
Reference in New Issue
Block a user