Skip to content
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

Streamline Settings #2372

Merged
merged 1 commit into from Jul 27, 2021
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
47 changes: 45 additions & 2 deletions css/SettingsSection.scss
Expand Up @@ -22,26 +22,62 @@
*/

// contacts settings section
.app-contacts #app-settings-content {
padding-left: 0px !important;
}

#app-settings-content {
.settings-section {
display: flex;
align-items: center;
margin-top: 5px;
}
}

.new-addressbook-entry {
display: flex;
align-items: center;
}

#new-addressbook-form {
display: flex;
width: calc(100% - 44px);
artonge marked this conversation as resolved.
Show resolved Hide resolved
input {
margin-top: 0;
margin-bottom: 0;
}
}

.settings-addressbook-list {
display: flex;
li {
width: calc(100% - 44px);
}
&__header {
padding-left: 44px;
color: var(--color-primary-element);
}
}

.settings-line__icon {
width: 44px;
height: 44px;
}

.social-sync__list-entry {
label::before {
margin-left: 14px !important;
margin-right: 14px !important;
}
em {
margin-left: 44px !important;
}
}

// Sort Contacts
.sort-contacts {
display: flex;
.multiselect {
width: 100%;
width: calc(100% - 44px);
margin: 0;
.multiselect__single {
padding-right: 24px !important;
Expand All @@ -50,6 +86,9 @@

@include icon-color('triangle-s', 'actions', $color-black, 1, true);
}
&__content-wrapper {
bottom: unset !important;
}
}
}

Expand All @@ -74,6 +113,10 @@
margin: 0;
margin-top: -1px;
}
&__button-main {
margin-left: 10px;
width: calc(100% - 10px) !important;
}
}

// Add address book
Expand Down
3 changes: 3 additions & 0 deletions src/components/AppNavigation/Settings/SettingsAddressbook.vue
Expand Up @@ -21,6 +21,8 @@
-
-->
<template>
<div class="settings-addressbook-list">
<div class="icon-group settings-line__icon"></div>
<li :class="{'addressbook--disabled': !addressbook.enabled}" class="addressbook">
<!-- addressbook name -->
<span class="addressbook__name" :title="addressbook.displayName">
Expand Down Expand Up @@ -90,6 +92,7 @@
<!-- sharing input -->
<ShareAddressBook v-if="shareOpen && !addressbook.readOnly" :addressbook="addressbook" />
</li>
</div>
</template>

<script>
Expand Down
Expand Up @@ -21,6 +21,8 @@
-->

<template>
<div class="new-addressbook-entry">
<div class="icon-add settings-line__icon"></div>
<form id="new-addressbook-form"
:disabled="loading"
:class="{'icon-loading-small': loading}"
Expand All @@ -31,7 +33,7 @@
ref="addressbook"
v-model="displayName"
:disabled="loading"
:placeholder="t('contacts', 'Address book name')"
:placeholder="t('contacts', 'Add new address book')"
:pattern="addressBookRegex"
class="new-addressbook-input"
type="text"
Expand All @@ -42,6 +44,7 @@
required>
<input class="icon-confirm" type="submit" value="">
</form>
</div>
</template>

<script>
Expand Down
Expand Up @@ -22,6 +22,7 @@

<template>
<div class="sort-contacts">
<div class="icon-category-organization settings-line__icon"></div>
<Multiselect
id="sort-by"
:value="orderKeyOption"
Expand Down
7 changes: 5 additions & 2 deletions src/components/AppNavigation/SettingsSection.vue
Expand Up @@ -23,7 +23,8 @@

<template>
<div>
<div v-if="allowSocialSync">
<SettingsSortContacts class="settings-section" />
<div v-if="allowSocialSync" class="social-sync__list-entry">
<input
id="socialSyncToggle"
class="checkbox"
Expand All @@ -33,11 +34,13 @@
<label for="socialSyncToggle">{{ t('contacts', 'Update avatars from social media') }}</label>
<em for="socialSyncToggle">{{ t('contacts', '(refreshed once per week)') }}</em>
</div>
<div class="settings-addressbook-list__header">
<span>{{ t('contacts', 'Address books') }}</span>
</div>
<ul id="addressbook-list">
<SettingsAddressbook v-for="addressbook in addressbooks" :key="addressbook.id" :addressbook="addressbook" />
</ul>
<SettingsNewAddressbook :addressbooks="addressbooks" />
<SettingsSortContacts class="settings-section" />
<SettingsImportContacts :addressbooks="addressbooks"
class="settings-section"
@clicked="onClickImport"
Expand Down