281 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
4a6a936de4
js: Don't show running status on buttons pulled to right
This prevents incorrect animation for running status on first wizard steps.

Tests:

- In the first boot wizard, network topology step, click next and notice that
the running status does not appear next to 'skip wizard' link.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-08-22 10:52:32 +05:30
Joseph Nuthalapati
4e9d22d376
apps: Remove Coquelicot
Bepasty is the replacement file-sharing app.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-08-21 15:42:14 -07:00
Sunil Mohan Adapa
289c033e1b
bepasty: Resize SVG to 512x512 for consistency with other icons
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-08-21 22:42:03 +05:30
James Valleroy
7edc2f4e13
bepasty: New app for file upload and sharing
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-08-21 21:50:38 +05:30
Sunil Mohan Adapa
0247a0eacd
static: Drop unused link to Lato ttf font
Tests:

- Interface shows Lato font as usual in apps and system pages.

- Build .deb package. Lintian does not show a warning related override for the
TTF font.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-07-12 09:20:18 -04:00
Sunil Mohan Adapa
3efff2fa42
js: Simplify auto-refresh page logic
- Implement ability to refresh page at the framework level so that every page
does not need to handle it.

- Refresh after number of seconds specified in context of the view.

Tests performed:

- Trigger the following functions and ensure that page reload after 3 seconds
during the running operation while it does refresh before and after the
operation.
  - Diagnostics tests from the module.
  - Gitweb repository cloning.
  - Monkeysphere publish key to server.
  - OpenVPN setup.
  - Tor configuration update.
  - Manual software update.
  - App installation.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-06-29 10:09:04 +03:00
Sunil Mohan Adapa
ff84d3f97e
templates: Disable button and show spinner on submit for all forms
Tests performed:

- Submit a form and notice that button has a spinner soon after click.

- Select a from like Gitweb repository creation form and submit it. After submit
go back to previous form using back button. Notice that button has been restored
to proper state.

- Without filling valid information the form, press submit. Notice that the
button does not change to a spinner.

- Check installing an app, snapshots management, network forms, wireguard forms,
etc.

- Test on Firefox and Chromium.

- Test with LibreJS that the script is accepted as valid free software license.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-06-29 10:08:23 +03:00
Sunil Mohan Adapa
ac103d7132
*: Remove use of Turbolinks library
See #1841 for discussion on why Turbolinks needs to be removed.

Closes: #1841.
Closes: #1804.

Tests performed:

- There are no more references to 'turbolinks' in source code other than .po(t)
  files and the manual.

- When loading a page, turbolinks.js is no longer loaded.

- The following links don't have data-turbolinks attribute and work well when
  clicked.a
  - Gitweb repository links
  - Download manual links (en, es)
  - Ikiwiki wiki links
  - Sharing app web share links
  - TT-RSS mobile app link
  - 'Launch web client' button
  - 'Launch' button in web section of clients table
  - Active and regular front page shortcut

- Roundcube does not have a link to /roundcube in description.

- turblinks not present in /static/jslicense.html . LibreJs accepts all scripts.

Reported-by: Veiko Aasa <veiko17@disroot.org>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Tested-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-06-03 10:29:19 +03:00
Sunil Mohan Adapa
b4e6c03bd7
coturn: New app to manage Coturn TURN/STUN server
- Shows URLs and shared secret that communication servers like matrix-synapse
should be configured to. Later we will implement auto-configuring those servers.

- Allow selecting domain for the sake of TLS/DTLS certificate installation.

- Simplify systemd service file options. Drop log file and pid file support as
they are not needed with systemd. Add security options.

- Set custom configuration file by overriding systemd service file options so
that we don't have a problem with conffile prompts.

- Implement functional tests (and automatic diagnostics).

- Custom icon selected from the Noun project as Coturn project does not have
one.

- Backup/restore configuration file and certificates.

- Document some questions regarding configuration options.

Tests performed:

- App is not listed in the app page if 'advanced' flag is disabled.

- App name, icon and short description shows up correctly in apps page.

- App name, icon, short description, description, manual link, enable/disable
button and diagnostics link show up currently in app page.

- Verify that configuration used by coturn server is the FreedomBox
configuration by checking the cert path in the log output.

