Commit Graph
100 Commits
Author SHA1 Message Date
dietrich dd113c3548 reduce timeout before rendering qr 2021-08-12 15:48:02 +02:00
dietrich 6dfef53243 delayed qr-code rendering 2021-08-12 15:48:02 +02:00
dietrich 81cb5ab304 fix warnings 2021-08-12 15:48:02 +02:00
dietrich f83a48ac3f all in 2021-08-12 15:48:02 +02:00
dietrich 5da1d3fb16 remove unnessessary RefCell 2021-08-12 15:48:02 +02:00
dietrich 93472c061e WIP: adding qrcodes 2021-08-12 15:48:02 +02:00
dietrich 91543e2d74 update sqlx_prepare 2021-08-12 15:48:02 +02:00
dietrich 5886272585 Add download qrcode to table 2021-08-12 15:48:02 +02:00
dietrich 6b0daecd31 Add wasm live rendering of the Qr-Code only svg 2021-08-12 15:48:02 +02:00
dietrich a5cfdeff54 make link codes unaware of upper and lower case 2021-08-12 15:48:02 +02:00
dietrich 50da81889e Formatting... 2021-08-12 15:48:02 +02:00
dietrich 26142084f6 Prepare loading state 2021-08-12 15:48:02 +02:00
dietrich 1aba33fb91 Login for the wasm interface 2021-08-12 15:48:02 +02:00
dietrich e5d8e6c62f restructuring move translations to toplevel 2021-08-12 15:48:02 +02:00
dietrich 5e03b4385f move doc directory to workspace 2021-08-12 15:48:02 +02:00
dietrich bfa0bcd0bb restructure and document list_users 2021-08-12 15:48:02 +02:00
dietrich aeac704e89 add offline feature to sqlx 2021-08-12 15:48:02 +02:00
dietrich b84c7ab62a Documentation updates 2021-08-12 15:48:02 +02:00
dietrich 5c6fd4b5ae document navigation 2021-08-12 15:48:02 +02:00
dietrich 78d147344f Add hint to readme 2021-08-12 15:48:02 +02:00
dietrich ec47e02f9c move README to toplevel 2021-08-12 15:48:02 +02:00
dietrich a2781003c6 update documentation on i18n 2021-08-12 15:48:02 +02:00
dietrich 9d42b010c1 fix delete message 2021-08-12 15:48:02 +02:00
dietrich 9005a446fe update documentation 2021-08-12 15:48:02 +02:00
dietrich b782d97920 Make secret more logsafe, implement add and edit for links 2021-08-12 15:48:02 +02:00
dietrich d503d49917 update user functionality and cleanup 2021-08-12 15:48:02 +02:00
dietrich 6837495eba initial create user 2021-08-12 15:48:02 +02:00
dietrich b9866a8c19 initial user edit dialog 2021-08-12 15:48:02 +02:00
dietrich 8ea7b6a08d Restructure view funtions 2021-08-12 15:48:02 +02:00
dietrich fc9b18141f Working user and link list, (big)restructure
This is now a workspace consisting of:
  * the pslink app (a wasm frontend for the admin interface)
  * the pslink binary
  * shared - modules for communication between the two above.
