-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add NcAppNavigationSettingsButton #5866
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<!-- | ||
- SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
- SPDX-License-Identifier: AGPL-3.0-or-later | ||
--> | ||
|
||
<docs> | ||
The component to be used as a settings button in the `<NcAppNavigation>` to open `<NcAppSettingsDialog>`. | ||
</docs> | ||
|
||
<template> | ||
<div class="app-navigation-settings-button"> | ||
<NcButton class="app-navigation-settings-button__button" | ||
type="tertiary" | ||
alignment="start" | ||
wide | ||
@click.stop="emit('click', $event)"> | ||
<template #icon> | ||
<IconCog :size="20" /> | ||
</template> | ||
<span class="app-navigation-settings-button__text"> | ||
{{ name }} | ||
</span> | ||
</NcButton> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import { t } from '../../l10n.js' | ||
import NcButton from '../NcButton/index.js' | ||
import IconCog from 'vue-material-design-icons/Cog.vue' | ||
|
||
defineProps({ | ||
/** | ||
* The name of the settings button. For example, "Files Settings" or "Talk Settings". | ||
*/ | ||
name: { | ||
type: String, | ||
required: false, | ||
default: t('Settings'), | ||
}, | ||
}) | ||
|
||
const emit = defineEmits(['click']) | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.app-navigation-settings-button { | ||
padding: var(--default-grid-baseline); | ||
|
||
&__text { | ||
// Make the settings button less presentative, like app navigation items | ||
font-weight: normal; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This feels every different to all other elements and is different to all current implementations, I would like to ask @nextcloud-libraries/designers first There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I actually agree, and that's exactly what we were discussing yesterday. But from yesterday's design review call:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To confirm – what @ShGKme listed is what I said the requirements are. The design in this PR fulfills all those requirements and looks most consistent of the possible solutions. |
||
} | ||
} | ||
</style> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
export { default } from './NcAppNavigationSettingsButton.vue' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NcAppSettingsButton
? You meanNcAppSettingsDialog
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes