From acdb5e5c7a2dac1908a5daafd94c31bc116a1799 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sun, 1 Apr 2018 05:28:20 +0300 Subject: cleanup. added fallback mechanism for IE11 and unsupported browsers. --- src/components/attachment/attachment.vue | 5 +- src/components/delete_button/delete_button.vue | 4 +- src/components/favorite_button/favorite_button.vue | 30 ++-- src/components/login_form/login_form.vue | 3 +- src/components/nav_panel/nav_panel.vue | 20 ++- src/components/notifications/notifications.js | 5 - src/components/notifications/notifications.scss | 43 ++++-- src/components/notifications/notifications.vue | 4 +- .../post_status_form/post_status_form.vue | 24 ++- src/components/registration/registration.vue | 28 ++-- src/components/retweet_button/retweet_button.vue | 28 ++-- src/components/settings/settings.vue | 1 + src/components/status/status.vue | 169 +++++++++++---------- src/components/style_switcher/style_switcher.vue | 11 +- src/components/timeline/timeline.vue | 67 ++++---- src/components/user_card/user_card.vue | 14 +- .../user_card_content/user_card_content.js | 5 - .../user_card_content/user_card_content.vue | 22 +-- src/components/user_finder/user_finder.vue | 36 ++--- 19 files changed, 288 insertions(+), 231 deletions(-) (limited to 'src/components') diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index eeb6e6b8..e3b1e4d4 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -30,6 +30,8 @@ diff --git a/src/components/favorite_button/favorite_button.vue b/src/components/favorite_button/favorite_button.vue index a6e4c46b..f25c589a 100644 --- a/src/components/favorite_button/favorite_button.vue +++ b/src/components/favorite_button/favorite_button.vue @@ -11,18 +11,22 @@ - diff --git a/src/components/login_form/login_form.vue b/src/components/login_form/login_form.vue index 553858a3..82000d6b 100644 --- a/src/components/login_form/login_form.vue +++ b/src/components/login_form/login_form.vue @@ -31,6 +31,7 @@ diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js index 58d82a09..e55c6e24 100644 --- a/src/components/notifications/notifications.js +++ b/src/components/notifications/notifications.js @@ -24,11 +24,6 @@ const Notifications = { }, unseenCount () { return this.unseenNotifications.length - }, - hiderStyle () { - return { - background: `linear-gradient(to bottom, rgba(0, 0, 0, 0), ${this.$store.state.config.colors.bg} 80%)` - } } }, components: { diff --git a/src/components/notifications/notifications.scss b/src/components/notifications/notifications.scss index a739d52e..5af2454e 100644 --- a/src/components/notifications/notifications.scss +++ b/src/components/notifications/notifications.scss @@ -5,32 +5,39 @@ padding-bottom: 15em; .panel { - background: var(--bg) + background: $fallback--bg; + background: var(--bg, $fallback--bg) } .panel-body { - border-color: var(--border) + border-color: $fallback--border; + border-color: var(--border, $fallback--border) } .panel-heading { // force the text to stay centered, while keeping // the button in the right side of the panel heading position: relative; - background: var(--btn); - color: var(--faint); + background: $fallback--btn; + background: var(--btn, $fallback--btn); + color: $fallback--faint; + color: var(--faint, $fallback--faint); .read-button { position: absolute; right: 0.7em; height: 1.8em; line-height: 100%; - background-color: var(--btn); - color: var(--faint); + background-color: $fallback--btn; + background-color: var(--btn, $fallback--btn); + color: $fallback--faint; + color: var(--faint, $fallback--faint); } } .unseen-count { display: inline-block; - background-color: var(--cRed); + background-color: $fallback--cRed; + background-color: var(--cRed, $fallback--cRed); text-shadow: 0px 0px 3px rgba(0, 0, 0, 0.5); min-width: 1.3em; border-radius: 1.3em; @@ -52,6 +59,10 @@ border-bottom: 1px solid; border-bottom-color: inherit; + .notification-gradient { + background: linear-gradient(to bottom, rgba(0, 0, 0, 0), $fallback--bg 80%); + background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--bg, $fallback--bg) 80%) + } .text { min-width: 0px; @@ -61,23 +72,24 @@ overflow: hidden; .icon-retweet.lit { - color: $green_; - color: var(--cGreen); + color: $fallback--cGreen; + color: var(--cGreen, $fallback--cGreen); } .icon-user-plus.lit { - color: $blue_; - color: var(--cBlue); + color: $fallback--cBlue; + color: var(--cBlue, $fallback--cBlue); } .icon-reply.lit { - color: $blue_; - color: var(--cBlue); + color: $fallback--cBlue; + color: var(--cBlue, $fallback--cBlue); } .icon-star.lit { color: orange; - color: var(--cOrange); + color: $fallback--cOrange; + color: var(--cOrange, $fallback--cOrange); } .status-content { @@ -151,7 +163,8 @@ } .unseen { - border-left: 4px solid var(--cRed); + border-left: 4px solid $fallback--cRed; + border-left: 4px solid var(--cRed, $fallback--cRed); padding-left: 6px; } } diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue index 77e29426..17bae71e 100644 --- a/src/components/notifications/notifications.vue +++ b/src/components/notifications/notifications.vue @@ -20,7 +20,7 @@ -
+
@@ -29,7 +29,7 @@ -
+
diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index 3f268ff5..d57418fb 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -50,6 +50,7 @@ diff --git a/src/components/settings/settings.vue b/src/components/settings/settings.vue index b842c9e9..98f70f7b 100644 --- a/src/components/settings/settings.vue +++ b/src/components/settings/settings.vue @@ -56,6 +56,7 @@ diff --git a/src/components/user_card_content/user_card_content.js b/src/components/user_card_content/user_card_content.js index b7f156d2..2e448f1c 100644 --- a/src/components/user_card_content/user_card_content.js +++ b/src/components/user_card_content/user_card_content.js @@ -15,11 +15,6 @@ export default { } } }, - bodyStyle () { - return { - background: `linear-gradient(to bottom, rgba(0, 0, 0, 0), ${this.$store.state.config.colors.bg} 80%)` - } - }, isOtherUser () { return this.user.id !== this.$store.state.users.currentUser.id }, diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue index e3c9b5f9..ca3da632 100644 --- a/src/components/user_card_content/user_card_content.vue +++ b/src/components/user_card_content/user_card_content.vue @@ -70,7 +70,7 @@
-
+
{{ $t('user_card.statuses') }}
@@ -99,19 +99,21 @@ @import '../../_variables.scss'; .profile-panel-background { - background-size: cover; - border-radius: 10px; + background-size: cover; + border-radius: 10px; - .panel-heading { - padding: 0.6em 0em; - text-align: center; - } + .panel-heading { + padding: 0.6em 0em; + text-align: center; + } } .profile-panel-body { - top: -0em; - padding-top: 4em; - word-wrap: break-word; + top: -0em; + padding-top: 4em; + word-wrap: break-word; + background: linear-gradient(to bottom, rgba(0, 0, 0, 0), $fallback--bg 80%); + background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--bg, $fallback--bg) 80%) } .user-info { diff --git a/src/components/user_finder/user_finder.vue b/src/components/user_finder/user_finder.vue index 66b2fc87..e4453fe7 100644 --- a/src/components/user_finder/user_finder.vue +++ b/src/components/user_finder/user_finder.vue @@ -16,25 +16,25 @@ -- cgit v1.2.3-70-g09d2