nx: full load for viewer
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/653/head
parent
839de2e646
commit
12f44d94ca
|
@ -168,6 +168,7 @@ import { getDownloadLink } from '../../services/DavRequests';
|
|||
import { API } from '../../services/API';
|
||||
import * as dav from '../../services/DavRequests';
|
||||
import * as utils from '../../services/Utils';
|
||||
import * as nativex from '../../native';
|
||||
|
||||
import ImageEditor from './ImageEditor.vue';
|
||||
import PhotoSwipe, { PhotoSwipeOptions } from 'photoswipe';
|
||||
|
@ -769,7 +770,11 @@ export default defineComponent({
|
|||
}
|
||||
|
||||
// Get full image URL
|
||||
const fullUrl = isvideo ? null : API.IMAGE_DECODABLE(photo.fileid, photo.etag);
|
||||
const fullUrl = isvideo
|
||||
? null
|
||||
: photo.flag & this.c.FLAG_IS_LOCAL
|
||||
? nativex.NATIVE_URL_FULL(photo.fileid)
|
||||
: API.IMAGE_DECODABLE(photo.fileid, photo.etag);
|
||||
const fullLoadCond = this.config.full_res_always ? 'always' : this.config.full_res_on_zoom ? 'zoom' : 'never';
|
||||
|
||||
return {
|
||||
|
|
|
@ -142,3 +142,13 @@ export function IS_NATIVE_URL(url: string) {
|
|||
export function NATIVE_URL_PREVIEW(fileid: number) {
|
||||
return `nativex://preview/${fileid}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a full sized URL for a native file ID.
|
||||
*
|
||||
* @param fileid Local file ID returned by native interface
|
||||
* @returns native URI
|
||||
*/
|
||||
export function NATIVE_URL_FULL(fileid: number) {
|
||||
return `nativex://full/${fileid}`;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue