mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Merge pull request #39792 from nextcloud/feat/vue-filepicker-dialog
This commit is contained in:
commit
b570d76355
134 changed files with 665 additions and 1318 deletions
|
|
@ -71,7 +71,6 @@ import logger from '../logger.js'
|
|||
|
||||
const picker = getFilePickerBuilder(t('files', 'Choose a file or folder to transfer'))
|
||||
.setMultiSelect(false)
|
||||
.setModal(true)
|
||||
.setType(1)
|
||||
.allowDirectories()
|
||||
.build()
|
||||
|
|
|
|||
|
|
@ -71,7 +71,6 @@ export default {
|
|||
const picker = getFilePickerBuilder(t('files', 'Choose a default folder for accepted shares'))
|
||||
.startAt(this.readableDirectory)
|
||||
.setMultiSelect(false)
|
||||
.setModal(true)
|
||||
.setType(1)
|
||||
.setMimeTypeFilter(['httpd/unix-directory'])
|
||||
.allowDirectories()
|
||||
|
|
|
|||
|
|
@ -123,7 +123,6 @@ const VALID_MIME_TYPES = ['image/png', 'image/jpeg']
|
|||
const picker = getFilePickerBuilder(t('settings', 'Choose your profile picture'))
|
||||
.setMultiSelect(false)
|
||||
.setMimeTypeFilter(VALID_MIME_TYPES)
|
||||
.setModal(true)
|
||||
.setType(1)
|
||||
.allowDirectories(false)
|
||||
.build()
|
||||
|
|
|
|||
|
|
@ -19,10 +19,14 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import Vue from 'vue'
|
||||
import App from './AdminTheming.vue'
|
||||
|
||||
import { refreshStyles } from './helpers/refreshStyles.js'
|
||||
import App from './AdminTheming.vue'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
|
||||
Vue.prototype.OC = OC
|
||||
Vue.prototype.t = t
|
||||
|
|
|
|||
|
|
@ -91,17 +91,18 @@
|
|||
|
||||
<script>
|
||||
import { generateFilePath, generateRemoteUrl, generateUrl } from '@nextcloud/router'
|
||||
import { getCurrentUser } from '@nextcloud/auth'
|
||||
import { getFilePickerBuilder, showError } from '@nextcloud/dialogs'
|
||||
import { loadState } from '@nextcloud/initial-state'
|
||||
import { Palette } from 'node-vibrant/lib/color.js'
|
||||
import axios from '@nextcloud/axios'
|
||||
import Check from 'vue-material-design-icons/Check.vue'
|
||||
import Close from 'vue-material-design-icons/Close.vue'
|
||||
import ImageEdit from 'vue-material-design-icons/ImageEdit.vue'
|
||||
import debounce from 'debounce'
|
||||
import NcColorPicker from '@nextcloud/vue/dist/Components/NcColorPicker.js'
|
||||
import Vibrant from 'node-vibrant'
|
||||
import { Palette } from 'node-vibrant/lib/color.js'
|
||||
import { getFilePickerBuilder } from '@nextcloud/dialogs'
|
||||
import { getCurrentUser } from '@nextcloud/auth'
|
||||
|
||||
import Check from 'vue-material-design-icons/Check.vue'
|
||||
import Close from 'vue-material-design-icons/Close.vue'
|
||||
import ImageEdit from 'vue-material-design-icons/ImageEdit.vue'
|
||||
|
||||
const backgroundImage = loadState('theming', 'backgroundImage')
|
||||
const shippedBackgroundList = loadState('theming', 'shippedBackgrounds')
|
||||
|
|
@ -109,12 +110,6 @@ const themingDefaultBackground = loadState('theming', 'themingDefaultBackground'
|
|||
const defaultShippedBackground = loadState('theming', 'defaultShippedBackground')
|
||||
|
||||
const prefixWithBaseUrl = (url) => generateFilePath('theming', '', 'img/background/') + url
|
||||
const picker = getFilePickerBuilder(t('theming', 'Select a background from your files'))
|
||||
.setMultiSelect(false)
|
||||
.setModal(true)
|
||||
.setType(1)
|
||||
.setMimeTypeFilter(['image/png', 'image/gif', 'image/jpeg', 'image/svg+xml', 'image/svg'])
|
||||
.build()
|
||||
|
||||
export default {
|
||||
name: 'BackgroundSettings',
|
||||
|
|
@ -256,8 +251,30 @@ export default {
|
|||
this.pickColor(...args)
|
||||
}, 200),
|
||||
|
||||
async pickFile() {
|
||||
const path = await picker.pick()
|
||||
pickFile() {
|
||||
const picker = getFilePickerBuilder(t('theming', 'Select a background from your files'))
|
||||
.allowDirectories(false)
|
||||
.setMimeTypeFilter(['image/png', 'image/gif', 'image/jpeg', 'image/svg+xml', 'image/svg'])
|
||||
.setMultiSelect(false)
|
||||
.addButton({
|
||||
id: 'select',
|
||||
label: t('theming', 'Select background'),
|
||||
callback: (nodes) => {
|
||||
this.applyFile(nodes[0]?.path)
|
||||
},
|
||||
type: 'primary',
|
||||
})
|
||||
.build()
|
||||
picker.pick()
|
||||
},
|
||||
|
||||
async applyFile(path) {
|
||||
if (!path || typeof path !== 'string' || path.trim().length === 0 || path === '/') {
|
||||
console.error('No valid background have been selected', { path })
|
||||
showError(t('theming', 'No background have been selected'))
|
||||
return
|
||||
}
|
||||
|
||||
this.loading = 'custom'
|
||||
|
||||
// Extract primary color from image
|
||||
|
|
|
|||
|
|
@ -19,10 +19,14 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
import Vue from 'vue'
|
||||
import App from './UserThemes.vue'
|
||||
|
||||
import { refreshStyles } from './helpers/refreshStyles.js'
|
||||
import App from './UserThemes.vue'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
|
||||
Vue.prototype.OC = OC
|
||||
Vue.prototype.t = t
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
@media only screen and (width < 1024px){#dropdown{margin-right:10% !important;width:80% !important}.ui-autocomplete{z-index:1000 !important}.error-wide{width:100%;margin-left:0 !important;box-sizing:border-box}#app-navigation:not(.vue){transform:translateX(-300px);position:fixed;height:var(--body-height)}.snapjs-left #app-navigation{transform:translateX(0)}#app-navigation:not(.hidden)+#app-content{margin-left:0}.skip-navigation.skip-content{left:3px;margin-left:0}.app-content-list{background:var(--color-main-background);flex:1 1 100%;max-height:unset;max-width:100%}.app-content-list+.app-content-details{display:none}.app-content-list.showdetails{display:none}.app-content-list.showdetails+.app-content-details{display:initial}#app-content.showdetails #app-navigation-toggle{transform:translateX(-44px)}#app-content.showdetails #app-navigation-toggle-back{position:fixed;display:inline-block !important;top:50px;left:0;width:44px;height:44px;z-index:1050;background-color:rgba(255,255,255,.7);cursor:pointer;opacity:.6;transform:rotate(90deg)}#app-content.showdetails .app-content-list{transform:translateX(-100%)}#app-navigation-toggle{position:fixed;display:inline-block !important;left:0;width:44px;height:44px;z-index:1050;cursor:pointer;opacity:.6}#app-navigation-toggle:hover,#app-navigation-toggle:focus{opacity:1}#app-navigation+#app-content .files-controls{padding-left:44px}#body-user .app-files.viewer-mode .files-controls{padding-left:0 !important}.app-files.viewer-mode #app-navigation-toggle{display:none !important}table.multiselect thead{left:0 !important}#usersearchform{display:none}#body-settings .files-controls{min-width:1024px !important}#oc-dialog-filepicker-content .filelist .column-size,#oc-dialog-filepicker-content .filelist .column-mtime,#oc-dialog-filepicker-content .filelist .filesize,#oc-dialog-filepicker-content .filelist .date{display:none}#oc-dialog-filepicker-content .filelist .filename{max-width:100%}.snapjs-left table.multiselect thead{top:44px}}@media only screen and (max-width: 480px){#header .header-right>div>.menu{max-width:calc(100vw - 10px);position:fixed}#header .header-right>div>.menu::after{display:none !important}#header .header-right>div.openedMenu::after{display:block}#header .header-right>div::after{border:10px solid rgba(0,0,0,0);border-bottom-color:var(--color-main-background);bottom:0;content:" ";height:0;width:0;position:absolute;pointer-events:none;right:15px;z-index:2001;display:none}#header .header-right>div#settings::after{right:27px}}/*# sourceMappingURL=mobile.css.map */
|
||||
@media only screen and (width < 1024px){#dropdown{margin-right:10% !important;width:80% !important}.ui-autocomplete{z-index:1000 !important}.error-wide{width:100%;margin-left:0 !important;box-sizing:border-box}#app-navigation:not(.vue){transform:translateX(-300px);position:fixed;height:var(--body-height)}.snapjs-left #app-navigation{transform:translateX(0)}#app-navigation:not(.hidden)+#app-content{margin-left:0}.skip-navigation.skip-content{left:3px;margin-left:0}.app-content-list{background:var(--color-main-background);flex:1 1 100%;max-height:unset;max-width:100%}.app-content-list+.app-content-details{display:none}.app-content-list.showdetails{display:none}.app-content-list.showdetails+.app-content-details{display:initial}#app-content.showdetails #app-navigation-toggle{transform:translateX(-44px)}#app-content.showdetails #app-navigation-toggle-back{position:fixed;display:inline-block !important;top:50px;left:0;width:44px;height:44px;z-index:1050;background-color:rgba(255,255,255,.7);cursor:pointer;opacity:.6;transform:rotate(90deg)}#app-content.showdetails .app-content-list{transform:translateX(-100%)}#app-navigation-toggle{position:fixed;display:inline-block !important;left:0;width:44px;height:44px;z-index:1050;cursor:pointer;opacity:.6}#app-navigation-toggle:hover,#app-navigation-toggle:focus{opacity:1}#app-navigation+#app-content .files-controls{padding-left:44px}#body-user .app-files.viewer-mode .files-controls{padding-left:0 !important}.app-files.viewer-mode #app-navigation-toggle{display:none !important}table.multiselect thead{left:0 !important}#usersearchform{display:none}#body-settings .files-controls{min-width:1024px !important}}@media only screen and (max-width: 480px){#header .header-right>div>.menu{max-width:calc(100vw - 10px);position:fixed}#header .header-right>div>.menu::after{display:none !important}#header .header-right>div.openedMenu::after{display:block}#header .header-right>div::after{border:10px solid rgba(0,0,0,0);border-bottom-color:var(--color-main-background);bottom:0;content:" ";height:0;width:0;position:absolute;pointer-events:none;right:15px;z-index:2001;display:none}#header .header-right>div#settings::after{right:27px}}/*# sourceMappingURL=mobile.css.map */
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{"version":3,"sourceRoot":"","sources":["mobile.scss","variables.scss"],"names":[],"mappings":"AAEA,wCAGC,UACC,4BACA,qBAID,iBACC,wBAID,YACC,WACA,yBACA,sBAID,0BACC,6BACA,eACA,0BAGA,6BACC,wBAIF,0CACC,cAGD,8BACC,SACA,cAID,kBACC,wCACA,cAEA,iBAEA,eACA,uCACC,aAED,8BACC,aACA,mDACC,gBAOF,gDACC,4BAED,qDACC,eACA,gCACA,ICoCa,KDnCb,OACA,WACA,YACA,aACA,sCACA,eACA,WACA,wBAED,2CACC,4BAKF,uBACC,eACA,gCACA,OACA,WACA,YACA,aACA,eACA,WAED,0DAEC,UAID,6CACC,kBAID,kDACC,0BAED,8CACC,wBAGD,wBACC,kBAID,gBACC,aAED,+BACC,4BAID,2MAIC,aAED,kDACC,eAGD,qCACC,UAMF,0CACC,gCACC,6BACA,eACA,uCACC,wBAMA,4CACC,cAGF,iCACC,gCACA,iDACA,SACA,YACA,SACA,QACA,kBACA,oBACA,WACA,aACA,aAID,0CACC","file":"mobile.css"}
|
||||
{"version":3,"sourceRoot":"","sources":["mobile.scss","variables.scss"],"names":[],"mappings":"AAEA,wCAGC,UACC,4BACA,qBAID,iBACC,wBAID,YACC,WACA,yBACA,sBAID,0BACC,6BACA,eACA,0BAGA,6BACC,wBAIF,0CACC,cAGD,8BACC,SACA,cAID,kBACC,wCACA,cAEA,iBAEA,eACA,uCACC,aAED,8BACC,aACA,mDACC,gBAOF,gDACC,4BAED,qDACC,eACA,gCACA,ICoCa,KDnCb,OACA,WACA,YACA,aACA,sCACA,eACA,WACA,wBAED,2CACC,4BAKF,uBACC,eACA,gCACA,OACA,WACA,YACA,aACA,eACA,WAED,0DAEC,UAID,6CACC,kBAID,kDACC,0BAED,8CACC,wBAGD,wBACC,kBAID,gBACC,aAED,+BACC,6BAMF,0CACC,gCACC,6BACA,eACA,uCACC,wBAMA,4CACC,cAGF,iCACC,gCACA,iDACA,SACA,YACA,SACA,QACA,kBACA,oBACA,WACA,aACA,aAID,0CACC","file":"mobile.css"}
|
||||
|
|
@ -124,21 +124,6 @@
|
|||
min-width: variables.$breakpoint-mobile !important;
|
||||
}
|
||||
|
||||
/* do not show dates in filepicker */
|
||||
#oc-dialog-filepicker-content .filelist .column-size,
|
||||
#oc-dialog-filepicker-content .filelist .column-mtime,
|
||||
#oc-dialog-filepicker-content .filelist .filesize,
|
||||
#oc-dialog-filepicker-content .filelist .date {
|
||||
display: none;
|
||||
}
|
||||
#oc-dialog-filepicker-content .filelist .filename {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.snapjs-left table.multiselect thead {
|
||||
top: 44px;
|
||||
}
|
||||
|
||||
/* end of media query */
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -8,5 +8,5 @@
|
|||
@import 'mobile.scss';
|
||||
@import 'tooltip.scss';
|
||||
// If you include .css, it will be imported as url
|
||||
@import '../../node_modules/@nextcloud/dialogs/dist/index';
|
||||
@import '../../node_modules/@nextcloud/dialogs/dist/style';
|
||||
@import 'public.scss';
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
{"version":3,"sourceRoot":"","sources":["styles.scss"],"names":[],"mappings":"AAkBA,yQACC,SACA,UACA,SACA,oBACA,eACA,oBACA,wBACA,eACA,uDACA,qBAGD,6CACC,aAID,kGAEC,wDACA,aAGD,UACC,YAEA,8BAGD,6DACC,cAGD,KACC,gBAGD,MACC,yBACA,iBACA,mBAGD,cACC,gBACA,mBAGD,YACC,sBAGD,EACC,SACA,6BACA,qBACA,eACA,IACC,eAIF,WACC,aACA,0BAGD,MACC,eACA,QACC,eAIF,0BACC,eAGD,GACC,gBAGD,KACC,mBAEA,mCACA,uCACA,6BACA,6BAGD,mBACC,kBAGD,qBACC,kBACA,sBACA,qBACA,2BACA,2DACA,uBAGD,iBACC,qBACA,aACA,gCAGD,eACC,YACA,aAGD,cACC,eACA,MACA,SACA,OACA,YACA,WACA,aACA,kBACA,gDACA,wCACA,iBACA,eACA,kBACC,cACA,kBACA,UACA,QACA,gBAED,gBACC,wCACA,sDACA,4CACC,6CAOH,oBACC,WACA,YAGD,2BACC,+BAGD,gCACC,+BAGD,0BACC,kCACA,yCACA,+BACA,4BAMD,YACC,8CACA,wCAMD,kBACC,sBAKD,4BAEC,oCACA,kBACA,gBACA,WACA,sDACC,gBAED,sEACC,gBAED,kCACC,mBAED,oHAEC,qBACA,YACA,WACA,mBACA,gcAEC,WAOH,sBACC,WASD,oCACC,kBACA,yBACA,sBACA,qBACA,iBAKD,kBACC,kBACA,UACA,SACA,YAGD,8BACC,WACA,oBACA,wBACA,wBAGD,2EACC,WAED,oGACC,kDACA,UACA,qBAGD,mDACC,6BACA,YACA,WACA,yCACA,4BACA,2BACA,WAOA,qEACC,UAED,qEACC,UAIF,wEACC,aAGD,2CACC,mBAGD,yBACC,kBACA,qBACA,iBAED,qBACC,cACA,QACA,iBACA,kBACA,aAKD,4CACC,eACA,YACA,mCACA,6BACA,qDAIA,2BACC,4BAKD,wBACC,sBACA,4BACA,+BACC,2CACA,qBACA,kBAGF,0BACC,qBACA,gBAIF,YACC,YACA,8BACA,oBACC,sBAIF,eACC,2CAUD,mBACC,kBACA,cACA,2BACC,kBACA,cAIF,UACC,gBAGD,8CACC,UAIA,oGAGC,WAIF,mBACC,WACA,kBACA,QAEA,kDACC,UAIF,WACC,WACA,YAGD,eACC,WAIA,8CACC,UAKD,kDACC,UAKD,0CACC,UAKD,uGACC,8CAIF,KACC,mFAGD,OACC,gBACA,YACA,eACA,qBACA,UACC,qBAIF,2FACC,gBACA,uBAGD,2BACC,yDAGD,2BACC,6DAID,yBACC,gBACA,gBACA,WACA,mCACA,YACA,wBAEA,sKAGC,+BACA,mBAED,2CACC,YACA,eACA,YACA,8CACA,6BAEA,gEACC,cACA,mBAED,oDACC,WAEA,8EACC,yEAED,8EACC,wEAGF,oEACC,UAID,oDACC,mBACA,gCACA,WACA,WACA,YAED,0DACC,yBAGA,+FACC,gDAGD,wOAGC,8CACA,wCACA,iBAGD,yNAEC,gCACA,WAMJ,wCACC,gCACA,wCAKD,yBACC,2BACA,sBACA,mCACA,wBAEA,4CACC,uBAGD,sKAGC,+BACA,mBAED,2CACC,YACA,eACA,YACA,8CACA,6BAEA,gEACC,cACA,mBAIF,qFACC,iBAGA,iDACC,mBACA,gCACA,WACA,yDACC,UACA,WACA,iBAGF,uDACC,yBAGA,0TAIC,8CACA,wCACA,iBAGD,4FACC,gCAGD,qEACC,2CASH,oGACC,aACA,iBACA,8BACA,0GACC,cACA,SACA,YACA,YACA,WACA,aACA,mBACA,uBACA,8GACC,kBACA,kBACA,mBACA,6BACA,cACA,iBACA,WACA,YACA,YACA,eAOJ,8BACC,kBACA,aACA,sBAEA,uCACC,eACA,sBACA,oBACA,aAEA,yDACC,cACA,uCACA,4BACA,gCAGA,6DACC,eAED,uDACC,iBAED,oEACC,YACA,YAKH,mDACC,kBACA,+BACA,YACA,SACA,aACA,WACA,QACA,MAEA,4KAGC,kDACA,UAIF,iDACC,eACA,YACA,sBACA,oBACA,WACA,gBACA,eACA,8CACA,0CACA,wCACA,kBACA,UACA,QACA,QAEA,gEACC,sCACA,0BACA,WACA,YACA,WACA,WAGD,mDACC,WACA,YACA,gBAGD,uDACC,SACA,gBACA,4DACC,aACA,YAMH,kDACC,sBACA,qBACA,gBACA,OAGA,WACA,kBAED,4CACC,oCACA,kBACA,gBACA,WACA,aAED,wCACC,8CACA,WAED,0DAEC,kBACA,mBAEC,mEACC,4CACA,8CACA,sEACC,UACA,YAIH,0EACC,cACA,aACA,YACA,sBACA,2BACA,sBAED,+EACC,iBACA,iBAGD,6EACC,WACA,WACA,gBACA,qBACA,2BACA,WAED,qQAGC,kBAED,oLAEC,mBAGD,6DACC,aACA,4CAED,2EACC,mBAED,oEACC,gBACA,mBACA,uBACA,qBACA,4BACA,kBACA,4BACA,eAEA,YACA,oFACC,aACA,2FACC,gBACA,gBACA,uBAED,0FACC,gBAIH,oIACC,WAED,oEACC,iBAED,oEAIC,aACA,sBAEA,0EACC,aACA,+CACA,6BACA,aACA,cAEA,6EACC,cACA,kBACA,mCACA,QAhBS,KAiBT,aACA,sBACA,YAGA,gFACC,YACA,UACA,kBACA,mCAEA,yFACC,oBACA,+BACA,wBACA,YA/BU,KAgCV,eACA,yGACC,uBAGF,yFACC,iBACA,WAED,qFACC,kBACA,gBACA,uBACA,gBAON,2DACC,gDAIF,WACC,0BAGD,aACC,WACA,sBAKD,YACC,6BAMA,qBACC,WACA,aAED,wBACC,cACA,gDACA,WACA,aAED,2BACC,WACA,YACA,6BACC,WAGF,wBACC,wCACA,kBACA,mBACA,gBACA,uBACA,0CACA,kCACA,6DACC,0CAGF,sBACC,UACA,WAKF,YACC,oBACA,YAED,SACC,oBACA,kDACA,4BACA,iCACA,YACA,0BACA,cACA,QACA,kBACA,mBACC,QACA,kBACA,qBACC,WAIA,wFACC,cAIF,gCACC,SACA,iBACA,mCACC,iBACA,gBACA,kBACA,kBACA,+DACC,+EAGF,+CACC,aAIH,gBACC,aACA,uBACC,QAGF,yBAEC,kBACA,aACA,WACA,uBACA,mBACA,gBACA,cAEA,gBAEA,8FAGC,oBAGF,yBACC,UACA,WAID,oBACC,iBACA,kBAEA,2BACC,eAGF,+DACC,UAEA,0JAEC,WAOH,QACC,UACA,yCACA,sCACA,qCACA,oCACA,iCACA,oBACC,UAOD,+CACC,SACA,kBAED,mDACC,gBAKF,cACC,mBAMD,mBACC,aACA,QACA,SACA","file":"styles.css"}
|
||||
{"version":3,"sourceRoot":"","sources":["styles.scss"],"names":[],"mappings":"AAkBA,yQACC,SACA,UACA,SACA,oBACA,eACA,oBACA,wBACA,eACA,uDACA,qBAGD,6CACC,aAID,kGAEC,wDACA,aAGD,UACC,YAEA,8BAGD,6DACC,cAGD,KACC,gBAGD,MACC,yBACA,iBACA,mBAGD,cACC,gBACA,mBAGD,YACC,sBAGD,EACC,SACA,6BACA,qBACA,eACA,IACC,eAIF,WACC,aACA,0BAGD,MACC,eACA,QACC,eAIF,0BACC,eAGD,GACC,gBAGD,KACC,mBAEA,mCACA,uCACA,6BACA,6BAGD,mBACC,kBAGD,qBACC,kBACA,sBACA,qBACA,2BACA,2DACA,uBAGD,iBACC,qBACA,aACA,gCAGD,eACC,YACA,aAGD,cACC,eACA,MACA,SACA,OACA,YACA,WACA,aACA,kBACA,gDACA,wCACA,iBACA,eACA,kBACC,cACA,kBACA,UACA,QACA,gBAED,gBACC,wCACA,sDACA,4CACC,6CAOH,oBACC,WACA,YAGD,2BACC,+BAGD,gCACC,+BAGD,0BACC,kCACA,yCACA,+BACA,4BAMD,YACC,8CACA,wCAMD,kBACC,sBAKD,4BAEC,oCACA,kBACA,gBACA,WACA,sDACC,gBAED,sEACC,gBAED,kCACC,mBAED,oHAEC,qBACA,YACA,WACA,mBACA,gcAEC,WAOH,sBACC,WASD,oCACC,kBACA,yBACA,sBACA,qBACA,iBAKD,kBACC,kBACA,UACA,SACA,YAGD,8BACC,WACA,oBACA,wBACA,wBAGD,2EACC,WAED,oGACC,kDACA,UACA,qBAGD,mDACC,6BACA,YACA,WACA,yCACA,4BACA,2BACA,WAOA,qEACC,UAED,qEACC,UAIF,wEACC,aAGD,2CACC,mBAGD,yBACC,kBACA,qBACA,iBAED,qBACC,cACA,QACA,iBACA,kBACA,aAKD,4CACC,eACA,YACA,mCACA,6BACA,qDAIA,2BACC,4BAKD,wBACC,sBACA,4BACA,+BACC,2CACA,qBACA,kBAGF,0BACC,qBACA,gBAIF,YACC,YACA,8BACA,oBACC,sBAIF,eACC,2CAUD,mBACC,kBACA,cACA,2BACC,kBACA,cAIF,UACC,gBAGD,8CACC,UAIA,oGAGC,WAIF,mBACC,WACA,kBACA,QAEA,kDACC,UAIF,WACC,WACA,YAGD,eACC,WAIA,8CACC,UAKD,kDACC,UAKD,0CACC,UAKD,uGACC,8CAIF,KACC,mFAGD,OACC,gBACA,YACA,eACA,qBACA,UACC,qBAIF,2FACC,gBACA,uBAGD,2BACC,yDAGD,2BACC,6DAID,yBACC,gBACA,gBACA,WACA,mCACA,YACA,wBAEA,sKAGC,+BACA,mBAED,2CACC,YACA,eACA,YACA,8CACA,6BAEA,gEACC,cACA,mBAED,oDACC,WAEA,8EACC,yEAED,8EACC,wEAGF,oEACC,UAID,oDACC,mBACA,gCACA,WACA,WACA,YAED,0DACC,yBAGA,+FACC,gDAGD,wOAGC,8CACA,wCACA,iBAGD,yNAEC,gCACA,WAMJ,wCACC,gCACA,wCAKD,yBACC,2BACA,sBACA,mCACA,wBAEA,4CACC,uBAGD,sKAGC,+BACA,mBAED,2CACC,YACA,eACA,YACA,8CACA,6BAEA,gEACC,cACA,mBAIF,qFACC,iBAGA,iDACC,mBACA,gCACA,WACA,yDACC,UACA,WACA,iBAGF,uDACC,yBAGA,0TAIC,8CACA,wCACA,iBAGD,4FACC,gCAGD,qEACC,2CASH,oGACC,aACA,iBACA,8BACA,0GACC,cACA,SACA,YACA,YACA,WACA,aACA,mBACA,uBACA,8GACC,kBACA,kBACA,mBACA,6BACA,cACA,iBACA,WACA,YACA,YACA,eAOJ,WACC,0BAGD,aACC,WACA,sBAKD,YACC,6BAMA,qBACC,WACA,aAED,wBACC,cACA,gDACA,WACA,aAED,2BACC,WACA,YACA,6BACC,WAGF,wBACC,wCACA,kBACA,mBACA,gBACA,uBACA,0CACA,kCACA,6DACC,0CAGF,sBACC,UACA,WAKF,YACC,oBACA,YAED,SACC,oBACA,kDACA,4BACA,iCACA,YACA,0BACA,cACA,QACA,kBACA,mBACC,QACA,kBACA,qBACC,WAIA,wFACC,cAIF,gCACC,SACA,iBACA,mCACC,iBACA,gBACA,kBACA,kBACA,+DACC,+EAGF,+CACC,aAIH,gBACC,aACA,uBACC,QAGF,yBAEC,kBACA,aACA,WACA,uBACA,mBACA,gBACA,cAEA,gBAEA,8FAGC,oBAGF,yBACC,UACA,WAID,oBACC,iBACA,kBAEA,2BACC,eAGF,+DACC,UAEA,0JAEC,WAOH,QACC,UACA,yCACA,sCACA,qCACA,oCACA,iCACA,oBACC,UAOD,+CACC,SACA,kBAED,mDACC,gBAKF,cACC,mBAMD,mBACC,aACA,QACA,SACA","file":"styles.css"}
|
||||
|
|
@ -642,259 +642,6 @@ code {
|
|||
}
|
||||
|
||||
/* ---- DIALOGS ---- */
|
||||
#oc-dialog-filepicker-content {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction:column;
|
||||
|
||||
.dirtree {
|
||||
flex-wrap: wrap;
|
||||
box-sizing: border-box;
|
||||
padding-right: 140px;
|
||||
display: flex;
|
||||
|
||||
div:first-child a {
|
||||
font-size: 0px;
|
||||
background-image: var(--icon-home-dark);
|
||||
background-repeat: no-repeat;
|
||||
background-position: left center;
|
||||
}
|
||||
span {
|
||||
&:not(:last-child) {
|
||||
cursor: pointer;
|
||||
}
|
||||
&:last-child {
|
||||
font-weight: bold;
|
||||
}
|
||||
&:not(:last-child)::after {
|
||||
content: '>';
|
||||
padding: 3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#picker-showgridview {
|
||||
position: absolute;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 22px;
|
||||
opacity: .5;
|
||||
right: 0;
|
||||
top: 0;
|
||||
|
||||
&:hover,
|
||||
&:active,
|
||||
&:focus {
|
||||
box-shadow: 0 0 0 2px var(--color-primary-element);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.actions.creatable {
|
||||
flex-wrap: wrap;
|
||||
padding: 0px;
|
||||
box-sizing: border-box;
|
||||
display: inline-flex;
|
||||
float: none;
|
||||
max-height: 36px;
|
||||
max-width: 36px;
|
||||
background-color: var(--color-background-dark);
|
||||
border: 1px solid var(--color-border-dark);
|
||||
border-radius: var(--border-radius-pill);
|
||||
position: relative;
|
||||
left: 15px;
|
||||
top:3px;
|
||||
order:1;
|
||||
|
||||
.icon.icon-add{
|
||||
background-image: var(--icon-add-dark);
|
||||
background-size: 16px 16px;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
margin: 0px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
a {
|
||||
width: 36px;
|
||||
padding: 0px;
|
||||
position: static;
|
||||
}
|
||||
|
||||
.menu {
|
||||
top: 100%;
|
||||
margin-top: 10px;
|
||||
form {
|
||||
display: flex;
|
||||
margin: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.filelist-container {
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
/*height: 100%;*/
|
||||
/* overflow under the button row */
|
||||
width: 100%;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
.emptycontent {
|
||||
color: var(--color-text-maxcontrast);
|
||||
text-align: center;
|
||||
margin-top: 80px;
|
||||
width: 100%;
|
||||
display: none;
|
||||
}
|
||||
.filelist {
|
||||
background-color: var(--color-main-background);
|
||||
width: 100%;
|
||||
}
|
||||
#picker-filestable.filelist {
|
||||
/* prevent the filepicker to overflow */
|
||||
min-width: initial;
|
||||
margin-bottom: 50px;
|
||||
thead {
|
||||
tr {
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
background-color: var(--color-main-background);
|
||||
th {
|
||||
width: 80%;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
th .columntitle {
|
||||
display: block;
|
||||
padding: 15px;
|
||||
height: 50px;
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
vertical-align: middle;
|
||||
}
|
||||
th .columntitle.name {
|
||||
padding-left: 5px;
|
||||
margin-left: 50px;
|
||||
}
|
||||
|
||||
th .sort-indicator {
|
||||
width: 10px;
|
||||
height: 8px;
|
||||
margin-left: 5px;
|
||||
display: inline-block;
|
||||
vertical-align: text-bottom;
|
||||
opacity: .3;
|
||||
}
|
||||
.sort-indicator.hidden,
|
||||
th:hover .sort-indicator.hidden,
|
||||
th:focus .sort-indicator.hidden {
|
||||
visibility: hidden;
|
||||
}
|
||||
th:hover .sort-indicator.hidden,
|
||||
th:focus .sort-indicator.hidden {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 14px;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
.filename {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
background-size: 32px;
|
||||
background-repeat: no-repeat;
|
||||
padding-left: 51px;
|
||||
background-position: 7px 7px;
|
||||
cursor: pointer;
|
||||
// avoid taking full width
|
||||
max-width: 0;
|
||||
.filename-parts {
|
||||
display: flex;
|
||||
&__first {
|
||||
overflow: hidden;
|
||||
white-space: pre;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
&__last {
|
||||
white-space: pre;
|
||||
}
|
||||
}
|
||||
}
|
||||
.filesize, .date {
|
||||
width: 80px;
|
||||
}
|
||||
.filesize {
|
||||
text-align: right;
|
||||
}
|
||||
&.view-grid {
|
||||
$grid-size: 120px;
|
||||
$grid-pad: 10px;
|
||||
$name-height: 30px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
tbody {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, $grid-size);
|
||||
justify-content: space-around;
|
||||
row-gap: 15px;
|
||||
margin: 15px 0;
|
||||
|
||||
tr {
|
||||
display: block;
|
||||
position: relative;
|
||||
border-radius: var(--border-radius);
|
||||
padding: $grid-pad;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: $grid-size - 2 * $grid-pad;
|
||||
|
||||
|
||||
td {
|
||||
border: none;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
border-radius: var(--border-radius);
|
||||
|
||||
&.filename {
|
||||
padding: #{$grid-size - 2 * $grid-pad} 0 0 0;
|
||||
background-position: center top;
|
||||
background-size: contain;
|
||||
line-height: $name-height;
|
||||
max-width: none;
|
||||
.filename-parts {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
&.filesize {
|
||||
line-height: math.div($name-height, 3);
|
||||
width: 100%;
|
||||
}
|
||||
&.date {
|
||||
align-self: center;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
min-width: 110px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.filepicker_element_selected {
|
||||
background-color: var(--color-background-darker);
|
||||
}
|
||||
}
|
||||
|
||||
.ui-dialog {
|
||||
position: fixed !important;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,9 +47,12 @@
|
|||
import _ from 'underscore'
|
||||
import $ from 'jquery'
|
||||
|
||||
import IconMove from '@mdi/svg/svg/folder-move.svg?raw'
|
||||
import IconCopy from '@mdi/svg/svg/folder-multiple.svg?raw'
|
||||
|
||||
import OC from './index.js'
|
||||
import OCA from '../OCA/index.js'
|
||||
import { isA11yActivation } from '../Util/a11y.js'
|
||||
import { FilePickerType, getFilePickerBuilder } from '@nextcloud/dialogs'
|
||||
import { basename } from 'path'
|
||||
|
||||
/**
|
||||
* this class to ease the usage of jquery dialogs
|
||||
|
|
@ -59,10 +62,15 @@ const Dialogs = {
|
|||
YES_NO_BUTTONS: 70,
|
||||
OK_BUTTONS: 71,
|
||||
|
||||
/** @deprecated use FilePickerType from `@nextcloud/dialogs` */
|
||||
FILEPICKER_TYPE_CHOOSE: 1,
|
||||
/** @deprecated use FilePickerType from `@nextcloud/dialogs` */
|
||||
FILEPICKER_TYPE_MOVE: 2,
|
||||
/** @deprecated use FilePickerType from `@nextcloud/dialogs` */
|
||||
FILEPICKER_TYPE_COPY: 3,
|
||||
/** @deprecated use FilePickerType from `@nextcloud/dialogs` */
|
||||
FILEPICKER_TYPE_COPY_MOVE: 4,
|
||||
/** @deprecated use FilePickerType from `@nextcloud/dialogs` */
|
||||
FILEPICKER_TYPE_CUSTOM: 5,
|
||||
|
||||
// used to name each dialog
|
||||
|
|
@ -226,8 +234,11 @@ const Dialogs = {
|
|||
Dialogs.dialogsCounter++
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* show a file picker to pick a file from
|
||||
* Legacy wrapper to the new Vue based filepicker from `@nextcloud/dialogs`
|
||||
*
|
||||
* Prefer to use the Vue filepicker directly instead.
|
||||
*
|
||||
* In order to pick several types of mime types they need to be passed as an
|
||||
* array of strings.
|
||||
|
|
@ -237,339 +248,118 @@ const Dialogs = {
|
|||
* should be used instead.
|
||||
*
|
||||
* @param {string} title dialog title
|
||||
* @param {function} callback which will be triggered when user presses Choose
|
||||
* @param {Function} callback which will be triggered when user presses Choose
|
||||
* @param {boolean} [multiselect] whether it should be possible to select multiple files
|
||||
* @param {string[]} [mimetypeFilter] mimetype to filter by - directories will always be included
|
||||
* @param {boolean} [modal] make the dialog modal
|
||||
* @param {string[]} [mimetype] mimetype to filter by - directories will always be included
|
||||
* @param {boolean} [_modal] do not use
|
||||
* @param {string} [type] Type of file picker : Choose, copy, move, copy and move
|
||||
* @param {string} [path] path to the folder that the the file can be picket from
|
||||
* @param {Object} [options] additonal options that need to be set
|
||||
* @param {object} [options] additonal options that need to be set
|
||||
* @param {Function} [options.filter] filter function for advanced filtering
|
||||
* @param {boolean} [options.allowDirectoryChooser] Allow to select directories
|
||||
* @deprecated since 27.1.0 use the filepicker from `@nextcloud/dialogs` instead
|
||||
*/
|
||||
filepicker: function(title, callback, multiselect, mimetypeFilter, modal, type, path, options) {
|
||||
var self = this
|
||||
filepicker(title, callback, multiselect = false, mimetype = undefined, _modal = undefined, type = FilePickerType.Choose, path = undefined, options = undefined) {
|
||||
|
||||
this.filepicker.sortField = 'name'
|
||||
this.filepicker.sortOrder = 'asc'
|
||||
// avoid opening the picker twice
|
||||
if (this.filepicker.loading) {
|
||||
return
|
||||
}
|
||||
|
||||
if (type === undefined) {
|
||||
type = this.FILEPICKER_TYPE_CHOOSE
|
||||
}
|
||||
|
||||
var emptyText = t('core', 'No files in here')
|
||||
var newText = t('files', 'New folder')
|
||||
if (type === this.FILEPICKER_TYPE_COPY || type === this.FILEPICKER_TYPE_MOVE || type === this.FILEPICKER_TYPE_COPY_MOVE) {
|
||||
emptyText = t('core', 'No more subfolders in here')
|
||||
}
|
||||
|
||||
this.filepicker.loading = true
|
||||
this.filepicker.filesClient = (OCA.Sharing && OCA.Sharing.PublicApp && OCA.Sharing.PublicApp.fileList) ? OCA.Sharing.PublicApp.fileList.filesClient : OC.Files.getClient()
|
||||
|
||||
this.filelist = null
|
||||
path = path || ''
|
||||
options = Object.assign({
|
||||
allowDirectoryChooser: false
|
||||
}, options)
|
||||
|
||||
$.when(this._getFilePickerTemplate()).then(function($tmpl) {
|
||||
self.filepicker.loading = false
|
||||
var dialogName = 'oc-dialog-filepicker-content'
|
||||
if (self.$filePicker) {
|
||||
self.$filePicker.ocdialog('close')
|
||||
}
|
||||
|
||||
if (mimetypeFilter === undefined || mimetypeFilter === null) {
|
||||
mimetypeFilter = []
|
||||
}
|
||||
if (typeof (mimetypeFilter) === 'string') {
|
||||
mimetypeFilter = [mimetypeFilter]
|
||||
}
|
||||
|
||||
self.$filePicker = $tmpl.octemplate({
|
||||
dialog_name: dialogName,
|
||||
title: title,
|
||||
emptytext: emptyText,
|
||||
newtext: newText,
|
||||
nameCol: t('core', 'Name'),
|
||||
sizeCol: t('core', 'Size'),
|
||||
modifiedCol: t('core', 'Modified')
|
||||
}).data('path', path).data('multiselect', multiselect).data('mimetype', mimetypeFilter).data('allowDirectoryChooser', options.allowDirectoryChooser)
|
||||
if (typeof(options.filter) === 'function') {
|
||||
self.$filePicker.data('filter', options.filter)
|
||||
}
|
||||
|
||||
if (modal === undefined) {
|
||||
modal = false
|
||||
}
|
||||
if (multiselect === undefined) {
|
||||
multiselect = false
|
||||
}
|
||||
|
||||
$(options?.target ?? 'body').prepend(self.$filePicker)
|
||||
|
||||
self.$showGridView = $('button#picker-showgridview')
|
||||
self.$showGridView.on('click keydown', function(event) {
|
||||
if (isA11yActivation(event)) {
|
||||
self._onGridviewChange()
|
||||
/**
|
||||
* Create legacy callback wrapper to support old filepicker syntax
|
||||
* @param fn The original callback
|
||||
* @param type The file picker type which was used to pick the file(s)
|
||||
*/
|
||||
const legacyCallback = (fn, type) => {
|
||||
const getPath = (node) => {
|
||||
const root = node?.root || ''
|
||||
let path = node?.path || ''
|
||||
// TODO: Fix this in @nextcloud/files
|
||||
if (path.startsWith(root)) {
|
||||
path = path.slice(root.length) || '/'
|
||||
}
|
||||
})
|
||||
self._getGridSettings()
|
||||
|
||||
var newButton = self.$filePicker.find('.actions.creatable .button-add')
|
||||
if (type === self.FILEPICKER_TYPE_CHOOSE && !options.allowDirectoryChooser) {
|
||||
self.$filePicker.find('.actions.creatable').hide()
|
||||
}
|
||||
newButton.on('focus', function() {
|
||||
self.$filePicker.ocdialog('setEnterCallback', function(event) {
|
||||
event.stopImmediatePropagation()
|
||||
event.preventDefault()
|
||||
newButton.click()
|
||||
})
|
||||
})
|
||||
newButton.on('blur', function() {
|
||||
self.$filePicker.ocdialog('unsetEnterCallback')
|
||||
})
|
||||
|
||||
OC.registerMenu(newButton, self.$filePicker.find('.menu'), function() {
|
||||
$input.tooltip('hide')
|
||||
$input.focus()
|
||||
self.$filePicker.ocdialog('setEnterCallback', function(event) {
|
||||
event.stopImmediatePropagation()
|
||||
event.preventDefault()
|
||||
self.$filePicker.submit()
|
||||
})
|
||||
var newName = $input.val()
|
||||
var lastPos = newName.lastIndexOf('.')
|
||||
if (lastPos === -1) {
|
||||
lastPos = newName.length
|
||||
}
|
||||
$input.selectRange(0, lastPos)
|
||||
})
|
||||
var $form = self.$filePicker.find('.filenameform')
|
||||
var $input = $form.find('input[type=\'text\']')
|
||||
var $submit = $form.find('input[type=\'submit\']')
|
||||
$input.on('keydown', function(event) {
|
||||
if (isA11yActivation(event)) {
|
||||
event.stopImmediatePropagation()
|
||||
event.preventDefault()
|
||||
$form.submit()
|
||||
}
|
||||
})
|
||||
$submit.on('click', function(event) {
|
||||
event.stopImmediatePropagation()
|
||||
event.preventDefault()
|
||||
$form.submit()
|
||||
})
|
||||
|
||||
/**
|
||||
* Checks whether the given file name is valid.
|
||||
*
|
||||
* @param name file name to check
|
||||
* @return true if the file name is valid.
|
||||
* @throws a string exception with an error message if
|
||||
* the file name is not valid
|
||||
*
|
||||
* NOTE: This function is duplicated in the files app:
|
||||
* https://github.com/nextcloud/server/blob/b9bc2417e7a8dc81feb0abe20359bedaf864f790/apps/files/js/files.js#L127-L148
|
||||
*/
|
||||
var isFileNameValid = function (name) {
|
||||
var trimmedName = name.trim();
|
||||
if (trimmedName === '.' || trimmedName === '..')
|
||||
{
|
||||
throw t('files', '"{name}" is an invalid file name.', {name: name})
|
||||
} else if (trimmedName.length === 0) {
|
||||
throw t('files', 'File name cannot be empty.')
|
||||
} else if (trimmedName.indexOf('/') !== -1) {
|
||||
throw t('files', '"/" is not allowed inside a file name.')
|
||||
} else if (!!(trimmedName.match(OC.config.blacklist_files_regex))) {
|
||||
throw t('files', '"{name}" is not an allowed filetype', {name: name})
|
||||
}
|
||||
|
||||
return true
|
||||
return path
|
||||
}
|
||||
|
||||
var checkInput = function() {
|
||||
var filename = $input.val()
|
||||
try {
|
||||
if (!isFileNameValid(filename)) {
|
||||
// isFileNameValid(filename) throws an exception itself
|
||||
} else if (self.filelist.find(function(file) {
|
||||
return file.name === this
|
||||
}, filename)) {
|
||||
throw t('files', '{newName} already exists', { newName: filename }, undefined, {
|
||||
escape: false
|
||||
})
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
} catch (error) {
|
||||
$input.attr('title', error)
|
||||
$input.tooltip({
|
||||
placement: 'right',
|
||||
trigger: 'manual',
|
||||
'container': '.newFolderMenu'
|
||||
})
|
||||
$input.tooltip('_fixTitle')
|
||||
$input.tooltip('show')
|
||||
$input.addClass('error')
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
$form.on('submit', function(event) {
|
||||
event.stopPropagation()
|
||||
event.preventDefault()
|
||||
|
||||
if (checkInput()) {
|
||||
var newname = $input.val()
|
||||
self.filepicker.filesClient.createDirectory(self.$filePicker.data('path') + "/" + newname).always(function (status) {
|
||||
self._fillFilePicker(self.$filePicker.data('path') + "/" + newname, type)
|
||||
})
|
||||
OC.hideMenus()
|
||||
self.$filePicker.ocdialog('unsetEnterCallback')
|
||||
self.$filePicker.click()
|
||||
$input.val(newText)
|
||||
}
|
||||
})
|
||||
$input.on('input', function(event) {
|
||||
$input.tooltip('hide')
|
||||
})
|
||||
|
||||
self.$filePicker.ready(function() {
|
||||
self.$fileListHeader = self.$filePicker.find('.filelist thead tr')
|
||||
self.$filelist = self.$filePicker.find('.filelist tbody')
|
||||
self.$filelistContainer = self.$filePicker.find('.filelist-container')
|
||||
self.$dirTree = self.$filePicker.find('.dirtree')
|
||||
self.$dirTree.on('click keydown', '.crumb', self, function(event) {
|
||||
if (isA11yActivation(event)) {
|
||||
self._handleTreeListSelect(event, type)
|
||||
}
|
||||
})
|
||||
self.$filelist.on('click keydown', 'tr', function(event) {
|
||||
if (isA11yActivation(event)) {
|
||||
self._handlePickerClick(event, $(this), type)
|
||||
}
|
||||
})
|
||||
self.$fileListHeader.on('click keydown', 'a', function(event) {
|
||||
if (isA11yActivation(event)) {
|
||||
var dir = self.$filePicker.data('path')
|
||||
self.filepicker.sortField = $(event.currentTarget).data('sort')
|
||||
self.filepicker.sortOrder = self.filepicker.sortOrder === 'asc' ? 'desc' : 'asc'
|
||||
self._fillFilePicker(dir, type)
|
||||
}
|
||||
})
|
||||
self._fillFilePicker(path, type)
|
||||
})
|
||||
|
||||
// build buttons
|
||||
var functionToCall = function(returnType) {
|
||||
if (callback !== undefined) {
|
||||
var datapath
|
||||
if (multiselect === true) {
|
||||
datapath = []
|
||||
self.$filelist.find('tr.filepicker_element_selected').each(function(index, element) {
|
||||
datapath.push(self.$filePicker.data('path') + '/' + $(element).data('entryname'))
|
||||
})
|
||||
} else {
|
||||
datapath = self.$filePicker.data('path')
|
||||
var selectedName = self.$filelist.find('tr.filepicker_element_selected').data('entryname')
|
||||
if (selectedName) {
|
||||
datapath += '/' + selectedName
|
||||
}
|
||||
}
|
||||
callback(datapath, returnType)
|
||||
self.$filePicker.ocdialog('close')
|
||||
}
|
||||
}
|
||||
|
||||
var chooseCallback = function() {
|
||||
functionToCall(Dialogs.FILEPICKER_TYPE_CHOOSE)
|
||||
}
|
||||
|
||||
var copyCallback = function() {
|
||||
functionToCall(Dialogs.FILEPICKER_TYPE_COPY)
|
||||
}
|
||||
|
||||
var moveCallback = function() {
|
||||
functionToCall(Dialogs.FILEPICKER_TYPE_MOVE)
|
||||
}
|
||||
|
||||
var buttonlist = []
|
||||
if (type === Dialogs.FILEPICKER_TYPE_CHOOSE) {
|
||||
buttonlist.push({
|
||||
text: t('core', 'Choose'),
|
||||
click: chooseCallback,
|
||||
defaultButton: true
|
||||
})
|
||||
} else if (type === Dialogs.FILEPICKER_TYPE_CUSTOM) {
|
||||
options.buttons.forEach(function(button) {
|
||||
buttonlist.push({
|
||||
text: button.text,
|
||||
click: function() {
|
||||
functionToCall(button.type)
|
||||
},
|
||||
defaultButton: button.defaultButton
|
||||
})
|
||||
})
|
||||
if (multiselect) {
|
||||
return (nodes) => fn(nodes.map(getPath), type)
|
||||
} else {
|
||||
if (type === Dialogs.FILEPICKER_TYPE_COPY || type === Dialogs.FILEPICKER_TYPE_COPY_MOVE) {
|
||||
buttonlist.push({
|
||||
text: t('core', 'Copy'),
|
||||
click: copyCallback,
|
||||
defaultButton: false
|
||||
})
|
||||
}
|
||||
if (type === Dialogs.FILEPICKER_TYPE_MOVE || type === Dialogs.FILEPICKER_TYPE_COPY_MOVE) {
|
||||
buttonlist.push({
|
||||
text: t('core', 'Move'),
|
||||
click: moveCallback,
|
||||
defaultButton: true
|
||||
})
|
||||
}
|
||||
return (nodes) => fn(getPath(nodes[0]), type)
|
||||
}
|
||||
}
|
||||
|
||||
self.$filePicker.ocdialog({
|
||||
closeOnEscape: true,
|
||||
// max-width of 600
|
||||
width: 600,
|
||||
height: 500,
|
||||
modal: modal,
|
||||
buttons: buttonlist,
|
||||
style: {
|
||||
buttons: 'aside'
|
||||
},
|
||||
close: function() {
|
||||
try {
|
||||
$(this).ocdialog('destroy').remove()
|
||||
} catch (e) {
|
||||
}
|
||||
self.$filePicker = null
|
||||
}
|
||||
})
|
||||
|
||||
// We can access primary class only from oc-dialog.
|
||||
// Hence this is one of the approach to get the choose button.
|
||||
var getOcDialog = self.$filePicker.closest('.oc-dialog')
|
||||
var buttonEnableDisable = getOcDialog.find('.primary')
|
||||
if (self.$filePicker.data('mimetype').indexOf('httpd/unix-directory') !== -1 || self.$filePicker.data('allowDirectoryChooser')) {
|
||||
buttonEnableDisable.prop('disabled', false)
|
||||
} else {
|
||||
buttonEnableDisable.prop('disabled', true)
|
||||
}
|
||||
/**
|
||||
* Coverting a Node into a legacy file info to support the OC.dialogs.filepicker filter function
|
||||
* @param node The node to convert
|
||||
*/
|
||||
const nodeToLegacyFile = (node) => ({
|
||||
id: node.fileid || null,
|
||||
path: node.path,
|
||||
mimetype: node.mime || null,
|
||||
mtime: node.mtime?.getTime() || null,
|
||||
permissions: node.permissions,
|
||||
name: node.attributes?.displayName || node.basename,
|
||||
etag: node.attributes?.etag || null,
|
||||
hasPreview: node.attributes?.hasPreview || null,
|
||||
mountType: node.attributes?.mountType || null,
|
||||
quotaAvailableBytes: node.attributes?.quotaAvailableBytes || null,
|
||||
icon: null,
|
||||
sharePermissions: null,
|
||||
})
|
||||
.fail(function(status, error) {
|
||||
// If the method is called while navigating away
|
||||
// from the page, it is probably not needed ;)
|
||||
self.filepicker.loading = false
|
||||
if (status !== 0) {
|
||||
alert(t('core', 'Error loading file picker template: {error}', { error: error }))
|
||||
}
|
||||
|
||||
const builder = getFilePickerBuilder(title)
|
||||
|
||||
// Setup buttons
|
||||
if (type === this.FILEPICKER_TYPE_CUSTOM) {
|
||||
(options.buttons || []).forEach((button) => {
|
||||
builder.addButton({
|
||||
callback: legacyCallback(callback, button.type),
|
||||
label: button.text,
|
||||
type: button.defaultButton ? 'primary' : 'secondary',
|
||||
})
|
||||
})
|
||||
} else {
|
||||
builder.setButtonFactory((nodes, path) => {
|
||||
const buttons = []
|
||||
const node = nodes?.[0]?.attributes?.displayName || nodes?.[0]?.basename
|
||||
const target = node || basename(path)
|
||||
|
||||
if (type === FilePickerType.Choose) {
|
||||
buttons.push({
|
||||
callback: legacyCallback(callback, FilePickerType.Choose),
|
||||
label: node && !this.multiSelect ? t('core', 'Choose {file}', { file: node }) : t('core', 'Choose'),
|
||||
type: 'primary',
|
||||
})
|
||||
}
|
||||
if (type === FilePickerType.CopyMove || type === FilePickerType.Copy) {
|
||||
buttons.push({
|
||||
callback: legacyCallback(callback, FilePickerType.Copy),
|
||||
label: target ? t('core', 'Copy to {target}', { target }) : t('core', 'Copy'),
|
||||
type: 'primary',
|
||||
icon: IconCopy,
|
||||
})
|
||||
}
|
||||
if (type === FilePickerType.Move || type === FilePickerType.CopyMove) {
|
||||
buttons.push({
|
||||
callback: legacyCallback(callback, FilePickerType.Move),
|
||||
label: target ? t('core', 'Move to {target}', { target }) : t('core', 'Move'),
|
||||
type: type === FilePickerType.Move ? 'primary' : 'secondary',
|
||||
icon: IconMove,
|
||||
})
|
||||
}
|
||||
return buttons
|
||||
})
|
||||
}
|
||||
|
||||
if (mimetype) {
|
||||
builder.setMimeTypeFilter(typeof mimetype === 'string' ? [mimetype] : (mimetype || []))
|
||||
}
|
||||
if (typeof options?.filter === 'function') {
|
||||
builder.setFilter((node) => options.filter(nodeToLegacyFile(node)))
|
||||
}
|
||||
builder.allowDirectories(options?.allowDirectoryChooser === true || mimetype?.includes('httpd/unix-directory') || false)
|
||||
.setMultiSelect(multiselect)
|
||||
.startAt(path)
|
||||
.build()
|
||||
.pick()
|
||||
},
|
||||
|
||||
/**
|
||||
* Displays raw dialog
|
||||
* You better use a wrapper instead ...
|
||||
|
|
@ -1038,52 +828,7 @@ const Dialogs = {
|
|||
// }
|
||||
return dialogDeferred.promise()
|
||||
},
|
||||
// get the gridview setting and set the input accordingly
|
||||
_getGridSettings: function() {
|
||||
const self = this
|
||||
$.get(OC.generateUrl('/apps/files/api/v1/showgridview'), function(response) {
|
||||
self.$showGridView
|
||||
.removeClass('icon-toggle-filelist icon-toggle-pictures')
|
||||
.addClass(response.gridview ? 'icon-toggle-filelist' : 'icon-toggle-pictures')
|
||||
self.$showGridView.attr(
|
||||
'aria-label',
|
||||
response.gridview ? t('files', 'Show list view') : t('files', 'Show grid view'),
|
||||
)
|
||||
$('.list-container').toggleClass('view-grid', response.gridview)
|
||||
})
|
||||
},
|
||||
_onGridviewChange: function() {
|
||||
const isGridView = this.$showGridView.hasClass('icon-toggle-filelist')
|
||||
// only save state if user is logged in
|
||||
if (OC.currentUser) {
|
||||
$.post(OC.generateUrl('/apps/files/api/v1/showgridview'), { show: !isGridView })
|
||||
}
|
||||
this.$showGridView
|
||||
.removeClass('icon-toggle-filelist icon-toggle-pictures')
|
||||
.addClass(isGridView ? 'icon-toggle-pictures' : 'icon-toggle-filelist')
|
||||
this.$showGridView.attr(
|
||||
'aria-label',
|
||||
isGridView ? t('files', 'Show grid view') : t('files', 'Show list view'),
|
||||
)
|
||||
this.$filePicker.find('.list-container').toggleClass('view-grid', !isGridView)
|
||||
},
|
||||
_getFilePickerTemplate: function() {
|
||||
var defer = $.Deferred()
|
||||
if (!this.$filePickerTemplate) {
|
||||
var self = this
|
||||
$.get(OC.filePath('core', 'templates', 'filepicker.html'), function(tmpl) {
|
||||
self.$filePickerTemplate = $(tmpl)
|
||||
self.$listTmpl = self.$filePickerTemplate.find('.filelist tbody tr:first-child').detach()
|
||||
defer.resolve(self.$filePickerTemplate)
|
||||
})
|
||||
.fail(function(jqXHR, textStatus, errorThrown) {
|
||||
defer.reject(jqXHR.status, errorThrown)
|
||||
})
|
||||
} else {
|
||||
defer.resolve(this.$filePickerTemplate)
|
||||
}
|
||||
return defer.promise()
|
||||
},
|
||||
|
||||
_getMessageTemplate: function() {
|
||||
var defer = $.Deferred()
|
||||
if (!this.$messageTemplate) {
|
||||
|
|
@ -1116,274 +861,6 @@ const Dialogs = {
|
|||
}
|
||||
return defer.promise()
|
||||
},
|
||||
|
||||
/**
|
||||
* fills the filepicker with files
|
||||
*/
|
||||
_fillFilePicker: async function(dir, type) {
|
||||
var self = this
|
||||
this.$filelist.empty()
|
||||
this.$filePicker.find('.emptycontent').hide()
|
||||
this.$filelistContainer.addClass('icon-loading')
|
||||
this.$filePicker.data('path', dir)
|
||||
var filter = this.$filePicker.data('mimetype')
|
||||
var advancedFilter = this.$filePicker.data('filter')
|
||||
if (typeof (filter) === 'string') {
|
||||
filter = [filter]
|
||||
}
|
||||
self.$fileListHeader.find('.sort-indicator').addClass('hidden').removeClass('icon-triangle-n').removeClass('icon-triangle-s')
|
||||
self.$fileListHeader.find('[data-sort=' + self.filepicker.sortField + '] .sort-indicator').removeClass('hidden')
|
||||
if (self.filepicker.sortOrder === 'asc') {
|
||||
self.$fileListHeader.find('[data-sort=' + self.filepicker.sortField + '] .sort-indicator').addClass('icon-triangle-n')
|
||||
} else {
|
||||
self.$fileListHeader.find('[data-sort=' + self.filepicker.sortField + '] .sort-indicator').addClass('icon-triangle-s')
|
||||
}
|
||||
|
||||
// Wrap within a method because a promise cannot return multiple values
|
||||
// But the client impleemntation still does it...
|
||||
var getFolderContents = async function(dir) {
|
||||
return self.filepicker.filesClient.getFolderContents(dir)
|
||||
.then((status, files) => {
|
||||
return files
|
||||
})
|
||||
}
|
||||
|
||||
try {
|
||||
var files = await getFolderContents(dir)
|
||||
} catch (error) {
|
||||
// fallback to root if requested dir is non-existent
|
||||
console.error('Requested path does not exists, falling back to root')
|
||||
var files = await getFolderContents('/')
|
||||
this.$filePicker.data('path', '/')
|
||||
this._changeButtonsText(type, '')
|
||||
}
|
||||
|
||||
self.filelist = files
|
||||
if (filter && filter.length > 0 && filter.indexOf('*') === -1) {
|
||||
files = files.filter(function(file) {
|
||||
return file.type === 'dir' || filter.indexOf(file.mimetype) !== -1
|
||||
})
|
||||
}
|
||||
|
||||
if (advancedFilter) {
|
||||
files = files.filter(advancedFilter)
|
||||
}
|
||||
|
||||
// Check if the showHidden input field exist and if it exist follow it
|
||||
// Otherwise just show the hidden files
|
||||
const showHiddenInput = document.getElementById('showHiddenFiles')
|
||||
if (showHiddenInput?.value !== "1") {
|
||||
files = files.filter(function (file) {
|
||||
return !file.name.startsWith('.')
|
||||
})
|
||||
}
|
||||
|
||||
var Comparators = {
|
||||
name: function(fileInfo1, fileInfo2) {
|
||||
if (fileInfo1.type === 'dir' && fileInfo2.type !== 'dir') {
|
||||
return -1
|
||||
}
|
||||
if (fileInfo1.type !== 'dir' && fileInfo2.type === 'dir') {
|
||||
return 1
|
||||
}
|
||||
return OC.Util.naturalSortCompare(fileInfo1.name, fileInfo2.name)
|
||||
},
|
||||
size: function(fileInfo1, fileInfo2) {
|
||||
return fileInfo1.size - fileInfo2.size
|
||||
},
|
||||
mtime: function(fileInfo1, fileInfo2) {
|
||||
return fileInfo1.mtime - fileInfo2.mtime
|
||||
}
|
||||
}
|
||||
var comparator = Comparators[self.filepicker.sortField] || Comparators.name
|
||||
files = files.sort(function(file1, file2) {
|
||||
var isFavorite = function(fileInfo) {
|
||||
return fileInfo.tags && fileInfo.tags.indexOf(OC.TAG_FAVORITE) >= 0
|
||||
}
|
||||
|
||||
if (isFavorite(file1) && !isFavorite(file2)) {
|
||||
return -1
|
||||
} else if (!isFavorite(file1) && isFavorite(file2)) {
|
||||
return 1
|
||||
}
|
||||
|
||||
return self.filepicker.sortOrder === 'asc' ? comparator(file1, file2) : -comparator(file1, file2)
|
||||
})
|
||||
|
||||
self._fillSlug()
|
||||
|
||||
if (files.length === 0) {
|
||||
self.$filePicker.find('.emptycontent').show()
|
||||
self.$fileListHeader.hide()
|
||||
} else {
|
||||
self.$filePicker.find('.emptycontent').hide()
|
||||
self.$fileListHeader.show()
|
||||
}
|
||||
|
||||
self.$filelist.empty();
|
||||
|
||||
$.each(files, function(idx, entry) {
|
||||
if (entry.isEncrypted && entry.mimetype === 'httpd/unix-directory') {
|
||||
entry.icon = OC.MimeType.getIconUrl('dir-encrypted')
|
||||
} else {
|
||||
entry.icon = OC.MimeType.getIconUrl(entry.mimetype)
|
||||
}
|
||||
|
||||
var simpleSize, sizeColor
|
||||
if (typeof (entry.size) !== 'undefined' && entry.size >= 0) {
|
||||
simpleSize = OC.Util.humanFileSize(parseInt(entry.size, 10), true)
|
||||
sizeColor = Math.round(160 - Math.pow((entry.size / (1024 * 1024)), 2))
|
||||
} else {
|
||||
simpleSize = t('files', 'Pending')
|
||||
sizeColor = 80
|
||||
}
|
||||
|
||||
// split the filename in half if the size is bigger than 20 char
|
||||
// for ellipsis
|
||||
if (entry.name.length >= 10) {
|
||||
// leave maximum 10 letters
|
||||
var split = Math.min(Math.floor(entry.name.length / 2), 10)
|
||||
var filename1 = entry.name.substr(0, entry.name.length - split)
|
||||
var filename2 = entry.name.substr(entry.name.length - split)
|
||||
} else {
|
||||
var filename1 = entry.name
|
||||
var filename2 = ''
|
||||
}
|
||||
|
||||
var $row = self.$listTmpl.octemplate({
|
||||
type: entry.type,
|
||||
dir: dir,
|
||||
filename: entry.name,
|
||||
filename1: filename1,
|
||||
filename2: filename2,
|
||||
date: OC.Util.relativeModifiedDate(entry.mtime),
|
||||
size: simpleSize,
|
||||
sizeColor: sizeColor,
|
||||
icon: entry.icon
|
||||
})
|
||||
if (entry.type === 'file') {
|
||||
var urlSpec = {
|
||||
file: dir + '/' + entry.name,
|
||||
x: 100,
|
||||
y: 100
|
||||
}
|
||||
var img = new Image()
|
||||
var previewUrl = OC.generateUrl('/core/preview.png?') + $.param(urlSpec)
|
||||
img.onload = function() {
|
||||
if (img.width > 5) {
|
||||
$row.find('td.filename').attr('style', 'background-image:url(' + previewUrl + ')')
|
||||
}
|
||||
}
|
||||
img.src = previewUrl
|
||||
}
|
||||
self.$filelist.append($row)
|
||||
})
|
||||
|
||||
self.$filelistContainer.removeClass('icon-loading')
|
||||
},
|
||||
/**
|
||||
* fills the tree list with directories
|
||||
*/
|
||||
_fillSlug: function() {
|
||||
var addButton = this.$dirTree.find('.actions.creatable').detach()
|
||||
this.$dirTree.empty()
|
||||
var self = this
|
||||
|
||||
self.$dirTree.append('<nav></nav>')
|
||||
self.$dirTree.append(addButton)
|
||||
|
||||
var dir
|
||||
var path = this.$filePicker.data('path')
|
||||
var $template = $('<li data-dir="{dir}" tabindex="0"><a class="{classList}">{name}</a></li>').addClass('crumb')
|
||||
var $breadcrumbs = $('<ul class="breadcrumb"></ul>')
|
||||
if (path) {
|
||||
var paths = path.split('/')
|
||||
$.each(paths, function(index, dir) {
|
||||
dir = paths.pop()
|
||||
if (dir === '') {
|
||||
return false
|
||||
}
|
||||
$breadcrumbs.prepend($template.octemplate({
|
||||
dir: paths.join('/') + '/' + dir,
|
||||
name: dir
|
||||
}))
|
||||
})
|
||||
}
|
||||
$template.octemplate({
|
||||
dir: '',
|
||||
name: t('core', 'Home'),
|
||||
classList: 'icon-home'
|
||||
}, { escapeFunction: null }).addClass('crumb svg crumbhome').prependTo($breadcrumbs)
|
||||
|
||||
|
||||
this.$dirTree.find('> nav').prepend($breadcrumbs)
|
||||
},
|
||||
/**
|
||||
* handle selection made in the tree list
|
||||
*/
|
||||
_handleTreeListSelect: function(event, type) {
|
||||
var self = event.data
|
||||
var dir = $(event.target).closest('.crumb').data('dir')
|
||||
self._fillFilePicker(dir, type)
|
||||
var getOcDialog = (event.target).closest('.oc-dialog')
|
||||
var buttonEnableDisable = $('.primary', getOcDialog)
|
||||
this._changeButtonsText(type, dir.split(/[/]+/).pop())
|
||||
if (this.$filePicker.data('mimetype').indexOf('httpd/unix-directory') !== -1 || this.$filePicker.data('allowDirectoryChooser')) {
|
||||
buttonEnableDisable.prop('disabled', false)
|
||||
} else {
|
||||
buttonEnableDisable.prop('disabled', true)
|
||||
}
|
||||
},
|
||||
/**
|
||||
* handle clicks made in the filepicker
|
||||
*/
|
||||
_handlePickerClick: function(event, $element, type) {
|
||||
var getOcDialog = this.$filePicker.closest('.oc-dialog')
|
||||
var buttonEnableDisable = getOcDialog.find('.primary')
|
||||
if ($element.data('type') === 'file') {
|
||||
if (this.$filePicker.data('multiselect') !== true || !event.ctrlKey) {
|
||||
this.$filelist.find('.filepicker_element_selected').removeClass('filepicker_element_selected')
|
||||
}
|
||||
$element.toggleClass('filepicker_element_selected')
|
||||
buttonEnableDisable.prop('disabled', false)
|
||||
} else if ($element.data('type') === 'dir') {
|
||||
this._fillFilePicker(this.$filePicker.data('path') + '/' + $element.data('entryname'), type)
|
||||
this._changeButtonsText(type, $element.data('entryname'))
|
||||
if (this.$filePicker.data('mimetype').indexOf('httpd/unix-directory') !== -1 || this.$filePicker.data('allowDirectoryChooser')) {
|
||||
buttonEnableDisable.prop('disabled', false)
|
||||
} else {
|
||||
buttonEnableDisable.prop('disabled', true)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Handle
|
||||
* @param type of action
|
||||
* @param dir on which to change buttons text
|
||||
* @private
|
||||
*/
|
||||
_changeButtonsText: function(type, dir) {
|
||||
var copyText = dir === '' ? t('core', 'Copy') : t('core', 'Copy to {folder}', { folder: dir })
|
||||
var moveText = dir === '' ? t('core', 'Move') : t('core', 'Move to {folder}', { folder: dir })
|
||||
var buttons = $('.oc-dialog-buttonrow button')
|
||||
switch (type) {
|
||||
case this.FILEPICKER_TYPE_CHOOSE:
|
||||
break
|
||||
case this.FILEPICKER_TYPE_CUSTOM:
|
||||
break
|
||||
case this.FILEPICKER_TYPE_COPY:
|
||||
buttons.text(copyText)
|
||||
break
|
||||
case this.FILEPICKER_TYPE_MOVE:
|
||||
buttons.text(moveText)
|
||||
break
|
||||
case this.FILEPICKER_TYPE_COPY_MOVE:
|
||||
buttons.eq(0).text(copyText)
|
||||
buttons.eq(1).text(moveText)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default Dialogs
|
||||
|
|
|
|||
|
|
@ -35,6 +35,10 @@ import './globals.js'
|
|||
import './jquery/index.js'
|
||||
import { initCore } from './init.js'
|
||||
import { registerAppsSlideToggle } from './OC/apps.js'
|
||||
import { getRequestToken } from '@nextcloud/auth'
|
||||
|
||||
// eslint-disable-next-line camelcase
|
||||
__webpack_nonce__ = btoa(getRequestToken())
|
||||
|
||||
window.addEventListener('DOMContentLoaded', function() {
|
||||
initCore()
|
||||
|
|
|
|||
|
|
@ -1,61 +0,0 @@
|
|||
<div id="{dialog_name}" title="{title}">
|
||||
<span class="dirtree">
|
||||
<nav></nav>
|
||||
<span class="actions creatable"><a href="#" class="icon icon-add button button-add" aria-label="{newtext}"></a>
|
||||
<nav class="menu popovermenu bubble menu-left newFolderMenu">
|
||||
<ul><li>
|
||||
<form class="filenameform">
|
||||
<input type="text" value={newtext}>
|
||||
<input class="icon-confirm" type="submit" value="">
|
||||
</form>
|
||||
</li></ul>
|
||||
</nav>
|
||||
</span>
|
||||
|
||||
</span>
|
||||
|
||||
<button id="picker-showgridview" class="icon-toggle-pictures"></button>
|
||||
<div class="filelist-container">
|
||||
<div class="emptycontent">
|
||||
<div class="icon-folder"></div>
|
||||
<h2>{emptytext}</h2>
|
||||
</div>
|
||||
<table id="picker-filestable" class="filelist list-container view-grid">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="column-name">
|
||||
<div id="column-name-container">
|
||||
<a class="name sort columntitle" data-sort="name" tabindex="0">
|
||||
<span>{nameCol}</span>
|
||||
<span class="sort-indicator hidden icon-triangle-n"></span>
|
||||
</a>
|
||||
</div>
|
||||
</th>
|
||||
<th class="column-size">
|
||||
<a class="size sort columntitle" data-sort="size" tabindex="0">
|
||||
<span>{sizeCol}</span>
|
||||
<span class="sort-indicator hidden icon-triangle-n"></span></a>
|
||||
</th>
|
||||
<th class="column-mtime">
|
||||
<a id="modified" class="columntitle" data-sort="mtime" tabindex="0">
|
||||
<span>{modifiedCol}</span>
|
||||
<span class="sort-indicator hidden icon-triangle-n"></span></a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr data-entryname="{filename}" data-type="{type}" tabindex="0">
|
||||
<td class="filename"
|
||||
style="background-image:url({icon})">
|
||||
<span class="filename-parts">
|
||||
<span class="filename-parts__first">{filename1}</span>
|
||||
<span class="filename-parts__last">{filename2}</span>
|
||||
</span>
|
||||
</td>
|
||||
<td class="filesize">{size}</td>
|
||||
<td class="date">{date}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -210,10 +210,17 @@ describe('User select a custom background', function() {
|
|||
it('Select a custom background', function() {
|
||||
cy.intercept('*/apps/theming/background/custom').as('setBackground')
|
||||
|
||||
cy.on('uncaught:exception', (err) => {
|
||||
// This can happen because of blink engine & skeleton animation, its not a bug just engine related.
|
||||
if (err.message.includes('ResizeObserver loop limit exceeded')) {
|
||||
return false
|
||||
}
|
||||
})
|
||||
|
||||
// Pick background
|
||||
cy.get('[data-user-theming-background-custom]').click()
|
||||
cy.get(`#picker-filestable tr[data-entryname="${image}"]`).click()
|
||||
cy.get('#oc-dialog-filepicker-content ~ .oc-dialog-buttonrow button.primary').click()
|
||||
cy.get('.file-picker__files tr').contains(image).click()
|
||||
cy.get('.dialog__actions .button-vue--vue-primary').click()
|
||||
|
||||
// Wait for background to be set
|
||||
cy.wait('@setBackground')
|
||||
|
|
@ -242,10 +249,17 @@ describe('User changes settings and reload the page', function() {
|
|||
it('Select a custom background', function() {
|
||||
cy.intercept('*/apps/theming/background/custom').as('setBackground')
|
||||
|
||||
cy.on('uncaught:exception', (err) => {
|
||||
// This can happen because of blink engine & skeleton animation, its not a bug just engine related.
|
||||
if (err.message.includes('ResizeObserver loop limit exceeded')) {
|
||||
return false
|
||||
}
|
||||
})
|
||||
|
||||
// Pick background
|
||||
cy.get('[data-user-theming-background-custom]').click()
|
||||
cy.get(`#picker-filestable tr[data-entryname="${image}"]`).click()
|
||||
cy.get('#oc-dialog-filepicker-content ~ .oc-dialog-buttonrow button.primary').click()
|
||||
cy.get('.file-picker__files tr').contains(image).click()
|
||||
cy.get('.dialog__actions .button-vue--vue-primary').click()
|
||||
|
||||
// Wait for background to be set
|
||||
cy.wait('@setBackground')
|
||||
|
|
|
|||
4
dist/2323-2323.js
vendored
4
dist/2323-2323.js
vendored
File diff suppressed because one or more lines are too long
2
dist/2323-2323.js.map
vendored
2
dist/2323-2323.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/2798-2798.js
vendored
4
dist/2798-2798.js
vendored
File diff suppressed because one or more lines are too long
2
dist/2798-2798.js.map
vendored
2
dist/2798-2798.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/9546-9546.js
vendored
Normal file
2
dist/9546-9546.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/9546-9546.js.map
vendored
Normal file
1
dist/9546-9546.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
4
dist/comments-comments-app.js
vendored
4
dist/comments-comments-app.js
vendored
File diff suppressed because one or more lines are too long
2
dist/comments-comments-app.js.map
vendored
2
dist/comments-comments-app.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/core-common.js
vendored
4
dist/core-common.js
vendored
File diff suppressed because one or more lines are too long
2
dist/core-common.js.map
vendored
2
dist/core-common.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/core-files_client.js
vendored
4
dist/core-files_client.js
vendored
File diff suppressed because one or more lines are too long
2
dist/core-files_client.js.map
vendored
2
dist/core-files_client.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/core-install.js
vendored
4
dist/core-install.js
vendored
File diff suppressed because one or more lines are too long
2
dist/core-install.js.map
vendored
2
dist/core-install.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/core-login.js
vendored
4
dist/core-login.js
vendored
File diff suppressed because one or more lines are too long
2
dist/core-login.js.map
vendored
2
dist/core-login.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/core-main.js
vendored
4
dist/core-main.js
vendored
File diff suppressed because one or more lines are too long
46
dist/core-main.js.LICENSE.txt
vendored
46
dist/core-main.js.LICENSE.txt
vendored
|
|
@ -303,30 +303,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @copyright 2018 Christoph Wurst <christoph@winzerhof-wurst.at>
|
||||
*
|
||||
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
* @author Roeland Jago Douma <roeland@famdouma.nl>
|
||||
*
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
|
||||
*
|
||||
|
|
@ -468,6 +444,28 @@
|
|||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @copyright 2022 Christopher Ng <chrng8@gmail.com>
|
||||
*
|
||||
* @author Christopher Ng <chrng8@gmail.com>
|
||||
*
|
||||
* @license AGPL-3.0-or-later
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2016 Christoph Wurst <christoph@winzerhof-wurst.at>
|
||||
*
|
||||
|
|
|
|||
2
dist/core-main.js.map
vendored
2
dist/core-main.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/core-maintenance.js
vendored
4
dist/core-maintenance.js
vendored
|
|
@ -1,2 +1,2 @@
|
|||
!function(){"use strict";var n,e={49e3:function(n,e,t){var o=t(48033),r=t(79753),i=t(25108),u=(0,r.getRootUrl)()+"/status.php";!function n(){i.info("checking the Nextcloud maintenance status"),o.Z.get(u).then((function(n){return n.data})).then((function(e){if(!1===e.maintenance)return i.info("Nextcloud is not in maintenance mode anymore -> reloading"),void window.location.reload();i.info("Nextcloud is still in maintenance mode"),setTimeout(n,2e4)})).catch(i.error.bind(void 0))}()}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=e,n=[],o.O=function(e,t,r,i){if(!t){var u=1/0;for(l=0;l<n.length;l++){t=n[l][0],r=n[l][1],i=n[l][2];for(var c=!0,a=0;a<t.length;a++)(!1&i||u>=i)&&Object.keys(o.O).every((function(n){return o.O[n](t[a])}))?t.splice(a--,1):(c=!1,i<u&&(u=i));if(c){n.splice(l--,1);var f=r();void 0!==f&&(e=f)}}return e}i=i||0;for(var l=n.length;l>0&&n[l-1][2]>i;l--)n[l]=n[l-1];n[l]=[t,r,i]},o.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return o.d(e,{a:e}),e},o.d=function(n,e){for(var t in e)o.o(e,t)&&!o.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:e[t]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),o.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},o.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},o.nmd=function(n){return n.paths=[],n.children||(n.children=[]),n},o.j=1802,function(){o.b=document.baseURI||self.location.href;var n={1802:0};o.O.j=function(e){return 0===n[e]};var e=function(e,t){var r,i,u=t[0],c=t[1],a=t[2],f=0;if(u.some((function(e){return 0!==n[e]}))){for(r in c)o.o(c,r)&&(o.m[r]=c[r]);if(a)var l=a(o)}for(e&&e(t);f<u.length;f++)i=u[f],o.o(n,i)&&n[i]&&n[i][0](),n[i]=0;return o.O(l)},t=self.webpackChunknextcloud=self.webpackChunknextcloud||[];t.forEach(e.bind(null,0)),t.push=e.bind(null,t.push.bind(t))}(),o.nc=void 0;var r=o.O(void 0,[7874],(function(){return o(49e3)}));r=o.O(r)}();
|
||||
//# sourceMappingURL=core-maintenance.js.map?v=991df5273580c28dd89a
|
||||
!function(){"use strict";var n,e={49e3:function(n,e,t){var o=t(48033),r=t(79753),i=t(25108),u=(0,r.getRootUrl)()+"/status.php";!function n(){i.info("checking the Nextcloud maintenance status"),o.Z.get(u).then((function(n){return n.data})).then((function(e){if(!1===e.maintenance)return i.info("Nextcloud is not in maintenance mode anymore -> reloading"),void window.location.reload();i.info("Nextcloud is still in maintenance mode"),setTimeout(n,2e4)})).catch(i.error.bind(void 0))}()}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=e,n=[],o.O=function(e,t,r,i){if(!t){var u=1/0;for(l=0;l<n.length;l++){t=n[l][0],r=n[l][1],i=n[l][2];for(var c=!0,a=0;a<t.length;a++)(!1&i||u>=i)&&Object.keys(o.O).every((function(n){return o.O[n](t[a])}))?t.splice(a--,1):(c=!1,i<u&&(u=i));if(c){n.splice(l--,1);var f=r();void 0!==f&&(e=f)}}return e}i=i||0;for(var l=n.length;l>0&&n[l-1][2]>i;l--)n[l]=n[l-1];n[l]=[t,r,i]},o.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return o.d(e,{a:e}),e},o.d=function(n,e){for(var t in e)o.o(e,t)&&!o.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:e[t]})},o.e=function(){return Promise.resolve()},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),o.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},o.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},o.nmd=function(n){return n.paths=[],n.children||(n.children=[]),n},o.j=1802,function(){o.b=document.baseURI||self.location.href;var n={1802:0};o.O.j=function(e){return 0===n[e]};var e=function(e,t){var r,i,u=t[0],c=t[1],a=t[2],f=0;if(u.some((function(e){return 0!==n[e]}))){for(r in c)o.o(c,r)&&(o.m[r]=c[r]);if(a)var l=a(o)}for(e&&e(t);f<u.length;f++)i=u[f],o.o(n,i)&&n[i]&&n[i][0](),n[i]=0;return o.O(l)},t=self.webpackChunknextcloud=self.webpackChunknextcloud||[];t.forEach(e.bind(null,0)),t.push=e.bind(null,t.push.bind(t))}(),o.nc=void 0;var r=o.O(void 0,[7874],(function(){return o(49e3)}));r=o.O(r)}();
|
||||
//# sourceMappingURL=core-maintenance.js.map?v=b86da2eed72a6f76d114
|
||||
2
dist/core-maintenance.js.map
vendored
2
dist/core-maintenance.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/core-profile.js
vendored
4
dist/core-profile.js
vendored
File diff suppressed because one or more lines are too long
2
dist/core-profile.js.map
vendored
2
dist/core-profile.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/core-recommendedapps.js
vendored
4
dist/core-recommendedapps.js
vendored
File diff suppressed because one or more lines are too long
2
dist/core-recommendedapps.js.map
vendored
2
dist/core-recommendedapps.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/core-systemtags.js
vendored
4
dist/core-systemtags.js
vendored
File diff suppressed because one or more lines are too long
2
dist/core-systemtags.js.map
vendored
2
dist/core-systemtags.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/core-unified-search.js
vendored
4
dist/core-unified-search.js
vendored
File diff suppressed because one or more lines are too long
2
dist/core-unified-search.js.map
vendored
2
dist/core-unified-search.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/dashboard-main.js
vendored
4
dist/dashboard-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/dashboard-main.js.map
vendored
2
dist/dashboard-main.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/dav-settings-admin-caldav.js
vendored
4
dist/dav-settings-admin-caldav.js
vendored
File diff suppressed because one or more lines are too long
2
dist/dav-settings-admin-caldav.js.map
vendored
2
dist/dav-settings-admin-caldav.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/dav-settings-personal-availability.js
vendored
4
dist/dav-settings-personal-availability.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
dist/files-main.js
vendored
4
dist/files-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-main.js.map
vendored
2
dist/files-main.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/files-personal-settings.js
vendored
4
dist/files-personal-settings.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-personal-settings.js.map
vendored
2
dist/files-personal-settings.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/files-reference-files.js
vendored
4
dist/files-reference-files.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-reference-files.js.map
vendored
2
dist/files-reference-files.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/files-sidebar.js
vendored
4
dist/files-sidebar.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-sidebar.js.map
vendored
2
dist/files-sidebar.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/files_external-main.js
vendored
4
dist/files_external-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_external-main.js.map
vendored
2
dist/files_external-main.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/files_reminders-main.js
vendored
4
dist/files_reminders-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_reminders-main.js.map
vendored
2
dist/files_reminders-main.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/files_sharing-additionalScripts.js
vendored
4
dist/files_sharing-additionalScripts.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_sharing-additionalScripts.js.map
vendored
2
dist/files_sharing-additionalScripts.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/files_sharing-files_sharing.js
vendored
4
dist/files_sharing-files_sharing.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_sharing-files_sharing.js.map
vendored
2
dist/files_sharing-files_sharing.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/files_sharing-files_sharing_tab.js
vendored
4
dist/files_sharing-files_sharing_tab.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_sharing-files_sharing_tab.js.map
vendored
2
dist/files_sharing-files_sharing_tab.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/files_sharing-personal-settings.js
vendored
4
dist/files_sharing-personal-settings.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_sharing-personal-settings.js.map
vendored
2
dist/files_sharing-personal-settings.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/files_trashbin-main.js
vendored
4
dist/files_trashbin-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_trashbin-main.js.map
vendored
2
dist/files_trashbin-main.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/files_versions-files_versions.js
vendored
4
dist/files_versions-files_versions.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files_versions-files_versions.js.map
vendored
2
dist/files_versions-files_versions.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/oauth2-oauth2.js
vendored
4
dist/oauth2-oauth2.js
vendored
File diff suppressed because one or more lines are too long
2
dist/oauth2-oauth2.js.map
vendored
2
dist/oauth2-oauth2.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/settings-apps-view-7418.js
vendored
4
dist/settings-apps-view-7418.js
vendored
File diff suppressed because one or more lines are too long
2
dist/settings-apps-view-7418.js.map
vendored
2
dist/settings-apps-view-7418.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/settings-apps.js
vendored
4
dist/settings-apps.js
vendored
|
|
@ -1,2 +1,2 @@
|
|||
!function(){"use strict";var n,e={49983:function(n,e,t){var r=t(48033),o=t(79753),i=t(69183);window.OC.Settings=window.OC.Settings||{},window.OC.Settings.Apps=window.OC.Settings.Apps||{rebuildNavigation:function(){return r.Z.get((0,o.generateOcsUrl)("core/navigation",2)+"/apps?format=json").then((function(n){var e=n.data;200===e.ocs.meta.statuscode&&((0,i.j8)("nextcloud:app-menu.refresh",{apps:e.ocs.data}),window.dispatchEvent(new Event("resize")))}))}}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.m=e,n=[],r.O=function(e,t,o,i){if(!t){var u=1/0;for(d=0;d<n.length;d++){t=n[d][0],o=n[d][1],i=n[d][2];for(var a=!0,c=0;c<t.length;c++)(!1&i||u>=i)&&Object.keys(r.O).every((function(n){return r.O[n](t[c])}))?t.splice(c--,1):(a=!1,i<u&&(u=i));if(a){n.splice(d--,1);var f=o();void 0!==f&&(e=f)}}return e}i=i||0;for(var d=n.length;d>0&&n[d-1][2]>i;d--)n[d]=n[d-1];n[d]=[t,o,i]},r.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(e,{a:e}),e},r.d=function(n,e){for(var t in e)r.o(e,t)&&!r.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:e[t]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.nmd=function(n){return n.paths=[],n.children||(n.children=[]),n},r.j=1647,function(){r.b=document.baseURI||self.location.href;var n={1647:0};r.O.j=function(e){return 0===n[e]};var e=function(e,t){var o,i,u=t[0],a=t[1],c=t[2],f=0;if(u.some((function(e){return 0!==n[e]}))){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(c)var d=c(r)}for(e&&e(t);f<u.length;f++)i=u[f],r.o(n,i)&&n[i]&&n[i][0](),n[i]=0;return r.O(d)},t=self.webpackChunknextcloud=self.webpackChunknextcloud||[];t.forEach(e.bind(null,0)),t.push=e.bind(null,t.push.bind(t))}(),r.nc=void 0;var o=r.O(void 0,[7874],(function(){return r(49983)}));o=r.O(o)}();
|
||||
//# sourceMappingURL=settings-apps.js.map?v=ca25e15dcfaa1d8d2572
|
||||
!function(){"use strict";var n,e={49983:function(n,e,t){var r=t(48033),o=t(79753),i=t(69183);window.OC.Settings=window.OC.Settings||{},window.OC.Settings.Apps=window.OC.Settings.Apps||{rebuildNavigation:function(){return r.Z.get((0,o.generateOcsUrl)("core/navigation",2)+"/apps?format=json").then((function(n){var e=n.data;200===e.ocs.meta.statuscode&&((0,i.j8)("nextcloud:app-menu.refresh",{apps:e.ocs.data}),window.dispatchEvent(new Event("resize")))}))}}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.m=e,n=[],r.O=function(e,t,o,i){if(!t){var u=1/0;for(s=0;s<n.length;s++){t=n[s][0],o=n[s][1],i=n[s][2];for(var a=!0,c=0;c<t.length;c++)(!1&i||u>=i)&&Object.keys(r.O).every((function(n){return r.O[n](t[c])}))?t.splice(c--,1):(a=!1,i<u&&(u=i));if(a){n.splice(s--,1);var f=o();void 0!==f&&(e=f)}}return e}i=i||0;for(var s=n.length;s>0&&n[s-1][2]>i;s--)n[s]=n[s-1];n[s]=[t,o,i]},r.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(e,{a:e}),e},r.d=function(n,e){for(var t in e)r.o(e,t)&&!r.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:e[t]})},r.e=function(){return Promise.resolve()},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.nmd=function(n){return n.paths=[],n.children||(n.children=[]),n},r.j=1647,function(){r.b=document.baseURI||self.location.href;var n={1647:0};r.O.j=function(e){return 0===n[e]};var e=function(e,t){var o,i,u=t[0],a=t[1],c=t[2],f=0;if(u.some((function(e){return 0!==n[e]}))){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(c)var s=c(r)}for(e&&e(t);f<u.length;f++)i=u[f],r.o(n,i)&&n[i]&&n[i][0](),n[i]=0;return r.O(s)},t=self.webpackChunknextcloud=self.webpackChunknextcloud||[];t.forEach(e.bind(null,0)),t.push=e.bind(null,t.push.bind(t))}(),r.nc=void 0;var o=r.O(void 0,[7874],(function(){return r(49983)}));o=r.O(o)}();
|
||||
//# sourceMappingURL=settings-apps.js.map?v=2aa3a3d9e4f3e5c8cb84
|
||||
2
dist/settings-apps.js.map
vendored
2
dist/settings-apps.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/settings-users-8351.js
vendored
4
dist/settings-users-8351.js
vendored
File diff suppressed because one or more lines are too long
2
dist/settings-users-8351.js.map
vendored
2
dist/settings-users-8351.js.map
vendored
File diff suppressed because one or more lines are too long
4
dist/settings-vue-settings-admin-ai.js
vendored
4
dist/settings-vue-settings-admin-ai.js
vendored
File diff suppressed because one or more lines are too long
2
dist/settings-vue-settings-admin-ai.js.map
vendored
2
dist/settings-vue-settings-admin-ai.js.map
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
dist/settings-vue-settings-admin-security.js
vendored
4
dist/settings-vue-settings-admin-security.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue