Add Services and Privacy settings page to mobile
This commit is contained in:
parent
93281d283f
commit
264f41a09d
9 changed files with 343 additions and 211 deletions
|
|
@ -9,6 +9,7 @@
|
|||
@import "header";
|
||||
@import "mobile/tags";
|
||||
@import "mobile/conversations";
|
||||
@import "mobile/settings";
|
||||
|
||||
a {
|
||||
color: #2489ce;
|
||||
|
|
@ -137,6 +138,7 @@ h3 { margin-top: 0; }
|
|||
}
|
||||
}
|
||||
|
||||
.settings_container,
|
||||
.stream_element,
|
||||
#login_form {
|
||||
border-radius: 5px;
|
||||
|
|
@ -149,15 +151,37 @@ h3 { margin-top: 0; }
|
|||
border-bottom-color: #aaa;
|
||||
}
|
||||
|
||||
.stream_element div.img img.avatar {
|
||||
.stream_element {
|
||||
padding: 0px;
|
||||
|
||||
div.img img.avatar {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.stream_element .bd {
|
||||
.bd {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.stream_element .media { padding: 0; }
|
||||
.media {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.photo_attachments {
|
||||
border-radius: 3px 3px 0 0;
|
||||
|
||||
border: {
|
||||
bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
img.big-stream-photo {
|
||||
border-radius: 3px 3px 0 0;
|
||||
width: 100%;
|
||||
}
|
||||
a {
|
||||
padding: 0; }
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.photo_attachments {
|
||||
position: relative;
|
||||
|
|
@ -430,22 +454,7 @@ h3 { margin-top: 0; }
|
|||
}
|
||||
|
||||
.floater {
|
||||
float: right; }
|
||||
|
||||
.stream_element .photo_attachments {
|
||||
border-radius: 3px 3px 0 0;
|
||||
|
||||
border: {
|
||||
bottom: 1px solid #ccc;
|
||||
}
|
||||
|
||||
img.big-stream-photo {
|
||||
border-radius: 3px 3px 0 0;
|
||||
width: 100%;
|
||||
}
|
||||
a {
|
||||
padding: 0; }
|
||||
margin-top: 0;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.photo_area {
|
||||
|
|
@ -602,7 +611,6 @@ select {
|
|||
overflow: hidden;
|
||||
}
|
||||
|
||||
.stream_element { padding: 0; }
|
||||
|
||||
.notifications {
|
||||
list-style: none;
|
||||
|
|
@ -882,20 +890,6 @@ form p.checkbox_select {
|
|||
}
|
||||
}
|
||||
|
||||
#settings_nav {
|
||||
font-size: 1em;
|
||||
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
li {
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
|
||||
form#update_profile_form {
|
||||
select {
|
||||
padding: 3px;
|
||||
|
|
|
|||
31
app/assets/stylesheets/mobile/settings.scss
Normal file
31
app/assets/stylesheets/mobile/settings.scss
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#settings_nav {
|
||||
border-bottom: 1px solid $border-grey;
|
||||
margin-bottom: 1rem;
|
||||
padding-bottom: 1rem;
|
||||
|
||||
ul {
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
li {
|
||||
display: inline;
|
||||
font-size: 1.7rem;
|
||||
padding: 0px 0.3rem;
|
||||
|
||||
&:first-child { padding-left: 0px; }
|
||||
&:last-child { padding-right: 0px; }
|
||||
}
|
||||
}
|
||||
|
||||
.services_page {
|
||||
h3 {
|
||||
margin: 1rem 0px;
|
||||
}
|
||||
|
||||
.services_explanation {
|
||||
border-top: 1px solid $border-grey;
|
||||
margin-top: 1rem;
|
||||
padding: 1rem;
|
||||
}
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
.settings_container
|
||||
= render "shared/settings_nav"
|
||||
|
||||
.col-lg-8.col-lg-offset-2
|
||||
|
|
|
|||
15
app/views/services/index.mobile.haml
Normal file
15
app/views/services/index.mobile.haml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
.settings_container.services_page
|
||||
- content_for :page_title do
|
||||
= t('.edit_services')
|
||||
|
||||
= render 'shared/settings_nav'
|
||||
|
||||
.col-md-12
|
||||
= render 'add_remove_services'
|
||||
|
||||
.col-md-12.services_explanation
|
||||
= t('.services_explanation')
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
%h2.container-fluid.col-md-offset-2= t('settings')
|
||||
#span-24
|
||||
%h3
|
||||
#settings_nav
|
||||
#settings_nav.container-fluid
|
||||
%h2= t('settings')
|
||||
%nav
|
||||
%ul
|
||||
%li= link_to_unless_current t('profile'), edit_profile_path
|
||||
|
|
||||
%li= link_to_unless_current t('account'), edit_user_path
|
||||
%li= link_to_unless_current t('privacy'), privacy_settings_path
|
||||
%li= link_to_unless_current t('_services'), services_path
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
- content_for :page_title do
|
||||
= t('.edit_account')
|
||||
|
||||
.container-fluid
|
||||
= render 'shared/settings_nav'
|
||||
|
||||
.container-fluid
|
||||
|
|
@ -191,6 +190,56 @@
|
|||
.col-lg-5
|
||||
%h3.text-right
|
||||
= t('.close_account_text')
|
||||
.btn.btn-danger.pull-right{ id: "close_account", data: {toggle: "modal", target: "#closeAccountModal"}}
|
||||
= t(".close_account_text")
|
||||
= render "close_account_modal"
|
||||
|
||||
- if mobile
|
||||
= form_for "user", url: user_path, html: { method: :delete } do |f|
|
||||
= f.error_messages
|
||||
.form-group
|
||||
.clearfix= f.label :close_account_password, t("users.edit.current_password"), for: :close_account_password,
|
||||
class: "pull-right", style: "padding-top: 9px;"
|
||||
.small-horizontal-spacer
|
||||
.clearfix= f.password_field :current_password, id: :close_account_password, class: "form-control"
|
||||
%p
|
||||
.clearfix= f.submit t('users.edit.close_account_text'), class: "btn btn-danger pull-right",
|
||||
id: "close_account_confirm", data: { confirm: t("are_you_sure_delete_account") }
|
||||
|
||||
- if not mobile
|
||||
=link_to t('.close_account_text'), '#close_account_pane', rel: 'facebox',
|
||||
class: "btn btn-danger pull-right", id: "close_account"
|
||||
|
||||
.hidden#close_account_pane{rel: 'facebox'}
|
||||
#inner_account_delete
|
||||
%h1
|
||||
= t('.close_account.dont_go')
|
||||
%p
|
||||
= t('.close_account.make_diaspora_better')
|
||||
.row
|
||||
.col-md-6
|
||||
= image_tag 'sadcat.jpg'
|
||||
.small-horizontal-spacer
|
||||
%small
|
||||
%b
|
||||
= t('.close_account.mr_wiggles')
|
||||
.col-md-6
|
||||
%ul
|
||||
%li
|
||||
= t('.close_account.what_we_delete')
|
||||
%li
|
||||
= t('.close_account.locked_out')
|
||||
%li
|
||||
= t('.close_account.lock_username')
|
||||
%p
|
||||
%b
|
||||
= t('.close_account.no_turning_back')
|
||||
|
||||
= form_for 'user', url: user_path, html: { method: :delete } do |f|
|
||||
= f.error_messages
|
||||
|
||||
%p
|
||||
= f.label :close_account_password, t('.current_password'), for: :close_account_password
|
||||
= f.password_field :current_password, id: :close_account_password
|
||||
%p
|
||||
.small-horizontal-spacer
|
||||
= f.submit t('.close_account_text'), class: "btn btn-danger", id: "close_account_confirm",
|
||||
data: { confirm: t('are_you_sure_delete_account') }
|
||||
.small-horizontal-spacer
|
||||
|
|
|
|||
2
app/views/users/edit.mobile.haml
Normal file
2
app/views/users/edit.mobile.haml
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
.settings_container
|
||||
= render "edit", mobile: true
|
||||
|
|
@ -39,4 +39,3 @@
|
|||
\-
|
||||
= link_to t('.stop_ignoring'), block_path(block),
|
||||
method: :delete
|
||||
%br
|
||||
|
|
|
|||
41
app/views/users/privacy_settings.mobile.haml
Normal file
41
app/views/users/privacy_settings.mobile.haml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
.settings_container
|
||||
- content_for :page_title do
|
||||
= t('.title')
|
||||
|
||||
= render 'shared/settings_nav'
|
||||
|
||||
.container-fluid
|
||||
.col-lg-8.col-lg-offset-2
|
||||
%h3
|
||||
= t('.title')
|
||||
|
||||
= form_for current_user, url: user_path, html: { method: :put } do |f|
|
||||
= f.error_messages
|
||||
|
||||
= f.fields_for :stream_preferences do |type|
|
||||
#stream_prefs
|
||||
= f.label :strip_exif, class: "checkbox" do
|
||||
= f.check_box :strip_exif
|
||||
= t('.strip_exif')
|
||||
|
||||
.small-horizontal-spacer
|
||||
.clearfix
|
||||
= f.submit t('users.edit.change'), class: 'btn btn-primary pull-right'
|
||||
|
||||
%hr
|
||||
.small-horizontal-spacer
|
||||
%h3
|
||||
= t('.ignored_users')
|
||||
|
||||
- if @blocks.length.zero?
|
||||
= t('.no_user_ignored_message')
|
||||
|
||||
- @blocks.each do |block|
|
||||
= block.person_name
|
||||
\-
|
||||
= link_to t('.stop_ignoring'), block_path(block),
|
||||
method: :delete
|
||||
Loading…
Reference in a new issue