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

fix(AdminSettings): server buttons visual interactivity #12814

Merged
merged 3 commits into from
Jul 29, 2024
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
2 changes: 1 addition & 1 deletion src/components/AdminSettings/RecordingServer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</NcCheckboxRadioSwitch>

<NcButton v-show="!loading"
type="tertiary-no-background"
type="tertiary"
:aria-label="t('spreed', 'Delete this server')"
@click="removeServer">
<template #icon>
Expand Down
2 changes: 1 addition & 1 deletion src/components/AdminSettings/SignalingServer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</NcCheckboxRadioSwitch>

<NcButton v-show="!loading"
type="tertiary-no-background"
type="tertiary"
:aria-label="t('spreed', 'Delete this server')"
@click="removeServer">
<template #icon>
Expand Down
3 changes: 2 additions & 1 deletion src/components/AdminSettings/StunServer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
fill-color="#E9322D" />

<NcButton v-show="!loading"
type="tertiary-no-background"
type="tertiary"
:aria-label="t('spreed', 'Delete this server')"
@click="removeServer">
<template #icon>
Expand Down Expand Up @@ -111,6 +111,7 @@ export default {
display: flex;
align-items: center;
margin-bottom: calc(var(--default-grid-baseline) * 2);
gap: var(--default-grid-baseline);

&__wrapper {
display: flex;
Expand Down
16 changes: 12 additions & 4 deletions src/components/AdminSettings/TurnServer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@
@input="updateProtocols" />

<NcButton v-show="!loading"
type="tertiary-no-background"
type="tertiary"
:aria-label="testResult"
:disabled="!testAvailable"
@click="testServer">
<template #icon>
<span v-if="testing" class="icon icon-loading-small" />
Expand All @@ -64,7 +65,7 @@
</template>
</NcButton>
<NcButton v-show="!loading"
Antreesy marked this conversation as resolved.
Show resolved Hide resolved
type="tertiary-no-background"
type="tertiary"
:aria-label="t('spreed', 'Delete this server')"
@click="removeServer">
<template #icon>
Expand Down Expand Up @@ -196,6 +197,11 @@ export default {
}
return t('spreed', 'Test this server')
},
testAvailable() {
const schemes = this.schemes.split(',')
const protocols = this.protocols.split(',')
return !!(schemes.length && this.server && this.secret && protocols.length)
},
},

mounted() {
Expand All @@ -212,16 +218,17 @@ export default {
methods: {
t,
testServer() {
this.testing = true
this.testingError = false
this.testingSuccess = false

const schemes = this.schemes.split(',')
const protocols = this.protocols.split(',')
if (!schemes.length || !this.server || !this.secret || !protocols.length) {
if (!this.testAvailable) {
return
}

this.testing = true

const urls = []
for (let i = 0; i < schemes.length; i++) {
for (let j = 0; j < protocols.length; j++) {
Expand Down Expand Up @@ -380,6 +387,7 @@ export default {
display: grid;
grid-template-columns: minmax(100px, 180px) 1fr 1fr minmax(100px, 180px) var(--default-clickable-area) var(--default-clickable-area);
grid-column-gap: 4px;
align-items: center;
margin-bottom: 4px;

& &__textfield {
Expand Down
Loading