-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25458 from nextcloud/backport/23588/stable20
[stable20] Override default dashboard background with theming one
- Loading branch information
Showing
11 changed files
with
54 additions
and
34 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,7 +68,9 @@ | |
<a v-if="isAdmin" :href="appStoreUrl" class="button">{{ t('dashboard', 'Get more widgets from the app store') }}</a> | ||
|
||
<h3>{{ t('dashboard', 'Change background image') }}</h3> | ||
<BackgroundSettings :background="background" @update:background="updateBackground" /> | ||
<BackgroundSettings :background="background" | ||
:theming-default-background="themingDefaultBackground" | ||
@update:background="updateBackground" /> | ||
|
||
<h3>{{ t('dashboard', 'Weather service') }}</h3> | ||
<p> | ||
|
@@ -93,11 +95,11 @@ import { generateUrl } from '@nextcloud/router' | |
import isMobile from './mixins/isMobile' | ||
import BackgroundSettings from './components/BackgroundSettings' | ||
import getBackgroundUrl from './helpers/getBackgroundUrl' | ||
import prefixWithBaseUrl from './helpers/prefixWithBaseUrl' | ||
const panels = loadState('dashboard', 'panels') | ||
const firstRun = loadState('dashboard', 'firstRun') | ||
const background = loadState('dashboard', 'background') | ||
const themingDefaultBackground = loadState('dashboard', 'themingDefaultBackground') | ||
const version = loadState('dashboard', 'version') | ||
const shippedBackgroundList = loadState('dashboard', 'shippedBackgrounds') | ||
const statusInfo = { | ||
|
@@ -140,16 +142,17 @@ export default { | |
appStoreUrl: generateUrl('/settings/apps/dashboard'), | ||
statuses: {}, | ||
background, | ||
themingDefaultBackground, | ||
version, | ||
defaultBackground: window.OCA.Accessibility?.theme === 'dark' ? prefixWithBaseUrl('[email protected]?v=1') : prefixWithBaseUrl('flickr-paszczak000-8715851521.jpg?v=1'), | ||
} | ||
}, | ||
computed: { | ||
backgroundImage() { | ||
return getBackgroundUrl(this.background, this.version) | ||
return getBackgroundUrl(this.background, this.version, this.themingDefaultBackground) | ||
}, | ||
backgroundStyle() { | ||
if (this.background.match(/#[0-9A-Fa-f]{6}/g)) { | ||
if ((this.background === 'default' && this.themingDefaultBackground === 'backgroundColor') | ||
|| this.background.match(/#[0-9A-Fa-f]{6}/g)) { | ||
return null | ||
} | ||
return { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters