Merge pull request #3965 from crazyserver/MOBILE-4329

Mobile 4329
main
Dani Palou 2024-03-11 14:58:19 +01:00 committed by GitHub
commit f68a9b10fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 85 additions and 64 deletions

View File

@ -1684,9 +1684,10 @@
"core.dataprivacy.datarequests": "tool_dataprivacy",
"core.dataprivacy.daterequested": "tool_dataprivacy",
"core.dataprivacy.deletemyaccount": "tool_dataprivacy",
"core.dataprivacy.download": "tool_dataprivacy",
"core.dataprivacy.message": "tool_dataprivacy",
"core.dataprivacy.newrequest": "tool_dataprivacy",
"core.dataprivacy.nodatarequests": "tool_dataprivacy",
"core.dataprivacy.nopersonaldatarequests": "tool_dataprivacy",
"core.dataprivacy.pluginname": "tool_dataprivacy",
"core.dataprivacy.replyto": "tool_dataprivacy",
"core.dataprivacy.requestactions": "tool_dataprivacy",

View File

@ -14,3 +14,5 @@
// Routing.
export const CORE_DATAPRIVACY_PAGE_NAME = 'dataprivacy';
export const CORE_DATAPRIVACY_FEATURE_NAME = 'CoreUserDelegate_CoreDataPrivacy';

View File

@ -6,9 +6,10 @@
"datarequests": "Data requests",
"daterequested": "Date requested",
"deletemyaccount": "Delete my account",
"download": "Download",
"message": "Message",
"newrequest": "New request",
"nodatarequests": "There are no data requests",
"nopersonaldatarequests": "You don't have any personal data requests",
"pluginname": "Data privacy",
"replyto": "Reply to",
"requestactions": "Actions",

View File

@ -35,24 +35,27 @@
</ion-row>
</ion-label>
</ion-item>
<ion-item button [detail]="false" *ngIf="request.requestedbyuser" core-user-link [userId]="request.requestedbyuser.id"
[attr.aria-label]="request.requestedbyuser.fullname" class="ion-text-wrap">
<ion-item *ngIf="request.requestedbyuser" class="ion-text-wrap">
<ion-label>
<p class="item-heading">{{ 'core.dataprivacy.requestby' | translate }}</p>
<p>{{ request.requestedbyuser.fullname }}</p>
</ion-label>
</ion-item>
<ion-item class="ion-text-wrap" [lines]="request.canCancel ? 'full' : 'none'">
<ion-item class="ion-text-wrap" [lines]="request.canCancel || request.downloadlink ? 'full' : 'none'">
<ion-label>
<p class="item-heading">{{ 'core.dataprivacy.message' | translate }}</p>
<p><core-format-text [text]="request.messagehtml" /></p>
</ion-label>
</ion-item>
<ion-item class="ion-text-wrap ion-text-end" *ngIf="request.canCancel">
<ion-item class="ion-text-wrap ion-text-end" *ngIf="request.canCancel || request.downloadlink">
<ion-label>
<ion-button fill="outline" expand="block" (click)="cancelRequest(request.id)">
<ion-button fill="outline" expand="block" (click)="cancelRequest(request.id)" *ngIf="request.canCancel">
{{ 'core.dataprivacy.cancelrequest' | translate }}
</ion-button>
<ion-button fill="outline" expand="block" *ngIf="request.downloadlink" [href]="request.downloadlink" core-link
[showBrowserWarning]="false">
{{ 'core.dataprivacy.download' | translate }}
</ion-button>
</ion-label>
</ion-item>
</ion-card>
@ -90,12 +93,17 @@
<ion-button fill="outline" size="small" (click)="cancelRequest(request.id)" *ngIf="request.canCancel">
{{ 'core.dataprivacy.cancelrequest' | translate }}
</ion-button>
<ion-button fill="outline" size="small" *ngIf="request.downloadlink" [href]="request.downloadlink" core-link
[showBrowserWarning]="false">
{{ 'core.dataprivacy.download' | translate }}
</ion-button>
</td>
</tr>
</tbody>
</table>
<core-empty-box *ngIf="!requests.length" icon="fas-bell-concierge" [message]="'core.dataprivacy.nodatarequests' | translate" />
<core-empty-box *ngIf="!requests.length" icon="fas-bell-concierge"
[message]="'core.dataprivacy.nopersonaldatarequests' | translate" />
<div collapsible-footer *ngIf="loaded" slot="fixed">
<div class="list-item-limited-width adaptable-buttons-row">

View File