- PID file is not created in /var/run/turnserver/. It goes into /dev/null
according to the log output.

- No log file is created other than what is collected by systemd from command
line.

- systemctl show coturn.service shows all the intended restrictions such as
NoNewPrivileges, Protect* options.

- Run functional tests.

- Ensure that backup of configuration file works by taking backup, changing the
secret and restoring. During backup and restore coturn should be stopped and
started as per logs.

- Build Debian package. No warnings about the copyright file.

- Enabling the app enables the service and runs it.

- Disabling the app disables the service and stop it.

- All diagnostics tests pass.

- Diagnostic tests show firewall port coturn-freedombox for internal and
external networks, service coturn, and each listening port for udp4, udp6, tcp4
and tcp6.

- Information in the firewall page shows up properly. Enabling the app opens
firewall ports, and disabling it closes them.

- When the app is installed, if a cert domain is available, it will be used.
When multiple domains are available, one of them is picked.

- Status shows 4 URLs with the currently selected domain and secret key.

- Changing domain to another domain succeeds and reflects in the status
information.

- When no domain is configured. Installing the app succeeds. No domain is shown
in the list of domains.

- When domain is changed, the certificates files in /etc/coturn/certs are
overwritten.

- Certificates have the ownership turnserver:turnserver. Public key is cert.pem
has 644 permissions. Private is pkey.pem has 600 permissions. /etc/coturn/certs
is owned by root:root.

- Let's encrypt certificates are setup immediately after install.

- Port forwarding information shows all ports except for relay ports.

- Trying to create a user with username 'turnserver' throws an error. This
happens even when coturn is not installed yet.

- After installing coturn, the configuration file /etc/coturn/freedombox.conf is
created with ownership root:turnserver and permissions 640. The directory
/etc/coturn is created with ownership root:root and permissions 755.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
[jvalleroy: Fix copied form_valid comment]
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-05-02 18:51:23 -04:00
Sunil Mohan Adapa
ff44a7de5a
static: Don't ship visual design file and unused images
- Move all the unused image files into doc/visual_design directory.

- Reduces the size of the shipped .deb binary significantly.

Closes: #1840.

Tests performed:

- Ensure that each of the files moves are not referenced anywhere in the source
code.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-24 16:10:02 -04:00
Sunil Mohan Adapa
e745031ab2
static: Reduce the size of the background noise image
Instead of tiling a 512px x 512px image, use 128px x 128px. The different is not
noticeable. Reduces the web page size for all pages by 120KiB. Also reduces the
shipped package size.

Tests performed:

- Visually compare the web page before and after the change. Notice no
difference.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-24 16:09:54 -04:00
Sunil Mohan Adapa
2526c98de6
static: Use SVG logo during first wizard welcome step
- This removes the need to ship a 67K file and scales better.

- Rename the file to have lowercase chars only for consistency.

Tests performed:

- Goto home page, see the logo at the bottom properly displayed.

- Goto the first wizard welcome page, notice that the logo is displayed. Also
the dimensions of the image are same as without the change.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-04-24 16:09:51 -04:00
Alice Kile
0b5b384651
app: Separate app enable/disable form from config form
- Introduce new API to mark an app that it can't be disabled.

- Mark jsxc, storage, config, upgrade and firewall apps as can't be disabled.

- Fixed functional tests

- Replaced AppForm with forms.Form in all modules' forms.py.

- Remove app.template.js.

- Remove unused styles.

- Remove app status checks in form_valid of Deluge, Diaspora, Matrix, Ejabberd,
MediaWiki, Storage, Transmission, Quassel

- Purge unused is_enabled context variables (Ikiwiki)

- ejabberd: Minor cleanup in template

- jsxc: Cleanup unneeded overrides

- tahoe: Cleanup unnecessary overrides

Tests performed:

- For all apps affected, test enable/disable button works and submitting
configuration form works: with changes updates message and without changes
'settings unchanged' message.
  - avahi
  - bind
  - cockpit
  - SKIP: coquelicot
  - datetime
  - deluge
  - SKIP: diaspora
  - ejabberd
  - gitweb
  - i2p
  - infinoted
  - ikiwiki
  - matrixsynapse
  - mediawiki
  - minetest
  - minidlna
  - mldonkey
  - mumble
  - pagekite
  - privoxy
  - quassel
  - radicale
  - roundcube
  - SKIP: samba
  - searx
  - SKIP: shaarli
  - shadowsocks
  - ssh
  - tahoe
  - transmission
  - FAIL: tt-rss (not installable)
  - wireguard
