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: phishing warning layout #10104

Merged
merged 1 commit into from
Sep 9, 2024
Merged
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
28 changes: 16 additions & 12 deletions src/components/PhishingWarning.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@
- SPDX-License-Identifier: AGPL-3.0-or-later
-->
<template>
<div class="warning">
<div class="warning__title">
<div class="phishing-warning">
<div class="phishing-warning__title">
<IconAlertOutline :size="16" :title="t('mail', 'Phishing email')" />
This email might be a phishing attempt
</div>
<ul v-for="(warning,index) in warnings" :key="index" class="warning__list">
<li>{{ warning.message }}</li>
<ul v-for="(warning,index) in warnings" :key="index" class="phishing-warning__list">
<li class="phishing-warning__list__item">
{{ warning.message }}
</li>
</ul>
<div v-if="linkWarning !== undefined" class="warning__links">
<div v-if="linkWarning !== undefined" class="phishing-warning__links">
<NcButton class="warning__links__button" type="tertiary" @click="showMore = !showMore">
{{ showMore? t('mail','Hide suspicious links') :t('mail','Show suspicious links') }}
</NcButton>
<div v-if="showMore">
<ul v-for="(link,index) in linkWarning.additionalData" :key="index" class="warning__list">
<ul v-for="(link,index) in linkWarning.additionalData" :key="index" class="phishing-warning__list">
<li><b>href: </b>{{ link.href }} : <b>{{ t('mail','link text') }}</b> {{ link.linkText }} </li>
</ul>
</div>
Expand Down Expand Up @@ -58,19 +60,21 @@ export default {

</script>
<style lang="scss" scoped>
.warning {
background-color:var(--ck-color-base-error);
border-radius: var(--border-radius-rounded);
width: 100%;
.phishing-warning {
background-color:rgba(var(--color-warning-rgb), 0.2);
border-radius: var(--border-radius);
text-align: left;
padding: 15px;
margin-bottom: 10px;
padding: 8px;
margin: calc(var(--default-grid-baseline) * 2);
&__title {
display: flex;
}
&__list {
list-style-position: inside;
list-style-type: disc;
&__item {
word-wrap: break-word;
}
}
&__links {
margin-top: 10px;
Expand Down
Loading