Compare commits

...

22 Commits

Author SHA1 Message Date
binwiederhier
8c69234e28 Revert Docker user fix 2024-03-07 16:59:42 -05:00
binwiederhier
a9b7c4530b Derp 2024-03-07 16:34:49 -05:00
binwiederhier
76fc015775 Release notes 2024-03-07 16:30:35 -05:00
binwiederhier
ef302d22a9 Avoid panic if user.Current() fails; add logging to "ntfy subscribe" to help figure out what's wrong 2024-03-07 15:56:20 -05:00
Philipp C. Heckel
7ab8ef73a3 Merge pull request #1044 from tripleee/patch-2
Update Danish translations
2024-03-07 15:07:04 -05:00
Philipp C. Heckel
7616b24e30 Merge pull request #1045 from tripleee/patch-3
Update Finnish translations
2024-03-07 15:06:43 -05:00
Philipp C. Heckel
05c1b264f2 Merge pull request #1046 from tripleee/patch-4
Update Norwegian translations
2024-03-07 15:04:43 -05:00
Philipp C. Heckel
35ccfdb8d8 Merge pull request #1043 from tripleee/patch-1
Update Swedish localizations: typo fixes etc
2024-03-07 15:04:01 -05:00
binwiederhier
d744204052 Release notes 2024-03-07 15:01:24 -05:00
binwiederhier
6c3aca4cd6 Merge branch 'main' into cmj2002/main 2024-03-07 14:54:57 -05:00
binwiederhier
d54db74f5a Release notes 2024-03-07 13:08:56 -05:00
binwiederhier
4e1980c2cc Merge branch 'main' into patch-1 2024-03-07 13:05:47 -05:00
Philipp C. Heckel
40f990fffe Merge pull request #1050 from binwiederhier/message-size-limit+delay-limit
Message size limit+delay limit
2024-03-07 13:04:04 -05:00
tripleee
509f59ac3c Update Norwegian translations
* Avoid compound errors
* Typo fix
2024-03-06 19:57:18 +02:00
tripleee
9d8482a119 Update Finnish translations
* Avoid compound errors
* Typo fixes and wording tweaks
2024-03-06 19:48:13 +02:00
tripleee
34343fae02 Update Danish translations
Avoid compound errors
2024-03-06 19:32:24 +02:00
tripleee
1ff6ecf5d8 Update Swedish localizations: typo fixes etc
- Avoid compound errors
- Small wording tweaks
2024-03-06 19:23:00 +02:00
YMan84
7dfcda9306 Update publish.md with powershell snippet for uploading files 2024-01-15 19:11:55 -05:00
Cao Mingjun
4b1468cfd8 Web: support pasting images to PublishDialog 2023-11-25 07:39:20 +00:00
Cao Mingjun
00fe639a95 Remove debug logging 2023-11-25 05:22:02 +00:00
Cao Mingjun
94781c89f3 Preview local file before send 2023-11-25 03:39:26 +00:00
Cao Mingjun
a3312f69fb Web: support pasting images from clipboard 2023-11-24 14:49:56 +00:00
19 changed files with 210 additions and 128 deletions

View File

@@ -9,8 +9,7 @@ LABEL org.opencontainers.image.licenses="Apache-2.0, GPL-2.0"
LABEL org.opencontainers.image.title="ntfy"
LABEL org.opencontainers.image.description="Send push notifications to your phone or desktop using PUT/POST"
RUN apk add --no-cache tzdata \
&& adduser -D -u 1000 ntfy
RUN apk add --no-cache tzdata
COPY ntfy /usr/bin
EXPOSE 80/tcp

View File

@@ -12,7 +12,6 @@ LABEL org.opencontainers.image.description="Send push notifications to your phon
# Alpine does not support adding "tzdata" on ARM anymore, see
# https://github.com/binwiederhier/ntfy/issues/894
RUN adduser -D -u 1000 ntfy
COPY ntfy /usr/bin
EXPOSE 80/tcp

View File

@@ -1,4 +1,4 @@
FROM golang:1.21-bullseye as builder
FROM golang:1.22-bullseye as builder
ARG VERSION=dev
ARG COMMIT=unknown
@@ -53,7 +53,6 @@ LABEL org.opencontainers.image.licenses="Apache-2.0, GPL-2.0"
LABEL org.opencontainers.image.title="ntfy"
LABEL org.opencontainers.image.description="Send push notifications to your phone or desktop using PUT/POST"
RUN adduser -D -u 1000 ntfy
COPY --from=builder /app/dist/ntfy_linux_server/ntfy /usr/bin/ntfy
EXPOSE 80/tcp

View File

