Skip to content

Commit cc45c9e

Browse files
committed
Frontend: Remove old todo comments from component/viewer.vue #1307 photoprism#3168
Signed-off-by: Michael Mayer <[email protected]>
1 parent f53b7e8 commit cc45c9e

File tree

1 file changed

+6
-21
lines changed

1 file changed

+6
-21
lines changed

frontend/src/component/viewer.vue

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,6 @@ import Thumb from "model/thumb";
4747
import { Photo } from "model/photo";
4848
import * as media from "common/media";
4949
50-
/*
51-
TODO: All previously available features and controls must be preserved in the new hybrid photo/video viewer:
52-
1. Some of the controls that the old viewer had are still missing e.g. "play slideshow".
53-
2. The already added controls might need further improvements (e.g. (a) the sidebar toggle button (info icon) shows
54-
the sidebar, but the functionality there is not implemented yet, (b) the zoom doesn't load a larger version
55-
of the image yet).
56-
3. Finally, after the refactoring/upgrade, (a) the old/unused code (e.g. for the separate video player) needs
57-
to be removed and (b) everything needs to be thoroughly tested on all major browsers and mobile devices.
58-
*/
5950
export default {
6051
name: "PViewer",
6152
data() {
@@ -246,11 +237,6 @@ export default {
246237
});
247238
},
248239
getItemData(el, i) {
249-
/*
250-
TODO: Rendering of slides needs to be improved to allow dynamic zooming (loading higher resolution thumbs
251-
depending on zoom level and screen resolution).
252-
*/
253-
254240
// Get the current slide model data.
255241
const model = this.models[i];
256242
@@ -565,13 +551,13 @@ export default {
565551
// Adds PhotoSwipe lightbox controls, see https://photoswipe.com/adding-ui-elements/.
566552
addLightboxControls() {
567553
const lightbox = this.lightbox;
568-
// TODO: The same controls as with PhotoSwipe 4 should be usable/available!
554+
555+
// Add a sidebar toggle button only if the window is large enough.
556+
// TODO: Proof-of-concept only, the sidebar needs to be fully implemented before removing the featDevelop check.
557+
// TODO: Once this is fully implemented, remove the "this.experimental" flag check below.
558+
// IDEA: We can later try to add styles that display the sidebar at the bottom
559+
// instead of on the side, to allow use on mobile devices.
569560
lightbox.on("uiRegister", () => {
570-
// Add a sidebar toggle button only if the window is large enough.
571-
// TODO: Proof-of-concept only, the sidebar needs to be fully implemented before removing the featDevelop check.
572-
// TODO: Once this is fully implemented, remove the "this.experimental" flag check below.
573-
// IDEA: We can later try to add styles that display the sidebar at the bottom
574-
// instead of on the side, to allow use on mobile devices.
575561
if (this.featDevelop && this.canEdit && window.innerWidth > this.mobileBreakpoint) {
576562
lightbox.pswp.ui.registerElement({
577563
name: "sidebar-button",
@@ -744,7 +730,6 @@ export default {
744730
caption += `<p>${Util.encodeHTML(model.Description)}</p>`;
745731
}
746732
747-
// TODO: Perform SECURITY tests to see if ANY unwanted code can be injected.
748733
return Util.sanitizeHtml(caption);
749734
},
750735
onShow() {

0 commit comments

Comments
 (0)