- Deluge test that configuration changes when app is disabled work
- Quassel test that setting the domain works when app is diabled
- Transmission test that setting the domain works when app is diabled
- Ikiwiki create form works properly
- Enable/disable button appears as expected when enabled and when disabled
- Enable/disable button works without Javascript
- Functional tests work for affected apps, Tor and OpenVPN
- AppForm is removed from developer documentation
  - Forms reference
  - Customizing tutorial
- Test all apps using directory select form
  - Transmission
  - Deluge
- Visit each template that overrides block configuration and ensure that it is
loaded properly and the display is as expected.
- All apps that use AppView that are not tested above should not have an
enable/disable button. That is JSXC, update, config, firewall, storage, users.

Signed-off-by: Alice Kile <buoyantair@protonmail.com>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-03-29 09:42:31 +03:00
Sunil Mohan Adapa
673bd367b0
css: cosmetic: Rename plinth.css to main.css
Tests performed:

- Visit an app page, install page and home page.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-03-06 13:09:02 +02:00
Sunil Mohan Adapa
b51ccff743
css: Merge responsive.css into main style file
- Eliminate issue with collapsed navbar's drop-down menu text color when the
width is exactly 768px or less than 320px.

- Remove redundant footer's position: relative rule.

Tests performed:

- Change the browser width to 768px, the navbar is not collapsed and drop down
menu text color is black on white background.

- Change the browser width to 767px, the navbar is collapsed and drop down menu
text color is white on blue background.

- Change the browser width to less than 320px, the navbar is collapsed and drop
down menu text color is white on blue background.

- Footer on the main page and remaining pages is unchanged at <320px, =767px and
>= 768px.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-03-06 13:08:53 +02:00
Sunil Mohan Adapa
b5e19726fe
app: Show short description as secondary title
Closes: #1721

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-23 08:31:33 -05:00
Sunil Mohan Adapa
55bee19963
app: cosmetic: Rename a CSS style class in app header
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-23 08:31:26 -05:00
Sunil Mohan Adapa
d99fd41fff
app: Simplify some header styling
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-23 08:31:23 -05:00
Sunil Mohan Adapa
62cf6a11e0
app: cosmetic: Minor refactoring of header styling
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-23 08:31:19 -05:00
Sunil Mohan Adapa
ddc90ff511
app: Drop border shadow for app icon in mobile view
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-23 08:31:10 -05:00
Sunil Mohan Adapa
58640f6dfb
app: Update style for toggle button
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-23 08:31:05 -05:00
Sunil Mohan Adapa
b14ccdadba
css: Add missing license identifier on some CSS files
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-02-19 14:41:13 +02:00
Sunil Mohan Adapa
a2f897e33d
*.js: Use SPDX license identifier
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2020-02-19 14:40:43 +02:00
Sunil Mohan Adapa
e398f58ca9
system: Implement new style for cards
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-02-14 23:02:55 +05:30
Sunil Mohan Adapa
ca624e718a
cards: Remove the transition delay on hover effect
The cards react very fast to mouse movements give the feeling of more
responsiveness in the UI instead of feeling sluggish.

Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-02-14 23:02:25 +05:30
Veiko Aasa
87983461e0
apps: remove css filters and glow from app icons
Closes #1722

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-02-13 14:42:53 -08:00
Sunil Mohan Adapa
8529022f63
notification: Show a drop down from main navbar for notifications
Closes: #1042.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-02-10 18:13:28 -05:00
Veiko Aasa
c18be280f6
help: Fix anchor hidden under navbar
The solution idea is from
https://github.com/twbs/bootstrap/issues/1768#issuecomment-46519033

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-02-09 15:14:57 -08:00
James Valleroy
21ba450484
repro: Remove app
The repro app has been disabled for a long time. Its package has been
removed from Debian, and there is no sign of it returning soon.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-01-18 20:00:43 -05:00
James Valleroy
eaa71f056a
wireguard: Add icon
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Fix size of SVG, add PNG image too]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:53:12 -05:00
James Valleroy
6aa83e7118
wireguard: Add skeleton for new app
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Use the form from base template to show enable/disable properly]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-01-18 13:52:35 -05:00
Sunil Mohan Adapa
f7109cceef
style: Fix responsiveness for app header
- 767 is the maximum for that size used by bootstrap. 768 and up are treated as
  different size.

