Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions core/src/components/AppItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,9 @@ const unreadLabel = computed(() => {
&__icon {
width: var(--app-item-icon-size);
height: var(--app-item-icon-size);
// Force the icon to white on the colored circle, then apply the
// same vertical alpha gradient (--header-menu-icon-mask) used in
// the header so icons read consistently across the design.
filter: brightness(0) invert(1);
// App icons are bright by default; flip them to dark when the
// primary color (circle background) is bright (e.g. white in dark mode).
filter: var(--primary-invert-if-bright);
mask: var(--header-menu-icon-mask);
}

Expand All @@ -149,6 +148,9 @@ const unreadLabel = computed(() => {
line-height: 1.3;
text-align: center;
color: var(--color-main-text);
// Needs a matching <html lang> to actually break with a hyphen.
-webkit-hyphens: auto;
hyphens: auto;
word-break: normal;
overflow-wrap: break-word;
max-width: 100%;
Expand All @@ -159,15 +161,15 @@ const unreadLabel = computed(() => {
font-weight: bold;
}

// Outlined variant: no fill or gradient; icon color is unforced.
// Outlined variant: no fill or gradient.
&--outlined &__circle {
background: transparent;
background-image: none;
box-shadow: inset 0 0 0 2px var(--color-border-maxcontrast);
}

&--outlined &__icon {
filter: brightness(0);
filter: var(--background-invert-if-dark);
mask: none;
}
}
Expand Down
6 changes: 3 additions & 3 deletions core/src/components/AppMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ import { getCurrentUser } from '@nextcloud/auth'
import { subscribe, unsubscribe } from '@nextcloud/event-bus'
import { loadState } from '@nextcloud/initial-state'
import { isRTL, n, t } from '@nextcloud/l10n'
import { generateFilePath, generateUrl } from '@nextcloud/router'
import { generateUrl, imagePath } from '@nextcloud/router'
import { defineComponent, ref } from 'vue'
import NcButton from '@nextcloud/vue/components/NcButton'
import NcPopover from '@nextcloud/vue/components/NcPopover'
Expand Down Expand Up @@ -120,7 +120,7 @@ export default defineComponent({
active: false,
order: Number.MAX_SAFE_INTEGER,
href: generateUrl('/settings/apps'),
icon: generateFilePath('settings', 'img', 'settings_apps.svg'),
icon: imagePath('core', 'actions/add.svg'),
type: 'link',
name: t('core', 'More apps'),
unread: 0,
Expand All @@ -131,7 +131,7 @@ export default defineComponent({
active: false,
order: Number.MAX_SAFE_INTEGER,
href: 'https://apps.nextcloud.com/',
icon: generateFilePath('settings', 'img', 'apps.svg'),
icon: imagePath('core', 'actions/add.svg'),
type: 'link',
name: t('core', 'App store'),
unread: 0,
Expand Down
2 changes: 1 addition & 1 deletion core/src/tests/components/AppMenu.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ vi.mock('@nextcloud/event-bus', () => eventBus)
// Stub @nextcloud/router so we don't need a webroot for the moreApps URL.
vi.mock('@nextcloud/router', () => ({
generateUrl: (path: string) => path,
generateFilePath: (app: string, type: string, file: string) => `/apps/${app}/${type}/${file}`,
imagePath: (app: string, file: string) => `/${app}/img/${file}`,
}))

// Build a minimal nav entry that satisfies INavigationEntry.
Expand Down
4 changes: 2 additions & 2 deletions dist/core-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-main.js.map

Large diffs are not rendered by default.

Loading