2021-08-12 15:48:02 +02:00
dietrich 1611cfb9a2 Merge pull request #8 from enaut/tracing
Add tracing (eg. jaeger) and tests
2021-04-18 17:20:29 +02:00
dietrich 680d28ed58 Merge branch 'master' into tracing 2021-04-18 16:40:55 +02:00
dietrich b33088057d Add basic github actions 2021-04-18 16:18:23 +02:00
dietrich 84625939de Add more testcases 2021-04-18 16:11:43 +02:00
dietrich 04170079d6 Add integration test for runserver 2021-04-18 11:38:07 +02:00
dietrich 7690d301f1 Properly handle absense of a prefered language 2021-04-18 11:37:02 +02:00
dietrich 322c867e94 Fix: real secret instead of censored in .env 2021-04-18 10:29:09 +02:00
dietrich ce315c429c Add integration tests, do not show secret in logs
The code is restructured so that the library contains the actix-web
code and the binary only does commandline parsing and running of
the lib.
2021-04-18 09:41:17 +02:00
dietrich 6fd36936a3 Enable jaeger + opentracing logging 2021-04-12 16:32:59 +02:00
dietrich ac172670be simplifying apply_migrations 2021-04-12 16:30:18 +02:00
dietrich a3b757abad initial port to tracing 2021-04-11 13:14:11 +02:00
dietrich ea75e1e3ee Show some errors to the user 2021-04-10 18:37:59 +02:00
dietrich 5950fa7370 Better logging and error handling 2021-04-10 12:30:05 +02:00
dietrich 76b1f53120 Use the anyhow crate for Errors in the cli 2021-04-02 17:41:27 +02:00
dietrich 583e9908bf move the error to thiserror 2021-04-01 15:40:19 +02:00
dietrich 34b957332e Sepparate library part and binary part
closes #5
2021-04-01 14:58:40 +02:00
dietrich 0ed010b78f fix errormessage 2021-04-01 10:02:12 +02:00
dietrich a6598ba5db clicks are deleted when connected links are
fixes #7
2021-04-01 10:00:16 +02:00
dietrich 2fba9080d6 Revert "format migration"
as migrations store a hash it is not possible to change the
migrationfiles afterwards.

This reverts commit fdcc89ec1f.
2021-04-01 10:00:16 +02:00
dietrich 053992e30c Merge pull request #6 from enaut/WIP--translations
Make the page translatable
2021-03-31 16:50:13 +02:00
dietrich fdcc89ec1f format migration 2021-03-31 16:40:25 +02:00
dietrich dd759923f0 Add a language selector for logged in users. 2021-03-30 21:45:46 +02:00
dietrich 0b9afb1fa3 translate login and not_found to browser language 2021-03-30 20:23:27 +02:00
dietrich c6c56a5ea2 translate view_link, view_profile 2021-03-30 18:05:03 +02:00
dietrich aac653f6cb translate signup and link submission 2021-03-30 17:47:18 +02:00
dietrich 3cb6784448 translate linklist index 2021-03-30 17:43:35 +02:00
dietrich cada51f768 translate index_users 2021-03-30 17:39:55 +02:00
dietrich 59ad7089df translate edit_profile 2021-03-30 17:33:04 +02:00
dietrich 20506d1bbe translate edit_link 2021-03-30 17:16:44 +02:00
dietrich 218840432f initial translatability 2021-03-30 13:18:13 +02:00
dietrich 7fd29d4903 add changes to release guide 2021-03-27 11:26:10 +01:00
dietrich 77f362368c bump version + add release guides 2021-03-27 11:23:02 +01:00
dietrich 453cccde8b Improve Readme 2021-03-27 11:09:41 +01:00
dietrich 81c636de56 Add offline compilablility (sqlx) 2021-03-27 10:14:14 +01:00
dietrich c646dcf263 move url to github as it has a more official touch 2021-03-27 07:37:59 +01:00
dietrich 5218efe551 password hashes should stop appearing in logs 2021-03-27 07:37:59 +01:00
dietrich c5c8f27ae6 Merge pull request #1 from enaut/move-to-sqlx
Move diesel to sqlx
2021-03-21 13:40:34 +01:00
dietrich a4d5982e3c make initial migrations work (no db file exists). 2021-03-21 13:02:55 +01:00
dietrich e8ff696006 working sqlx-port 2021-03-21 08:31:47 +01:00
dietrich e8f955220a remove old dependency diesel_codegen 2021-03-15 15:40:31 +01:00
dietrich 6a87a0b88c Bump Version 2021-03-15 14:42:01 +01:00
dietrich 5402f43432 Fix categories 2021-03-15 14:38:34 +01:00
dietrich ccb13ce4ad Use unpatched version of actix-web-static-files 2021-03-15 14:33:45 +01:00
dietrich d5a4541b7a bump version before publishing 2021-03-15 14:17:18 +01:00
dietrich 7d35357531 update categories and keywords 2021-03-15 14:06:28 +01:00
dietrich 6c6d8d4d5b Add branding .env variables and remove hard coded.
New Variables (including matching commandline parameters):
* PSLINK_EMPTY_FORWARD_URL
* PSLINK_BRAND_NAME
2021-03-11 12:54:09 +01:00
dietrich 23fa296ceb Add README.md 2021-03-09 14:07:05 +01:00
dietrich 8fd62a788b Add public url to server start log.
fixes #11
2021-03-09 11:59:52 +01:00
dietrich 56ab3ea893 Fix: Create admin promote correct account
fixes #10
2021-03-09 11:52:12 +01:00
dietrich a0aa251673 standalone binary
embed the sqlite3 library aswell as all the templates.
2021-03-09 11:24:58 +01:00
dietrich 9512807eb3 Add command line interface
Add a command line interface to the binary and remove parts
that were hardcoded.