@ -375,4 +375,5 @@ export type CoreDataPrivacyRequest = {
approvedeny?: boolean; // Approvedeny.
allowfiltering?: boolean; // Allowfiltering.
canmarkcomplete?: boolean; // Canmarkcomplete.
downloadlink?: string; // Downloadlink.
};

View File

@ -16,7 +16,7 @@ import { Injectable } from '@angular/core';
import { Params } from '@angular/router';
import { CoreContentLinksHandlerBase } from '@features/contentlinks/classes/base-handler';
import { CoreContentLinksAction } from '@features/contentlinks/services/contentlinks-delegate';
import { CORE_DATAPRIVACY_PAGE_NAME } from '@features/dataprivacy/constants';
import { CORE_DATAPRIVACY_FEATURE_NAME, CORE_DATAPRIVACY_PAGE_NAME } from '@features/dataprivacy/constants';
import { CoreNavigator } from '@services/navigator';
import { makeSingleton } from '@singletons';
import { CoreDataPrivacy } from '../dataprivacy';
@ -29,6 +29,7 @@ export class CoreDataPrivacyCreateDataRequestLinkHandlerService extends CoreCont
name = 'CoreDataPrivacyCreateDataRequestLinkHandler';
pattern = /\/admin\/tool\/dataprivacy\/createdatarequest\.php.*([?&]type=\d+)/;
featureName = CORE_DATAPRIVACY_FEATURE_NAME;
/**
* @inheritdoc

View File

@ -15,7 +15,7 @@
import { Injectable } from '@angular/core';
import { CoreContentLinksHandlerBase } from '@features/contentlinks/classes/base-handler';
import { CoreContentLinksAction } from '@features/contentlinks/services/contentlinks-delegate';
import { CORE_DATAPRIVACY_PAGE_NAME } from '@features/dataprivacy/constants';
import { CORE_DATAPRIVACY_FEATURE_NAME, CORE_DATAPRIVACY_PAGE_NAME } from '@features/dataprivacy/constants';
import { CoreNavigator } from '@services/navigator';
import { makeSingleton } from '@singletons';
import { CoreDataPrivacy } from '../dataprivacy';
@ -28,6 +28,7 @@ export class CoreDataPrivacyDataRequestsLinkHandlerService extends CoreContentLi
name = 'CoreDataPrivacyDataRequestsLinkHandler';
pattern = /\/admin\/tool\/dataprivacy\/mydatarequests\.php/;
featureName = CORE_DATAPRIVACY_FEATURE_NAME;
/**
* @inheritdoc

View File

@ -58,5 +58,6 @@ Feature: Data export and delete from the privacy API
Then I should find "Approved" near "Export all of my personal data" in the app
When I run all adhoc tasks
And I pull to refresh in the app
And I should find "Download ready" near "Export all of my personal data" in the app
# TODO: Add download link and test it.
Then I should find "Download ready" near "Export all of my personal data" in the app
And I press "Download" in the app
And the app should have opened a browser tab with url "$WWWROOTPATTERN"

View File

@ -22,7 +22,7 @@
</ng-container>
<ng-container *ngIf="!isCardLayout">
<table class="core-table">
<table class="core-table x-scrollable">
<thead>
<tr>
<th *ngFor="let header of state.report.data.headers">

View File

@ -6,8 +6,6 @@
}
table {
overflow-x: auto;
th, td {
min-width: 200px;
}

View File

@ -2023,6 +2023,10 @@ table.core-table {
margin: 1em auto;
color: var(--text-color);
&.x-scrollable {
overflow-x: auto;
display: block;
}
thead th {
vertical-align: bottom;
@ -2031,9 +2035,14 @@ table.core-table {
background-color: var(--core-table-header-background);
}
tbody th {
tbody {
th {
font-weight: normal;
}
td {
font-size: 16px;
}
}
th, td {
padding: 8px;
@ -2045,10 +2054,6 @@ table.core-table {
border-bottom: 1px solid var(--core-table-border-color);
}
tbody td {
font-size: 16px;
}
.odd {
--cell-background: var(--core-table-odd-cell-background);
--cell-hover: var(--core-table-odd-cell-hover);
@ -2069,7 +2074,8 @@ table.core-table {
}
}
tbody.auto-striped tr:nth-child(odd) {
tbody.auto-striped {
tr:nth-child(odd) {
background-color: var(--core-table-odd-cell-background);
&:hover {
@ -2077,13 +2083,14 @@ table.core-table {
}
}
tbody.auto-striped tr:nth-child(even) {
tr:nth-child(even) {
background-color: var(--core-table-even-cell-background);
&:hover {
background-color: var(--core-table-even-cell-hover);
}
}
}
.ion-no-border {
border: 0 !important;