feeds-fun 1.10.3 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/layouts/SidePanelLayout.vue +0 -9
- package/src/logic/settings.ts +8 -0
- package/src/main.ts +17 -0
- package/src/views/MainView.vue +1 -1
package/package.json
CHANGED
|
@@ -48,15 +48,6 @@
|
|
|
48
48
|
<header class="flex items-center leading-8">
|
|
49
49
|
<div class="display:flex items-center mr-auto">
|
|
50
50
|
<ul class="list-none m-0 p-0 flex space-x-2">
|
|
51
|
-
<li>
|
|
52
|
-
<a
|
|
53
|
-
href="/"
|
|
54
|
-
class="ffun-header-link"
|
|
55
|
-
@click.prevent="router.push({name: 'main', params: {}})"
|
|
56
|
-
>Home</a
|
|
57
|
-
>
|
|
58
|
-
</li>
|
|
59
|
-
|
|
60
51
|
<li
|
|
61
52
|
v-for="[mode, props] of e.MainPanelModeProperties"
|
|
62
53
|
:key="mode">
|
package/src/logic/settings.ts
CHANGED
|
@@ -15,6 +15,10 @@ export const authSupertokensResendAfter = import.meta.env.VITE_FFUN_AUTH_SUPERTO
|
|
|
15
15
|
|
|
16
16
|
export const githubRepo = import.meta.env.VITE_FFUN_GITHUB_REPO || "https://github.com/Tiendil/feeds.fun";
|
|
17
17
|
|
|
18
|
+
export const plausibleEnabled = import.meta.env.VITE_FFUN_PLAUSIBLE_ENABLED == "true" || false;
|
|
19
|
+
export const plausibleDomain = import.meta.env.VITE_FFUN_PLAUSIBLE_DOMAIN || "localhost";
|
|
20
|
+
export const plausibleScript = import.meta.env.VITE_FFUN_PLAUSIBLE_SCRIPT || "";
|
|
21
|
+
|
|
18
22
|
console.log("settings.appName", appName);
|
|
19
23
|
console.log("settings.appDomain", appDomain);
|
|
20
24
|
console.log("settings.appPort", appPort);
|
|
@@ -26,3 +30,7 @@ console.log("settings.authSupertokensApiBasePath", authSupertokensApiBasePath);
|
|
|
26
30
|
console.log("settings.authSupertokensResendAfter", authSupertokensResendAfter);
|
|
27
31
|
|
|
28
32
|
console.log("settings.githubRepo", githubRepo);
|
|
33
|
+
|
|
34
|
+
console.log("settings.plausibleEnabled", plausibleEnabled);
|
|
35
|
+
console.log("settings.plausibleDomain", plausibleDomain);
|
|
36
|
+
console.log("settings.plausibleScript", plausibleScript);
|
package/src/main.ts
CHANGED
|
@@ -98,6 +98,10 @@ app.mount("#app");
|
|
|
98
98
|
import * as api from "@/logic/api";
|
|
99
99
|
import * as settings from "@/logic/settings";
|
|
100
100
|
|
|
101
|
+
/////////////////////
|
|
102
|
+
// supertokens
|
|
103
|
+
/////////////////////
|
|
104
|
+
|
|
101
105
|
// must be copy of smart_url from backend
|
|
102
106
|
function smartUrl(domain: string, port: number) {
|
|
103
107
|
if (port == 80) {
|
|
@@ -136,3 +140,16 @@ async function onSessionLost() {
|
|
|
136
140
|
}
|
|
137
141
|
|
|
138
142
|
api.init({onSessionLost: onSessionLost});
|
|
143
|
+
|
|
144
|
+
/////////////////////
|
|
145
|
+
// plausible
|
|
146
|
+
/////////////////////
|
|
147
|
+
|
|
148
|
+
if (settings.plausibleEnabled) {
|
|
149
|
+
const script = document.createElement("script");
|
|
150
|
+
script.src = settings.plausibleScript;
|
|
151
|
+
script.async = true;
|
|
152
|
+
script.defer = true;
|
|
153
|
+
script.setAttribute("data-domain", settings.plausibleDomain);
|
|
154
|
+
document.body.appendChild(script);
|
|
155
|
+
}
|
package/src/views/MainView.vue
CHANGED