@nextcloud/vue
Version:
Nextcloud vue components
1 lines • 1.71 kB
Source Map (JSON)
{"version":3,"file":"isMobile.mjs","sources":["../../src/mixins/isMobile/index.js"],"sourcesContent":["/**\n * @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport { IsMobileState } from '../../utils/IsMobileState.js'\n\nexport default {\n\tdata() {\n\t\treturn {\n\t\t\tisMobile: false,\n\t\t}\n\t},\n\tmounted() {\n\t\tIsMobileState.$on('changed', this.onIsMobileChanged)\n\t\tthis.isMobile = IsMobileState.isMobile\n\t},\n\tbeforeDestroy() {\n\t\tIsMobileState.$off('changed', this.onIsMobileChanged)\n\t},\n\tmethods: {\n\t\tonIsMobileChanged(val) {\n\t\t\tthis.isMobile = val\n\t\t},\n\t},\n}\n"],"names":["isMobile","IsMobileState","val"],"mappings":";AAwBA,MAAeA,IAAA,EACd,OAAO;AACN,SAAO,EACN,UAAU,GACV;AACD,GACD,UAAU;AACTC,IAAc,IAAI,WAAW,KAAK,iBAAiB,GACnD,KAAK,WAAWA,EAAc;AAC9B,GACD,gBAAgB;AACfA,IAAc,KAAK,WAAW,KAAK,iBAAiB;AACpD,GACD,SAAS,EACR,kBAAkBC,GAAK;AACtB,OAAK,WAAWA;AAChB,EACD,EACF;"}