Merge branch 'add-public-full-res-options' of https://github.com/rhyst/nextcloud-memories into rhyst-add-public-full-res-options
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/823/head
commit
66c5baa964
|
@ -21,6 +21,10 @@ return [
|
||||||
// Places database type identifier
|
// Places database type identifier
|
||||||
'memories.gis_type' => -1,
|
'memories.gis_type' => -1,
|
||||||
|
|
||||||
|
// Default viewer high resolution image loading condition
|
||||||
|
// Valid values: 'always' | 'zoom' | 'never'
|
||||||
|
'memories.viewer.high_res_cond' => 'zoom',
|
||||||
|
|
||||||
// Disable transcoding
|
// Disable transcoding
|
||||||
'memories.vod.disable' => true,
|
'memories.vod.disable' => true,
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,7 @@
|
||||||
:checked.sync="config.full_res_on_zoom"
|
:checked.sync="config.full_res_on_zoom"
|
||||||
@update:checked="updateFullResOnZoom"
|
@update:checked="updateFullResOnZoom"
|
||||||
type="switch"
|
type="switch"
|
||||||
|
:disabled="!config.override_global_full_res"
|
||||||
>
|
>
|
||||||
{{ t('memories', 'Load full size image on zoom') }}
|
{{ t('memories', 'Load full size image on zoom') }}
|
||||||
</NcCheckboxRadioSwitch>
|
</NcCheckboxRadioSwitch>
|
||||||
|
@ -66,6 +67,7 @@
|
||||||
<NcCheckboxRadioSwitch
|
<NcCheckboxRadioSwitch
|
||||||
:checked.sync="config.full_res_always"
|
:checked.sync="config.full_res_always"
|
||||||
@update:checked="updateFullResAlways"
|
@update:checked="updateFullResAlways"
|
||||||
|
:disabled="!config.override_global_full_res"
|
||||||
type="switch"
|
type="switch"
|
||||||
>
|
>
|
||||||
{{ t('memories', 'Always load full size image (not recommended)') }}
|
{{ t('memories', 'Always load full size image (not recommended)') }}
|
||||||
|
|
|
@ -30,6 +30,9 @@ export type ISystemConfig = {
|
||||||
preview_max_y: number;
|
preview_max_y: number;
|
||||||
preview_max_memory: number;
|
preview_max_memory: number;
|
||||||
preview_max_filesize_image: number;
|
preview_max_filesize_image: number;
|
||||||
|
|
||||||
|
'memories.global_full_res_on_zoom': boolean;
|
||||||
|
'memories.global_full_res_always': boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type IBinaryStatus = 'ok' | 'not_found' | 'not_executable' | 'test_ok' | string;
|
export type IBinaryStatus = 'ok' | 'not_found' | 'not_executable' | 'test_ok' | string;
|
||||||
|
|
|
@ -82,6 +82,37 @@
|
||||||
:value="String(config['preview_max_filesize_image'])"
|
:value="String(config['preview_max_filesize_image'])"
|
||||||
@change="update('preview_max_filesize_image', Number($event.target.value))"
|
@change="update('preview_max_filesize_image', Number($event.target.value))"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
{{
|
||||||
|
t(
|
||||||
|
'memories',
|
||||||
|
'You can set the image viewer to always request a full size image when an image is opened, or to open the full size image when an image is zoomed. Users can override this setting.'
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
{{
|
||||||
|
t(
|
||||||
|
'memories',
|
||||||
|
'Always loading the full size image is not recommended if the images require transcoding (i.e. heic images) because it will cause a large amount of CPU usage.'
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<NcCheckboxRadioSwitch
|
||||||
|
:checked.sync="config['memories.global_full_res_on_zoom']"
|
||||||
|
@update:checked="update('memories.global_full_res_on_zoom')"
|
||||||
|
type="switch"
|
||||||
|
>
|
||||||
|
{{ t('memories', 'Load full size image on zoom') }}
|
||||||
|
</NcCheckboxRadioSwitch>
|
||||||
|
|
||||||
|
<NcCheckboxRadioSwitch
|
||||||
|
:checked.sync="config['memories.global_full_res_always']"
|
||||||
|
@update:checked="update('memories.global_full_res_always')"
|
||||||
|
type="switch"
|
||||||
|
>
|
||||||
|
{{ t('memories', 'Always load full size image') }}
|
||||||
|
</NcCheckboxRadioSwitch>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -808,7 +808,14 @@ export default defineComponent({
|
||||||
: utils.isLocalPhoto(photo)
|
: utils.isLocalPhoto(photo)
|
||||||
? nativex.API.IMAGE_FULL(photo.fileid)
|
? nativex.API.IMAGE_FULL(photo.fileid)
|
||||||
: API.IMAGE_DECODABLE(photo.fileid, photo.etag);
|
: API.IMAGE_DECODABLE(photo.fileid, photo.etag);
|
||||||
const fullLoadCond = this.config.full_res_always ? 'always' : this.config.full_res_on_zoom ? 'zoom' : 'never';
|
|
||||||
|
const fullResOnZoom = this.config.override_global_full_res
|
||||||
|
? this.config.full_res_on_zoom
|
||||||
|
: this.config.global_full_res_on_zoom;
|
||||||
|
const fullResAlways = this.config.override_global_full_res
|
||||||
|
? this.config.full_res_always
|
||||||
|
: this.config.global_full_res_always;
|
||||||
|
const fullLoadCond = fullResAlways ? 'always' : fullResOnZoom ? 'zoom' : 'never';
|
||||||
|
|
||||||
return {
|
return {
|
||||||
src: previewUrl,
|
src: previewUrl,
|
||||||
|
|
Loading…
Reference in New Issue