Skip to content

Commit 90ad864

Browse files
authored
Merge pull request #11113 from krishnaGauss/11110/feature/add-private-button
Add private button when no follow action available on List Showcase Card
1 parent ba05bb3 commit 90ad864

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

openlibrary/i18n/messages.pot

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6300,6 +6300,10 @@ msgstr ""
63006300
msgid "You"
63016301
msgstr ""
63026302

6303+
#: lists/list_follow.html
6304+
msgid "Private"
6305+
msgstr ""
6306+
63036307
#: lists/list_follow.html
63046308
msgid "OpenLibrary Logo"
63056309
msgstr ""

openlibrary/templates/lists/list_follow.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@
5252
$ is_public = settings and settings.get('public_readlog', 'no') == "yes"
5353
$if is_public:
5454
$:render_follow_button(owner_username, is_subscribed)
55+
$else:
56+
<button class="list-follow-card__private-button" disabled>
57+
<span class="pvt-text">$_('Private')</span>
58+
</button>
5559
</div>
5660
</div>
5761
$else:

static/css/components/list-follow.less

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,25 @@
127127
margin: 0;
128128
}
129129
}
130+
&__private-button {
131+
background-color: @grey;
132+
border: none;
133+
cursor: not-allowed;
134+
pointer-events: none;
135+
display: flex;
136+
justify-content: center;
137+
align-items: center;
138+
padding-bottom: 1px;
139+
border-radius: 4px;
140+
.pvt-text {
141+
color: @white;
142+
font-size: 12px; // Override base size
143+
padding: 2px 4px; // Less padding
144+
box-shadow: none; // Remove default shadow if present
145+
margin: 0;
146+
letter-spacing: 0.2px;
147+
}
148+
}
130149
&__title {
131150
font-weight: bold;
132151
font-size: @font-size-label-large;

0 commit comments

Comments
 (0)