diff --git a/appinfo/info.xml b/appinfo/info.xml
index 9e93fa8..9c83e03 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -28,7 +28,7 @@
OCA\NMCSettings\Settings\Personal\Security\NmcEndToEndEncryption
OCA\NMCSettings\Sections\Personal\AccountSettings
OCA\NMCSettings\Sections\Personal\DevicesSessions
- OCA\NMCSettings\Sections\Personal\Themes
+ OCA\NMCSettings\Sections\Personal\Appearance
OCA\NMCSettings\Settings\Groupware
OCA\NMCSettings\Settings\PersonalInfo
OCA\NMCSettings\Settings\Security
diff --git a/lib/Sections/Personal/Themes.php b/lib/Sections/Personal/Appearance.php
similarity index 72%
rename from lib/Sections/Personal/Themes.php
rename to lib/Sections/Personal/Appearance.php
index afd0829..521d365 100644
--- a/lib/Sections/Personal/Themes.php
+++ b/lib/Sections/Personal/Appearance.php
@@ -6,21 +6,25 @@
use OCP\IURLGenerator;
use OCP\Settings\IIconSection;
-class Themes implements IIconSection {
- private IL10N $l;
- private IURLGenerator $urlGenerator;
+class Appearance implements IIconSection {
+
+ /** @var IL10N */
+ private $l;
+
+ /** @var IURLGenerator */
+ private $urlGenerator;
public function __construct(IL10N $l, IURLGenerator $urlGenerator) {
$this->l = $l;
$this->urlGenerator = $urlGenerator;
}
- public function getIcon(): string {
+ public function getIcon() {
return $this->urlGenerator->imagePath('nmctheme', 'settings/appearance.svg');
}
public function getID(): string {
- return 'themes';
+ return 'appearance';
}
public function getName(): string {
@@ -28,6 +32,6 @@ public function getName(): string {
}
public function getPriority(): int {
- return -1;
+ return -5;
}
}
diff --git a/lib/Settings/Personal/NmcPersonalThemes.php b/lib/Settings/Personal/NmcPersonalThemes.php
index 37777fb..8b08651 100644
--- a/lib/Settings/Personal/NmcPersonalThemes.php
+++ b/lib/Settings/Personal/NmcPersonalThemes.php
@@ -68,7 +68,7 @@ public function getForm(): TemplateResponse {
/** {@inheritDoc} */
public function getSection(): string {
- return 'themes';
+ return 'appearance';
}
/** {@inheritDoc} */
diff --git a/src/components/UserThemes.vue b/src/components/UserThemes.vue
index c9b66e0..3c89008 100644
--- a/src/components/UserThemes.vue
+++ b/src/components/UserThemes.vue
@@ -23,13 +23,13 @@
-
@@ -60,8 +60,6 @@ const availableThemes = loadState('theming', 'themes', [])
const enforceTheme = loadState('theming', 'enforceTheme', '')
const shortcutsDisabled = loadState('theming', 'shortcutsDisabled', false)
-const background = loadState('theming', 'background')
-const themingDefaultBackground = loadState('theming', 'themingDefaultBackground')
const isUserThemingDisabled = loadState('theming', 'isUserThemingDisabled')
console.debug('Available themes', availableThemes)
@@ -79,8 +77,6 @@ export default {
availableThemes,
enforceTheme,
shortcutsDisabled,
- background,
- themingDefaultBackground,
isUserThemingDisabled,
}
},
@@ -128,10 +124,6 @@ export default {
},
methods: {
- updateBackground(data) {
- this.background = (data.type === 'custom' || data.type === 'default') ? data.type : data.value
- this.$emit('update:background')
- },
changeTheme({ enabled, id }) {
// Reset selected and select new one
diff --git a/src/js/nmcsettings.js b/src/js/nmcsettings.js
index 86a5740..16317cb 100644
--- a/src/js/nmcsettings.js
+++ b/src/js/nmcsettings.js
@@ -8,7 +8,7 @@ window.addEventListener('DOMContentLoaded', function() {
const type = element.attributes['data-section-type'].value
if (type === 'personal') {
const id = element.attributes['data-section-id'].value
- if (id !== 'account' && id !== 'sessions') {
+ if (id !== 'account' && id !== 'sessions' && id !== 'appearance') {
element.remove()
}
}
@@ -20,7 +20,7 @@ window.addEventListener('DOMContentLoaded', function() {
const admin = '/admin'
const account = '/account'
const sessions = '/sessions'
- const themes = '/themes'
+ const themes = '/appearance'
if (href.includes(admin) || href.includes(account) || href.includes(sessions) || href.includes(themes)) {
if (href.includes(admin)) {
diff --git a/webpack.config.cjs b/webpack.config.cjs
index f2f3124..b3c0441 100644
--- a/webpack.config.cjs
+++ b/webpack.config.cjs
@@ -1,21 +1,18 @@
// webpack with standard nextcloud config
const path = require('path')
-const webpack = require('webpack')
const webpackConfig = require('@nextcloud/webpack-vue-config')
webpackConfig.entry = {
- ...webpackConfig.entry,
- account: path.join(__dirname, 'src', 'js', 'account.js'),
- devices: path.join(__dirname, 'src', 'js', 'devices.js'),
- nmcsettings: path.join(__dirname, 'src', 'js', 'nmcsettings.js'),
- personal: path.join(__dirname, 'src', 'js', 'personal.js'),
- sessions: path.join(__dirname, 'src', 'js', 'sessions.js'),
- themes: path.join(__dirname, 'src', 'js', 'themes.js'),
- }
+ ...webpackConfig.entry,
+ account: path.join(__dirname, 'src', 'js', 'account.js'),
+ devices: path.join(__dirname, 'src', 'js', 'devices.js'),
+ nmcsettings: path.join(__dirname, 'src', 'js', 'nmcsettings.js'),
+ personal: path.join(__dirname, 'src', 'js', 'personal.js'),
+ sessions: path.join(__dirname, 'src', 'js', 'sessions.js'),
+ themes: path.join(__dirname, 'src', 'js', 'themes.js'),
+}
// Workaround for https://github.com/nextcloud/webpack-vue-config/pull/432 causing problems with nextcloud-vue-collections
webpackConfig.resolve.alias = {}
-webpackConfig.resolve.extensions = ['.*', '.js', '.ts', '.vue', '.json']
-
module.exports = webpackConfig