Compare commits
75 Commits
v29.0.3
...
v25.0.0rc2
| Author | SHA1 | Date | |
|---|---|---|---|
| ce1dddcc64 | |||
| b84eb26f72 | |||
| b6fd615bf7 | |||
| 68284b87f2 | |||
| 904ac63310 | |||
| 1f27bd153b | |||
| 92a4ce9f3b | |||
| 729b78708f | |||
| 8b34878771 | |||
| a5c5740e84 | |||
| ab51e4ef24 | |||
| d442a3c1be | |||
| 6ac50c26ef | |||
| 4aeb701b87 | |||
| 9c073fd760 | |||
| 413610ede4 | |||
| c12f26867d | |||
| 847535ee88 | |||
| d9c07af32a | |||
| e85870afa7 | |||
| 7bdaa9fa04 | |||
| 9c21bda303 | |||
| 3bb4d01a7c | |||
| 99cb56cda2 | |||
| a85d1cad6a | |||
| 6965d4b4af | |||
| 4441416245 | |||
| 96423a1172 | |||
| 2d86948c34 | |||
| dbc421580e | |||
| 89f8179e64 | |||
| bc9f3d3d4c | |||
| 9fe747f2c5 | |||
| 6f8b3916ad | |||
| 82e9af439e | |||
| c471c8d6de | |||
| 42ca267d83 | |||
| 981da3d49f | |||
| 7083596dc1 | |||
| ac2e94f121 | |||
| de295ba8dd | |||
| 5d078383b6 | |||
| e938bbec19 | |||
| 1f0f227b43 | |||
| b2fa292ee8 | |||
| cc6b12a166 | |||
| b45d342654 | |||
| e43814f74d | |||
| 611b920e3d | |||
| c25d61c7b8 | |||
| 4be6d23d00 | |||
| f2bd15229a | |||
| a703818ee7 | |||
| 5ee61a5fc6 | |||
| 019e85d92c | |||
| 1fae3ae4ae | |||
| c6c4328e2a | |||
| aff9302638 | |||
| 1115199ae3 | |||
| 86b787d21e | |||
| 359a37fd10 | |||
| 079a8c0e0f | |||
| 42bc4a0b2a | |||
| 205760a3aa | |||
| 2948697257 | |||
| 3c47caf08b | |||
| 515e05cf16 | |||
| 060230eec7 | |||
| b2a893abad | |||
| 95dcc610fc | |||
| a5a8f4e9ef | |||
| 9366ec0fb8 | |||
| bfaa31af61 | |||
| 063aac8ebc | |||
| 773826f9e1 |
+1
-1
@@ -1214,7 +1214,7 @@ steps:
|
||||
commands:
|
||||
# JavaScript files are not used in integration tests so it is not needed to
|
||||
# build them.
|
||||
- git clone --depth 1 https://github.com/nextcloud/spreed apps/spreed
|
||||
- git clone --depth 1 --branch stable25 https://github.com/nextcloud/spreed apps/spreed
|
||||
- name: integration-sharing-v1-video-verification
|
||||
image: ghcr.io/nextcloud/continuous-integration-integration-php7.4:latest
|
||||
commands:
|
||||
|
||||
+1
-1
Submodule 3rdparty updated: f143482ffb...3095d40628
@@ -88,7 +88,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { generateUrl, imagePath } from '@nextcloud/router'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import { getCurrentUser } from '@nextcloud/auth'
|
||||
import { loadState } from '@nextcloud/initial-state'
|
||||
import axios from '@nextcloud/axios'
|
||||
@@ -99,13 +99,11 @@ import Pencil from 'vue-material-design-icons/Pencil.vue'
|
||||
import Vue from 'vue'
|
||||
|
||||
import isMobile from './mixins/isMobile.js'
|
||||
import { getBackgroundUrl } from './helpers/getBackgroundUrl.js'
|
||||
|
||||
const panels = loadState('dashboard', 'panels')
|
||||
const firstRun = loadState('dashboard', 'firstRun')
|
||||
|
||||
const background = loadState('theming', 'background')
|
||||
const backgroundVersion = loadState('theming', 'backgroundVersion')
|
||||
const themingDefaultBackground = loadState('theming', 'themingDefaultBackground')
|
||||
const shippedBackgroundList = loadState('theming', 'shippedBackgrounds')
|
||||
|
||||
@@ -155,19 +153,6 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
backgroundImage() {
|
||||
return getBackgroundUrl(this.background, backgroundVersion, this.themingDefaultBackground)
|
||||
},
|
||||
backgroundStyle() {
|
||||
if ((this.background === 'default' && this.themingDefaultBackground === 'backgroundColor')
|
||||
|| this.background.match(/#[0-9A-Fa-f]{6}/g)) {
|
||||
return null
|
||||
}
|
||||
|
||||
return {
|
||||
backgroundImage: this.background === 'default' ? 'var(--image-main-background)' : `url('${this.backgroundImage}')`,
|
||||
}
|
||||
},
|
||||
greeting() {
|
||||
const time = this.timer.getHours()
|
||||
|
||||
@@ -286,17 +271,6 @@ export default {
|
||||
// document.body.removeAttribute('data-theme-light')
|
||||
// document.body.setAttribute('data-theme-dark', 'true')
|
||||
}
|
||||
|
||||
const themeElements = [document.documentElement, document.querySelector('#header'), document.querySelector('body')]
|
||||
for (const element of themeElements) {
|
||||
if (this.background === 'default') {
|
||||
element.style.setProperty('--image-main-background', `url('${imagePath('core', 'app-background.jpg')}')`)
|
||||
} else if (this.background.match(/#[0-9A-Fa-f]{6}/g)) {
|
||||
element.style.setProperty('--image-main-background', undefined)
|
||||
} else {
|
||||
element.style.setProperty('--image-main-background', this.backgroundStyle.backgroundImage)
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Method to register panels that will be called by the integrating apps
|
||||
@@ -441,7 +415,7 @@ export default {
|
||||
.panels {
|
||||
width: auto;
|
||||
margin: auto;
|
||||
max-width: 1500px;
|
||||
max-width: 1800px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: row;
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
/**
|
||||
* @copyright Copyright (c) 2020 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @author Avior <florian.bouillon@delta-wings.net>
|
||||
* @author Julien Veyssier <eneiluj@posteo.net>
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import { prefixWithBaseUrl } from './prefixWithBaseUrl.js'
|
||||
|
||||
export const getBackgroundUrl = (background, time = 0, themingDefaultBackground = '') => {
|
||||
const enabledThemes = window.OCA?.Theming?.enabledThemes || []
|
||||
const isDarkTheme = (enabledThemes.length === 0 || enabledThemes[0] === 'default')
|
||||
? window.matchMedia('(prefers-color-scheme: dark)').matches
|
||||
: enabledThemes.join('').indexOf('dark') !== -1
|
||||
|
||||
if (background === 'default') {
|
||||
if (themingDefaultBackground && themingDefaultBackground !== 'backgroundColor') {
|
||||
return generateUrl('/apps/theming/image/background') + '?v=' + window.OCA.Theming.cacheBuster
|
||||
}
|
||||
|
||||
if (isDarkTheme) {
|
||||
return prefixWithBaseUrl('eduardo-neves-pedra-azul.jpg')
|
||||
}
|
||||
|
||||
return prefixWithBaseUrl('kamil-porembinski-clouds.jpg')
|
||||
} else if (background === 'custom') {
|
||||
return generateUrl('/apps/theming/background') + '?v=' + time
|
||||
}
|
||||
|
||||
return prefixWithBaseUrl(background)
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
/**
|
||||
* @copyright Copyright (c) 2020 Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
import { generateFilePath } from '@nextcloud/router'
|
||||
|
||||
export const prefixWithBaseUrl = (url) => generateFilePath('theming', '', 'img/background/') + url
|
||||
@@ -114,13 +114,13 @@
|
||||
OCA.Files.FileList.MultiSelectMenuActions.ToggleSelectionModeAction,
|
||||
{
|
||||
name: 'delete',
|
||||
displayName: t('files', 'Delete'),
|
||||
displayName: t('files', 'Delete'),
|
||||
iconClass: 'icon-delete',
|
||||
order: 99,
|
||||
},
|
||||
{
|
||||
name: 'tags',
|
||||
displayName: 'Tags',
|
||||
displayName: t('files', 'Tags'),
|
||||
iconClass: 'icon-tag',
|
||||
order: 100,
|
||||
},
|
||||
|
||||
@@ -62,6 +62,11 @@ OCA.Sharing.PublicApp = {
|
||||
|
||||
// file list mode ?
|
||||
if ($el.find('.files-filestable').length) {
|
||||
// Toggle for grid view
|
||||
this.$showGridView = $('input#showgridview');
|
||||
this.$showGridView.on('change', _.bind(this._onGridviewChange, this));
|
||||
$('#view-toggle').tooltip({placement: 'bottom', trigger: 'hover'});
|
||||
|
||||
var filesClient = new OC.Files.Client({
|
||||
host: OC.getHost(),
|
||||
port: OC.getPort(),
|
||||
@@ -364,6 +369,26 @@ OCA.Sharing.PublicApp = {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Toggle showing gridview by default or not
|
||||
*
|
||||
* @returns {undefined}
|
||||
*/
|
||||
_onGridviewChange: function() {
|
||||
const isGridView = this.$showGridView.is(':checked');
|
||||
this.$showGridView.next('#view-toggle')
|
||||
.removeClass('icon-toggle-filelist icon-toggle-pictures')
|
||||
.addClass(isGridView ? 'icon-toggle-filelist' : 'icon-toggle-pictures')
|
||||
this.$showGridView.next('#view-toggle').attr(
|
||||
'data-original-title',
|
||||
isGridView ? t('files', 'Show list view') : t('files', 'Show grid view'),
|
||||
)
|
||||
|
||||
if (this.fileList) {
|
||||
this.fileList.setGridView(isGridView);
|
||||
}
|
||||
},
|
||||
|
||||
_onDirectoryChanged: function (e) {
|
||||
OC.Util.History.pushState({
|
||||
// arghhhh, why is this not called "dir" !?
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
|
||||
<template>
|
||||
<ul>
|
||||
<SharingEntrySimple class="sharing-entry__internal"
|
||||
<SharingEntrySimple ref="shareEntrySimple"
|
||||
class="sharing-entry__internal"
|
||||
:title="t('files_sharing', 'Internal link')"
|
||||
:subtitle="internalLinkSubtitle">
|
||||
<template #avatar>
|
||||
<div class="avatar-external icon-external-white" />
|
||||
</template>
|
||||
|
||||
<NcActionLink ref="copyButton"
|
||||
:href="internalLink"
|
||||
<NcActionLink :href="internalLink"
|
||||
:aria-label="t('files_sharing', 'Copy internal link to clipboard')"
|
||||
target="_blank"
|
||||
:icon="copied && copySuccess ? 'icon-checkmark-color' : 'icon-clippy'"
|
||||
@@ -84,8 +84,8 @@ export default {
|
||||
async copyLink() {
|
||||
try {
|
||||
await this.$copyText(this.internalLink)
|
||||
// focus and show the tooltip
|
||||
this.$refs.copyButton.$el.focus()
|
||||
// focus and show the tooltip (note: cannot set ref on NcActionLink)
|
||||
this.$refs.shareEntrySimple.$refs.actionsComponent.$el.focus()
|
||||
this.copySuccess = true
|
||||
this.copied = true
|
||||
} catch (error) {
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
{{ subtitle }}
|
||||
</p>
|
||||
</div>
|
||||
<NcActions v-if="$slots['default']"
|
||||
<NcActions ref="actionsComponent"
|
||||
v-if="$slots['default']"
|
||||
class="sharing-entry__actions"
|
||||
menu-align="right"
|
||||
:aria-expanded="ariaExpandedValue">
|
||||
|
||||
@@ -10,21 +10,6 @@
|
||||
--color-background-darker: #dbdbdb;
|
||||
--color-placeholder-light: #e6e6e6;
|
||||
--color-placeholder-dark: #cccccc;
|
||||
--color-primary: #0082c9;
|
||||
--color-primary-text: #ffffff;
|
||||
--color-primary-hover: #329bd3;
|
||||
--color-primary-light: #e5f2f9;
|
||||
--color-primary-light-text: #0082c9;
|
||||
--color-primary-light-hover: #dbe7ee;
|
||||
--color-primary-text-dark: #ededed;
|
||||
--color-primary-element: #0082c9;
|
||||
--color-primary-element-text: #ffffff;
|
||||
--color-primary-element-hover: #329bd3;
|
||||
--color-primary-element-light: #e5f2f9;
|
||||
--color-primary-element-light-text: #0082c9;
|
||||
--color-primary-element-light-hover: #dbe7ee;
|
||||
--color-primary-element-text-dark: #ededed;
|
||||
--gradient-primary-background: linear-gradient(40deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
|
||||
--color-main-text: #222222;
|
||||
--color-text-maxcontrast: #767676;
|
||||
--color-text-light: #222222;
|
||||
@@ -68,4 +53,19 @@
|
||||
--background-invert-if-dark: no;
|
||||
--background-invert-if-bright: invert(100%);
|
||||
--image-main-background: url('/core/img/app-background.jpg');
|
||||
--color-primary: #0082c9;
|
||||
--color-primary-text: #ffffff;
|
||||
--color-primary-hover: #329bd3;
|
||||
--color-primary-light: #e5f2f9;
|
||||
--color-primary-light-text: #0082c9;
|
||||
--color-primary-light-hover: #dbe7ee;
|
||||
--color-primary-text-dark: #ededed;
|
||||
--color-primary-element: #0082c9;
|
||||
--color-primary-element-text: #ffffff;
|
||||
--color-primary-element-hover: #329bd3;
|
||||
--color-primary-element-light: #e5f2f9;
|
||||
--color-primary-element-light-text: #0082c9;
|
||||
--color-primary-element-light-hover: #dbe7ee;
|
||||
--color-primary-element-text-dark: #ededed;
|
||||
--gradient-primary-background: linear-gradient(40deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
|
||||
}
|
||||
|
||||
@@ -49,67 +49,83 @@ class BackgroundService {
|
||||
'anatoly-mikhaltsov-butterfly-wing-scale.jpg' => [
|
||||
'attribution' => 'Butterfly wing scale (Anatoly Mikhaltsov, CC BY-SA)',
|
||||
'attribution_url' => 'https://commons.wikimedia.org/wiki/File:%D0%A7%D0%B5%D1%88%D1%83%D0%B9%D0%BA%D0%B8_%D0%BA%D1%80%D1%8B%D0%BB%D0%B0_%D0%B1%D0%B0%D0%B1%D0%BE%D1%87%D0%BA%D0%B8.jpg',
|
||||
'primary_color' => '#a53c17',
|
||||
],
|
||||
'bernie-cetonia-aurata-take-off-composition.jpg' => [
|
||||
'attribution' => 'Cetonia aurata take off composition (Bernie, Public Domain)',
|
||||
'attribution_url' => 'https://commons.wikimedia.org/wiki/File:Cetonia_aurata_take_off_composition_05172009.jpg',
|
||||
'theming' => self::THEMING_MODE_DARK,
|
||||
'primary_color' => '#56633d',
|
||||
],
|
||||
'dejan-krsmanovic-ribbed-red-metal.jpg' => [
|
||||
'attribution' => 'Ribbed red metal (Dejan Krsmanovic, CC BY)',
|
||||
'attribution_url' => 'https://www.flickr.com/photos/dejankrsmanovic/42971456774/',
|
||||
'primary_color' => '#9c4236',
|
||||
],
|
||||
'eduardo-neves-pedra-azul.jpg' => [
|
||||
'attribution' => 'Pedra azul milky way (Eduardo Neves, CC BY-SA)',
|
||||
'attribution_url' => 'https://commons.wikimedia.org/wiki/File:Pedra_Azul_Milky_Way.jpg',
|
||||
'primary_color' => '#4f6071',
|
||||
],
|
||||
'european-space-agency-barents-bloom.jpg' => [
|
||||
'attribution' => 'Barents bloom (European Space Agency, CC BY-SA)',
|
||||
'attribution_url' => 'https://www.esa.int/ESA_Multimedia/Images/2016/08/Barents_bloom',
|
||||
'primary_color' => '#396475',
|
||||
],
|
||||
'hannes-fritz-flippity-floppity.jpg' => [
|
||||
'attribution' => 'Flippity floppity (Hannes Fritz, CC BY-SA)',
|
||||
'attribution_url' => 'http://hannes.photos/flippity-floppity',
|
||||
'primary_color' => '#98415a',
|
||||
],
|
||||
'hannes-fritz-roulette.jpg' => [
|
||||
'attribution' => 'Roulette (Hannes Fritz, CC BY-SA)',
|
||||
'attribution_url' => 'http://hannes.photos/roulette',
|
||||
'primary_color' => '#845334',
|
||||
],
|
||||
'hannes-fritz-sea-spray.jpg' => [
|
||||
'attribution' => 'Sea spray (Hannes Fritz, CC BY-SA)',
|
||||
'attribution_url' => 'http://hannes.photos/sea-spray',
|
||||
'primary_color' => '#4f6071',
|
||||
],
|
||||
'kamil-porembinski-clouds.jpg' => [
|
||||
'attribution' => 'Clouds (Kamil Porembiński, CC BY-SA)',
|
||||
'attribution_url' => 'https://www.flickr.com/photos/paszczak000/8715851521/',
|
||||
// Originally #0082c9 but adjusted for accessibility
|
||||
'primary_color' => '#00639a',
|
||||
],
|
||||
'bernard-spragg-new-zealand-fern.jpg' => [
|
||||
'attribution' => 'New zealand fern (Bernard Spragg, CC0)',
|
||||
'attribution_url' => 'https://commons.wikimedia.org/wiki/File:NZ_Fern.(Blechnum_chambersii)_(11263534936).jpg',
|
||||
'primary_color' => '#316b26',
|
||||
],
|
||||
'rawpixel-pink-tapioca-bubbles.jpg' => [
|
||||
'attribution' => 'Pink tapioca bubbles (Rawpixel, CC BY)',
|
||||
'attribution_url' => 'https://www.flickr.com/photos/byrawpixel/27665140298/in/photostream/',
|
||||
'theming' => self::THEMING_MODE_DARK,
|
||||
'primary_color' => '#7b4e7e',
|
||||
],
|
||||
'nasa-waxing-crescent-moon.jpg' => [
|
||||
'attribution' => 'Waxing crescent moon (NASA, Public Domain)',
|
||||
'attribution_url' => 'https://www.nasa.gov/image-feature/a-waxing-crescent-moon',
|
||||
'primary_color' => '#005ac1',
|
||||
],
|
||||
'tommy-chau-already.jpg' => [
|
||||
'attribution' => 'Cityscape (Tommy Chau, CC BY)',
|
||||
'attribution_url' => 'https://www.flickr.com/photos/90975693@N05/16910999368',
|
||||
'primary_color' => '#6a2af4',
|
||||
],
|
||||
'tommy-chau-lion-rock-hill.jpg' => [
|
||||
'attribution' => 'Lion rock hill (Tommy Chau, CC BY)',
|
||||
'attribution_url' => 'https://www.flickr.com/photos/90975693@N05/17136440246',
|
||||
'theming' => self::THEMING_MODE_DARK,
|
||||
'primary_color' => '#7f4f70',
|
||||
],
|
||||
'lali-masriera-yellow-bricks.jpg' => [
|
||||
'attribution' => 'Yellow bricks (Lali Masriera, CC BY)',
|
||||
'attribution_url' => 'https://www.flickr.com/photos/visualpanic/3982464447',
|
||||
'theming' => self::THEMING_MODE_DARK,
|
||||
]
|
||||
'primary_color' => '#7f5700',
|
||||
],
|
||||
];
|
||||
|
||||
private IRootFolder $rootFolder;
|
||||
|
||||
@@ -87,9 +87,9 @@ class ThemesService {
|
||||
}
|
||||
|
||||
/** @var ITheme[] */
|
||||
$themes = array_map(function($themeId) {
|
||||
$themes = array_filter(array_map(function($themeId) {
|
||||
return $this->getThemes()[$themeId];
|
||||
}, $themesIds);
|
||||
}, $themesIds));
|
||||
|
||||
// Filtering all themes with the same type
|
||||
$filteredThemes = array_filter($themes, function(ITheme $t) use ($theme) {
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* @copyright Copyright (c) 2022 Joas Schilling <coding@schilljs.com>
|
||||
*
|
||||
* @author Joas Schilling <coding@schilljs.com>
|
||||
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
namespace OCA\Theming\Themes;
|
||||
|
||||
use OCA\Theming\Util;
|
||||
|
||||
trait CommonThemeTrait {
|
||||
public Util $util;
|
||||
|
||||
/**
|
||||
* Generate primary-related variables
|
||||
* This is shared between multiple themes because colorMainBackground and colorMainText
|
||||
* will change in between.
|
||||
*/
|
||||
protected function generatePrimaryVariables(string $colorMainBackground, string $colorMainText): array {
|
||||
$colorPrimaryLight = $this->util->mix($this->primaryColor, $colorMainBackground, -80);
|
||||
$colorPrimaryElement = $this->util->elementColor($this->primaryColor);
|
||||
$colorPrimaryElementLight = $this->util->mix($colorPrimaryElement, $colorMainBackground, -80);
|
||||
|
||||
// primary related colours
|
||||
return [
|
||||
'--color-primary' => $this->primaryColor,
|
||||
'--color-primary-text' => $this->util->invertTextColor($this->primaryColor) ? '#000000' : '#ffffff',
|
||||
'--color-primary-hover' => $this->util->mix($this->primaryColor, $colorMainBackground, 60),
|
||||
'--color-primary-light' => $colorPrimaryLight,
|
||||
'--color-primary-light-text' => $this->primaryColor,
|
||||
'--color-primary-light-hover' => $this->util->mix($colorPrimaryLight, $colorMainText, 90),
|
||||
'--color-primary-text-dark' => $this->util->darken($this->util->invertTextColor($this->primaryColor) ? '#000000' : '#ffffff', 7),
|
||||
|
||||
// used for buttons, inputs...
|
||||
'--color-primary-element' => $colorPrimaryElement,
|
||||
'--color-primary-element-text' => $this->util->invertTextColor($colorPrimaryElement) ? '#000000' : '#ffffff',
|
||||
'--color-primary-element-hover' => $this->util->mix($colorPrimaryElement, $colorMainBackground, 60),
|
||||
'--color-primary-element-light' => $colorPrimaryElementLight,
|
||||
'--color-primary-element-light-text' => $colorPrimaryElement,
|
||||
'--color-primary-element-light-hover' => $this->util->mix($colorPrimaryElementLight, $colorMainText, 90),
|
||||
'--color-primary-element-text-dark' => $this->util->darken($this->util->invertTextColor($colorPrimaryElement) ? '#000000' : '#ffffff', 7),
|
||||
|
||||
// to use like this: background-image: var(--gradient-primary-background);
|
||||
'--gradient-primary-background' => 'linear-gradient(40deg, var(--color-primary) 0%, var(--color-primary-hover) 100%)',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -49,42 +49,48 @@ class DarkHighContrastTheme extends DarkTheme implements ITheme {
|
||||
}
|
||||
|
||||
/**
|
||||
* Try to keep this consistent with HighContrastTheme
|
||||
* Keep this consistent with other HighContrast Themes
|
||||
*/
|
||||
public function getCSSVariables(): array {
|
||||
$variables = parent::getCSSVariables();
|
||||
$defaultVariables = parent::getCSSVariables();
|
||||
|
||||
$colorMainText = '#ffffff';
|
||||
$colorMainBackground = '#000000';
|
||||
|
||||
$variables['--color-main-background'] = $colorMainBackground;
|
||||
$variables['--color-main-background-translucent'] = 'rgba(var(--color-main-background-rgb), .1)';
|
||||
$variables['--color-main-text'] = $colorMainText;
|
||||
return array_merge(
|
||||
$defaultVariables,
|
||||
$this->generatePrimaryVariables($colorMainBackground, $colorMainText),
|
||||
[
|
||||
'--color-main-background' => $colorMainBackground,
|
||||
'--color-main-background-translucent' => 'rgba(var(--color-main-background-rgb), .1)',
|
||||
'--color-main-text' => $colorMainText,
|
||||
|
||||
$variables['--color-background-dark'] = $this->util->lighten($colorMainBackground, 30);
|
||||
$variables['--color-background-darker'] = $this->util->lighten($colorMainBackground, 30);
|
||||
'--color-background-dark' => $this->util->lighten($colorMainBackground, 30),
|
||||
'--color-background-darker' => $this->util->lighten($colorMainBackground, 30),
|
||||
|
||||
$variables['--color-placeholder-light'] = $this->util->lighten($colorMainBackground, 30);
|
||||
$variables['--color-placeholder-dark'] = $this->util->lighten($colorMainBackground, 45);
|
||||
'--color-main-background-blur' => $colorMainBackground,
|
||||
'--filter-background-blur' => 'none',
|
||||
|
||||
$variables['--color-text-maxcontrast'] = $colorMainText;
|
||||
$variables['--color-text-light'] = $colorMainText;
|
||||
$variables['--color-text-lighter'] = $colorMainText;
|
||||
'--color-placeholder-light' => $this->util->lighten($colorMainBackground, 30),
|
||||
'--color-placeholder-dark' => $this->util->lighten($colorMainBackground, 45),
|
||||
|
||||
$variables['--color-scrollbar'] = $this->util->lighten($colorMainBackground, 35);
|
||||
'--color-text-maxcontrast' => $colorMainText,
|
||||
'--color-text-light' => $colorMainText,
|
||||
'--color-text-lighter' => $colorMainText,
|
||||
|
||||
// used for the icon loading animation
|
||||
$variables['--color-loading-light'] = '#000000';
|
||||
$variables['--color-loading-dark'] = '#dddddd';
|
||||
'--color-scrollbar' => $this->util->lighten($colorMainBackground, 35),
|
||||
|
||||
// used for the icon loading animation
|
||||
'--color-loading-light' => '#000000',
|
||||
'--color-loading-dark' => '#dddddd',
|
||||
|
||||
$variables['--color-box-shadow-rgb'] = 'var(--color-main-text)';
|
||||
$variables['--color-box-shadow'] = 'var(--color-main-text)';
|
||||
'--color-box-shadow-rgb' => $colorMainText,
|
||||
'--color-box-shadow' => $colorMainText,
|
||||
|
||||
|
||||
$variables['--color-border'] = $this->util->lighten($colorMainBackground, 50);
|
||||
$variables['--color-border-dark'] = $this->util->lighten($colorMainBackground, 50);
|
||||
|
||||
return $variables;
|
||||
'--color-border' => $this->util->lighten($colorMainBackground, 50),
|
||||
'--color-border-dark' => $this->util->lighten($colorMainBackground, 50),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function getCustomCss(): string {
|
||||
|
||||
@@ -54,45 +54,44 @@ class DarkTheme extends DefaultTheme implements ITheme {
|
||||
$colorMainText = '#D8D8D8';
|
||||
$colorMainBackground = '#171717';
|
||||
$colorMainBackgroundRGB = join(',', $this->util->hexToRGB($colorMainBackground));
|
||||
|
||||
$colorBoxShadow = $this->util->darken($colorMainBackground, 70);
|
||||
$colorBoxShadowRGB = join(',', $this->util->hexToRGB($colorBoxShadow));
|
||||
$colorPrimaryLight = $this->util->mix($this->primaryColor, $colorMainBackground, -80);
|
||||
|
||||
return array_merge($defaultVariables, [
|
||||
'--color-main-text' => $colorMainText,
|
||||
'--color-main-background' => $colorMainBackground,
|
||||
'--color-main-background-rgb' => $colorMainBackgroundRGB,
|
||||
return array_merge(
|
||||
$defaultVariables,
|
||||
$this->generatePrimaryVariables($colorMainBackground, $colorMainText),
|
||||
[
|
||||
'--color-main-text' => $colorMainText,
|
||||
'--color-main-background' => $colorMainBackground,
|
||||
'--color-main-background-rgb' => $colorMainBackgroundRGB,
|
||||
|
||||
'--color-scrollbar' => $this->util->lighten($colorMainBackground, 15),
|
||||
'--color-scrollbar' => $this->util->lighten($colorMainBackground, 15),
|
||||
|
||||
'--color-background-hover' => $this->util->lighten($colorMainBackground, 4),
|
||||
'--color-background-dark' => $this->util->lighten($colorMainBackground, 7),
|
||||
'--color-background-darker' => $this->util->lighten($colorMainBackground, 14),
|
||||
'--color-background-hover' => $this->util->lighten($colorMainBackground, 4),
|
||||
'--color-background-dark' => $this->util->lighten($colorMainBackground, 7),
|
||||
'--color-background-darker' => $this->util->lighten($colorMainBackground, 14),
|
||||
|
||||
'--color-placeholder-light' => $this->util->lighten($colorMainBackground, 10),
|
||||
'--color-placeholder-dark' => $this->util->lighten($colorMainBackground, 20),
|
||||
'--color-placeholder-light' => $this->util->lighten($colorMainBackground, 10),
|
||||
'--color-placeholder-dark' => $this->util->lighten($colorMainBackground, 20),
|
||||
|
||||
'--color-primary-hover' => $this->util->mix($this->primaryColor, $colorMainBackground, 60),
|
||||
'--color-primary-light' => $colorPrimaryLight,
|
||||
'--color-primary-light-hover' => $this->util->mix($colorPrimaryLight, $colorMainText, 90),
|
||||
'--color-primary-element' => $this->util->elementColor($this->primaryColor, false),
|
||||
'--color-primary-element-hover' => $this->util->mix($this->util->elementColor($this->primaryColor, false), $colorMainBackground, 80),
|
||||
'--color-primary-element-light' => $this->util->lighten($this->util->elementColor($this->primaryColor, false), 15),
|
||||
'--color-text-maxcontrast' => $this->util->darken($colorMainText, 30),
|
||||
'--color-text-light' => $this->util->darken($colorMainText, 10),
|
||||
'--color-text-lighter' => $this->util->darken($colorMainText, 20),
|
||||
|
||||
'--color-text-maxcontrast' => $this->util->darken($colorMainText, 30),
|
||||
'--color-text-light' => $this->util->darken($colorMainText, 10),
|
||||
'--color-text-lighter' => $this->util->darken($colorMainText, 20),
|
||||
// used for the icon loading animation
|
||||
'--color-loading-light' => '#777',
|
||||
'--color-loading-dark' => '#CCC',
|
||||
|
||||
'--color-loading-light' => '#777',
|
||||
'--color-loading-dark' => '#CCC',
|
||||
'--color-box-shadow' => $colorBoxShadow,
|
||||
'--color-box-shadow-rgb' => $colorBoxShadowRGB,
|
||||
|
||||
'--color-box-shadow-rgb' => $colorBoxShadowRGB,
|
||||
'--color-border' => $this->util->lighten($colorMainBackground, 7),
|
||||
'--color-border-dark' => $this->util->lighten($colorMainBackground, 14),
|
||||
|
||||
'--color-border' => $this->util->lighten($colorMainBackground, 7),
|
||||
'--color-border-dark' => $this->util->lighten($colorMainBackground, 14),
|
||||
|
||||
'--background-invert-if-dark' => 'invert(100%)',
|
||||
'--background-invert-if-bright' => 'no',
|
||||
]);
|
||||
'--background-invert-if-dark' => 'invert(100%)',
|
||||
'--background-invert-if-bright' => 'no',
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +37,8 @@ use OCP\IUserSession;
|
||||
use OCP\Server;
|
||||
|
||||
class DefaultTheme implements ITheme {
|
||||
use CommonThemeTrait;
|
||||
|
||||
public Util $util;
|
||||
public ThemingDefaults $themingDefaults;
|
||||
public IURLGenerator $urlGenerator;
|
||||
@@ -93,10 +95,6 @@ class DefaultTheme implements ITheme {
|
||||
$colorMainBackgroundRGB = join(',', $this->util->hexToRGB($colorMainBackground));
|
||||
$colorBoxShadow = $this->util->darken($colorMainBackground, 70);
|
||||
$colorBoxShadowRGB = join(',', $this->util->hexToRGB($colorBoxShadow));
|
||||
$colorPrimaryLight = $this->util->mix($this->primaryColor, $colorMainBackground, -80);
|
||||
|
||||
$colorPrimaryElement = $this->util->elementColor($this->primaryColor);
|
||||
$colorPrimaryElementLight = $this->util->mix($colorPrimaryElement, $colorMainBackground, -80);
|
||||
|
||||
$hasCustomLogoHeader = $this->imageManager->hasImage('logo') || $this->imageManager->hasImage('logoheader');
|
||||
$hasCustomPrimaryColour = !empty($this->config->getAppValue(Application::APP_ID, 'color'));
|
||||
@@ -119,25 +117,6 @@ class DefaultTheme implements ITheme {
|
||||
'--color-placeholder-light' => $this->util->darken($colorMainBackground, 10),
|
||||
'--color-placeholder-dark' => $this->util->darken($colorMainBackground, 20),
|
||||
|
||||
// primary related colours
|
||||
'--color-primary' => $this->primaryColor,
|
||||
'--color-primary-text' => $this->util->invertTextColor($this->primaryColor) ? '#000000' : '#ffffff',
|
||||
'--color-primary-hover' => $this->util->mix($this->primaryColor, $colorMainBackground, 60),
|
||||
'--color-primary-light' => $colorPrimaryLight,
|
||||
'--color-primary-light-text' => $this->primaryColor,
|
||||
'--color-primary-light-hover' => $this->util->mix($colorPrimaryLight, $colorMainText, 90),
|
||||
'--color-primary-text-dark' => $this->util->darken($this->util->invertTextColor($this->primaryColor) ? '#000000' : '#ffffff', 7),
|
||||
// used for buttons, inputs...
|
||||
'--color-primary-element' => $colorPrimaryElement,
|
||||
'--color-primary-element-text' => $this->util->invertTextColor($colorPrimaryElement) ? '#000000' : '#ffffff',
|
||||
'--color-primary-element-hover' => $this->util->mix($colorPrimaryElement, $colorMainBackground, 60),
|
||||
'--color-primary-element-light' => $colorPrimaryElementLight,
|
||||
'--color-primary-element-light-text' => $colorPrimaryElement,
|
||||
'--color-primary-element-light-hover' => $this->util->mix($colorPrimaryElementLight, $colorMainText, 90),
|
||||
'--color-primary-element-text-dark' => $this->util->darken($this->util->invertTextColor($colorPrimaryElement) ? '#000000' : '#ffffff', 7),
|
||||
// to use like this: background-image: var(--gradient-primary-background);
|
||||
'--gradient-primary-background' => 'linear-gradient(40deg, var(--color-primary) 0%, var(--color-primary-hover) 100%)',
|
||||
|
||||
// max contrast for WCAG compliance
|
||||
'--color-main-text' => $colorMainText,
|
||||
'--color-text-maxcontrast' => $this->util->lighten($colorMainText, 33),
|
||||
@@ -211,6 +190,9 @@ class DefaultTheme implements ITheme {
|
||||
'--image-main-background' => "url('" . $this->urlGenerator->imagePath('core', 'app-background.jpg') . "')",
|
||||
];
|
||||
|
||||
// Primary variables
|
||||
$variables = array_merge($variables, $this->generatePrimaryVariables($colorMainBackground, $colorMainText));
|
||||
|
||||
$backgroundDeleted = $this->config->getAppValue(Application::APP_ID, 'backgroundMime', '') === 'backgroundColor';
|
||||
// If primary as background has been request or if we have a custom primary colour
|
||||
// let's not define the background image
|
||||
@@ -245,9 +227,15 @@ class DefaultTheme implements ITheme {
|
||||
$themingBackground = $this->config->getUserValue($user->getUID(), Application::APP_ID, 'background', 'default');
|
||||
|
||||
if ($themingBackground === 'custom') {
|
||||
$variables['--image-main-background'] = "url('" . $this->urlGenerator->linkToRouteAbsolute('theming.theming.getBackground') . "')";
|
||||
// Custom
|
||||
$variables['--image-main-background'] = "url('" . $this->urlGenerator->linkToRouteAbsolute('theming.userTheme.getBackground') . "')";
|
||||
} elseif ($themingBackground !== 'default' && substr($themingBackground, 0, 1) !== '#') {
|
||||
// Shipped background
|
||||
$variables['--image-main-background'] = "url('" . $this->urlGenerator->linkTo(Application::APP_ID, "/img/background/$themingBackground") . "')";
|
||||
} elseif (substr($themingBackground, 0, 1) === '#') {
|
||||
// Color
|
||||
unset($variables['--image-main-background']);
|
||||
$variables['--color-main-background-plain'] = $this->primaryColor;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ use OCA\Theming\ITheme;
|
||||
class HighContrastTheme extends DefaultTheme implements ITheme {
|
||||
|
||||
public function getId(): string {
|
||||
return 'highcontrast';
|
||||
return 'light-highcontrast';
|
||||
}
|
||||
|
||||
public function getMediaQuery(): string {
|
||||
@@ -48,41 +48,49 @@ class HighContrastTheme extends DefaultTheme implements ITheme {
|
||||
return $this->l->t('A high contrast mode to ease your navigation. Visual quality will be reduced but clarity will be increased.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Keep this consistent with other HighContrast Themes
|
||||
*/
|
||||
public function getCSSVariables(): array {
|
||||
$variables = parent::getCSSVariables();
|
||||
$defaultVariables = parent::getCSSVariables();
|
||||
|
||||
$colorMainText = '#000000';
|
||||
$colorMainBackground = '#ffffff';
|
||||
|
||||
$variables['--color-main-background'] = $colorMainBackground;
|
||||
$variables['--color-main-background-translucent'] = 'rgba(var(--color-main-background-rgb), .1)';
|
||||
$variables['--color-main-text'] = $colorMainText;
|
||||
return array_merge(
|
||||
$defaultVariables,
|
||||
$this->generatePrimaryVariables($colorMainBackground, $colorMainText),
|
||||
[
|
||||
'--color-main-background' => $colorMainBackground,
|
||||
'--color-main-background-translucent' => 'rgba(var(--color-main-background-rgb), .1)',
|
||||
'--color-main-text' => $colorMainText,
|
||||
|
||||
$variables['--color-background-dark'] = $this->util->darken($colorMainBackground, 30);
|
||||
$variables['--color-background-darker'] = $this->util->darken($colorMainBackground, 30);
|
||||
'--color-background-dark' => $this->util->darken($colorMainBackground, 30),
|
||||
'--color-background-darker' => $this->util->darken($colorMainBackground, 30),
|
||||
|
||||
$variables['--color-main-background-blur'] = $colorMainBackground;
|
||||
$variables['--filter-background-blur'] = 'none';
|
||||
'--color-main-background-blur' => $colorMainBackground,
|
||||
'--filter-background-blur' => 'none',
|
||||
|
||||
$variables['--color-placeholder-light'] = $this->util->darken($colorMainBackground, 30);
|
||||
$variables['--color-placeholder-dark'] = $this->util->darken($colorMainBackground, 45);
|
||||
'--color-placeholder-light' => $this->util->darken($colorMainBackground, 30),
|
||||
'--color-placeholder-dark' => $this->util->darken($colorMainBackground, 45),
|
||||
|
||||
$variables['--color-text-maxcontrast'] = 'var(--color-main-text)';
|
||||
$variables['--color-text-light'] = 'var(--color-main-text)';
|
||||
$variables['--color-text-lighter'] = 'var(--color-main-text)';
|
||||
'--color-text-maxcontrast' => $colorMainText,
|
||||
'--color-text-light' => $colorMainText,
|
||||
'--color-text-lighter' => $colorMainText,
|
||||
|
||||
$variables['--color-scrollbar'] = $this->util->darken($colorMainBackground, 25);
|
||||
'--color-scrollbar' => $this->util->darken($colorMainBackground, 25),
|
||||
|
||||
// used for the icon loading animation
|
||||
$variables['--color-loading-light'] = '#dddddd';
|
||||
$variables['--color-loading-dark'] = '#000000';
|
||||
// used for the icon loading animation
|
||||
'--color-loading-light' => '#dddddd',
|
||||
'--color-loading-dark' => '#000000',
|
||||
|
||||
$variables['--color-box-shadow-rgb'] = 'var(--color-main-text)';
|
||||
$variables['--color-box-shadow'] = 'var(--color-main-text)';
|
||||
'--color-box-shadow-rgb' => $colorMainText,
|
||||
'--color-box-shadow' => $colorMainText,
|
||||
|
||||
$variables['--color-border'] = $this->util->darken($colorMainBackground, 50);
|
||||
$variables['--color-border-dark'] = $this->util->darken($colorMainBackground, 50);
|
||||
|
||||
return $variables;
|
||||
'--color-border' => $this->util->darken($colorMainBackground, 50),
|
||||
'--color-border-dark' => $this->util->darken($colorMainBackground, 50),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
public function getCustomCss(): string {
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { generateOcsUrl, imagePath } from '@nextcloud/router'
|
||||
import { generateOcsUrl } from '@nextcloud/router'
|
||||
import { loadState } from '@nextcloud/initial-state'
|
||||
import axios from '@nextcloud/axios'
|
||||
import NcCheckboxRadioSwitch from '@nextcloud/vue/dist/Components/NcCheckboxRadioSwitch'
|
||||
@@ -83,8 +83,6 @@ import NcSettingsSection from '@nextcloud/vue/dist/Components/NcSettingsSection'
|
||||
import BackgroundSettings from './components/BackgroundSettings.vue'
|
||||
import ItemPreview from './components/ItemPreview.vue'
|
||||
|
||||
import { getBackgroundUrl } from '../src/helpers/getBackgroundUrl.js'
|
||||
|
||||
const availableThemes = loadState('theming', 'themes', [])
|
||||
const enforceTheme = loadState('theming', 'enforceTheme', '')
|
||||
const shortcutsDisabled = loadState('theming', 'shortcutsDisabled', false)
|
||||
@@ -111,24 +109,12 @@ export default {
|
||||
enforceTheme,
|
||||
shortcutsDisabled,
|
||||
background,
|
||||
backgroundVersion,
|
||||
themingDefaultBackground,
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
backgroundImage() {
|
||||
return getBackgroundUrl(this.background, backgroundVersion, this.themingDefaultBackground)
|
||||
},
|
||||
backgroundStyle() {
|
||||
if ((this.background === 'default' && this.themingDefaultBackground === 'backgroundColor')
|
||||
|| this.background.match(/#[0-9A-Fa-f]{6}/g)) {
|
||||
return null
|
||||
}
|
||||
|
||||
return {
|
||||
backgroundImage: this.background === 'default' ? 'var(--image-main-background)' : `url('${this.backgroundImage}')`,
|
||||
}
|
||||
},
|
||||
themes() {
|
||||
return this.availableThemes.filter(theme => theme.type === 1)
|
||||
},
|
||||
@@ -183,7 +169,9 @@ export default {
|
||||
methods: {
|
||||
updateBackground(data) {
|
||||
this.background = (data.type === 'custom' || data.type === 'default') ? data.type : data.value
|
||||
this.backgroundVersion = data.version
|
||||
this.updateGlobalStyles()
|
||||
this.$emit('update:background')
|
||||
},
|
||||
updateGlobalStyles() {
|
||||
// Override primary-invert-if-bright and color-primary-text if background is set
|
||||
@@ -199,17 +187,6 @@ export default {
|
||||
// document.body.removeAttribute('data-theme-light')
|
||||
// document.body.setAttribute('data-theme-dark', 'true')
|
||||
}
|
||||
|
||||
const themeElements = [document.documentElement, document.querySelector('#header'), document.querySelector('body')]
|
||||
for (const element of themeElements) {
|
||||
if (this.background === 'default') {
|
||||
element.style.setProperty('--image-main-background', `url('${imagePath('core', 'app-background.jpg')}')`)
|
||||
} else if (this.background.match(/#[0-9A-Fa-f]{6}/g)) {
|
||||
element.style.setProperty('--image-main-background', undefined)
|
||||
} else {
|
||||
element.style.setProperty('--image-main-background', this.backgroundStyle.backgroundImage)
|
||||
}
|
||||
}
|
||||
},
|
||||
changeTheme({ enabled, id }) {
|
||||
// Reset selected and select new one
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
{{ t('theming', 'Default image') }}
|
||||
</button>
|
||||
<button class="background color"
|
||||
:class="{ active: background === 'custom' }"
|
||||
:class="{ active: background.startsWith('#') }"
|
||||
tabindex="0"
|
||||
@click="pickColor">
|
||||
{{ t('theming', 'Plain background') }}
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
// FIXME hoist this into a package? The same logic is used in `apps/dashboard/src/helpers/getBackgroundUrl.js`
|
||||
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import { prefixWithBaseUrl } from './prefixWithBaseUrl.js'
|
||||
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
// FIXME hoist this into a package? The same logic is used in `apps/dashboard/src/helpers/prefixWithBaseUrl.js`
|
||||
|
||||
import { generateFilePath } from '@nextcloud/router'
|
||||
|
||||
export const prefixWithBaseUrl = (url) => generateFilePath('theming', '', 'img/background/') + url
|
||||
|
||||
@@ -30,3 +30,15 @@ Vue.prototype.t = t
|
||||
const View = Vue.extend(App)
|
||||
const theming = new View()
|
||||
theming.$mount('#theming')
|
||||
|
||||
theming.$on('update:background', () => {
|
||||
// Refresh server-side generated theming CSS
|
||||
[...document.head.querySelectorAll('link.theme')].forEach(theme => {
|
||||
const url = new URL(theme.href)
|
||||
url.searchParams.set('v', Date.now())
|
||||
const newTheme = theme.cloneNode()
|
||||
newTheme.href = url.toString()
|
||||
newTheme.onload = () => theme.remove()
|
||||
document.head.append(newTheme)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -72,7 +72,7 @@ class UserThemeControllerTest extends TestCase {
|
||||
'default' => $this->createMock(DefaultTheme::class),
|
||||
'light' => $this->createMock(LightTheme::class),
|
||||
'dark' => $this->createMock(DarkTheme::class),
|
||||
'highcontrast' => $this->createMock(HighContrastTheme::class),
|
||||
'light-highcontrast' => $this->createMock(HighContrastTheme::class),
|
||||
'dark-highcontrast' => $this->createMock(DarkHighContrastTheme::class),
|
||||
'opendyslexic' => $this->createMock(DyslexiaFont::class),
|
||||
];
|
||||
@@ -102,7 +102,7 @@ class UserThemeControllerTest extends TestCase {
|
||||
['default'],
|
||||
['light'],
|
||||
['dark'],
|
||||
['highcontrast'],
|
||||
['light-highcontrast'],
|
||||
['dark-highcontrast'],
|
||||
['opendyslexic'],
|
||||
['', OCSBadRequestException::class],
|
||||
|
||||
@@ -84,7 +84,7 @@ class ThemesServiceTest extends TestCase {
|
||||
'default',
|
||||
'light',
|
||||
'dark',
|
||||
'highcontrast',
|
||||
'light-highcontrast',
|
||||
'dark-highcontrast',
|
||||
'opendyslexic',
|
||||
];
|
||||
@@ -98,7 +98,7 @@ class ThemesServiceTest extends TestCase {
|
||||
['dark', [], ['dark']],
|
||||
['dark', ['dark'], ['dark']],
|
||||
['opendyslexic', ['dark'], ['dark', 'opendyslexic']],
|
||||
['dark', ['highcontrast', 'opendyslexic'], ['opendyslexic', 'dark']],
|
||||
['dark', ['light-highcontrast', 'opendyslexic'], ['opendyslexic', 'dark']],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ class ThemesServiceTest extends TestCase {
|
||||
['dark', [], []],
|
||||
['dark', ['dark'], []],
|
||||
['opendyslexic', ['dark', 'opendyslexic'], ['dark'], ],
|
||||
['highcontrast', ['opendyslexic'], ['opendyslexic']],
|
||||
['light-highcontrast', ['opendyslexic'], ['opendyslexic']],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ class ThemesServiceTest extends TestCase {
|
||||
['dark', [], false],
|
||||
['dark', ['dark'], true],
|
||||
['opendyslexic', ['dark', 'opendyslexic'], true],
|
||||
['highcontrast', ['opendyslexic'], false],
|
||||
['light-highcontrast', ['opendyslexic'], false],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ class ThemesServiceTest extends TestCase {
|
||||
$this->config,
|
||||
$l10n,
|
||||
),
|
||||
'highcontrast' => new HighContrastTheme(
|
||||
'light-highcontrast' => new HighContrastTheme(
|
||||
$util,
|
||||
$this->themingDefaults,
|
||||
$urlGenerator,
|
||||
|
||||
@@ -83,7 +83,7 @@ class PersonalTest extends TestCase {
|
||||
$this->formatThemeForm('default'),
|
||||
$this->formatThemeForm('light'),
|
||||
$this->formatThemeForm('dark'),
|
||||
$this->formatThemeForm('highcontrast'),
|
||||
$this->formatThemeForm('light-highcontrast'),
|
||||
$this->formatThemeForm('dark-highcontrast'),
|
||||
$this->formatThemeForm('opendyslexic'),
|
||||
]],
|
||||
@@ -162,7 +162,7 @@ class PersonalTest extends TestCase {
|
||||
$config,
|
||||
$l10n,
|
||||
),
|
||||
'highcontrast' => new HighContrastTheme(
|
||||
'light-highcontrast' => new HighContrastTheme(
|
||||
$util,
|
||||
$themingDefaults,
|
||||
$urlGenerator,
|
||||
|
||||
@@ -48,11 +48,17 @@ import NcEmojiPicker from '@nextcloud/vue/dist/Components/NcEmojiPicker.js'
|
||||
|
||||
export default {
|
||||
name: 'CustomMessageInput',
|
||||
|
||||
components: {
|
||||
NcButton,
|
||||
NcEmojiPicker,
|
||||
},
|
||||
|
||||
props: {
|
||||
icon: {
|
||||
type: String,
|
||||
default: '😀',
|
||||
},
|
||||
message: {
|
||||
type: String,
|
||||
required: true,
|
||||
@@ -63,11 +69,13 @@ export default {
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
|
||||
emits: [
|
||||
'change',
|
||||
'submit',
|
||||
'icon-selected',
|
||||
],
|
||||
|
||||
computed: {
|
||||
/**
|
||||
* Returns the user-set icon or a smiley in case no icon is set
|
||||
@@ -78,6 +86,7 @@ export default {
|
||||
return this.icon || '😀'
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
focus() {
|
||||
this.$refs.input.focus()
|
||||
@@ -96,8 +105,8 @@ export default {
|
||||
this.$emit('submit', event.target.value)
|
||||
},
|
||||
|
||||
setIcon(event) {
|
||||
this.$emit('icon-selected', event)
|
||||
setIcon(icon) {
|
||||
this.$emit('select-icon', icon)
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -42,10 +42,11 @@
|
||||
</div>
|
||||
<div class="set-status-modal__custom-input">
|
||||
<CustomMessageInput ref="customMessageInput"
|
||||
:icon="icon"
|
||||
:message="message"
|
||||
@change="setMessage"
|
||||
@submit="saveStatus"
|
||||
@iconSelected="setIcon" />
|
||||
@select-icon="setIcon" />
|
||||
</div>
|
||||
<PredefinedStatusesList @select-status="selectPredefinedMessage" />
|
||||
<ClearAtSelect :clear-at="clearAt"
|
||||
@@ -74,12 +75,12 @@
|
||||
import { showError } from '@nextcloud/dialogs'
|
||||
import NcModal from '@nextcloud/vue/dist/Components/NcModal'
|
||||
import NcButton from '@nextcloud/vue/dist/Components/NcButton'
|
||||
import { getAllStatusOptions } from '../services/statusOptionsService'
|
||||
import OnlineStatusMixin from '../mixins/OnlineStatusMixin'
|
||||
import PredefinedStatusesList from './PredefinedStatusesList'
|
||||
import CustomMessageInput from './CustomMessageInput'
|
||||
import ClearAtSelect from './ClearAtSelect'
|
||||
import OnlineStatusSelect from './OnlineStatusSelect'
|
||||
import { getAllStatusOptions } from '../services/statusOptionsService.js'
|
||||
import OnlineStatusMixin from '../mixins/OnlineStatusMixin.js'
|
||||
import PredefinedStatusesList from './PredefinedStatusesList.vue'
|
||||
import CustomMessageInput from './CustomMessageInput.vue'
|
||||
import ClearAtSelect from './ClearAtSelect.vue'
|
||||
import OnlineStatusSelect from './OnlineStatusSelect.vue'
|
||||
|
||||
export default {
|
||||
name: 'SetStatusModal',
|
||||
|
||||
@@ -4622,7 +4622,7 @@ function idn_to_ascii($domain, $options = 0, $variant = INTL_IDNA_VARIANT_2003,
|
||||
* @param int $variant [optional] <p>
|
||||
* Either INTL_IDNA_VARIANT_2003 for IDNA 2003 or INTL_IDNA_VARIANT_UTS46 for UTS #46.
|
||||
* </p>
|
||||
* @param int &$idna_info [optional] <p>
|
||||
* @param array &$idna_info [optional] <p>
|
||||
* This parameter can be used only if INTL_IDNA_VARIANT_UTS46 was used for variant.
|
||||
* In that case, it will be filled with an array with the keys 'result',
|
||||
* the possibly illegal result of the transformation, 'isTransitionalDifferent',
|
||||
@@ -4634,7 +4634,7 @@ function idn_to_ascii($domain, $options = 0, $variant = INTL_IDNA_VARIANT_2003,
|
||||
* RFC 3490 4.2 states though "ToUnicode never fails. If any step fails, then the original input
|
||||
* sequence is returned immediately in that step."
|
||||
*/
|
||||
function idn_to_utf8($domain, $options = 0, $variant = INTL_IDNA_VARIANT_2003, array &$idna_info) { }
|
||||
function idn_to_utf8($domain, $options = 0, $variant = INTL_IDNA_VARIANT_2003, array &$idna_info = null) { }
|
||||
|
||||
/**
|
||||
* (PHP 5 >=5.5.0 PECL intl >= 3.0.0a1)<br/>
|
||||
|
||||
@@ -57,6 +57,16 @@ class ReferenceApiController extends \OCP\AppFramework\OCSController {
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
*/
|
||||
public function resolveOne(string $reference): DataResponse {
|
||||
$resolvedReference = $this->referenceManager->resolveReference($reference);
|
||||
|
||||
$response = new DataResponse(['references' => [ $reference => $resolvedReference ]]);
|
||||
$response->cacheFor(3600, false, true);
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
|
||||
@@ -59,9 +59,11 @@ class ReferenceController extends Controller {
|
||||
$appData = $this->appDataFactory->get('core');
|
||||
$folder = $appData->getFolder('opengraph');
|
||||
$file = $folder->getFile($referenceId);
|
||||
return new DataDownloadResponse($file->getContent(), $referenceId, $reference->getImageContentType());
|
||||
$response = new DataDownloadResponse($file->getContent(), $referenceId, $reference->getImageContentType());
|
||||
} catch (NotFoundException|NotPermittedException $e) {
|
||||
return new DataResponse('', Http::STATUS_NOT_FOUND);
|
||||
$response = new DataResponse('', Http::STATUS_NOT_FOUND);
|
||||
}
|
||||
$response->cacheFor(3600, false, true);
|
||||
return $response;
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -89,14 +89,14 @@ html {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
background-color: var(--color-primary);
|
||||
background-color: var(--color-main-background-plain, var(--color-main-background));
|
||||
background-image: var(--image-main-background);
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--color-primary);
|
||||
background-color: var(--color-main-background-plain, var(--color-main-background));
|
||||
background-image: var(--image-main-background);
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
@@ -814,7 +814,7 @@ kbd {
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background-color: var(--color-main-background);
|
||||
background-color: transparent;
|
||||
box-shadow: none;
|
||||
border: 0;
|
||||
border-radius: calc(var(--default-clickable-area) / 2);
|
||||
|
||||
+3
-3
@@ -39,14 +39,14 @@ html {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
background-color: var(--color-primary);
|
||||
background-color: var(--color-main-background-plain, var(--color-main-background));
|
||||
background-image: var(--image-main-background);
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--color-primary);
|
||||
background-color: var(--color-main-background-plain, var(--color-main-background));
|
||||
background-image: var(--image-main-background);
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
@@ -821,7 +821,7 @@ $min-content-width: variables.$breakpoint-mobile - variables.$navigation-width -
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background-color: var(--color-main-background);
|
||||
background-color: transparent;
|
||||
box-shadow: none;
|
||||
border: 0;
|
||||
border-radius: calc(var(--default-clickable-area) / 2);
|
||||
|
||||
+28
-4
@@ -105,12 +105,36 @@ form {
|
||||
margin: auto;
|
||||
padding: 0;
|
||||
}
|
||||
form.install-form {
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
form.install-form fieldset,
|
||||
form.install-form fieldset input {
|
||||
width: 100%;
|
||||
}
|
||||
form.install-form .strengthify-wrapper {
|
||||
bottom: 17px;
|
||||
width: calc(100% - 8px);
|
||||
left: 4px;
|
||||
top: unset;
|
||||
}
|
||||
|
||||
form.install-form #show {
|
||||
top: 18px;
|
||||
}
|
||||
|
||||
form #sqliteInformation {
|
||||
margin-top: 0px;
|
||||
margin-top: 0.5rem;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
form #adminaccount {
|
||||
form #adminaccount, form #use_other_db {
|
||||
margin-bottom: 15px;
|
||||
text-align: left;
|
||||
}
|
||||
form #adminaccount > legend,
|
||||
form #adminlogin {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
form #advancedHeader {
|
||||
width: 100%;
|
||||
@@ -335,7 +359,7 @@ input[type='checkbox'].checkbox--white:checked + label:before {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
top: -20px;
|
||||
width: 286px;
|
||||
width: 250px;
|
||||
border-radius: 0 0 3px 3px;
|
||||
overflow: hidden;
|
||||
height: 3px;
|
||||
@@ -350,7 +374,7 @@ input[type='checkbox'].checkbox--white:checked + label:before {
|
||||
#show, #dbpassword-toggle {
|
||||
position: absolute;
|
||||
right: 2px;
|
||||
top: 4px;
|
||||
top: -3px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
width: 44px;
|
||||
|
||||
+3
-4
@@ -118,7 +118,6 @@ ul {
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--color-main-background);
|
||||
font-weight: normal;
|
||||
/* bring the default font size up to 15px */
|
||||
font-size: var(--default-font-size);
|
||||
@@ -2868,14 +2867,14 @@ html {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
background-color: var(--color-primary);
|
||||
background-color: var(--color-main-background-plain, var(--color-main-background));
|
||||
background-image: var(--image-main-background);
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--color-primary);
|
||||
background-color: var(--color-main-background-plain, var(--color-main-background));
|
||||
background-image: var(--image-main-background);
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
@@ -3593,7 +3592,7 @@ kbd {
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background-color: var(--color-main-background);
|
||||
background-color: transparent;
|
||||
box-shadow: none;
|
||||
border: 0;
|
||||
border-radius: calc(var(--default-clickable-area) / 2);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -117,7 +117,6 @@ ul {
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--color-main-background);
|
||||
font-weight: normal;
|
||||
/* bring the default font size up to 15px */
|
||||
font-size: var(--default-font-size);
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"version":3,"sourceRoot":"","sources":["variables.scss","styles.scss"],"names":[],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;;;AAGD;AACA;AAAA;EAEC;EACA;;;AAGD;EACC;;;AAGD;EACC;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;;;AAGD;EACC;EACA;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;EACA;;AACA;EACC;;;AAIF;EACC;EACA;;;AAGD;EACC;;AACA;EACC;;;AAIF;EACC;;;AAGD;EACC;;;AAGD;EACC;EACA;AACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;;;AAGD;EACC;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;;AAED;EACC;EACA;;AACA;EACC;;;AAKH;AAEA;EACC;EACA;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;EACA;;;AAID;AAEA;EACC;EACA;;;AAID;AAEA;EACC;;;AAGD;AAEA;AAAA;EAEC;EACA;EACA;EACA;;AACA;AAAA;EACC;;AAED;AAAA;EACC;;AAED;AAAA;EACC;;AAED;AAAA;AAAA;AAAA;EAEC;EACA;EACA;EACA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAEC;;;AAKH;AAEA;EACC;;;AAGD;AAEA;AAEA;AAEA;EACC;EACA;EACA;EACA;EACA;;;AAGD;AAEA;EACC;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;;;AAGD;EACC;;;AAED;EACC;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;AAIC;AAAA;AAAA;EACC;;AAED;AAAA;AAAA;EACC;;;AAIF;EACC;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;;;AAED;EACC;EACA;EACA;EACA;EACA;;;AAGD;AAEA;EACC;EACA;EACA;EACA;EACA;;;AAIA;EACC;;;AAKD;EACC;EACA;;AACA;EACC;EACA;EACA;;AAGF;EACC;EACA;;;AAIF;EACC;EACA;;AACA;EACC;;;AAIF;EACC;;;AAGD;AACA;AAEA;AAEA;AAEA;EACC;EACA;;AACA;EACC;EACA;;;AAIF;EACC;;;AAGD;EACC;;;AAIA;AAAA;EAGC;;;AAIF;EACC;EACA;EACA;;AAEA;EACC;;;AAIF;EACC;EACA;;;AAGD;EACC;;;AAIA;EACC;;;AAKD;EACC;;;AAKD;EACC;;;AAKD;EACC;;;AAIF;EACC;;;AAGD;EACC;EACA;EACA;EACA;;AACA;EACC;;;AAIF;EACC;EACA;;;AAGD;EACC;;;AAGD;EACC;;;AAGD;AACA;EACC;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;AAAA;EAGC;EACA;;AAED;EACC;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;;AAED;EACC;;AAEA;EACC;;AAED;EACC;;AAGF;EACC;;AAID;EACC;EACA;EACA;EACA;EACA;;AAED;EACC;;AAGA;EACC;;AAGD;AAAA;AAAA;EAGC;EACA;EACA;;AAGD;AAAA;EAEC;EACA;;;AAMJ;EACC;EACA;;;AAID;AACA;EACC;EACA;EACA;EACA;AAwBA;;AAtBA;EACC;;AAGD;AAAA;AAAA;EAGC;EACA;;AAED;EACC;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;;AAIF;EACC;;AAGA;EACC;EACA;EACA;;AACA;EACC;EACA;EACA;;AAGF;EACC;;AAGA;AAAA;AAAA;EAIC;EACA;EACA;;AAGD;EACC;;AAGD;EACC;;;AAMJ;AAGC;AAAA;EACC;EACA;EACA;;AACA;AAAA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;AAAA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAMJ;AACA;EACC;EACA;EACA;;AAEA;EACC;EACA;EACA;;AAEA;EACC;EACA;EACA;;AAGA;EACC;;AAED;EACC;;AAED;EACC;EACA;;AAKH;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAGC;EACA;;AAIF;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;;AAGD;EACC;EACA;EACA;;AAGD;EACC;EACA;;AACA;EACC;EACA;;AAMH;EACC;EACA;EACA;EACA;AACA;AACA;EACA;EACA;;AAED;EACC;EACA;EACA;EACA;EACA;;AAED;EACC;EACA;;AAED;AACC;EACA;EACA;;AAEC;EACC;EACA;;AACA;EACC;EACA;;AAIH;EACC;EACA;EACA;EACA;EACA;EACA;;AAED;EACC;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;;AAED;AAAA;AAAA;EAGC;;AAED;AAAA;EAEC;;AAGD;EACC;EACA;;AAED;EACC;;AAED;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;;AACA;EACC;;AACA;EACC;EACA;EACA;;AAED;EACC;;AAIH;EACC;;AAED;EACC;;AAED;EAIC;EACA;;AAEA;EACC;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA,SAhBS;EAiBT;EACA;EACA;;AAGA;EACC;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA,aA/BU;EAgCV;;AACA;EACC;;AAGF;EACC;EACA;;AAED;EACC;;AAON;EACC;;;AAIF;EACC;;;AAGD;EACC;EACA;;;AAGD;AAGC;EACC;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;;AAGD;EAGC;;AAKD;EACC;;AAEA;EACC;;;AAMJ;AACC;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;;AACA;AAAA;EAEC;;AAIF;AACC;EACA;EACA;EACA;EACA;;AAEA;EACC;;AAEA;EACC;EACA;EACA;EACA;;AAKH;EACC;EACA;EACA;EACA;AA8DA;;AA5DA;EACC;EACA;EACA;;AAGD;EACC;EACA;;AAEA;EACC;EACA;;AAGD;AACC;EACA;EACA;EACA;EACA;;AAED;EACC;;AAIF;EACC;EACA;EACA;EACA;;AAEA;EACC;;AAED;EACC;;AAGD;EAGC;;AAIF;EACC;;AAEA;EACC;EACA;;AAGD;EACC;;AAKF;EACC;EACA;;AAED;EACC;;;AAMH;EACC;EACA;EACA;;;AAGD;AAEA;EACC;;;AAGD;AAGC;EACC;EACA;;AAED;EACC;EACA;EACA;EACA;;AAED;EACC;EACA;;AACA;EACC;;AAGF;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;;AAGF;EACC;EACA;;;AAIF;AACA;EACC;;;AAED;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;;AACA;EACC;;AAIA;EACC;;AAIF;EACC;EACA;;AACA;EACC;EACA;EACA;EACA;;AACA;EACC;;AAGF;EACC;;AAIH;EACC;;AACA;EACC;;AAGF;AAAA;EAEC;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;;AAEA;AAAA;AAAA;EAGC;;AAGF;EACC;EACA;;AAID;EACC;EACA;;AAEA;EACC;;AAGF;EACC;;AAEA;AAAA;AAAA;AAAA;AAAA;EAEC;;;AAKH;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;;;AAIF;AAGC;EACC;EACA;;AAED;EACC;;;AAIF;AACA;EACC;;AAID;AAEA;EACC;EACA;EACA;EACA","file":"styles.css"}
|
||||
{"version":3,"sourceRoot":"","sources":["variables.scss","styles.scss"],"names":[],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;;;AAGD;AACA;AAAA;EAEC;EACA;;;AAGD;EACC;;;AAGD;EACC;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;;;AAGD;EACC;EACA;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;EACA;;AACA;EACC;;;AAIF;EACC;EACA;;;AAGD;EACC;;AACA;EACC;;;AAIF;EACC;;;AAGD;EACC;;;AAGD;EACC;AACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;;;AAGD;EACC;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;EACA;EACA;EACA;;AAED;EACC;EACA;;AACA;EACC;;;AAKH;AAEA;EACC;EACA;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;EACA;;;AAID;AAEA;EACC;EACA;;;AAID;AAEA;EACC;;;AAGD;AAEA;AAAA;EAEC;EACA;EACA;EACA;;AACA;AAAA;EACC;;AAED;AAAA;EACC;;AAED;AAAA;EACC;;AAED;AAAA;AAAA;AAAA;EAEC;EACA;EACA;EACA;;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAEC;;;AAKH;AAEA;EACC;;;AAGD;AAEA;AAEA;AAEA;EACC;EACA;EACA;EACA;EACA;;;AAGD;AAEA;EACC;EACA;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;;;AAGD;EACC;;;AAED;EACC;EACA;EACA;;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGD;AAIC;AAAA;AAAA;EACC;;AAED;AAAA;AAAA;EACC;;;AAIF;EACC;;;AAGD;EACC;;;AAGD;EACC;EACA;EACA;;;AAED;EACC;EACA;EACA;EACA;EACA;;;AAGD;AAEA;EACC;EACA;EACA;EACA;EACA;;;AAIA;EACC;;;AAKD;EACC;EACA;;AACA;EACC;EACA;EACA;;AAGF;EACC;EACA;;;AAIF;EACC;EACA;;AACA;EACC;;;AAIF;EACC;;;AAGD;AACA;AAEA;AAEA;AAEA;EACC;EACA;;AACA;EACC;EACA;;;AAIF;EACC;;;AAGD;EACC;;;AAIA;AAAA;EAGC;;;AAIF;EACC;EACA;EACA;;AAEA;EACC;;;AAIF;EACC;EACA;;;AAGD;EACC;;;AAIA;EACC;;;AAKD;EACC;;;AAKD;EACC;;;AAKD;EACC;;;AAIF;EACC;;;AAGD;EACC;EACA;EACA;EACA;;AACA;EACC;;;AAIF;EACC;EACA;;;AAGD;EACC;;;AAGD;EACC;;;AAGD;AACA;EACC;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;AAAA;EAGC;EACA;;AAED;EACC;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;;AAED;EACC;;AAEA;EACC;;AAED;EACC;;AAGF;EACC;;AAID;EACC;EACA;EACA;EACA;EACA;;AAED;EACC;;AAGA;EACC;;AAGD;AAAA;AAAA;EAGC;EACA;EACA;;AAGD;AAAA;EAEC;EACA;;;AAMJ;EACC;EACA;;;AAID;AACA;EACC;EACA;EACA;EACA;AAwBA;;AAtBA;EACC;;AAGD;AAAA;AAAA;EAGC;EACA;;AAED;EACC;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;;AAIF;EACC;;AAGA;EACC;EACA;EACA;;AACA;EACC;EACA;EACA;;AAGF;EACC;;AAGA;AAAA;AAAA;EAIC;EACA;EACA;;AAGD;EACC;;AAGD;EACC;;;AAMJ;AAGC;AAAA;EACC;EACA;EACA;;AACA;AAAA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;AAAA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAMJ;AACA;EACC;EACA;EACA;;AAEA;EACC;EACA;EACA;;AAEA;EACC;EACA;EACA;;AAGA;EACC;;AAED;EACC;;AAED;EACC;EACA;;AAKH;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAGC;EACA;;AAIF;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;;AAGD;EACC;EACA;EACA;;AAGD;EACC;EACA;;AACA;EACC;EACA;;AAMH;EACC;EACA;EACA;EACA;AACA;AACA;EACA;EACA;;AAED;EACC;EACA;EACA;EACA;EACA;;AAED;EACC;EACA;;AAED;AACC;EACA;EACA;;AAEC;EACC;EACA;;AACA;EACC;EACA;;AAIH;EACC;EACA;EACA;EACA;EACA;EACA;;AAED;EACC;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;;AAED;AAAA;AAAA;EAGC;;AAED;AAAA;EAEC;;AAGD;EACC;EACA;;AAED;EACC;;AAED;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;;AACA;EACC;;AACA;EACC;EACA;EACA;;AAED;EACC;;AAIH;EACC;;AAED;EACC;;AAED;EAIC;EACA;;AAEA;EACC;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA,SAhBS;EAiBT;EACA;EACA;;AAGA;EACC;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA,aA/BU;EAgCV;;AACA;EACC;;AAGF;EACC;EACA;;AAED;EACC;;AAON;EACC;;;AAIF;EACC;;;AAGD;EACC;EACA;;;AAGD;AAGC;EACC;;AACA;EACC;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;;AAGD;EAGC;;AAKD;EACC;;AAEA;EACC;;;AAMJ;AACC;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;;AACA;AAAA;EAEC;;AAIF;AACC;EACA;EACA;EACA;EACA;;AAEA;EACC;;AAEA;EACC;EACA;EACA;EACA;;AAKH;EACC;EACA;EACA;EACA;AA8DA;;AA5DA;EACC;EACA;EACA;;AAGD;EACC;EACA;;AAEA;EACC;EACA;;AAGD;AACC;EACA;EACA;EACA;EACA;;AAED;EACC;;AAIF;EACC;EACA;EACA;EACA;;AAEA;EACC;;AAED;EACC;;AAGD;EAGC;;AAIF;EACC;;AAEA;EACC;EACA;;AAGD;EACC;;AAKF;EACC;EACA;;AAED;EACC;;;AAMH;EACC;EACA;EACA;;;AAGD;AAEA;EACC;;;AAGD;AAGC;EACC;EACA;;AAED;EACC;EACA;EACA;EACA;;AAED;EACC;EACA;;AACA;EACC;;AAGF;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;;AAGF;EACC;EACA;;;AAIF;AACA;EACC;;;AAED;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;EACA;;AACA;EACC;;AAIA;EACC;;AAIF;EACC;EACA;;AACA;EACC;EACA;EACA;EACA;;AACA;EACC;;AAGF;EACC;;AAIH;EACC;;AACA;EACC;;AAGF;AAAA;EAEC;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;;AAEA;AAAA;AAAA;EAGC;;AAGF;EACC;EACA;;AAID;EACC;EACA;;AAEA;EACC;;AAGF;EACC;;AAEA;AAAA;AAAA;AAAA;AAAA;EAEC;;;AAKH;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;;AACA;EACC;;;AAIF;AAGC;EACC;EACA;;AAED;EACC;;;AAIF;AACA;EACC;;AAID;AAEA;EACC;EACA;EACA;EACA","file":"styles.css"}
|
||||
@@ -98,7 +98,6 @@ ul {
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--color-main-background);
|
||||
font-weight: normal;
|
||||
/* bring the default font size up to 15px */
|
||||
font-size: var(--default-font-size);
|
||||
|
||||
@@ -123,6 +123,7 @@ $application->registerRoutes($this, [
|
||||
['root' => '/collaboration', 'name' => 'CollaborationResources#getCollectionsByResource', 'url' => '/resources/{resourceType}/{resourceId}', 'verb' => 'GET'],
|
||||
['root' => '/collaboration', 'name' => 'CollaborationResources#createCollectionOnResource', 'url' => '/resources/{baseResourceType}/{baseResourceId}', 'verb' => 'POST'],
|
||||
|
||||
['root' => '/references', 'name' => 'ReferenceApi#resolveOne', 'url' => '/resolve', 'verb' => 'GET'],
|
||||
['root' => '/references', 'name' => 'ReferenceApi#extract', 'url' => '/extract', 'verb' => 'POST'],
|
||||
['root' => '/references', 'name' => 'ReferenceApi#resolve', 'url' => '/resolve', 'verb' => 'POST'],
|
||||
|
||||
|
||||
+3
-2
@@ -2,6 +2,7 @@
|
||||
"shippedApps": [
|
||||
"activity",
|
||||
"admin_audit",
|
||||
"bruteforcesettings",
|
||||
"circles",
|
||||
"cloud_federation_api",
|
||||
"comments",
|
||||
@@ -18,7 +19,6 @@
|
||||
"files_sharing",
|
||||
"files_trashbin",
|
||||
"files_versions",
|
||||
"files_videoplayer",
|
||||
"firstrunwizard",
|
||||
"logreader",
|
||||
"lookup_server_connector",
|
||||
@@ -36,10 +36,12 @@
|
||||
"sharebymail",
|
||||
"support",
|
||||
"survey_client",
|
||||
"suspicious_login",
|
||||
"systemtags",
|
||||
"text",
|
||||
"theming",
|
||||
"twofactor_backupcodes",
|
||||
"twofactor_totp",
|
||||
"updatenotification",
|
||||
"user_ldap",
|
||||
"user_status",
|
||||
@@ -61,7 +63,6 @@
|
||||
"files_sharing",
|
||||
"files_trashbin",
|
||||
"files_versions",
|
||||
"files_videoplayer",
|
||||
"firstrunwizard",
|
||||
"logreader",
|
||||
"lookup_server_connector",
|
||||
|
||||
@@ -5,7 +5,7 @@ script('core', 'install');
|
||||
<input type='hidden' id='hasSQLite' value='<?php p($_['hasSQLite']) ?>'>
|
||||
<input type='hidden' id='hasPostgreSQL' value='<?php p($_['hasPostgreSQL']) ?>'>
|
||||
<input type='hidden' id='hasOracle' value='<?php p($_['hasOracle']) ?>'>
|
||||
<form action="index.php" method="post" class="guest-box">
|
||||
<form action="index.php" method="post" class="guest-box install-form">
|
||||
<input type="hidden" name="install" value="true">
|
||||
<?php if (count($_['errors']) > 0): ?>
|
||||
<fieldset class="warning">
|
||||
@@ -34,19 +34,17 @@ script('core', 'install');
|
||||
<?php endif; ?>
|
||||
<fieldset id="adminaccount">
|
||||
<legend><?php print_unescaped($l->t('Create an <strong>admin account</strong>')); ?></legend>
|
||||
<p class="grouptop">
|
||||
<p>
|
||||
<label for="adminlogin"><?php p($l->t('Username')); ?></label>
|
||||
<input type="text" name="adminlogin" id="adminlogin"
|
||||
placeholder="<?php p($l->t('Username')); ?>"
|
||||
value="<?php p($_['adminlogin']); ?>"
|
||||
autocomplete="off" autocapitalize="none" autocorrect="off" autofocus required>
|
||||
<label for="adminlogin" class="infield"><?php p($l->t('Username')); ?></label>
|
||||
</p>
|
||||
<p class="groupbottom">
|
||||
<label for="adminpass"><?php p($l->t('Password')); ?></label>
|
||||
<input type="password" name="adminpass" data-typetoggle="#show" id="adminpass"
|
||||
placeholder="<?php p($l->t('Password')); ?>"
|
||||
value="<?php p($_['adminpass']); ?>"
|
||||
autocomplete="off" autocapitalize="none" autocorrect="off" required>
|
||||
<label for="adminpass" class="infield"><?php p($l->t('Password')); ?></label>
|
||||
<button id="show" class="toggle-password" aria-label="<?php p($l->t('Show password')); ?>">
|
||||
<img src="<?php print_unescaped(image_path('', 'actions/toggle.svg')); ?>" alt="<?php p($l->t('Toggle password visibility')); ?>">
|
||||
</button>
|
||||
@@ -102,26 +100,23 @@ script('core', 'install');
|
||||
<fieldset id='databaseField'>
|
||||
<div id="use_other_db">
|
||||
<p class="grouptop">
|
||||
<label for="dbuser" class="infield"><?php p($l->t('Database user')); ?></label>
|
||||
<label for="dbuser"><?php p($l->t('Database user')); ?></label>
|
||||
<input type="text" name="dbuser" id="dbuser"
|
||||
placeholder="<?php p($l->t('Database user')); ?>"
|
||||
value="<?php p($_['dbuser']); ?>"
|
||||
autocomplete="off" autocapitalize="none" autocorrect="off">
|
||||
</p>
|
||||
<p class="groupmiddle">
|
||||
<label for="dbpass"><?php p($l->t('Database password')); ?></label>
|
||||
<input type="password" name="dbpass" id="dbpass"
|
||||
placeholder="<?php p($l->t('Database password')); ?>"
|
||||
value="<?php p($_['dbpass']); ?>"
|
||||
autocomplete="off" autocapitalize="none" autocorrect="off">
|
||||
<label for="dbpass" class="infield"><?php p($l->t('Database password')); ?></label>
|
||||
<button id="show" class="toggle-password" aria-label="<?php p($l->t('Show password')); ?>">
|
||||
<img src="<?php print_unescaped(image_path('', 'actions/toggle.svg')); ?>" alt="<?php p($l->t('Toggle password visibility')); ?>">
|
||||
</button>
|
||||
</p>
|
||||
<p class="groupmiddle">
|
||||
<label for="dbname" class="infield"><?php p($l->t('Database name')); ?></label>
|
||||
<label for="dbname"><?php p($l->t('Database name')); ?></label>
|
||||
<input type="text" name="dbname" id="dbname"
|
||||
placeholder="<?php p($l->t('Database name')); ?>"
|
||||
value="<?php p($_['dbname']); ?>"
|
||||
autocomplete="off" autocapitalize="none" autocorrect="off"
|
||||
pattern="[0-9a-zA-Z$_-]+">
|
||||
@@ -131,16 +126,14 @@ script('core', 'install');
|
||||
<p class="groupmiddle">
|
||||
<label for="dbtablespace" class="infield"><?php p($l->t('Database tablespace')); ?></label>
|
||||
<input type="text" name="dbtablespace" id="dbtablespace"
|
||||
placeholder="<?php p($l->t('Database tablespace')); ?>"
|
||||
value="<?php p($_['dbtablespace']); ?>"
|
||||
autocomplete="off" autocapitalize="none" autocorrect="off">
|
||||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<p class="groupbottom">
|
||||
<label for="dbhost" class="infield"><?php p($l->t('Database host')); ?></label>
|
||||
<label for="dbhost"><?php p($l->t('Database host')); ?></label>
|
||||
<input type="text" name="dbhost" id="dbhost"
|
||||
placeholder="<?php p($l->t('Database host')); ?>"
|
||||
value="<?php p($_['dbhost']); ?>"
|
||||
autocomplete="off" autocapitalize="none" autocorrect="off">
|
||||
</p>
|
||||
@@ -153,12 +146,12 @@ script('core', 'install');
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!$_['dbIsSet'] or count($_['errors']) > 0): ?>
|
||||
<fieldset id="sqliteInformation" class="notecard warning">
|
||||
<div id="sqliteInformation" class="notecard warning">
|
||||
<legend><?php p($l->t('Performance warning'));?></legend>
|
||||
<p><?php p($l->t('You chose SQLite as database.'));?></p>
|
||||
<p><?php p($l->t('SQLite should only be used for minimal and development instances. For production we recommend a different database backend.'));?></p>
|
||||
<p><?php p($l->t('If you use clients for file syncing, the use of SQLite is highly discouraged.')); ?></p>
|
||||
</fieldset>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
||||
<div class="icon-loading-dark float-spinner"> </div>
|
||||
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -873,4 +873,4 @@
|
||||
|
||||
//! moment.js locale configuration
|
||||
|
||||
//! version : 0.5.34
|
||||
//! version : 0.5.37
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+9
-1
@@ -34,7 +34,6 @@ const ignorePatterns = [
|
||||
]
|
||||
|
||||
module.exports = {
|
||||
preset: '@vue/cli-plugin-unit-jest/presets/no-babel',
|
||||
testMatch: ['<rootDir>/apps/*/src/**/*.(spec|test).(ts|js)'],
|
||||
modulePathIgnorePatterns: ["<rootDir>/apps-extra/"],
|
||||
transformIgnorePatterns: [
|
||||
@@ -45,8 +44,17 @@ module.exports = {
|
||||
collectCoverageFrom: [
|
||||
'<rootDir>/apps/*/src/**/*.{js,vue}',
|
||||
],
|
||||
|
||||
testEnvironment: 'jest-environment-jsdom',
|
||||
|
||||
moduleFileExtensions: [
|
||||
'js',
|
||||
'vue',
|
||||
],
|
||||
|
||||
transform: {
|
||||
// process `*.js` files with `babel-jest`
|
||||
'.*\\.(js)$': 'babel-jest',
|
||||
'^.+\\.vue$': '@vue/vue2-jest',
|
||||
},
|
||||
}
|
||||
|
||||
@@ -145,6 +145,7 @@ return array(
|
||||
'OCP\\Collaboration\\Reference\\IReference' => $baseDir . '/lib/public/Collaboration/Reference/IReference.php',
|
||||
'OCP\\Collaboration\\Reference\\IReferenceManager' => $baseDir . '/lib/public/Collaboration/Reference/IReferenceManager.php',
|
||||
'OCP\\Collaboration\\Reference\\IReferenceProvider' => $baseDir . '/lib/public/Collaboration/Reference/IReferenceProvider.php',
|
||||
'OCP\\Collaboration\\Reference\\Reference' => $baseDir . '/lib/public/Collaboration/Reference/Reference.php',
|
||||
'OCP\\Collaboration\\Reference\\RenderReferenceEvent' => $baseDir . '/lib/public/Collaboration/Reference/RenderReferenceEvent.php',
|
||||
'OCP\\Collaboration\\Resources\\CollectionException' => $baseDir . '/lib/public/Collaboration/Resources/CollectionException.php',
|
||||
'OCP\\Collaboration\\Resources\\ICollection' => $baseDir . '/lib/public/Collaboration/Resources/ICollection.php',
|
||||
@@ -720,7 +721,6 @@ return array(
|
||||
'OC\\App\\AppManager' => $baseDir . '/lib/private/App/AppManager.php',
|
||||
'OC\\App\\AppStore\\Bundles\\Bundle' => $baseDir . '/lib/private/App/AppStore/Bundles/Bundle.php',
|
||||
'OC\\App\\AppStore\\Bundles\\BundleFetcher' => $baseDir . '/lib/private/App/AppStore/Bundles/BundleFetcher.php',
|
||||
'OC\\App\\AppStore\\Bundles\\CoreBundle' => $baseDir . '/lib/private/App/AppStore/Bundles/CoreBundle.php',
|
||||
'OC\\App\\AppStore\\Bundles\\EducationBundle' => $baseDir . '/lib/private/App/AppStore/Bundles/EducationBundle.php',
|
||||
'OC\\App\\AppStore\\Bundles\\EnterpriseBundle' => $baseDir . '/lib/private/App/AppStore/Bundles/EnterpriseBundle.php',
|
||||
'OC\\App\\AppStore\\Bundles\\GroupwareBundle' => $baseDir . '/lib/private/App/AppStore/Bundles/GroupwareBundle.php',
|
||||
@@ -836,7 +836,6 @@ return array(
|
||||
'OC\\Collaboration\\Reference\\File\\FileReferenceEventListener' => $baseDir . '/lib/private/Collaboration/Reference/File/FileReferenceEventListener.php',
|
||||
'OC\\Collaboration\\Reference\\File\\FileReferenceProvider' => $baseDir . '/lib/private/Collaboration/Reference/File/FileReferenceProvider.php',
|
||||
'OC\\Collaboration\\Reference\\LinkReferenceProvider' => $baseDir . '/lib/private/Collaboration/Reference/LinkReferenceProvider.php',
|
||||
'OC\\Collaboration\\Reference\\Reference' => $baseDir . '/lib/private/Collaboration/Reference/Reference.php',
|
||||
'OC\\Collaboration\\Reference\\ReferenceManager' => $baseDir . '/lib/private/Collaboration/Reference/ReferenceManager.php',
|
||||
'OC\\Collaboration\\Resources\\Collection' => $baseDir . '/lib/private/Collaboration/Resources/Collection.php',
|
||||
'OC\\Collaboration\\Resources\\Listener' => $baseDir . '/lib/private/Collaboration/Resources/Listener.php',
|
||||
@@ -1432,8 +1431,10 @@ return array(
|
||||
'OC\\Repair\\AddBruteForceCleanupJob' => $baseDir . '/lib/private/Repair/AddBruteForceCleanupJob.php',
|
||||
'OC\\Repair\\AddCleanupUpdaterBackupsJob' => $baseDir . '/lib/private/Repair/AddCleanupUpdaterBackupsJob.php',
|
||||
'OC\\Repair\\CleanTags' => $baseDir . '/lib/private/Repair/CleanTags.php',
|
||||
'OC\\Repair\\CleanUpAbandonedApps' => $baseDir . '/lib/private/Repair/CleanUpAbandonedApps.php',
|
||||
'OC\\Repair\\ClearFrontendCaches' => $baseDir . '/lib/private/Repair/ClearFrontendCaches.php',
|
||||
'OC\\Repair\\ClearGeneratedAvatarCache' => $baseDir . '/lib/private/Repair/ClearGeneratedAvatarCache.php',
|
||||
'OC\\Repair\\ClearGeneratedAvatarCacheJob' => $baseDir . '/lib/private/Repair/ClearGeneratedAvatarCacheJob.php',
|
||||
'OC\\Repair\\Collation' => $baseDir . '/lib/private/Repair/Collation.php',
|
||||
'OC\\Repair\\Events\\RepairAdvanceEvent' => $baseDir . '/lib/private/Repair/Events/RepairAdvanceEvent.php',
|
||||
'OC\\Repair\\Events\\RepairErrorEvent' => $baseDir . '/lib/private/Repair/Events/RepairErrorEvent.php',
|
||||
@@ -1461,7 +1462,6 @@ return array(
|
||||
'OC\\Repair\\Owncloud\\CleanPreviews' => $baseDir . '/lib/private/Repair/Owncloud/CleanPreviews.php',
|
||||
'OC\\Repair\\Owncloud\\CleanPreviewsBackgroundJob' => $baseDir . '/lib/private/Repair/Owncloud/CleanPreviewsBackgroundJob.php',
|
||||
'OC\\Repair\\Owncloud\\DropAccountTermsTable' => $baseDir . '/lib/private/Repair/Owncloud/DropAccountTermsTable.php',
|
||||
'OC\\Repair\\Owncloud\\InstallCoreBundle' => $baseDir . '/lib/private/Repair/Owncloud/InstallCoreBundle.php',
|
||||
'OC\\Repair\\Owncloud\\MigrateOauthTables' => $baseDir . '/lib/private/Repair/Owncloud/MigrateOauthTables.php',
|
||||
'OC\\Repair\\Owncloud\\MoveAvatars' => $baseDir . '/lib/private/Repair/Owncloud/MoveAvatars.php',
|
||||
'OC\\Repair\\Owncloud\\MoveAvatarsBackgroundJob' => $baseDir . '/lib/private/Repair/Owncloud/MoveAvatarsBackgroundJob.php',
|
||||
|
||||
@@ -178,6 +178,7 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
|
||||
'OCP\\Collaboration\\Reference\\IReference' => __DIR__ . '/../../..' . '/lib/public/Collaboration/Reference/IReference.php',
|
||||
'OCP\\Collaboration\\Reference\\IReferenceManager' => __DIR__ . '/../../..' . '/lib/public/Collaboration/Reference/IReferenceManager.php',
|
||||
'OCP\\Collaboration\\Reference\\IReferenceProvider' => __DIR__ . '/../../..' . '/lib/public/Collaboration/Reference/IReferenceProvider.php',
|
||||
'OCP\\Collaboration\\Reference\\Reference' => __DIR__ . '/../../..' . '/lib/public/Collaboration/Reference/Reference.php',
|
||||
'OCP\\Collaboration\\Reference\\RenderReferenceEvent' => __DIR__ . '/../../..' . '/lib/public/Collaboration/Reference/RenderReferenceEvent.php',
|
||||
'OCP\\Collaboration\\Resources\\CollectionException' => __DIR__ . '/../../..' . '/lib/public/Collaboration/Resources/CollectionException.php',
|
||||
'OCP\\Collaboration\\Resources\\ICollection' => __DIR__ . '/../../..' . '/lib/public/Collaboration/Resources/ICollection.php',
|
||||
@@ -753,7 +754,6 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
|
||||
'OC\\App\\AppManager' => __DIR__ . '/../../..' . '/lib/private/App/AppManager.php',
|
||||
'OC\\App\\AppStore\\Bundles\\Bundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/Bundle.php',
|
||||
'OC\\App\\AppStore\\Bundles\\BundleFetcher' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/BundleFetcher.php',
|
||||
'OC\\App\\AppStore\\Bundles\\CoreBundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/CoreBundle.php',
|
||||
'OC\\App\\AppStore\\Bundles\\EducationBundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/EducationBundle.php',
|
||||
'OC\\App\\AppStore\\Bundles\\EnterpriseBundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/EnterpriseBundle.php',
|
||||
'OC\\App\\AppStore\\Bundles\\GroupwareBundle' => __DIR__ . '/../../..' . '/lib/private/App/AppStore/Bundles/GroupwareBundle.php',
|
||||
@@ -869,7 +869,6 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
|
||||
'OC\\Collaboration\\Reference\\File\\FileReferenceEventListener' => __DIR__ . '/../../..' . '/lib/private/Collaboration/Reference/File/FileReferenceEventListener.php',
|
||||
'OC\\Collaboration\\Reference\\File\\FileReferenceProvider' => __DIR__ . '/../../..' . '/lib/private/Collaboration/Reference/File/FileReferenceProvider.php',
|
||||
'OC\\Collaboration\\Reference\\LinkReferenceProvider' => __DIR__ . '/../../..' . '/lib/private/Collaboration/Reference/LinkReferenceProvider.php',
|
||||
'OC\\Collaboration\\Reference\\Reference' => __DIR__ . '/../../..' . '/lib/private/Collaboration/Reference/Reference.php',
|
||||
'OC\\Collaboration\\Reference\\ReferenceManager' => __DIR__ . '/../../..' . '/lib/private/Collaboration/Reference/ReferenceManager.php',
|
||||
'OC\\Collaboration\\Resources\\Collection' => __DIR__ . '/../../..' . '/lib/private/Collaboration/Resources/Collection.php',
|
||||
'OC\\Collaboration\\Resources\\Listener' => __DIR__ . '/../../..' . '/lib/private/Collaboration/Resources/Listener.php',
|
||||
@@ -1465,8 +1464,10 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
|
||||
'OC\\Repair\\AddBruteForceCleanupJob' => __DIR__ . '/../../..' . '/lib/private/Repair/AddBruteForceCleanupJob.php',
|
||||
'OC\\Repair\\AddCleanupUpdaterBackupsJob' => __DIR__ . '/../../..' . '/lib/private/Repair/AddCleanupUpdaterBackupsJob.php',
|
||||
'OC\\Repair\\CleanTags' => __DIR__ . '/../../..' . '/lib/private/Repair/CleanTags.php',
|
||||
'OC\\Repair\\CleanUpAbandonedApps' => __DIR__ . '/../../..' . '/lib/private/Repair/CleanUpAbandonedApps.php',
|
||||
'OC\\Repair\\ClearFrontendCaches' => __DIR__ . '/../../..' . '/lib/private/Repair/ClearFrontendCaches.php',
|
||||
'OC\\Repair\\ClearGeneratedAvatarCache' => __DIR__ . '/../../..' . '/lib/private/Repair/ClearGeneratedAvatarCache.php',
|
||||
'OC\\Repair\\ClearGeneratedAvatarCacheJob' => __DIR__ . '/../../..' . '/lib/private/Repair/ClearGeneratedAvatarCacheJob.php',
|
||||
'OC\\Repair\\Collation' => __DIR__ . '/../../..' . '/lib/private/Repair/Collation.php',
|
||||
'OC\\Repair\\Events\\RepairAdvanceEvent' => __DIR__ . '/../../..' . '/lib/private/Repair/Events/RepairAdvanceEvent.php',
|
||||
'OC\\Repair\\Events\\RepairErrorEvent' => __DIR__ . '/../../..' . '/lib/private/Repair/Events/RepairErrorEvent.php',
|
||||
@@ -1494,7 +1495,6 @@ class ComposerStaticInit749170dad3f5e7f9ca158f5a9f04f6a2
|
||||
'OC\\Repair\\Owncloud\\CleanPreviews' => __DIR__ . '/../../..' . '/lib/private/Repair/Owncloud/CleanPreviews.php',
|
||||
'OC\\Repair\\Owncloud\\CleanPreviewsBackgroundJob' => __DIR__ . '/../../..' . '/lib/private/Repair/Owncloud/CleanPreviewsBackgroundJob.php',
|
||||
'OC\\Repair\\Owncloud\\DropAccountTermsTable' => __DIR__ . '/../../..' . '/lib/private/Repair/Owncloud/DropAccountTermsTable.php',
|
||||
'OC\\Repair\\Owncloud\\InstallCoreBundle' => __DIR__ . '/../../..' . '/lib/private/Repair/Owncloud/InstallCoreBundle.php',
|
||||
'OC\\Repair\\Owncloud\\MigrateOauthTables' => __DIR__ . '/../../..' . '/lib/private/Repair/Owncloud/MigrateOauthTables.php',
|
||||
'OC\\Repair\\Owncloud\\MoveAvatars' => __DIR__ . '/../../..' . '/lib/private/Repair/Owncloud/MoveAvatars.php',
|
||||
'OC\\Repair\\Owncloud\\MoveAvatarsBackgroundJob' => __DIR__ . '/../../..' . '/lib/private/Repair/Owncloud/MoveAvatarsBackgroundJob.php',
|
||||
|
||||
@@ -27,12 +27,8 @@ namespace OC\App\AppStore\Bundles;
|
||||
use OCP\IL10N;
|
||||
|
||||
class BundleFetcher {
|
||||
/** @var IL10N */
|
||||
private $l10n;
|
||||
private IL10N $l10n;
|
||||
|
||||
/**
|
||||
* @param IL10N $l10n
|
||||
*/
|
||||
public function __construct(IL10N $l10n) {
|
||||
$this->l10n = $l10n;
|
||||
}
|
||||
@@ -40,7 +36,7 @@ class BundleFetcher {
|
||||
/**
|
||||
* @return Bundle[]
|
||||
*/
|
||||
public function getBundles() {
|
||||
public function getBundles(): array {
|
||||
return [
|
||||
new EnterpriseBundle($this->l10n),
|
||||
new HubBundle($this->l10n),
|
||||
@@ -50,17 +46,6 @@ class BundleFetcher {
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Bundles that should be installed by default after installation
|
||||
*
|
||||
* @return Bundle[]
|
||||
*/
|
||||
public function getDefaultInstallationBundle() {
|
||||
return [
|
||||
new CoreBundle($this->l10n),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the bundle with the specified identifier
|
||||
*
|
||||
@@ -68,13 +53,8 @@ class BundleFetcher {
|
||||
* @return Bundle
|
||||
* @throws \BadMethodCallException If the bundle does not exist
|
||||
*/
|
||||
public function getBundleByIdentifier($identifier) {
|
||||
/** @var Bundle[] $bundles */
|
||||
$bundles = array_merge(
|
||||
$this->getBundles(),
|
||||
$this->getDefaultInstallationBundle()
|
||||
);
|
||||
foreach ($bundles as $bundle) {
|
||||
public function getBundleByIdentifier(string $identifier): Bundle {
|
||||
foreach ($this->getBundles() as $bundle) {
|
||||
if ($bundle->getIdentifier() === $identifier) {
|
||||
return $bundle;
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ declare(strict_types=1);
|
||||
|
||||
namespace OC\Collaboration\Reference\File;
|
||||
|
||||
use OC\Collaboration\Reference\Reference;
|
||||
use OC\User\NoUserException;
|
||||
use OCP\Collaboration\Reference\IReference;
|
||||
use OCP\Collaboration\Reference\IReferenceProvider;
|
||||
use OCP\Collaboration\Reference\Reference;
|
||||
use OCP\Files\InvalidPathException;
|
||||
use OCP\Files\IRootFolder;
|
||||
use OCP\Files\Node;
|
||||
|
||||
@@ -32,6 +32,7 @@ use OC\Security\RateLimiting\Limiter;
|
||||
use OC\SystemConfig;
|
||||
use OCP\Collaboration\Reference\IReference;
|
||||
use OCP\Collaboration\Reference\IReferenceProvider;
|
||||
use OCP\Collaboration\Reference\Reference;
|
||||
use OCP\Files\AppData\IAppDataFactory;
|
||||
use OCP\Files\NotFoundException;
|
||||
use OCP\Http\Client\IClientService;
|
||||
|
||||
@@ -29,6 +29,7 @@ use OC\Collaboration\Reference\File\FileReferenceProvider;
|
||||
use OCP\Collaboration\Reference\IReference;
|
||||
use OCP\Collaboration\Reference\IReferenceManager;
|
||||
use OCP\Collaboration\Reference\IReferenceProvider;
|
||||
use OCP\Collaboration\Reference\Reference;
|
||||
use OCP\ICache;
|
||||
use OCP\ICacheFactory;
|
||||
use OCP\IURLGenerator;
|
||||
|
||||
@@ -125,7 +125,7 @@ class DnsPinMiddleware {
|
||||
$ports[] = (string)$port;
|
||||
}
|
||||
|
||||
$targetIps = $this->dnsResolve($hostName, 0);
|
||||
$targetIps = $this->dnsResolve(idn_to_utf8($hostName), 0);
|
||||
|
||||
$curlResolves = [];
|
||||
|
||||
|
||||
@@ -25,6 +25,9 @@ declare(strict_types=1);
|
||||
*/
|
||||
namespace OC\Http\Client;
|
||||
|
||||
use IPLib\Address\IPv6;
|
||||
use IPLib\Factory;
|
||||
use IPLib\ParseStringFlag;
|
||||
use OCP\Http\Client\LocalServerException;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\HttpFoundation\IpUtils;
|
||||
@@ -37,6 +40,21 @@ class LocalAddressChecker {
|
||||
}
|
||||
|
||||
public function ThrowIfLocalIp(string $ip) : void {
|
||||
$parsedIp = Factory::parseAddressString(
|
||||
$ip,
|
||||
ParseStringFlag::IPV4_MAYBE_NON_DECIMAL | ParseStringFlag::IPV4ADDRESS_MAYBE_NON_QUAD_DOTTED
|
||||
);
|
||||
if ($parsedIp === null) {
|
||||
/* Not an IP */
|
||||
return;
|
||||
}
|
||||
/* Replace by normalized form */
|
||||
if ($parsedIp instanceof IPv6) {
|
||||
$ip = (string)($parsedIp->toIPv4() ?? $parsedIp);
|
||||
} else {
|
||||
$ip = (string)$parsedIp;
|
||||
}
|
||||
|
||||
$localRanges = [
|
||||
'100.64.0.0/10', // See RFC 6598
|
||||
'192.0.0.0/24', // See RFC 6890
|
||||
@@ -50,19 +68,6 @@ class LocalAddressChecker {
|
||||
$this->logger->warning("Host $ip was not connected to because it violates local access rules");
|
||||
throw new LocalServerException('Host violates local access rules');
|
||||
}
|
||||
|
||||
// Also check for IPv6 IPv4 nesting, because that's not covered by filter_var
|
||||
if ((bool)filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) && substr_count($ip, '.') > 0) {
|
||||
$delimiter = strrpos($ip, ':'); // Get last colon
|
||||
$ipv4Address = substr($ip, $delimiter + 1);
|
||||
|
||||
if (
|
||||
!filter_var($ipv4Address, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) ||
|
||||
IpUtils::checkIp($ip, $localRanges)) {
|
||||
$this->logger->warning("Host $ip was not connected to because it violates local access rules");
|
||||
throw new LocalServerException('Host violates local access rules');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function ThrowIfLocalAddress(string $uri) : void {
|
||||
@@ -72,7 +77,7 @@ class LocalAddressChecker {
|
||||
throw new LocalServerException('Could not detect any host');
|
||||
}
|
||||
|
||||
$host = strtolower($host);
|
||||
$host = idn_to_utf8(strtolower(urldecode($host)));
|
||||
// Remove brackets from IPv6 addresses
|
||||
if (strpos($host, '[') === 0 && substr($host, -1) === ']') {
|
||||
$host = substr($host, 1, -1);
|
||||
|
||||
+15
-22
@@ -34,14 +34,13 @@
|
||||
*/
|
||||
namespace OC;
|
||||
|
||||
use OC\Repair\CleanUpAbandonedApps;
|
||||
use OCP\AppFramework\QueryException;
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
use OCP\Collaboration\Resources\IManager;
|
||||
use OCP\EventDispatcher\IEventDispatcher;
|
||||
use OCP\Migration\IOutput;
|
||||
use OCP\Migration\IRepairStep;
|
||||
use OC\App\AppStore\Bundles\BundleFetcher;
|
||||
use OC\Avatar\AvatarManager;
|
||||
use OC\DB\Connection;
|
||||
use OC\DB\ConnectionAdapter;
|
||||
use OC\Repair\AddBruteForceCleanupJob;
|
||||
@@ -75,7 +74,6 @@ use OC\Repair\NC24\AddTokenCleanupJob;
|
||||
use OC\Repair\OldGroupMembershipShares;
|
||||
use OC\Repair\Owncloud\CleanPreviews;
|
||||
use OC\Repair\Owncloud\DropAccountTermsTable;
|
||||
use OC\Repair\Owncloud\InstallCoreBundle;
|
||||
use OC\Repair\Owncloud\MigrateOauthTables;
|
||||
use OC\Repair\Owncloud\MoveAvatars;
|
||||
use OC\Repair\Owncloud\SaveAccountsTableData;
|
||||
@@ -92,12 +90,11 @@ use Throwable;
|
||||
class Repair implements IOutput {
|
||||
|
||||
/** @var IRepairStep[] */
|
||||
private $repairSteps;
|
||||
private array $repairSteps;
|
||||
|
||||
private IEventDispatcher $dispatcher;
|
||||
|
||||
/** @var string */
|
||||
private $currentStep;
|
||||
private string $currentStep;
|
||||
|
||||
private LoggerInterface $logger;
|
||||
|
||||
@@ -174,7 +171,7 @@ class Repair implements IOutput {
|
||||
*
|
||||
* @return IRepairStep[]
|
||||
*/
|
||||
public static function getRepairSteps() {
|
||||
public static function getRepairSteps(): array {
|
||||
return [
|
||||
new Collation(\OC::$server->getConfig(), \OC::$server->get(LoggerInterface::class), \OC::$server->getDatabaseConnection(), false),
|
||||
new RepairMimeTypes(\OC::$server->getConfig(), \OC::$server->getDatabaseConnection()),
|
||||
@@ -193,29 +190,25 @@ class Repair implements IOutput {
|
||||
new MigrateOauthTables(\OC::$server->get(Connection::class)),
|
||||
new FixMountStorages(\OC::$server->getDatabaseConnection()),
|
||||
new UpdateLanguageCodes(\OC::$server->getDatabaseConnection(), \OC::$server->getConfig()),
|
||||
new InstallCoreBundle(
|
||||
\OC::$server->query(BundleFetcher::class),
|
||||
\OC::$server->getConfig(),
|
||||
\OC::$server->query(Installer::class)
|
||||
),
|
||||
new AddLogRotateJob(\OC::$server->getJobList()),
|
||||
new ClearFrontendCaches(\OC::$server->getMemCacheFactory(), \OC::$server->query(JSCombiner::class)),
|
||||
new ClearGeneratedAvatarCache(\OC::$server->getConfig(), \OC::$server->query(AvatarManager::class)),
|
||||
\OCP\Server::get(ClearGeneratedAvatarCache::class),
|
||||
new AddPreviewBackgroundCleanupJob(\OC::$server->getJobList()),
|
||||
new AddCleanupUpdaterBackupsJob(\OC::$server->getJobList()),
|
||||
new CleanupCardDAVPhotoCache(\OC::$server->getConfig(), \OC::$server->getAppDataDir('dav-photocache'), \OC::$server->get(LoggerInterface::class)),
|
||||
new AddClenupLoginFlowV2BackgroundJob(\OC::$server->getJobList()),
|
||||
new RemoveLinkShares(\OC::$server->getDatabaseConnection(), \OC::$server->getConfig(), \OC::$server->getGroupManager(), \OC::$server->getNotificationManager(), \OC::$server->query(ITimeFactory::class)),
|
||||
new ClearCollectionsAccessCache(\OC::$server->getConfig(), \OC::$server->query(IManager::class)),
|
||||
\OC::$server->query(ResetGeneratedAvatarFlag::class),
|
||||
\OC::$server->query(EncryptionLegacyCipher::class),
|
||||
\OC::$server->query(EncryptionMigration::class),
|
||||
\OC::$server->get(ShippedDashboardEnable::class),
|
||||
\OC::$server->get(AddBruteForceCleanupJob::class),
|
||||
\OC::$server->get(AddCheckForUserCertificatesJob::class),
|
||||
\OC::$server->get(RepairDavShares::class),
|
||||
\OC::$server->get(LookupServerSendCheck::class),
|
||||
\OC::$server->get(AddTokenCleanupJob::class),
|
||||
\OCP\Server::get(ResetGeneratedAvatarFlag::class),
|
||||
\OCP\Server::get(EncryptionLegacyCipher::class),
|
||||
\OCP\Server::get(EncryptionMigration::class),
|
||||
\OCP\Server::get(ShippedDashboardEnable::class),
|
||||
\OCP\Server::get(AddBruteForceCleanupJob::class),
|
||||
\OCP\Server::get(AddCheckForUserCertificatesJob::class),
|
||||
\OCP\Server::get(RepairDavShares::class),
|
||||
\OCP\Server::get(LookupServerSendCheck::class),
|
||||
\OCP\Server::get(AddTokenCleanupJob::class),
|
||||
\OCP\Server::get(CleanUpAbandonedApps::class),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @copyright Copyright (c) 2022 Arthur Schiwon <blizzz@arthur-schiwon.de>
|
||||
*
|
||||
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace OC\Repair;
|
||||
|
||||
use OCP\IConfig;
|
||||
use OCP\Migration\IOutput;
|
||||
use OCP\Migration\IRepairStep;
|
||||
|
||||
class CleanUpAbandonedApps implements IRepairStep {
|
||||
protected const ABANDONED_APPS = ['accessibility', 'files_videoplayer'];
|
||||
private IConfig $config;
|
||||
|
||||
public function __construct(IConfig $config) {
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
public function getName(): string {
|
||||
return 'Clean up abandoned apps';
|
||||
}
|
||||
|
||||
public function run(IOutput $output): void {
|
||||
foreach (self::ABANDONED_APPS as $app) {
|
||||
// only remove global app values
|
||||
// user prefs of accessibility are dealt with in Theming migration
|
||||
// videoplayer did not have user prefs
|
||||
$this->config->deleteAppValues($app);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,16 +26,19 @@ namespace OC\Repair;
|
||||
|
||||
use OC\Avatar\AvatarManager;
|
||||
use OCP\IConfig;
|
||||
use OCP\BackgroundJob\IJobList;
|
||||
use OCP\Migration\IOutput;
|
||||
use OCP\Migration\IRepairStep;
|
||||
|
||||
class ClearGeneratedAvatarCache implements IRepairStep {
|
||||
protected AvatarManager $avatarManager;
|
||||
private IConfig $config;
|
||||
private IJobList $jobList;
|
||||
|
||||
public function __construct(IConfig $config, AvatarManager $avatarManager) {
|
||||
public function __construct(IConfig $config, AvatarManager $avatarManager, IJobList $jobList) {
|
||||
$this->config = $config;
|
||||
$this->avatarManager = $avatarManager;
|
||||
$this->jobList = $jobList;
|
||||
}
|
||||
|
||||
public function getName(): string {
|
||||
@@ -55,8 +58,8 @@ class ClearGeneratedAvatarCache implements IRepairStep {
|
||||
public function run(IOutput $output): void {
|
||||
if ($this->shouldRun()) {
|
||||
try {
|
||||
$this->avatarManager->clearCachedAvatars();
|
||||
$output->info('Avatar cache cleared');
|
||||
$this->jobList->add(ClearGeneratedAvatarCacheJob::class, []);
|
||||
$output->info('Avatar cache clearing job added');
|
||||
} catch (\Exception $e) {
|
||||
$output->warning('Unable to clear the avatar cache');
|
||||
}
|
||||
|
||||
+13
-17
@@ -1,8 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch>
|
||||
*
|
||||
* @author Lukas Reschke <lukas@statuscode.ch>
|
||||
* @copyright 2022 Carl Schwan <carl@carlschwan.eu>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
@@ -20,23 +18,21 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
namespace OC\App\AppStore\Bundles;
|
||||
namespace OC\Repair;
|
||||
|
||||
class CoreBundle extends Bundle {
|
||||
use OCP\BackgroundJob\QueuedJob;
|
||||
use OCP\AppFramework\Utility\ITimeFactory;
|
||||
use OC\Avatar\AvatarManager;
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getName() {
|
||||
return 'Core bundle';
|
||||
class ClearGeneratedAvatarCacheJob extends QueuedJob {
|
||||
protected AvatarManager $avatarManager;
|
||||
|
||||
public function __construct(ITimeFactory $timeFactory, AvatarManager $avatarManager) {
|
||||
parent::__construct($timeFactory);
|
||||
$this->avatarManager = $avatarManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getAppIdentifiers() {
|
||||
return [
|
||||
'bruteforcesettings',
|
||||
];
|
||||
public function run($argument) {
|
||||
$this->avatarManager->clearCachedAvatars();
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,7 @@ class MoveUpdaterStepFile implements IRepairStep {
|
||||
}
|
||||
|
||||
public function run(IOutput $output) {
|
||||
$updateDir = $this->config->getSystemValue('updatedirectory') ?? $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data');
|
||||
$updateDir = $this->config->getSystemValue('updatedirectory', null) ?? $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data');
|
||||
$instanceId = $this->config->getSystemValue('instanceid', null);
|
||||
|
||||
if (!is_string($instanceId) || empty($instanceId)) {
|
||||
|
||||
@@ -1,79 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch>
|
||||
*
|
||||
* @author Julius Härtl <jus@bitgrid.net>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
namespace OC\Repair\Owncloud;
|
||||
|
||||
use OC\App\AppStore\Bundles\BundleFetcher;
|
||||
use OC\Installer;
|
||||
use OCP\IConfig;
|
||||
use OCP\Migration\IOutput;
|
||||
use OCP\Migration\IRepairStep;
|
||||
|
||||
class InstallCoreBundle implements IRepairStep {
|
||||
/** @var BundleFetcher */
|
||||
private $bundleFetcher;
|
||||
/** @var IConfig */
|
||||
private $config;
|
||||
/** @var Installer */
|
||||
private $installer;
|
||||
|
||||
/**
|
||||
* @param BundleFetcher $bundleFetcher
|
||||
* @param IConfig $config
|
||||
* @param Installer $installer
|
||||
*/
|
||||
public function __construct(BundleFetcher $bundleFetcher,
|
||||
IConfig $config,
|
||||
Installer $installer) {
|
||||
$this->bundleFetcher = $bundleFetcher;
|
||||
$this->config = $config;
|
||||
$this->installer = $installer;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName() {
|
||||
return 'Install new core bundle components';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function run(IOutput $output) {
|
||||
$versionFromBeforeUpdate = $this->config->getSystemValue('version', '0.0.0');
|
||||
|
||||
if (version_compare($versionFromBeforeUpdate, '12.0.0.14', '>')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$defaultBundle = $this->bundleFetcher->getDefaultInstallationBundle();
|
||||
foreach ($defaultBundle as $bundle) {
|
||||
try {
|
||||
$this->installer->installAppBundle($bundle);
|
||||
$output->info('Successfully installed core app bundle.');
|
||||
} catch (\Exception $e) {
|
||||
$output->warning('Could not install core app bundle: ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,6 @@ namespace OC;
|
||||
use bantu\IniGetWrapper\IniGetWrapper;
|
||||
use Exception;
|
||||
use InvalidArgumentException;
|
||||
use OC\App\AppStore\Bundles\BundleFetcher;
|
||||
use OC\Authentication\Token\PublicKeyTokenProvider;
|
||||
use OC\Authentication\Token\TokenCleanupJob;
|
||||
use OC\Log\Rotate;
|
||||
@@ -403,14 +402,6 @@ class Setup {
|
||||
|
||||
// Install shipped apps and specified app bundles
|
||||
Installer::installShippedApps();
|
||||
$bundleFetcher = new BundleFetcher(\OC::$server->getL10N('lib'));
|
||||
$defaultInstallationBundles = $bundleFetcher->getDefaultInstallationBundle();
|
||||
foreach ($defaultInstallationBundles as $bundle) {
|
||||
try {
|
||||
$this->installer->installAppBundle($bundle);
|
||||
} catch (Exception $e) {
|
||||
}
|
||||
}
|
||||
|
||||
// create empty file in data dir, so we can later find
|
||||
// out that this is indeed an ownCloud data directory
|
||||
|
||||
+98
-12
@@ -23,85 +23,149 @@ declare(strict_types=1);
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace OC\Collaboration\Reference;
|
||||
|
||||
use OCP\Collaboration\Reference\IReference;
|
||||
namespace OCP\Collaboration\Reference;
|
||||
|
||||
/**
|
||||
* @since 25.0.0
|
||||
*/
|
||||
class Reference implements IReference {
|
||||
private string $reference;
|
||||
protected string $reference;
|
||||
|
||||
private bool $accessible = true;
|
||||
protected bool $accessible = true;
|
||||
|
||||
private ?string $title = null;
|
||||
private ?string $description = null;
|
||||
private ?string $imageUrl = null;
|
||||
private ?string $contentType = null;
|
||||
private ?string $url = null;
|
||||
protected ?string $title = null;
|
||||
protected ?string $description = null;
|
||||
protected ?string $imageUrl = null;
|
||||
protected ?string $contentType = null;
|
||||
protected ?string $url = null;
|
||||
|
||||
private ?string $richObjectType = null;
|
||||
private ?array $richObject = null;
|
||||
protected ?string $richObjectType = null;
|
||||
protected ?array $richObject = null;
|
||||
|
||||
/**
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public function __construct(string $reference) {
|
||||
$this->reference = $reference;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public function getId(): string {
|
||||
return $this->reference;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public function setAccessible(bool $accessible): void {
|
||||
$this->accessible = $accessible;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public function getAccessible(): bool {
|
||||
return $this->accessible;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public function setTitle(string $title): void {
|
||||
$this->title = $title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public function getTitle(): string {
|
||||
return $this->title ?? $this->reference;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public function setDescription(?string $description): void {
|
||||
$this->description = $description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public function getDescription(): ?string {
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public function setImageUrl(?string $imageUrl): void {
|
||||
$this->imageUrl = $imageUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public function getImageUrl(): ?string {
|
||||
return $this->imageUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public function setImageContentType(?string $contentType): void {
|
||||
$this->contentType = $contentType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public function getImageContentType(): ?string {
|
||||
return $this->contentType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public function setUrl(?string $url): void {
|
||||
$this->url = $url;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public function getUrl(): ?string {
|
||||
return $this->url;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public function setRichObject(string $type, ?array $richObject): void {
|
||||
$this->richObjectType = $type;
|
||||
$this->richObject = $richObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public function getRichObjectType(): string {
|
||||
if ($this->richObjectType === null) {
|
||||
return 'open-graph';
|
||||
@@ -109,6 +173,10 @@ class Reference implements IReference {
|
||||
return $this->richObjectType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public function getRichObject(): array {
|
||||
if ($this->richObject === null) {
|
||||
return $this->getOpenGraphObject();
|
||||
@@ -116,6 +184,10 @@ class Reference implements IReference {
|
||||
return $this->richObject;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public function getOpenGraphObject(): array {
|
||||
return [
|
||||
'id' => $this->getId(),
|
||||
@@ -126,6 +198,11 @@ class Reference implements IReference {
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param IReference $reference
|
||||
* @return array
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public static function toCache(IReference $reference): array {
|
||||
return [
|
||||
'id' => $reference->getId(),
|
||||
@@ -140,6 +217,11 @@ class Reference implements IReference {
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $cache
|
||||
* @return IReference
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public static function fromCache(array $cache): IReference {
|
||||
$reference = new Reference($cache['id']);
|
||||
$reference->setTitle($cache['title']);
|
||||
@@ -152,6 +234,10 @@ class Reference implements IReference {
|
||||
return $reference;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @since 25.0.0
|
||||
*/
|
||||
public function jsonSerialize() {
|
||||
return [
|
||||
'richObjectType' => $this->getRichObjectType(),
|
||||
Generated
+5655
-28493
File diff suppressed because it is too large
Load Diff
+6
-18
@@ -47,7 +47,6 @@
|
||||
"@nextcloud/sharing": "^0.1.0",
|
||||
"@nextcloud/vue": "^7.0.0-beta.4",
|
||||
"@nextcloud/vue-dashboard": "^2.0.1",
|
||||
"@vue/cli-plugin-unit-jest": "^4.5.15",
|
||||
"autosize": "^5.0.1",
|
||||
"backbone": "^1.4.1",
|
||||
"blueimp-md5": "^2.19.0",
|
||||
@@ -71,8 +70,8 @@
|
||||
"libphonenumber-js": "^1.10.13",
|
||||
"lodash": "^4.17.21",
|
||||
"marked": "^4.0.14",
|
||||
"moment": "^2.29.2",
|
||||
"moment-timezone": "^0.5.34",
|
||||
"moment": "^2.29.4",
|
||||
"moment-timezone": "^0.5.37",
|
||||
"nextcloud-vue-collections": "^0.9.0",
|
||||
"p-limit": "^4.0.0",
|
||||
"p-queue": "^7.3.0",
|
||||
@@ -111,6 +110,8 @@
|
||||
"@testing-library/user-event": "^14.1.1",
|
||||
"@testing-library/vue": "^5.8.3",
|
||||
"@vue/test-utils": "^1.3.0",
|
||||
"@vue/vue2-jest": "^29.1.1",
|
||||
"babel-jest": "^29.0.3",
|
||||
"babel-loader": "^8.2.5",
|
||||
"babel-loader-exclude-node-modules-except": "^1.2.1",
|
||||
"css-loader": "^6.7.1",
|
||||
@@ -121,7 +122,8 @@
|
||||
"handlebars-loader": "^1.7.1",
|
||||
"jasmine-core": "~2.5.2",
|
||||
"jasmine-sinon": "^0.4.0",
|
||||
"jest": "^26.6.3",
|
||||
"jest": "^29.0.3",
|
||||
"jest-environment-jsdom": "^29.0.3",
|
||||
"jsdoc": "^3.6.10",
|
||||
"jsdom": "^19.0.0",
|
||||
"karma": "^6.4.0",
|
||||
@@ -138,7 +140,6 @@
|
||||
"sass-loader": "^12.6.0",
|
||||
"sinon": "<= 5.0.7",
|
||||
"style-loader": "^3.3.1",
|
||||
"vue-jest": "^4.0.1",
|
||||
"vue-loader": "^15.9.8",
|
||||
"vue-template-compiler": "^2.7.10",
|
||||
"webpack": "^5.74.0",
|
||||
@@ -154,18 +155,5 @@
|
||||
},
|
||||
"overrides": {
|
||||
"colors": "1.4.0"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
"js",
|
||||
"vue"
|
||||
],
|
||||
"setupFilesAfterEnv": [
|
||||
"<rootDir>/tests/jestSetup.js"
|
||||
],
|
||||
"transform": {
|
||||
"^.+\\.js$": "<rootDir>/tests/jestBabelTransformer.js",
|
||||
"^.+\\.vue$": "vue-jest"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,142 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch>
|
||||
*
|
||||
* @author Lukas Reschke <lukas@statuscode.ch>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Test\Repair\Owncloud;
|
||||
|
||||
use OC\App\AppStore\Bundles\Bundle;
|
||||
use OC\App\AppStore\Bundles\BundleFetcher;
|
||||
use OC\Installer;
|
||||
use OC\Repair\Owncloud\InstallCoreBundle;
|
||||
use OCP\IConfig;
|
||||
use OCP\Migration\IOutput;
|
||||
use Test\TestCase;
|
||||
|
||||
class InstallCoreBundleTest extends TestCase {
|
||||
/** @var BundleFetcher|\PHPUnit_Framework_MockObject_MockObject */
|
||||
private $bundleFetcher;
|
||||
/** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
|
||||
private $config;
|
||||
/** @var Installer|\PHPUnit_Framework_MockObject_MockObject */
|
||||
private $installer;
|
||||
/** @var InstallCoreBundle */
|
||||
private $installCoreBundle;
|
||||
|
||||
public function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->bundleFetcher = $this->createMock(BundleFetcher::class);
|
||||
$this->config = $this->createMock(IConfig::class);
|
||||
$this->installer = $this->createMock(Installer::class);
|
||||
|
||||
$this->installCoreBundle = new InstallCoreBundle(
|
||||
$this->bundleFetcher,
|
||||
$this->config,
|
||||
$this->installer
|
||||
);
|
||||
}
|
||||
|
||||
public function testGetName() {
|
||||
$this->assertSame('Install new core bundle components', $this->installCoreBundle->getName());
|
||||
}
|
||||
|
||||
public function testRunOlder() {
|
||||
$this->config
|
||||
->expects($this->once())
|
||||
->method('getSystemValue')
|
||||
->with('version', '0.0.0')
|
||||
->willReturn('12.0.0.15');
|
||||
$this->bundleFetcher
|
||||
->expects($this->never())
|
||||
->method('getDefaultInstallationBundle');
|
||||
/** @var IOutput|\PHPUnit_Framework_MockObject_MockObject $output */
|
||||
$output = $this->createMock(IOutput::class);
|
||||
$output
|
||||
->expects($this->never())
|
||||
->method('info');
|
||||
$output
|
||||
->expects($this->never())
|
||||
->method('warning');
|
||||
|
||||
$this->installCoreBundle->run($output);
|
||||
}
|
||||
|
||||
public function testRunWithException() {
|
||||
$this->config
|
||||
->expects($this->once())
|
||||
->method('getSystemValue')
|
||||
->with('version', '0.0.0')
|
||||
->willReturn('12.0.0.14');
|
||||
$bundle = $this->createMock(Bundle::class);
|
||||
$this->bundleFetcher
|
||||
->expects($this->once())
|
||||
->method('getDefaultInstallationBundle')
|
||||
->willReturn([
|
||||
$bundle,
|
||||
]);
|
||||
$this->installer
|
||||
->expects($this->once())
|
||||
->method('installAppBundle')
|
||||
->with($bundle)
|
||||
->willThrowException(new \Exception('ExceptionText'));
|
||||
/** @var IOutput|\PHPUnit_Framework_MockObject_MockObject $output */
|
||||
$output = $this->createMock(IOutput::class);
|
||||
$output
|
||||
->expects($this->never())
|
||||
->method('info');
|
||||
$output
|
||||
->expects($this->once())
|
||||
->method('warning')
|
||||
->with('Could not install core app bundle: ExceptionText');
|
||||
|
||||
$this->installCoreBundle->run($output);
|
||||
}
|
||||
|
||||
public function testRun() {
|
||||
$this->config
|
||||
->expects($this->once())
|
||||
->method('getSystemValue')
|
||||
->with('version', '0.0.0')
|
||||
->willReturn('12.0.0.14');
|
||||
$bundle = $this->createMock(Bundle::class);
|
||||
$this->bundleFetcher
|
||||
->expects($this->once())
|
||||
->method('getDefaultInstallationBundle')
|
||||
->willReturn([
|
||||
$bundle,
|
||||
]);
|
||||
$this->installer
|
||||
->expects($this->once())
|
||||
->method('installAppBundle')
|
||||
->with($bundle);
|
||||
/** @var IOutput|\PHPUnit_Framework_MockObject_MockObject $output */
|
||||
$output = $this->createMock(IOutput::class);
|
||||
$output
|
||||
->expects($this->once())
|
||||
->method('info')
|
||||
->with('Successfully installed core app bundle.');
|
||||
$output
|
||||
->expects($this->never())
|
||||
->method('warning');
|
||||
|
||||
$this->installCoreBundle->run($output);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
@apache
|
||||
Feature: app-theming
|
||||
|
||||
Scenario: changing the color updates the header color
|
||||
Scenario: changing the color updates the primary color
|
||||
Given I am logged in as the admin
|
||||
And I visit the admin settings page
|
||||
And I open the "Theming" section
|
||||
@@ -9,19 +9,19 @@ Feature: app-theming
|
||||
# The "eventually" part is not really needed here, as the colour is not
|
||||
# being animated at this point, but there is no need to create a specific
|
||||
# step just for this.
|
||||
And I see that the background color is eventually "#0082C9"
|
||||
And I see that the primary color is eventually "#0082C9"
|
||||
When I set the "Color" parameter in the Theming app to "#C9C9C9"
|
||||
Then I see that the parameters in the Theming app are eventually saved
|
||||
And I see that the background color is eventually "#C9C9C9"
|
||||
And I see that the primary color is eventually "#C9C9C9"
|
||||
|
||||
Scenario: resetting the color updates the header color
|
||||
Scenario: resetting the color updates the primary color
|
||||
Given I am logged in as the admin
|
||||
And I visit the admin settings page
|
||||
And I open the "Theming" section
|
||||
And I see that the color selector in the Theming app has loaded
|
||||
And I set the "Color" parameter in the Theming app to "#C9C9C9"
|
||||
And I see that the parameters in the Theming app are eventually saved
|
||||
And I see that the background color is eventually "#C9C9C9"
|
||||
And I see that the primary color is eventually "#C9C9C9"
|
||||
When I reset the "Color" parameter in the Theming app to its default value
|
||||
Then I see that the parameters in the Theming app are eventually saved
|
||||
And I see that the background color is eventually "#0082C9"
|
||||
And I see that the primary color is eventually "#0082C9"
|
||||
|
||||
@@ -125,19 +125,19 @@ class ThemingAppContext implements Context, ActorAwareInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Then I see that the background color is eventually :color
|
||||
* @Then I see that the primary color is eventually :color
|
||||
*/
|
||||
public function iSeeThatTheBackgroundColorIsEventually($color) {
|
||||
$backgroundColorMatchesCallback = function () use ($color) {
|
||||
$headerColor = $this->actor->getSession()->evaluateScript("return $('body').css('background-color');");
|
||||
$headerColor = $this->getRGBArray($headerColor);
|
||||
public function iSeeThatThePrimaryColorIsEventually($color) {
|
||||
$primaryColorMatchesCallback = function () use ($color) {
|
||||
$primaryColor = $this->actor->getSession()->evaluateScript("return getComputedStyle(document.documentElement).getPropertyValue('--color-primary').trim();");
|
||||
$primaryColor = $this->getRGBArray($primaryColor);
|
||||
$color = $this->getRGBArray($color);
|
||||
|
||||
return $headerColor == $color;
|
||||
return $primaryColor == $color;
|
||||
};
|
||||
|
||||
if (!Utils::waitFor($backgroundColorMatchesCallback, $timeout = 10 * $this->actor->getFindTimeoutMultiplier(), $timeoutStep = 1)) {
|
||||
Assert::fail("The background color is not $color yet after $timeout seconds");
|
||||
if (!Utils::waitFor($primaryColorMatchesCallback, $timeout = 10 * $this->actor->getFindTimeoutMultiplier(), $timeoutStep = 1)) {
|
||||
Assert::fail("The primary color is not $color yet after $timeout seconds");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
namespace Test\App\AppStore\Bundles;
|
||||
|
||||
use OC\App\AppStore\Bundles\BundleFetcher;
|
||||
use OC\App\AppStore\Bundles\CoreBundle;
|
||||
use OC\App\AppStore\Bundles\EducationBundle;
|
||||
use OC\App\AppStore\Bundles\EnterpriseBundle;
|
||||
use OC\App\AppStore\Bundles\GroupwareBundle;
|
||||
@@ -58,16 +57,8 @@ class BundleFetcherTest extends TestCase {
|
||||
$this->assertEquals($expected, $this->bundleFetcher->getBundles());
|
||||
}
|
||||
|
||||
public function testGetDefaultInstallationBundle() {
|
||||
$expected = [
|
||||
new CoreBundle($this->l10n),
|
||||
];
|
||||
$this->assertEquals($expected, $this->bundleFetcher->getDefaultInstallationBundle());
|
||||
}
|
||||
|
||||
public function testGetBundleByIdentifier() {
|
||||
$this->assertEquals(new EnterpriseBundle($this->l10n), $this->bundleFetcher->getBundleByIdentifier('EnterpriseBundle'));
|
||||
$this->assertEquals(new CoreBundle($this->l10n), $this->bundleFetcher->getBundleByIdentifier('CoreBundle'));
|
||||
$this->assertEquals(new GroupwareBundle($this->l10n), $this->bundleFetcher->getBundleByIdentifier('GroupwareBundle'));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch>
|
||||
*
|
||||
* @license GNU AGPL version 3 or any later version
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Test\App\AppStore\Bundles;
|
||||
|
||||
use OC\App\AppStore\Bundles\CoreBundle;
|
||||
|
||||
class CoreBundleTest extends BundleBase {
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
$this->bundle = new CoreBundle($this->l10n);
|
||||
$this->bundleIdentifier = 'CoreBundle';
|
||||
$this->bundleName = 'Core bundle';
|
||||
$this->bundleAppIds = [
|
||||
'bruteforcesettings',
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -161,6 +161,7 @@ class ClientTest extends \Test\TestCase {
|
||||
['another-host.local'],
|
||||
['service.localhost'],
|
||||
['!@#$'], // test invalid url
|
||||
['normal.host.com'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ class LocalAddressCheckerTest extends \Test\TestCase {
|
||||
return [
|
||||
['192.168.0.1'],
|
||||
['fe80::200:5aee:feaa:20a2'],
|
||||
['0:0:0:0:0:0:10.0.0.1'],
|
||||
['0:0:0:0:0:ffff:10.0.0.1'],
|
||||
['0:0:0:0:0:ffff:127.0.0.0'],
|
||||
['10.0.0.1'],
|
||||
['::'],
|
||||
@@ -112,7 +112,7 @@ class LocalAddressCheckerTest extends \Test\TestCase {
|
||||
['172.16.42.1'],
|
||||
['[fdf8:f53b:82e4::53]/secret.ics'],
|
||||
['[fe80::200:5aee:feaa:20a2]/secret.ics'],
|
||||
['[0:0:0:0:0:0:10.0.0.1]/secret.ics'],
|
||||
['[0:0:0:0:0:ffff:10.0.0.1]/secret.ics'],
|
||||
['[0:0:0:0:0:ffff:127.0.0.0]/secret.ics'],
|
||||
['10.0.0.1'],
|
||||
['another-host.local'],
|
||||
@@ -121,6 +121,25 @@ class LocalAddressCheckerTest extends \Test\TestCase {
|
||||
['100.100.100.200'],
|
||||
['192.0.0.1'],
|
||||
['randomdomain.internal'],
|
||||
['0177.0.0.9'],
|
||||
['⑯⑨。②⑤④。⑯⑨。②⑤④'],
|
||||
['127。②⑤④。⑯⑨.②⑤④'],
|
||||
['127.0.00000000000000000000000000000000001'],
|
||||
['127.1'],
|
||||
['127.000.001'],
|
||||
['0177.0.0.01'],
|
||||
['0x7f.0x0.0x0.0x1'],
|
||||
['0x7f000001'],
|
||||
['2130706433'],
|
||||
['00000000000000000000000000000000000000000000000000177.1'],
|
||||
['0x7f.1'],
|
||||
['127.0x1'],
|
||||
['[0000:0000:0000:0000:0000:0000:0000:0001]'],
|
||||
['[0:0:0:0:0:0:0:1]'],
|
||||
['[0:0:0:0::0:0:1]'],
|
||||
['%31%32%37%2E%30%2E%30%2E%31'],
|
||||
['%31%32%37%2E%30%2E%30.%31'],
|
||||
['[%3A%3A%31]'],
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace Test\Repair;
|
||||
|
||||
use OC\Avatar\AvatarManager;
|
||||
use OC\Repair\ClearGeneratedAvatarCache;
|
||||
use OCP\BackgroundJob\IJobList;
|
||||
use OCP\IConfig;
|
||||
use OCP\Migration\IOutput;
|
||||
|
||||
@@ -39,8 +40,10 @@ class ClearGeneratedAvatarCacheTest extends \Test\TestCase {
|
||||
/** @var IConfig */
|
||||
private $config;
|
||||
|
||||
/** @var ClearGeneratedAvatarCache */
|
||||
protected $repair;
|
||||
/** @var IJobList */
|
||||
private $jobList;
|
||||
|
||||
protected ClearGeneratedAvatarCache $repair;
|
||||
|
||||
protected function setUp(): void {
|
||||
parent::setUp();
|
||||
@@ -48,8 +51,9 @@ class ClearGeneratedAvatarCacheTest extends \Test\TestCase {
|
||||
$this->outputMock = $this->createMock(IOutput::class);
|
||||
$this->avatarManager = $this->createMock(AvatarManager::class);
|
||||
$this->config = $this->createMock(IConfig::class);
|
||||
$this->jobList = $this->createMock(IJobList::class);
|
||||
|
||||
$this->repair = new ClearGeneratedAvatarCache($this->config, $this->avatarManager);
|
||||
$this->repair = new ClearGeneratedAvatarCache($this->config, $this->avatarManager, $this->jobList);
|
||||
}
|
||||
|
||||
public function shouldRunDataProvider() {
|
||||
|
||||
+2
-2
@@ -30,10 +30,10 @@
|
||||
// between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel
|
||||
// when updating major/minor version number.
|
||||
|
||||
$OC_Version = [25, 0, 0, 12];
|
||||
$OC_Version = [25, 0, 0, 14];
|
||||
|
||||
// The human readable string
|
||||
$OC_VersionString = '25.0.0 beta 7';
|
||||
$OC_VersionString = '25.0.0 RC2';
|
||||
|
||||
$OC_VersionCanBeUpgradedFrom = [
|
||||
'nextcloud' => [
|
||||
|
||||
Reference in New Issue
Block a user