From 125ef17afa001abe934a3d163a010372d5082cf5 Mon Sep 17 00:00:00 2001 From: shpuld Date: Sat, 2 Mar 2019 14:54:10 +0200 Subject: [PATCH] Add material style new status button, add animation to modal backgrounds, remove obsolete new status option from burg --- src/App.js | 4 +- src/App.scss | 27 ++++++- src/App.vue | 1 + src/boot/routes.js | 2 - src/components/media_modal/media_modal.vue | 15 +--- .../new_status_button/new_status_button.js | 62 +++++++++++++++ .../new_status_button/new_status_button.vue | 78 +++++++++++++++++++ src/components/side_drawer/side_drawer.vue | 15 ++-- 8 files changed, 177 insertions(+), 27 deletions(-) create mode 100644 src/components/new_status_button/new_status_button.js create mode 100644 src/components/new_status_button/new_status_button.vue diff --git a/src/App.js b/src/App.js index 214e0f48..0f3d0f2e 100644 --- a/src/App.js +++ b/src/App.js @@ -8,6 +8,7 @@ import WhoToFollowPanel from './components/who_to_follow_panel/who_to_follow_pan import ChatPanel from './components/chat_panel/chat_panel.vue' import MediaModal from './components/media_modal/media_modal.vue' import SideDrawer from './components/side_drawer/side_drawer.vue' +import NewStatusButton from './components/new_status_button/new_status_button.vue' import { unseenNotificationsFromStore } from './services/notification_utils/notification_utils' export default { @@ -22,7 +23,8 @@ export default { WhoToFollowPanel, ChatPanel, MediaModal, - SideDrawer + SideDrawer, + NewStatusButton }, data: () => ({ mobileActivePanel: 'timeline', diff --git a/src/App.scss b/src/App.scss index 7c6970c1..f66167b7 100644 --- a/src/App.scss +++ b/src/App.scss @@ -661,6 +661,31 @@ nav { border-radius: var(--inputRadius, $fallback--inputRadius); } +@keyframes modal-background-fadein { + from { + background-color: rgba(0, 0, 0, 0); + } + to { + background-color: rgba(0, 0, 0, 0.5); + } +} + +.modal-view { + z-index: 1000; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + display: flex; + justify-content: center; + align-items: center; + overflow: auto; + animation-duration: 0.2s; + background-color: rgba(0, 0, 0, 0.5); + animation-name: modal-background-fadein; +} + @keyframes shakeError { 0% { transform: translateX(0); @@ -723,7 +748,7 @@ nav { .login-hint { text-align: center; - + @media all and (min-width: 801px) { display: none; } diff --git a/src/App.vue b/src/App.vue index acbbeb75..8955ed08 100644 --- a/src/App.vue +++ b/src/App.vue @@ -50,6 +50,7 @@ + diff --git a/src/boot/routes.js b/src/boot/routes.js index cfbcb1fe..7e54a98b 100644 --- a/src/boot/routes.js +++ b/src/boot/routes.js @@ -13,7 +13,6 @@ import FollowRequests from 'components/follow_requests/follow_requests.vue' import OAuthCallback from 'components/oauth_callback/oauth_callback.vue' import UserSearch from 'components/user_search/user_search.vue' import Notifications from 'components/notifications/notifications.vue' -import UserPanel from 'components/user_panel/user_panel.vue' import LoginForm from 'components/login_form/login_form.vue' import ChatPanel from 'components/chat_panel/chat_panel.vue' import WhoToFollow from 'components/who_to_follow/who_to_follow.vue' @@ -43,7 +42,6 @@ export default (store) => { { name: 'friend-requests', path: '/friend-requests', component: FollowRequests }, { name: 'user-settings', path: '/user-settings', component: UserSettings }, { name: 'notifications', path: '/:username/notifications', component: Notifications }, - { name: 'new-status', path: '/:username/new-status', component: UserPanel }, { name: 'login', path: '/login', component: LoginForm }, { name: 'chat', path: '/chat', component: ChatPanel, props: () => ({ floating: false }) }, { name: 'oauth-callback', path: '/oauth-callback', component: OAuthCallback, props: (route) => ({ code: route.query.code }) }, diff --git a/src/components/media_modal/media_modal.vue b/src/components/media_modal/media_modal.vue index 427bf12b..7f666603 100644 --- a/src/components/media_modal/media_modal.vue +++ b/src/components/media_modal/media_modal.vue @@ -1,5 +1,5 @@