change some icons

This commit is contained in:
Harvey committed 2022-04-29 10:14:19 +08:00
1 parent e2d016c28f
commit 208096f3c7
20 files changed
+302 -216

No files matched your search

@@ -1,4 +1,4 @@
import { append, tooltip } from '../utils';
import { append, tooltip, setStyle } from '../utils';
export default function fullscreenWeb(option) {
return (art) => ({
@@ -11,14 +11,24 @@ export default function fullscreenWeb(option) {
i18n,
} = art;
append($control, icons.fullscreenWeb);
const $fullscreenWebOn = append($control, icons.fullscreenWebOn);
const $fullscreenWebOff = append($control, icons.fullscreenWebOff);
setStyle($fullscreenWebOff, 'display', 'none');
proxy($control, 'click', () => {
art.fullscreenWeb = !art.fullscreenWeb;
});
art.on('fullscreenWeb', (value) => {
tooltip($control, i18n.get(value ? 'Exit Web Fullscreen' : 'Web Fullscreen'));
if (value) {
tooltip($control, i18n.get('Exit Web Fullscreen'));
setStyle($fullscreenWebOn, 'display', 'none');
setStyle($fullscreenWebOff, 'display', 'inline-flex');
} else {
tooltip($control, i18n.get('Web Fullscreen'));
setStyle($fullscreenWebOn, 'display', 'inline-flex');
setStyle($fullscreenWebOff, 'display', 'none');
}
});
},
});