+1
-1
src-tauri/src/frontend_calls/config.rs
+1
-1
src-tauri/src/frontend_calls/config.rs
+8
src-tauri/src/frontend_calls/get_os.rs
+8
src-tauri/src/frontend_calls/get_os.rs
+2
-1
src-tauri/src/frontend_calls/mod.rs
+2
-1
src-tauri/src/frontend_calls/mod.rs
-2
src-tauri/src/util/handle_uri_proto.rs
-2
src-tauri/src/util/handle_uri_proto.rs
+6
-1
src/Components/PhotoList.tsx
+6
-1
src/Components/PhotoList.tsx
···
64
64
let filterType: FilterType = FilterType.USER;
65
65
let filter = '';
66
66
67
+
let os = "unknown";
68
+
(async () => {
69
+
os = await invoke('get_os');
70
+
})();
71
+
67
72
let filteredPhotos: Photo[] = [];
68
73
69
74
let closeWithKey = ( e: KeyboardEvent ) => {
···
168
173
this.imageEl = document.createElement('img');
169
174
this.imageEl.crossOrigin = 'anonymous';
170
175
171
-
this.imageEl.src = "photo://localhost" + photoPath + this.path + "?downscale";
176
+
this.imageEl.src = os === "windows" ? "http://photo.localhost/" : "photo://localhost" + photoPath + this.path + "?downscale";
172
177
173
178
this.imageEl.onload = () => {
174
179
this.image!.width = this.scaledWidth!;
+1
-1
src/Components/PhotoViewer.tsx
+1
-1
src/Components/PhotoViewer.tsx
···
262
262
if(!photoPath)
263
263
photoPath = await invoke('get_user_photos_path') + '/';
264
264
265
-
imageViewer.src = 'photo://localhost' + (photoPath + props.currentPhotoView().path).split('\\').join('/') + "?full";
265
+
imageViewer.src = await invoke('get_os') === "windows" ? "http://photo.localhost/" : 'photo://localhost' + (photoPath + props.currentPhotoView().path).split('\\').join('/') + "?full";
266
266
imageViewer.crossOrigin = 'anonymous';
267
267
})();
268
268