mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
replace even more ds-buttons with base-buttons (wip)
This commit is contained in:
parent
85f628848b
commit
ee11f4e366
@ -50,16 +50,15 @@
|
|||||||
<ds-space margin-bottom="large">
|
<ds-space margin-bottom="large">
|
||||||
<nuxt-link to="/password-reset/request">{{ $t('login.forgotPassword') }}</nuxt-link>
|
<nuxt-link to="/password-reset/request">{{ $t('login.forgotPassword') }}</nuxt-link>
|
||||||
</ds-space>
|
</ds-space>
|
||||||
<ds-button
|
<base-button
|
||||||
:loading="pending"
|
:loading="pending"
|
||||||
primary
|
primary
|
||||||
fullwidth
|
|
||||||
name="submit"
|
name="submit"
|
||||||
type="submit"
|
type="submit"
|
||||||
icon="sign-in"
|
icon="sign-in"
|
||||||
>
|
>
|
||||||
{{ $t('login.login') }}
|
{{ $t('login.login') }}
|
||||||
</ds-button>
|
</base-button>
|
||||||
<ds-space margin-top="large" margin-bottom="x-small">
|
<ds-space margin-top="large" margin-bottom="x-small">
|
||||||
{{ $t('login.no-account') }}
|
{{ $t('login.no-account') }}
|
||||||
<nuxt-link to="/registration/signup">{{ $t('login.register') }}</nuxt-link>
|
<nuxt-link to="/registration/signup">{{ $t('login.register') }}</nuxt-link>
|
||||||
@ -113,6 +112,11 @@ export default {
|
|||||||
}
|
}
|
||||||
.login-card {
|
.login-card {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
.base-button {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.login-locale-switch {
|
.login-locale-switch {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@ -10,11 +10,11 @@
|
|||||||
<p v-html="message" />
|
<p v-html="message" />
|
||||||
|
|
||||||
<template slot="footer">
|
<template slot="footer">
|
||||||
<ds-button class="cancel" :icon="modalData.buttons.cancel.icon" @click="cancel">
|
<base-button class="cancel" :icon="modalData.buttons.cancel.icon" @click="cancel">
|
||||||
{{ $t(modalData.buttons.cancel.textIdent) }}
|
{{ $t(modalData.buttons.cancel.textIdent) }}
|
||||||
</ds-button>
|
</base-button>
|
||||||
|
|
||||||
<ds-button
|
<base-button
|
||||||
:danger="modalData.buttons.confirm.danger"
|
:danger="modalData.buttons.confirm.danger"
|
||||||
class="confirm"
|
class="confirm"
|
||||||
:icon="modalData.buttons.confirm.icon"
|
:icon="modalData.buttons.confirm.icon"
|
||||||
@ -22,7 +22,7 @@
|
|||||||
@click="confirm"
|
@click="confirm"
|
||||||
>
|
>
|
||||||
{{ $t(modalData.buttons.confirm.textIdent) }}
|
{{ $t(modalData.buttons.confirm.textIdent) }}
|
||||||
</ds-button>
|
</base-button>
|
||||||
</template>
|
</template>
|
||||||
</ds-modal>
|
</ds-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -4,11 +4,10 @@
|
|||||||
<p v-html="message" />
|
<p v-html="message" />
|
||||||
|
|
||||||
<template slot="footer">
|
<template slot="footer">
|
||||||
<ds-button class="cancel" @click="cancel">{{ $t('disable.cancel') }}</ds-button>
|
<base-button class="cancel" @click="cancel">{{ $t('disable.cancel') }}</base-button>
|
||||||
|
<base-button danger class="confirm" icon="exclamation-circle" @click="confirm">
|
||||||
<ds-button danger class="confirm" icon="exclamation-circle" @click="confirm">
|
|
||||||
{{ $t('disable.submit') }}
|
{{ $t('disable.submit') }}
|
||||||
</ds-button>
|
</base-button>
|
||||||
</template>
|
</template>
|
||||||
</ds-modal>
|
</ds-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -29,11 +29,11 @@
|
|||||||
</small>
|
</small>
|
||||||
<ds-space />
|
<ds-space />
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<ds-button class="cancel" icon="close" @click="cancel">
|
<base-button class="cancel" icon="close" @click="cancel">
|
||||||
{{ $t('report.cancel') }}
|
{{ $t('report.cancel') }}
|
||||||
</ds-button>
|
</base-button>
|
||||||
|
|
||||||
<ds-button
|
<base-button
|
||||||
danger
|
danger
|
||||||
class="confirm"
|
class="confirm"
|
||||||
icon="exclamation-circle"
|
icon="exclamation-circle"
|
||||||
@ -42,7 +42,7 @@
|
|||||||
@click="confirm"
|
@click="confirm"
|
||||||
>
|
>
|
||||||
{{ $t('report.submit') }}
|
{{ $t('report.submit') }}
|
||||||
</ds-button>
|
</base-button>
|
||||||
</template>
|
</template>
|
||||||
</ds-modal>
|
</ds-modal>
|
||||||
</template>
|
</template>
|
||||||
@ -161,7 +161,7 @@ export default {
|
|||||||
.ds-modal {
|
.ds-modal {
|
||||||
max-width: 600px !important;
|
max-width: 600px !important;
|
||||||
}
|
}
|
||||||
.ds-radio-option:not(.ds-button) {
|
.ds-radio-option {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
.ds-radio-option-label {
|
.ds-radio-option-label {
|
||||||
|
|||||||
@ -33,7 +33,7 @@ describe('NotificationMenu.vue', () => {
|
|||||||
|
|
||||||
it('counter displays 0', () => {
|
it('counter displays 0', () => {
|
||||||
wrapper = Wrapper()
|
wrapper = Wrapper()
|
||||||
expect(wrapper.find('ds-button-stub').text()).toEqual('0')
|
expect(wrapper.find('base-button-stub').text()).toEqual('0')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('no dropdown is rendered', () => {
|
it('no dropdown is rendered', () => {
|
||||||
@ -67,12 +67,12 @@ describe('NotificationMenu.vue', () => {
|
|||||||
|
|
||||||
it('counter displays 0', () => {
|
it('counter displays 0', () => {
|
||||||
wrapper = Wrapper()
|
wrapper = Wrapper()
|
||||||
expect(wrapper.find('ds-button-stub').text()).toEqual('0')
|
expect(wrapper.find('base-button-stub').text()).toEqual('0')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('button is not primary', () => {
|
it('button is not primary', () => {
|
||||||
wrapper = Wrapper()
|
wrapper = Wrapper()
|
||||||
expect(wrapper.find('ds-button-stub').props('primary')).toBe(false)
|
expect(wrapper.find('base-button-stub').props('primary')).toBe(false)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -130,12 +130,12 @@ describe('NotificationMenu.vue', () => {
|
|||||||
|
|
||||||
it('displays the number of unread notifications', () => {
|
it('displays the number of unread notifications', () => {
|
||||||
wrapper = Wrapper()
|
wrapper = Wrapper()
|
||||||
expect(wrapper.find('ds-button-stub').text()).toEqual('2')
|
expect(wrapper.find('base-button-stub').text()).toEqual('2')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('renders primary button', () => {
|
it('renders primary button', () => {
|
||||||
wrapper = Wrapper()
|
wrapper = Wrapper()
|
||||||
expect(wrapper.find('ds-button-stub').props('primary')).toBe(true)
|
expect(wrapper.find('base-button-stub').props('primary')).toBe(true)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<ds-button v-if="!notifications.length" class="notifications-menu" disabled icon="bell">
|
<base-button v-if="!notifications.length" class="notifications-menu" disabled ghost circle>
|
||||||
{{ unreadNotificationsCount }}
|
<counter-icon icon="bell" :count="unreadNotificationsCount" danger />
|
||||||
</ds-button>
|
</base-button>
|
||||||
<dropdown v-else class="notifications-menu" offset="8" :placement="placement">
|
<dropdown v-else class="notifications-menu" offset="8" :placement="placement">
|
||||||
<template slot="default" slot-scope="{ toggleMenu }">
|
<template slot="default" slot-scope="{ toggleMenu }">
|
||||||
<ds-button :primary="!!unreadNotificationsCount" icon="bell" @click.prevent="toggleMenu">
|
<base-button @click="toggleMenu" ghost circle>
|
||||||
{{ unreadNotificationsCount }}
|
<counter-icon icon="bell" :count="unreadNotificationsCount" danger />
|
||||||
</ds-button>
|
</base-button>
|
||||||
</template>
|
</template>
|
||||||
<template slot="popover">
|
<template slot="popover">
|
||||||
<div class="notifications-menu-popover">
|
<div class="notifications-menu-popover">
|
||||||
@ -22,17 +22,20 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Dropdown from '~/components/Dropdown'
|
|
||||||
import { NOTIFICATIONS_POLL_INTERVAL } from '~/constants/notifications'
|
import { NOTIFICATIONS_POLL_INTERVAL } from '~/constants/notifications'
|
||||||
import { notificationQuery, markAsReadMutation } from '~/graphql/User'
|
import { notificationQuery, markAsReadMutation } from '~/graphql/User'
|
||||||
import NotificationList from '../NotificationList/NotificationList'
|
|
||||||
import unionBy from 'lodash/unionBy'
|
import unionBy from 'lodash/unionBy'
|
||||||
|
|
||||||
|
import CounterIcon from '~/components/_new/generic/CounterIcon/CounterIcon'
|
||||||
|
import Dropdown from '~/components/Dropdown'
|
||||||
|
import NotificationList from '../NotificationList/NotificationList'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NotificationMenu',
|
name: 'NotificationMenu',
|
||||||
components: {
|
components: {
|
||||||
NotificationList,
|
CounterIcon,
|
||||||
Dropdown,
|
Dropdown,
|
||||||
|
NotificationList,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -90,6 +93,7 @@ export default {
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.notifications-menu {
|
.notifications-menu {
|
||||||
|
flex-shrink: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,9 +24,9 @@
|
|||||||
/>
|
/>
|
||||||
<password-strength :password="formData.password" />
|
<password-strength :password="formData.password" />
|
||||||
<ds-space margin-top="base">
|
<ds-space margin-top="base">
|
||||||
<ds-button :loading="loading" :disabled="errors" primary>
|
<base-button :loading="loading" :disabled="errors" primary type="submit">
|
||||||
{{ $t('settings.security.change-password.button') }}
|
{{ $t('settings.security.change-password.button') }}
|
||||||
</ds-button>
|
</base-button>
|
||||||
</ds-space>
|
</ds-space>
|
||||||
</template>
|
</template>
|
||||||
</ds-form>
|
</ds-form>
|
||||||
|
|||||||
@ -24,9 +24,9 @@
|
|||||||
/>
|
/>
|
||||||
<password-strength :password="formData.password" />
|
<password-strength :password="formData.password" />
|
||||||
<ds-space margin-top="base" margin-bottom="xxx-small">
|
<ds-space margin-top="base" margin-bottom="xxx-small">
|
||||||
<ds-button :loading="$apollo.loading" :disabled="errors" primary>
|
<base-button :loading="$apollo.loading" :disabled="errors" primary type="submit">
|
||||||
{{ $t('settings.security.change-password.button') }}
|
{{ $t('settings.security.change-password.button') }}
|
||||||
</ds-button>
|
</base-button>
|
||||||
</ds-space>
|
</ds-space>
|
||||||
</template>
|
</template>
|
||||||
</ds-form>
|
</ds-form>
|
||||||
|
|||||||
@ -20,17 +20,16 @@
|
|||||||
<ds-space margin-botton="large">
|
<ds-space margin-botton="large">
|
||||||
<ds-text align="left">{{ $t('components.password-reset.request.form.description') }}</ds-text>
|
<ds-text align="left">{{ $t('components.password-reset.request.form.description') }}</ds-text>
|
||||||
</ds-space>
|
</ds-space>
|
||||||
<ds-button
|
<base-button
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:loading="$apollo.loading"
|
:loading="$apollo.loading"
|
||||||
primary
|
primary
|
||||||
fullwidth
|
|
||||||
name="submit"
|
name="submit"
|
||||||
type="submit"
|
type="submit"
|
||||||
icon="envelope"
|
icon="envelope"
|
||||||
>
|
>
|
||||||
{{ $t('components.password-reset.request.form.submit') }}
|
{{ $t('components.password-reset.request.form.submit') }}
|
||||||
</ds-button>
|
</base-button>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</ds-form>
|
</ds-form>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
|
|||||||
@ -102,7 +102,7 @@
|
|||||||
v-html="$t('components.registration.signup.form.no-political')"
|
v-html="$t('components.registration.signup.form.no-political')"
|
||||||
></label>
|
></label>
|
||||||
</ds-text>
|
</ds-text>
|
||||||
<ds-button
|
<base-button
|
||||||
style="float: right;"
|
style="float: right;"
|
||||||
icon="check"
|
icon="check"
|
||||||
type="submit"
|
type="submit"
|
||||||
@ -118,7 +118,7 @@
|
|||||||
primary
|
primary
|
||||||
>
|
>
|
||||||
{{ $t('actions.save') }}
|
{{ $t('actions.save') }}
|
||||||
</ds-button>
|
</base-button>
|
||||||
</template>
|
</template>
|
||||||
</ds-form>
|
</ds-form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -30,17 +30,16 @@
|
|||||||
name="email"
|
name="email"
|
||||||
icon="envelope"
|
icon="envelope"
|
||||||
/>
|
/>
|
||||||
<ds-button
|
<base-button
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:loading="$apollo.loading"
|
:loading="$apollo.loading"
|
||||||
primary
|
primary
|
||||||
fullwidth
|
|
||||||
name="submit"
|
name="submit"
|
||||||
type="submit"
|
type="submit"
|
||||||
icon="envelope"
|
icon="envelope"
|
||||||
>
|
>
|
||||||
{{ $t('components.registration.signup.form.submit') }}
|
{{ $t('components.registration.signup.form.submit') }}
|
||||||
</ds-button>
|
</base-button>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</ds-form>
|
</ds-form>
|
||||||
</ds-space>
|
</ds-space>
|
||||||
|
|||||||
@ -4,11 +4,10 @@
|
|||||||
<p v-html="message" />
|
<p v-html="message" />
|
||||||
|
|
||||||
<template slot="footer">
|
<template slot="footer">
|
||||||
<ds-button class="cancel" @click="cancel">{{ $t('release.cancel') }}</ds-button>
|
<base-button class="cancel" @click="cancel">{{ $t('release.cancel') }}</base-button>
|
||||||
|
<base-button danger class="confirm" icon="exclamation-circle" @click="confirm">
|
||||||
<ds-button danger class="confirm" icon="exclamation-circle" @click="confirm">
|
|
||||||
{{ $t('release.submit') }}
|
{{ $t('release.submit') }}
|
||||||
</ds-button>
|
</base-button>
|
||||||
</template>
|
</template>
|
||||||
</ds-modal>
|
</ds-modal>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -1,12 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<ds-space margin="xx-small" class="text-align-center">
|
<ds-space margin="xx-small" class="text-align-center">
|
||||||
<ds-button
|
<base-button
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:ghost="!shouted"
|
|
||||||
:primary="shouted"
|
:primary="shouted"
|
||||||
size="x-large"
|
|
||||||
icon="bullhorn"
|
icon="bullhorn"
|
||||||
|
circle
|
||||||
@click="toggle"
|
@click="toggle"
|
||||||
/>
|
/>
|
||||||
<ds-space margin-bottom="xx-small" />
|
<ds-space margin-bottom="xx-small" />
|
||||||
|
|||||||
@ -9,10 +9,17 @@
|
|||||||
@vdropzone-thumbnail="transformImage"
|
@vdropzone-thumbnail="transformImage"
|
||||||
>
|
>
|
||||||
<div class="crop-overlay" ref="cropperOverlay" v-show="showCropper">
|
<div class="crop-overlay" ref="cropperOverlay" v-show="showCropper">
|
||||||
<ds-button @click.stop.prevent="cropImage" class="crop-confirm" primary>
|
<base-button @click="cropImage" class="crop-confirm" primary>
|
||||||
{{ $t('contribution.teaserImage.cropperConfirm') }}
|
{{ $t('contribution.teaserImage.cropperConfirm') }}
|
||||||
</ds-button>
|
</base-button>
|
||||||
<ds-button @click="cancelCrop" class="crop-cancel" icon="close"></ds-button>
|
<base-button
|
||||||
|
class="crop-cancel"
|
||||||
|
icon="close"
|
||||||
|
size="small"
|
||||||
|
circle
|
||||||
|
danger
|
||||||
|
@click="cancelCrop"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
:class="{
|
:class="{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user