File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<template >
2- <div ref =" editor" class =" viewer__image-editor" />
2+ <div ref =" editor" class =" viewer__image-editor" v-bind = " themeDataAttr " />
33</template >
44<script >
55import FilerobotImageEditor from ' filerobot-image-editor'
@@ -84,12 +84,29 @@ export default {
8484 },
8585 }
8686 },
87+
8788 defaultSavedImageName () {
8889 return basename (this .src , extname (this .src ))
8990 },
9091 defaultSavedImageType () {
9192 return extname (this .src ).slice (1 ) || ' jpeg'
9293 },
94+
95+ hasHighContrastEnabled () {
96+ const themes = OCA ? .Theming ? .enabledThemes || []
97+ return themes .find (theme => theme .indexOf (' highcontrast' ) !== - 1 )
98+ },
99+
100+ themeDataAttr () {
101+ if (this .hasHighContrastEnabled ) {
102+ return {
103+ ' data-theme-dark-highcontrast' : true ,
104+ }
105+ }
106+ return {
107+ ' data-theme-dark' : true ,
108+ }
109+ }
93110 },
94111
95112 mounted () {
You can’t perform that action at this time.
0 commit comments