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
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@vuelidate/validators": "^2.0.0",
"@vueuse/core": "^10.3.0",
"@webitel/flow-ui-sdk": "^0.1.14",
"@webitel/ui-sdk": "^24.6.47",
"@webitel/ui-sdk": "^24.6.50",
"axios": "^1.6.8",
"clipboard-copy": "^4.0.1",
"cron-validator": "^1.3.1",
Expand Down
1 change: 1 addition & 0 deletions src/app/locale/en/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,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 @@ -65,6 +65,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 @@ -65,6 +65,7 @@ export default {
webPhone: 'Web-телефон',
useWebPhone: 'Використовувати Web-телефон',
useStun: 'Використовувати STUN',
callEnd: 'Звукове сповіщення про завершення дзвінка',
},

validation: {
Expand Down
49 changes: 45 additions & 4 deletions src/modules/settings/components/the-settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,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 @@ -108,6 +124,7 @@ export default {
isPasswordPatching: false,
webrtc: true,
stun: false,
callEndSound: !!localStorage.getItem('settings/callEndSound'),
language: {
name: 'English',
id: 'en',
Expand Down Expand Up @@ -218,6 +235,13 @@ export default {
}
},

changeCallEndSoundState(value) {
value
? localStorage.setItem('settings/callEndSound', 'true')
: localStorage.removeItem('settings/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 @@ -234,11 +258,28 @@ 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;
}

.content-title {
@extend %typo-heading-4;
}

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

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