diff --git a/src/client/app/common/views/components/index.ts b/src/client/app/common/views/components/index.ts index 5dc466857..060af388b 100644 --- a/src/client/app/common/views/components/index.ts +++ b/src/client/app/common/views/components/index.ts @@ -29,8 +29,12 @@ import fileTypeIcon from './file-type-icon.vue'; import Switch from './switch.vue'; import Othello from './othello.vue'; import welcomeTimeline from './welcome-timeline.vue'; -import uiInput from './material/input.vue'; -import uiButton from './material/button.vue'; +import uiInput from './ui/input.vue'; +import uiButton from './ui/button.vue'; +import uiGroup from './ui/group.vue'; +import uiForm from './ui/form.vue'; +import uiTextarea from './ui/textarea.vue'; +import uiSwitch from './ui/switch.vue'; Vue.component('mk-analog-clock', analogClock); Vue.component('mk-menu', menu); @@ -63,3 +67,7 @@ Vue.component('mk-othello', Othello); Vue.component('mk-welcome-timeline', welcomeTimeline); Vue.component('ui-input', uiInput); Vue.component('ui-button', uiButton); +Vue.component('ui-group', uiGroup); +Vue.component('ui-form', uiForm); +Vue.component('ui-textarea', uiTextarea); +Vue.component('ui-switch', uiSwitch); diff --git a/src/client/app/common/views/components/signup.vue b/src/client/app/common/views/components/signup.vue index 3adb10f2c..d1621a484 100644 --- a/src/client/app/common/views/components/signup.vue +++ b/src/client/app/common/views/components/signup.vue @@ -1,50 +1,40 @@ @@ -112,7 +102,6 @@ export default Vue.extend({ const strength = getPasswordStrength(this.password); this.passwordStrength = strength > 0.7 ? 'high' : strength > 0.3 ? 'medium' : 'low'; - (this.$refs.passwordMetar as any).style.width = `${strength * 100}%`; }, onChangePasswordRetype() { if (this.retypedPassword == '') { @@ -156,100 +145,6 @@ export default Vue.extend({ .mk-signup min-width 302px - label - display block - margin 0 0 16px 0 - - > .caption - margin 0 0 4px 0 - color #828888 - font-size 0.95em - - > [data-fa] - margin-right 0.25em - color #96adac - - > .info - display block - margin 4px 0 - font-size 0.8em - - > [data-fa] - margin-right 0.3em - - &.username - .profile-page-url-preview - display block - margin 4px 8px 0 4px - font-size 0.8em - color #888 - - &:empty - display none - - &:not(:empty) + .info - margin-top 0 - - &.password - .meter - display block - margin-top 8px - width 100% - height 8px - - &[data-strength=''] - display none - - &[data-strength='low'] - > .value - background #d73612 - - &[data-strength='medium'] - > .value - background #d7ca12 - - &[data-strength='high'] - > .value - background #61bb22 - - > .value - display block - width 0% - height 100% - background transparent - border-radius 4px - transition all 0.1s ease - - [type=text], [type=password] - user-select text - display inline-block - cursor auto - padding 0 12px - margin 0 - width 100% - line-height 44px - font-size 1em - color #333 !important - background #fff !important - outline none - border solid 1px rgba(#000, 0.1) - border-radius 4px - box-shadow 0 0 0 114514px #fff inset - transition all .3s ease - - &:hover - border-color rgba(#000, 0.2) - transition all .1s ease - - &:focus - color $theme-color !important - border-color $theme-color - box-shadow 0 0 0 1024px #fff inset, 0 0 0 4px rgba($theme-color, 10%) - transition all 0s ease - - &:disabled - opacity 0.5 - .agree-tou padding 4px border-radius 4px @@ -267,19 +162,4 @@ export default Vue.extend({ display inline color #555 - button - margin 0 - padding 16px - width 100% - font-size 1em - color #fff - background $theme-color - border-radius 3px - - &:hover - background lighten($theme-color, 5%) - - &:active - background darken($theme-color, 5%) - diff --git a/src/client/app/common/views/components/material/button.vue b/src/client/app/common/views/components/ui/button.vue similarity index 83% rename from src/client/app/common/views/components/material/button.vue rename to src/client/app/common/views/components/ui/button.vue index 8dacedbac..57747fd46 100644 --- a/src/client/app/common/views/components/material/button.vue +++ b/src/client/app/common/views/components/ui/button.vue @@ -25,7 +25,7 @@ export default Vue.extend({ > button display block width 100% - margin 32px 0 16px 0 + margin 0 padding 0 color $theme-color-foreground font-weight bold @@ -37,4 +37,10 @@ export default Vue.extend({ outline none box-shadow none + &:hover + background lighten($theme-color, 5%) + + &:active + background darken($theme-color, 5%) + diff --git a/src/client/app/common/views/components/ui/form.vue b/src/client/app/common/views/components/ui/form.vue new file mode 100644 index 000000000..0893af1bc --- /dev/null +++ b/src/client/app/common/views/components/ui/form.vue @@ -0,0 +1,28 @@ + + + + + diff --git a/src/client/app/common/views/components/ui/group.vue b/src/client/app/common/views/components/ui/group.vue new file mode 100644 index 000000000..fb29458ce --- /dev/null +++ b/src/client/app/common/views/components/ui/group.vue @@ -0,0 +1,23 @@ + + + + + diff --git a/src/client/app/common/views/components/ui/input.vue b/src/client/app/common/views/components/ui/input.vue new file mode 100644 index 000000000..7461aac7f --- /dev/null +++ b/src/client/app/common/views/components/ui/input.vue @@ -0,0 +1,215 @@ + + + + + diff --git a/src/client/app/common/views/components/ui/switch.vue b/src/client/app/common/views/components/ui/switch.vue new file mode 100644 index 000000000..2cac6262f --- /dev/null +++ b/src/client/app/common/views/components/ui/switch.vue @@ -0,0 +1,199 @@ + + + + + diff --git a/src/client/app/common/views/components/material/input.vue b/src/client/app/common/views/components/ui/textarea.vue similarity index 64% rename from src/client/app/common/views/components/material/input.vue rename to src/client/app/common/views/components/ui/textarea.vue index 6564b3aa6..0a9f60f1b 100644 --- a/src/client/app/common/views/components/material/input.vue +++ b/src/client/app/common/views/components/ui/textarea.vue @@ -1,17 +1,17 @@