Compare commits
8 Commits
buttplug-1
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| ad83fb553a | |||
| 2be36a679d | |||
| 75d4b4227c | |||
| 2277e4f686 | |||
| 13c6977e59 | |||
| c85fa7798e | |||
| ce30eca574 | |||
| 6724afa939 |
12
DOCKER.md
12
DOCKER.md
@@ -53,9 +53,7 @@ docker run -d \
|
||||
-e PUBLIC_API_URL=https://api.pivoine.art \
|
||||
-e PUBLIC_URL=https://sexy.pivoine.art \
|
||||
-e PUBLIC_UMAMI_ID=your-umami-id \
|
||||
-e LETTERSPACE_API_URL=https://api.letterspace.com/v1 \
|
||||
-e LETTERSPACE_API_KEY=your-api-key \
|
||||
-e LETTERSPACE_LIST_ID=your-list-id \
|
||||
-e PUBLIC_UMAMI_SCRIPT=https://umami.pivoine.art/script.js \
|
||||
sexy.pivoine.art:latest
|
||||
```
|
||||
|
||||
@@ -117,9 +115,7 @@ docker-compose -f docker-compose.production.yml up -d --scale frontend=3
|
||||
| Variable | Description | Example |
|
||||
|----------|-------------|---------|
|
||||
| `PUBLIC_UMAMI_ID` | Umami analytics tracking ID | `abc123def-456` |
|
||||
| `LETTERSPACE_API_URL` | Letterspace API endpoint | `https://api.letterspace.com/v1` |
|
||||
| `LETTERSPACE_API_KEY` | Letterspace authentication key | `sk_live_...` |
|
||||
| `LETTERSPACE_LIST_ID` | Mailing list identifier | `list_abc123` |
|
||||
| `PUBLIC_UMAMI_SCRIPT` | Umami script URL | `https://umami.pivoine.art/script.js` |
|
||||
| `PORT` | Application port (inside container) | `3000` |
|
||||
| `HOST` | Host binding | `0.0.0.0` |
|
||||
| `NODE_ENV` | Node environment | `production` |
|
||||
@@ -224,12 +220,12 @@ docker run -d \
|
||||
|
||||
```bash
|
||||
# Create secrets
|
||||
echo "your-api-key" | docker secret create letterspace_api_key -
|
||||
echo "your-db-password" | docker secret create db_password -
|
||||
|
||||
# Deploy with secrets
|
||||
docker service create \
|
||||
--name sexy-pivoine-frontend \
|
||||
--secret letterspace_api_key \
|
||||
--secret db_password \
|
||||
-p 3000:3000 \
|
||||
sexy.pivoine.art:latest
|
||||
```
|
||||
|
||||
@@ -124,9 +124,7 @@ ENV NODE_ENV=production \
|
||||
ENV PUBLIC_API_URL="" \
|
||||
PUBLIC_URL="" \
|
||||
PUBLIC_UMAMI_ID="" \
|
||||
LETTERSPACE_API_URL="" \
|
||||
LETTERSPACE_API_KEY="" \
|
||||
LETTERSPACE_LIST_ID=""
|
||||
PUBLIC_UMAMI_SCRIPT=""
|
||||
|
||||
# Expose application port
|
||||
EXPOSE 3000
|
||||
|
||||
@@ -22,9 +22,7 @@ cat > .env.production << EOF
|
||||
PUBLIC_API_URL=https://api.your-domain.com
|
||||
PUBLIC_URL=https://your-domain.com
|
||||
PUBLIC_UMAMI_ID=
|
||||
LETTERSPACE_API_URL=
|
||||
LETTERSPACE_API_KEY=
|
||||
LETTERSPACE_LIST_ID=
|
||||
PUBLIC_UMAMI_SCRIPT=
|
||||
EOF
|
||||
```
|
||||
|
||||
@@ -132,9 +130,7 @@ docker pull ghcr.io/valknarxxx/sexy:latest
|
||||
| Variable | Description | Example |
|
||||
|----------|-------------|---------|
|
||||
| `PUBLIC_UMAMI_ID` | Analytics tracking ID | `abc-123-def` |
|
||||
| `LETTERSPACE_API_URL` | Newsletter API | `https://api.letterspace.com/v1` |
|
||||
| `LETTERSPACE_API_KEY` | Newsletter API key | `sk_live_...` |
|
||||
| `LETTERSPACE_LIST_ID` | Mailing list ID | `list_abc123` |
|
||||
| `PUBLIC_UMAMI_SCRIPT` | Umami script URL | `https://umami.example.com/script.js` |
|
||||
|
||||
## Common Commands
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@ Like Beate Uhse breaking barriers in post-war Germany, we believe in the freedom
|
||||
- 📱 **Responsive Design** that looks sexy on any device
|
||||
- 🌍 **Internationalization** — pleasure speaks all languages
|
||||
- 📊 **Analytics Integration** (Umami) — know your admirers
|
||||
- 📧 **Newsletter Integration** (Letterspace) — stay connected
|
||||
|
||||
<div align="center">
|
||||
|
||||
@@ -212,10 +211,8 @@ pnpm --filter @sexy.pivoine.art/frontend start
|
||||
|
||||
### 💜 Optional (The Extras)
|
||||
|
||||
- `PUBLIC_UMAMI_ID` — Analytics tracking
|
||||
- `LETTERSPACE_API_URL` — Newsletter endpoint
|
||||
- `LETTERSPACE_API_KEY` — Newsletter key
|
||||
- `LETTERSPACE_LIST_ID` — Mailing list
|
||||
- `PUBLIC_UMAMI_ID` — Analytics tracking ID
|
||||
- `PUBLIC_UMAMI_SCRIPT` — Umami script URL
|
||||
|
||||
See [.env.production.example](.env.production.example) for the full configuration.
|
||||
|
||||
|
||||
@@ -6,9 +6,8 @@ SvelteKit's `PUBLIC_*` environment variables are **baked into the JavaScript** a
|
||||
|
||||
1. ✅ Changing `PUBLIC_API_URL`
|
||||
2. ✅ Changing `PUBLIC_URL`
|
||||
3. ✅ Changing `PUBLIC_UMAMI_ID`
|
||||
4. ✅ Changing any `LETTERSPACE_*` variables
|
||||
5. ❌ NOT needed for Directus env vars (those are runtime)
|
||||
3. ❌ NOT needed for `PUBLIC_UMAMI_ID` or `PUBLIC_UMAMI_SCRIPT` (those are runtime)
|
||||
4. ❌ NOT needed for Directus env vars (those are runtime)
|
||||
|
||||
## Quick Rebuild Process
|
||||
|
||||
@@ -24,10 +23,9 @@ Set your production values:
|
||||
```bash
|
||||
PUBLIC_API_URL=https://sexy.pivoine.art/api
|
||||
PUBLIC_URL=https://sexy.pivoine.art
|
||||
# Note: PUBLIC_UMAMI_* can also be set at runtime in docker-compose
|
||||
PUBLIC_UMAMI_ID=your-umami-id
|
||||
LETTERSPACE_API_URL=https://api.letterspace.com/v1
|
||||
LETTERSPACE_API_KEY=your-key
|
||||
LETTERSPACE_LIST_ID=your-list-id
|
||||
PUBLIC_UMAMI_SCRIPT=https://umami.pivoine.art/script.js
|
||||
```
|
||||
|
||||
### 2. Rebuild the Image
|
||||
@@ -253,8 +251,7 @@ These are runtime environment variables and can be changed in docker-compose.
|
||||
|--------|----------------|--------------|
|
||||
| `PUBLIC_API_URL` | ✅ Yes | Rebuild image |
|
||||
| `PUBLIC_URL` | ✅ Yes | Rebuild image |
|
||||
| `PUBLIC_UMAMI_ID` | ✅ Yes | Rebuild image |
|
||||
| `LETTERSPACE_*` | ✅ Yes | Rebuild image |
|
||||
| `PUBLIC_UMAMI_*` | ❌ No | Restart container |
|
||||
| `SEXY_DIRECTUS_*` | ❌ No | Restart container |
|
||||
| `DB_*` | ❌ No | Restart container |
|
||||
| `EMAIL_*` | ❌ No | Restart container |
|
||||
|
||||
@@ -103,9 +103,7 @@ services:
|
||||
PUBLIC_API_URL: ${SEXY_FRONTEND_PUBLIC_API_URL}
|
||||
PUBLIC_URL: ${SEXY_FRONTEND_PUBLIC_URL}
|
||||
PUBLIC_UMAMI_ID: ${SEXY_FRONTEND_PUBLIC_UMAMI_ID:-}
|
||||
LETTERSPACE_API_URL: ${SEXY_FRONTEND_LETTERSPACE_API_URL:-}
|
||||
LETTERSPACE_API_KEY: ${SEXY_FRONTEND_LETTERSPACE_API_KEY:-}
|
||||
LETTERSPACE_LIST_ID: ${SEXY_FRONTEND_LETTERSPACE_LIST_ID:-}
|
||||
PUBLIC_UMAMI_SCRIPT: ${SEXY_FRONTEND_PUBLIC_UMAMI_SCRIPT:-}
|
||||
|
||||
# Override volume for production path
|
||||
volumes:
|
||||
|
||||
@@ -135,11 +135,7 @@ services:
|
||||
PUBLIC_API_URL: ${SEXY_FRONTEND_PUBLIC_API_URL:-http://localhost:8055}
|
||||
PUBLIC_URL: ${SEXY_FRONTEND_PUBLIC_URL:-http://localhost:3000}
|
||||
PUBLIC_UMAMI_ID: ${SEXY_FRONTEND_PUBLIC_UMAMI_ID:-}
|
||||
|
||||
# Letterspace newsletter integration
|
||||
LETTERSPACE_API_URL: ${SEXY_FRONTEND_LETTERSPACE_API_URL:-}
|
||||
LETTERSPACE_API_KEY: ${SEXY_FRONTEND_LETTERSPACE_API_KEY:-}
|
||||
LETTERSPACE_LIST_ID: ${SEXY_FRONTEND_LETTERSPACE_LIST_ID:-}
|
||||
PUBLIC_UMAMI_SCRIPT: ${SEXY_FRONTEND_PUBLIC_UMAMI_SCRIPT:-}
|
||||
|
||||
# Timezone
|
||||
TZ: ${TIMEZONE:-Europe/Amsterdam}
|
||||
|
||||
53
packages/buttplug/Cargo.lock
generated
53
packages/buttplug/Cargo.lock
generated
@@ -177,7 +177,7 @@ checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
|
||||
[[package]]
|
||||
name = "buttplug_core"
|
||||
version = "10.0.0"
|
||||
source = "git+https://github.com/valknarthing/buttplug.git#c569409c51ad15f343c3f97a57711cdaa358f2ea"
|
||||
source = "git+https://github.com/valknarthing/buttplug.git?rev=fad6c9d#fad6c9d97895218b01ceb55fd4a872a89043194a"
|
||||
dependencies = [
|
||||
"async-stream",
|
||||
"cfg-if",
|
||||
@@ -203,7 +203,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "buttplug_server"
|
||||
version = "10.0.0"
|
||||
source = "git+https://github.com/valknarthing/buttplug.git#c569409c51ad15f343c3f97a57711cdaa358f2ea"
|
||||
source = "git+https://github.com/valknarthing/buttplug.git?rev=fad6c9d#fad6c9d97895218b01ceb55fd4a872a89043194a"
|
||||
dependencies = [
|
||||
"aes",
|
||||
"async-trait",
|
||||
@@ -243,8 +243,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "buttplug_server_device_config"
|
||||
version = "10.0.0"
|
||||
source = "git+https://github.com/valknarthing/buttplug.git#c569409c51ad15f343c3f97a57711cdaa358f2ea"
|
||||
version = "10.0.1"
|
||||
source = "git+https://github.com/valknarthing/buttplug.git?rev=fad6c9d#fad6c9d97895218b01ceb55fd4a872a89043194a"
|
||||
dependencies = [
|
||||
"buttplug_core",
|
||||
"dashmap",
|
||||
@@ -913,9 +913,9 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
|
||||
|
||||
[[package]]
|
||||
name = "js-sys"
|
||||
version = "0.3.80"
|
||||
version = "0.3.87"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "852f13bec5eba4ba9afbeb93fd7c13fe56147f055939ae21c43a29a0ecb2702e"
|
||||
checksum = "93f0862381daaec758576dcc22eb7bbf4d7efd67328553f3b45a412a51a3fb21"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"wasm-bindgen",
|
||||
@@ -1860,9 +1860,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.103"
|
||||
version = "0.2.110"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ab10a69fbd0a177f5f649ad4d8d3305499c42bab9aef2f7ff592d0ec8f833819"
|
||||
checksum = "1de241cdc66a9d91bd84f097039eb140cdc6eec47e0cdbaf9d932a1dd6c35866"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"once_cell",
|
||||
@@ -1873,27 +1873,14 @@ dependencies = [
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-backend"
|
||||
version = "0.2.103"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0bb702423545a6007bbc368fde243ba47ca275e549c8a28617f56f6ba53b1d1c"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"log",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-futures"
|
||||
version = "0.4.53"
|
||||
version = "0.4.60"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a0b221ff421256839509adbb55998214a70d829d3a28c69b4a6672e9d2a42f67"
|
||||
checksum = "a42e96ea38f49b191e08a1bab66c7ffdba24b06f9995b39a9dd60222e5b6f1da"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"futures-util",
|
||||
"js-sys",
|
||||
"once_cell",
|
||||
"wasm-bindgen",
|
||||
@@ -1902,9 +1889,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro"
|
||||
version = "0.2.103"
|
||||
version = "0.2.110"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc65f4f411d91494355917b605e1480033152658d71f722a90647f56a70c88a0"
|
||||
checksum = "e12fdf6649048f2e3de6d7d5ff3ced779cdedee0e0baffd7dff5cdfa3abc8a52"
|
||||
dependencies = [
|
||||
"quote",
|
||||
"wasm-bindgen-macro-support",
|
||||
@@ -1912,22 +1899,22 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-macro-support"
|
||||
version = "0.2.103"
|
||||
version = "0.2.110"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ffc003a991398a8ee604a401e194b6b3a39677b3173d6e74495eb51b82e99a32"
|
||||
checksum = "0e63d1795c565ac3462334c1e396fd46dbf481c40f51f5072c310717bc4fb309"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"wasm-bindgen-backend",
|
||||
"wasm-bindgen-shared",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen-shared"
|
||||
version = "0.2.103"
|
||||
version = "0.2.110"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "293c37f4efa430ca14db3721dfbe48d8c33308096bd44d80ebaa775ab71ba1cf"
|
||||
checksum = "e9f9cdac23a5ce71f6bf9f8824898a501e511892791ea2a0c6b8568c68b9cb53"
|
||||
dependencies = [
|
||||
"unicode-ident",
|
||||
]
|
||||
@@ -1948,9 +1935,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "web-sys"
|
||||
version = "0.3.80"
|
||||
version = "0.3.87"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fbe734895e869dc429d78c4b433f8d17d95f8d05317440b4fad5ab2d33e596dc"
|
||||
checksum = "f2c7c5718134e770ee62af3b6b4a84518ec10101aad610c024b64d6ff29bb1ff"
|
||||
dependencies = [
|
||||
"js-sys",
|
||||
"wasm-bindgen",
|
||||
|
||||
@@ -16,15 +16,15 @@ name = "buttplug_wasm"
|
||||
path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
buttplug_core = { git = "https://github.com/valknarthing/buttplug.git", default-features = false, features = ["wasm"] }
|
||||
buttplug_server = { git = "https://github.com/valknarthing/buttplug.git", default-features = false, features = ["wasm"] }
|
||||
buttplug_server_device_config = { git = "https://github.com/valknarthing/buttplug.git" }
|
||||
js-sys = "0.3.80"
|
||||
buttplug_core = { git = "https://github.com/valknarthing/buttplug.git", rev = "fad6c9d", default-features = false, features = ["wasm"] }
|
||||
buttplug_server = { git = "https://github.com/valknarthing/buttplug.git", rev = "fad6c9d", default-features = false, features = ["wasm"] }
|
||||
buttplug_server_device_config = { git = "https://github.com/valknarthing/buttplug.git", rev = "fad6c9d" }
|
||||
js-sys = "0.3.87"
|
||||
tracing-wasm = "0.2.1"
|
||||
log-panics = { version = "2.1.0", features = ["with-backtrace"] }
|
||||
console_error_panic_hook = "0.1.7"
|
||||
wasmtimer = "0.4.3"
|
||||
wasm-bindgen = { version = "0.2.103", features = ["serde-serialize"] }
|
||||
wasm-bindgen = { version = "0.2.110", features = ["serde-serialize"] }
|
||||
tokio = { version = "1.47.1", features = ["sync", "macros", "io-util"] }
|
||||
tokio-stream = "0.1.17"
|
||||
tracing = "0.1.41"
|
||||
@@ -33,12 +33,12 @@ tracing-subscriber = { version = "0.3.20", features = ["json"] }
|
||||
futures = "0.3.31"
|
||||
futures-util = "0.3.31"
|
||||
async-trait = "0.1.89"
|
||||
wasm-bindgen-futures = "0.4.53"
|
||||
wasm-bindgen-futures = "0.4.60"
|
||||
getrandom = { version = "0.3", features = ["wasm_js"] }
|
||||
parking_lot = { version = "0.11.1", features = ["wasm-bindgen"]}
|
||||
|
||||
[dependencies.web-sys]
|
||||
version = "0.3.80"
|
||||
version = "0.3.87"
|
||||
# path = "../../wasm-bindgen/crates/web-sys"
|
||||
#git = "https://github.com/rustwasm/wasm-bindgen"
|
||||
features = [
|
||||
|
||||
@@ -7,7 +7,6 @@ use buttplug_server::device::hardware::communication::{
|
||||
HardwareCommunicationManagerEvent,
|
||||
};
|
||||
use futures::future;
|
||||
use js_sys::Array;
|
||||
use tokio::sync::mpsc::Sender;
|
||||
use wasm_bindgen::prelude::*;
|
||||
use wasm_bindgen_futures::{spawn_local, JsFuture};
|
||||
@@ -63,8 +62,8 @@ impl HardwareCommunicationManager for WebBluetoothCommunicationManager {
|
||||
// way for anyone to add device configurations through FFI yet anyways.
|
||||
let config_manager = create_test_dcm(false);
|
||||
let options = web_sys::RequestDeviceOptions::new();
|
||||
let filters = Array::new();
|
||||
let optional_services = Array::new();
|
||||
let mut filters = Vec::new();
|
||||
let mut optional_services = Vec::new();
|
||||
for vals in config_manager.base_communication_specifiers().iter() {
|
||||
for config in vals.1.iter() {
|
||||
if let ProtocolCommunicationSpecifier::BluetoothLE(btle) = &config {
|
||||
@@ -77,16 +76,16 @@ impl HardwareCommunicationManager for WebBluetoothCommunicationManager {
|
||||
} else {
|
||||
filter.set_name(&name);
|
||||
}
|
||||
filters.push(&filter.into());
|
||||
filters.push(filter);
|
||||
}
|
||||
for (service, _) in btle.services() {
|
||||
optional_services.push(&service.to_string().into());
|
||||
optional_services.push(js_sys::JsString::from(service.to_string()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
options.set_filters(&filters.into());
|
||||
options.set_optional_services(&optional_services.into());
|
||||
options.set_filters(&filters);
|
||||
options.set_optional_services(&optional_services);
|
||||
let nav = web_sys::window().unwrap().navigator();
|
||||
//nav.bluetooth().get_availability();
|
||||
//JsFuture::from(nav.bluetooth().request_device()).await;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
PUBLIC_API_URL=https://sexy.pivoine.art/api
|
||||
PUBLIC_URL=https://sexy.pivoine.art
|
||||
PUBLIC_UMAMI_ID=
|
||||
LETTERSPACE_API_URL=
|
||||
LETTERSPACE_API_KEY=
|
||||
LETTERSPACE_LIST_ID=
|
||||
PUBLIC_UMAMI_SCRIPT=
|
||||
|
||||
@@ -1,119 +0,0 @@
|
||||
<script lang="ts">
|
||||
import { _ } from "svelte-i18n";
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogDescription,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from "$lib/components/ui/dialog";
|
||||
import { Button } from "$lib/components/ui/button";
|
||||
import { Separator } from "$lib/components/ui/separator";
|
||||
import type { Snippet } from "svelte";
|
||||
import Label from "../ui/label/label.svelte";
|
||||
import Input from "../ui/input/input.svelte";
|
||||
import { toast } from "svelte-sonner";
|
||||
|
||||
interface Props {
|
||||
open: boolean;
|
||||
email: string;
|
||||
children?: Snippet;
|
||||
}
|
||||
|
||||
let isLoading = $state(false);
|
||||
|
||||
async function handleSubscription(e: Event) {
|
||||
e.preventDefault();
|
||||
try {
|
||||
isLoading = true;
|
||||
await fetch("/newsletter", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify({ email }),
|
||||
});
|
||||
toast.success(
|
||||
$_("newsletter_signup.toast_subscribe", { values: { email } }),
|
||||
);
|
||||
} finally {
|
||||
isLoading = false;
|
||||
open = false;
|
||||
}
|
||||
}
|
||||
|
||||
let { open = $bindable(), email = $bindable() }: Props = $props();
|
||||
</script>
|
||||
|
||||
<Dialog bind:open>
|
||||
<DialogContent class="sm:max-w-md">
|
||||
<DialogHeader class="space-y-4">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center gap-3">
|
||||
<div
|
||||
class="w-10 h-10 rounded-full bg-gradient-to-br from-primary to-purple-600 flex items-center justify-center shrink-0 grow-0"
|
||||
>
|
||||
<span class="icon-[ri--newspaper-line]"></span>
|
||||
</div>
|
||||
<div class="">
|
||||
<DialogTitle
|
||||
class="text-left text-xl font-semibold text-primary-foreground"
|
||||
>{$_('newsletter_signup.title')}</DialogTitle
|
||||
>
|
||||
<DialogDescription class="text-left text-sm">
|
||||
{$_('newsletter_signup.description')}
|
||||
</DialogDescription>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</DialogHeader>
|
||||
|
||||
<Separator class="my-4" />
|
||||
|
||||
<form onsubmit={handleSubscription}>
|
||||
<!-- Email -->
|
||||
<div class="space-y-2 flex gap-4 items-center">
|
||||
<Label for="email" class="m-0">{$_('newsletter_signup.email')}</Label>
|
||||
<Input
|
||||
id="email"
|
||||
type="email"
|
||||
placeholder={$_('newsletter_signup.email_placeholder')}
|
||||
bind:value={email}
|
||||
required
|
||||
class="bg-background/50 border-primary/20 focus:border-primary"
|
||||
/>
|
||||
</div>
|
||||
<Separator class="my-8" />
|
||||
|
||||
<!-- Close Button -->
|
||||
<div class="flex justify-end gap-4">
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
onclick={() => (open = false)}
|
||||
class="text-muted-foreground hover:text-foreground cursor-pointer"
|
||||
>
|
||||
<span class="icon-[ri--close-large-line]"></span>
|
||||
{$_('newsletter_signup.close')}
|
||||
</Button>
|
||||
<Button
|
||||
variant="default"
|
||||
size="sm"
|
||||
type="submit"
|
||||
class="cursor-pointer"
|
||||
disabled={isLoading}
|
||||
>
|
||||
{#if isLoading}
|
||||
<div
|
||||
class="w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin mr-2"
|
||||
></div>
|
||||
{$_('newsletter_signup.subscribing')}
|
||||
{:else}
|
||||
<span class="icon-[ri--check-line]"></span>
|
||||
{$_('newsletter_signup.subscribe')}
|
||||
{/if}
|
||||
</Button>
|
||||
</div>
|
||||
</form>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
@@ -1,26 +0,0 @@
|
||||
<script>
|
||||
import { _ } from "svelte-i18n";
|
||||
import { Button } from "../ui/button";
|
||||
import { Card, CardContent } from "../ui/card";
|
||||
import NewsletterSignupPopup from "./newsletter-signup-popup.svelte";
|
||||
let isPopupOpen = $state(false);
|
||||
|
||||
let { email = "" } = $props();
|
||||
</script>
|
||||
|
||||
<!-- Newsletter Signup -->
|
||||
<Card class="p-0 not-last:bg-gradient-to-br from-primary/10 to-accent/10">
|
||||
<CardContent class="p-6 text-center">
|
||||
<h3 class="font-semibold mb-2">{$_('newsletter_signup.title')}</h3>
|
||||
<p class="text-sm text-muted-foreground mb-4">
|
||||
{$_('newsletter_signup.description')}
|
||||
</p>
|
||||
<Button
|
||||
onclick={() => (isPopupOpen = true)}
|
||||
target="_blank"
|
||||
class="cursor-pointer w-full bg-gradient-to-r from-primary to-accent hover:from-primary/90 hover:to-accent/90"
|
||||
>{$_('newsletter_signup.cta')}</Button
|
||||
>
|
||||
<NewsletterSignupPopup bind:open={isPopupOpen} {email} />
|
||||
</CardContent>
|
||||
</Card>
|
||||
@@ -21,7 +21,7 @@ export const getAssetUrl = (
|
||||
if (!id) {
|
||||
return null;
|
||||
}
|
||||
return `${directusApiUrl}/assets/${id}${transform ? "?transform=" + transform : ""}`;
|
||||
return `${directusApiUrl}/assets/${id}${transform ? "?key=" + transform : ""}`;
|
||||
};
|
||||
|
||||
export const isModel = (user: CurrentUser) => {
|
||||
|
||||
@@ -613,8 +613,8 @@ export default {
|
||||
address: {
|
||||
company: "SexyArt",
|
||||
name: "Sebastian Krüger",
|
||||
street: "Neue Weinsteige 21",
|
||||
city: "70180 Stuttgart",
|
||||
street: "Berlingerstraße 48",
|
||||
city: "78333 Stockach",
|
||||
country: "Germany",
|
||||
},
|
||||
phone: {
|
||||
@@ -870,18 +870,6 @@ export default {
|
||||
exit: "Exit",
|
||||
exit_url: "https://pivoine.art",
|
||||
},
|
||||
newsletter_signup: {
|
||||
title: "Stay Updated",
|
||||
description:
|
||||
"Get the latest articles and insights delivered to your inbox.",
|
||||
email: "Email",
|
||||
email_placeholder: "your@email.com",
|
||||
cta: "Subscribe to Newsletter",
|
||||
close: "Close",
|
||||
subscribe: "Subscribe",
|
||||
subscribing: "Subscribing",
|
||||
toast_subscribe: "Your email has been added to the newsletter list!",
|
||||
},
|
||||
sharing_popup_button: {
|
||||
share: "Share",
|
||||
},
|
||||
|
||||
@@ -123,7 +123,7 @@ class Logger {
|
||||
PUBLIC_API_URL: process.env.PUBLIC_API_URL,
|
||||
PUBLIC_URL: process.env.PUBLIC_URL,
|
||||
PUBLIC_UMAMI_ID: process.env.PUBLIC_UMAMI_ID ? '***set***' : 'not set',
|
||||
LETTERSPACE_API_URL: process.env.LETTERSPACE_API_URL || 'not set',
|
||||
PUBLIC_UMAMI_SCRIPT: process.env.PUBLIC_UMAMI_SCRIPT || 'not set',
|
||||
PORT: process.env.PORT || '3000',
|
||||
HOST: process.env.HOST || '0.0.0.0',
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@ import Footer from "$lib/components/footer/footer.svelte";
|
||||
import { Toaster } from "$lib/components/ui/sonner";
|
||||
import Header from "$lib/components/header/header.svelte";
|
||||
import AgeVerificationDialog from "$lib/components/age-verification-dialog/age-verification-dialog.svelte";
|
||||
import { PUBLIC_UMAMI_ID } from "$env/static/public";
|
||||
import { env } from "$env/dynamic/public";
|
||||
|
||||
onMount(async () => {
|
||||
await waitLocale();
|
||||
@@ -17,11 +17,11 @@ let { children, data } = $props();
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
{#if import.meta.env.PROD && PUBLIC_UMAMI_ID}
|
||||
{#if import.meta.env.PROD && env.PUBLIC_UMAMI_ID && env.PUBLIC_UMAMI_SCRIPT}
|
||||
<script
|
||||
defer
|
||||
src="https://umami.pivoine.art/script.js"
|
||||
data-website-id={PUBLIC_UMAMI_ID}
|
||||
src={env.PUBLIC_UMAMI_SCRIPT}
|
||||
data-website-id={env.PUBLIC_UMAMI_ID}
|
||||
></script>
|
||||
{/if}
|
||||
</svelte:head>
|
||||
|
||||
@@ -9,7 +9,6 @@ import { getAssetUrl } from "$lib/directus";
|
||||
import SharingPopup from "$lib/components/sharing-popup/sharing-popup.svelte";
|
||||
import Meta from "$lib/components/meta/meta.svelte";
|
||||
import PeonyBackground from "$lib/components/background/peony-background.svelte";
|
||||
import NewsletterSignup from "$lib/components/newsletter-signup/newsletter-signup-widget.svelte";
|
||||
import SharingPopupButton from "$lib/components/sharing-popup/sharing-popup-button.svelte";
|
||||
|
||||
const { data } = $props();
|
||||
@@ -215,8 +214,6 @@ const timeAgo = new TimeAgo("en");
|
||||
</Card>
|
||||
-->
|
||||
|
||||
<!-- <NewsletterSignup email={data.authStatus.user?.email}/> -->
|
||||
|
||||
<!-- Back to Magazine -->
|
||||
<Button
|
||||
variant="outline"
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
import {
|
||||
LETTERSPACE_API_KEY,
|
||||
LETTERSPACE_API_URL,
|
||||
LETTERSPACE_LIST_ID,
|
||||
} from "$env/static/private";
|
||||
import { json } from "@sveltejs/kit";
|
||||
|
||||
export async function POST({ request, fetch }) {
|
||||
const { email } = await request.json();
|
||||
const lists = [LETTERSPACE_LIST_ID];
|
||||
|
||||
await fetch(`${LETTERSPACE_API_URL}/subscribers`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"X-API-Key": LETTERSPACE_API_KEY,
|
||||
},
|
||||
body: JSON.stringify({ email, lists }),
|
||||
});
|
||||
|
||||
return json({ email }, { status: 201 });
|
||||
}
|
||||
@@ -16,7 +16,6 @@ import { formatVideoDuration, getUserInitials } from "$lib/utils";
|
||||
import { invalidateAll } from "$app/navigation";
|
||||
import { toast } from "svelte-sonner";
|
||||
import { createCommentForVideo, likeVideo, unlikeVideo, recordVideoPlay, updateVideoPlay } from "$lib/services";
|
||||
import NewsletterSignup from "$lib/components/newsletter-signup/newsletter-signup-widget.svelte";
|
||||
import SharingPopupButton from "$lib/components/sharing-popup/sharing-popup-button.svelte";
|
||||
|
||||
const { data } = $props();
|
||||
@@ -539,8 +538,6 @@ let showPlayer = $state(false);
|
||||
</CardContent>
|
||||
</Card> -->
|
||||
|
||||
<!-- <NewsletterSignup /> -->
|
||||
|
||||
<!-- Back to Videos -->
|
||||
<Button
|
||||
variant="outline"
|
||||
|
||||
Reference in New Issue
Block a user