nextcloud/apps/settings/js/vue-settings-apps-9dd3296e8...

2 lines
44 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window.webpackJsonpSettings=window.webpackJsonpSettings||[]).push([[2],{602:function(t,n,e){"use strict";var a=e(72),s=e.n(a),i=e(73),r=e.n(i)()(s.a);r.push([t.i,"\n.force[data-v-5a074e36] {\n\tbackground: var(--color-main-background);\n\tborder-color: var(--color-error);\n\tcolor: var(--color-error);\n}\n.force[data-v-5a074e36]:hover,\n.force[data-v-5a074e36]:active {\n\tbackground: var(--color-error);\n\tborder-color: var(--color-error) !important;\n\tcolor: var(--color-main-background);\n}\n","",{version:3,sources:["webpack://./apps/settings/src/components/AppList/AppItem.vue"],names:[],mappings:";AAmLA;CACA,wCAAA;CACA,gCAAA;CACA,yBAAA;AACA;AACA;;CAEA,8BAAA;CACA,2CAAA;CACA,mCAAA;AACA",sourcesContent:['\x3c!--\n - @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license GNU AGPL version 3 or any later version\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 --\x3e\n\n<template>\n\t<div class="section" :class="{ selected: isSelected }" @click="showAppDetails">\n\t\t<div class="app-image app-image-icon" @click="showAppDetails">\n\t\t\t<div v-if="(listView && !app.preview) || (!listView && !screenshotLoaded)" class="icon-settings-dark" />\n\n\t\t\t<svg v-else-if="listView && app.preview"\n\t\t\t\twidth="32"\n\t\t\t\theight="32"\n\t\t\t\tviewBox="0 0 32 32">\n\t\t\t\t<defs><filter :id="filterId"><feColorMatrix in="SourceGraphic" type="matrix" values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0" /></filter></defs>\n\t\t\t\t<image x="0"\n\t\t\t\t\ty="0"\n\t\t\t\t\twidth="32"\n\t\t\t\t\theight="32"\n\t\t\t\t\tpreserveAspectRatio="xMinYMin meet"\n\t\t\t\t\t:filter="filterUrl"\n\t\t\t\t\t:xlink:href="app.preview"\n\t\t\t\t\tclass="app-icon" />\n\t\t\t</svg>\n\n\t\t\t<img v-if="!listView && app.screenshot && screenshotLoaded" :src="app.screenshot" width="100%">\n\t\t</div>\n\t\t<div class="app-name" @click="showAppDetails">\n\t\t\t{{ app.name }}\n\t\t</div>\n\t\t<div v-if="!listView" class="app-summary">\n\t\t\t{{ app.summary }}\n\t\t</div>\n\t\t<div v-if="listView" class="app-version">\n\t\t\t<span v-if="app.version">{{ app.version }}</span>\n\t\t\t<span v-else-if="app.appstoreData.releases[0].version">{{ app.appstoreData.releases[0].version }}</span>\n\t\t</div>\n\n\t\t<div class="app-level">\n\t\t\t<span v-if="app.level === 300"\n\t\t\t\tv-tooltip.auto="t(\'settings\', \'This app is supported via your current Nextcloud subscription.\')"\n\t\t\t\tclass="supported icon-checkmark-color">\n\t\t\t\t{{ t(\'settings\', \'Supported\') }}</span>\n\t\t\t<span v-if="app.level === 200"\n\t\t\t\tv-tooltip.auto="t(\'settings\', \'Featured apps are developed by and within the community. They offer central functionality and are ready for production use.\')"\n\t\t\t\tclass="official icon-checkmark">\n\t\t\t\t{{ t(\'settings\', \'Featured\') }}</span>\n\t\t\t<AppScore v-if="hasRating && !listView" :score="app.score" />\n\t\t</div>\n\n\t\t<div class="actions">\n\t\t\t<div v-if="app.error" class="warning">\n\t\t\t\t{{ app.error }}\n\t\t\t</div>\n\t\t\t<div v-if="isLoading" class="icon icon-loading-small" />\n\t\t\t<input v-if="app.update"\n\t\t\t\tclass="update primary"\n\t\t\t\ttype="button"\n\t\t\t\t:value="t(\'settings\', \'Update to {update}\', {update:app.update})"\n\t\t\t\t:disabled="installing || isLoading"\n\t\t\t\t@click.stop="update(app.id)">\n\t\t\t<input v-if="app.canUnInstall"\n\t\t\t\tclass="uninstall"\n\t\t\t\ttype="button"\n\t\t\t\t:value="t(\'settings\', \'Remove\')"\n\t\t\t\t:disabled="installing || isLoading"\n\t\t\t\t@click.stop="remove(app.id)">\n\t\t\t<input v-if="app.active"\n\t\t\t\tclass="enable"\n\t\t\t\ttype="button"\n\t\t\t\t:value="t(\'settings\',\'Disable\')"\n\t\t\t\t:disabled="installing || isLoading"\n\t\t\t\t@click.stop="disable(app.id)">\n\t\t\t<input v-if="!app.active && (app.canInstall || app.isCompatible)"\n\t\t\t\tv-tooltip.auto="enableButtonTooltip"\n\t\t\t\tclass="enable"\n\t\t\t\ttype="button"\n\t\t\t\t:value="enableButtonText"\n\t\t\t\t:disabled="!app.canInstall || installing || isLoading"\n\t\t\t\t@click.stop="enable(app.id)">\n\t\t\t<input v-else-if="!app.active"\n\t\t\t\tv-tooltip.auto="forceEnableButtonTooltip"\n\t\t\t\tclass="enable force"\n\t\t\t\ttype="button"\n\t\t\t\t:value="forceEnableButtonText"\n\t\t\t\t:disabled="installing || isLoading"\n\t\t\t\t@click.stop="forceEnable(app.id)">\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport AppScore from \'./AppScore\'\nimport AppManagement from \'../../mixins/AppManagement\'\nimport SvgFilterMixin from \'../SvgFilterMixin\'\n\nexport default {\n\tname: \'AppItem\',\n\tcomponents: {\n\t\tAppScore,\n\t},\n\tmixins: [AppManagement, SvgFilterMixin],\n\tprops: {\n\t\tapp: {},\n\t\tcategory: {},\n\t\tlistView: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: true,\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tisSelected: false,\n\t\t\tscrolled: false,\n\t\t\tscreenshotLoaded: false,\n\t\t}\n\t},\n\tcomputed: {\n\t\thasRating() {\n\t\t\treturn this.app.appstoreData && this.app.appstoreData.ratingNumOverall > 5\n\t\t},\n\t},\n\twatch: {\n\t\t\'$route.params.id\'(id) {\n\t\t\tthis.isSelected = (this.app.id === id)\n\t\t},\n\t},\n\tmounted() {\n\t\tthis.isSelected = (this.app.id === this.$route.params.id)\n\t\tif (this.app.screenshot) {\n\t\t\tconst image = new Image()\n\t\t\timage.onload = (e) => {\n\t\t\t\tthis.screenshotLoaded = true\n\t\t\t}\n\t\t\timage.src = this.app.screenshot\n\t\t}\n\t},\n\twatchers: {\n\n\t},\n\tmethods: {\n\t\tasync showAppDetails(event) {\n\t\t\tif (event.currentTarget.tagName === \'INPUT\' || event.currentTarget.tagName === \'A\') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tawait this.$router.push({\n\t\t\t\t\tname: \'apps-details\',\n\t\t\t\t\tparams: { category: this.category, id: this.app.id },\n\t\t\t\t})\n\t\t\t} catch (e) {\n\t\t\t\t// we already view this app\n\t\t\t}\n\t\t},\n\t\tprefix(prefix, content) {\n\t\t\treturn prefix + \'_\' + content\n\t\t},\n\t},\n}\n<\/script>\n\n<style scoped>\n\t.force {\n\t\tbackground: var(--color-main-background);\n\t\tborder-color: var(--color-error);\n\t\tcolor: var(--color-error);\n\t}\n\t.force:hover,\n\t.force:active {\n\t\tbackground: var(--color-error);\n\t\tborder-color: var(--color-error) !important;\n\t\tcolor: var(--color-main-background);\n\t}\n</style>\n'],sourceRoot:""}]),n.a=r},607:function(t,n,e){"use strict";var a=e(72),s=e.n(a),i=e(73),r=e.n(i)()(s.a);r.push([t.i,".settings-markdown[data-v-6a5af116] h1,.settings-markdown[data-v-6a5af116] h2,.settings-markdown[data-v-6a5af116] h3,.settings-markdown[data-v-6a5af116] h4,.settings-markdown[data-v-6a5af116] h5,.settings-markdown[data-v-6a5af116] h6{font-weight:600;line-height:120%;margin-top:24px;margin-bottom:12px;color:var(--color-main-text)}.settings-markdown[data-v-6a5af116] h1{font-size:36px;margin-top:48px}.settings-markdown[data-v-6a5af116] h2{font-size:28px;margin-top:48px}.settings-markdown[data-v-6a5af116] h3{font-size:24px}.settings-markdown[data-v-6a5af116] h4{font-size:21px}.settings-markdown[data-v-6a5af116] h5{font-size:17px}.settings-markdown[data-v-6a5af116] h6{font-size:var(--default-font-size)}.settings-markdown[data-v-6a5af116] pre{white-space:pre;overflow-x:auto;background-color:var(--color-background-dark);border-radius:var(--border-radius);padding:1em 1.3em;margin-bottom:1em}.settings-markdown[data-v-6a5af116] p code{background-color:var(--color-background-dark);border-radius:var(--border-radius);padding:.1em .3em}.settings-markdown[data-v-6a5af116] li{position:relative}.settings-markdown[data-v-6a5af116] ul,.settings-markdown[data-v-6a5af116] ol{padding-left:10px;margin-left:10px}.settings-markdown[data-v-6a5af116] ul li{list-style-type:disc}.settings-markdown[data-v-6a5af116] ul>li>ul>li{list-style-type:circle}.settings-markdown[data-v-6a5af116] ul>li>ul>li ul li{list-style-type:square}.settings-markdown[data-v-6a5af116] blockquote{padding-left:1em;border-left:4px solid var(--color-primary-element);color:var(--color-text-maxcontrast);margin-left:0;margin-right:0}","",{version:3,sources:["webpack://./apps/settings/src/components/Markdown.vue"],names:[],mappings:"AAgHA,0OAMC,eAAA,CACA,gBAAA,CACA,eAAA,CACA,kBAAA,CACA,4BAAA,CAGD,uCACC,cAAA,CACA,eAAA,CAGD,uCACC,cAAA,CACA,eAAA,CAGD,uCACC,cAAA,CAGD,uCACC,cAAA,CAGD,uCACC,cAAA,CAGD,uCACC,kCAAA,CAGD,wCACC,eAAA,CACA,eAAA,CACA,6CAAA,CACA,kCAAA,CACA,iBAAA,CACA,iBAAA,CAGD,2CACC,6CAAA,CACA,kCAAA,CACA,iBAAA,CAGD,uCACC,iBAAA,CAGD,8EACC,iBAAA,CACA,gBAAA,CAGD,0CACC,oBAAA,CAGD,gDACC,sBAAA,CAGD,sDACC,sBAAA,CAGD,+CACC,gBAAA,CACA,kDAAA,CACA,mCAAA,CACA,aAAA,CACA,cAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.settings-markdown::v-deep {\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n\tfont-weight: 600;\n\tline-height: 120%;\n\tmargin-top: 24px;\n\tmargin-bottom: 12px;\n\tcolor: var(--color-main-text);\n}\n\nh1 {\n\tfont-size: 36px;\n\tmargin-top: 48px;\n}\n\nh2 {\n\tfont-size: 28px;\n\tmargin-top: 48px;\n}\n\nh3 {\n\tfont-size: 24px;\n}\n\nh4 {\n\tfont-size: 21px;\n}\n\nh5 {\n\tfont-size: 17px;\n}\n\nh6 {\n\tfont-size: var(--default-font-size);\n}\n\npre {\n\twhite-space: pre;\n\toverflow-x: auto;\n\tbackground-color: var(--color-background-dark);\n\tborder-radius: var(--border-radius);\n\tpadding: 1em 1.3em;\n\tmargin-bottom: 1em;\n}\n\np code {\n\tbackground-color: var(--color-background-dark);\n\tborder-radius: var(--border-radius);\n\tpadding: .1em .3em;\n}\n\nli {\n\tposition: relative;\n}\n\nul, ol {\n\tpadding-left: 10px;\n\tmargin-left: 10px;\n}\n\nul li {\n\tlist-style-type: disc;\n}\n\nul > li > ul > li {\n\tlist-style-type: circle;\n}\n\nul > li > ul > li ul li {\n\tlist-style-type: square;\n}\n\nblockquote {\n\tpadding-left: 1em;\n\tborder-left: 4px solid var(--color-primary-element);\n\tcolor: var(--color-text-maxcontrast);\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n}\n"],sourceRoot:""}]),n.a=r},608:function(t,n,e){"use strict";var a=e(72),s=e.n(a),i=e(73),r=e.n(i)()(s.a);r.push([t.i,".app-details[data-v-8ea5f476]{padding:20px}.app-details__actions-manage[data-v-8ea5f476]{display:flex}.app-details__actions-manage input[data-v-8ea5f476]{flex:0 1 auto;min-width:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.app-details__dependencies[data-v-8ea5f476]{opacity:.7}.app-details__documentation[data-v-8ea5f476]{padding-top:20px}.app-details__description[data-v-8ea5f476]{padding-top:20px}.force[data-v-8ea5f476]{color:var(--color-error);border-color:var(--color-error);background:var(--color-main-background)}.force[data-v-8ea5f476]:hover,.force[data-v-8ea5f476]:active{color:var(--color-main-background);border-color:var(--color-error) !important;background:var(--color-error)}","",{version:3,sources:["webpack://./apps/settings/src/components/AppDetails.vue"],names:[],mappings:"AAuNA,8BACC,YAAA,CAIC,8CAEC,YAAA,CACA,oDACC,aAAA,CACA,WAAA,CACA,sBAAA,CACA,kBAAA,CACA,eAAA,CAIH,4CACC,UAAA,CAED,6CACC,gBAAA,CAED,2CACC,gBAAA,CAIF,wBACC,wBAAA,CACA,+BAAA,CACA,uCAAA,CAED,6DAEC,kCAAA,CACA,0CAAA,CACA,6BAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.app-details {\n\tpadding: 20px;\n\n\t&__actions {\n\t\t// app management\n\t\t&-manage {\n\t\t\t// if too many, shrink them and ellipsis\n\t\t\tdisplay: flex;\n\t\t\tinput {\n\t\t\t\tflex: 0 1 auto;\n\t\t\t\tmin-width: 0;\n\t\t\t\ttext-overflow: ellipsis;\n\t\t\t\twhite-space: nowrap;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t}\n\t}\n\t&__dependencies {\n\t\topacity: .7;\n\t}\n\t&__documentation {\n\t\tpadding-top: 20px;\n\t}\n\t&__description {\n\t\tpadding-top: 20px;\n\t}\n}\n\n.force {\n\tcolor: var(--color-error);\n\tborder-color: var(--color-error);\n\tbackground: var(--color-main-background);\n}\n.force:hover,\n.force:active {\n\tcolor: var(--color-main-background);\n\tborder-color: var(--color-error) !important;\n\tbackground: var(--color-error);\n}\n\n"],sourceRoot:""}]),n.a=r},609:function(t,n,e){"use strict";var a=e(72),s=e.n(a),i=e(73),r=e.n(i)()(s.a);r.push([t.i,".app-sidebar[data-v-62cfcefe]:not(.app-sidebar--without-background) :not(.app-sidebar-header--compact) .app-sidebar-header__figure{background-size:cover}.app-sidebar[data-v-62cfcefe]:not(.app-sidebar--without-background) .app-sidebar-header--compact .app-sidebar-header__figure{background-size:32px;filter:invert(1)}.app-sidebar[data-v-62cfcefe].app-sidebar--without-background .app-sidebar-header__figure{display:flex;align-items:center;justify-content:center}.app-sidebar[data-v-62cfcefe].app-sidebar--without-background .app-sidebar-header__figure--default-app-icon{width:32px;height:32px;background-size:32px}.app-sidebar[data-v-62cfcefe] .app-sidebar-header__desc .app-sidebar-header__subtitle{overflow:visible !important;height:auto;white-space:normal !important;line-height:16px}.app-sidebar[data-v-62cfcefe] .app-sidebar-header__action{margin:0 20px}.app-sidebar[data-v-62cfcefe] .app-sidebar-header__action input{margin:3px}.app-sidebar-tabs__release h2[data-v-62cfcefe]{border-bottom:1px solid var(--color-border)}.app-sidebar-tabs__release[data-v-62cfcefe] h3{font-size:20px}.app-sidebar-tabs__release[data-v-62cfcefe] h4{font-size:17px}","",{version:3,sources:["webpack://./apps/settings/src/views/Apps.vue"],names:[],mappings:"AAwTE,mIACC,qBAAA,CAGD,6HACC,oBAAA,CAEA,gBAAA,CAMD,0FACC,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,4GACC,UAAA,CACA,WAAA,CACA,oBAAA,CAQF,sFACC,2BAAA,CACA,WAAA,CACA,6BAAA,CACA,gBAAA,CAIF,0DAEC,aAAA,CACA,gEACC,UAAA,CAMD,+CACC,2CAAA,CAKA,gDACC,cAAA,CAED,gDACC,cAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.app-sidebar::v-deep {\n\t&:not(.app-sidebar--without-background) {\n\t\t// with full screenshot, let's fill the figure\n\t\t:not(.app-sidebar-header--compact) .app-sidebar-header__figure {\n\t\t\tbackground-size: cover;\n\t\t}\n\t\t// revert sidebar app icon so it is black\n\t\t.app-sidebar-header--compact .app-sidebar-header__figure {\n\t\t\tbackground-size: 32px;\n\n\t\t\tfilter: invert(1);\n\t\t}\n\t}\n\n\t// default icon slot styling\n\t&.app-sidebar--without-background {\n\t\t.app-sidebar-header__figure {\n\t\t\tdisplay: flex;\n\t\t\talign-items: center;\n\t\t\tjustify-content: center;\n\t\t\t&--default-app-icon {\n\t\t\t\twidth: 32px;\n\t\t\t\theight: 32px;\n\t\t\t\tbackground-size: 32px;\n\t\t\t}\n\t\t}\n\t}\n\n\t// TODO: migrate to components\n\t.app-sidebar-header__desc {\n\t\t// allow multi line subtitle for the license\n\t\t.app-sidebar-header__subtitle {\n\t\t\toverflow: visible !important;\n\t\t\theight: auto;\n\t\t\twhite-space: normal !important;\n\t\t\tline-height: 16px;\n\t\t}\n\t}\n\n\t.app-sidebar-header__action {\n\t\t// align with tab content\n\t\tmargin: 0 20px;\n\t\tinput {\n\t\t\tmargin: 3px;\n\t\t}\n\t}\n}\n\n\t.app-sidebar-tabs__release {\n\t\th2 {\n\t\t\tborder-bottom: 1px solid var(--color-border);\n\t\t}\n\n\t\t// Overwrite changelog heading styles\n\t\t::v-deep {\n\t\t\th3 {\n\t\t\t\tfont-size: 20px;\n\t\t\t}\n\t\t\th4 {\n\t\t\t\tfont-size: 17px;\n\t\t\t}\n\t\t}\n\t}\n"],sourceRoot:""}]),n.a=r},610:function(n,e,a){"use strict";a.r(e);var s=a(160),i=a(18),r=a(588),p=a.n(r),o=a(583),l=a.n(o),c=a(584),d=a.n(c),u=a(585),g=a.n(u),h=a(586),A=a.n(h),v=a(599),m=a.n(v),f=a(600),b=a.n(f),C=a(601),_=a.n(C),y=a(587),w=a.n(y),k=a(10),x={name:"AppScore",props:["score"],computed:{scoreImage(){const t="rating/s"+Math.round(10*this.score)+".svg";return Object(k.imagePath)("core",t)}}},D=a(41),S=Object(D.a)(x,(function(){var t=this.$createElement;return(this._self._c||t)("img",{staticClass:"app-score-image",attrs:{src:this.scoreImage}})}),[],!1,null,null,null).exports,B={computed:{appGroups(){return this.app.groups.map(t=>({id:t,name:t}))},installing(){return this.$store.getters.loading("install")},isLoading(){return this.app&&this.$store.getters.loading(this.app.id)},enableButtonText(){return this.app.needsDownload?t("settings","Download and enable"):t("settings","Enable")},forceEnableButtonText(){return this.app.needsDownload,t("settings","Enable untested app")},enableButtonTooltip(){return!!this.app.needsDownload&&t("settings","The app will be downloaded from the App Store")},forceEnableButtonTooltip(){const n=t("settings","This app is not marked as compatible with your Nextcloud version. If you continue you will still be able to install the app. Note that the app might not work as expected.");return this.app.needsDownload?n+" "+t("settings","The app will be downloaded from the App Store"):n}},data:()=>({groupCheckedAppsData:!1}),mounted(){this.app&&this.app.groups&&this.app.groups.length>0&&(this.groupCheckedAppsData=!0)},methods:{asyncFindGroup(t){return this.$store.dispatch("getGroups",{search:t,limit:5,offset:0})},isLimitedToGroups(t){return!(!this.app.groups.length&&!this.groupCheckedAppsData)},setGroupLimit(){this.groupCheckedAppsData||this.$store.dispatch("enableApp",{appId:this.app.id,groups:[]})},canLimitToGroups:t=>!(t.types&&t.types.includes("filesystem")||t.types.includes("prelogin")||t.types.includes("authentication")||t.types.includes("logging")||t.types.includes("prevent_group_restriction")),addGroupLimitation(t){const n=this.app.groups.concat([]).concat([t.id]);this.$store.dispatch("enableApp",{appId:this.app.id,groups:n})},removeGroupLimitation(t){const n=this.app.groups.concat([]),e=n.indexOf(t.id);e>-1&&n.splice(e,1),this.$store.dispatch("enableApp",{appId:this.app.id,groups:n})},forceEnable(t){this.$store.dispatch("forceEnableApp",{appId:t,groups:[]}).then(t=>{OC.Settings.Apps.rebuildNavigation()}).catch(t=>{OC.Notification.show(t)})},enable(t){this.$store.dispatch("enableApp",{appId:t,groups:[]}).then(t=>{OC.Settings.Apps.rebuildNavigation()}).catch(t=>{OC.Notification.show(t)})},disable(t){this.$store.dispatch("disableApp",{appId:t}).then(t=>{OC.Settings.Apps.rebuildNavigation()}).catch(t=>{OC.Notification.show(t)})},remove(t){this.$store.dispatch("uninstallApp",{appId:t}).then(t=>{OC.Settings.Apps.rebuildNavigation()}).catch(t=>{OC.Notification.show(t)})},install(t){this.$store.dispatch("enableApp",{appId:t}).then(t=>{OC.Settings.Apps.rebuildNavigation()}).catch(t=>{OC.Notification.show(t)})},update(t){this.$store.dispatch("updateApp",{appId:t}).then(t=>{OC.Settings.Apps.rebuildNavigation()}).catch(t=>{OC.Notification.show(t)})}}},L={name:"SvgFilterMixin",data:()=>({filterId:""}),computed:{filterUrl(){return"url(#".concat(this.filterId,")")}},mounted(){this.filterId="invertIconApps"+Math.floor(100*Math.random())+(new Date).getSeconds()+(new Date).getMilliseconds()}},I={name:"AppItem",components:{AppScore:S},mixins:[B,Object(D.a)(L,void 0,void 0,!1,null,null,null).exports],props:{app:{},category:{},listView:{type:Boolean,default:!0}},data:()=>({isSelected:!1,scrolled:!1,screenshotLoaded:!1}),computed:{hasRating(){return this.app.appstoreData&&this.app.appstoreData.ratingNumOverall>5}},watch:{"$route.params.id"(t){this.isSelected=this.app.id===t}},mounted(){if(this.isSelected=this.app.id===this.$route.params.id,this.app.screenshot){const t=new Image;t.onload=t=>{this.screenshotLoaded=!0},t.src=this.app.screenshot}},watchers:{},methods:{async showAppDetails(t){if("INPUT"!==t.currentTarget.tagName&&"A"!==t.currentTarget.tagName)try{await this.$router.push({name:"apps-details",params:{category:this.category,id:this.app.id}})}catch(t){}},prefix:(t,n)=>t+"_"+n}},N=a(71),T=a.n(N),O=a(602),E={insert:"head",singleton:!1},G=(T()(O.a,E),O.a.locals,Object(D.a)(I,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"section",class:{selected:t.isSelected},on:{click:t.showAppDetails}},[e("div",{staticClass:"app-image app-image-icon",on:{click:t.showAppDetails}},[t.listView&&!t.app.preview||!t.listView&&!t.screenshotLoaded?e("div",{staticClass:"icon-settings-dark"}):t.listView&&t.app.preview?e("svg",{attrs:{width:"32",height:"32",viewBox:"0 0 32 32"}},[e("defs",[e("filter",{attrs:{id:t.filterId}},[e("feColorMatrix",{attrs:{in:"SourceGraphic",type:"matrix",values:"-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0"}})],1)]),t._v(" "),e("image",{staticClass:"app-icon",attrs:{x:"0",y:"0",width:"32",height:"32",preserveAspectRatio:"xMinYMin meet",filter:t.filterUrl,"xlink:href":t.app.preview}})]):t._e(),t._v(" "),!t.listView&&t.app.screenshot&&t.screenshotLoaded?e("img",{attrs:{src:t.app.screenshot,width:"100%"}}):t._e()]),t._v(" "),e("div",{staticClass:"app-name",on:{click:t.showAppDetails}},[t._v("\n\t\t"+t._s(t.app.name)+"\n\t")]),t._v(" "),t.listView?t._e():e("div",{staticClass:"app-summary"},[t._v("\n\t\t"+t._s(t.app.summary)+"\n\t")]),t._v(" "),t.listView?e("div",{staticClass:"app-version"},[t.app.version?e("span",[t._v(t._s(t.app.version))]):t.app.appstoreData.releases[0].version?e("span",[t._v(t._s(t.app.appstoreData.releases[0].version))]):t._e()]):t._e(),t._v(" "),e("div",{staticClass:"app-level"},[300===t.app.level?e("span",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:t.t("settings","This app is supported via your current Nextcloud subscription."),expression:"t('settings', 'This app is supported via your current Nextcloud subscription.')",modifiers:{auto:!0}}],staticClass:"supported icon-checkmark-color"},[t._v("\n\t\t\t"+t._s(t.t("settings","Supported")))]):t._e(),t._v(" "),200===t.app.level?e("span",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:t.t("settings","Featured apps are developed by and within the community. They offer central functionality and are ready for production use."),expression:"t('settings', 'Featured apps are developed by and within the community. They offer central functionality and are ready for production use.')",modifiers:{auto:!0}}],staticClass:"official icon-checkmark"},[t._v("\n\t\t\t"+t._s(t.t("settings","Featured")))]):t._e(),t._v(" "),t.hasRating&&!t.listView?e("AppScore",{attrs:{score:t.app.score}}):t._e()],1),t._v(" "),e("div",{staticClass:"actions"},[t.app.error?e("div",{staticClass:"warning"},[t._v("\n\t\t\t"+t._s(t.app.error)+"\n\t\t")]):t._e(),t._v(" "),t.isLoading?e("div",{staticClass:"icon icon-loading-small"}):t._e(),t._v(" "),t.app.update?e("input",{staticClass:"update primary",attrs:{type:"button",value:t.t("settings","Update to {update}",{update:t.app.update}),disabled:t.installing||t.isLoading},on:{click:function(n){return n.stopPropagation(),t.update(t.app.id)}}}):t._e(),t._v(" "),t.app.canUnInstall?e("input",{staticClass:"uninstall",attrs:{type:"button",value:t.t("settings","Remove"),disabled:t.installing||t.isLoading},on:{click:function(n){return n.stopPropagation(),t.remove(t.app.id)}}}):t._e(),t._v(" "),t.app.active?e("input",{staticClass:"enable",attrs:{type:"button",value:t.t("settings","Disable"),disabled:t.installing||t.isLoading},on:{click:function(n){return n.stopPropagation(),t.disable(t.app.id)}}}):t._e(),t._v(" "),t.app.active||!t.app.canInstall&&!t.app.isCompatible?t.app.active?t._e():e("input",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:t.forceEnableButtonTooltip,expression:"forceEnableButtonTooltip",modifiers:{auto:!0}}],staticClass:"enable force",attrs:{type:"button",value:t.forceEnableButtonText,disabled:t.installing||t.isLoading},on:{click:function(n){return n.stopPropagation(),t.forceEnable(t.app.id)}}}):e("input",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:t.enableButtonTooltip,expression:"enableButtonTooltip",modifiers:{auto:!0}}],staticClass:"enable",attrs:{type:"button",value:t.enableButtonText,disabled:!t.app.canInstall||t.installing||t.isLoading},on:{click:function(n){return n.stopPropagation(),t.enable(t.app.id)}}})])])}),[],!1,null,"5a074e36",null).exports),$={name:"PrefixMixin",methods:{prefix:(t,n)=>t+"_"+n}},U=Object(D.a)($,void 0,void 0,!1,null,null,null).exports,M=a(603),R=a.n(M),V={name:"AppList",components:{AppItem:G},mixins:[U],props:["category","app","search"],computed:{counter(){return this.apps.filter(t=>t.update).length},loading(){return this.$store.getters.loading("list")},hasPendingUpdate(){return this.apps.filter(t=>t.update).length>1},showUpdateAll(){return this.hasPendingUpdate&&["installed","updates"].includes(this.category)},apps(){const t=this.$store.getters.getAllApps.filter(t=>-1!==t.name.toLowerCase().search(this.search.toLowerCase())).sort((function(t,n){const e=""+(t.active?0:1)+(t.update?0:1)+t.name,a=""+(n.active?0:1)+(n.update?0:1)+n.name;return OC.Util.naturalSortCompare(e,a)}));return"installed"===this.category?t.filter(t=>t.installed):"enabled"===this.category?t.filter(t=>t.active&&t.installed):"disabled"===this.category?t.filter(t=>!t.active&&t.installed):"app-bundles"===this.category?t.filter(t=>t.bundles):"updates"===this.category?t.filter(t=>t.update):"featured"===this.category?t.filter(t=>200===t.level):t.filter(t=>t.appstore&&void 0!==t.category&&(t.category===this.category||t.category.indexOf(this.category)>-1))},bundles(){return this.$store.getters.getServerData.bundles.filter(t=>this.bundleApps(t.id).length>0)},bundleApps:()=>function(t){return this.$store.getters.getAllApps.filter(n=>void 0!==n.bundleIds&&n.bundleIds.includes(t))},searchApps(){return""===this.search?[]:this.$store.getters.getAllApps.filter(t=>-1!==t.name.toLowerCase().search(this.search.toLowerCase())&&!this.apps.find(n=>n.id===t.id))},useAppStoreView(){return!this.useListView&&!this.useBundleView},useListView(){return"installed"===this.category||"enabled"===this.category||"disabled"===this.category||"updates"===this.category||"featured"===this.category},useBundleView(){return"app-bundles"===this.category},allBundlesEnabled(){const t=this;return function(n){return 0===t.bundleApps(n).filter(t=>!t.active).length}},bundleToggleText(){const n=this;return function(e){return n.allBundlesEnabled(e)?t("settings","Disable all"):t("settings","Enable all")}}},methods:{toggleBundle(t){return this.allBundlesEnabled(t)?this.disableBundle(t):this.enableBundle(t)},enableBundle(t){const n=this.bundleApps(t).map(t=>t.id);this.$store.dispatch("enableApp",{appId:n,groups:[]}).catch(t=>{console.error(t),OC.Notification.show(t)})},disableBundle(t){const n=this.bundleApps(t).map(t=>t.id);this.$store.dispatch("disableApp",{appId:n,groups:[]}).catch(t=>{OC.Notification.show(t)})},updateAll(){const t=R()(1);this.apps.filter(t=>t.update).map(n=>t(()=>this.$store.dispatch("updateApp",{appId:n.id})))}}},z=Object(D.a)(V,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{attrs:{id:"app-content-inner"}},[e("div",{staticClass:"apps-list",class:{installed:t.useBundleView||t.useListView,store:t.useAppStoreView},attrs:{id:"apps-list"}},[t.useListView?[t.showUpdateAll?e("div",{staticClass:"counter"},[t._v("\n\t\t\t\t"+t._s(t.n("settings","%n app has an update available","%n apps have an update available",t.counter))+"\n\t\t\t\t"),t.showUpdateAll?e("button",{staticClass:"primary",attrs:{id:"app-list-update-all"},on:{click:t.updateAll}},[t._v("\n\t\t\t\t\t"+t._s(t.t("settings","Update all"))+"\n\t\t\t\t")]):t._e()]):t._e(),t._v(" "),e("transition-group",{staticClass:"apps-list-container",attrs:{name:"app-list",tag:"div"}},t._l(t.apps,(function(n){return e("AppItem",{key:n.id,attrs:{app:n,category:t.category}})})),1)]:t._e(),t._v(" "),t.useBundleView?e("transition-group",{staticClass:"apps-list-container",attrs:{name:"app-list",tag:"div"}},[t._l(t.bundles,(function(n){return[e("div",{key:n.id,staticClass:"apps-header"},[e("div",{staticClass:"app-image"}),t._v(" "),e("h2",[t._v(t._s(n.name)+" "),e("input",{attrs:{type:"button",value:t.bundleToggleText(n.id)},on:{click:function(e){return t.toggleBundle(n.id)}}})]),t._v(" "),e("div",{staticClass:"app-version"}),t._v(" "),e("div",{staticClass:"app-level"}),t._v(" "),e("div",{staticClass:"app-groups"}),t._v(" "),e("div",{staticClass:"actions"},[t._v("\n\t\t\t\t\t\t \n\t\t\t\t\t")])]),t._v(" "),t._l(t.bundleApps(n.id),(function(a){return e("AppItem",{key:n.id+a.id,attrs:{app:a,category:t.category}})}))]}))],2):t._e(),t._v(" "),t.useAppStoreView?t._l(t.apps,(function(n){return e("AppItem",{key:n.id,attrs:{app:n,category:t.category,"list-view":!1}})})):t._e()],2),t._v(" "),e("div",{staticClass:"apps-list installed",attrs:{id:"apps-list-search"}},[e("div",{staticClass:"apps-list-container"},[""!==t.search&&t.searchApps.length>0?[e("div",{staticClass:"section"},[e("div"),t._v(" "),e("td",{attrs:{colspan:"5"}},[e("h2",[t._v(t._s(t.t("settings","Results from other categories")))])])]),t._v(" "),t._l(t.searchApps,(function(n){return e("AppItem",{key:n.id,attrs:{app:n,category:t.category,"list-view":!0}})}))]:t._e()],2)]),t._v(" "),""===t.search||t.loading||0!==t.searchApps.length||0!==t.apps.length?t._e():e("div",{staticClass:"emptycontent emptycontent-search",attrs:{id:"apps-list-empty"}},[e("div",{staticClass:"icon-settings-dark",attrs:{id:"app-list-empty-icon"}}),t._v(" "),e("h2",[t._v(t._s(t.t("settings","No apps found for your version")))])]),t._v(" "),e("div",{attrs:{id:"searchresults"}})])}),[],!1,null,null,null).exports,F=a(453),j=a.n(F),P=a(605),Y=a.n(P),q=a(606),H=a.n(q),Q={name:"Markdown",props:{text:{type:String,default:""}},computed:{renderMarkdown(){const t=new Y.a.Renderer;return t.link=function(t,n,e){let a;try{a=decodeURIComponent(unescape(t)).replace(/[^\w:]/g,"").toLowerCase()}catch(t){return""}if(0!==a.indexOf("http:")&&0!==a.indexOf("https:"))return"";let s='<a href="'+t+'" rel="noreferrer noopener"';return n&&(s+=' title="'+n+'"'),s+=">"+e+"</a>",s},t.image=function(t,n,e){return e||n},t.blockquote=function(t){return t},H.a.sanitize(Y()(this.text.trim(),{renderer:t,gfm:!1,highlight:!1,tables:!1,breaks:!1,pedantic:!1,sanitize:!0,smartLists:!0,smartypants:!1}),{SAFE_FOR_JQUERY:!0,ALLOWED_TAGS:["h1","h2","h3","h4","h5","h6","strong","p","a","ul","ol","li","em","del","blockquote"]})}}},W=a(607),J={insert:"head",singleton:!1},K=(T()(W.a,J),W.a.locals,Object(D.a)(Q,(function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"settings-markdown",domProps:{innerHTML:this._s(this.renderMarkdown)}})}),[],!1,null,"6a5af116",null).exports),X={name:"AppDetails",components:{Multiselect:j.a,Markdown:K},mixins:[B,U],props:{app:{type:Object,required:!0}},data:()=>({groupCheckedAppsData:!1}),computed:{appstoreUrl(){return"https://apps.nextcloud.com/apps/".concat(this.app.id)},licence(){return this.app.licence?t("settings","{license}-licensed",{license:(""+this.app.licence).toUpperCase()}):null},author(){return"string"==typeof this.app.author?[{"@value":this.app.author}]:this.app.author["@value"]?[this.app.author]:this.app.author},appGroups(){return this.app.groups.map(t=>({id:t,name:t}))},groups(){return this.$store.getters.getGroups.filter(t=>"disabled"!==t.id).sort((t,n)=>t.name.localeCompare(n.name))}},mounted(){this.app.groups.length>0&&(this.groupCheckedAppsData=!0)}},Z=a(608),tt={insert:"head",singleton:!1},nt=(T()(Z.a,tt),Z.a.locals,Object(D.a)(X,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"app-details"},[e("div",{staticClass:"app-details__actions"},[t.app.active&&t.canLimitToGroups(t.app)?e("div",{staticClass:"app-details__actions-groups"},[e("input",{directives:[{name:"model",rawName:"v-model",value:t.groupCheckedAppsData,expression:"groupCheckedAppsData"}],staticClass:"groups-enable__checkbox checkbox",attrs:{id:t.prefix("groups_enable",t.app.id),type:"checkbox"},domProps:{value:t.app.id,checked:Array.isArray(t.groupCheckedAppsData)?t._i(t.groupCheckedAppsData,t.app.id)>-1:t.groupCheckedAppsData},on:{change:[function(n){var e=t.groupCheckedAppsData,a=n.target,s=!!a.checked;if(Array.isArray(e)){var i=t.app.id,r=t._i(e,i);a.checked?r<0&&(t.groupCheckedAppsData=e.concat([i])):r>-1&&(t.groupCheckedAppsData=e.slice(0,r).concat(e.slice(r+1)))}else t.groupCheckedAppsData=s},t.setGroupLimit]}}),t._v(" "),e("label",{attrs:{for:t.prefix("groups_enable",t.app.id)}},[t._v(t._s(t.t("settings","Limit to groups")))]),t._v(" "),e("input",{staticClass:"group_select",attrs:{type:"hidden",title:t.t("settings","All"),value:""}}),t._v(" "),t.isLimitedToGroups(t.app)?e("Multiselect",{staticClass:"multiselect-vue",attrs:{options:t.groups,value:t.appGroups,"options-limit":5,placeholder:t.t("settings","Limit app usage to groups"),label:"name","track-by":"id",multiple:!0,"close-on-select":!1,"tag-width":60},on:{select:t.addGroupLimitation,remove:t.removeGroupLimitation,"search-change":t.asyncFindGroup}},[e("span",{attrs:{slot:"noResult"},slot:"noResult"},[t._v(t._s(t.t("settings","No results")))])]):t._e()],1):t._e(),t._v(" "),e("div",{staticClass:"app-details__actions-manage"},[t.app.update?e("input",{staticClass:"update primary",attrs:{type:"button",value:t.t("settings","Update to {version}",{version:t.app.update}),disabled:t.installing||t.isLoading},on:{click:function(n){return t.update(t.app.id)}}}):t._e(),t._v(" "),t.app.canUnInstall?e("input",{staticClass:"uninstall",attrs:{type:"button",value:t.t("settings","Remove"),disabled:t.installing||t.isLoading},on:{click:function(n){return t.remove(t.app.id)}}}):t._e(),t._v(" "),t.app.active?e("input",{staticClass:"enable",attrs:{type:"button",value:t.t("settings","Disable"),disabled:t.installing||t.isLoading},on:{click:function(n){return t.disable(t.app.id)}}}):t._e(),t._v(" "),t.app.active||!t.app.canInstall&&!t.app.isCompatible?t.app.active||t.app.canInstall?t._e():e("input",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:t.forceEnableButtonTooltip,expression:"forceEnableButtonTooltip",modifiers:{auto:!0}}],staticClass:"enable force",attrs:{type:"button",value:t.forceEnableButtonText,disabled:t.installing||t.isLoading},on:{click:function(n){return t.forceEnable(t.app.id)}}}):e("input",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:t.enableButtonTooltip,expression:"enableButtonTooltip",modifiers:{auto:!0}}],staticClass:"enable primary",attrs:{type:"button",value:t.enableButtonText,disabled:!t.app.canInstall||t.installing||t.isLoading},on:{click:function(n){return t.enable(t.app.id)}}})])]),t._v(" "),e("ul",{staticClass:"app-details__dependencies"},[t.app.missingMinOwnCloudVersion?e("li",[t._v("\n\t\t\t"+t._s(t.t("settings","This app has no minimum Nextcloud version assigned. This will be an error in the future."))+"\n\t\t")]):t._e(),t._v(" "),t.app.missingMaxOwnCloudVersion?e("li",[t._v("\n\t\t\t"+t._s(t.t("settings","This app has no maximum Nextcloud version assigned. This will be an error in the future."))+"\n\t\t")]):t._e(),t._v(" "),t.app.canInstall?t._e():e("li",[t._v("\n\t\t\t"+t._s(t.t("settings","This app cannot be installed because the following dependencies are not fulfilled:"))+"\n\t\t\t"),e("ul",{staticClass:"missing-dependencies"},t._l(t.app.missingDependencies,(function(n,a){return e("li",{key:a},[t._v("\n\t\t\t\t\t"+t._s(n)+"\n\t\t\t\t")])})),0)])]),t._v(" "),e("p",{staticClass:"app-details__documentation"},[t.app.internal?t._e():e("a",{staticClass:"appslink",attrs:{href:t.appstoreUrl,target:"_blank",rel:"noreferrer noopener"}},[t._v(t._s(t.t("settings","View in store"))+" ↗")]),t._v(" "),t.app.website?e("a",{staticClass:"appslink",attrs:{href:t.app.website,target:"_blank",rel:"noreferrer noopener"}},[t._v(t._s(t.t("settings","Visit website"))+" ↗")]):t._e(),t._v(" "),t.app.bugs?e("a",{staticClass:"appslink",attrs:{href:t.app.bugs,target:"_blank",rel:"noreferrer noopener"}},[t._v(t._s(t.t("settings","Report a bug"))+" ↗")]):t._e(),t._v(" "),t.app.documentation&&t.app.documentation.user?e("a",{staticClass:"appslink",attrs:{href:t.app.documentation.user,target:"_blank",rel:"noreferrer noopener"}},[t._v(t._s(t.t("settings","User documentation"))+" ↗")]):t._e(),t._v(" "),t.app.documentation&&t.app.documentation.admin?e("a",{staticClass:"appslink",attrs:{href:t.app.documentation.admin,target:"_blank",rel:"noreferrer noopener"}},[t._v(t._s(t.t("settings","Admin documentation"))+" ↗")]):t._e(),t._v(" "),t.app.documentation&&t.app.documentation.developer?e("a",{staticClass:"appslink",attrs:{href:t.app.documentation.developer,target:"_blank",rel:"noreferrer noopener"}},[t._v(t._s(t.t("settings","Developer documentation"))+" ↗")]):t._e()]),t._v(" "),e("Markdown",{staticClass:"app-details__description",attrs:{text:t.app.description}})],1)}),[],!1,null,"8ea5f476",null).exports);i.default.use(p.a);var et={name:"Apps",components:{AppContent:l.a,AppDetails:nt,AppList:z,AppNavigation:d.a,AppNavigationCounter:g.a,AppNavigationItem:A.a,AppNavigationSpacer:m.a,AppScore:S,AppSidebar:b.a,AppSidebarTab:_.a,Content:w.a,Markdown:K},mixins:[B],props:{category:{type:String,default:"installed"},id:{type:String,default:""}},data:()=>({searchQuery:"",screenshotLoaded:!1}),computed:{loading(){return this.$store.getters.loading("categories")},loadingList(){return this.$store.getters.loading("list")},app(){return this.apps.find(t=>t.id===this.id)},categories(){return this.$store.getters.getCategories},apps(){return this.$store.getters.getAllApps},updateCount(){return this.$store.getters.getUpdateCount},settings(){return this.$store.getters.getServerData},hasRating(){return this.app.appstoreData&&this.app.appstoreData.ratingNumOverall>5},appSidebar(){const n=Array.isArray(this.app.author)?this.app.author[0]["@value"]?this.app.author.map(t=>t["@value"]).join(", "):this.app.author.join(", "):this.app.author["@value"]?this.app.author["@value"]:this.app.author,e=t("settings","{license}-licensed",{license:(""+this.app.licence).toUpperCase()});return{subtitle:t("settings","by {author}\n{license}",{author:n,license:e}),background:this.app.screenshot&&this.screenshotLoaded?this.app.screenshot:this.app.preview,compact:!(this.app.screenshot&&this.screenshotLoaded),title:this.app.name}},changelog:()=>t=>t.translations.en.changelog},watch:{category(){this.searchQuery=""},app(){if(this.screenshotLoaded=!1,this.app&&this.app.screenshot){const t=new Image;t.onload=t=>{this.screenshotLoaded=!0},t.src=this.app.screenshot}}},beforeMount(){this.$store.dispatch("getCategories"),this.$store.dispatch("getAllApps"),this.$store.dispatch("getGroups",{offset:0,limit:5}),this.$store.commit("setUpdateCount",this.$store.getters.getServerData.updateCount)},mounted(){Object(s.subscribe)("nextcloud:unified-search.search",this.setSearch),Object(s.subscribe)("nextcloud:unified-search.reset",this.resetSearch)},beforeDestroy(){Object(s.unsubscribe)("nextcloud:unified-search.search",this.setSearch),Object(s.unsubscribe)("nextcloud:unified-search.reset",this.resetSearch)},methods:{setSearch({query:t}){this.searchQuery=t},resetSearch(){this.searchQuery=""},hideAppDetails(){this.$router.push({name:"apps-category",params:{category:this.category}})}}},at=a(609),st={insert:"head",singleton:!1},it=(T()(at.a,st),at.a.locals,Object(D.a)(et,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("Content",{class:{"with-app-sidebar":t.app},attrs:{"app-name":"settings","content-class":{"icon-loading":t.loadingList},"navigation-class":{"icon-loading":t.loading}}},[e("AppNavigation",{scopedSlots:t._u([{key:"list",fn:function(){return[e("AppNavigationItem",{attrs:{id:"app-category-your-apps",to:{name:"apps"},exact:!0,icon:"icon-category-installed",title:t.t("settings","Your apps")}}),t._v(" "),e("AppNavigationItem",{attrs:{id:"app-category-enabled",to:{name:"apps-category",params:{category:"enabled"}},icon:"icon-category-enabled",title:t.t("settings","Active apps")}}),t._v(" "),e("AppNavigationItem",{attrs:{id:"app-category-disabled",to:{name:"apps-category",params:{category:"disabled"}},icon:"icon-category-disabled",title:t.t("settings","Disabled apps")}}),t._v(" "),t.updateCount>0?e("AppNavigationItem",{attrs:{id:"app-category-updates",to:{name:"apps-category",params:{category:"updates"}},icon:"icon-download",title:t.t("settings","Updates")}},[e("AppNavigationCounter",{attrs:{slot:"counter"},slot:"counter"},[t._v("\n\t\t\t\t\t"+t._s(t.updateCount)+"\n\t\t\t\t")])],1):t._e(),t._v(" "),e("AppNavigationItem",{attrs:{id:"app-category-your-bundles",to:{name:"apps-category",params:{category:"app-bundles"}},icon:"icon-category-app-bundles",title:t.t("settings","App bundles")}}),t._v(" "),e("AppNavigationSpacer"),t._v(" "),t.settings.appstoreEnabled?[e("AppNavigationItem",{attrs:{id:"app-category-featured",to:{name:"apps-category",params:{category:"featured"}},icon:"icon-favorite",title:t.t("settings","Featured apps")}}),t._v(" "),t._l(t.categories,(function(t){return e("AppNavigationItem",{key:"icon-category-"+t.ident,attrs:{icon:"icon-category-"+t.ident,to:{name:"apps-category",params:{category:t.ident}},title:t.displayName}})}))]:t._e(),t._v(" "),e("AppNavigationItem",{attrs:{id:"app-developer-docs",href:"settings.developerDocumentation",title:t.t("settings","Developer documentation")+" ↗"}})]},proxy:!0}])}),t._v(" "),e("AppContent",{staticClass:"app-settings-content",class:{"icon-loading":t.loadingList}},[e("AppList",{attrs:{category:t.category,app:t.app,search:t.searchQuery}})],1),t._v(" "),t.id&&t.app?e("AppSidebar",t._b({class:{"app-sidebar--without-background":!t.appSidebar.background},on:{close:t.hideAppDetails},scopedSlots:t._u([t.appSidebar.background?null:{key:"header",fn:function(){return[e("div",{staticClass:"app-sidebar-header__figure--default-app-icon icon-settings-dark"})]},proxy:!0},{key:"description",fn:function(){return[300===t.app.level||200===t.app.level||t.hasRating?e("div",{staticClass:"app-level"},[300===t.app.level?e("span",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:t.t("settings","This app is supported via your current Nextcloud subscription."),expression:"t('settings', 'This app is supported via your current Nextcloud subscription.')",modifiers:{auto:!0}}],staticClass:"supported icon-checkmark-color"},[t._v("\n\t\t\t\t\t"+t._s(t.t("settings","Supported")))]):t._e(),t._v(" "),200===t.app.level?e("span",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:t.t("settings","Featured apps are developed by and within the community. They offer central functionality and are ready for production use."),expression:"t('settings', 'Featured apps are developed by and within the community. They offer central functionality and are ready for production use.')",modifiers:{auto:!0}}],staticClass:"official icon-checkmark"},[t._v("\n\t\t\t\t\t"+t._s(t.t("settings","Featured")))]):t._e(),t._v(" "),t.hasRating?e("AppScore",{attrs:{score:t.app.appstoreData.ratingOverall}}):t._e()],1):t._e()]},proxy:!0}],null,!0)},"AppSidebar",t.appSidebar,!1),[t._v(" "),t._v(" "),e("AppSidebarTab",{attrs:{id:"desc",icon:"icon-category-office",name:t.t("settings","Details"),order:0}},[e("AppDetails",{attrs:{app:t.app}})],1),t._v(" "),t.app.appstoreData&&t.app.releases[0].translations.en.changelog?e("AppSidebarTab",{attrs:{id:"desca",icon:"icon-category-organization",name:t.t("settings","Changelog"),order:1}},t._l(t.app.releases,(function(n){return e("div",{key:n.version,staticClass:"app-sidebar-tabs__release"},[e("h2",[t._v(t._s(n.version))]),t._v(" "),t.changelog(n)?e("Markdown",{attrs:{text:t.changelog(n)}}):t._e()],1)})),0):t._e()],1):t._e()],1)}),[],!1,null,"62cfcefe",null));e.default=it.exports}}]);
//# sourceMappingURL=vue-settings-apps-9dd3296e863571450112.js.map?v=72fddf28330e63779c9c