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

[Accounts] Use KDS Buttons #3891

Merged
merged 2 commits into from
Apr 18, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
<slot></slot>
<p class="mt-4">
<slot name="back">
<ActionLink :to="{ name: 'Main' }" :text="$tr('backToLogin')" />
<KRouterLink
:to="{ name: 'Main' }"
:text="$tr('backToLogin')"
/>
</slot>
</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,13 @@
</div>
</div>

<VBtn color="primary" large :disabled="offline" type="submit" class="mt-5">
{{ $tr('finishButton') }}
</VBtn>
<KButton
primary
class="mt-5"
:disabled="offline"
:text="$tr('finishButton')"
type="submit"
/>
</VForm>

</VLayout>
Expand Down
32 changes: 16 additions & 16 deletions contentcuration/contentcuration/frontend/accounts/pages/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,20 @@
:text="$tr('forgotPasswordLink')"
/>
</p>
<VBtn
block
color="primary"
large
type="submit"
<KButton
primary
class="w-100"
:text="$tr('signInButton')"
:disabled="offline || busy"
>
{{ $tr('signInButton') }}
</VBtn>
<VBtn
block
flat
color="primary"
class="mt-2"
type="submit"
/>
<KRouterLink
primary
class="mt-2 w-100"
:text="$tr('createAccountButton')"
:to="{ name: 'Create' }"
>
{{ $tr('createAccountButton') }}
</VBtn>
appearance="flat-button"
/>
</VForm>
<VDivider />
<p class="mt-4 text-xs-center">
Expand Down Expand Up @@ -226,4 +222,8 @@
content: '•';
}

.w-100 {
width: 100%;
}

</style>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
>
<template #back>
bjester marked this conversation as resolved.
Show resolved Hide resolved
<VBtn color="primary" :to="{ name: 'Main' }" large>
{{ $tr('continueToSignIn') }}
{{ $tr('backToLogin') }}
</VBtn>
</template>
</MessageLayout>
Expand All @@ -24,7 +24,7 @@
},
$trs: {
accountDeletedTitle: 'Account successfully deleted',
continueToSignIn: 'Continue to sign-in page',
backToLogin: 'Continue to sign-in page',
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
>
<template #back>
<VBtn color="primary" :to="{ name: 'Main' }" large>
{{ $tr('continueToSignIn') }}
{{ $tr('backToLogin') }}
</VBtn>
</template>
</MessageLayout>
Expand All @@ -24,7 +24,7 @@
},
$trs: {
accountCreatedTitle: 'Account successfully created',
continueToSignIn: 'Continue to sign-in',
backToLogin: 'Continue to sign-in page',
},
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
:header="$tr('title')"
:text="$tr('text')"
>
<VBtn color="primary" large :to="{ name: 'RequestNewActivationLink' }">
{{ $tr('requestNewLink') }}
</VBtn>
<KRouterLink
primary
:text="$tr('requestNewLink')"
:to="{ name: 'RequestNewActivationLink' }"
appearance="raised-button"
/>
</MessageLayout>

</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
:header="$tr('activationExpiredTitle')"
:text="$tr('activationExpiredText')"
>
<VBtn color="primary" large :to="{ name: 'RequestNewActivationLink' }" class="mb-4">
{{ $tr('requestNewLink') }}
</VBtn>
<KRouterLink
primary
:text="$tr('requestNewLink')"
:to="{ name: 'RequestNewActivationLink' }"
appearance="raised-button"
/>
</MessageLayout>

</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@
>
<Banner :text="$tr('activationRequestFailed')" :value="error" error class="mb-4" />
<EmailField v-model="email" autofocus />
<VBtn color="primary" large type="submit" block>
{{ $tr('submitButton') }}
</VBtn>
<KButton
primary
class="w-100"
:text="$tr('submitButton')"
type="submit"
/>
</VForm>
</MessageLayout>

Expand Down Expand Up @@ -64,3 +67,11 @@
};

</script>

<style lang="less" scoped>

.w-100 {
width: 100%;
}

</style>
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
<VForm ref="form" lazy-validation @submit.prevent="submit">
<Banner :text="$tr('forgotPasswordFailed')" :value="error" error class="mb-4" />
<EmailField v-model="email" autofocus />
<VBtn block color="primary" large type="submit">
{{ $tr('submitButton') }}
</VBtn>
<KButton
primary
class="w-100"
Copy link
Member

Choose a reason for hiding this comment

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

Definitely nothing blocking and can also be a matter of personal style - if that'd be helpful in future work, when there is a one-line style, it may be simpler to use and read :style="{ width: '100%' }" rather than defining a new class which is quite commonly used syntax in LE's codebases.

:text="$tr('submitButton')"
type="submit"
/>
</VForm>
</MessageLayout>

Expand Down Expand Up @@ -65,3 +68,11 @@
};

</script>

<style lang="less" scoped>

.w-100 {
width: 100%;
}

</style>
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
:header="$tr('resetExpiredTitle')"
:text="$tr('resetExpiredText')"
>
<VBtn color="primary" large :to="{ name: 'ForgotPassword' }" class="mb-4">
{{ $tr('requestNewLink') }}
</VBtn>
<KRouterLink
primary
:text="$tr('requestNewLink')"
:to="{ name: 'ForgotPassword' }"
appearance="raised-button"
/>
</MessageLayout>

</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@
:label="$tr('passwordConfirmLabel')"
:additionalRules="passwordConfirmRules"
/>
<VBtn block color="primary" large type="submit">
{{ $tr('submitButton') }}
</VBtn>
<KButton
primary
class="w-100"
:text="$tr('submitButton')"
type="submit"
/>
</VForm>
</MessageLayout>

Expand Down Expand Up @@ -84,3 +87,11 @@
};

</script>

<style lang="less" scoped>

.w-100 {
width: 100%;
}

</style>