new --help is:

```
pslink 0.1.0
Dietrich <dietrich@teilgedanken.de>
A simple webservice that allows registered users to create short links including qr-codes.
Anyone can visit the shortened links. This is an ideal setup for small busines or for publishing papers.

USAGE:
    pslink [OPTIONS] [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
        --db <database>              The path of the sqlite database [env: PSLINK_DATABASE=]  [default: links.db]
    -i, --hostip <internal_ip>       The host (ip) that will run the pslink service [env: PSLINK_IP=]  [default:
                                     localhost]
    -p, --port <port>                The port the pslink service will run on [env: PSLINK_PORT=]  [default: 8080]
    -t, --protocol <protocol>        The protocol that is used in the qr-codes (http results in slightly smaller codes
                                     in some cases) [env: PSLINK_PROTOCOL=]  [default: http]  [possible values: http,
                                     https]
    -u, --public-url <public_url>    The host url or the page that will be part of the short urls. [env:
                                     PSLINK_PUBLIC_URL=]  [default: localhost:8080]
        --secret <secret>            The secret that is used to encrypt the password database keep this as inacessable
                                     as possible. As commandlineparameters are visible to all users it is not wise to
                                     use this as a commandline parameter but rather as an environment variable. [env:
                                     PSLINK_SECRET=]  [default: ]

SUBCOMMANDS:
    runserver           Run the server
    create-admin        Create an admin user.
    generate-env        Generate an .env file template using default settings and exit
    migrate-database    Apply any pending migrations and exit
    help                Prints this message or the help of the given subcommand(s)
```
2021-03-07 19:14:34 +01:00
dietrich 0553aaa935 Add permissions to the page 2021-02-14 22:28:34 +01:00
dietrich 72be8e693a migrations for user roles 2021-02-10 09:12:42 +01:00
dietrich 8cb121b568 Add creation of the initial user to the main func 2021-02-10 09:09:17 +01:00
dietrich d3465b4e10 Adding click statistics
closes #2
2021-02-09 21:30:11 +01:00
dietrich 32a2151ba0 Fix empty code for fhs.li 2021-02-09 14:41:29 +01:00
dietrich a0a1065295 Make the links and users list scrollable
closes #6
2021-02-09 14:19:48 +01:00
dietrich 10933dd48b Adding user view
closes #7
2021-02-09 14:06:34 +01:00
dietrich 5d28707e18 Adding Dangerzone and deletion of links
closes #9
2021-02-09 08:01:32 +01:00
dietrich d451a4f05c Make links editable
closes #4
2021-02-08 20:44:32 +01:00
dietrich 0297aafbff save instead of edit 2021-02-08 19:38:36 +01:00
dietrich 258a05e83d add sorting functionality to the tables
closes #3
2021-02-08 19:25:08 +01:00
dietrich a99e20d1e6 Fix logging 2021-02-08 14:11:33 +01:00
dietrich a71ba86e45 Add editable user profiles
fixes: #5
2021-02-08 12:39:28 +01:00
dietrich c9c29748b2 make smaller qrcodes 2021-02-07 21:22:36 +01:00
dietrich d7fcfea808 fix links 2021-02-07 21:15:52 +01:00
dietrich fb9c1d6f29 redesign headline 2021-02-07 20:42:00 +01:00
dietrich 10fb186632 make table layout in overview 2021-02-07 20:35:45 +01:00
dietrich 325cdfc9d4 Add PNG download of QR-Code 2021-02-07 17:49:13 +01:00
dietrich b7f7c429de SeeOther instead of TemporaryRedirect 2021-02-05 19:57:37 +01:00