feeds-fun 1.10.3 → 1.11.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feeds-fun",
3
- "version": "1.10.3",
3
+ "version": "1.11.1",
4
4
  "author": "Aliaksei Yaletski (Tiendil) <a.eletsky@gmail.com> (https://tiendil.org/)",
5
5
  "description": "Frontend for the Feeds Fun — web-based news reader",
6
6
  "keywords": [
@@ -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">
@@ -75,25 +66,58 @@
75
66
  >
76
67
  </li>
77
68
 
78
- <li>
69
+ <li class="">
79
70
  <a
80
71
  href="/api/docs"
81
72
  target="_blank"
82
73
  class="ffun-header-link"
83
74
  style="text-decoration: none"
84
- >API&#8599;</a
75
+ >API</a
85
76
  >
86
77
  </li>
87
78
 
88
- <li>
79
+ <li v-if="settings.blog">
89
80
  <a
90
- :href="settings.githubRepo"
81
+ :href="settings.blog"
91
82
  target="_blank"
92
83
  class="ffun-header-link"
93
84
  style="text-decoration: none"
94
- >GitHub&#8599;</a
85
+ >Blog</a
95
86
  >
96
87
  </li>
88
+
89
+ <li v-if="settings.redditSubreddit">
90
+ <a
91
+ :href="settings.redditSubreddit"
92
+ target="_blank"
93
+ class="ffun-header-link text-xl align-middle"
94
+ title="Reddit"
95
+ style="text-decoration: none"
96
+ ><i class="ti ti-brand-reddit"></i
97
+ ></a>
98
+ </li>
99
+
100
+ <li v-if="settings.discordInvite">
101
+ <a
102
+ :href="settings.discordInvite"
103
+ target="_blank"
104
+ class="ffun-header-link text-xl align-middle"
105
+ title="Discord"
106
+ style="text-decoration: none"
107
+ ><i class="ti ti-brand-discord"></i
108
+ ></a>
109
+ </li>
110
+
111
+ <li v-if="settings.githubRepo">
112
+ <a
113
+ :href="settings.githubRepo"
114
+ target="_blank"
115
+ class="ffun-header-link text-xl align-middle"
116
+ title="GitHub"
117
+ style="text-decoration: none">
118
+ <i class="ti ti-brand-github"></i
119
+ ></a>
120
+ </li>
97
121
  </ul>
98
122
  </div>
99
123
 
@@ -13,7 +13,14 @@ export const authMode = import.meta.env.VITE_FFUN_AUTH_MODE || AuthMode.SingleUs
13
13
  export const authSupertokensApiBasePath = import.meta.env.VITE_FFUN_AUTH_SUPERTOKENS_API_BASE_PATH || "/supertokens";
14
14
  export const authSupertokensResendAfter = import.meta.env.VITE_FFUN_AUTH_SUPERTOKENS_RESEND_AFTER || 60 * 1000;
15
15
 
16
+ export const blog = import.meta.env.VITE_FFUN_BLOG || "https://blog.feeds.fun";
16
17
  export const githubRepo = import.meta.env.VITE_FFUN_GITHUB_REPO || "https://github.com/Tiendil/feeds.fun";
18
+ export const discordInvite = import.meta.env.VITE_FFUN_DISCORD_INVITE || "https://discord.gg/C5RVusHQXy";
19
+ export const redditSubreddit = import.meta.env.VITE_FFUN_REDDIT_SUBREDDIT || "https://www.reddit.com/r/feedsfun/";
20
+
21
+ export const plausibleEnabled = import.meta.env.VITE_FFUN_PLAUSIBLE_ENABLED == "true" || false;
22
+ export const plausibleDomain = import.meta.env.VITE_FFUN_PLAUSIBLE_DOMAIN || "localhost";
23
+ export const plausibleScript = import.meta.env.VITE_FFUN_PLAUSIBLE_SCRIPT || "";
17
24
 
18
25
  console.log("settings.appName", appName);
19
26
  console.log("settings.appDomain", appDomain);
@@ -25,4 +32,11 @@ console.log("settings.authMode", authMode);
25
32
  console.log("settings.authSupertokensApiBasePath", authSupertokensApiBasePath);
26
33
  console.log("settings.authSupertokensResendAfter", authSupertokensResendAfter);
27
34
 
35
+ console.log("settings.blog", blog);
28
36
  console.log("settings.githubRepo", githubRepo);
37
+ console.log("settings.discordInvite", discordInvite);
38
+ console.log("settings.redditSubreddit", redditSubreddit);
39
+
40
+ console.log("settings.plausibleEnabled", plausibleEnabled);
41
+ console.log("settings.plausibleDomain", plausibleDomain);
42
+ 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/style.css CHANGED
@@ -1,3 +1,5 @@
1
+ @import url("https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@latest/tabler-icons.min.css");
2
+
1
3
  @tailwind base;
2
4
  @tailwind components;
3
5
  @tailwind utilities;
@@ -51,7 +53,7 @@
51
53
  }
52
54
 
53
55
  .ffun-header-link {
54
- @apply text-blue-600 hover:text-blue-800 cursor-pointer text-lg;
56
+ @apply text-blue-600 hover:text-blue-900 cursor-pointer text-lg;
55
57
  }
56
58
 
57
59
  .ffun-normal-link {
@@ -5,7 +5,7 @@
5
5
  <small class="block text-lg font-normal">Personalized news for professionals</small>
6
6
  </template>
7
7
 
8
- <div class="max-w-md mx-auto">
8
+ <div class="max-w-lg mx-auto">
9
9
  <div class="ffun-info-good">
10
10
  <supertokens-login />
11
11
  </div>