- magin-bottom is redundant

- Don't do text-align: center for description text. It does not match with form
  elements and heading that follow. It also makes reading longer text harder.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-01-17 03:47:37 +05:30
Sunil Mohan Adapa
bf9d822943
style: Fix incorrect margins for containers in mobile view
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-01-17 03:47:18 +05:30
Veiko Aasa
851d1c7c28
app: Fix javascript doesn't run on first visit
Merge Request !1644 fixed the 'const redeclaration' error but introduced
another issue - javascript on the app configuration page doesn't run
on first visit.

Relates to #1715

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-20 16:38:31 -05:00
Nektarios Katakis
31c35e961c
update minidlna svg
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-08 14:50:12 -05:00
Nektarios Katakis
ef5f5a21de
feature: minidlna app
Closes #1679

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-08 14:49:21 -05:00
James Valleroy
dac6259928
themes: css whitespace minor fixes
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-07 13:33:49 -05:00
Alice Kile
9cd203411d
fix toggle buttle html layout and responsive design css
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-07 13:08:46 -05:00
Alice Kile
0dd4d1acf2
implement responsive layout for app page
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-07 13:08:44 -05:00
Alice Kile
45b6aa6a1c
fix formatting and template-related issues
- remove unwanted spaces and line breaks
- use just an image instead of using figure and figure caption to
  display the icon in installation page
- eliminate unnecessary code duplication due to if condition

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-07 13:08:39 -05:00
Alice Kile
f004939f50
show app icons in apps page
- restructure the template markup so as to show the icon towards the
  left of the app heading and description.
- if condition to provide backwards compatiblity to system apps using
  setup.html.
- deluge and matrixsynapse modules have a new property that will be used
  for accessing the icon file name. (to be replicated across all other
  modules *weew*)

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-07 13:08:25 -05:00
Veiko Aasa
06b4a447c6
app: fix javascript constant redeclaration error
Closes #1715

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-12-03 00:04:17 +05:30
Sunil Mohan Adapa
e008decb14
toolbar: Align extra actions drop down button to the right
- This appears better in cases where there are no other buttons in the toolbar.
  This is true for many apps.

- Also minimize the styling used on toolbar.

- Use margin instead of padding due participate in margin collapse algorithm.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-01 16:52:38 -05:00
Sunil Mohan Adapa
656d754aee
toolbar: Make diagnostics button looks like other drop down items
- Use the same background color as drop down items.

- Left align.

- Use same padding.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-01 16:52:36 -05:00
Alice Kile
6a4a941bb6
toolbar: Move diagnostics button into dropdown menu
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-01 16:40:31 -05:00
Alice Kile
52f6da2a41
templates: Add toolbar for apps in app.html
Changes to the app.html layout, mainly:

- A new panel is created to hold action buttons. Closes #1698.

- Launch button is now shown in the panel alongside "Client Apps".

- Run Diagnostics button is moved into this panel as well. Closes #1690.

- Disable 'Launch web client' button when app is disabled. Closes #1718.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-01 16:40:13 -05:00
Veiko Aasa
dbdd482e61
samba: fixes and improvements
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-01 11:30:35 -05:00
Alice Kile
a8166bae7e
Fix error with app toggle input
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2019-12-01 07:36:41 -05:00
Joseph Nuthalapati
62bcae4975
app: Avoid showing empty configuration block
Several applications whose configuration form only includes an "Enable
application" checkbox look empty with an "Update setup" button when JavaScript
is enabled. Fixed this.

Added license header for LibreJS compliance.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-19 00:02:16 +05:30
Alice Kile
fec995d7e0
app: Make the toggle-button responsive
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2019-11-19 00:02:16 +05:30