@@ -2,6 +2,7 @@ package client
import (
"gopkg.in/yaml.v2"
"heckel.io/ntfy/v2/log"
"os"
)
@@ -44,6 +45,7 @@ func NewConfig() *Config {
// LoadConfig loads the Client config from a yaml file
func LoadConfig(filename string) (*Config, error) {
log.Debug("Loading client config from %s", filename)
b, err := os.ReadFile(filename)
if err != nil {
return nil, err

View File

@@ -310,28 +310,43 @@ func loadConfig(c *cli.Context) (*client.Config, error) {
if filename != "" {
return client.LoadConfig(filename)
}
configFile := defaultClientConfigFile()
if s, _ := os.Stat(configFile); s != nil {
return client.LoadConfig(configFile)
configFile, err := defaultClientConfigFile()
if err != nil {
log.Warn("Could not determine default client config file: %s", err.Error())
} else {
if s, _ := os.Stat(configFile); s != nil {
return client.LoadConfig(configFile)
}
log.Debug("Config file %s not found", configFile)
}
log.Debug("Loading default config")
return client.NewConfig(), nil
}
//lint:ignore U1000 Conditionally used in different builds
func defaultClientConfigFileUnix() string {
u, _ := user.Current()
func defaultClientConfigFileUnix() (string, error) {
u, err := user.Current()
if err != nil {
return "", fmt.Errorf("could not determine current user: %w", err)
}
configFile := clientRootConfigFileUnixAbsolute
if u.Uid != "0" {
homeDir, _ := os.UserConfigDir()
return filepath.Join(homeDir, clientUserConfigFileUnixRelative)
homeDir, err := os.UserConfigDir()
if err != nil {
return "", fmt.Errorf("could not determine user config dir: %w", err)
}
return filepath.Join(homeDir, clientUserConfigFileUnixRelative), nil
}
return configFile
return configFile, nil
}
//lint:ignore U1000 Conditionally used in different builds
func defaultClientConfigFileWindows() string {
homeDir, _ := os.UserConfigDir()
return filepath.Join(homeDir, clientUserConfigFileWindowsRelative)
func defaultClientConfigFileWindows() (string, error) {
homeDir, err := os.UserConfigDir()
if err != nil {
return "", fmt.Errorf("could not determine user config dir: %w", err)
}
return filepath.Join(homeDir, clientUserConfigFileWindowsRelative), nil
}
func logMessagePrefix(m *client.Message) string {

View File

@@ -11,6 +11,6 @@ var (
scriptLauncher = []string{"sh", "-c"}
)
func defaultClientConfigFile() string {
func defaultClientConfigFile() (string, error) {
return defaultClientConfigFileUnix()
}

View File

@@ -13,6 +13,6 @@ var (
scriptLauncher = []string{"sh", "-c"}
)
func defaultClientConfigFile() string {
func defaultClientConfigFile() (string, error) {
return defaultClientConfigFileUnix()
}

View File

@@ -10,6 +10,6 @@ var (
scriptLauncher = []string{"cmd.exe", "/Q", "/C"}
)
func defaultClientConfigFile() string {
func defaultClientConfigFile() (string, error) {
return defaultClientConfigFileWindows()
}

View File

@@ -30,37 +30,37 @@ deb/rpm packages.
=== "x86_64/amd64"
```bash
wget https://github.com/binwiederhier/ntfy/releases/download/v2.8.0/ntfy_2.8.0_linux_amd64.tar.gz
tar zxvf ntfy_2.8.0_linux_amd64.tar.gz
sudo cp -a ntfy_2.8.0_linux_amd64/ntfy /usr/local/bin/ntfy
sudo mkdir /etc/ntfy && sudo cp ntfy_2.8.0_linux_amd64/{client,server}/*.yml /etc/ntfy
wget https://github.com/binwiederhier/ntfy/releases/download/v2.9.0/ntfy_2.9.0_linux_amd64.tar.gz
tar zxvf ntfy_2.9.0_linux_amd64.tar.gz
sudo cp -a ntfy_2.9.0_linux_amd64/ntfy /usr/local/bin/ntfy
sudo mkdir /etc/ntfy && sudo cp ntfy_2.9.0_linux_amd64/{client,server}/*.yml /etc/ntfy
sudo ntfy serve
```
=== "armv6"
```bash
wget https://github.com/binwiederhier/ntfy/releases/download/v2.8.0/ntfy_2.8.0_linux_armv6.tar.gz
tar zxvf ntfy_2.8.0_linux_armv6.tar.gz
sudo cp -a ntfy_2.8.0_linux_armv6/ntfy /usr/bin/ntfy
sudo mkdir /etc/ntfy && sudo cp ntfy_2.8.0_linux_armv6/{client,server}/*.yml /etc/ntfy
wget https://github.com/binwiederhier/ntfy/releases/download/v2.9.0/ntfy_2.9.0_linux_armv6.tar.gz
tar zxvf ntfy_2.9.0_linux_armv6.tar.gz
sudo cp -a ntfy_2.9.0_linux_armv6/ntfy /usr/bin/ntfy
sudo mkdir /etc/ntfy && sudo cp ntfy_2.9.0_linux_armv6/{client,server}/*.yml /etc/ntfy
sudo ntfy serve
```
=== "armv7/armhf"
```bash
wget https://github.com/binwiederhier/ntfy/releases/download/v2.8.0/ntfy_2.8.0_linux_armv7.tar.gz
tar zxvf ntfy_2.8.0_linux_armv7.tar.gz
sudo cp -a ntfy_2.8.0_linux_armv7/ntfy /usr/bin/ntfy
sudo mkdir /etc/ntfy && sudo cp ntfy_2.8.0_linux_armv7/{client,server}/*.yml /etc/ntfy
wget https://github.com/binwiederhier/ntfy/releases/download/v2.9.0/ntfy_2.9.0_linux_armv7.tar.gz
tar zxvf ntfy_2.9.0_linux_armv7.tar.gz
sudo cp -a ntfy_2.9.0_linux_armv7/ntfy /usr/bin/ntfy
sudo mkdir /etc/ntfy && sudo cp ntfy_2.9.0_linux_armv7/{client,server}/*.yml /etc/ntfy
sudo ntfy serve
```
=== "arm64"
```bash
wget https://github.com/binwiederhier/ntfy/releases/download/v2.8.0/ntfy_2.8.0_linux_arm64.tar.gz
tar zxvf ntfy_2.8.0_linux_arm64.tar.gz
sudo cp -a ntfy_2.8.0_linux_arm64/ntfy /usr/bin/ntfy
sudo mkdir /etc/ntfy && sudo cp ntfy_2.8.0_linux_arm64/{client,server}/*.yml /etc/ntfy
wget https://github.com/binwiederhier/ntfy/releases/download/v2.9.0/ntfy_2.9.0_linux_arm64.tar.gz
tar zxvf ntfy_2.9.0_linux_arm64.tar.gz
sudo cp -a ntfy_2.9.0_linux_arm64/ntfy /usr/bin/ntfy
sudo mkdir /etc/ntfy && sudo cp ntfy_2.9.0_linux_arm64/{client,server}/*.yml /etc/ntfy
sudo ntfy serve
```
@@ -110,7 +110,7 @@ Manually installing the .deb file:
=== "x86_64/amd64"
```bash
wget https://github.com/binwiederhier/ntfy/releases/download/v2.8.0/ntfy_2.8.0_linux_amd64.deb
wget https://github.com/binwiederhier/ntfy/releases/download/v2.9.0/ntfy_2.9.0_linux_amd64.deb
sudo dpkg -i ntfy_*.deb
sudo systemctl enable ntfy
sudo systemctl start ntfy
@@ -118,7 +118,7 @@ Manually installing the .deb file:
=== "armv6"
```bash
wget https://github.com/binwiederhier/ntfy/releases/download/v2.8.0/ntfy_2.8.0_linux_armv6.deb
wget https://github.com/binwiederhier/ntfy/releases/download/v2.9.0/ntfy_2.9.0_linux_armv6.deb
sudo dpkg -i ntfy_*.deb
sudo systemctl enable ntfy
sudo systemctl start ntfy
@@ -126,7 +126,7 @@ Manually installing the .deb file:
=== "armv7/armhf"
```bash
wget https://github.com/binwiederhier/ntfy/releases/download/v2.8.0/ntfy_2.8.0_linux_armv7.deb
wget https://github.com/binwiederhier/ntfy/releases/download/v2.9.0/ntfy_2.9.0_linux_armv7.deb
sudo dpkg -i ntfy_*.deb
sudo systemctl enable ntfy
sudo systemctl start ntfy
@@ -134,7 +134,7 @@ Manually installing the .deb file:
=== "arm64"
```bash
wget https://github.com/binwiederhier/ntfy/releases/download/v2.8.0/ntfy_2.8.0_linux_arm64.deb
wget https://github.com/binwiederhier/ntfy/releases/download/v2.9.0/ntfy_2.9.0_linux_arm64.deb
sudo dpkg -i ntfy_*.deb
sudo systemctl enable ntfy
sudo systemctl start ntfy
@@ -144,28 +144,28 @@ Manually installing the .deb file:
=== "x86_64/amd64"
```bash
sudo rpm -ivh https://github.com/binwiederhier/ntfy/releases/download/v2.8.0/ntfy_2.8.0_linux_amd64.rpm
sudo rpm -ivh https://github.com/binwiederhier/ntfy/releases/download/v2.9.0/ntfy_2.9.0_linux_amd64.rpm
sudo systemctl enable ntfy
sudo systemctl start ntfy
```
=== "armv6"
```bash
sudo rpm -ivh https://github.com/binwiederhier/ntfy/releases/download/v2.8.0/ntfy_2.8.0_linux_armv6.rpm
sudo rpm -ivh https://github.com/binwiederhier/ntfy/releases/download/v2.9.0/ntfy_2.9.0_linux_armv6.rpm
sudo systemctl enable ntfy
sudo systemctl start ntfy
```
=== "armv7/armhf"
```bash
sudo rpm -ivh https://github.com/binwiederhier/ntfy/releases/download/v2.8.0/ntfy_2.8.0_linux_armv7.rpm
sudo rpm -ivh https://github.com/binwiederhier/ntfy/releases/download/v2.9.0/ntfy_2.9.0_linux_armv7.rpm
sudo systemctl enable ntfy
sudo systemctl start ntfy
```
=== "arm64"
```bash
sudo rpm -ivh https://github.com/binwiederhier/ntfy/releases/download/v2.8.0/ntfy_2.8.0_linux_arm64.rpm
sudo rpm -ivh https://github.com/binwiederhier/ntfy/releases/download/v2.9.0/ntfy_2.9.0_linux_arm64.rpm
sudo systemctl enable ntfy
sudo systemctl start ntfy
```
@@ -195,18 +195,18 @@ NixOS also supports [declarative setup of the ntfy server](https://search.nixos.
## macOS
The [ntfy CLI](subscribe/cli.md) (`ntfy publish` and `ntfy subscribe` only) is supported on macOS as well.
To install, please [download the tarball](https://github.com/binwiederhier/ntfy/releases/download/v2.8.0/ntfy_2.8.0_darwin_all.tar.gz),
To install, please [download the tarball](https://github.com/binwiederhier/ntfy/releases/download/v2.9.0/ntfy_2.9.0_darwin_all.tar.gz),
extract it and place it somewhere in your `PATH` (e.g. `/usr/local/bin/ntfy`).
If run as `root`, ntfy will look for its config at `/etc/ntfy/client.yml`. For all other users, it'll look for it at
`~/Library/Application Support/ntfy/client.yml` (sample included in the tarball).
```bash
curl -L https://github.com/binwiederhier/ntfy/releases/download/v2.8.0/ntfy_2.8.0_darwin_all.tar.gz > ntfy_2.8.0_darwin_all.tar.gz
tar zxvf ntfy_2.8.0_darwin_all.tar.gz
sudo cp -a ntfy_2.8.0_darwin_all/ntfy /usr/local/bin/ntfy
curl -L https://github.com/binwiederhier/ntfy/releases/download/v2.9.0/ntfy_2.9.0_darwin_all.tar.gz > ntfy_2.9.0_darwin_all.tar.gz
tar zxvf ntfy_2.9.0_darwin_all.tar.gz
sudo cp -a ntfy_2.9.0_darwin_all/ntfy /usr/local/bin/ntfy
mkdir ~/Library/Application\ Support/ntfy
cp ntfy_2.8.0_darwin_all/client/client.yml ~/Library/Application\ Support/ntfy/client.yml
cp ntfy_2.9.0_darwin_all/client/client.yml ~/Library/Application\ Support/ntfy/client.yml
ntfy --help
```
@@ -224,7 +224,7 @@ brew install ntfy
## Windows
The [ntfy CLI](subscribe/cli.md) (`ntfy publish` and `ntfy subscribe` only) is supported on Windows as well.
To install, please [download the latest ZIP](https://github.com/binwiederhier/ntfy/releases/download/v2.8.0/ntfy_2.8.0_windows_amd64.zip),
To install, please [download the latest ZIP](https://github.com/binwiederhier/ntfy/releases/download/v2.9.0/ntfy_2.9.0_windows_amd64.zip),
extract it and place the `ntfy.exe` binary somewhere in your `%Path%`.
The default path for the client config file is at `%AppData%\ntfy\client.yml` (not created automatically, sample in the ZIP file).

View File

@@ -6,6 +6,7 @@ I've added a ⭐ to projects or posts that have a significant following, or had
## Official integrations
- [changedetection.io](https://changedetection.io) ⭐ - Website change detection and notification
- [Healthchecks.io](https://healthchecks.io/) ⭐ - Online service for monitoring regularly running tasks such as cron jobs
- [Apprise](https://github.com/caronc/apprise/wiki/Notify_ntfy) ⭐ - Push notifications that work with just about every platform
- [Uptime Kuma](https://uptime.kuma.pet/) ⭐ - A self-hosted monitoring tool
@@ -16,7 +17,7 @@ I've added a ⭐ to projects or posts that have a significant following, or had
- [Gatus](https://gatus.io/) ⭐ - Automated service health dashboard
- [Automatisch](https://automatisch.io/) ⭐ - Open source Zapier alternative / workflow automation tool
- [FlexGet](https://flexget.com/Plugins/Notifiers/ntfysh) ⭐ - Multipurpose automation tool for all of your media
- [Shoutrrr](https://containrrr.dev/shoutrrr/v0.7/services/ntfy/) ⭐ - Notification library for gophers and their furry friends.
- [Shoutrrr](https://containrrr.dev/shoutrrr/v0.8/services/ntfy/) ⭐ - Notification library for gophers and their furry friends.
- [Netdata](https://learn.netdata.cloud/docs/alerts-and-notifications/notifications/agent-alert-notifications/ntfy) ⭐ - Real-time performance monitoring
- [Deployer](https://github.com/deployphp/deployer) ⭐ - PHP deployment tool
- [Scrt.link](https://scrt.link/) - Share a secret
@@ -24,7 +25,7 @@ I've added a ⭐ to projects or posts that have a significant following, or had
- [diun](https://crazymax.dev/diun/) - Docker Image Update Notifier
- [Cloudron](https://www.cloudron.io/store/sh.ntfy.cloudronapp.html) - Platform that makes it easy to manage web apps on your server
- [Xitoring](https://xitoring.com/docs/notifications/notification-roles/ntfy/) - Server and Uptime monitoring
- [changedetection.io](https://changedetection.io) ⭐ - Website change detection and notification
- [HetrixTools](https://docs.hetrixtools.com/ntfy-sh-notifications/) - Uptime monitoring
## Integration via HTTP/SMTP/etc.
@@ -138,9 +139,15 @@ I've added a ⭐ to projects or posts that have a significant following, or had
- [jetspotter](https://github.com/vvanouytsel/jetspotter) - send notifications when planes are spotted near you (Go)
- [monitoring_ntfy](https://www.drupal.org/project/monitoring_ntfy) - Drupal monitoring Ntfy.sh integration (PHP/Drupal)
- [Notify](https://flathub.org/apps/com.ranfdev.Notify) - Native GTK4 client for ntfy (Rust)
- [notify-via-ntfy](https://exchange.checkmk.com/p/notify-via-ntfy) - Checkmk plugin to send notifications via ntfy (Python)
- [ntfy-java](https://github.com/MaheshBabu11/ntfy-java/) - A Java package to interact with a ntfy server (Java)
## Blog + forum posts
- [Boost Your Productivity with ntfy.sh: The Ultimate Notification Tool for Command-Line Users](https://dev.to/archetypal/boost-your-productivity-with-ntfysh-the-ultimate-notification-tool-for-command-line-users-iil) - dev.to - 3/2024
- [Introducing the Monitoring Ntfy.sh Integration Module: Real-time Notifications for Drupal Monitoring](https://cyberschorsch.dev/drupal/introducing-monitoring-ntfysh-integration-module-real-time-notifications-drupal-monitoring) - cyberschorsch.dev - 11/2023
- [How to install Ntfy.sh on CasaOS using BigBearCasaOS](https://www.youtube.com/watch?v=wSWhtSNwTd8) - youtube.com - 10/2023
- [Ntfy: Your Ultimate Push Notification Powerhouse!](https://kkamalesh117.medium.com/ntfy-your-ultimate-push-notification-powerhouse-1968c070f1d1) - kkamalesh117.medium.com - 9/2023
- [Installing Self Host NTFY On Linux Using Docker Container](https://www.pinoylinux.org/topicsplus/containers/installing-self-host-ntfy-on-linux-using-docker-container/) - pinoylinux.org - 9/2023
- [Homelab Notifications with ntfy](https://blog.alexsguardian.net/posts/2023/09/12/selfhosting-ntfy/) ⭐ - alexsguardian.net - 9/2023
- [Why NTFY is the Ultimate Push Notification Tool for Your Needs](https://osintph.medium.com/why-ntfy-is-the-ultimate-push-notification-tool-for-your-needs-e767421c84c5) - osintph.medium.com - 9/2023
@@ -226,7 +233,6 @@ I've added a ⭐ to projects or posts that have a significant following, or had
- [Show HN: A tool to send push notifications to your phone, written in Go](https://news.ycombinator.com/item?id=29715464) ⭐ - news.ycombinator.com - 12/2021
- [Reddit selfhostable post](https://www.reddit.com/r/selfhosted/comments/qxlsm9/my_open_source_notification_android_app_and/) ⭐ - reddit.com - 11/2021
## Alternative ntfy servers
Here's a list of public ntfy servers. As of right now, there is only one official server. The others are provided by the

View File

@@ -2439,6 +2439,17 @@ Here's an example showing how to upload an image:
http.DefaultClient.Do(req)
```
=== "PowerShell"
``` powershell
$Request = @{
Method = "POST"
Uri = "ntfy.sh/flowers"
InFile = "flower.jpg"
Headers = @{"Filename" = "flower.jpg"}
}
Invoke-RestMethod @Request
```
=== "Python"
``` python
requests.put("https://ntfy.sh/flowers",

View File

@@ -2,6 +2,31 @@
Binaries for all releases can be found on the GitHub releases pages for the [ntfy server](https://github.com/binwiederhier/ntfy/releases)
and the [ntfy Android app](https://github.com/binwiederhier/ntfy-android/releases).
### ntfy server v2.9.0
Released Mar 7, 2024
A small release after a long pause (lots of day job work). This release adds for **larger messages** and **longer message delays** in scheduled delivery messages. The web app also now supports pasting images from the clipboard. Other than that, only a few bug fixes and documentation updates, and a teeny tiny breaking change 😬.
!!! info
⚠️ **Breaking change**: The `Rate-Topics` header was removed due to a [DoS issue](https://github.com/binwiederhier/ntfy/issues/1048). This only affects installations with `visitor-subscriber-rate-limiting: true`, which is not the default and likely very rarely used. Normally I'd never remove a feature, but this is a security issue, and likely affects almost nobody.
**Features:**
* Support for larger message delays with `message-delay-limit` (see [message limits](config.md#message-limits), [#1050](https://github.com/binwiederhier/ntfy/pull/1050)/[#1019](https://github.com/binwiederhier/ntfy/issues/1019), thanks to [@MrChadMWood](https://github.com/MrChadMWood) for reporting)
* Support for larger message body sizes with `message-size-limit` (use at your own risk, see [message limits](config.md#message-limits), [#836](https://github.com/binwiederhier/ntfy/pull/836)/[#1050](https://github.com/binwiederhier/ntfy/pull/1050), thanks to [@zhzy0077](https://github.com/zhzy0077) for implementing this, and to [@nkjshlsqja7331](https://github.com/nkjshlsqja7331) for reporting)
* Web app: You can now paste images into the message bar or publish dialog ([#963](https://github.com/binwiederhier/ntfy/pull/963)/[#572](https://github.com/binwiederhier/ntfy/issues/572), thanks to [@cmj2002](https://github.com/cmj2002) for implementing, and [@rounakdatta](https://github.com/rounakdatta) for reporting)
**Bug fixes + maintenance:**
* ⚠️ Remove `Rate-Topics` header due to DoS security issue if `visitor-subscriber-rate-limiting: true` ([#1048](https://github.com/binwiederhier/ntfy/issues/1048))
**Documentation:**
* Remove `mkdocs-simple-hooks` ([#1016](https://github.com/binwiederhier/ntfy/pull/1016), thanks to [@Tom-Hubrecht](https://github.com/Tom-Hubrecht))
* Update Watchtower example ([#1014](https://github.com/binwiederhier/ntfy/pull/1014), thanks to [@lennart-m](https://github.com/lennart-m))
* Fix dead links ([#1022](https://github.com/binwiederhier/ntfy/pull/1022), thanks to [@DerRockWolf](https://github.com/DerRockWolf))
* PowerShell file upload example ([#1004](https://github.com/binwiederhier/ntfy/pull/1004), thanks to [@YMan84](https://github.com/YMan84))
## ntfy iOS app v1.3
Released Nov 26, 2023
@@ -1313,27 +1338,6 @@ and the [ntfy Android app](https://github.com/binwiederhier/ntfy-android/release
## Not released yet
### ntfy server v2.9.0
!!! info
**Breaking change**: The `Rate-Topics` header was removed due to a [DoS issue](https://github.com/binwiederhier/ntfy/issues/1048). This only affects installations with `visitor-subscriber-rate-limiting: true`, which is not the default and likely very rarely used.
**Features:**
* Support for larger message delays with `message-delay-limit` (see [message limits](config.md#message-limits), [#1050](https://github.com/binwiederhier/ntfy/pull/1050)/[#1019](https://github.com/binwiederhier/ntfy/issues/1019), thanks to [@MrChadMWood](https://github.com/MrChadMWood) for reporting)
* Support for larger message body sizes with `message-size-limit` (use at your own risk, see [message limits](config.md#message-limits), [#836](https://github.com/binwiederhier/ntfy/pull/836)/[#1050](https://github.com/binwiederhier/ntfy/pull/1050), thanks to [@zhzy0077](https://github.com/zhzy0077) for implementing this, and to [@nkjshlsqja7331](https://github.com/nkjshlsqja7331) for reporting)
**Bug fixes + maintenance:**
* Remove `Rate-Topics` header due to DoS security issue if `visitor-subscriber-rate-limiting: true` ([#1048](https://github.com/binwiederhier/ntfy/issues/1048))
* Add non-root user to Docker image, ntfy can be run as non-root ([#967](https://github.com/binwiederhier/ntfy/pull/967)/[#966](https://github.com/binwiederhier/ntfy/issues/966), thanks to [@arahja](https://github.com/arahja))
**Documentation:**
* Remove `mkdocs-simple-hooks` ([#1016](https://github.com/binwiederhier/ntfy/pull/1016), thanks to [@Tom-Hubrecht](https://github.com/Tom-Hubrecht))
* Update Watchtower example ([#1014](https://github.com/binwiederhier/ntfy/pull/1014), thanks to [@lennart-m](https://github.com/lennart-m))
* Fix dead links ([#1022](https://github.com/binwiederhier/ntfy/pull/1022), thanks to [@DerRockWolf](https://github.com/DerRockWolf))
### ntfy Android app v1.16.1 (UNRELEASED)
**Features:**

View File

@@ -1,7 +1,7 @@
{
"common_save": "Gem",
"common_add": "Tilføj",
"signup_title": "Opret en ntfy konto",
"signup_title": "Opret en ntfy-konto",
"signup_form_username": "Brugernavn",
"signup_form_password": "Kodeord",
"signup_form_confirm_password": "Bekræft kodeord",
@@ -10,24 +10,24 @@
"signup_error_username_taken": "Brugernavnet {{username}} er optaget",
"login_form_button_submit": "Log ind",
"action_bar_show_menu": "Vis menu",
"action_bar_logo_alt": "ntfy logo",
"action_bar_logo_alt": "ntfy-logo",
"action_bar_settings": "Indstillinger",
"signup_form_button_submit": "Opret konto",
"signup_form_toggle_password_visibility": "Skift synlighed af adgangskode",
"signup_disabled": "Tilmelding er deaktiveret",
"signup_error_creation_limit_reached": "Grænsen for kontooprettelse er nået",
"login_title": "Log ind på din ntfy konto",
"login_title": "Log ind på din ntfy-konto",
"login_link_signup": "Opret konto",
"login_disabled": "Login er deaktiveret",
"action_bar_reservation_add": "Reserver emne",
"action_bar_reservation_edit": "Rediger reservation",
"action_bar_reservation_delete": "Fjern reservation",
"action_bar_reservation_limit_reached": "Grænsen er nået",
"action_bar_send_test_notification": "Send test notifikation",
"action_bar_send_test_notification": "Send testnotifikation",
"action_bar_unsubscribe": "Afmeld",
"action_bar_toggle_mute": "Slå lyden fra/til for notifikationer",
"action_bar_change_display_name": "Skift visningsnavn",
"action_bar_toggle_action_menu": "Åben/luk handlings menu",
"action_bar_toggle_action_menu": "Åben/luk handlingsmenu",
"action_bar_profile_title": "Profil",
"action_bar_profile_settings": "Indstillinger",
"action_bar_profile_logout": "Log ud",
@@ -58,9 +58,9 @@
"notifications_attachment_open_title": "Gå til {{url}}",
"notifications_attachment_open_button": "Åben vedhæftning",
"notifications_attachment_link_expires": "link udløber {{date}}",
"notifications_attachment_link_expired": "download link er udløbet",
"notifications_attachment_link_expired": "download-link er udløbet",
"notifications_attachment_file_image": "billedfil",
"notifications_attachment_file_app": "Android app fil",
"notifications_attachment_file_app": "Android-appfil",
"notifications_attachment_file_document": "andet dokument",
"notifications_click_copy_url_title": "Kopier linkets URL til udklipsholderen",
"notifications_click_copy_url_button": "Kopier link",

View File

@@ -20,7 +20,7 @@
"prefs_users_description": "Lisää/poista käyttäjiä suojatuista topikeista täällä. Huomaa, että käyttäjätunnus ja salasana on tallennettu selaimen paikalliseen tallennustilaan.",
"account_basics_phone_numbers_dialog_number_label": "Puhelinnumero",
"subscribe_dialog_subscribe_description": "Aiheet eivät välttämättä ole salasanasuojattuja, joten valitse nimi, jota ei ole helposti arvatavissa. Kun olet tilannut, voit käyttää PUT/POST ilmoituksia.",
"action_bar_logo_alt": "ntfy logo",
"action_bar_logo_alt": "ntfy-logo",
"account_basics_password_dialog_button_submit": "Vaihda salasana",
"publish_dialog_emoji_picker_show": "Valitse emoji",
"account_basics_username_title": "Käyttäjätunnus",
@@ -30,7 +30,7 @@
"account_tokens_dialog_label": "Etiketti, esim. Tutka-ilmoitukset",
"common_add": "Lisää",
"account_tokens_table_expires_header": "Vanhenee",
"account_upgrade_dialog_proration_info": "<strong>Osuus suhde</strong>: Kun päivität maksullisten pakettien välillä, hintaero <strong>veloitetaan välittömästi</strong>. Kun siirryt alemmalle tasolle, saldoa käytetään tulevien laskutuskausien maksamiseen.",
"account_upgrade_dialog_proration_info": "<strong>Osuussuhde</strong>: Kun päivität maksullisten pakettien välillä, hintaero <strong>veloitetaan välittömästi</strong>. Kun siirryt alemmalle tasolle, saldoa käytetään tulevien laskutuskausien maksamiseen.",
"prefs_reservations_dialog_access_label": "Oikeudet",
"account_usage_attachment_storage_title": "Liiteiden säilytys",
"prefs_users_dialog_username_label": "Username, esim pena",
@@ -42,9 +42,9 @@
"prefs_reservations_table_not_subscribed": "Ei tilattu",
"publish_dialog_topic_placeholder": "Topikin nimi, esim. erkin_hälyt",
"account_upgrade_dialog_tier_features_emails_other": "{{emails}} päivittäisiä emaileja",
"prefs_notifications_min_priority_max_only": "Vain maksimi prioriteetti",
"prefs_notifications_min_priority_max_only": "Vain maksimiprioriteetti",
"account_upgrade_dialog_tier_features_calls_other": "{{calls}} päivittäisiä puheluja",
"prefs_notifications_sound_description_some": "Ilmoitukset soittavat {{sound}} äänen saapuessaan",
"prefs_notifications_sound_description_some": "Ilmoitukset soittavat {{sound}}-äänen saapuessaan",
"prefs_reservations_edit_button": "Muokkaa topikin oikeuksia",
"account_basics_phone_numbers_dialog_verify_button_sms": "Lähetä SMS",
"account_basics_tier_change_button": "Vaihda",
@@ -84,7 +84,7 @@
"subscribe_dialog_error_user_not_authorized": "Käyttäjää {{username}} ei ole valtuutettu",
"prefs_reservations_table_everyone_read_write": "Jokainen voi julkaista ja tilata",
"prefs_reservations_dialog_title_delete": "Poista topikin varaus",
"prefs_users_table": "Käyttäjä taulukko",
"prefs_users_table": "Käyttäjätaulukko",
"prefs_reservations_table_topic_header": "Topikki",
"action_bar_toggle_mute": "Hiljennä/poista hiljennys",
"reservation_delete_dialog_submit_button": "Poista varaus",
@@ -96,7 +96,7 @@
"account_upgrade_dialog_tier_features_messages_other": "{{messages}} päivittäisiä viestejä",
"publish_dialog_delay_reset": "Poista viivästetty toimitus",
"account_basics_phone_numbers_no_phone_numbers_yet": "Ei puhelinnumeroita vielä",
"action_bar_toggle_action_menu": "Avaa/sulje toiminto valikko",
"action_bar_toggle_action_menu": "Avaa/sulje toimintovalikko",
"subscribe_dialog_subscribe_button_generate_topic_name": "Luo nimi",
"notifications_list_item": "Ilmoitus",
"prefs_appearance_language_title": "Kieli",
@@ -116,10 +116,10 @@
"account_tokens_table_label_header": "Merkki",
"notifications_attachment_file_document": "muu asiakirja",
"publish_dialog_button_cancel": "Peruuta",
"account_upgrade_dialog_billing_contact_website": "Laskutukseen liittyvissä kysymyksissä käy <Link>website</Link>.",
"account_upgrade_dialog_billing_contact_website": "Laskutukseen liittyvissä kysymyksissä käy sivulla <Link>website</Link>.",
"signup_form_button_submit": "Kirjaudu linkki",
"account_basics_username_admin_tooltip": "Olet pääkäyttäjä",
"prefs_notifications_delete_after_never_description": "Ilmoituksia eivät koskaan poisteta automaattisesti",
"prefs_notifications_delete_after_never_description": "Ilmoituksia ei koskaan poisteta automaattisesti",
"account_delete_dialog_description": "Tämä poistaa pysyvästi tilisi, mukaan lukien kaikki palvelimelle tallennetut tiedot. Poistamisen jälkeen käyttäjätunnuksesi on poissa käytöstä 7 päivään. Jos todella haluat jatkaa, vahvista salasanasi alla olevaan kenttään.",
"publish_dialog_email_reset": "Poista sähköpostin edelleenlähetys",
"account_upgrade_dialog_tier_features_reservations_other": "{{reservations}} varatut topikit",
@@ -139,11 +139,11 @@
"prefs_reservations_description": "Voit varata topikien nimiä henkilökohtaiseen käyttöön täältä. Aiheen varaaminen antaa sinulle topikin omistajuuden ja voit määrittää topikkiin liittyviä käyttöoikeuksia muille käyttäjille.",
"notifications_attachment_copy_url_title": "Kopioi liitteen URL-osoite leikepöydälle",
"account_usage_title": "Käytössä",
"account_basics_tier_upgrade_button": "Päivitä Pro versioon",
"account_basics_tier_upgrade_button": "Päivitä Pro-versioon",
"prefs_users_description_no_sync": "Käyttäjiä ja salasanoja ei ole synkronoitu tiliisi.",
"account_tokens_dialog_title_edit": "Muokkaa käyttöoikeustunnusta",
"nav_button_publish_message": "Julkaise ilmoitus",
"prefs_users_table_base_url_header": "Palvelin URL",
"prefs_users_table_base_url_header": "Palvelin-URL",
"notifications_click_copy_url_title": "Kopioi linkin URL-osoite leikepöydälle",
"publish_dialog_attach_reset": "Poista liitteen URL-osoite",
"account_upgrade_dialog_tier_features_messages_one": "{{messages}} päivittäisiä viestejä",
@@ -160,7 +160,7 @@
"publish_dialog_priority_low": "Matala tärkeys",
"publish_dialog_priority_label": "Prioriteetti",
"prefs_reservations_delete_button": "Poista topikin oikeudet",
"account_basics_tier_admin_suffix_no_tier": "(e tasoa)",
"account_basics_tier_admin_suffix_no_tier": "(ei tasoa)",
"prefs_notifications_delete_after_one_week_description": "Ilmoitukset poistetaan automaattisesti viikon kuluttua",
"error_boundary_unsupported_indexeddb_description": "Ntfy-verkkosovellus tarvitsee IndexedDB:n toimiakseen, eikä selaimesi tue IndexedDB:tä yksityisessä selaustilassa.<br/><br/>Vaikka tämä on valitettavaa, ntfy-verkon käyttäminen ei myöskään ole kovin järkevää yksityisessä selaustilassa, koska kaikki on tallennettu selaimen tallennustilaan. Voit lukea siitä lisää <githubLink>tästä GitHub-numerosta</githubLink> tai puhua meille <discordLink>Discordissa</discordLink> tai <matrixLink>Matrixissa</matrixLink>.",
"subscribe_dialog_subscribe_button_cancel": "Peruuta",
@@ -197,7 +197,7 @@
"account_usage_calls_title": "Soitetut puhelut",
"error_boundary_description": "Näin ei selvästikään pitäisi tapahtua. Pahoittelut tästä.<br/>Jos sinulla on hetki aikaa, <githubLink>ilmoita tästä GitHubissa</githubLink> tai ilmoita meille <discordLink>Discordin</discordLink> tai <matrixLink>Matrix</matrixLink> kautta.",
"signup_form_toggle_password_visibility": "Vaihda salasanan näkyvyys",
"login_link_signup": "Kirjaudu linkki",
"login_link_signup": "Kirjautumislinkki",
"publish_dialog_message_label": "Viesti",
"publish_dialog_attached_file_title": "Liitetiedosto:",
"priority_min": "min",
@@ -254,7 +254,7 @@
"publish_dialog_attach_placeholder": "Liitä tiedosto URL-osoitteen mukaan, esim. https://f-droid.org/F-Droid.apk",
"publish_dialog_email_placeholder": "Osoite, johon ilmoitus välitetään, esim. urpo@example.com",
"notifications_attachment_link_expires": "linkki vanhenee {{date}}",
"action_bar_send_test_notification": "Lähetä testi ilmoitus",
"action_bar_send_test_notification": "Lähetä testi-ilmoitus",
"reservation_delete_dialog_action_keep_title": "Säilytä välimuistissa olevat viestit ja liitteet",
"prefs_notifications_sound_no_sound": "Ei ääntä",
"account_upgrade_dialog_interval_yearly": "Vuosittain",
@@ -300,15 +300,15 @@
"account_tokens_table_cannot_delete_or_edit": "Nykyistä istuntotunnusta ei voi muokata tai poistaa",
"notifications_tags": "Tagit",
"prefs_notifications_sound_play": "Toista valittu ääni",
"account_tokens_table_last_access_header": "Viimeinen käyty",
"account_tokens_table_last_access_header": "Viimeinen käynti",
"action_bar_profile_logout": "Kirjaudu ulos",
"publish_dialog_attached_file_filename_placeholder": "Liitetiedoston nimi",
"publish_dialog_priority_default": "Oletusprioriteetti",
"subscribe_dialog_subscribe_base_url_label": "Palvelimen URL",
"account_tokens_table_last_origin_tooltip": "Napsauta IP-osoitteesta {{ip}}, etsiäksesi",
"account_tokens_table_last_origin_tooltip": "Napsauta IP-osoitteesta {{ip}} etsiäksesi",
"account_usage_reservations_title": "Varatut topikit",
"account_upgrade_dialog_tier_price_per_month": "Kuukausi",
"message_bar_show_dialog": "Näytä julkaisu dialogi",
"message_bar_show_dialog": "Näytä julkaisudialogi",
"publish_dialog_chip_attach_url_label": "Liitä tiedosto URL-osoitteen mukaan",
"account_usage_calls_none": "Tällä tilillä ei voi soittaa puheluita",
"notifications_click_open_button": "Avaa linkki",
@@ -331,7 +331,7 @@
"prefs_notifications_delete_after_one_month_description": "Ilmoitukset poistetaan automaattisesti kuukauden kuluttua",
"common_cancel": "Peruuta",
"account_basics_phone_numbers_dialog_verify_button_call": "Soita minulle",
"signup_already_have_account": "Onko sinulla jo tili ? Kirjaudu sisään !",
"signup_already_have_account": "Onko sinulla jo tili? Kirjaudu sisään!",
"publish_dialog_call_item": "Soita puhelinnumeroon {{number}}",
"nav_button_account": "Tili",
"publish_dialog_click_reset": "Poista napsautettava URL-osoite",
@@ -349,7 +349,7 @@
"notifications_priority_x": "Prioriteetti {{priority}}",
"account_delete_dialog_billing_warning": "Tilin poistaminen peruuttaa myös laskutustilauksesi välittömästi. Et voi enää käyttää laskutuksen hallintapaneelia.",
"prefs_notifications_min_priority_description_max": "Näytä ilmoitukset, jos prioriteetti on 5 (max)",
"subscribe_dialog_login_description": "Tämä Topikki on suojattu salasanalla. Anna käyttäjätunnus ja salasana.",
"subscribe_dialog_login_description": "Tämä topikki on suojattu salasanalla. Anna käyttäjätunnus ja salasana.",
"account_upgrade_dialog_reservations_warning_other": "Valittu taso sallii vähemmän varattuja topikkeja kuin nykyinen tasosi. Ennen kuin muutat tasosi, <strong>poista vähintään {{count}} varausta</strong>. Voit poistaa varauksia <Link>Asetuksista</Link>.",
"prefs_users_dialog_title_add": "Lisää käyttäjä",
"account_tokens_dialog_button_create": "Luo tunnus",
@@ -360,11 +360,11 @@
"notifications_actions_not_supported": "Toimintoa ei tueta verkkosovelluksessa",
"notifications_actions_open_url_title": "Siirry osoitteeseen {{url}}",
"notifications_none_for_any_title": "Et ole saanut ilmoituksia.",
"notifications_none_for_topic_description": "Jos haluat lähettää ilmoituksia tähän topikkiin, PUT tai POST topikin URL-osoitteeseen.",
"notifications_none_for_topic_description": "Jos haluat lähettää ilmoituksia tähän topikkiin, lähetä PUT tai POST topikin URL-osoitteeseen.",
"notifications_none_for_any_description": "Jos haluat lähettää ilmoituksia topikkiin, PUT tai POST topikin URL-osoitteeseen. Tässä on esimerkki yhden topikin käyttämisestä.",
"notifications_no_subscriptions_title": "Näyttää siltä, että sinulla ei ole vielä tilauksia.",
"notifications_none_for_topic_title": "Et ole vielä saanut ilmoituksia tästä aiheesta.",
"notifications_actions_http_request_title": "Lähetä HTTP {{method}} to {{url}}",
"notifications_actions_http_request_title": "Lähetä HTTP {{method}} osoitteeseen {{url}}",
"reserve_dialog_checkbox_label": "Käänteinen aihe ja aseta pääsy",
"publish_dialog_progress_uploading": "Lähetetään …",
"publish_dialog_title_no_topic": "Julkaise ilmoitus",

View File

@@ -74,7 +74,7 @@
"publish_dialog_email_placeholder": "Adresse å videresende merknaden til, f.eks. phil@example.com",
"error_boundary_gathering_info": "Hent mer info …",
"prefs_notifications_sound_description_some": "Merknader spiller {{sound}}-lyd når de mottas",
"prefs_notifications_min_priority_description_any": "Viser aller merknader, uavhengig av prioritet",
"prefs_notifications_min_priority_description_any": "Viser alle merknader, uavhengig av prioritet",
"prefs_notifications_min_priority_description_x_or_higher": "Vis merknader hvis prioritet er {{number}} ({{name}}) eller høyere",
"prefs_notifications_min_priority_high_and_higher": "Høy prioritet og høyere",
"prefs_notifications_min_priority_max_only": "Kun maks. prioritet",
@@ -158,7 +158,7 @@
"prefs_notifications_min_priority_low_and_higher": "Lav prioritet og høyere",
"prefs_users_description": "Legg til/fjern brukere for dine beskyttede emner her. Vær oppmerksom på at brukernavn og passord er lagret i nettleserens lokale lagring.",
"error_boundary_description": "Dette skal åpenbart ikke skje. Beklager dette.<br/>Hvis du har et minutt, vennligst <githubLink>rapporter dette på GitHub</githubLink>, eller gi oss beskjed via <discordLink>Discord</discordLink> eller <matrixLink>Matrix</matrixLink>.",
"action_bar_logo_alt": "ntfy logo",
"action_bar_logo_alt": "ntfy-logo",
"message_bar_publish": "Publiser melding",
"action_bar_toggle_action_menu": "Åpne/lukk handlingsmeny",
"message_bar_show_dialog": "Vis publiseringsdialog",
@@ -181,7 +181,7 @@
"publish_dialog_topic_reset": "Tilbakestill emne",
"publish_dialog_click_label": "Klikk URL",
"publish_dialog_email_reset": "Fjern videresending av e-post",
"publish_dialog_attach_reset": "Fjern URL vedlegg",
"publish_dialog_attach_reset": "Fjern URL-vedlegg",
"publish_dialog_delay_reset": "Fjern forsinket levering",
"publish_dialog_attached_file_remove": "Fjern vedlagt fil",
"subscribe_dialog_subscribe_base_url_label": "Tjeneste-URL",
@@ -191,7 +191,7 @@
"action_bar_account": "Konto",
"action_bar_profile_settings": "Innstillinger",
"nav_button_account": "Konto",
"signup_title": "Opprett en ntfy konto",
"signup_title": "Opprett en ntfy-konto",
"signup_form_username": "Brukernavn",
"signup_form_password": "Passord",
"signup_form_button_submit": "Meld deg på",

View File

@@ -1,10 +1,10 @@
{
"action_bar_settings": "Inställningar",
"action_bar_send_test_notification": "Skicka test notis",
"action_bar_send_test_notification": "Skicka testnotis",
"action_bar_toggle_action_menu": "Öppna/stäng åtgärdsmeny",
"message_bar_type_message": "Skriv ett meddelande här",
"message_bar_error_publishing": "Fel vid publicering av notis",
"message_bar_show_dialog": "Visa publicerings dialog",
"message_bar_show_dialog": "Visa publiceringsdialog",
"message_bar_publish": "Publicera meddelande",
"nav_topics_title": "Prenumererade kategorier",
"nav_button_all_notifications": "Alla notiser",
@@ -27,7 +27,7 @@
"notifications_attachment_link_expired": "Nedladdningslänk utgått",
"notifications_priority_x": "Prioritet {{priority}}",
"action_bar_show_menu": "Visa meny",
"action_bar_logo_alt": "ntfy logga",
"action_bar_logo_alt": "ntfy-logga",
"action_bar_unsubscribe": "Avprenumerera",
"action_bar_toggle_mute": "Tysta/aktivera notiser",
"action_bar_clear_notifications": "Rensa alla notiser",
@@ -36,12 +36,12 @@
"nav_button_settings": "Inställningar",
"nav_button_muted": "Notiser tystade",
"notifications_attachment_link_expires": "länken utgår {{date}}",
"notifications_attachment_file_image": "bild fil",
"notifications_attachment_file_audio": "ljud fil",
"notifications_attachment_file_image": "bildfil",
"notifications_attachment_file_audio": "ljudfil",
"alert_notification_permission_required_description": "Ge din webbläsare behörighet att visa skrivbordsnotiser.",
"alert_not_supported_description": "Notiser stöds inte i din webbläsare.",
"notifications_mark_read": "Markera som läst",
"notifications_attachment_file_video": "video fil",
"notifications_attachment_file_video": "videofil",
"notifications_click_copy_url_button": "Kopiera länk",
"notifications_click_open_button": "Öppna länk",
"notifications_actions_open_url_title": "Gå till {{url}}",
@@ -78,10 +78,10 @@
"signup_disabled": "Registrering är inaktiverad",
"signup_error_username_taken": "Användarnamn [[username]] används redan",
"notifications_attachment_file_document": "annat dokument",
"notifications_attachment_file_app": "Android app fil",
"notifications_attachment_file_app": "Android-appfil",
"notifications_click_copy_url_title": "Kopiera länk till urklipp",
"notifications_none_for_topic_title": "Du har inte fått några notiser för detta ämnet ännu.",
"notifications_none_for_topic_description": "För att kunna skicka notiser till detta ämnet, använd PUT eller POST till ämnets URL.",
"notifications_none_for_topic_description": "För att kunna skicka notiser till detta ämne, använd PUT eller POST till ämnets URL.",
"notifications_actions_http_request_title": "Skicka HTTP {{method}} till {{url}}",
"publish_dialog_progress_uploading": "Laddar upp …",
"nav_upgrade_banner_description": "Reservera ämnen, fler meddelanden och e-postmeddelanden och större bilagor",
@@ -103,7 +103,7 @@
"account_upgrade_dialog_tier_features_emails_one": "{{emails}} dagligt e-postmeddelande",
"account_upgrade_dialog_button_cancel": "Avbryt",
"common_copy_to_clipboard": "Kopiera till urklipp",
"account_tokens_table_copied_to_clipboard": "Åtkomsttoken kopierat",
"account_tokens_table_copied_to_clipboard": "Åtkomsttoken kopierad",
"account_tokens_description": "Använd åtkomsttoken när du publicerar och prenumererar via ntfy API, så att du inte behöver skicka dina kontouppgifter. Läs mer i <Link>dokumentationen</Link>.",
"account_tokens_table_create_token_button": "Skapa åtkomsttoken",
"prefs_users_description_no_sync": "Användare och lösenord synkroniseras inte till ditt konto.",
@@ -129,7 +129,7 @@
"account_upgrade_dialog_interval_yearly": "Årligen",
"account_upgrade_dialog_interval_yearly_discount_save": "spara {{discount}}%",
"account_upgrade_dialog_interval_yearly_discount_save_up_to": "spara upp till {{discount}}%",
"account_upgrade_dialog_cancel_warning": "Detta kommer att <strong>säga upp din prenumeration</strong> och nedgradera ditt konto {{date}}. På det datumet kommer ämnesreservationer och meddelanden som ligger i cacheminnet på servern <strong>att raderas</strong>.",
"account_upgrade_dialog_cancel_warning": "Detta kommer att <strong>säga upp din prenumeration</strong> och nedgradera ditt konto {{date}}. På det datumet kommer ämnesreservationer och meddelanden som ligger i cacheminnet på servern <strong>att raderas</strong>.",
"account_upgrade_dialog_proration_info": "<strong>Deklaration</strong>: När du uppgraderar mellan betalda planer kommer prisskillnaden att <strong>debiteras omedelbart</strong>. Vid nedgradering till en lägre nivå kommer saldot att användas för att betala för framtida faktureringsperioder.",
"account_upgrade_dialog_reservations_warning_one": "Den valda nivån tillåter färre reserverade ämnen än din nuvarande nivå. Innan du ändrar nivå, <strong>bör du ta bort minst en reservation</strong>. Du kan ta bort reservationer i <Link>Inställningar</Link>.",
"account_upgrade_dialog_reservations_warning_other": "Den valda nivån tillåter färre reserverade ämnen än din nuvarande nivå. Innan du ändrar nivå, <strong>ta bort minst {{count}} reservationer</strong>. Du kan ta bort reservationer i <Link>Inställningar</Link>.",
@@ -363,7 +363,7 @@
"account_basics_phone_numbers_description": "För notifieringar via telefonsamtal",
"account_basics_phone_numbers_no_phone_numbers_yet": "Inga telefonnummer ännu",
"account_basics_phone_numbers_copied_to_clipboard": "Telefonnummer kopierat till urklipp",
"account_basics_phone_numbers_dialog_title": "Lägga till telefonnummer",
"account_basics_phone_numbers_dialog_title": "Lägg till telefonnummer",
"account_basics_phone_numbers_dialog_number_label": "Telefonnummer",
"account_basics_phone_numbers_dialog_number_placeholder": "t.ex. +1222333444",
"account_basics_phone_numbers_dialog_verify_button_sms": "Skicka SMS",

View File

@@ -1,5 +1,5 @@
import * as React from "react";
import { Box } from "@mui/material";
import { Box, Link } from "@mui/material";
import { useTranslation } from "react-i18next";
import fileDocument from "../img/file-document.svg";
import fileImage from "../img/file-image.svg";
@@ -32,16 +32,18 @@ const AttachmentIcon = (props) => {
imageLabel = t("notifications_attachment_file_document");
}
return (
<Box
component="img"
src={imageFile}
alt={imageLabel}
loading="lazy"
sx={{
width: "28px",
height: "28px",
}}
/>
<Link href={props.href} target="_blank">
<Box
component="img"
src={imageFile}
alt={imageLabel}
loading="lazy"
sx={{
width: "28px",
height: "28px",
}}
/>
</Link>
);
};

View File

@@ -10,6 +10,7 @@ import Navigation from "./Navigation";
const Messaging = (props) => {
const [message, setMessage] = useState("");
const [attachFile, setAttachFile] = useState(null);
const [dialogKey, setDialogKey] = useState(0);
const { dialogOpenMode } = props;
@@ -22,12 +23,30 @@ const Messaging = (props) => {
const handleDialogClose = () => {
props.onDialogOpenModeChange("");
setDialogKey((prev) => prev + 1);
setAttachFile(null);
};
const getPastedImage = (ev) => {
const { items } = ev.clipboardData;
for (let i = 0; i < items.length; i += 1) {
if (items[i].type.indexOf("image") !== -1) {
return items[i].getAsFile();
}
}
return null;
};
return (
<>
{subscription && (
<MessageBar subscription={subscription} message={message} onMessageChange={setMessage} onOpenDialogClick={handleOpenDialogClick} />
<MessageBar
subscription={subscription}
message={message}
onMessageChange={setMessage}
onFilePasted={setAttachFile}
onOpenDialogClick={handleOpenDialogClick}
getPastedImage={getPastedImage}
/>
)}
<PublishDialog
key={`publishDialog${dialogKey}`} // Resets dialog when canceled/closed
@@ -35,6 +54,8 @@ const Messaging = (props) => {
baseUrl={subscription?.baseUrl ?? config.base_url}
topic={subscription?.topic ?? ""}
message={message}
attachFile={attachFile}
getPastedImage={getPastedImage}
onClose={handleDialogClose}
onDragEnter={() => props.onDialogOpenModeChange((prev) => prev || PublishDialog.OPEN_MODE_DRAG)} // Only update if not already open
onResetOpenMode={() => props.onDialogOpenModeChange(PublishDialog.OPEN_MODE_DEFAULT)}
@@ -56,6 +77,15 @@ const MessageBar = (props) => {
}
props.onMessageChange("");
};
const handlePaste = (ev) => {
const blob = props.getPastedImage(ev);
if (blob) {
props.onFilePasted(blob);
props.onOpenDialogClick();
}
};
return (
<Paper
elevation={3}
@@ -89,6 +119,7 @@ const MessageBar = (props) => {
handleSendClick();
}
}}
onPaste={handlePaste}
/>
<IconButton color="inherit" size="large" edge="end" onClick={handleSendClick} aria-label={t("message_bar_publish")}>
<SendIcon />

View File

@@ -235,6 +235,19 @@ const PublishDialog = (props) => {
await checkAttachmentLimits(file);
};
useEffect(() => {
if (props.attachFile) {
updateAttachFile(props.attachFile);
}
}, [props.attachFile]);
const handlePaste = (ev) => {
const blob = props.getPastedImage(ev);
if (blob) {
updateAttachFile(blob);
}
};
const handleAttachFileChanged = async (ev) => {
await updateAttachFile(ev.target.files[0]);
};
@@ -357,6 +370,7 @@ const PublishDialog = (props) => {
inputProps={{
"aria-label": t("publish_dialog_message_label"),
}}
onPaste={handlePaste}
/>
<FormControlLabel
label={t("publish_dialog_checkbox_markdown")}
@@ -791,7 +805,7 @@ const AttachmentBox = (props) => {
borderRadius: "4px",
}}
>
<AttachmentIcon type={file.type} />
<AttachmentIcon type={file.type} href={URL.createObjectURL(file)} />
<Box sx={{ marginLeft: 1, textAlign: "left" }}>
<ExpandingTextField
minWidth={140}