@rmdes/indiekit-endpoint-funkwhale 1.0.1 → 1.0.2
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/index.js +12 -0
- package/locales/en.json +35 -27
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import express from "express";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import path from "node:path";
|
|
2
4
|
|
|
3
5
|
import { dashboardController } from "./lib/controllers/dashboard.js";
|
|
4
6
|
import { listeningsController } from "./lib/controllers/listenings.js";
|
|
@@ -7,6 +9,8 @@ import { statsController } from "./lib/controllers/stats.js";
|
|
|
7
9
|
import { nowPlayingController } from "./lib/controllers/now-playing.js";
|
|
8
10
|
import { startSync } from "./lib/sync.js";
|
|
9
11
|
|
|
12
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
13
|
+
|
|
10
14
|
const protectedRouter = express.Router();
|
|
11
15
|
const publicRouter = express.Router();
|
|
12
16
|
|
|
@@ -37,6 +41,14 @@ export default class FunkwhaleEndpoint {
|
|
|
37
41
|
return ["FUNKWHALE_TOKEN", "FUNKWHALE_INSTANCE", "FUNKWHALE_USERNAME"];
|
|
38
42
|
}
|
|
39
43
|
|
|
44
|
+
get localesDirectory() {
|
|
45
|
+
return path.join(__dirname, "locales");
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
get styles() {
|
|
49
|
+
return path.join(__dirname, "assets", "styles.css");
|
|
50
|
+
}
|
|
51
|
+
|
|
40
52
|
get navigationItems() {
|
|
41
53
|
return {
|
|
42
54
|
href: this.options.mountPath,
|
package/locales/en.json
CHANGED
|
@@ -1,29 +1,37 @@
|
|
|
1
1
|
{
|
|
2
|
-
"funkwhale
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
2
|
+
"funkwhale": {
|
|
3
|
+
"title": "Funkwhale",
|
|
4
|
+
"listenings": "Listening History",
|
|
5
|
+
"favorites": "Favorites",
|
|
6
|
+
"stats": "Statistics",
|
|
7
|
+
"nowPlaying": "Now Playing",
|
|
8
|
+
"recentlyPlayed": "Recently Played",
|
|
9
|
+
"lastPlayed": "Last Played",
|
|
10
|
+
"allTime": "All Time",
|
|
11
|
+
"thisWeek": "This Week",
|
|
12
|
+
"thisMonth": "This Month",
|
|
13
|
+
"trends": "Trends",
|
|
14
|
+
"listeningTrend": "Listening Trend (30 days)",
|
|
15
|
+
"topArtists": "Top Artists",
|
|
16
|
+
"topAlbums": "Top Albums",
|
|
17
|
+
"plays": "plays",
|
|
18
|
+
"tracks": "tracks",
|
|
19
|
+
"artists": "artists",
|
|
20
|
+
"albums": "albums",
|
|
21
|
+
"listeningTime": "Listening Time",
|
|
22
|
+
"noRecentPlays": "No music played recently",
|
|
23
|
+
"noFavorites": "No favorite tracks yet",
|
|
24
|
+
"viewAll": "View All",
|
|
25
|
+
"viewStats": "View Statistics",
|
|
26
|
+
"sync": "Sync Now",
|
|
27
|
+
"lastSync": "Last sync",
|
|
28
|
+
"error": {
|
|
29
|
+
"connection": "Could not connect to Funkwhale",
|
|
30
|
+
"noConfig": "Funkwhale endpoint not configured correctly"
|
|
31
|
+
},
|
|
32
|
+
"widget": {
|
|
33
|
+
"description": "View your Funkwhale listening activity",
|
|
34
|
+
"view": "View Activity"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
29
37
|
}
|
package/package.json
CHANGED