feat: add LOCK_TO_INSTANCE env var
This commit is contained in:
1 parent
014ba9c6ad
commit
258bad533c
3 files changed
+7
-3
No files matched your search
@@ -48,8 +48,9 @@ There you go, you now have an instance of Photon running.
|
|||||||
The following environment variables can be set to override the default settings:
|
The following environment variables can be set to override the default settings:
|
||||||
|
|
||||||
| Variable | Values | Default Value |
|
| Variable | Values | Default Value |
|
||||||
| ------------------------------- | ------------------- | ------------- |
|
| ------------------------------- | ------------------- | -------------------------------------- |
|
||||||
| PUBLIC_INSTANCE_URL | URL | `lemmy.ml` |
|
| PUBLIC_INSTANCE_URL | URL | `lemmy.ml` |
|
||||||
|
| PUBLIC_LOCK_TO_INSTANCE | `bool` | `true` if `PUBLIC_INSTANCE_URL` is set |
|
||||||
| PUBLIC_THEME | system\|dark\|light | system |
|
| PUBLIC_THEME | system\|dark\|light | system |
|
||||||
| PUBLIC_EXPANDABLE_IMAGES | `bool` | true |
|
| PUBLIC_EXPANDABLE_IMAGES | `bool` | true |
|
||||||
| PUBLIC_MARK_READ_POSTS | `bool` | true |
|
| PUBLIC_MARK_READ_POSTS | `bool` | true |
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "photon-lemmy",
|
"name": "photon-lemmy",
|
||||||
"version": "0.9.26",
|
"version": "0.9.27",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite dev",
|
"dev": "vite dev",
|
||||||
|
|||||||
+4
-1
@@ -3,6 +3,9 @@
|
|||||||
import { env } from '$env/dynamic/public'
|
import { env } from '$env/dynamic/public'
|
||||||
import { writable } from 'svelte/store'
|
import { writable } from 'svelte/store'
|
||||||
|
|
||||||
export const LINKED_INSTANCE_URL = env.PUBLIC_INSTANCE_URL
|
export const LINKED_INSTANCE_URL =
|
||||||
|
(env.PUBLIC_LOCK_TO_INSTANCE ?? 'true').toLowerCase() == 'true'
|
||||||
|
? env.PUBLIC_INSTANCE_URL
|
||||||
|
: undefined
|
||||||
export const DEFAULT_INSTANCE_URL = env.PUBLIC_INSTANCE_URL || 'lemmy.ml'
|
export const DEFAULT_INSTANCE_URL = env.PUBLIC_INSTANCE_URL || 'lemmy.ml'
|
||||||
export let instance = writable(DEFAULT_INSTANCE_URL)
|
export let instance = writable(DEFAULT_INSTANCE_URL)
|
||||||
Reference in new issue
Block a user