Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Give redirect warning close button more area to make it easier to touch on mobile #2443

Open
wants to merge 1 commit into
base: the-future
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/components/application/redirect-warning.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import Component from '@ember/component';
import { get, set } from '@ember/object';

export default Component.extend({
isShown: window.explainRedirect,
isShown: window.explainRedirect && !window.localStorage.getItem('hide-redirect-warning'),

actions: {
dismiss() {
window.localStorage.setItem('hide-redirect-warning', '1');
set(this, 'isShown', false);
}
}
Expand Down
13 changes: 11 additions & 2 deletions app/styles/layout/_navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -549,12 +549,21 @@

.inner {
width: 100%;
margin-right: 3rem;
}

.row {
position: relative;
}

.dismiss {
float: right;
position: absolute;
top: -10px;
right: 0;
color: white;
margin-right: 20px;
padding: 10px 1rem 2rem 2.5rem; /* make button big enough for touching it on mobile */
border: none;
background: none;
}

h5 {
Expand Down
6 changes: 3 additions & 3 deletions app/templates/components/application/redirect-warning.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<div class="inner">
<h5>We've Moved!</h5>
Don't be alarmed by the URL, we've moved from Kitsu.io to Kitsu.app
<span class="dismiss" {{action "dismiss"}}>
{{svg-jar "close"}}
</span>
</div>
<button class="dismiss" {{action "dismiss"}}>
{{svg-jar "close"}}
</button>
</div>
</div>
</aside>
Expand Down