Skip to content

Commit 434e91b

Browse files
committed
Use new helper functions in QCG
1 parent f24fab1 commit 434e91b

File tree

4 files changed

+4
-23
lines changed

4 files changed

+4
-23
lines changed

QualityControl/public/Model.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -315,16 +315,6 @@ export default class Model extends Observable {
315315
this.filterModel.clearRunsModeInterval();
316316
}
317317

318-
/**
319-
* Method to check if connection is secure to enable certain improvements
320-
* e.g navigator.clipboard, notifications, service workers
321-
* @returns {boolean} - whether window is in secure context
322-
* @deprecated use `isContextSecure` from `public/common/utils.js`
323-
*/
324-
isContextSecure() {
325-
return window.isSecureContext;
326-
}
327-
328318
/**
329319
* Getters / Setters
330320
*/

QualityControl/public/common/object/objectInfoCard.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
* or submit itself to any jurisdiction.p
1313
*/
1414

15-
import { h } from '/js/src/index.js';
16-
import { camelToTitleCase, copyToClipboard, isContextSecure, prettyFormatDate } from './../utils.js';
15+
import { h, isContextSecure } from '/js/src/index.js';
16+
import { camelToTitleCase, copyToClipboard, prettyFormatDate } from './../utils.js';
1717

1818
const SPECIFIC_KEY_LABELS = {
1919
id: 'ID (etag)',

QualityControl/public/common/utils.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,6 @@ export function hasMinimumRoleAccess(userRoles, requiredRole) {
139139
return userRoles.some((role) => isUserRoleSufficient(role, requiredRole));
140140
}
141141

142-
/**
143-
* Method to check if connection is secure to enable certain improvements
144-
* e.g navigator.clipboard, notifications, service workers
145-
* @returns {boolean} - whether window is in secure context
146-
*/
147-
export function isContextSecure() {
148-
return window.isSecureContext;
149-
}
150-
151142
/**
152143
* Asynchronously writes the given text value to the system clipboard
153144
* @param {string} value - The text string to be copied to the clipboard

QualityControl/public/pages/objectView/components/header.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* or submit itself to any jurisdiction.
1313
*/
1414

15-
import { h, iconBook, iconArrowThickLeft } from '/js/src/index.js';
15+
import { h, iconBook, iconArrowThickLeft, isContextSecure } from '/js/src/index.js';
1616
import { filterPanelToggleButton } from '../../../common/filters/filterViews.js';
1717

1818
/**
@@ -30,7 +30,7 @@ export const objectViewHeader = (model) => {
3030
rightCol: h('.w-25.flex-row.flex-grow.items-center.p2.g2.justify-end', [
3131
getBackToQCGButton(objectViewModel, router),
3232
filterPanelToggleButton(filterModel),
33-
model.isContextSecure() && h('.flex-row', getCopyURLToClipboardButton(model)),
33+
isContextSecure() && h('.flex-row', getCopyURLToClipboardButton(model)),
3434
]),
3535
};
3636
};

0 commit comments

Comments
 (0)