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

feature: changed styles for settings and added new call-end-sound block [WTEL-4668] #700

Merged
merged 7 commits into from
Jul 9, 2024
1 change: 1 addition & 0 deletions src/app/locale/en/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export default {
webPhone: 'WebPhone',
useWebPhone: 'Use WebPhone',
useStun: 'Use STUN',
callEnd: 'Call end tune infroming',
},

validation: {
Expand Down
1 change: 1 addition & 0 deletions src/app/locale/ru/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export default {
webPhone: 'Web-телефон',
useWebPhone: 'Использовать Web-телефон',
useStun: 'Использовать STUN',
callEnd: 'Звуковое оповещение про завершение звонка',
},

validation: {
Expand Down
1 change: 1 addition & 0 deletions src/app/locale/ua/ua.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export default {
webPhone: 'Web-телефон',
useWebPhone: 'Використовувати Web-телефон',
useStun: 'Використовувати STUN',
callEnd: 'Звукове сповіщення про завершення дзвінка',
},

validation: {
Expand Down
45 changes: 41 additions & 4 deletions src/modules/settings/components/the-settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,22 @@
</div>
</form>
</section>
<section class="settings-section__setting">
<header class="content-header">
<h3 class="content-title">
{{ $t('settings.callEnd') }}
</h3>
</header>
<form>
<div class="settings-section__wrapper">
<p>{{ $t('objects.status') }}</p>
<wt-switcher
:value="callEndSound"
@change="changeCallEndSoundState"
/>
</div>
</form>
</section>
</section>
</template>
</wt-page-wrapper>
Expand All @@ -107,6 +123,7 @@ export default {
isPasswordPatching: false,
webrtc: true,
stun: false,
callEndSound: !!localStorage.getItem('callEndSound'),
language: {
name: 'English',
id: 'en',
Expand Down Expand Up @@ -209,6 +226,13 @@ export default {
}
},

changeCallEndSoundState(value) {
value
? localStorage.setItem('callEndSound', 'true')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

settings/callEndSound

: localStorage.removeItem('callEndSound');
this.callEndSound = value;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а чому тут і присвоєння, і зверху в-модел?)

},

changeLanguage(value) {
localStorage.setItem('lang', value.id);
this.language = value;
Expand All @@ -226,11 +250,24 @@ export default {

<style lang="scss" scoped>
.settings-section {
display: flex;
flex: 0 1 50%;
display: block;
column-count: 2;
column-gap: var(--spacing-sm);
width: 100%;

flex-wrap: wrap;
flex-direction: column;
min-width: 200px;
gap: var(--spacing-sm);

&__setting {
display: flex;
flex-direction: column;
margin-bottom: var(--spacing-sm);
padding: 0 var(--spacing-sm) var(--spacing-sm);
border-radius: var(--border-radius);
box-shadow: var(--elevation-5);
break-inside: avoid-column;
}

.wt-button {
display: block;
Expand All @@ -243,7 +280,7 @@ export default {
}

&__switcher {
margin-bottom: var(--spacing-xs);
margin-bottom: var(--spacing-sm);
}
}
</style>
Loading