-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add firefox auth alert (#1124)
* feat: Add styles for firefox auth alert * tests: fix linting errors and rspec tests * tests: remove a tests as there is no discovery access in californica * fix: css for the auth alert for firefox * fix: scss linting errors * fix: reword some text for settings
- Loading branch information
Showing
10 changed files
with
180 additions
and
7 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 17 additions & 1 deletion
18
app/assets/stylesheets/theme_ursus/header/_ur-navbar-alert.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,19 @@ | ||
.alert-bar--ursus { | ||
background-color: $ucla-gold; | ||
background-color: $white; | ||
border: 1px solid $gray-10; | ||
border-top: 3px solid $ucla-gold; | ||
} | ||
|
||
.alert-title--ursus { | ||
font-size: $text-18; | ||
font-weight: $font-medium; | ||
line-height: 24px; | ||
letter-spacing: 0; | ||
|
||
} | ||
|
||
.alert-bar__wrapper--ursus { | ||
padding: 20px 10px; | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
<%# bookmark/folder functions -%> | ||
<%= render_document_heading(document, tag: :h1) %> | ||
<% if document[:visibility_ssi] && document[:visibility_ssi] == "authenticated" && flash[:notice].present? %> | ||
<%= render 'shared/alert-bar' %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<script type="text/javascript"> | ||
let hideButton = false | ||
function removeAlertFunction() { | ||
document.getElementById('alertBar').style.display = 'none'; | ||
document.cookie="message_shown=true"; | ||
} | ||
function showFunction() { | ||
const collection = document.getElementsByClassName("alert-bar__toggle-text"); | ||
const textMain = document.getElementsByClassName("alert-bar__text-main"); | ||
textMain[0].style.borderBottom = "none"; | ||
const buttonShow = document.getElementsByClassName("btn-ursus--show-toggle"); | ||
buttonShow[0].style.display = "none"; | ||
const buttonHide = document.getElementsByClassName("btn-ursus--hide-toggle"); | ||
buttonHide[0].style.display = "block"; | ||
collection[0].style.display = "block"; | ||
} | ||
function hideFunction() { | ||
const buttonShow = document.getElementsByClassName("btn-ursus--show-toggle"); | ||
buttonShow[0].style.display = "block"; | ||
const buttonHide = document.getElementsByClassName("btn-ursus--hide-toggle"); | ||
buttonHide[0].style.display = "none"; | ||
const collection = document.getElementsByClassName("alert-bar__toggle-text"); | ||
collection[0].style.display = "none"; | ||
const textMain = document.getElementsByClassName("alert-bar__text-main"); | ||
textMain[0].style.borderBottom = "1px solid #333"; | ||
} | ||
</script> | ||
<div | ||
class="alert-bar alert-bar--ursus" | ||
id="alertBar"> | ||
|
||
<div class="alert-bar__wrapper alert-bar__wrapper--ursus alert-bar__text-main"> | ||
<div class="alert-bar__row"> | ||
<span><%= image_tag('icon-alert-circle.svg') %></span> | ||
<h3 class="alert-title alert-title--ursus"> | ||
<%= flash[:notice] %> | ||
</h3> | ||
</div> | ||
<div class="alert-bar__row"> | ||
<button type="button" class="btn-base btn-base-lg btn-base-lg--alert--ursus btn-outline-ursus--light" onclick="removeAlertFunction()"> | ||
Dismiss | ||
</button> | ||
<button type="button" class="btn-base btn-base-lg btn-base-lg--alert--ursus btn-ursus--gold btn-ursus--show-toggle" onclick="showFunction()"> | ||
Show Instructions | ||
</button> | ||
<button type="button" class="btn-base btn-base-lg btn-base-lg--alert--ursus btn-ursus--gold btn-ursus--hide-toggle" onclick="hideFunction()"> | ||
Hide Instructions | ||
</button> | ||
</div> | ||
</div> | ||
|
||
<div class="alert-bar__wrapper alert-bar__wrapper--ursus alert-bar__toggle-text"> | ||
<div class="alert-bar__divider"></div> | ||
<ul class="alert-bar__list"> | ||
<li> | ||
Enable pop-ups (i.e., add the viewer site to the list in Preferences > Privacy & Security > Permissions > Block pop-up-windows > Exceptions...) | ||
<ul class="alert-bar__sub-list"> | ||
<li><em>Reason:</em> IIIF Authentication 1.0 specifies that viewers must open a new window as part of this particular authentication flow, which is not possible unless you allow pop-ups from our site </li> | ||
</ul> | ||
</li> | ||
<li> | ||
Preferences > Privacy & Security > Enhanced Tracking Protection > Manage Exceptions | ||
<ul class="alert-bar__sub-list"> | ||
<li> <em>Reason:</em> IIIF Authentication 1.0 specifies that viewers must set a IIIF access cookie during this particular authentication flow, which is not possible unless Firefox will allow us to use a cookie when you are using our site | ||
</li> | ||
</ul> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters