settings: Update upgrade text and styling.

When we add Plus, the first sentence should change to "Available on Zulip
Standard and Plus".

I copied the styling of .tip out of expediency, but it's also possible that
long term we'll want only 1 tip-like box styling.

The hover styling is a bit random, but I tried to copy other hover styles I
found in settings.scss.

Note that this renames .upgrade_realm_plan_type_suggestion to .upgrade-tip.
This commit is contained in:
Rishi Gupta 2019-07-20 17:31:24 -07:00 committed by Tim Abbott
parent 06aa87296c
commit 7d8d0b2284
4 changed files with 23 additions and 17 deletions

View File

@ -105,15 +105,6 @@ label {
margin-bottom: 10px; margin-bottom: 10px;
} }
.upgrade_realm_plan_type_suggestion {
font-size: 16px;
}
.upgrade_realm_plan_type_suggestion::after {
font-family: FontAwesome;
content: "\f135";
}
.user-avatar-section { .user-avatar-section {
float: right; float: right;
} }
@ -312,6 +303,7 @@ td .button {
margin-right: 5px; margin-right: 5px;
} }
.settings-section .upgrade-tip,
.settings-section .tip { .settings-section .tip {
position: relative; position: relative;
display: block; display: block;
@ -325,9 +317,8 @@ td .button {
color: hsl(0, 0%, 40%); color: hsl(0, 0%, 40%);
} }
.settings-section .upgrade-tip::before,
.settings-section .tip::before { .settings-section .tip::before {
content: "\f0a2";
display: inline; display: inline;
margin-right: 8px; margin-right: 8px;
@ -335,6 +326,22 @@ td .button {
font-weight: 600; font-weight: 600;
} }
.settings-section .upgrade-tip::before {
content: "\f135";
}
.settings-section .upgrade-tip:hover {
color: hsl(0, 0%, 20%);
border: 1px solid hsl(49, 20%, 60%);
box-shadow: 0px 0px 4px hsla(199, 79%, 56%, .2);
text-decoration: none;
}
.settings-section .tip::before {
content: "\f0a2";
}
.dynamic-input { .dynamic-input {
display: inline-block; display: inline-block;
padding: 5px; padding: 5px;

View File

@ -58,11 +58,9 @@
</h3> </h3>
<div> <div>
{{#unless plan_includes_wide_organization_logo}} {{#unless plan_includes_wide_organization_logo}}
<p class="upgrade_realm_plan_type_suggestion"> <a href="/upgrade" class="upgrade-tip" target="_blank">
<a href="https://zulipchat.com/plans/" target="_blank">
{{upgrade_text_for_wide_organization_logo}} {{upgrade_text_for_wide_organization_logo}}
</a> </a>
</p>
{{/unless}} {{/unless}}
</div> </div>
</div> </div>

View File

@ -59,6 +59,7 @@ IGNORED_PHRASES = [
r"Zulip", r"Zulip",
r"Zulip Account Security", r"Zulip Account Security",
r"Zulip Security", r"Zulip Security",
r"Zulip Standard",
r"Zulip Team", r"Zulip Team",
r"iPhone", r"iPhone",
r"iOS", r"iOS",

View File

@ -270,6 +270,7 @@ class Realm(models.Model):
COMMUNITY = 2 COMMUNITY = 2
org_type = models.PositiveSmallIntegerField(default=CORPORATE) # type: int org_type = models.PositiveSmallIntegerField(default=CORPORATE) # type: int
UPGRADE_TEXT_STANDARD = _("Available on Zulip Standard. Upgrade to access.")
# plan_type controls various features around resource/feature # plan_type controls various features around resource/feature
# limitations for a Zulip organization on multi-tenant servers # limitations for a Zulip organization on multi-tenant servers
# like zulipchat.com. # like zulipchat.com.
@ -277,7 +278,6 @@ class Realm(models.Model):
LIMITED = 2 LIMITED = 2
STANDARD = 3 STANDARD = 3
STANDARD_FREE = 4 STANDARD_FREE = 4
UPGRADE_TEXT_STANDARD = _("Available on all paid plans. Upgrade ")
plan_type = models.PositiveSmallIntegerField(default=SELF_HOSTED) # type: int plan_type = models.PositiveSmallIntegerField(default=SELF_HOSTED) # type: int
# This value is also being used in static/js/settings_bots.bot_creation_policy_values. # This value is also being used in static/js/settings_bots.bot_creation_policy_values.