diff --git a/.gitignore b/.gitignore index afadc1d..097ef35 100644 --- a/.gitignore +++ b/.gitignore @@ -203,4 +203,3 @@ dmypy.json .pyre/ backend/config/ -update.log diff --git a/backend/multimail/static/multimail/css/simple-sidebar.css b/backend/multimail/static/multimail/css/simple-sidebar.css index c60444e..055888c 100644 --- a/backend/multimail/static/multimail/css/simple-sidebar.css +++ b/backend/multimail/static/multimail/css/simple-sidebar.css @@ -4,93 +4,47 @@ * Licensed under MIT (https://github.com/StartBootstrap/startbootstrap-simple-sidebar/blob/master/LICENSE) */ -#wrapper { + #wrapper { overflow-x: hidden; -} + } #sidebar-wrapper { - min-height: 100vh; - margin-left: -15rem; - -webkit-transition: margin .25s ease-out; - -moz-transition: margin .25s ease-out; - -o-transition: margin .25s ease-out; - transition: margin .25s ease-out; + min-height: 100vh; + margin-left: -15rem; + -webkit-transition: margin .25s ease-out; + -moz-transition: margin .25s ease-out; + -o-transition: margin .25s ease-out; + transition: margin .25s ease-out; } #sidebar-wrapper .sidebar-heading { - padding: 0.875rem 1.25rem; - font-size: 1.2rem; + padding: 0.875rem 1.25rem; + font-size: 1.2rem; } #sidebar-wrapper .list-group { - width: 15rem; + width: 15rem; } #page-content-wrapper { - min-width: 100vw; + min-width: 100vw; } #wrapper.toggled #sidebar-wrapper { + margin-left: 0; +} + +@media (min-width: 768px) { + #sidebar-wrapper { margin-left: 0; + } + + #page-content-wrapper { + min-width: 0; + width: 100%; + } + + #wrapper.toggled #sidebar-wrapper { + margin-left: -15rem; + } } - -.link-unstyled, .link-unstyled:link, .link-unstyled:hover { - color: inherit; - text-decoration: inherit; -} - -.optional-column-replacement { - display: none; -} - -@media (min-width: 1024px) , (max-width: 700px) and (min-width: 610px) { - #sidebar-wrapper { - margin-left: 0; - } - - #page-content-wrapper { - min-width: 0; - width: 100%; - } - - #wrapper.toggled #sidebar-wrapper { - margin-left: -15rem; - } -} - - -@media (max-width: 700px) { - - .card-columns { - column-count: 1; - } - - .optional-column { - display: none; - } - - .optional-column-replacement { - display: initial; - } -} - -@media (min-width: 700px) and (max-width: 1300px) { - - .card-columns { - column-count: 2; - } -} - -@media (min-width: 1300px) and (max-width: 1700px) { - - .card-columns { - column-count: 3; - } -} - -@media (min-width: 1700px) { - - .card-columns { - column-count: 4; - } -} \ No newline at end of file diff --git a/backend/multimail/templates/multimail/aliases.html b/backend/multimail/templates/multimail/aliases.html index c5f8cd6..40301cd 100644 --- a/backend/multimail/templates/multimail/aliases.html +++ b/backend/multimail/templates/multimail/aliases.html @@ -4,13 +4,11 @@
| Source - / Destination - | -Destination | +Source | +Destination | Actions |
|---|---|---|---|---|
| {{ alias.source_username }}@{{ alias.source_domain }} - {{ alias.destination_username }}@{{ alias.destination_domain }} | -{{ alias.destination_username }}@{{ alias.destination_domain }} | +{{ alias.destination_username }}@{{ alias.destination_domain }} | Delete | |
| - | - | Add Alias + | + | Add |
You haven't set up any aliases yet.
- Add Alias + Add {% endif %} {% endblock %} \ No newline at end of file diff --git a/backend/multimail/templates/multimail/base.html b/backend/multimail/templates/multimail/base.html index 772ba04..593a09b 100644 --- a/backend/multimail/templates/multimail/base.html +++ b/backend/multimail/templates/multimail/base.html @@ -26,13 +26,10 @@ @@ -44,9 +41,9 @@You haven't set up any domains yet.
- Add Domain + Add {% endif %} {% endblock %} \ No newline at end of file diff --git a/backend/multimail/templates/multimail/index.html b/backend/multimail/templates/multimail/index.html index 3a1f2c7..c0d7e63 100644 --- a/backend/multimail/templates/multimail/index.html +++ b/backend/multimail/templates/multimail/index.html @@ -1,92 +1,16 @@ {% extends 'multimail/base.html' %} {% block content %} -| Mailboxes | -- |
|---|---|
| {{ mailbox.username }}@{{ mailbox.domain }} - | -- |
| You dont't have any mailboxes for this domain yet. | -|
| Aliases | -- |
| {{ alias.source_username }}@{{ alias.source_domain }} - {{ alias.destination_username }}@{{ alias.destination_domain }} - | -- |
| You dont't have any aliases for this domain yet. | -|
You haven't set up any domains yet.
- Add Domain +No multimail are available.
{% endif %} -You haven't set up any mailboxes yet.
- Add Mailbox + Add {% endif %} {% endblock %} \ No newline at end of file diff --git a/backend/multimail/urls.py b/backend/multimail/urls.py index 6c09ee0..072d8db 100644 --- a/backend/multimail/urls.py +++ b/backend/multimail/urls.py @@ -6,7 +6,7 @@ from . import actions app_name = 'multimail' urlpatterns = [ - path('', views.IndexView.as_view(), name='index'), + path('', views.DomainListView.as_view(), name='index'), path('domains/', views.DomainListView.as_view(), name='domains'), path('domain/new/', forms.new_domain, name='new_domain'), diff --git a/backend/multimail/views.py b/backend/multimail/views.py index 36e235b..e9d359e 100644 --- a/backend/multimail/views.py +++ b/backend/multimail/views.py @@ -10,23 +10,6 @@ class UserLoginView(LoginView): template_name = 'multimail/login.html' -class IndexView(LoginRequiredMixin, generic.ListView): - login_url = 'login/' - template_name = 'multimail/index.html' - context_object_name = 'domain_list' - - def fill_related(self, domains): - for domain in domains: - domain.mailboxes = Mailbox.objects.filter(domain=domain) - domain.aliases = Alias.objects.filter(source_domain=domain) - yield domain - - def get_queryset(self): - """Return the last five published questions.""" - user = user_from_request(self.request) - return self.fill_related(Domain.objects.filter(admin__admin=user['name'], admin__source=user['source'])) - - class DomainListView(LoginRequiredMixin, generic.ListView): login_url = 'login/' template_name = 'multimail/domains.html' diff --git a/update.sh b/update.sh deleted file mode 100644 index cc04f4b..0000000 --- a/update.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -DIR=$(dirname $0) - -function prefix_date(){ - while read line - do - echo [$(date)] $line - done -} - -function run_update(){ - git pull - cd backend - python manage.py migrate -} - -run_update | prefix_date > $DIR/update.log